Vibeleaderboard
← All Intel
Intel / article

Diagnosing Generalization Boundaries in AI-Based Vulnerability Detection via Calibrated Embedding Distances

Source
arxiv.org
Author
Konstantin Ievtushenko, Ralf L\"ammel, Jan J\"urjens
Date

Context

A vulnerability detector can mistake repaired code for vulnerable code when the two look similar in its internal representation. This study compares functions with their patched counterparts and measures their proximity to vulnerable examples from . It adjusts the numerical representations so broad patterns do not dominate the distance calculation. Method.

In the reported proximity analysis, false alarms on patched code ranged from 9.4% in the lowest-risk tenth to 58.8% in the highest-risk tenth. That gives evaluators a way to locate concentrations of unreliable predictions. The distance is a diagnostic of behavior, not evidence that a particular patch contains a vulnerability. False-positive analysis.

Key takeaways · AI-distilled
  • Cross-project shift caused the sharpest accuracy loss, even though temporal shift moved samples farthest in space, so geometric distance alone does not rank which shift hurts most.
  • False positives on patched code tracked proximity to vulnerable training examples, rising from 9.4% in the lowest-risk decile to 58.8% in the highest.
  • The method uses whitened intermediate-layer embeddings with local nearest-neighbour scoring on strictly paired vulnerable and patched code, and needs no auxiliary model.
Terms in this piece · Glossary
  • Training — The process that adjusts a model using examples and a measure of how well it performs.
  • Model — A computational system that uses learned patterns to produce an output from information supplied to it.
  • embedding — A list of numbers representing a piece of text's meaning, so that similar meanings end up numerically close and can be searched.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Recommended reads