Skip to main content
QUICK REVIEW

[Paper Review] ProtoTransformer: A Meta-Learning Approach to Providing Student Feedback

Mike Wu, Noah D. Goodman|arXiv (Cornell University)|Jul 23, 2021
Software Testing and Debugging TechniquesComputer Science76 references8 citations
TL;DR

ProtoTransformer proposes a meta-learning framework that uses few-shot classification with a transformer-based architecture to generate accurate feedback on student programming code, achieving 88% average precision on unseen university exam problems—surpassing teaching assistants (82%) and outperforming standard supervised methods (65%)—and successfully deployed to scale feedback for 16,000 students.

ABSTRACT

High-quality computer science education is limited by the difficulty of providing instructor feedback to students at scale. While this feedback could in principle be automated, supervised approaches to predicting the correct feedback are bottlenecked by the intractability of annotating large quantities of student code. In this paper, we instead frame the problem of providing feedback as few-shot classification, where a meta-learner adapts to give feedback to student code on a new programming question from just a few examples annotated by instructors. Because data for meta-training is limited, we propose a number of amendments to the typical few-shot learning framework, including task augmentation to create synthetic tasks, and additional side information to build stronger priors about each task. These additions are combined with a transformer architecture to embed discrete sequences (e.g. code) to a prototypical representation of a feedback class label. On a suite of few-shot natural language processing tasks, we match or outperform state-of-the-art performance. Then, on a collection of student solutions to exam questions from an introductory university course, we show that our approach reaches an average precision of 88% on unseen questions, surpassing the 82% precision of teaching assistants. Our approach was successfully deployed to deliver feedback to 16,000 student exam-solutions in a programming course offered by a tier 1 university. This is, to the best of our knowledge, the first successful deployment of a machine learning based feedback to open-ended student code.

Motivation & Objective

  • Address the scalability challenge of providing high-quality feedback on student programming code in university-level computer science courses.
  • Overcome the limitations of supervised learning in few-shot settings, where labeled data is scarce and generalization to new problems is difficult.
  • Develop a meta-learning framework that efficiently leverages small sets of expert-annotated examples to generalize to new programming questions and student code.
  • Improve few-shot learning for code by incorporating task augmentation, side information, and robust sequence encoding to handle code-specific challenges like variable name diversity.

Proposed method

  • Frame feedback prediction as a few-shot classification problem, where a model adapts to new programming questions using only a few labeled student code examples.
  • Use a transformer-based architecture to encode programming code sequences into dense embeddings, conditioned on question and rubric descriptions.
  • Compute class prototypes as the mean embedding of all support examples per feedback category (e.g., 'Incorrect syntax', 'Missing variable').
  • Incorporate side information such as rubric descriptions and question embeddings to strengthen inductive bias and improve few-shot generalization.
  • Apply task augmentation via program obfuscation and byte-pair encoding to generate synthetic tasks and increase data diversity during meta-training.
  • Train the model using a meta-learning objective that minimizes classification error on novel tasks during the few-shot adaptation phase.

Experimental results

Research questions

  • RQ1Can a meta-learning approach achieve human-level accuracy in classifying feedback for student programming code using only a few annotated examples?
  • RQ2How effective is task augmentation and side information in improving few-shot generalization for code feedback prediction?
  • RQ3To what extent can a transformer-based model with prototypical embeddings outperform standard supervised and prior meta-learning methods on real-world university-level programming assignments?
  • RQ4How does the model perform on unseen programming questions compared to teaching assistants and baseline models in a real deployment setting?

Key findings

  • ProtoTransformer achieves an average precision of 88% on unseen programming exam questions, significantly outperforming teaching assistants (82%) and standard supervised baselines (65%).
  • The model generalizes effectively to new programming problems not seen during meta-training, demonstrating strong few-shot generalization capability.
  • Task augmentation via program obfuscation and synthetic task generation improves model robustness and performance, especially in low-data regimes.
  • Incorporating side information (e.g., rubric and question embeddings) significantly enhances model performance by providing stronger inductive biases.
  • The model was successfully deployed at scale, delivering feedback to 16,000 student exam solutions in a tier-1 university course—marking the first successful real-world deployment of ML-based feedback on open-ended student code.
  • Ablation studies confirm that each component—transformer architecture, side information, and task augmentation—contributes meaningfully to the final performance, with the full model outperforming ablated variants.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.