FairnessBiasExplainabilitycs.AI
VISION: Robust and Interpretable Code Vulnerability Detection Leveraging Counterfactual Augmentation
David Egea, Barproda Halder, Sanghamitra Dutta
August 26, 2025
AAAI/ACM Conference on AI, Ethics, and Society
10 citations
1 influential
Key Takeaways
-
Counterfactual training data significantly improves vulnerability detection reliability: By creating paired code examples with minimal changes but opposite vulnerability labels, VISION improved pairwise contrast accuracy from 4.5% to 95.8%, demonstrating that AI models learn more robust patterns when trained on carefully constructed contrasts rather than raw data alone.
-
Current AI vulnerability detectors fail on real-world edge cases: The framework revealed that standard Graph Neural Networks achieve only 0.7% accuracy on worst-group scenarios, highlighting a critical gap between laboratory performance and practical deployment—a key concern for responsible AI systems protecting critical infrastructure.
-
AI models can learn misleading shortcuts instead of true vulnerabilities: The paper identifies how vulnerability detectors develop "spurious correlations" by latching onto superficial code similarities rather than genuine security flaws, which VISION addresses through systematic counterfactual augmentation, improving overall accuracy from 51.8% to 97.8%.
-
Interpretability is essential for trustworthy security AI: VISION includes graph-based methods to identify which specific code statements drive vulnerability predictions, enabling security experts to verify that the AI is flagging genuine risks rather than false patterns—a crucial requirement for deploying AI in high-stakes cybersecurity decisions.
-
Large Language Models can enhance AI robustness when used strategically: Rather than replacing human expertise, the framework uses LLMs to generate training data that helps other AI systems learn more reliably, demonstrating a complementary approach to responsible AI development.