CodeContrast: A Contrastive Learning Approach for Generating Coherent Programming Exercises

Uloženo v:
Podrobná bibliografie
Vydáno v:Education Sciences vol. 15, no. 1 (2025), p. 80
Hlavní autor: Torres, Nicolás
Vydáno:
MDPI AG
Témata:
On-line přístup:Citation/Abstract
Full Text + Graphics
Full Text - PDF
Tagy: Přidat tag
Žádné tagy, Buďte první, kdo vytvoří štítek k tomuto záznamu!

MARC

LEADER 00000nab a2200000uu 4500
001 3159411268
003 UK-CbPIL
022 |a 2227-7102 
022 |a 2076-3344 
024 7 |a 10.3390/educsci15010080  |2 doi 
035 |a 3159411268 
045 2 |b d20250101  |b d20251231 
084 |a 231457  |2 nlm 
100 1 |a Torres, Nicolás 
245 1 |a CodeContrast: A Contrastive Learning Approach for Generating Coherent Programming Exercises 
260 |b MDPI AG  |c 2025 
513 |a Journal Article 
520 3 |a Generating high-quality programming exercises with well-aligned problem descriptions, test cases, and code solutions is crucial for computer science education. However, current methods often lack coherence among these components, reducing their educational value. We present CodeContrast, a novel generative model that uses contrastive learning to map programming problems, test cases, and solutions into a shared feature space. By minimizing the distance between matched components and maximizing it for non-matched ones, CodeContrast learns the intricate relationships necessary to generate coherent programming exercises. Our model architecture includes three encoder networks for problem descriptions, test cases, and solutions. During training, CodeContrast processes positive triplets (matching problem, test case, solution) and negative triplets (non-matching combinations) and uses a contrastive loss to position positive triplets close in the feature space while separating negative ones. Comprehensive evaluations of CodeContrast—through automatic metrics, expert ratings, and student studies—demonstrate its effectiveness. Results show high code correctness (92.3% of test cases passed), strong problem–solution alignment (BLEU score up to 0.826), and robust test case coverage (85.7% statement coverage). Expert feedback and student performance further support the pedagogical value of these generated exercises, with students performing comparably to those using manually curated content. CodeContrast advances the automated generation of high-quality programming exercises, capturing relationships among programming components to enhance educational content and improve the learning experience for students and instructors. 
610 4 |a OpenAI 
653 |a Language 
653 |a Pedagogy 
653 |a Accuracy 
653 |a Software development 
653 |a Computer science 
653 |a Automation 
653 |a Feedback 
653 |a Generative artificial intelligence 
653 |a Natural language 
653 |a Machine learning 
653 |a Science education 
653 |a Large language models 
653 |a Software engineering 
653 |a Semantics 
653 |a Educational Quality 
653 |a Computer Science Education 
653 |a Computer Oriented Programs 
653 |a Natural Language Processing 
653 |a Artificial Intelligence 
653 |a Science Instruction 
653 |a Language Processing 
653 |a Computer Software 
653 |a Programming 
653 |a Cultural Relevance 
773 0 |t Education Sciences  |g vol. 15, no. 1 (2025), p. 80 
786 0 |d ProQuest  |t Education Database 
856 4 1 |3 Citation/Abstract  |u https://www.proquest.com/docview/3159411268/abstract/embedded/6A8EOT78XXH2IG52?source=fedsrch 
856 4 0 |3 Full Text + Graphics  |u https://www.proquest.com/docview/3159411268/fulltextwithgraphics/embedded/6A8EOT78XXH2IG52?source=fedsrch 
856 4 0 |3 Full Text - PDF  |u https://www.proquest.com/docview/3159411268/fulltextPDF/embedded/6A8EOT78XXH2IG52?source=fedsrch