Beyond Accuracy: A Unified Random Matrix Theory Diagnostic Framework for Crash Classification Models

Ibne Farabi Shihab, Sanjeda Akter, Anuj SharmaarXiv 2026

TL;DR

This paper introduces a novel framework using Random Matrix Theory (RMT) to diagnose the structural health of machine learning models used for crash classification. It reveals that a model's spectral properties, specifically the power-law exponent 'a', can reliably distinguish between well-trained and overfit models, offering a more robust evaluation than traditional accuracy metrics. This spectral diagnostic is shown to correlate strongly with expert agreement and can guide model selection and early stopping, leading to safer and more reliable AI in critical applications like transportation safety.

What Problem Does This Paper Address?

In safety-critical domains like transportation, accurately classifying crash data is paramount for developing effective safety policies. While machine learning models have shown promise, a significant challenge is the "accuracy-agreement gap": models can achieve high technical accuracy on standard metrics (like F1-score or AUC) by essentially memorizing training data, leading to poor generalization and potentially dangerous misclassifications. This memorization, or overfitting, is often invisible to traditional validation metrics. Furthermore, obtaining labeled data for expert review is expensive and time-consuming. The paper addresses the need for a diagnostic tool that can assess a model's internal structural reliability, independent of labeled test data, and provide insights into its true generalization capabilities beyond mere predictive performance.

Methods

The core of the paper is a unified spectral diagnostic framework grounded in Random Matrix Theory (RMT) and Heavy-Tailed Self-Regularization (HTSR). The authors extend RMT-based spectral analysis, previously applied to neural networks, to a broader range of machine learning models. This involves defining "effective representation matrices" for various model families:

  • Deep Learning (BERT, ALBERT, Qwen2.5): Weight matrices are directly analyzed.
  • Ensembles (XGBoost, Random Forest): Out-of-fold margin increment matrices are used.
  • Parametric Models (Logistic Regression): The empirical Fisher Information Matrix is employed.
  • Partition Models (Decision Trees): Leaf routing matrices are constructed.
  • Instance-Based Models (KNN): Normalized Graph Laplacians are analyzed.

For each model, the empirical spectral density (ESD) of its representation matrix is computed. The key diagnostic is the power-law exponent 'a' that describes the tail of the ESD. Well-trained models are expected to have 'a' in the range [2, 4], while overfitting leads to 'a' < 2 or spectral collapse. The framework also detects "correlation traps" – isolated eigenvalue spikes indicating memorization of specific training data. To handle large datasets, the authors leverage randomized linear algebra techniques like Lanczos methods for efficient eigenvalue computation.

Datasets

The study utilizes two real-world crash classification datasets from Iowa DOT:

  1. Intersection Misclassification Detection (INT): This dataset comprises 173,512 crash records with narratives from 2019-2020, used to classify intersection-related crashes.
  2. Alcohol Inference Mismatch (AIM): This larger dataset contains 371,062 crash records from 2016-2022, used to identify mismatches between narrative descriptions and coded alcohol involvement.

These datasets are used for training and evaluating various models, and the INT dataset is specifically used for comparing model selection strategies against expert agreement rankings.

Key Insights and Ideas

  • Spectral Fingerprint of Overfitting: The power-law exponent 'a' from the spectral density of model representations acts as a reliable indicator of model quality. Values within [2, 4] suggest good regularization, while values below 2 or spectral collapse signal overfitting and memorization.
  • Unified Framework: The paper successfully extends RMT-based spectral diagnostics to a diverse range of classical and modern ML models, demonstrating its broad applicability beyond deep neural networks.
  • Expert Agreement Predictor: The spectral exponent 'a' shows a strong positive correlation with human expert agreement, suggesting that models with better spectral properties are more aligned with human reasoning, even if their raw accuracy is slightly lower.
  • Beyond Validation Loss: Spectral diagnostics can detect overfitting that is invisible to standard validation loss metrics, providing an earlier warning signal for potential issues.
  • Task-Agnostic Signal: The spectral quality signal appears to be consistent across different transportation safety tasks, indicating its generalizability.

Key Results

  • Model Separation: Well-regularized models consistently yielded 'a' values within [2, 4] (mean 2.87 ± 0.34) across tasks and families, while overfit variants showed 'a' < 2 or spectral collapse.
  • Correlation with Expert Agreement: A strong rank correlation (Spearman ρ = 0.89, p < 0.001) was observed between the spectral exponent 'a' and expert agreement (Cohen's κ).
  • Improved Model Selection: A spectral composite score, incorporating 'a' and trap counts, significantly outperformed F1-only or validation loss rankings in predicting expert agreement (Kendall's τ = 0.79 vs. 0.50 and 0.43).
  • Early Stopping: Spectral early stopping (triggering when 'a' < 2.0) provided comparable or better F1 scores than validation loss early stopping, often resulting in models with higher 'a' and expert agreement.
  • Computational Efficiency: Randomized Lanczos approximations make the framework scalable to large datasets, with spectral extraction overhead being modest (e.g., <12% for KNN).

Limitations and Future Work

The authors acknowledge several limitations:

  • Optimal 'a' Range Calibration: The [2, 4] range for 'a' is empirically derived and might require domain-specific calibration for other tasks (e.g., severity prediction, pedestrian crash detection).
  • Novel Mapping Validation: While promising, the spectral mappings for Logistic Regression, Decision Trees, and KNN are novel and require validation on additional datasets. The KNN mapping showed a marginal KS p-value on one task.
  • Limited Sample Size for Correlation: The α-κ correlation was computed on 15 model-regime pairs, and while bootstrap confidence intervals were reasonable, further validation is needed.
  • XGBoost Extension: The XGBoost extension relies on a preprint, and the spectral early stopping was evaluated on only three model families.

Future work includes validating the novel mappings on more datasets, extending the framework to other crash prediction tasks (severity, pedestrian detection), and investigating the correlation of 'a' with model fairness across demographic subgroups. The authors recommend practitioners track 'a' alongside validation loss, use spectral audits for pre-deployment model checks, and employ the composite spectral score for model selection when expert agreement data is available.

Summary updated

BibTeX
@misc{shihab2026beyond,
  author = {Ibne Farabi Shihab and Sanjeda Akter and Anuj Sharma},
  title = {{Beyond Accuracy: A Unified Random Matrix Theory Diagnostic Framework for Crash Classification Models}},
  year = {2026},
  eprint = {2602.19528},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.19528},
}
Figure