To Add Is Machine, To Delete Is Human
Large language models show a hidden bias in code editing: they love to add and change code, but they avoid deleting it. This lightning talk explores how researchers measured this deletion avoidance across multiple models, why it matters for real software engineering workflows, and which interventions successfully mitigate the problem without sacrificing code quality.Script
When language models edit code, they act like digital hoarders. They'll add new lines, modify existing ones, but ask them to delete obsolete code and they freeze up. Human programmers delete constantly, but the models avoid it like a bad habit.
The researchers ran models through real-world code editing benchmarks and measured every edit type. The numbers were stark: insertions and modifications happened at expected rates, but deletions appeared only a fraction as often as they do in human edits.
Three interventions showed promise. Explicit prompt demonstrations taught models when to delete. Architectural tweaks penalized bloat during training. Curating datasets with more human-like deletion patterns shifted the learned behavior. Each approach improved deletion rates without hurting code quality.
Why does this matter beyond a benchmark metric? Real software engineering depends on removing dead code, deleting buggy functions, and cleaning up technical debt. Models that can't delete effectively become assistants that clutter rather than clarify.
The fix doesn't come for free. Deletion-aware models need targeted training, but the payoff extends across code review, automated repair, and refactoring tools. The research also raises a deeper question: what other professional workflows do models distort because of hidden biases we haven't measured yet?
Teaching machines to delete is teaching them restraint, a skill humans prize in good engineers. If you want to explore how deletion avoidance shapes model behavior or build your own explanations of cutting-edge research, visit EmergentMind.com and turn papers into videos that make the invisible visible.