亲爱的研友该休息了!由于当前在线用户较少,发布求助请尽量完整地填写文献信息,科研通机器人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
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
1秒前
深情的朝雪完成签到,获得积分10
4秒前
标致初曼发布了新的文献求助10
11秒前
默默的以柳完成签到,获得积分10
32秒前
标致初曼发布了新的文献求助10
55秒前
研究生吗喽完成签到,获得积分20
57秒前
美丽的沛菡完成签到,获得积分10
58秒前
59秒前
大熊完成签到 ,获得积分10
1分钟前
坦率如之完成签到,获得积分10
2分钟前
2分钟前
molihuakai应助科研通管家采纳,获得10
2分钟前
Jayzie完成签到 ,获得积分10
2分钟前
伶俐的一斩完成签到,获得积分10
2分钟前
迅速的柚子完成签到,获得积分10
3分钟前
123456完成签到 ,获得积分10
4分钟前
WFGodot应助科研通管家采纳,获得40
4分钟前
科研通AI2S应助科研通管家采纳,获得10
4分钟前
朴素的语兰完成签到,获得积分10
4分钟前
可爱的函函应助兔兔大王采纳,获得10
4分钟前
He完成签到 ,获得积分10
5分钟前
5分钟前
兔兔大王发布了新的文献求助10
5分钟前
坚强的文博完成签到 ,获得积分10
5分钟前
留胡子的丹亦完成签到,获得积分10
5分钟前
兔兔大王完成签到,获得积分10
5分钟前
姚老表完成签到,获得积分10
5分钟前
文静依萱完成签到,获得积分10
6分钟前
6分钟前
6分钟前
menghuigucha发布了新的文献求助10
6分钟前
scwang发布了新的文献求助20
6分钟前
menghuigucha完成签到,获得积分10
6分钟前
顺心的伯云完成签到,获得积分10
7分钟前
7分钟前
7分钟前
老石完成签到 ,获得积分10
7分钟前
lili完成签到 ,获得积分10
7分钟前
7分钟前
cdercder应助袁青寒采纳,获得10
7分钟前
高分求助中
Principles of Economics, 11th Edition 10000
Prescott's Microbiology: 2026 Release ISE 10000
University Physics with Modern Physics, 16th edition 10000
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Environmental Leverage in Times of Climate Crisis: Product Standards, Carbon Border Measures and Preferential Trade Agreements 1000
Erwählung und Berufung bei Paulus: Bedeutung, Entwicklung und Funktion einer Vorstellung in ihrem frühjüdischen und griechisch-römischen Kontext 850
Matrix Methods in Data Mining and Pattern Recognition 510
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 内科学 物理 复合材料 催化作用 细胞生物学 无机化学 光电子学 物理化学 电极 基因
热门帖子
关注 科研通微信公众号,转发送积分 7202541
求助须知:如何正确求助?哪些是违规求助? 8836775
关于积分的说明 18650950
捐赠科研通 6846876
什么是DOI,文献DOI怎么找? 3179453
关于科研通互助平台的介绍 2336519
邀请新用户注册赠送积分活动 2153898