首页 > AI前沿 > GraphCodeBERT for Cross-Language Code Clone Retrieval through Data-Flow Alignment and Hard-Negative Mining

GraphCodeBERT for Cross-Language Code Clone Retrieval through Data-Flow Alignment and Hard-Negative Mining

arXiv机器学习 2026-12-01 13:00 7 阅读 查看原文
用户现在需要把给定的新闻正文排版成语义化的HTML片段,规则要记清楚,只输出HTML,不要其他。首先,这段是学术类的内容,开头可以不用h2?不对,看内容,都是连贯的?不对,先看每个自然段,这里原文是一整段?不对,哦不对,原文的内容是多个句子组成的段落?等下看规则,每个自然段落用p包裹,长文用h2h3划分小节。首先,先看内容,首先第一句是提出方法,然后接下来是alignment组件、mining组件,然后评估设计、结果、对比、结论这些?不对,要不要划分小节?哦,不对,原文的内容是一段吗?不,等下看用户给的正文,是一整段的纯文本?不对,不对,仔细看:用户给的正文是连贯的一段?不对,我再看: 哦,用户给的正文是: This paper proposes a GraphCodeBERT adaptation that combines soft data flow alignment with reliability filtered hard negative mining. The alignment component compares variable dependency representations across paired implementations without requiring identical identifiers or graph topology. The mining component excludes known equivalent solutions, retains a mixture of random and challenging candidates, and gradually increases negative difficulty. A reproducible evaluation design separates programming tasks across training, validation, and testing and covers six directed retrieval settings involving Java, Python, and Go. Across the six settings, the joint configuration has mean reciprocal rank 0.814, compared with 0.731 for a matched GraphCodeBERT baseline. Removing alignment reduces this score to 0.786, whereas replacing filtered mining with random negatives reduces it to 0.772. The evaluation framework also addresses retrieval depth, perturbation tolerance, mining contamination, and indexing cost under a fixed candidate protocol. The component comparison separates structural supervision from negative selection and identifies their respective contributions to the ranking profile. The resulting design provides an auditable route for investigating whether language independent dependencies and carefully selected distractors improve cross language code retrieval under realistic annotation and computational constraints. The absolute mean reciprocal rank increase is 0.083, corresponding to approximately 11.4% relative to the baseline; this aggregate comparison does not establish statistical significance. 哦,这是一段自然段?不对,要不要划分小节?比如可以加h2?不对,看规则2,长文用h2h3划分小节。那这里可以怎么划分?比如第一个h2是方法设计,然后里面的内容,然后h2是评估设计,然后h2是实验结果与分析,然后h2是结论?不对,但是不能增删改内容哦,对,规则4是保留原文所有信息,不得增删改内容。哦,对,不能加额外的内容,只是排版,划分小节的话,小节标题能不能加?不对不对,规则4说不得增删改内容,哦,对,那就是不能自己加小标题?因为小标题是新增的内容啊。哦,对,那这样的话,是不是就用p包裹?不对,等下规则2是“长文用

/

划分小节”,但如果不能加标题内容的话,那是不是原文如果是一段的话,就用p?不对,不对,再仔细看规则:规则4是保留原文所有信息,不得增删改内容,也就是说不能添加原文没有的文字,包括小标题。那这样的话,就看原文的结构,原文是一个自然段吗?不对,哦,不对,原文的句子是不是可以按内容分组,但不用加标题?不对,不对,h2h3是标题标签,必须有内容啊,不能加原文没有的内容,所以这里是不是就不能用h2h3?不对,等下再看原文的内容,有没有可以作为小节的?不对,原文没有小标题,所以不能自己加。那接下来,每个自然段落用p包裹,那原文是一整段,就用一个p?不对,不对,等下,再看规则,重要句子可以用strong。比如里面的实验结果,比如“Across the six settings, the joint configuration has mean reciprocal rank 0.814, compared with 0.731 for a matched GraphCodeBERT baseline.”还有后面的两个数值的,还有最后那个增加的数值,可以用strong?不对,不能改内容,只是加标签。还有列表?原文有没有列表内容?没有。引用?没有。代码?没有。哦,那原文是一段,那是不是就用

