DCVD: Dual-Channel Cross-Modal Fusion for Joint Vulnerability Detection and Localization

Wenxin Tang 1 Wenbin Li 2 Junliang Liu 3 Jingyu Xiao 4 Xi Xiao 1 Mingzhe Liu 5 Jinlong Yang 6 Xuan Liu 7 Yuehe Ma 8 Wang Luo 9 Qing Li 10 Lei Wang 11 Peng Xiangli 12 1 Tsinghua University 2 Hunan University 3 Dalian Maritime University 4 The Chinese University of Hong Kong 5 Shenzhen University 6 Northwestern Polytechnical University 7 Shandong University 8 BNU-HKBU United International College 9 Sun Yat-sen University 10 Peng Cheng Laboratory 11 Guangzhou Intelligence Communications Technology Co., Ltd. 12 The Fifth Electronic Research Institute of MIIT [email protected] [email protected] [email protected] · 2026

Read DCVD: Dual-Channel Cross-Modal Fusion for Joint Vulnerability Detection and Localization by Wenxin Tang 1 Wenbin Li 2 Junliang Liu 3 Jingyu Xiao 4 Xi Xiao 1 Mingzhe Liu 5 Jinlong Yang 6 Xuan Liu 7 Yuehe Ma 8 Wang Luo 9 Qing Li 10 Lei Wang 11 Peng Xiangli 12 1 Tsinghua University 2 Hunan University 3 Dalian Maritime University 4 The Chinese University of Hong Kong 5 Shenzhen University 6 Northwestern Polytechnical University 7 Shandong University 8 BNU-HKBU United International College 9 Sun Yat-sen University 10 Peng Cheng Laboratory 11 Guangzhou Intelligence Communications Technology Co., Ltd. 12 The Fifth Electronic Research Institute of MIIT [email protected] [email protected] [email protected] (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-11015.txt.

Introduction

Wenxin Tang and twelve colleagues present DCVD, a framework that jointly detects software vulnerabilities and pinpoints the responsible lines. Real auditing needs both answers, yet existing tools lean on a single information source or treat line-level localization as an afterthought of function-level detection.

DCVD fuses sequential, structural, and semantic information into one framework that trains function-level detection and statement-level localization together, with explicit line-level supervision. Joint learning lets each task sharpen the other instead of competing. Security auditors get a unified tool that names the vulnerable function and the lines inside it.

Catalog record

CREATORWenxin Tang 1 Wenbin Li 2 Junliang Liu 3 Jingyu Xiao 4 Xi Xiao 1 Mingzhe Liu 5 Jinlong Yang 6 Xuan Liu 7 Yuehe Ma 8 Wang Luo 9 Qing Li 10 Lei Wang 11 Peng Xiangli 12 1 Tsinghua University 2 Hunan University 3 Dalian Maritime University 4 The Chinese University of Hong Kong 5 Shenzhen University 6 Northwestern Polytechnical University 7 Shandong University 8 BNU-HKBU United International College 9 Sun Yat-sen University 10 Peng Cheng Laboratory 11 Guangzhou Intelligence Communications Technology Co., Ltd. 12 The Fifth Electronic Research Institute of MIIT [email protected] [email protected] [email protected]
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE43034
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2605.11015

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

DCVD: Dual-Channel Cross-Modal Fusion for Joint Vulnerability Detection and Localization Wenxin Tang 1 Wenbin Li 2 Junliang Liu 3 Jingyu Xiao 4 Xi Xiao 1 Mingzhe Liu 5 Jinlong Yang 6 Xuan Liu 7 Yuehe Ma 8 Wang Luo 9 Qing Li 10 Lei Wang 11 Peng Xiangli 12 1 Tsinghua University 2 Hunan University 3 Dalian Maritime University 4 The Chinese University of Hong Kong 5 Shenzhen University 6 Northwestern Polytechnical University 7 Shandong University 8 BNU-HKBU United International College 9 Sun Yat-sen University 10 Peng Cheng Laboratory 11 Guangzhou Intelligence Communications Technology Co., Ltd. 12 The Fifth Electronic Research Institute of MIIT [email protected] [email protected] [email protected] Abstract Software vulnerability detection plays a critical role in ensuring system security, where real-world auditing requires not only determining whether a function is vulnerable but also pinpointing the specific lines responsible. However, existing approaches either rely on a single information source—sequential, structural, or semantic—failing to jointly exploit the complementary strengths across modalities, or treat statement-level localization merely as a byproduct of function-level detection without explicit line-level supervision. To address these limitations, we propose DCVD (Dual-Channel Cross-Modal Vulnerability Detection), a unified framework that performs joint function-level detection and statement-level localization. DCVD extracts control-dependency and semantic features through two parallel branches and integrates them via contrastive alignment coupled with bidirectional cross-attention, effectively bridging the cross-modal representation gap. It further introduces explicit supervision signals at both the function and statement levels, enabling collaborative optimization across the two granularities. Extensive experiments on a large-scale real-world vulnerability benchmark demonstrate that DCVD consistently outperforms state-of-the-art methods on both function-level detection and statement-level localization. Our code is available at https://github.com/vinsontang1/DCVD . 1 Introduction The increasing scale and complexity of modern software systems have made security vulnerabilities a pervasive and critical concern. From buffer overflows 3 ; 15 and use-after-free 2 ; 14 errors to injection attacks 37 ; 23 and authentication bypasses 25 , software vulnerabilities 24 pose severe threats to system integrity, user privacy, and economic security. As software development accelerates driven by agile methodologies and open-source ecosystems, the volume of code requiring security review has far outpaced the capacity of manual auditing. Consequently, automated vulnerability detection has emerged as an indispensable capability in the software security lifecycle. Recent advances in deep learning and large language models (LLMs) have demonstrated promising results in software understanding tasks 17 ; 34 , opening new avenues for learning-based vulnerability detection. However, real-world security auditing demands not only the ability to determine whether a function contains a vulnerability (function-level detection), but also the ability to pinpoint which specific lines are responsible (statement-level localization). Simultaneously satisfying both requirements remains an open and challenging problem. Existing approaches to vulnerability detection can be broadly categorized into three paradigms based on their primary information source. (a) Sequence-based methods model source code as token sequences and leverage Transformer architectures to capture contextual semantics 19 ; 31 ; 5 . For instance, LineVul 8 applies a pre-trained RoBERTa model to learn token-level representations for vulnerability prediction. While such methods effectively capture sequential semantic patterns, they inherently discard the structural information embedded in program control flow and syntax hierarchies. (b) Graph-based methods take program representations such as Abstract Syntax Trees (ASTs), Control Flow Graphs (CFGs), and Program Dependence Graphs (PDGs) as input to capture structural dependencies within code 29 ; 36 ; 32 ; 22 . Representative works including MatsVD 32 and PTLVD 22 have shown that structural information provides valuable signals for vulnerability detection. However, these methods primarily focus on syntactic and control-flow patterns while lacking the ability to comprehend high-level semantic intent and functional logic of the code. (c) LLM-based methods directly employ Code LLMs for vulnerability detection, leveraging their strong semantic understanding capabilities acquired through large-scale pre-training on code corpora 30 ; 35 ; 5 . Despite their powerful language comprehension, these approaches lack explicit modeling of program structural properties, limiting their sensitivity to vulnerabilities rooted in control flow anomalies. These three paradigms each rely on a single information source and fail to effectively integrate structural and semantic information, resulting in limited performance when confronting complex vulnerability patterns that simultaneously involve control flow irregularities and semantic anomalies. Moreover, existing frameworks that attempt both function-level detection and statement-level localization, such as PTLVD 22 and LineVul 8 , treat statement-level localization merely as a byproduct of function-level detection—typically derived through attention weights or gradient-based attribution—without incorporating explicit statement-level supervision signals, leading to insufficient localization precision. To advance automated vulnerability detection, three key technical challenges must be addressed: (1) How to effectively extract vulnerability-relevant control dependency information. Vulnerabilities in real-world software often do not originate from isolated statements but arise from complex interactions among control dependencies—a missing boundary check may render a subsequent array access unsafe, or an incorrectly configured conditional branch may expose an unauthorized execution path. These vulnerabilities are deeply embedded within control flow structures, making them difficult to identify through surface-level analysis. Existing static analysis techniques provide coarse-grained representations of control dependencies that lack the flexibility to distinguish, within complex nested structures and conditional jumps, which control paths are critical for vulnerability triggering and which constitute irrelevant noise. (2) How to bridge the cross-modal representation gap between structural and semantic features. Control dependency information is naturally represented as graph structures emphasizing syntactic and flow relationships, while semantic information manifests as continuous embedding vectors capturing functional intent and behavioral logic. These two modalities exhibit fundamentally different data formats, semantic granularities, and feature distributions. Native fusion strategies such as concatenation or weighted averaging fail to achieve meaningful alignment and may introduce representational conflicts that degrade detection performance. (3) How to reconcile the supervision asymmetry between function-level detection and statement-level localization. Function-level detection constitutes a coarse-grained binary classification task, whereas statement-level localization requires fine-grained sequence-level prediction. The two tasks differ substantially in label density and gradient signal strength. Existing methods lack explicit statement-level supervision, relegating localization to an auxiliary output derived indirectly from function-level predictions, which fundamentally constrains localization accuracy. To address these challenges, we propose DCVD ( D ual- C hannel Cross-Modal V ulnerability D etection), a unified framework that synergistically integrates multi-source information extraction, cross-modal feature fusion, and multi-granularity supervised learning for joint vulnerability detection and localization. To tackle Challenge (1) , we propose the Dual-Channel Encoder , which comprises a structure branch and a semantic branch operating in parallel: the former employs Graph Attention Networks (GATs) to extract control dependency features from AST and CFG representations, automatically focusing on vulnerability-relevant control nodes and paths; the latter leverages an LLM to generate natural language explanations of the code and extracts deep semantic features through a shared embedding layer. The two branches provide complementary coverage of both structural and semantic dimensions. To address Challenge (2) , we introduce the Cross-Modal Fusion module, which first aligns the two modalities into a unified high-dimensional space via contrastive learning, and then employs bidirectional cross-attention to enable deep interaction and mutual enhancement, producing a fused representation that integrates both structural and semantic information. To resolve Challenge (3) , we design the Multi-Granularity Supervisor , which comprises function-level and statement-level supervision branches operating in parallel: the former optimizes overall vulnerability detection through classification loss, while the latter incorporates explicit statement-level supervision signals for fine-grained

Read the complete text