mlsanityData to 7 Oct 2026

Failure by Interference: Language Models Make Balanced Parentheses Errors When Faulty Mechanisms Overshadow Sound Ones

arXiv 2507.00322 ↗First posted 30 Jun 2025cs.CL cs.AI cs.SEcited by 4

Not on the map. Why?

Abstract (arXiv)

Despite remarkable advances in coding capabilities, language models (LMs) still struggle with simple syntactic tasks such as generating balanced parentheses. In this study, we investigate the underlying mechanisms behind the persistence of these errors across LMs of varying sizes (124M-7B) to both understand and mitigate the errors. Our study reveals that LMs rely on a number of components (attention heads and FF neurons) that independently make their own predictions. While some components reliably promote correct answers across a generalized range of inputs (i.e., implementing "sound mechanisms''), others are less reliable and introduce noise by promoting incorrect tokens (i.e., implementing "faulty mechanisms''). Errors occur when the faulty mechanisms overshadow the sound ones and dominantly affect the predictions. Motivated by this insight, we introduce RASteer, a steering method to systematically identify and increase the contribution of reliable components for improving model performance. RASteer substantially improves performance on balanced parentheses tasks, boosting accuracy of some models from 0% to around 100% without impairing the models' general coding ability. We further demonstrate its broader applicability in arithmetic reasoning tasks, achieving performance gains of up to around 20%.

Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 36 of its 54 references that are in the map. First posted on arXiv 30 Jun 2025.

Builds on

36 of 54 references.

References · 36

  1. 2017Attention Is All You Needcited by 59,932
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2024The Llama 3 Herd of Modelscited by 14,192
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  6. 2021Program Synthesis with Large Language Modelscited by 3,509
  7. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  8. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  9. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
  10. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
  11. 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,359
  12. 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,259
24 more
  1. 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,239
  2. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
  3. 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,009
  4. 2024Refusal in Language Models Is Mediated by a Single Directioncited by 960
  5. 2023StarCoder: may the source be with you!cited by 790
  6. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
  7. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  8. 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 415
  9. 2023In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steeringcited by 240
  10. 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 199
  11. 2023Attribution Patching Outperforms Automated Circuit Discoverycited by 196
  12. 2024How to use and interpret activation patchingcited by 191
  13. 2024ReFT: Representation Finetuning for Language Modelscited by 186
  14. 2023Linear Representations of Sentiment in Large Language Modelscited by 157
  15. 2024Have Faith in Faithfulness: Going Beyond Circuit Overlap When Finding Model Mechanismscited by 144
  16. 2022Analyzing Transformers in Embedding Spacecited by 131
  17. 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
  18. 2024A Practical Review of Mechanistic Interpretability for Transformer-Based Language Modelscited by 113
  19. 2024Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristicscited by 94
  20. 2024What's Wrong with Your Code Generated by Large Language Models? An Extensive Studycited by 52
  21. 2024Summing Up the Facts: Additive Mechanisms Behind Factual Recall in LLMscited by 39
  22. 2024Extending Activation Steering to Broad Skills and Multiple Behaviourscited by 36
  23. 2024An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMscited by 20
  24. 2025Mechanistic Understanding of Language Models in Syntactic Code Completioncited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 3.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Probing for Arithmetic Errors in Language Models
  2. 2023Evaluating Concurrent Robustness of Language Models Across Diverse Challenge Sets
  3. 2026Wrong Before Right: Late Rescue and Interface Failure in Aligned Language Models
  4. 2026The Alignment Paradox: How Post-Training Amplifies Confident Hallucinations in Language Models
  5. 2026Understanding LLM Failures: A Multi-Tape Turing Machine Analysis of Systematic Errors in Language Model Reasoning
  6. 2025Towards Alignment-Centric Paradigm: A Survey of Instruction Tuning in Large Language Models
  7. 2026Numerical Instability and Chaos: Quantifying the Unpredictability of Large Language Models
  8. 2026The Knowing-Saying Gap: When Probes See Errors that Confidence Misses