包裹所有内容,然后重要的句子加?不对,等下再仔细看,有没有可能划分?不对,不能加标题内容,所以h2h3用不了?不对,不对,等下,会不会我理解错了?规则2是“长文用

/

划分小节”,是不是可以用原文里的句子作为小节标题?不对,那属于拆分内容,会不会增删?不对,规则4是不得增删改内容,所以不能改变文字,只是加标签。哦,对,那比如,如果原文有多个自然段,就用多个p。现在用户给的正文是一整段?对,是连续的一段,没有换行。那接下来,把里面的重要句子,比如结果相关的,用strong包裹?比如:

This paper proposes a GraphCodeBERT adaptation that combines soft data flow alignment with reliability filtered hard negative mining. The alignment component compares variable dependency representations across paired implementations without requiring identical identifiers or graph topology. The mining component excludes known equivalent solutions, retains a mixture of random and challenging candidates, and gradually increases negative difficulty. A reproducible evaluation design separates programming tasks across training, validation, and testing and covers six directed retrieval settings involving Java, Python, and Go. Across the six settings, the joint configuration has mean reciprocal rank 0.814, compared with 0.731 for a matched GraphCodeBERT baseline. Removing alignment reduces this score to 0.786, whereas replacing filtered mining with random negatives reduces it to 0.772. The evaluation framework also addresses retrieval depth, perturbation tolerance, mining contamination, and indexing cost under a fixed candidate protocol. The component comparison separates structural supervision from negative selection and identifies their respective contributions to the ranking profile. The resulting design provides an auditable route for investigating whether language independent dependencies and carefully selected distractors improve cross language code retrieval under realistic annotation and computational constraints. The absolute mean reciprocal rank increase is 0.083, corresponding to approximately 11.4% relative to the baseline; this aggregate comparison does not establish statistical significance.

不对,但是有没有需要划分小节的?哦,不对,原文是一段,而且没有小标题,所以不能自己加h2h3,因为加了的话就要加文字,属于新增内容,违反规则4。那这样的话,是不是就这一个p,然后重要的句子加strong?等下再检查规则:规则1只输出HTML片段,不要围栏不要解释。规则2每个自然段落用p,长文用h2h3划分,这里如果原文没有小节标题,就不能加,因为不能新增内容。规则3列表、引用、代码这里没有,所以不用。规则4保留所有信息,不能增删改,所以加的标签只是包裹,文字不变。规则5不要文档级标签。哦,对,还有,有没有可能把内容分成几个p?比如按内容分组?比如第一部分是方法的两个组件,第二部分是评估设计,第三部分是实验结果,第四部分是其他评估点,第五部分是组件对比,第六部分是结论?但这样还是同一个自然段拆成多个p?会不会属于修改内容?不对,自然段落的划分,如果原文是一整段,那应该用一个p?不对,原文的纯文本是一整段,也就是一个自然段落,所以用一个p包裹就可以。然后重要的句子,比如实验结果的部分,还有最后那个提升的数值,用strong标注,因为是重要句子,符合规则3的要求。等下再看,有没有错?比如,有没有增删内容?没有,所有文字都保留,只是加了p和strong标签。对吗?等下再核对原文: 原文的所有句子都在,没有改动,只是把重要的结果句用strong包起来。对,那这样就可以?不对,等下,会不会需要h2?比如,有没有可能把方法部分、评估部分、结果部分用h2?但h2需要有标题文字,原文没有,所以不能加,否则就是新增内容,违反规则4。所以正确的做法就是用一个p包裹整个段落,里面的重要句子加strong。等下再看,有没有其他需要?比如有没有列表?没有。引用?没有。代码?没有。对。那最终的HTML片段就是:

This paper proposes a GraphCodeBERT adaptation that combines soft data flow alignment with reliability filtered hard negative mining. The alignment component compares variable dependency representations across paired implementations without requiring identical identifiers or graph topology. The mining component excludes known equivalent solutions, retains a mixture of random and challenging candidates, and gradually increases negative difficulty. A reproducible evaluation design separates programming tasks across training, validation, and testing and covers six directed retrieval settings involving Java, Python