What Accuracy Hides In Learned Transformer Programs
Jonathan Lee, Narmeen Oozeer, Philip Quirke
Key points
From the paper's conclusion- We examined a counting task where a program achieved 100% accuracy on sampled test sequences but failed on another input using the symbols and lengths allowed during training.
Abstract
Transformer Programs (TP) (Friedman et al., 2023) constrain a Transformer's architecture so that its learned computation can be extracted as readable Python code. TP expose learned computations, but token accuracy can hide incorrect complete answers. In this work, we examine how program inspection provides insights beyond accuracy scores and helps guide training. We first evaluated TP on nine algorithmic tasks. We compared token accuracy with accuracy on complete output sequences and checked for failures missed by sampled tests. Further, we assessed training data improvements informed by program inspection and failure analysis, finding gains in sequence accuracy on several tasks. We examined a counting task where a program achieved 100% accuracy on sampled test sequences but failed on another input using the symbols and lengths allowed during training. The program counted correctly, but the required answer was missing from its output labels. After adding training examples with larger counts, the retrained models passed exhaustive evaluation over the bounded domain. In the frequency ranking task, inspection showed how correct counts contributed to incorrect answers in programs trained before and after changes to the training data. Finally, we studied constraints imposed by TP training and operations. The TP training process can lead to accuracy losses late in training. Our reference constructions also show how composing the restricted TP operations can use many layers or large lookup tables.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- The Communication Bottleneck: A Round-Trip Study of Tree-Structured Expression Serialization in Language ModelsarXiv · 2026
- How Detectable Is Machine-Generated Text? A Preregistered Audit of Post-Training, Scale, and Task EffectsTechnologies · 2026
- Quantifying the Stability of Multi-Step Reasoning via Error AmplificationarXiv · 2026
- Agent Error Dataset: Scaling 50,000 Error--Diagnosis Pairs for Failure Analysis and Error-Aware Post-TrainingarXiv · 2026
- Learning to Read Events for Exact State Tracking with Frozen Language ModelsarXiv · 2026
- Evaluating Exact Output and Checkpoint-State Prediction in Real ProgramsarXiv · 2026