Skip to content

CROCODIL: Cross-Model Code Editing with LLMs

Sep 2026 · 0 citations · 51 references
Computer Science

TL;DR

This work introduces CROCODIL (Cross-model Code Editing with LLMs), a post-training framework for reducing excessive edits while preserving functional correctness and CROCODIL's similarity reward penalizes large changes, while its execution reward scores build and test success.

Abstract

Large language models (LLMs) have become ubiquitous tools for code generation and editing. However, development teams often use multiple LLM assistants. Different developers may prefer different models, and individual developers may switch between models across different coding sessions. Because of this, the edits any one model makes are frequently applied to foreign code originally generated by another model. These LLMs are often trained on different datasets, and as a result have different stylistic preferences. Do LLMs behave differently when they edit foreign code originally written by a different LLM with a different coding style? We find that models tend to make more, and often excessive, edits on foreign code. We introduce CROCODIL (Cross-model Code Editing with LLMs), a post-training framework for reducing excessive edits while preserving functional correctness. CROCODIL's similarity reward penalizes large changes, while its execution reward scores build and test success. We use the product of these two rewards to encourage the policy to decrease the edit size without decreasing the edit task success rate. CROCODIL is available at https://github.com/EngineeringSoftware/Crocodil.

View source

Similar papers

#artificial intelligence Review Sep 2026

When Models Edit Too Much: On the Fidelity of Minimal Code Edits

This work constructs an evaluation framework from 400 BigCodeBench problems by injecting controlled AST-level corruptions into reference solutions, giving each repair task a known minimal patch, and positions edit fidelity as a distinct axis of code-repair quality and shows that it can be measured and learned.

Tong-Yao Zhu, Wei-Lun Lim, Min-Yen Kan · 1 citation
Preprint Aug 2026

LangChoiceBench: Measuring and Explaining Programming-Language Choice in LLMs

LangChoiceBench is introduced, a project-level code-generation benchmark for measuring Python preference, recommendation-implementation consistency, and language diversity, and it is found that Python remains heavily over-selected, recommendation-implementation consistency is low, and smaller open-weight models general...

Lukas Twist, Twm Stone, Helen Yannakoudakis et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Diffs vs. Whole Files: An Empirical Comparison of Iterative Edit-Based and Direct Generation for Flutter/Dart Code Models

Large language models used for code editing can be trained and deployed in at least two output regimes: direct generation, where the model emits the entire modified file in one shot, and iterative diff-based generation ("steps"), where the model emits a sequence of localized search/replace edits applied one at a time u...

Andrej Andrejev · 0 citations
Book 2024

Coding with ChatGPT and Other LLMs

This book focuses on integrated development environments (IDEs) and provides tips to avoid pitfalls, such as bias and unexplainable code, to accelerate your coding speed and be well-prepared for future innovations in AI-driven software development.

Vincent Austin Hall · 0 citations
Open access

Evaluation and Distillation of Source Code Generation Tasks by Large Language Models

Two novel contributions are introduced: CodeEval and CodeQual, an open-source execution framework that provides researchers with a ready-to-use evaluation pipeline for evaluating and improving LLMs in software engineering contexts, encompassing both functional correctness assessment and subjective code quality evaluati...

Danny Brahman · 0 citations
Preprint Aug 2026

Edit2TikZ: A Comprehensive and Challenging Benchmark for Scientific Figure Editing with TikZ

This work introduces Edit2TikZ, a comprehensive benchmark for scientific figure editing tasks, featuring 1,548 diverse and high-quality samples, and constructs a human-aligned evaluation framework to measure whether a requested edit is completed while irrelevant content is preserved.

Zong-Yun Zhang, Jiacheng Ruan, Xian Gao et al. · 0 citations

Related blog posts

MIT News · Artificial Intelligence Oct 15, 2026

AI model decodes the language cells use to communicate

A new computational approach reveals how cells communicate to assemble into tissues. This could accelerate stem cell engineering, improve disease models, and inform therapies.

Microsoft Research Blog Oct 15, 2026

Proof-based general-purpose computing with Magnetar

Zero-knowledge proofs can verify computing results without rerunning workloads or exposing sensitive data. Magnetar helps bring them into the mainstream with support for standard programming languages, major speed gains, and quantum-resistant security. The post Proof-based general-purpose computing with Magnetar appeared first on Microsoft Research.

MIT News · Artificial Intelligence Sep 24, 2026

Estimating suicide risk from text

A new language-processing tool could help identify the highest-risk individuals from natural language, enabling swifter interventions.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.