A vulnerability detector that reads a model internal representation of a function reached 60.0 percent accuracy in about one second per function, matching an agentic detector over 250 times faster
AspireAI community · arXiv (Amine Lbath, Massih-Reza Amini)
A vulnerability costs more to fix the later it is discovered, and as coding agents generate code faster than developers can review it, something needs to screen each new function in real time. LLM agents can find real vulnerabilities by working as a security expert would, running analysis tools, exploring surrounding code and weighing evidence, but that reasoning spans many model calls, so each verdict takes minutes, far too long for real-time screening. Faster detectors that fine-tune models or prompt an LLM for a direct verdict are less accurate, because they judge a function without the context an agent gathers. REVA brings the security context and code understanding behind agentic detectors into a single forward pass, giving the LLM a pre-computed threat model of its module, lightweight static analysis findings and call-graph information, and using a trained probe to read the LLM's internal representations of the new function. On PrimeVul's held-out test set, REVA on GLM-5.3-Flash reaches 60.0% accuracy in about one second per function, matching VulTriage (59.2%), the state-of-the-art agentic detector run on the same LLM, while being over 250 times faster and less than a tenth as costly. On the same prompt the probe is 14% to 17% more accurate than the LLM's own direct verdict, and across three open LLMs REVA is at least as accurate as VulTriage and about 10% more accurate on two of them. The limitation: the accuracy gain comes from a probe trained on that data distribution, and the evidence is on one vulnerability benchmark.
Read the story and explore more from the AspireAI community.
Two sparse-autoencoder analyses have resisted scaling: matching semantically similar features across layers, and compressing large feature circuits into interpretable supernodes. This paper argues both are the same underlying problem, estimating semantic distances between SAE features that sit on different activation manifolds. Its representation treats each feature not as a single decoder vector but as an activation-weighted distribution over the hidden states expressing it, projects those distributions into a shared reference space, and compares them with Wasserstein distance. The representation is proved invariant to activation rescaling and stable under perturbation, and recovers true matches under finite-sample margin conditions. Empirically it outperformed decoder-vector and LLM-based baselines and captured subtle functional distinctions between related features, and it compressed large feature circuits into interpretable supernodes automatically. The limitation is that this is interpretability tooling: the paper demonstrates better feature matching and circuit compression, not that downstream interpretability claims become more accurate.