← Latest papers
💬 NLP

CodeGENCAT: Generative Computerized Adaptive Testing for Open-ended Coding Problems

The paper proposes CodeGENCAT, a generative computerized adaptive testing framework that leverages a Generative Item Response Theory model to predict student code responses and select questions based on coding style diversity and response uncertainty, thereby outperforming traditional baselines in assessing programming knowledge.

Original authors: Wanyong Feng, Alexander Scarlatos, Ruochen Sun, Andrew Lan

Published 2026-05-28
📖 5 min read🧠 Deep dive

Original authors: Wanyong Feng, Alexander Scarlatos, Ruochen Sun, Andrew Lan

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a teacher trying to figure out exactly how good a student is at coding. In a traditional test, the teacher asks a question, the student answers, and the teacher marks it simply as "Right" or "Wrong." Based on that single mark, the teacher picks the next question: if the student got it right, the next one is harder; if wrong, it's easier.

The Problem with the Old Way
The paper argues that this "Right/Wrong" system throws away a lot of useful information. Imagine two students both fail a coding problem.

  • Student A made a tiny typo (a missing semicolon).
  • Student B wrote code that was completely the wrong logic.

In a traditional test, both are just "Wrong." The teacher can't tell the difference, so they can't tailor the next question to help the specific student. It's like a doctor treating a broken arm and a headache with the exact same pill just because the patient said "I feel bad."

The Solution: CodeGENCAT
The authors propose a new system called CodeGENCAT. Instead of just waiting for a student to answer, this system uses a "Digital Twin" (an AI) to predict what the student would write before the student actually answers.

Here is how it works, step-by-step, using a cooking analogy:

1. The "Digital Twin" Chef (The GIRT Model)

Imagine you want to know how good a student is at cooking. Instead of asking them to cook a whole meal right away, you have a super-smart AI chef who knows the student's current skill level.

  • If the student is a beginner, the AI predicts they would chop vegetables unevenly or forget to salt the soup.
  • If the student is an expert, the AI predicts they would use precise knife skills and perfect seasoning.

In the paper, this AI is called the Generative Item Response Theory (GIRT) model. It takes the student's estimated knowledge and generates a piece of code that looks exactly like what that specific student would write. It doesn't just guess "Right" or "Wrong"; it generates the actual code, including the specific bugs and mistakes the student is likely to make.

2. The "Menu Selection" (Question Selection)

Once the AI has predicted what the student would write, the system has to decide: "Which question should we ask the student next to learn the most?"

The paper introduces three ways to pick the next question, like a chef choosing the next ingredient to test:

  • The Uncertainty Chef: Picks a question where the AI is most confused about whether the student will get it right or wrong (a 50/50 guess). This is the classic "Goldilocks" zone—not too easy, not too hard.
  • The Diversity Chef: Picks a question where the AI thinks the student might write many different kinds of code. If the AI is unsure how the student will solve it, that question is very informative.
  • The Information Chef: Picks the question that, based on the predicted code, will give the biggest "shock" to the system's understanding of the student, helping to refine the skill estimate the fastest.

3. The Training (Teaching the AI)

To make sure this "Digital Twin" is accurate, the authors trained it in two stages:

  1. Supervised Fine-Tuning (SFT): They taught the AI to look at a student's past answers and learn how to mimic them.
  2. Direct Preference Optimization (DPO): This is the secret sauce. They realized the AI sometimes got lazy and wrote the same "perfect" code even for beginners. So, they taught the AI to be honest: "If the student is a beginner, you must generate code with mistakes." This ensures the AI's predictions are realistic and varied.

The Results

The researchers tested this on real coding datasets (Java and Python). They found that CodeGENCAT was much better at figuring out a student's true skill level than traditional methods, especially in the first few questions of the test.

  • The Analogy: It's like the difference between a teacher who asks, "Did you get it right?" and a teacher who says, "Let me guess exactly how you tried to solve it, and then I'll ask the perfect follow-up question to fix your specific misunderstanding."

Key Takeaways

  • Don't just look at the score: The paper claims that looking at the actual code (even predicted code) gives much richer information than just a "Pass/Fail" label.
  • Early detection matters: The system is most powerful at the beginning of a test, helping to identify a student's strengths and weaknesses much faster than old methods.
  • Security: The system also manages to keep the test secure, ensuring students don't all get the exact same questions, which is a common problem in adaptive testing.

In short, CodeGENCAT uses AI to simulate a student's mind, allowing the test to adapt not just to whether they got it right, but how they think, leading to a much more accurate and personalized assessment.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →