Skip to content

Open or Frontier? A Cost- and Energy-Aware Benchmark of Large Language Models for Software Vulnerability Detection

Sep 2026 · Computers · 0 citations · 10 references
Software Engineering Research

TL;DR

Efficiency is the robust finding: open-weight models occupy the quality-efficiency Pareto frontier in every configuration tested, and no frontier model is Pareto-optimal; no frontier model is Pareto-optimal.

Abstract

Large language models (LLMs) are increasingly applied to software vulnerability detection, but evaluations report accuracy while ignoring inference cost and energy and under-represent open-weight models relative to proprietary systems. We benchmark eight LLMs, three frontier, and five open-weight on a stratified 1549-function subset of label-clean PrimeVul, treating cost and energy as first-class axes alongside detection quality. Cost is measured directly; energy is measured on-GPU across a concurrency sweep for three locally servable open models and FLOP-estimated with a sensitivity range for the API-served ones. Efficiency is the robust finding: open-weight models occupy the quality-efficiency Pareto frontier in every configuration tested, and no frontier model is Pareto-optimal; this is a 4-billion-parameter model matching the best frontier system’s quality at one sixty-sixth of the list price. On quality, at a matched output budget, the best open model significantly exceeds every frontier model (0.711 balanced accuracy against 0.606–0.653), although the strongest frontier system is level with the next two open models. Two findings bound the practical reading. A 125-million-parameter detector fine-tuned on PrimeVul outperforms all eight LLMs (0.765), so where in-distribution labels exist, a small task-specific model is the better instrument. It should be noted that nothing here is deployment-ready: at the natural 1:44 prevalence, precision is 2.3–8.2%.

Read PDF

Similar papers

#artificial intelligence Preprint Sep 2026

Metrics Failure in LLM-Based Code Vulnerability Repair: An Empirical Study and a Change-Aware Screen

Large language models (LLMs) are increasingly applied to the automated repair of C/C++ security vulnerabilities, and compile rate is a commonly reported proxy for progress: whether the generated patch compiles. We argue that compile rate is a scientifically unreliable metric for single-function vulnerability repair, an...

Om Nepal, Sushant Aryal, Oluseyi Olukola et al. · 0 citations
#machine learning Preprint Sep 2026

A Function-Level Vulnerability Score Measures Flag Rate More Than the Model: Protocol Effects on Paired Benchmarks

Language models are increasingly evaluated as vulnerability detectors, and scores reported for similar models differ widely between papers. We measured how much of that difference evaluation protocol accounts for, with model outputs held fixed. In a paired test, a model must flag a vulnerable function and clear its ver...

Maciej Cichoń, Bartłomiej Dmitruk · 0 citations
Preprint Sep 2026

Green AI: Cost of LLM-Based Code Completion

Code completion is one of the most widely used applications of large language models (LLMs) in software development. Open-weight LLMs are increasingly adopted for locally deployed code completion systems, partly due to privacy concerns. Despite advances in LLM accuracy, the energy cost of inference remains underexplore...

Negar Alizadeh, Nishant Saurabh, F. Castor · 0 citations
#artificial intelligence Conference Open access Aug 2026

Greenbench: Benchmarking Energy Efficiency and Carbon Footprint of Open-Source Llm Inference on Apple Silicon

GreenBench, a benchmarking framework that evaluates the energy efficiency, throughput, and carbon footprint of five open-source LLMs across three NLP tasks on an Apple M4 Pro with 48 GB unified memory, is presented.

R. Kannan, Rajendra P. Firke, Shreya Bengle et al. · 0 citations
#artificial intelligence Preprint Sep 2026

An Empirical Evaluation of Cost-Efficient Large Language Models on Algorithmic Programming Tasks

This study empirically evaluates whether cost-efficient Large Language Models (LLMs) can be trusted to generate enterprise code to a written specification. Three models (Gemini Flash 3, GPT-5.4 mini and Claude Haiku 4.5) were asked to solve 992 algorithmic problems as Java Spring Boot service methods conforming to a ma...

Chandimal Adikari, Nandika Herath · 0 citations
Conference Open access Sep 2026

Mapping the Efficiency Landscape of Small Language Models

This work evaluates 70+ SLMs from 2023–2025 on five task-specific benchmarks and compares them with two popular LLMs, revealing key trade-offs between energy, performance, and model selection and highlighting the need for informed, task-aware model selection rather than size-driven choices.

Fabian Reichwald, Lukas Schiesser, Christiane Plociennik et al. · 0 citations

Related blog posts

Microsoft Research Blog Oct 12, 2026

Simulating student learning for better AI tutoring

StudentSim is a research system for evaluating and improving AI tutoring tools before they are tested with learners. It models how individuals may engage with tutors, giving feedback to improve tutor performance across subjects like chess, writing, and mathematics. The post Simulating student learning for better AI tutoring appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.