@inproceedings{li-etal-2026-beyond-surface,
title = "Beyond Surface-Level Pattern Trap: {LLM} Agents for Faster and Smarter Cross-Architecture Code Migration",
author = "Li, Weijia and
Gao, KE and
Chen, Pengfei and
Li, Jiajie and
Wang, Xinyu and
Le, Yiran and
Wu, Yize and
Li, Ling",
editor = "Liakata, Maria and
Moreira, Viviane P. and
Zhang, Jiajun and
Jurgens, David",
booktitle = "Findings of the {A}ssociation for {C}omputational {L}inguistics: {ACL} 2026",
month = jul,
year = "2026",
address = "San Diego, California, United States",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2026.findings-acl.148/",
pages = "3029--3042",
ISBN = "979-8-89176-395-1",
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 high-performance libraries. On low-resource, low-level 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.04x speedup on RISC-V platforms. Code and data are available at: https://anonymous.4open.science/r/code-F8D4."
}<?xml version="1.0" encoding="UTF-8"?>
<modsCollection xmlns="http://www.loc.gov/mods/v3">
<mods ID="li-etal-2026-beyond-surface">
<titleInfo>
<title>Beyond Surface-Level Pattern Trap: LLM Agents for Faster and Smarter Cross-Architecture Code Migration</title>
</titleInfo>
<name type="personal">
<namePart type="given">Weijia</namePart>
<namePart type="family">Li</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">K</namePart>
<namePart type="given">E</namePart>
<namePart type="family">Gao</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Pengfei</namePart>
<namePart type="family">Chen</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Jiajie</namePart>
<namePart type="family">Li</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Xinyu</namePart>
<namePart type="family">Wang</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Yiran</namePart>
<namePart type="family">Le</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Yize</namePart>
<namePart type="family">Wu</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Ling</namePart>
<namePart type="family">Li</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<originInfo>
<dateIssued>2026-07</dateIssued>
</originInfo>
<typeOfResource>text</typeOfResource>
<relatedItem type="host">
<titleInfo>
<title>Findings of the Association for Computational Linguistics: ACL 2026</title>
</titleInfo>
<name type="personal">
<namePart type="given">Maria</namePart>
<namePart type="family">Liakata</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Viviane</namePart>
<namePart type="given">P</namePart>
<namePart type="family">Moreira</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Jiajun</namePart>
<namePart type="family">Zhang</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">David</namePart>
<namePart type="family">Jurgens</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<originInfo>
<publisher>Association for Computational Linguistics</publisher>
<place>
<placeTerm type="text">San Diego, California, United States</placeTerm>
</place>
</originInfo>
<genre authority="marcgt">conference publication</genre>
<identifier type="isbn">979-8-89176-395-1</identifier>
</relatedItem>
<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 high-performance libraries. On low-resource, low-level 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.04x speedup on RISC-V platforms. Code and data are available at: https://anonymous.4open.science/r/code-F8D4.</abstract>
<identifier type="citekey">li-etal-2026-beyond-surface</identifier>
<location>
<url>https://aclanthology.org/2026.findings-acl.148/</url>
</location>
<part>
<date>2026-07</date>
<extent unit="page">
<start>3029</start>
<end>3042</end>
</extent>
</part>
</mods>
</modsCollection>
%0 Conference Proceedings
%T Beyond Surface-Level Pattern Trap: LLM Agents for Faster and Smarter Cross-Architecture Code Migration
%A Li, Weijia
%A Gao, K. E.
%A Chen, Pengfei
%A Li, Jiajie
%A Wang, Xinyu
%A Le, Yiran
%A Wu, Yize
%A Li, Ling
%Y Liakata, Maria
%Y Moreira, Viviane P.
%Y Zhang, Jiajun
%Y Jurgens, David
%S Findings of the Association for Computational Linguistics: ACL 2026
%D 2026
%8 July
%I Association for Computational Linguistics
%C San Diego, California, United States
%@ 979-8-89176-395-1
%F li-etal-2026-beyond-surface
%X 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 high-performance libraries. On low-resource, low-level 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.04x speedup on RISC-V platforms. Code and data are available at: https://anonymous.4open.science/r/code-F8D4.
%U https://aclanthology.org/2026.findings-acl.148/
%P 3029-3042
Markdown (Informal)
[Beyond Surface-Level Pattern Trap: LLM Agents for Faster and Smarter Cross-Architecture Code Migration](https://aclanthology.org/2026.findings-acl.148/) (Li et al., Findings 2026)
ACL
- Weijia Li, KE Gao, Pengfei Chen, Jiajie Li, Xinyu Wang, Yiran Le, Yize Wu, and Ling Li. 2026. Beyond Surface-Level Pattern Trap: LLM Agents for Faster and Smarter Cross-Architecture Code Migration. In Findings of the Association for Computational Linguistics: ACL 2026, pages 3029–3042, San Diego, California, United States. Association for Computational Linguistics.