聚焦关键要素:基于Fisher信息的自适应多模态融合用于漏洞检测
Focus on What Matters: Fisher-Guided Adaptive Multimodal Fusion for Vulnerability Detection
AI总结:
本文提出TaCCS-DFA框架,通过Fisher信息引导的自适应多模态融合,提升漏洞检测的F1分数,同时降低推理延迟。
摘要:
软件漏洞检测可以被表述为一个二元分类问题,以确定给定的代码片段是否包含安全缺陷。现有多模态方法通常将通过预训练模型提取的自然代码序列(NCS)表示与通过图神经网络提取的代码属性图(CPG)表示进行融合,隐含假设引入额外模态必然带来信息增益。通过实证分析,我们展示了这一假设的局限性:预训练模型已经隐式地编码了大量结构信息,导致两种模态之间存在强烈重叠;此外,图编码器通常在特征提取方面不如预训练语言模型有效。因此,朴素融合不仅难以获得互补信号,还会因噪声传播而稀释有效判别线索。为了解决这些挑战,我们提出了一种任务条件互补融合策略,利用Fisher信息量化任务相关性,将跨模态交互从全谱匹配转变为在任务敏感子空间内的选择性融合。我们的理论分析表明,在等方扰动假设下,该策略显著收紧了输出误差的上界。基于这一见解,我们设计了TaCCS-DFA框架,该框架结合在线低秩Fisher子空间估计与自适应门控机制,以实现高效的任务导向融合。在BigVul、Devign和ReVeal基准测试中,TaCCS-DFA在仅增加3.4%推理延迟的同时,实现了F1分数高达6.3点的提升,同时保持低校准误差。
英文摘要:
Software vulnerability detection can be formulated as a binary classification problem that determines whether a given code snippet contains security defects. Existing multimodal methods typically fuse Natural Code Sequence (NCS) representations extracted by pretrained models with Code Property Graph (CPG) representations extracted by graph neural networks, under the implicit assumption that introducing an additional modality necessarily yields information gain. Through empirical analysis, we demonstrate the limitations of this assumption: pretrained models already encode substantial structural information implicitly, leading to strong overlap between the two modalities; moreover, graph encoders are generally less effective than pretrained language models in feature extraction. As a result, naive fusion not only struggles to obtain complementary signals but can also dilute effective discriminative cues due to noise propagation. To address these challenges, we propose a task-conditioned complementary fusion strategy that uses Fisher information to quantify task relevance, transforming cross-modal interaction from full-spectrum matching into selective fusion within a task-sensitive subspace. Our theoretical analysis shows that, under an isotropic perturbation assumption, this strategy significantly tightens the upper bound on the output error. Based on this insight, we design the TaCCS-DFA framework, which combines online low-rank Fisher subspace estimation with an adaptive gating mechanism to enable efficient task-oriented fusion. Experiments on the BigVul, Devign, and ReVeal benchmarks demonstrate that TaCCS-DFA delivers up to a 6.3-point gain in F1 score with only a 3.4% increase in inference latency, while maintaining low calibration error.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。