Automated Code Documentation Generation via Enhanced Transformer-XL Architectures - Zając, Karol; Sowa, Mariusz; Kubiak, Patryk (Journal of Intelligent Information and Communication, 2026)
By adding accurate and context-aware descriptions to the source code, automated code documentation can address issues with program comprehension and maintenance. Based on an improved Transformer-XL architecture that can take into account long-range dependencies and intricate structural links in programming languages, this study presents an end-to-end framework for automated documentation production. The proposed approach improves the accuracy and quality of created papers by addressing the two sub-problems of segment-level recurrence and hybrid positional encoding and adaptive attention. A large-scale dataset of Python and Java code-summary pairs with over 130,000 annotations covering a variety of language characteristics and programming styles will be used for empirical evaluation. With a BLEU score of 27.4 for Python and 24.0 for Java, as well as higher ROUGE-L and METEOR scores, our system outperforms conventional sequence-to-sequence and standard Transformer models, according to the aforementioned experimental results. Ablation studies also demonstrate the necessity of all the fundamental elements; for instance, eliminating the fusion and attention modules greatly lowers the quality of the outcomes. Additionally, the resulting summaries are acceptable and legible by humans, and the model is comparatively insensitive to fluctuations and noise in the code. The aforementioned findings collectively demonstrate that the suggested solution can offer a high-performance and expanded documentation platform for multilingual industrial environments. This platform will be extensively utilized in software engineering toolchains to improve the dependability of knowledge sharing and development collaboration.