Research map / Architectures and efficiency / Attention and transformers
Continuity and Isolation Lead to Doubts or Dilemmas in Large Language Models
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
The paper proves that decoder-only transformers with compact positional encoding exhibit continuity and isolation, which together prevent a single transformer from eventually learning all periodic sequences, and supports this with experiments on several LLMs.
Problem
Whether decoder-only Transformers can eventually learn simple infinite pattern sequences (e.g., periodic sequences) with certainty, given limits on sensitivity of their output distributions to input perturbations.
Approach
Proves that compact-positional-encoding decoder-only transformers are continuous with respect to relative Hamming distance on prompts, which implies an isolation property: any eventually learnable sequence has a positive-radius Hamming ball containing no other eventually learnable sequence, so no single such transformer can learn all periodic sequences. Extends prior encoder-only continuity result
Key results
- For gamma=0.05 (9 flipped symbols out of 189), next-token sensitivity is 0 for all tested models except phi-4.
- Llama-2-7b-hf fails to continue periodic sequences beyond a critical period that grows with the number of repetitions r.
- Meta-llama-3-8B-Instruct shows sensitivity in 21% of SyntaxVerification examples, while phi-4 gives the same output for all cases.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Perturb the all-zero prompt at one symbol (γ=0.01) | Selected decoder-only LLMs · All-zero sequence | NTS: 0 | No clear effect |
| Perturb the all-zero prompt at γ=0.05 | Selected decoder-only LLMs · All-zero sequence | NTS: 0 | No clear effect |
| Replace softmax attention with ssmax (ablation) | Decoder-only language models · All-zero sequence perturbation | next-token sensitivity | Helped |
| Move perturbations toward the end of the input | Decoder-only language models · All-zero sequence perturbation | next-token sensitivity | Helped |
| Increase model size within the Gemma-3 family | Gemma-3 models · SyntaxVerification | sensitivity | Helped |
| Use an instruct-tuned model rather than a base model | Language models · SyntaxVerification | error rate | Helped |
| Use phi-4 on the syntax verification task | phi-4 · SyntaxVerification | sensitivity | Hurt |
Surprising findings
- Smaller models such as gpt-2 and gpt-2-xl sometimes show larger sensitivity than bigger models in the all-zero test.
- Instruct models still show error rates above 15% on SyntaxVerification, while base models exceed 80%.
Limitations
- Results require compact positional encoding; absolute PE and log-n scaling fall outside the theorems.
- Layer norm with epsilon=0 and unbounded chain-of-thought steps escape the continuity limitations and are not covered.
- Empirical support is limited to a small set of models and a 100-exercise dataset; theoretical thresholds are not computed for real models.
Experimental setup
Datasets: 100 Python function exercises (SyntaxVerification, constructed by authors) synthetic periodic sequences all-zero sequences of length 190
Benchmarks: SyntaxVerification periodic sequence generation all-zero next-token sensitivity
Metrics: next-token sensitivity (NTS) success certainty error rate
Baselines: ssmax attention o3-mini o4-mini
Builds on: Barbero et al. representational collapse overwhelming strings Chiang and Cholak log-length scaled attention scalable softmax
Closest papers by meaning
- Dynamical Properties of Tokens in Self-Attention and Effects of Positional Encoding (NeurIPS 2025 · similarity 0.88)
- Pause Tokens Strictly Increase the Expressivity of Constant-Depth Transformers (NeurIPS 2025 · similarity 0.87)
- Characterizing the Expressivity of Fixed-Precision Transformer Language Models (NeurIPS 2025 · similarity 0.87)
- Algorithmic Capabilities of Random Transformers (NeurIPS 2024 · similarity 0.86)
- When Do Transformers Outperform Feedforward and Recurrent Networks? A Statistical Perspective (NeurIPS 2025 · similarity 0.86)
- Abrupt Learning in Transformers: A Case Study on Matrix Completion (NeurIPS 2024 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
