mlsanityData to 7 Oct 2026

Explicit Knowledge Transfer for Weakly-Supervised Code Generation

arXiv 2211.16740 ↗First posted 30 Nov 2022cs.CLcited by 4

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2015Distilling the Knowledge in a Neural Networkcited by 10,076
  3. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  6. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
  7. 2021Program Synthesis with Large Language Modelscited by 3,509
  8. 2022Emergent Abilities of Large Language Modelscited by 2,483
  9. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  10. 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,359
  11. 2022LaMDA: Language Models for Dialog Applicationscited by 1,218
  12. 2017Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithmcited by 723
10 more
  1. 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
  2. 2015Distillation as a Defense to Adversarial Perturbations against Deep Neural Networkscited by 675
  3. 2015Compositional Semantic Parsing on Semi-Structured Tablescited by 509
  4. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  5. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  6. 2017Controlling Linguistic Style Aspects in Neural Language Generationcited by 147
  7. 2022Formal Mathematics Statement Curriculum Learningcited by 141
  8. 2018Coarse-to-Fine Decoding for Neural Semantic Parsingcited by 110
  9. 2016Neural Symbolic Machines: Learning Semantic Parsers on Freebase with Weak Supervisioncited by 101
  10. 2019Merging Weak and Active Supervision for Semantic Parsingcited by 11

Built on by

Cited by year

Citing papers per year: 2023: 2; 2024: 1; 2025: 1.

4 papers.