Analyzing Code Provenance in LLMs for Programming Education
Subhankar Maity, Faiza Belbachir, Omar Boucelma, Guilherme Medeiros Machado
Abstract
Large language models (LLMs) play an increasing role in programming education, challenging traditional assessment methods as they can generate fully functional code instantly. This disrupts the reliability of student submissions as indicators of learning and effort. To address this issue, code provenance is essential for tracing the origins of code and distinguishing student-authored, AI-generated, and externally sourced components. We extend the Min-K% probability approach by incorporating synthetic non-member code generation and apply it to Python code for membership inference and provenance tracking. Evaluations cover free LLMs such as GPT-2, DistilGPT-2, and DialoGPT, as well as state-of-the-art commercial models including GPT-5, Gemini 2.5, Mistral, DeepSeek, and LLaMA 3.3. Before evaluating our approach on higher-education student assignments, we validate its feasibility using Stack Overflow data. The results show that free models enable more sensitive code memorization detection than commercial models. By systematically comparing these LLMs, we assess trade-offs between detection accuracy and privacy protection, taking an initial step toward effective assessment of AI-assisted programming education through combined provenance detection and process visibility.
Create a lesson
Related papers
SAE-Audit: Clinical-Trial Prediction via Inference-Time Optimization of Black-Box LLMs Audited by Sparse Autoencoder Evidence
Shared title terminology · Junbo Shen
Do You Even Know What I Want? Improving LLMs Ability to Detect Hidden User Intent
Shared title terminology · Kelsey Sikes, Sarath Sreedharan
Internalized Experience: How Training Data Shapes Memory Formation in LLMs
Shared title terminology · Xianxuan Long, Xinnan Dai, Kai Guo et al.
ESM-Bench: A Benchmark for Evaluating Whether AI Agents Understand Earth System Model Physics and Code
Shared title terminology · Koutian Wu, Yuxuan Cao, Gengchen Mai et al.
Feedback-Driven Prompt Refinement for Educational AI: Affective Trajectory Estimation and Bloom's Taxonomy Classification
Shared title terminology · Josh Dean, Karan Patel, Gaurangi Raul et al.
Can Vision-Language Models Synthesize Executable Game-Playing Programs?
Shared title terminology · Yao Tong, Jiaxin Qi, Dingyu Zhang et al.