FiCoVuL: A Framework for Fine-grained and Cross-function Code Vulnerability Detection
Detecting vulnerabilities in software development is crucial yet challenging. Deep learning-based approaches have shown promise in automatically learning features for vulnerable function detection. In practice, human analysts need to correlate the behavioral logic of multiple functions to confirm the occurrence of vulnerabilities. However, existing works fail to consider the contextual information across functions. Furthermore, human analysts expect models to provide finer-grained explanations to assist in the fixing process. In this paper, we present FiCoVuL, a framework for analyzing interconnected functions and providing fine-grained guidance for vulnerability fixing. FiCoVuL utilizes Function Fusion to extract function definitions and their call relationships from a project, and synthesize multiple functions into one for joint analysis. It models code as a multi-relational graph, capturing rich syntactic and semantic relationships between code statements. A multi-relational graph attention network is leveraged to perform message passing between nodes and edge relationships, generating graph-level and node-level representations. These representations are utilized for vulnerability function prediction and code line ranking, assisting in vulnerability fixing. We evaluate FiCoVuL on a public vulnerability dataset and a self-constructed cross-function one, and compare it with five existing detection models. Experimental results show that FiCoVuL significantly outperforms other methods in both vulnerability detection and localization.
Authors
- Jiaping Gui (ORCID: https://orcid.org/0009-0001-4272-9604)
- Yue Wu (ORCID: https://orcid.org/0000-0002-6107-7859)
- Futai Zou
- Ping Yi (ORCID: https://orcid.org/0000-0003-4530-5118)
- Hongjun Huang (ORCID: https://orcid.org/0000-0001-5323-5389)
- Haiyang Yu (ORCID: https://orcid.org/0009-0008-7942-7125)
- Liang Zhang (ORCID: https://orcid.org/0009-0006-9265-0300)
Institutions
- State Grid Corporation of China (China) (CN)
- Shanghai Jiao Tong University (CN)
Publication Details
- Journal
- ACM Transactions on Software Engineering and Methodology
- Published
- 2026-09-15
- DOI
- https://doi.org/10.1145/3842381
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00