Syntax Without Semantics: Teaching Large Language Models to Code in an Unseen Language
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) achieve high pass rates on code generation benchmarks, yet whether they can transfer this ability to languages absent from pretraining remains poorly understood. We introduce PyLang, a minimal imperative language absent from all pretraining corpora, and evaluate frontier models zero-shot and fine-tuned Qwen3 (4B, 8B, 32B) on 352 problems. We find that fine-tuning quickly teaches syntax but fails to transfer semantic competence: Python outperforms PyLang by up to 19% across all configurations, and no intervention (multi-task learning, preference tuning, code infilling, or latent-space objectives) closes the gap. An LLM judge reveals that frontier models select an identical algorithm to Python 80% of the time, yet cannot translate it into a working PyLang implementation., and CKA analysis confirms that fine-tuned models converge to nearly identical internal representations across languages (CKA > 0.97) while diverging at the output stage. We term this the implementation fidelity gap: models possess language-agnostic algorithmic understanding but cannot express it in an unfamiliar language. Our findings highlight the need for training methods that decouple reasoning from language-specific realization.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 33 of its 34 references that are in the map. First posted on arXiv 15 May 2026.
Builds on
33 of 34 references.
References · 33
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024Qwen2 Technical Reportcited by 2,076
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2023StarCoder: may the source be with you!cited by 790
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2024A Careful Examination of Large Language Model Performance on Grade School Arithmeticcited by 188
- 2023Self-planning Code Generation with Large Language Modelscited by 121
21 more
- 2022Reliability of CKA as a Similarity Measure in Deep Learningcited by 82
- 2024Planning In Natural Language Improves LLM Search For Code Generationcited by 79
- 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languagescited by 65
- 2025LiveCodeBench Pro: How Do Olympiad Medalists Judge LLMs in Competitive Programming?cited by 52
- 2023Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMscited by 45
- 2024Changing Answer Order Can Decrease MMLU Accuracycited by 41
- 2025LLM-JEPA: Large Language Models Meet Joint Embedding Predictive Architecturescited by 35
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2021Fine-Tuned Transformers Show Clusters of Similar Representations Across Layerscited by 29
- 2024Enhancing Code Generation Performance of Smaller Models by Distilling the Reasoning Ability of LLMscited by 17
- 2026Interpretability without actionability: mechanistic methods cannot correct language model errors despite near-perfect internal representationscited by 13
- 2025General Intelligence Requires Reward-based Pretrainingcited by 12
- 2025Enhancing Code Generation for Low-Resource Languages: No Silver Bulletcited by 9
- 2023Cross-lingual Transfer in Programming Languages: An Extensive Empirical Studycited by 4
- 2026EsoLang-Bench: Evaluating Genuine Reasoning in Large Language Models via Esoteric Programming Languagescited by 4
- 2025Transfer of Structural Knowledge from Synthetic Languagescited by 3
- 2025Neuron-Guided Interpretation of Code LLMs: Where, Why, and How?cited by 3
- 2025Let's Take Esoteric Programming Languages Seriouslycited by 1
- 2025M2G-Eval: Enhancing and Evaluating Multi-granularity Multilingual Code Generationcited by 1
- 2026Idea First, Code Later: Disentangling Problem Solving from Code Generation in Evaluating LLMs for Competitive Programmingcited by 1
- 2026Bridging the Knowledge Void: Inference-time Acquisition of Unfamiliar Programming Languages for Coding Taskscited by 1
Built on by
Not cited yet.