RobBobin commited on
Commit
cbc6fde
Β·
verified Β·
1 Parent(s): 7729883

Update model card: embedding ablation table + interpretability summary

Browse files
Files changed (1) hide show
  1. README.md +19 -3
README.md CHANGED
@@ -21,9 +21,11 @@ pipeline_tag: other
21
 
22
  # RSK Transformer
23
 
24
- A transformer that learns **inverse combinatorial bijections** β€” the Robinson-Schensted-Knuth correspondence (permutations and matrices), the Hillman-Grassl correspondence (reverse plane partitions), and the cylindric growth diagram bijection (cylindric plane partitions). The same architecture handles all tasks without modification.
25
 
26
- Achieves **100% exact-match accuracy** on held-out test data for permutations at n=10, **99.99%** at n=15 (1.3 trillion permutations), **100%** on 3Γ—3 matrix RSK, **100%** on reverse plane partitions of shape (4,3,2,1), and **100%** on cylindric plane partitions β€” significantly improving on the [PNNL ML4AlgComb benchmark](https://github.com/pnnl/ML4AlgComb/tree/master/rsk). Scales to 5Γ—5 matrices (96.8% exact match on a space of ~10¹⁴).
 
 
27
 
28
  πŸ“„ **Paper**: [paper.pdf](paper.pdf)
29
  πŸ’» **Code**: [github.com/RaggedR/rsk-transformer](https://github.com/RaggedR/rsk-transformer)
@@ -66,6 +68,20 @@ Results are data-limited, not architecture-limited: per-position accuracy is 99.
66
 
67
  The MLP collapses from 95.67% to 3.07% as n increases from 10 to 15, while the transformer barely notices (100% β†’ 99.99%). Without spatial structure, the MLP cannot coordinate predictions across positions.
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  ### Experiment 3: Reverse Plane Partitions (Hillman-Grassl)
70
 
71
  Given a reverse plane partition (RPP) of shape Ξ», recover the arbitrary filling via the inverse [Hillman-Grassl correspondence](https://en.wikipedia.org/wiki/Hillman%E2%80%93Grassl_correspondence). **Same model architecture** β€” the only change is that the input is a single filling (not a pair), so `tableau_emb(0)` is used for all tokens.
@@ -198,7 +214,7 @@ python train.py --model encoder --task cylindric --profile 101010 --max-label 3
198
  ```bibtex
199
  @software{rsk_transformer,
200
  author={Langer, Robin},
201
- title={Learning the RSK Correspondence with Transformers},
202
  year={2026},
203
  url={https://github.com/RaggedR/rsk-transformer}
204
  }
 
21
 
22
  # RSK Transformer
23
 
24
+ A 1.2M-parameter transformer that learns **inverse combinatorial bijections** β€” the Robinson-Schensted-Knuth correspondence (permutations and matrices), the Hillman-Grassl correspondence (reverse plane partitions), and the cylindric growth diagram bijection (cylindric plane partitions). The same architecture handles all tasks without modification.
25
 
26
+ Achieves **100% exact-match accuracy** on held-out test data for permutations at n=10, **99.99%** at n=15 (1.3 trillion permutations), **100%** on reverse plane partitions, and **100%** on cylindric plane partitions β€” significantly improving on the [PNNL ML4AlgComb benchmark](https://github.com/pnnl/ML4AlgComb/tree/master/rsk).
27
+
28
+ **Mechanistic interpretability via sparse autoencoders** reveals two families of features for permutation RSK (insertion-order detectors and step-specific Q-entry locators) and, for cylindric plane partitions, features aligned with Fomin's growth diagram local rules β€” direct evidence of the learned algorithm.
29
 
30
  πŸ“„ **Paper**: [paper.pdf](paper.pdf)
31
  πŸ’» **Code**: [github.com/RaggedR/rsk-transformer](https://github.com/RaggedR/rsk-transformer)
 
68
 
69
  The MLP collapses from 95.67% to 3.07% as n increases from 10 to 15, while the transformer barely notices (100% β†’ 99.99%). Without spatial structure, the MLP cannot coordinate predictions across positions.
70
 
71
+ ### Ablation: Embedding Components (n=10)
72
+
73
+ | Ablation | What changes | Greedy exact | Per-position |
74
+ |----------|-------------|-------------|-------------|
75
+ | Full model | β€” | **100.00%** | 100.00% |
76
+ | Drop row | No row embedding | **100.00%** | 100.00% |
77
+ | Drop column | No column embedding | **99.99%** | 100.00% |
78
+ | Concatenate | 4Γ—32d concat, not 4Γ—128d sum | **100.00%** | 100.00% |
79
+ | 1D position | Sequential pos replaces row+col | 72.38% | 91.34% |
80
+ | Drop tableau | No P-vs-Q identity | 5.79% | 58.49% |
81
+ | Drop row+col | No spatial info | 0.00% | 9.99% |
82
+
83
+ Tableau identity (P vs Q) is the single most critical component. Row and column are individually redundant (either alone suffices given the constrained tableau shape), but *some* spatial embedding is essential. 1D positional encoding recovers only 72% β€” 2D structure specifically is what enables learning.
84
+
85
  ### Experiment 3: Reverse Plane Partitions (Hillman-Grassl)
86
 
87
  Given a reverse plane partition (RPP) of shape Ξ», recover the arbitrary filling via the inverse [Hillman-Grassl correspondence](https://en.wikipedia.org/wiki/Hillman%E2%80%93Grassl_correspondence). **Same model architecture** β€” the only change is that the input is a single filling (not a pair), so `tableau_emb(0)` is used for all tokens.
 
214
  ```bibtex
215
  @software{rsk_transformer,
216
  author={Langer, Robin},
217
+ title={Learning Combinatorial Bijections with Transformers: Inverse RSK, Growth Diagrams, and Interpretable Features},
218
  year={2026},
219
  url={https://github.com/RaggedR/rsk-transformer}
220
  }