Legible-by-Construction: Attention and End-to-End Transformers
Not on the map. Why?
Abstract (arXiv)
A companion paper showed that a transformer's feed-forward layer can be rebuilt from explicit fuzzy set operations - intersection, set-difference, and a self-forgetting sequence quantifier - so its hidden units read as named logical operators at no cost to language-model quality. That left the other half of the transformer opaque. Here we carry the same idea into attention and join the two into one model. The mechanism is minimal: a head's value is passed through a sigmoid, so each value channel becomes a readable detector of whether a feature holds at a token. This adds no parameters and leaves the standard head otherwise untouched. A Boolean variant goes further, restructuring the value into an explicit within-token intersection and negation-capable set-difference. In both designs the output projection is left free, not tied to the vocabulary, which is the load-bearing decision: bounding what a head detects while leaving what it writes unconstrained yields selective detectors, whereas constraining the write does not. A bounded value is shaped into a readable detector by two selectivity pressures - one for sparse firing, one for decisive firing at the rails - and which a design wants is not universal. Across five specialized-attention designs at 125M parameters, 44 to 62 percent of value channels become crisp, contextually selective detectors, and their legibility rises with depth rather than crystallizing only on punctuation. Language-model quality is at parity with a conventional baseline. Finally, we couple the Boolean attention to the legible feed-forward layer and train an end-to-end legible-by-construction language model at benchmark parity: its feed-forward units are named set and quantifier operations throughout, and we can take a token it generates and read the named units that compose to produce it.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 24 of its 34 references that are in the map. First posted on arXiv 5 Jul 2026.
Builds on
24 of 34 references.
References · 24
- 2017Attention Is All You Needcited by 59,932
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2020GLU Variants Improve Transformercited by 1,724
- 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,359
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
- 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 960
- 2022Toy Models of Superpositioncited by 928
- 2016Language Modeling with Gated Convolutional Networkscited by 688
- 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 579
- 2019BLiMP: The Benchmark of Linguistic Minimal Pairs for Englishcited by 553
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
- 2020Logic Tensor Networkscited by 197
12 more
- 2023Small-scale proxies for large-scale Transformer training instabilitiescited by 182
- 2022Analyzing Transformers in Embedding Spacecited by 131
- 2020Analyzing Differentiable Fuzzy Logic Operatorscited by 100
- 2022Deep Differentiable Logic Gate Networkscited by 67
- 2024Theory, Analysis, and Best Practices for Sigmoid Self-Attentioncited by 62
- 2023Codebook Features: Sparse and Discrete Interpretability for Neural Networkscited by 45
- 2024Interpreting Attention Layer Outputs with Sparse Autoencoderscited by 43
- 2024Bilinear MLPs enable weight-based mechanistic interpretabilitycited by 28
- 2023Attention Lens: A Tool for Mechanistically Interpreting the Attention Head Information Retrieval Mechanismcited by 21
- 2025Dense SAE Latents Are Features, Not Bugscited by 17
- 2024TAB: Transformer Attention Bottlenecks enable User Intervention and Debugging in Vision-Language Modelscited by 2
- 2026Explicit Fuzzy Logic in the Feed-Forward Layer: Self-Forgetting Quantifiers Discover Legible Grammatical-Licensing Detectorscited by 2
Built on by
Citing papers per year: 2026: 2.
2 papers.