← Lab /Security & privacy

Compact 693M transformer beats larger LLMs and static tools on C vulnerability detection

VULNSCOUT-C outperforms all evaluated baselines on a standardized C vulnerability detection benchmark

Security & privacy arXiv 30 Mar 2026 Method Simulation evidence

Published as “VulnScout-C: A Lightweight Transformer for C Code Vulnerability Detection”

Why it matters

The model’s sub-millisecond inference (≈5 ms per sample) makes real-time vulnerability detection feasible in resource-constrained development environments.

Summary

VulnScout-C achieves a CASTLE score of 1068 with binary F1 = 85.4%, accuracy = 82.4%, recall = 86.0% and precision = 84.9%, outperforming all evaluated LLM and static analysis baselines on the 250-sample CASTLE benchmark. The paper also introduces a 33,565-sample VULNSCOUT dataset and a rank-aware CWE-weighted loss. No abstract or explicit limitation section was provided, so the summary is based on the introduction, experimental setup, results, and conclusion.

What they found 3

  1. VulnScout-C outperforms all baselines on the CASTLE benchmark.

    “VulnScout-C achieves a CASTLE score of 1068, outperforming GPT-4o (954) and surpassing reasoning-optimized models such as GPT-o1 (962) and GPT-o3 Mini (977).”

  2. High binary classification performance.

    “binary F1 of 85.4%, accuracy of 82.4%, recall of 86.0%, and precision of 84.9%”

  3. Strong CWE classification accuracy.

    “CWE classification accuracy of 90.0% on truly vulnerable samples”

Caveats 2

  • The fine-grained MoE configuration improves CWE accuracy but lowers overall CASTLE score: "The fine-grained configuration with 50 experts achieved a CASTLE score of 1046 and CWE accuracy of 92.67%, representing a 2.67 percentage point improvement in CWE accuracy over baseline."
  • Performance on some CWEs is substantially lower, e.g., "CWE-617 100.0 50.0 66.7" and "CWE-674 100.0 33.3 50.0" indicating F1 scores of 66.7% and 50.0% respectively.

What’s new here 4

  • A compact Mixture-of-Experts transformer (693 M total, 353 M active parameters) tailored for C vulnerability detection.
  • A newly constructed VULNSCOUT dataset of 33,565 labeled C samples generated via a dual-verification pipeline (ESBMC + GPT-OSS-120B).
  • A rank-aware weighted BCE loss that prioritizes high-severity CWEs from the MITRE Top 25.
  • Extended context handling beyond the 512-token limit of traditional encoder models.