Original title: CROCODIL: Cross-Model Code Editing with LLMs
Linghan Zhong, Aditya Thimmaiah, Jayanth Srinivasa, Milos Gligoric +1 · September 2026
Software teams often use more than one artificial intelligence, or large language model, to write code. Because these models train on different data, they develop distinct coding styles. This creates a problem: when an AI edits "foreign code" made by a different model, it tends to make more, and often excessive, edits. To fix this, researchers created CROCODIL. It is a post-trainingAdditional training after initial model training to adjust specific behaviors, like editing style. framework designed to cut down on unnecessary changes while keeping the code working correctly. CROCODIL works by balancing two scores multiplied together: a similarity rewardA scoring mechanism that encourages small changes by penalizing edits that differ greatly from the original. that penalizes large changes, and an execution rewardA scoring mechanism based on whether the edited code builds and passes tests successfully. that checks whether the code builds and passes tests. This setup guides the AI to shrink its edit size without lowering its success rate on tasks.
Imagine copying a recipe from a friend's notebook, but you decide to rewrite parts of it in your own style. If you change too many steps at once, the dish might not cook right or lose its intended flavor. In this work, when an AI edits code from a different AI, it often over-rewrites things, making the code messy or broken. CROCODIL teaches the AI to make only small, careful adjustments that keep the code working as it should.
Developers working with multiple AI coding assistants often end up with code cluttered by unnecessary edits. This tool keeps changes minimal and functional, saving time and reducing bugs in collaborative projects.
The abstract doesn't specify limitations such as performance on different programming languages or scalability to large codebases. It focuses on demonstrating that CROCODIL reduces excessive edits while maintaining correctness.
Ask anything about this paper. Answers come from its abstract, and say so when the abstract doesn't cover your question.
CROCODIL: Cross-Model Code Editing with LLMs — Linghan Zhong, Aditya Thimmaiah, Jayanth Srinivasa et al.
Abstract licence: CC0
Explanation generated by Synthesis from the abstract — it is not the original paper. This is a preprint, so it hasn't necessarily been peer reviewed.