NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning Project-wise Subsequent Code Edits via Interleaving Neural-based Induction and Tool-based Deduction

Chenyan Liu, Yun Lin, Yuhuan Huang, Jiaxin Chang, Binhang Qi, Bo Jiang, Zhiyong Huang, Jin Song DongarXiv 2026 · DOI

TL;DR

TRACE (Tool-integrated RecommendAtion for Code Editing) is a framework that predicts project-wide code edits by interleaving neural-based induction with tool-based deduction. By leveraging IDE static analysis tools alongside a novel, fine-grained neural edit representation, TRACE significantly improves the accuracy and efficiency of complex, cross-file editing tasks, outperforming current industry leaders like Cursor.

What Problem Does This Paper Address?

Modern software development involves frequent "project-wise" edits—changes like refactoring or bug fixes that ripple across multiple files. While Large Language Models (LLMs) excel at local code generation, they struggle with the scale and precision required for project-wide changes.

Current solutions face a "trilemma" of scope, accuracy, and efficiency:

  1. Location Overhead: Scanning an entire codebase to find where to edit next is computationally expensive.
  2. Overlooked Edit Composition: Many edits are syntactically related (e.g., renaming a variable requires updating all its usages). LLMs often "hallucinate" or miss these connections, whereas traditional static analysis tools handle them perfectly.
  3. Coarse Edit Representation: Standard tools use simple "git-diff" labels (keep, replace, insert), which are often too vague to capture the nuanced intent of complex edits, leading to training inefficiencies.

Methods

TRACE addresses these challenges through a hybrid approach that combines neural models with traditional Integrated Development Environment (IDE) facilities via the Language Service Protocol (LSP).

Fig. 2: Overview of TRACE: TRACE generates code edits (in terms of the edit location and the edit content) by orchestrating three models, i.e., edit composition invoker, edit locator, and edit generator. The generated code edits can serve as new prior edits to further generate new edits.

The system orchestrates three main components:

  • Edit-composition Invoker: A neural classifier that monitors the developer's session. It detects if a recent edit belongs to a "composition" (like a rename or a def-use update) and proactively triggers the appropriate IDE tool to deduce subsequent edit locations and content.
  • Neural Edit Locator: If no tool is triggered, this encoder-only model scans code windows to predict exactly which lines need editing. It uses a novel Enriched Edit Representation (see Figure 3) with six labels—<KEEP>, <REPLACE>, <DELETE>, <NULL>, <INSERT>, and <BLOCK-SPLIT>—to provide more precise instructions than standard diffs.
  • Neural Edit Generator: An encoder-decoder model that takes the predicted locations and prior edits to generate the final code content.
Fig. 3: Edit representation of TRACE in BNF, more expressive for different code editing scenarios, with six edit labels.

Datasets

The authors constructed a massive multilingual benchmark to train and evaluate TRACE:

  • 38K Code Commits: Sourced from 678 top-starred GitHub repositories.
  • 5 Languages: Python, Go, Java, JavaScript, and TypeScript.
  • Refined Messages: They used Llama-3 to clean noisy commit messages into natural, concise edit descriptions, better simulating real-world developer prompts.

Key Insights and Ideas

  • Interleaving is Key: The "aha moment" is that semantic reasoning (induction) and syntactic propagation (deduction) are complementary. Neural models handle the "why" and "what," while static tools handle the "where" for repetitive, rule-based changes.
  • Granularity Boosts Learning: By breaking down a single git-diff "replace" hunk into finer-grained operations (like a delete followed by an insert), the neural models can generalize much better across different editing scenarios.
  • The "Over-trust" Phenomenon: A fascinating qualitative finding from their user study was that developers—regardless of experience—quickly began to over-trust the AI after a few correct suggestions, leading to a lack of caution that made recovering from false positives difficult.

Key Results

TRACE sets a new state-of-the-art for project-wise code editing:

  • Superior Accuracy: Compared to CoEdPilot, TRACE improved edit location precision by 43.76% and edit generation accuracy by 11.16%.
  • Efficient Invocation: The Edit-composition Invoker achieved 92.45% precision, ensuring tools are only called when appropriate.
  • Real-world Performance: In a user study with 24 participants, TRACE significantly outperformed Cursor and CoEdPilot on cross-file refactoring tasks. For instance, in a task requiring 8 edits across 5 files, TRACE users were substantially faster because the tool proactively identified distant but syntactically coherent edit locations.
  • Acceptance Rate: In simulations, TRACE achieved a suggestion acceptance rate 6.15% higher than Cursor.

Limitations and Future Work

While TRACE mitigates LLM hallucinations through tool integration, it still relies on the underlying neural models when tools aren't applicable. The authors note that the "over-trust" phenomenon highlights a critical need for better Human-Computer Interaction (HCI) design, such as more intuitive undo/review mechanisms and "Explainable AI" that provides the rationale behind a suggestion. Future work will also look into expanding the library of supported edit compositions beyond basic LSP services.

Summary updated

BibTeX
@misc{liu2026learning,
  author = {Chenyan Liu and Yun Lin and Yuhuan Huang and Jiaxin Chang and Binhang Qi and Bo Jiang and Zhiyong Huang and Jin Song Dong},
  title = {{Learning Project-wise Subsequent Code Edits via Interleaving Neural-based Induction and Tool-based Deduction}},
  year = {2026},
  eprint = {2604.12220},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.12220},
}
Figure