Lune

ACL Findings2026

Beyond Surface-Level Pattern Trap: LLM Agents for Faster and Smarter Cross-Architecture Code Migration

Weijia Li, K. E. Gao, Pengfei Chen, Jiajie Li, Xinyu Wang, Yiran Le, Yize Wu, Ling Li

Abstract

The problem of surface-level pattern mapping represents a critical yet underexplored failure mode in large language model (LLM) reasoning, and is particularly acute in cross-architecture code migration of highperformance libraries. On low-resource, lowlevel code, insufficient coverage in pretraining data often leads LLMs to rely on superficial name-or type-based correspondences, rather than principled refactorization and reasoning grounded in core functional semantics and architecture-specific optimization intents. This tendency severely hampers the effectiveness of LLMs in complex migration scenarios. To address these challenges, we propose FSCM, a multi-agent framework for cross-architecture migration. FSCM decouples complex implementation details through functional mining and code refactoring, guiding LLMs to focus on invariant semantic anchors across architectures. By mitigating surface-level pattern traps, FSCM improves both functional correctness and performance when targeting emerging architectures. Extensive experiments on the challenging real-world OpenCV library migration tasks demonstrate substantial improvements over state-of-the-art baselines, achieving up to 22% higher correctness rates over Copilot and 43.04× speedup on RISC-V platforms. Code and data are available at: https: //github.com/breezejh/FSCM.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Builds on3

  1. Read it in Two Steps: Translating Extremely Low-Resource Languages with Code-Augmented Grammar BooksChen Zhang, Jiuheng Lin, Xiao Liu, Zekai Zhang et al.ACL 2025 · 5 citations
  2. Program Skeletons for Automated Program TranslationBo Wang, Tianyu Li, Ruishi Li, Umang Mathur et al.PLDI 2025 · 3 citations
  3. Can LLMs Really Learn to Translate a Low-Resource Language from One Grammar Book?Seth Aycock, David Stap, Di Wu, Christof Monz et al.ICLR 2025

Related papers

  1. QiMeng-LibBench: Benchmarking LLM Agents for Library-Scale Cross-Architecture MigrationWeijia Li, KE GAO, Jiajie Li, Han Sun et al.ICML 2026
  2. Pig: Leveraging Large Language Models for Python Library MigrationsMiryeong Kang, Wonseok Oh, Gabin An, Hakjoo OhFSE 2026
  3. MigGPT: Harnessing Large Language Models for Automated Migration of Out-of-Tree Linux Kernel Patches Across VersionsPucheng Dang, Di Huang, Dong Li, Kang Chen et al.NeurIPS 2025 · 3 citations
  4. EmbedAgent: Benchmarking Large Language Models in Embedded System DevelopmentRuiyang Xu, Jialun Cao, Mingyuan Wu, Wenliang Zhong et al.ICSE 2026
  5. An Empirical Study of Python Library Migration Using Large Language ModelsMohayeminul Islam, Ajay Kumar Jha, May Mahmoud, Ildar Akhmetov et al.ASE 2025 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines