ObliVul: Alert-Conditioned Safety Obligation Modeling and Bidirectional Counterfactual Validation for Code Vulnerability Detection
Heyang Tan, Chengxin Gao, Xin Wen, Jiaxin Li, Rui Cao
Key points
From the paper's conclusion- To address this problem, we propose ObliVul, an alert-conditioned safety obligation modeling and bidirectional counterfactual validation framework for vulnerability detection.
Abstract
In real-world software development, the primary challenge in vulnerability detection is often not finding suspicious code, but identifying which alerts among the large number of candidate alerts produced by static analysis truly warrant attention. Existing learning-based methods mainly identify suspicious patterns at the function or line level, making it difficult to extract complete program evidence centered on an individual alert. Although large language models can infer risk sources, dangerous operations, protection conditions, and state preconditions from local program facts, such semantic information cannot be reliably aligned with specific program nodes, dependency relations, and propagation paths, and is therefore insufficient to verify whether the corresponding safety obligations truly affect the current alert. To address this problem, we propose ObliVul, an alert-conditioned safety obligation modeling and bidirectional counterfactual validation framework for vulnerability detection. For each candidate alert, ObliVul first extracts a Local Evidence Pack (LEP) from the Code Property Graph (CPG) and uses a large language model to recover candidate safety obligations. It then aligns the safety obligations with program nodes, dependency edges, and path scopes to construct a Local Safety Obligation Graph (LSOG). Finally, VAFI aggregates complementary verified alert evidence while suppressing redundant or weaker evidence to produce a function-level vulnerability prediction. Experimental results show that ObliVul effectively distinguishes vulnerable versions from fixed versions and reduces persistent false positives on fixed code. Ablation studies further confirm the necessity of each component for safety obligation recovery, risk response validation, and function-level vulnerability inference.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Evaluating line-level localization ability of learning-based code vulnerability detection modelsMachine Learning · 2026
- Context-Enhanced Vulnerability Detection Based on Large Language ModelsACM Transactions on Software Engineering and Methodology · 2025
- GRAML: Graph-Grounded Reasoning and Multi-Task Learning for LLM-Based Software Vulnerability DetectionarXiv · 2026
- Trusting the Tool: Asymmetric Deference of LLM Vulnerability Auditors to Static-Analysis EvidencearXiv · 2026
- Vul-RAG: Enhancing LLM-based Vulnerability Detection via Knowledge-level RAGACM Transactions on Software Engineering and Methodology · 2026
- SAGE: Signal-Amplified Guided Embeddings for Vulnerability DetectionProceedings of the ACM on Software Engineering · 2026