Closing the Loop: Universal Repository Representation with RPG-Encoder
Jane Luo, Chengyu Yin, Xin Zhang, Qingtao Li, Steven Liu, Yiming Huang, Jie Wu, Hao Liu, Yangyu Huang, Yu Kang, Fangkai Yang, Ying Xin, Scarlett Li
摘要
Current repository agents encounter a reasoning disconnect due to fragmented representations, as existing methods rely on isolated API documentation or dependency graphs that lack semantic depth. We consider repository comprehension and generation to be inverse processes within a unified cycle: generation expands intent into implementation, while comprehension compresses implementation back into intent. To address this, we propose RPG-Encoder, a framework that generalizes the Repository Planning Graph (RPG) from a static generative blueprint into a unified, high-fidelity representation. RPG-Encoder closes the reasoning loop through three mechanisms: (1) Encoding raw code into the RPG that combines lifted semantic features with code dependencies; (2) Evolving the topology incrementally to decouple maintenance costs from repository scale, reducing overhead by 95.7%; and (3) Operating as a unified interface for structure-aware navigation. In evaluations, RPG-Encoder establishes state-of-the-art repository understanding on SWE-bench Verified with 93.7% Acc@5 and exceeds the best baseline by over 10% on SWE-bench Live. These results highlight our superior fine-grained localization accuracy in complex codebases. Furthermore, it achieves 98.5% reconstruction coverage on RepoCraft, confirming RPG's high-fidelity capacity to mirror the original codebase and closing the loop between intent and implementation. Our code and data are available at https://github.com/microsoft/RPG-ZeroRepo.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper12
- SWE-agent: Agent-Computer Interfaces Enable Automated Software EngineeringJohn Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret 等NeurIPS 2024 · 被引用 2,059 次
- RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and GenerationFengji Zhang, Bei Chen, Yue Zhang, Jacky Keung 等EMNLP 2023 · 被引用 110 次
- Paper2Code: Automating Code Generation from Scientific Papers in Machine LearningMinju Seo, Jinheon Baek, Seongyun Lee, Sung Ju HwangICLR 2026 · 被引用 86 次
- Improving Code Localization with Repository MemoryBoshi Wang, Weijian Xu, Yunsheng Li, Xuemei Gao 等ICLR 2026 · 被引用 20 次
- RPG: A Repository Planning Graph for Unified and Scalable Codebase GenerationJane Luo, Xin Zhang, Steven Liu, Jie Wu 等ICLR 2026 · 被引用 18 次
相关 Paper
- In Line with Context: Repository-Level Code Generation via Context InliningChao Hu, Wenhao Zeng, Yuling Shi, Beijun Shen 等FSE 2026
- Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering TasksHongyuan Tao, Ying Zhang, Zhenhao Tang, Hongen Peng 等NeurIPS 2025 · 被引用 41 次
- Pull Requests as a Training Signal for Repo-Level Code EditingQinglin Zhu, Tianyu Chen, Shuai Lu, Lei Ji 等ICML 2026 · 被引用 1 次
- RepoGraph: Enhancing AI Software Engineering with Repository-level Code GraphSiru Ouyang, Wenhao Yu, Kaixin Ma, Zilin Xiao 等ICLR 2025
- RepoScope: Leveraging Call Chain-Aware Multi-View Context for Repository-Level Code GenerationYang Liu, Li Zhang, Fang Liu, Zhuohang Wang 等ICSE 2026
