NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning to Audit ML Models with Mental Models

Yao Rong, Vaibhav UnhelkarNeurIPS 2026

TL;DR

Auditing machine learning models for blind spots and spurious shortcuts usually requires domain experts to painstakingly poke at a model sample-by-sample—a manual bottleneck that simply doesn't scale. In this paper, researchers introduce RLAuditor, a reinforcement learning agent that mimics how humans intuitively build a "mental model" of a system to hunt down bugs. It uncovers hidden flaws across vision, text, and reasoning models far faster than static ranking methods, and helps human auditors write better reports in less time.

What Problem Does This Paper Address?

When you fine-tune a pre-trained ML model for a specific downstream application—say, reading chest X-rays—you have to run an application audit before deploying it. You aren't just looking for Level 1 errors (wrong predictions). You are also hunting for Level 2 errors: sneaky cases where the model gets the right answer for the wrong reasons, like relying on prohibited or spurious background features.

Right now, application developers and domain experts mostly do this by hand. They query the model, inspect its predictions alongside feature-attribution explanations (like heatmaps), build an intuition of how the model thinks, and guess what test sample to check next. Meanwhile, existing automated auditing tools typically score the entire dataset in a single, static pass. They miss the inherently sequential, adaptive nature of human investigation: explore a few samples to learn the model's quirks, then exploit that knowledge to corner its mistakes.

Figure 1: Application auditing is a proce- dure for acquiring accurate knowledge of the model (blue) to identify errors (orange).

Methods

The authors reframe auditing as a sequential decision-making game—specifically, a Markov Decision Process (MDP)—and train a standard Deep Q-Network (DQN) to play it.

What’s novel here is how they design the agent’s state—its running "mental model" of the system under audit. Without storing past data points, RLAuditor maintains a compact, dynamically updated summary of everything it has seen so far across each predicted class:

  1. Prediction confidence ($\phi_{\text{class}}$): Running averages of the model's output logits, capturing which classes the model tends to confuse.
  2. Feature usage ($\phi_{\text{explanation}}$): Running averages of explanation-masked feature embeddings, capturing what the model looks at when predicting a given class.
  3. Sample counts ($n$): How many times each class has been predicted so far.

At each step, the agent uses this state to pick the next test input from a pool. During training, a human-in-the-loop (or ground-truth label) gives a binary reward: 1 if the chosen sample exposes a Level 1 or Level 2 error, and 0 otherwise. Once trained, RLAuditor deploys completely autonomously—requiring no ground-truth labels to flag suspicious samples.

Datasets

RLAuditor is evaluated across five benchmark datasets spanning tabular, image, text, and LLM reasoning tasks, plus a sixth dataset for a human study:

  • SynTab & SynImg: Two synthetic tabular and shape-image datasets designed by the authors to test controlled feature misuse alongside existing benchmarks.
  • VinDr-CXR: Real-world chest X-ray images for medical diagnosis.
  • e-SNLI: Natural language inference pairs with token-level explanations.
  • MATH: Challenging mathematical problems used to audit the chain-of-thought reasoning (serving as the explanation) of DeepSeek-R1.
  • Snips: A 7-class user-intent text dataset used to audit a fine-tuned BERT variant in the human subject study.

Key Insights and Ideas

  • The MDP state is literally a Bayesian mental model: The authors prove mathematically that under standard Gaussian assumptions, RLAuditor's running-average state update is exact online Bayesian belief revision. Early observations shift the agent's beliefs dramatically; later ones refine it.
  • Why rare bugs are hard to catch: Theoretical convergence bounds show that the mental model's accuracy is bottlenecked by the least-observed class ($m_{\text{min}}$). This neatly formalizes a classic headache for human auditors: you can't confidently spot failure modes in rare classes you barely see.
  • Sequential beats static: Scoring every data point once (like supervised baselines or active learning) misses the big picture. Conditioning the next query on an evolving summary of model behavior is vastly better at smoking out subtle Level 2 feature misuse.
  • Explanations are the secret sauce: Both ablation studies on RLAuditor and surveys of human participants (75% of whom relied heavily on highlighted tokens) confirm that feature explanations are vital for diagnosing why a model fails.

Key Results

Across strict query budgets, RLAuditor consistently beats random sampling, supervised Deep Neural Networks (DNN), Active Learning (AL), and prior automated auditors (LOA and XAudit):

Auditing scores on SynTab, SynImg, and VinDr-CXR. Blue segments highlight Level 2 (feature misuse) errors; total errors are listed on top.
  • Medical Imaging (VinDr-CXR): Given a 1,000-sample budget, RLAuditor uncovers 885.5 total errors (including 163.1 Level 2 errors), nearly doubling Active Learning's 490.0 total (67.0 Level 2) and beating prior automated tool LOA (729.6).
  • Auditing LLM Reasoning (MATH): With a tiny budget of 20 queries, RLAuditor catches 20.0 errors in DeepSeek-R1—13.0 of which are pure Level 2 reasoning flaws, compared to just 2.6 for the supervised DNN and 2.8 for LOA.
  • Human-AI Collaboration: In a user study ($N=12$ ML-literate participants), auditors given RLAuditor's suggested samples finished faster (32m26s vs. 37m55s), identified misclassifications more accurately (0.74 vs. 0.52), and uncovered nearly 4x as many feature-usage issues per class (2.14 vs. 0.57).

Limitations and Future Work

RLAuditor isn't magic: its performance drops on error types that were completely absent during training, and it cannot guarantee coverage of classes it never samples. It also loses its edge when the audit budget is huge (where brute force catches up) or when model errors aren't reflected in the explanations at all. For future work, the authors suggest designing richer yet tractable state representations for massive reasoning models, moving beyond binary 0/1 rewards to graded severity scores, and allowing the agent to update online directly from human auditing trajectories.

Summary updated

BibTeX
@inproceedings{rong2026learning,
  author = {Yao Rong and Vaibhav Unhelkar},
  title = {{Learning to Audit ML Models with Mental Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=2vhiHLMdzi},
}
Figure