LeGo-Code: Can Modular Curriculum Learning Advance Complex Code Generation? Insights from Text-to-SQL
Salmane Chafik, Saad Ezzini, Ismail Berrada

TL;DR
This paper explores modular curriculum learning with a Lego-like architecture to enhance large language models' ability to generate complex SQL code from natural language, showing improved performance on benchmarks.
Contribution
It introduces a Modular Adapter Composition strategy that sequentially trains adapters on increasing complexity levels, outperforming naive curriculum and standard fine-tuning.
Findings
Modular training improves complex SQL generation performance.
Naive curriculum learning fails due to catastrophic forgetting.
Lego-like architecture offers flexible deployment options.
Abstract
Recently, code-oriented large language models (LLMs) have demonstrated strong capabilities in translating natural language into executable code. Text-to-SQL is a significant application of this ability, enabling non-technical users to interact with relational databases using natural language. However, state-of-the-art models continue to struggle with highly complex logic, particularly deeply nested statements involving multiple joins and conditions, as well as with real-world database schemas that are noisy or poorly structured. In this paper, we investigate whether curriculum learning can improve the performance of code-based LLMs on Text-to-SQL tasks. Employing benchmarks including Spider and BIRD, we fine-tune models under different curriculum strategies. Our experiments show that naive curriculum, simply ordering training samples by complexity in a single epoch, fails to surpass…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
