Explicit Knowledge Transfer for Weakly-Supervised Code Generation
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) can acquire strong code-generation capabilities through few-shot learning. In contrast, supervised fine-tuning is still needed for smaller models to achieve good performance. Such fine-tuning demands a large number of task-specific NL-code pairs, which are expensive to obtain. In this paper, we attempt to transfer the code generation ability of an LLM to a smaller model with the aid of weakly-supervised data. More specifically, we propose explicit knowledge transfer (EKT), which uses the few-shot capabilities of a teacher LLM to create NL-code pairs that we then filter for correctness and fine-tune the student on. We evaluate EKT on the task of generating code solutions to math word problems from the GSM8k dataset. We find that EKT not only yields better performance than training with expert iteration, but also outperforms knowledge distillation, another form of knowledge transfer. A GPT-Neo 1.3B model trained using EKT with a GPT-J teacher achieves a 12.4% pass@100 on GSM8k, while the same student and teacher trained with knowledge distillation yield only a 3.7% pass@100. We also show that it is possible for a student model to outperform the teacher using EKT.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 22 of its 29 references that are in the map. First posted on arXiv 30 Nov 2022.
Builds on
22 of 29 references.
References · 22
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2022Emergent Abilities of Large Language Modelscited by 2,483
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,359
- 2022LaMDA: Language Models for Dialog Applicationscited by 1,218
- 2017Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithmcited by 723
10 more
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
- 2015Distillation as a Defense to Adversarial Perturbations against Deep Neural Networkscited by 675
- 2015Compositional Semantic Parsing on Semi-Structured Tablescited by 509
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2022A Systematic Evaluation of Large Language Models of Codecited by 360
- 2017Controlling Linguistic Style Aspects in Neural Language Generationcited by 147
- 2022Formal Mathematics Statement Curriculum Learningcited by 141
- 2018Coarse-to-Fine Decoding for Neural Semantic Parsingcited by 110
- 2016Neural Symbolic Machines: Learning Semantic Parsers on Freebase with Weak Supervisioncited by 101
- 2019Merging Weak and Active Supervision for Semantic Parsingcited by 11
Built on by
Citing papers per year: 2023: 2; 2024: 1; 2025: 1.
4 papers.
- 2023Domain Specialization as the Key to Make Large Language Models Disruptive: A Comprehensive Surveycited by 134
- 2023Synthetic Data Generation in Low-Resource Settings via Fine-Tuning of Large Language Modelscited by 3
- 2024Knowledge Distillation of Black-Box Large Language Modelscited by 3
- 2025Online Knowledge Distillation with Reward Guidancecited by 0
- 2025Online Knowledge Distillation with Reward Guidance25 May 2025
- 2024Knowledge Distillation of Black-Box Large Language Models13 Jan 2024
- 2023Synthetic Data Generation in Low-Resource Settings via Fine-Tuning of Large Language Models2 Oct 2023
- 2023Domain Specialization as the Key to Make Large Language Models Disruptive: A Comprehensive Survey30 May 2023