Re_Trans:用于源代码总结的组合检索和转换器模型
Chunyan Zhang1, Qinglei Zhou2, Meng Qiao1
1State Key Laboratory of Mathematical Engineering and Advanced Computing, Zhengzhou 450001, China.
Entropy (Basel, Switzerland)
|July 8, 2023
概括
我们提出Re_Trans,这是一种结合检索和生成方法的新方法,用于准确的源代码总结 (SCS). 这种方法通过提高SCS生成质量来增强代码理解和软件维护.
科学领域:
- 软件工程 软件工程 软件工程
- 人工智能的人工智能
- 自然语言处理自然语言处理.
背景情况:
- 源代码总结 (SCS) 有助于程序理解和软件维护.
- 现有的基于检索的方法提供了准确性,但与新型代码作斗争.
- 生成方法提供更广泛的覆盖范围,但由于培训数据有限,可能缺乏精确性.
研究的目的:
- 开发源代码总结的混合方法,将基于检索和生成方法的优势结合起来.
- 提高源代码生成自然语言描述的准确性和效率.
主要方法:
- 拟议的Re_Trans方法:一种混合方法,使用检索进行初始总结,必要时再使用生成式变压器模型.
- 嵌入式抽象语法树 (AST) 增强和代码序列增强的信息,用于增强语义提取.
- 使用大型公共数据集开发了一个新的SCS检索库.
主要成果:
- 在一个数据集上评估了210万个Java代码-评论对.
- 与最先进的 (SOTA) 基准指标相比,表现有所改善.
- 在源代码总结方面实现了更高的有效性和效率.
结论:
- Re_Trans 方法有效地整合了检索和生成技术,用于优质的源代码总结.
- 使用AST增强和代码序列增强信息可以提高语义理解.
- 提出的方法为准确和高效的SCS提供了一个有希望的解决方案.
相关概念视频
Source Transformation
6.6K
Source transformation is a fundamental technique employed in circuit analysis, offering a valuable tool for simplifying complex electrical circuits. This technique involves the replacement of either a voltage source in series with a resistor by a current source in parallel with a resistor, or vice versa. The key concept here is that when the original sources are deactivated (turned off), the equivalent resistance at the circuit's end terminals remains the same.
It is essential to note that when...
It is essential to note that when...
6.6K
Source Transformation for AC Circuits
633
The process of source transformation in the frequency domain entails the conversion of a voltage source, positioned in series with an impedance, into a current source that is parallel to an impedance, or the other way around. It is essential to maintain the following relationships while transitioning from one source type to another.
633
Improving Translational Accuracy
2.6K
2.6K
RL Circuit with Source
831
When an RL (Resistor-Inductor) circuit is connected to a DC source, the complete response of the circuit can be divided into two parts: the transient response and the steady-state response.
The transient response of the circuit is its temporary reaction to the sudden application of the DC source. This response is characterized by a current that exponentially decays to zero as time approaches infinity. During this transitional period, the inductor behaves like a short circuit, causing the source...
The transient response of the circuit is its temporary reaction to the sudden application of the DC source. This response is characterized by a current that exponentially decays to zero as time approaches infinity. During this transitional period, the inductor behaves like a short circuit, causing the source...
831
Transfer RNA Synthesis
2.8K
2.8K
RL Circuit without Source
946
When a DC source is suddenly disconnected from an RL (Resistor-Inductor) circuit, the circuit becomes source-free. Assuming the inductor has an initial current denoted as I0, the initial energy stored in the inductor can be determined.
Applying Kirchhoff's voltage law around the loop of the circuit and substituting the voltages across the inductor and resistor yields a first-order differential equation. A logarithmic equation is obtained by rearranging the terms in this equation,...
Applying Kirchhoff's voltage law around the loop of the circuit and substituting the voltages across the inductor and resistor yields a first-order differential equation. A logarithmic equation is obtained by rearranging the terms in this equation,...
946


