Diagnosing Generalization Boundaries in AI-Based Vulnerability Detection via Calibrated Embedding Distances
The study used calibrated embedding distances to expose hidden generalization boundaries in code vulnerability detection models like CodeBERT and Qwen2.5-Coder using hard-negative samples. It found that these distances reveal where models fail under distribution shifts, showing that patched false positives are geometrically close to vulnerable code neighborhoods.