paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Interactive Cross-language Code Retrieval with Auto-Encoders

基于自编码器的交互式跨语言代码检索
ASE 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)2021匹配度 3/10 · 论文属于机器学习与程序语言的交叉,但核心是跨语言代码检索与程序翻译,而非用户关注的静态分析、LLM/Agent 辅助分析、浮点程序分析或贝叶斯程序分析。其方法基于自编码器而非 LLM/Agent,研究目标也与用户画像中的核心问题不一致。引用 7 inbox
Binger Chen, Ziawasch Abedjan
crossref: 2026-09-12

AI 速览

一句话:提出基于自编码器的交互式跨语言代码检索系统 BigPT,仅用原始代码从 Big Code 检索翻译以辅助程序翻译。

跨语言代码检索对程序翻译(如代码库迁移或重实现)很重要,但现有翻译模型依赖大量训练数据和额外信息,检索系统也难以仅凭输入程序找到目标翻译。本文提出 BigPT,仅基于原始代码从 Big Code 中进行交互式跨语言检索,并复用检索结果辅助翻译。方法基于跨语言代码表示,提出自编码器驱动的预测式变换模型,在 Big Code 上训练以生成目标语言表示作为查询,检索最相关翻译;该表示允许用户更新和纠正返回结果以改进检索。实验显示 BigPT 在程序准确率上优于当前最优基线,并能扩展到大代码库高效检索。

问题
现有跨语言程序翻译方法依赖大量训练数据或额外信息,且现有代码检索系统难以仅以输入程序特征作为查询找到目标翻译。
方法
提出 BigPT,基于原始代码和 Big Code 的跨语言代码表示,设计基于自编码器的预测式变换模型生成目标语言表示作为查询,并支持用户交互修正检索结果。
评估
在程序准确率上与当前最优基线比较,并验证其可扩展到大代码库且高效检索翻译。
原文摘要(Abstract)

Cross-language code retrieval is necessary in many real-world scenarios. A major application is program translation, e.g., porting codebases from an obsolete or deprecated language to a modern one or re-implementing existing projects in one’s preferred programming language. Existing approaches based on the translation model require large amounts of training data and extra information or neglects significant characteristics of programs. Leveraging cross-language code retrieval to assist automatic program translation can make use of Big Code. However, existing code retrieval systems have the barrier to finding the translation with only the features of the input program as the query. In this paper, we present BigPT for interactive cross-language retrieval from Big Code only based on raw code and reusing the retrieved code to assist program translation. We build on existing work on cross-language code representation and propose a novel predictive transformation model based on auto-encoders. The model is trained on Big Code to generate a target-language representation, which will be used as the query to retrieve the most relevant translations for a given program. Our query representation enables the user to easily update and correct the returned results to improve the retrieval process. Our experiments show that BigPT outperforms state-of-the-art baselines in terms of program accuracy. Using our novel querying and retrieving mechanism, BigPT can be scaled to the large dataset and efficiently retrieve the translation.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6476,
  title = {Interactive Cross-language Code Retrieval with Auto-Encoders},
  author = {Binger Chen and Ziawasch Abedjan},
  booktitle = {ASE},
  year = {2021},
  doi = {10.1109/ase51524.2021.9678929}
}