Enhancing Code Generation for Low-Resource Languages: No Silver Bullet
Not on the map. Why?
Abstract (arXiv)
The advent of Large Language Models (LLMs) has significantly advanced the field of automated code generation. LLMs rely on large and diverse datasets to learn syntax, semantics, and usage patterns of programming languages. For low-resource languages (i.e., niche programming languages characterized by the scarcity of training data), the limited availability of such data hampers the models' ability to generalize effectively, resulting in poorer code generation performance as compared to high-resource languages. For this reason, there is a quest for techniques able to close this performance gap. We present an empirical study investigating the effectiveness of several approaches for boosting LLMs' performance on low-resource languages, namely: (i) a classic fine-tuning, which is however capped in size by the scarcity of training data; (ii) three variants of in-context learning, with prompts crafted to provide the LLM with additional information about the low-resource language (e.g., few-shot examples showcasing features of the targeted language); and (iii) a pre-training objective teaching the model how to translate between high- and low-resource languages. The context of our study are two low-resource languages (R and Racket) and six LLMs having different architectures and sizes. Our findings reveal that a fine-tuning is usually the best choice for smaller LLMs, possibly due to the fact that even a small dataset is sufficient to train their limited number of parameters. With the increase in size of the models, in-context learning becomes more and more effective, representing a safe and cheap bet (i.e., it always helps, but with different magnitudes). Differently, very large LLMs may deteriorate their performance on low-resource languages when fine-tuning is performed, possibly due to the lack of enough data needed to effectively update their weights.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). First posted on arXiv 31 Jan 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 4; 2026: 5.
9 papers.
- 2025Type-Constrained Code Generation with Language Modelscited by 32
- 2025Constrained Decoding of Diffusion LLMs with Context-Free Grammarscited by 13
- 2025CodeChemist: Test-Time Scaling for Low-Resource Code Generation via Functional Knowledge Transfercited by 1
- 2025Knowledge-Graph-Driven Data Synthesis for Low-Resource Software Development: A HarmonyOS Case Studycited by 1
- 2026Bridging the Knowledge Void: Inference-time Acquisition of Unfamiliar Programming Languages for Coding Taskscited by 1
- 2026The Alignment Problem in Constrained Code Generationcited by 1
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verificationcited by 0
- 2026Syntax Without Semantics: Teaching Large Language Models to Code in an Unseen Languagecited by 0
- 2026Selective Left-Shift: Turning Test-Time Compute and Difficulty-based Curation into Training Data for Low-Resource Code Generationcited by 0
- 2026Selective Left-Shift: Turning Test-Time Compute and Difficulty-based Curation into Training Data for Low-Resource Code Generation8 Jul 2026
- 2026The Alignment Problem in Constrained Code Generation19 Jun 2026
- 2026Syntax Without Semantics: Teaching Large Language Models to Code in an Unseen Language15 May 2026
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verification18 Apr 2026
- 2026Bridging the Knowledge Void: Inference-time Acquisition of Unfamiliar Programming Languages for Coding Tasks16 Jan 2026
- 2025Knowledge-Graph-Driven Data Synthesis for Low-Resource Software Development: A HarmonyOS Case Study29 Nov 2025
- 2025CodeChemist: Test-Time Scaling for Low-Resource Code Generation via Functional Knowledge Transfer1 Oct 2025
- 2025Constrained Decoding of Diffusion LLMs with Context-Free Grammars13 Aug 2025
- 2025Type-Constrained Code Generation with Language Models12 Apr 2025