Related Experiment Video
Updated: Jul 24, 2025

Augmenting Large Language Models via Vector Embeddings to Improve Domain-Specific Responsiveness
Published on: December 6, 2024
Re_Trans: Combined Retrieval and Transformer Model for Source Code Summarization
Chunyan Zhang1, Qinglei Zhou2, Meng Qiao1
1State Key Laboratory of Mathematical Engineering and Advanced Computing, Zhengzhou 450001, China.
Abstract:
Source code summarization (SCS) is a natural language description of source code functionality. It can help developers understand programs and maintain software efficiently. Retrieval-based methods generate SCS by reorganizing terms selected from source code or use SCS of similar code snippets. Generative methods generate SCS via attentional encoder-decoder architecture. However, a generative method can generate SCS for any code, but sometimes the accuracy is still far from expectation (due to the lack of numerous high-quality training sets). A retrieval-based method is considered to have a higher accurac, but usually fails to generate SCS for a source code in the absence of a similar candidate in the database. In order to effectively combine the advantages of retrieval-based methods and generative methods, we propose a new method: Re_Trans. For a given code, we first utilize the retrieval-based method to obtain its most similar code with regard to sematic and corresponding SCS (S_RM). Then, we input the given code and similar code into the trained discriminator. If the discriminator outputs onr, we take S_RM as the result; otherwise, we utilize the generate model, transformer, to generate the given code' SCS. Particularly, we use AST-augmented (AbstractSyntax Tree) and code sequence-augmented information to make the source code semantic extraction more complete. Furthermore, we build a new SCS retrieval library through the public dataset. We evaluate our method on a dataset of 2.1 million Java code-comment pairs, and experimental results show improvement over the state-of-the-art (SOTA) benchmarks, which demonstrates the effectiveness and efficiency of our method.
Related Concept Videos
Source Transformation
It is essential to note that when...
Source Transformation for AC Circuits
Improving Translational Accuracy
RL Circuit with 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...
Transfer RNA Synthesis
RL Circuit without Source
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,...

