Kaleidophon/deep-significance

Enabling easy statistical significance testing for deep neural networks.

What it solves

Deep learning papers often compare models by looking at single performance scores (like accuracy) from a few runs. That's unreliable because neural networks are sensitive to random seeds and hyperparameters, so a difference might just be luck. This package provides proper statistical significance tests so you can actually tell whether one model is better than another, not just by chance.

How it works

It implements several statistical tests, most notably Almost Stochastic Order (ASO), which compares two distributions of scores (e.g., from multiple runs) and returns a value epsilon_min. If epsilon_min < 0.5 (or a stricter threshold like 0.2), you can conclude model A is stochastically dominant over B. It also includes bootstrap and permutation tests, plus corrections for multiple comparisons (Bonferroni, Holm-Bonferroni) and bootstrap power analysis to decide how many runs you need. The functions accept NumPy arrays, PyTorch/TensorFlow tensors, and JAX arrays.

Who it’s for

Researchers and practitioners in machine learning who want to rigorously compare model performance across multiple runs, datasets, or models, and need to report statistical significance in papers or experiments.

Highlights

  • Implements Almost Stochastic Order (ASO), a test designed for deep learning's noisy score distributions.
  • Also provides bootstrap and permutation-randomization tests.
  • Includes Bonferroni and Holm-Bonferroni corrections for multiple comparisons.
  • Offers bootstrap power analysis to estimate required sample sizes.
  • Works with common data structures: NumPy, PyTorch, TensorFlow, JAX.
  • Fully tested and compatible with typical deep learning workflows.

Related

  • Project
  • Project
  • Project
  • Project
  • Dispatch