← Latest papers
🤖 machine learning

Learning from 53.6K Real-World Developer Edits of AI-Generated Code

This paper introduces DECODE, a dataset of 53,600 real-world in-IDE edits of AI-generated code from over 1,000 developers, which reveals that most modifications occur within 15 minutes of acceptance and demonstrates that fine-tuning smaller models on this data significantly outperforms frontier LLMs in predicting code edits.

Original authors: Jenny T. Liang, Mihika Bairathi, Wayne Chi, Ameet Talwalkar, Nishant Subramani, Valerie Chen

Published 2026-07-29
📖 6 min read🧠 Deep dive

Original authors: Jenny T. Liang, Mihika Bairathi, Wayne Chi, Ameet Talwalkar, Nishant Subramani, Valerie Chen

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 teaching a robot to cook. You show it a recipe book, and it tries to make a dish. Sometimes, the robot gets it perfect. But often, it adds too much salt, forgets the garlic, or uses a spoon instead of a whisk. In the world of computer science, this robot is an "AI programming assistant," and the dishes are lines of code. For a long time, scientists tried to teach these robots by showing them finished recipes (called "Git commits")—the final, perfect dishes that made it into cookbooks. But this is like trying to learn how to cook by only looking at the food on the plate, ignoring the messy kitchen, the burnt toast, and the chef's frantic corrections.

The real magic (and the real mess) happens in the middle. When a human chef tastes a soup and says, "No, that needs more pepper," or "Actually, throw that away and start over," that is a "code edit." Until now, we didn't have a good way to watch the chef do this. We only saw the final result. This paper dives into that messy, beautiful kitchen. It asks: How do humans actually fix AI mistakes? Do they tweak a little bit, or do they trash the whole thing? And can we teach the robot to predict these fixes before they even happen?

The Great Code Detective: DECODE

The researchers behind this study realized that to make AI better at writing code, they needed to stop looking at the finished product and start watching the process. They created a massive new dataset called DECODE (Developer Edits of Code Dataset). Think of DECODE as a giant, high-definition security camera system installed in the IDEs (the digital workspaces) of over 1,000 real developers. Instead of just saving the final code, this system recorded every single tap, delete, and rewrite a developer made after the AI suggested a piece of code.

They collected 53,600 of these real-world editing sessions, mostly in Python, TypeScript, and JavaScript. It's like having a library of 53,600 stories about how humans and robots argue, compromise, and collaborate to build software.

What They Found: The 15-Minute Rule and the "Trash Can"

When the team looked at the data, they found some surprising patterns about how humans treat AI suggestions.

First, they discovered a strict 15-minute rule. Most of the editing happens very quickly. If a developer is going to change the AI's code, they usually do it within the first 15 minutes of accepting the suggestion. After that, the code is usually left alone.

Second, they found that humans are surprisingly harsh. In about 31% of the cases, the developer didn't just tweak the code; they deleted the AI's entire suggestion and started from scratch. It's like the AI handed you a sandwich, and you immediately threw it in the trash because the bread was slightly wrong. The data suggests that if an AI suggestion doesn't fit the developer's intent perfectly right away, it's often doomed to be abandoned.

However, when humans do keep the code, they don't change much. The data shows that for the code that survives, developers usually keep about 63% of the original AI suggestion. They tend to add very little of their own new code (only about 20% of the final code is new stuff added by the human). This means developers rely heavily on the AI, but they are very picky about the initial quality.

The researchers also noticed a specific order to how people fix things. It's like a checklist:

  1. The "Is this even usable?" check: First, they decide if they want to keep the code at all. If not, they delete it.
  2. The "Fix the bugs" phase: Next, they fix syntax errors or readability issues.
  3. The "Make it mine" phase: Then, they rename variables or change numbers to fit their specific needs.
  4. The "Change the plan" phase: Finally, if they are still working on it, they might change what the code actually does.

Teaching the Robot to Read Minds

The second big part of the paper was a test: Can we teach a smaller, open-source AI model to predict these edits better than the giant, super-smart "frontier" models?

Usually, the biggest, most expensive AI models are considered the best at everything. But here, the researchers took a smaller model (one with 3 billion parameters, which is tiny compared to the giants) and trained it specifically on the DECODE dataset. They taught it to look at an AI suggestion and guess: "Will the human delete this? Will they tweak it? Or will they leave it alone?"

The result was a shock. The small model, after learning from the real-world editing data, became significantly better at predicting edits than the massive, state-of-the-art models that had never seen this specific data.

  • For guessing what the final code would look like, the small model improved its accuracy by 0.17 (a huge jump in this field).
  • For guessing if the code would be changed at all, it also improved by 0.17.

This suggests that having the right "experience" (real-world editing data) is more important than just having a bigger brain. It's like a young chef who has watched thousands of cooking shows (the data) might know how to fix a dish better than a famous chef who has only ever cooked perfect meals in a lab.

The Takeaway: It's About the Human, Not Just the Code

The paper concludes that we need to stop treating AI code generation like a math problem where the only goal is "correctness." The real goal is "alignment." The code needs to fit the human's intent, or the human will just throw it away.

The authors suggest that future AI assistants shouldn't just try to write the perfect code on the first try. Instead, they should be trained to understand the process of editing. They need to learn that humans often delete things quickly, that they fix errors before changing features, and that they are more likely to keep code that is easy to tweak.

By using datasets like DECODE, we can build AI that doesn't just write code, but writes code that humans actually want to keep. It's a shift from asking "Is this code correct?" to asking "Is this code something a human can easily make their own?" And the data suggests that if we teach our AI to understand the messy, 15-minute editing window, we might finally get a robot that cooks a meal we're happy to eat.

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 →