Beyond the Training Distribution: Mapping Generalization Boundaries in Neural Program Synthesis
Not on the map. Why?
Abstract (arXiv)
Large-scale transformers achieve impressive results on program synthesis benchmarks, yet their true generalization capabilities remain obscured by data contamination and opaque training corpora. To rigorously assess whether models are truly generalizing or merely retrieving memorized templates, we introduce a strictly controlled program synthesis environment based on a domain-specific arithmetic grammar. By systematically enumerating and evaluating millions of unique programs, we construct interpretable syntactic and semantic metric spaces. This allows us to precisely map data distributions and sample train and test splits that isolate specific distributional shifts. Our experiments demonstrate that optimizing density generalization -- through diverse sampling over both semantic and syntactic spaces -- induces robust out-of-distribution generalization. Conversely, evaluating support generalization reveals that transformers severely struggle with extrapolation, experiencing a performance drop of over 30% when forced to generate syntactically novel programs. While steadily scaling up compute improves generalization, the gains follow a strictly log-linear relationship. We conclude that robust generalization requires maximizing training diversity across multiple manifolds, and our findings indicate the necessity for novel search-based approaches to break through current log-linear scaling bottlenecks.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 28 of its 44 references that are in the map. First posted on arXiv 30 Apr 2026.
Builds on
28 of 44 references.
References · 28
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,986
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2021Measuring Coding Challenge Competence With APPScited by 902
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 503
16 more
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
- 2022The Stack: 3 TB of permissively licensed source codecited by 359
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
- 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
- 2024CodeGemma: Open Code Models Based on Gemmacited by 150
- 2024SWE-Bench+: Enhanced Coding Benchmark for LLMscited by 99
- 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 86
- 2025SWE-bench Goes Live!cited by 80
- 2024Quantifying Contamination in Evaluating Code Generation Capabilities of Language Modelscited by 65
- 2022SymFormer: End-to-end symbolic regression using transformer-based architecturecited by 59
- 2023A Transformer Model for Symbolic Regression towards Scientific Discoverycited by 9
- 2025Memorize or Generalize? Evaluating LLM Code Generation with Code Rewritingcited by 7
- 2024Principled Understanding of Generalization for Generative Transformer Models in Arithmetic Reasoning Taskscited by 5
- 2025Out-of-Distribution Generalization in the ARC-AGI Domain: Comparing Execution-Guided Neural Program Synthesis and Test-Time Fine-Tuningcited by 2
- 2025On the Generalizability of Transformer Models to Code Completions of Different Lengthscited by 1
Built on by
Not cited yet.