清晨好,您是今天最早来到科研通的研友!由于当前在线用户较少,发布求助请尽量完整地填写文献信息,科研通机器人24小时在线,伴您科研之路漫漫前行!

Efficient transformer with code token learner for code clone detection

计算机科学 抽象语法树 安全性令牌 编码(集合论) 编码 源代码 变压器 程序设计语言 人工智能 语法 操作系统 工程类 基因 电气工程 电压 集合(抽象数据类型) 化学 生物化学
作者
Aiping Zhang,Liming Fang,Chunpeng Ge,Piji Li,Zhe Liu
出处
期刊:Journal of Systems and Software [Elsevier BV]
卷期号:197: 111557-111557 被引量:13
标识
DOI:10.1016/j.jss.2022.111557
摘要

Deep learning techniques have achieved promising results in code clone detection in the past decade. Unfortunately, current deep learning-based methods rarely explicitly consider the modeling of long codes. Worse, the code length is increasing due to the increasing requirement of complex functions. Thus, modeling the relationship between code tokens to catch their long-range dependencies is crucial to comprehensively capture the information of the code fragment. In this work, we resort to the Transformer to capture long-range dependencies within a code, which however requires huge computational cost for long code fragments. To make it possible to apply Transformer efficiently, we propose a code token learner to largely reduce the number of feature tokens in an automatic way. Besides, considering the tree structure of the abstract syntax tree, we present a tree-based position embedding to encode the position of each token in the input. Apart from the Transformer that captures the dependency within a code, we further leverage a cross-code attention module to capture the similarities between two code fragments. Our method significantly reduces the computational cost of using Transformer by 97% while achieves superior performance with state-of-the-art methods. Our code is available at https://github.com/ArcticHare105/Code-Token-Learner.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
科研通AI2S应助科研通管家采纳,获得10
1秒前
1秒前
夏至完成签到 ,获得积分10
17秒前
21秒前
有志者发布了新的文献求助10
28秒前
忧郁小鸽子完成签到,获得积分10
39秒前
weijinfen发布了新的文献求助10
45秒前
所所应助cjg采纳,获得10
51秒前
dc完成签到,获得积分20
51秒前
仓鼠小饼干完成签到 ,获得积分10
51秒前
dongqulong完成签到 ,获得积分10
57秒前
59秒前
cjg发布了新的文献求助10
1分钟前
weijinfen完成签到,获得积分10
1分钟前
boymin2015完成签到 ,获得积分10
1分钟前
1分钟前
刘小龙发布了新的文献求助10
1分钟前
研友_GZ3zRn完成签到 ,获得积分0
1分钟前
可爱紫文完成签到 ,获得积分10
1分钟前
1分钟前
穿山的百足公主完成签到 ,获得积分10
1分钟前
不安的绮玉完成签到,获得积分10
1分钟前
兰花二狗他爹完成签到,获得积分10
1分钟前
1分钟前
Akim应助科研通管家采纳,获得10
2分钟前
9527应助科研通管家采纳,获得10
2分钟前
dl应助科研通管家采纳,获得20
2分钟前
Elthrai完成签到 ,获得积分10
2分钟前
大模型应助英俊的依凝采纳,获得10
2分钟前
所所应助不安的绮玉采纳,获得10
2分钟前
2分钟前
慧子完成签到 ,获得积分10
2分钟前
Guorsh完成签到 ,获得积分10
2分钟前
无奈的书琴完成签到 ,获得积分10
2分钟前
傻傻的哈密瓜完成签到,获得积分10
2分钟前
mzhang2完成签到 ,获得积分10
2分钟前
2分钟前
聪明听筠完成签到,获得积分10
2分钟前
Xavier完成签到 ,获得积分10
2分钟前
2分钟前
高分求助中
Malcolm Fraser : a biography 680
Signals, Systems, and Signal Processing 610
天津市智库成果选编 600
Climate change and sports: Statistics report on climate change and sports 500
Forced degradation and stability indicating LC method for Letrozole: A stress testing guide 500
Organic Reactions Volume 118 400
A Foreign Missionary on the Long March: The Unpublished Memoirs of Arnolis Hayman of the China Inland Mission 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 物理 内科学 复合材料 催化作用 物理化学 光电子学 电极 细胞生物学 基因 无机化学
热门帖子
关注 科研通微信公众号,转发送积分 6458939
求助须知:如何正确求助?哪些是违规求助? 8268223
关于积分的说明 17621323
捐赠科研通 5527994
什么是DOI,文献DOI怎么找? 2905828
邀请新用户注册赠送积分活动 1882560
关于科研通互助平台的介绍 1727528