LeGo-Code: Can Modular Curriculum Learning Advance Complex Code Generation? Insights from Text-to-SQL
Not on the map. Why?
Abstract (arXiv)
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 standard fine-tuning due to catastrophic forgetting. To overcome this, we propose a Modular Adapter Composition (MAC) strategy. By sequentially training tier-specific adapters on incremental complexity levels (Easy to Extra-Hard), we create a scaffolded learning environment that improves performance on complex queries. Our approach not only produces measurable performance gains on the Spider and BIRD benchmarks but also provides a flexible, "Lego-like" architecture, allowing models to be composed and deployed based on specific schema difficulty requirements. These findings demonstrate that structured, modular learning is a superior alternative to monolithic fine-tuning for mastering the syntax and logic of complex code generation.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 18 of its 27 references that are in the map. First posted on arXiv 20 Apr 2026.
Builds on
18 of 27 references.
References · 18
- 2017Attention Is All You Needcited by 60,361
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,236
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 687
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 424
- 2018Improving Text-to-SQL Evaluation Methodologycited by 135
- 2018Coarse-to-Fine Decoding for Neural Semantic Parsingcited by 110
- 2020SmBoP: Semi-autoregressive Bottom-up Semantic Parsingcited by 97
6 more
- 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
- 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQLcited by 69
- 2021SADGA: Structure-Aware Dual Graph Aggregation Network for Text-to-SQLcited by 43
- 2022MultiSpider: Towards Benchmarking Multilingual Text-to-SQL Semantic Parsingcited by 22
- 2023Enhancing Text-to-SQL Translation for Financial System Designcited by 12
- 2025Dialect2SQL: A Novel Text-to-SQL Dataset for Arabic Dialects with a Focus on Moroccan Darijacited by 1
Built on by
Not cited yet.