- The paper introduces HELO-APR, which synthesizes low-resource defect data from high-resource pairs while preserving structural defect anchors.
- It employs a three-stage curriculum learning strategy that aligns repair reasoning between different programming languages, markedly improving Pass@1 scores.
- Ablation studies confirm that key techniques like structure-constrained translation and test-driven verification are crucial for enhancing repair fidelity.
HELO-APR: Enhancing Low-Resource Program Repair through Cross-Lingual Knowledge Transfer
Introduction and Core Challenges
HELO-APR addresses the persistent gap in LLM-based Automated Program Repair (APR) performance between high-resource (HRPL, e.g., C++/Python) and low-resource programming languages (LRPL, e.g., Ruby/Rust). The central blocking factor is the paucity of verified buggy-fixed pairs for LRPLs, which impedes robust learning of repair patterns. Past attempts with synthetic data generation or direct fine-tuning on HRPL datasets have proven insufficient: synthetic defects are often trivial/non-representative, and naive transfer from HRPLs induces syntactic leakage, frequently generating unrepairable code due to source-language artifacts.

Figure 1: Schematic of the HELO-APR workflow and the four fundamental challenges of cross-lingual APR: Non-Transferable Defects, Idiomatic Structural Obscuration, Validation Absence, and Neglected Cross-Lingual Repair Alignment.
HELO-APR identifies and systematically mitigates four primary obstacles in cross-lingual APR: (1) Non-Transferable Defects, (2) Idiomatic Structural Obscuration, (3) Validation Absence, and (4) Neglected Repair Alignment. The framework synthesizes LRPL training data from curated HRPL pairs and implements a curriculum learning regime that structurally aligns HRPL defect and repair logic with LRPL representations. This approach allows the transfer of complex repair reasoning without contaminating target language syntax.
Cross-Lingual LRPL Dataset Synthesis
The dataset construction pipeline has two stages: (1) guided translation of fixed HRPL codes to LRPLs with preservation of defect anchors, followed by (2) defect injection into the translated LRPL code using semantic descriptors extracted from the original HRPL pairs.

Figure 2: Workflow for constructing parallel LRPL defect datasets by translating and injecting defects with semantic verification.
Translation with Structural Constraints: Transferability analysis filters out HRPL defects non-reproducible in the target LRPL due to language-specific features. Structure-constrained translation ensures that only defect-relevant code regions preserve structural anchors required for reliable downstream defect injection. Automated test generation ensures functional preservation post-translation.
Defect Synthesis and Validation: Instead of copying edits, HELO-APR induces LRPL defects that behaviorally mimic HRPL bugs, using descriptor-driven input generation and validation via behavioral equivalence (categorical defects/failures, rather than strict output string matching). Only candidates achieving high fidelity under these semantics are admitted.
This dual-phase approach yields cross-lingual parallel buggy-fixed datasets, where LRPL instances are idiomatic yet preserve the target repair logic, essential for subsequent alignment and adaptation.
Curriculum Learning for Cross-Lingual Knowledge Transfer
HELO-APR employs a three-stage curriculum learning regime that incrementally internalizes repair reasoning, linguistically aligns fixes, and adapts to LRPL inference:

Figure 3: Three-stage curriculum learning pipeline: HRPL repair learning (Stage 1), Cross-Lingual Alignment (Stage 2), and LRPL Adaptation (Stage 3). Only lightweight adapters are fine-tuned for efficient transfer.
Stage 1: HRPL Repair Learning. The model first learns to repair HRPL (e.g., C++) defects, grounding general repair reasoning in a semantically rich source.
Stage 2: Cross-Lingual Repair Alignment. Using parallel tuples, the model is conditioned on HRPL buggy-fixed and LRPL buggy code to generate the LRPL fix, enforcing explicit alignment of cross-lingual repair behavior and decoupling repair logic from surface syntax.
Stage 3: LRPL Repair Adaptation. The model is finally adapted on LRPL buggy-fixed data alone, facilitating direct application and ensuring full independence from any source-language context at inference.
Throughout, backbone weights remain frozen and only adapters are trained for computational efficiency and transfer stability.
Experimental Evaluation
Effectiveness
On the xCodeEval benchmark, HELO-APR exhibits substantial improvement over all baselines (including zero-shot, HRPLs-only fine-tuning, LANTERN multi-agent pipeline, and synthetic pair generation [Wong et al.]), with Pass@1 increasing from 31.32%→48.65% on DeepSeek-Coder-6.7B and 1.67%→11.97% on CodeLlama-7B. Compilation rates soar to 97–99% for Ruby, with source compilation rates dropping to zero, demonstrating complete mitigation of cross-lingual syntax interference.
Ablation: Data Pipeline Analysis
Ablation studies confirm the necessity of each dataset construction component:
- Transferability Analysis: Exclusion of non-transferable defects is essential for effective HRPL-LRPL alignment; omission significantly degrades final repair performance.
- Structure-Constrained Translation: Selective constraint application on defect regions achieves a favorable trade-off between semantic fidelity (score 2.66) and code naturalness (low style violation density). Global constraints, by contrast, degrade naturalness due to excessive preservation of source-language structures.
- Test-Driven Verification: Removal results in catastrophic drop in repair performance, elucidating its role as a critical quality gate.
Ablation: Multi-Stage Knowledge Transfer
Stage-wise ablation demonstrates both HRPL repair learning and explicit cross-lingual repair alignment are indispensable. Direct finetuning on LRPL data alone is clearly inferior. Explicit alignment via parallel pairs (Stage 2) yields a further 5–7% absolute gain in Pass@1 across backbones, reflecting enhanced utilization of HRPL repair signals under data scarcity.
Generalizability
Generalization evaluation on the real-world Defects4Ruby corpus (1,000 sampled developer-written bugs) further establishes the practical benefit of HELO-APR, with BLEU-4 increasing from 61.20→66.79 and ROUGE-1 from 76.76→83.59 on CodeLlama-7B. This indicates superior stylistic and syntactic fidelity to developer patches even in unconstrained, real-world contexts.
Implications and Future Directions
HELO-APR demonstrates that carefully synthesized and semantically validated parallel defect corpora, coupled with curriculum-based alignment, provide a reusable and scalable paradigm for unlocking LLM-based program repair in low-resource environments. Practically, this enables efficient extension of model utility to less-represented languages, without large-scale annotation or target-language repair infrastructure.
Theoretically, the explicit factorization of transferability, semantic anchoring, and alignment decouples repair logic from language-specific syntax, potentially generalizing to other cross-lingual code understanding, translation, and reasoning tasks. Future extensions could target more granular behavioral equivalence in defect definitions, multi-lingual many-to-many alignment, or curriculum regimes sensitive to defect category complexity and target language idiosyncrasies.
Conclusion
HELO-APR systematically advances the state of LLM-based program repair in LRPLs by integrating verified cross-lingual supervision and curriculum-based transfer. The framework yields strong empirical improvements in both functional and syntactic patch validity and achieves high alignment with developer-written real-world fixes. This establishes a robust blueprint for extending the capabilities of code LLMs to low-resource domains and sets a precedent for scalable, cross-lingual code reasoning methodology.