A Structural Model for Contextual Code Changes
summary
A structural model predicts the next edit given a contextual code change by modeling edit likelihood over AST paths rather than generating full files. The lightweight model C3PO uses a pointer network, has 750K parameters, and is trained on C# edits mined from GitHub (40K train, 4.5K val, 6K test). Against strong LSTM/Transformer and LaserTagger baselines it yields about +11% absolute accuracy and the code and dataset are on GitHub.
AI-written summary · about
chapters (11)
- 0:00Intro
- 0:11Edit Completion
- 1:53Challenges
- 2:43Representing Code Edits
- 3:45Code and Edit Representations
- 5:04Edit Operations with AST Paths
- 6:17Why Structural and Edit Likelihood?
- 6:59C3PO - Contextual Code Changes via Path Operations
- 8:13Baselines
- 9:10Examples
- 11:19Summary
related talks
20mAI editors – how they work, and how to master them
15mContext Is the New Code for AI Agents
27mContext is the new code: The context development lifecycle
28mContext Is the New Code
37mThe Context Flywheel for AI Coding Teams
35mFrom Prompt Engineering to Context Engineering: Lessons from an AI Code Review Product
37mMachine Learning on Source Code
11mCollaborative Natural Language Inference
