Concise One-Layer Transformers Can Perform Dictionary Lookup
Anton HampeLSLena Strobl
Dana AngluinRobert Frank Anton Hampe
LSLena Strobl

Dana Angluin
Robert Frank
+4
This paper studies the expressive capacity of transformers for dictionary lookup. It proves that concise 1-layer transformers (polylog bounds on heads, embedding dimension, and precision) can perform lookup when key and value share an input position, but cannot when they are in different positions, assuming $p$-bit rational precision. Concise 2-layer transformers can handle the latter case. Experiments align proven computability with practical learnability.

arXiv ·
· March 28, 2025