NeurIPS 2026QuestionsPapersAreasAboutMarkdown

RustMizan: A Compilable, Contamination-Aware Benchmarking Framework for Rust Vulnerabilities

Tarek Elsayed, Shiping Yang, Eunsong Koh, Sanika Goyal, Vincent Huang, Paul Ngo, Nathan Young, Mohammad Omidvar Tehrani, Alvyn Kang, Arnell Kang, Zeyu Chen, Angelica Moreira, Xuan Feng, Angel Chang, Nick Sumner, Steven Y Ko

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: AI Safety, Security & Alignment › Agent Security Benchmarks · Type: benchmark or dataset · Keywords: Rust vulnerability analysis, benchmarking framework, LLM agents, code compilation, contamination testing

Areas: Code & Coding Agents › Code Verification › Coding agent benchmarks; Safety & Security › Cybersecurity › Vulnerability Detection; Evaluation & Benchmarks › Language Model and Agent Safety › Agent Security Benchmarks; Benchmarks for LLMs & Agents › Agent Trustworthiness Benchmarks › Agent Security Benchmarks

Summary

RustMizan is a compilable, contamination-aware benchmarking framework for Rust vulnerability analysis that provides multi-level code variants, detailed annotations, and mutation testing to robustly evaluate LLM agents.

Explained to a 5-year-old

People use computer helpers to find security holes in code. The helpers need tests that look like real code that can actually be compiled. This new test set gives many small pieces of code that are marked as safe or unsafe. It also makes fake changes to the code to see if the helpers get confused. The results show the helpers are good at spotting problems but not so good at pointing to the exact line.

Explained to a 5-year-old, longer

When we write computer programs, we want them to be safe and not have bugs that can be exploited. To check for these bugs, people sometimes use AI assistants that look at the code. However, the tests they use are often just tiny pieces of code that cannot even be compiled. This makes it hard to know if the AI really understands real-world code. The paper introduces a new testing framework that provides real Rust code snippets that can actually be compiled. These snippets come in different sizes: whole crates, whole files, and even just functions. Each snippet is labeled to show whether it has a security vulnerability, what type of vulnerability it is, and exactly where the problem is located. The framework also creates mutated versions of the code that keep the same behavior but change the vulnerability status. This helps test whether the AI can detect vulnerabilities even when the training data might have seen the code before. The researchers tested several state-of-the-art AI models that can run commands on the computer. The models were fairly good at telling if a piece of code was vulnerable, getting right answers about 56- 65% of the time. However, they struggled to pinpoint the exact line where the bug occurs, only getting about 20% accuracy on that task.

For a technical reader

The paper presents RustMizan, a benchmarking framework designed for evaluating LLM agents that analyze Rust code for security vulnerabilities. It supplies compilable code samples at the crate, file, and function levels, each annotated with vulnerability labels, CWE classifications, and precise location information. A paired mutation module generates semantically equivalent code variants to test robustness against contamination from training data. Empirical results on four leading models show binary detection rates of 56-65%, while line-level localization remains around 20% and drops by roughly 27% under adversarial mutation. RustMizan thus fills a gap between synthetic benchmarks and real-world code, offering a more realistic assessment platform for security-focused AI agents.

Problem

Existing benchmarks for vulnerability analysis often use small, non-compilable code snippets and only perform binary classification, ignoring the risk that training data may leak into model outputs.

Method

The approach provides compilable Rust code variants at multiple granularities, annotates them for binary vulnerability detection, CWE classification, and fine-grained localization, and includes a paired mutation mechanism that generates semantics-preserving mutants for contamination and robustness testing.

Results

Binary classification achieves 56-65% accuracy, line localization F1 remains around 20%, and adversarial contamination reduces line localization F1 by roughly 27%.

Contributions

The work introduces a comprehensive, compilable benchmark for Rust vulnerability analysis that supports binary detection, CWE classification, and fine-grained localization, and provides a mutation framework for contamination-aware robustness evaluation.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction