Paper Overview
Research area: NLP Authors: Liliana Hotsko, Yinxi Li, Yuntian Deng Published: 2025-06-11 arXiv: 2506.08296
Abstract (English)
Code language models need repository-level context to resolve imports, APIs, and project conventions. Existing approaches inject this knowledge as long inputs (retrieved via RAG or dependency analysis) or through per-repository fine-tuning/LoRA — costly at repository scale and brittle for evolving codebases. The authors introduce Code2LoRA, a hypernetwork framework that generates repository-specific LoRA adapters, effectively injecting repository knowledge with zero inference-time token overhead.
Key Points
- Problem: Code LLMs require repo-level context (imports, APIs, project conventions), but long-input retrieval adds token overhead and per-repo fine-tuning is expensive and fragile under code evolution.
- Approach: A hypernetwork generates LoRA adapters that encode repository knowledge directly into the model's weights, avoiding inference-time token overhead.
- Two modes:
- Static: converts a single repository snapshot into a LoRA adapter, suited to stable codebases.
- Evolution tracking: maintains the adapter as the repository changes, updating a GRU hidden state with each code diff during active development.
Why It Matters
By moving repository context from the prompt into adapter weights, Code2LoRA offers a cost-efficient way to keep code assistants accurate across large and actively evolving software projects, where re-retrieving context or retraining adapters per commit would otherwise be impractical.
--- *Auto-collected on 2025-06-11*