🚀Shippingscore 119.3Jun 4, 2026·2606.06492cs.SEcs.AIcs.CL

Code2LoRA: Hypernetwork-Generated Adapters for Code Language Models under Software Evolution

Liliana Hotsko, Yinxi Li, Yuntian Deng, Pengyu Nie

Narrative

A hypernetwork takes a repository's code (or sequence of diffs) as input and outputs LoRA adapter weights that get injected into a code LLM — no tokens consumed at inference time, no per-repo fine-tuning loop. The static variant matches per-repository LoRA fine-tuning at 66.2% exact match on assertion completion; the evolution variant tracks live codebases via a GRU updated on each commit, hitting 60.3% cross-repo exact match, 5.2 points above a shared LoRA baseline. The benchmark released alongside (RepoPeftBench, 604 Python repos, ~300K tasks across static and evolution tracks) is the more durable contribution — there's currently no clean public benchmark for parameter-efficient adaptation under code churn.

The code is anonymized on open.science and checkpoints are on HuggingFace under `code2lora`, but neither has a stable public repo yet. GitHub references are purely RSS/paper-tracker aggregators — no one is integrating this into tooling. Zero citations so far. Worth watching if you're building repo-aware coding assistants and want an alternative to stuffing 100K tokens of context into every call, but this is early research, not something you can drop into a production pipeline today.

Abstract

Code language models need repository-level context to resolve imports, APIs, and project conventions. Existing methods inject this knowledge as long inputs (retrieved through RAG or dependency analysis) or through per-repository fine-tuning and LoRA -- costly at repository scale and brittle to evolving codebases. We introduce Code2LoRA, a hypernetwork framework that generates repository-specific LoRA adapters, effectively injecting repository knowledge with zero inference-time token overhead. Code2LoRA supports two usage scenarios: Code2LoRA-Static converts a single repository snapshot into an adapter, suitable for comprehension of stable codebases; while Code2LoRA-Evo maintains an adapter backed by a GRU hidden state updated per code diff, suitable for active development of evolving codebases. To evaluate Code2LoRA against parameter-efficient fine-tuning baselines, we build RepoPeftBench, a benchmark of 604 Python repositories with two tracks: a static track with 40K training and 12K test assertion-completion tasks, and an evolution track with 215K commit-derived training and 87K commit-derived test tasks. On the static track, Code2LoRA-Static achieves 63.8% cross-repo and 66.2% in-repo exact match, matching the per-repository LoRA upper bound; on the evolution track, Code2LoRA-Evo achieves 60.3% cross-repo exact match (+5.2 pp over a single shared LoRA). Code2LoRA's code can be found at https://anonymous.4open.science/r/code2lora-6857; the model checkpoints and RepoPeftBench datasets can be found at https://huggingface.co/code2lora.

Citation timeline
Not enough citation snapshots yet to plot a timeline. Come back after a few cron runs.