HFFN: A Hybrid Feature Fusion Network for Representing Source Code
DOI:
https://doi.org/10.4114/intartif.vol29iss77pp55-77Keywords:
Software Engineering, Hybrid Fusion, Code Summarization, Feature Extraction, Multi-View Learning, Deep LearningAbstract
This study aims to automate source code summarization by introducing a novel machine learning architecture that integrates multiple feature perspectives. Specifically, it combines lexical, syntactic, and semantic representations of code and employs a transformer-based decoder to generate natural language summaries, benchmarking performance against established baselines. Experiments were conducted on the CanonCode Corpus, a high-quality dataset of 8,542 validated C programs. Individual feature extractors-Convolutional Neural Networks (CNN) for lexical features, Tree-LSTM for syntactic features and Graph Neural Networks (GNN) for semantic features were evaluated and compared with the proposed Hybrid Feature Fusion Network (HFFN). The fused feature vector from HFFN was decoded using a transformer to generate summaries. Performance was measured using ROUGE, BLEU, CodeBLEU, BERTScore, and Exact Match metrics. The HFFN model consistently outperformed all baselines across standard natural language generation metrics, achieving a ROUGE-L score of 0.94 and a BERTScore of 0.93. An ablation study confirmed the complementary contributions of each feature type, with syntactic features providing the greatest individual impact. The improvement over the strongest baseline (CodeBERT) was statistically significant (p < 0.001). The proposed HFFN framework demonstrates the value of combining diverse
code representations for summarization. It offers a robust and interpretable architecture that advances multiview representation learning in software engineering and provides a foundation for future research in automated documentation.
Downloads
Metrics
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Iberamia & The Authors

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Open Access publishing.
Lic. under Creative Commons CC-BY-NC
Inteligencia Artificial (Ed. IBERAMIA)
ISSN: 1988-3064 (on line).
(C) IBERAMIA & The Authors

