# Automatic Statistical Test for Rationally Expressible Algorithms by Selective Inference, with Applications to Feature Selection

arXiv: https://arxiv.org/abs/2608.04667 · HTML: https://mlsanity.com/paper/2608.04667/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 17 of its 22 references that are in the map.
- First posted on arXiv 5 Aug 2026.

## Builds on (most cited first, 17 of 17)

- [Exact post-selection inference, with application to the lasso](https://mlsanity.com/paper/1311.6238/) (2013)
- [Optimal Inference After Model Selection](https://mlsanity.com/paper/1410.2597/) (2014)
- [Exact Post-Selection Inference for Sequential Regression Procedures](https://mlsanity.com/paper/1401.3889/) (2014)
- [Selective Inference for Hierarchical Clustering](https://mlsanity.com/paper/2012.02936/) (2020)
- [Testing for a Change in Mean After Changepoint Detection](https://mlsanity.com/paper/1910.04291/) (2019)
- [More Powerful Conditional Selective Inference for Generalized Lasso by Parametric Programming](https://mlsanity.com/paper/2105.04920/) (2021)
- [Selective inference for k-means clustering](https://mlsanity.com/paper/2203.15267/) (2022)
- [Quantifying Statistical Significance of Neural Network-based Image Segmentation by Selective Inference](https://mlsanity.com/paper/2010.01823/) (2020)
- [Valid P-Value for Deep Learning-Driven Salient Region](https://mlsanity.com/paper/2301.02437/) (2023)
- [Conditional Selective Inference for Robust Regression and Outlier Detection using Piecewise-Linear Homotopy Continuation](https://mlsanity.com/paper/2104.10840/) (2021)
- [Exact Post Model Selection Inference for Marginal Screening](https://mlsanity.com/paper/1402.5596/) (2014)
- [Unifying approach to selective inference with applications to cross-validation](https://mlsanity.com/paper/1703.06559/) (2017)
- [Statistical Test for Anomaly Detections by Variational Auto-Encoders](https://mlsanity.com/paper/2402.03724/) (2024)
- [Statistical Test for Attention Map in Vision Transformer](https://mlsanity.com/paper/2401.08169/) (2024)
- [Selective inference after cross-validation](https://mlsanity.com/paper/1511.08866/) (2015)
- [Statistical Test for Feature Selection Pipelines by Selective Inference](https://mlsanity.com/paper/2406.18902/) (2024)
- [Statistical Test for Auto Feature Engineering by Selective Inference](https://mlsanity.com/paper/2410.19768/) (2024)

## Abstract (arXiv)

Selective inference (SI) provides statistically valid p-values for hypotheses selected by applying an algorithm to the data, correcting for the bias that arises when the same data are used both to select and to test a hypothesis. Developing an SI procedure for a new algorithm, however, has required an expert to derive, and then implement, the selection event, i.e., the conditions under which the hypothesis is selected. Repeating this specialized effort for every new algorithm is why exact SI has so far been available for only a narrow class. We propose AutoSI, a framework that removes this barrier in two ways. First, AutoSI constructs the selection event automatically from the algorithm's individual operations, so the user only writes the algorithm as ordinary NumPy-like code and derives nothing by hand. Second, AutoSI broadens the class of selection events SI can handle: existing exact methods are limited to selection events characterized by linear or quadratic inequalities in the data, whereas AutoSI covers any algorithm expressible through rational functions of the data (ratios of polynomials). We prove that the p-values computed by AutoSI are exactly valid in finite samples. We demonstrate AutoSI on three feature-selection methods, each written in a few dozen lines of code. One of these methods, the lasso with its tuning parameter selected by cross-validated R2, cannot be handled within existing exact SI frameworks and is made possible by AutoSI. Experiments on synthetic and real datasets show that the resulting p-values control the type I error rate (i.e., the false positive rate) at the nominal level while retaining high power.
