Papers
Topics
Authors
Recent
Search
2000 character limit reached

T-Rex: FDR-Controlled Variable Selection

Updated 8 July 2026
  • T-Rex is a fast variable selection method for high-dimensional data that controls the false discovery rate by fusing early terminated random experiments with dummy predictors.
  • It aggregates repeated selection outcomes via a voting mechanism to maximize the detection of relevant variables while keeping false positives in check.
  • Variants like Big T-Rex and VD-T-Rex extend the framework for enhanced scalability and memory efficiency in applications such as genomics, finance, and sparse PCA.

Terminating-Random Experiments (T-Rex) is a fast variable selection method for high-dimensional data that controls a user-defined target false discovery rate (FDR) while maximizing the number of selected variables. It does so by fusing the solutions of multiple early terminated random experiments conducted on a combination of the original predictors and randomly generated dummy predictors. In the literature summarized here, T-Rex denotes both the original selector for sparse regression and a family of extensions that include sparse PCA, dependency-aware selection under general dependency structures, memory-mapped implementations for problems with millions of variables, and virtual-dummy constructions that avoid explicit dummy matrix materialization (Machkour et al., 2021, Machkour et al., 2024, Machkour et al., 2024, Scheidt et al., 2024, Koka et al., 8 Apr 2026).

1. Statistical setting and objective

T-Rex is formulated for high-dimensional variable selection, especially in regimes where the number of variables pp greatly exceeds the number of samples nn. The motivating setting is the linear model

y=Xβ+ϵ,\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},

with design matrix XRn×p\mathbf{X} \in \mathbb{R}^{n \times p} and response yRn\mathbf{y} \in \mathbb{R}^n. In this regime, scalable multivariate and high-dimensional FDR-controlling variable selection methods are required to ensure the reproducibility of discoveries, and classical FDR procedures cannot be applied to the p>np>n regime (Scheidt et al., 2024).

The target error criterion is the false discovery rate,

FDR=E[A^A1A^],\operatorname{FDR} = \mathbb{E} \left[ \frac{|\widehat{\mathcal{A}} \setminus \mathcal{A}|}{1 \vee |\widehat{\mathcal{A}}|} \right],

where A\mathcal{A} denotes the true active variables and A^\widehat{\mathcal{A}} the selected variables. The stated objective of T-Rex is to ensure that the expected proportion of false positives among discoveries does not exceed a user-defined level α\alpha, while retaining high power and scalability (Machkour et al., 2021).

This framing distinguishes T-Rex from sparsity-penalized procedures that optimize a penalty parameter without an explicit FDR target. A recurrent theme in subsequent work is that a high explained variance or a sparse model is not, by itself, synonymous with relevant information; T-Rex instead makes FDR control the central criterion for variable selection (Machkour et al., 2024).

2. Core mechanism: early terminated random experiments

The basic T-Rex construction augments the original predictor matrix with dummy predictors and repeats this randomized competition across many experiments. For each of nn0 random experiments, one generates a dummy matrix nn1 and forms an enlarged matrix

nn2

The dummies are i.i.d. synthetic null variables; in the original theory, they may be sampled from any univariate probability distribution with finite expectation and variance (Machkour et al., 2021).

A forward selection method is then run on each augmented matrix. The literature lists LARS, Lasso, Elastic Net, and related forward procedures as admissible base selectors. The selection path is terminated early after a fixed number nn3 of dummy variables have entered the model. In the nn4-th experiment, the selected real variables at that stopping time form a candidate set nn5 (Machkour et al., 2021).

Aggregation is performed by the relative occurrence statistic

nn6

which records the fraction of experiments in which variable nn7 is selected before the nn8-th dummy. Final selection uses a voting threshold nn9, typically with y=Xβ+ϵ,\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},0: y=Xβ+ϵ,\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},1 This shows that T-Rex is not a single forward-selection run but a fusion procedure over repeated dummy-augmented experiments (Machkour et al., 2021).

The same mechanism carries over to other settings. In sparse PCA, the principal components are used as responses, and T-Rex serves as the variable selector along an elastic-net path. The support of each loading vector is then defined by the same relative-occurrence and voting construction, after which a ridge step is used on the selected variables (Machkour et al., 2024).

3. FDR control, martingale arguments, and calibration

The defining theoretical claim of T-Rex is FDR control. The original paper provides a finite sample proof based on martingale theory for the FDR control property. The proof strategy uses dummy selections as observable surrogates for null behavior and constructs a conservative estimator of the false discovery proportion (FDP), written in the original development as

y=Xβ+ϵ,\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},2

where y=Xβ+ϵ,\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},3 estimates the number of nulls among the selected variables and y=Xβ+ϵ,\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},4 is the number of selections (Machkour et al., 2021).

The main asymptotic selection statement is that, for voting levels y=Xβ+ϵ,\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},5, dummy counts y=Xβ+ϵ,\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},6, and termination parameters y=Xβ+ϵ,\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},7 satisfying y=Xβ+ϵ,\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},8, one has

y=Xβ+ϵ,\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon},9

as the number of experiments XRn×p\mathbf{X} \in \mathbb{R}^{n \times p}0. The argument is based on a super-martingale and optional stopping. Subsequent work extends the same martingale logic to dependency-aware penalization schemes and to calibration procedures that jointly optimize multiple tuning parameters under the FDR constraint (Machkour et al., 2021, Machkour et al., 2024).

Calibration is central to the method. The stated procedure iteratively explores XRn×p\mathbf{X} \in \mathbb{R}^{n \times p}1, computes XRn×p\mathbf{X} \in \mathbb{R}^{n \times p}2 over a grid of XRn×p\mathbf{X} \in \mathbb{R}^{n \times p}3, and selects XRn×p\mathbf{X} \in \mathbb{R}^{n \times p}4 maximizing the number of selected variables within the FDR bound XRn×p\mathbf{X} \in \mathbb{R}^{n \times p}5. An extended calibration algorithm also optimizes over the number of dummies XRn×p\mathbf{X} \in \mathbb{R}^{n \times p}6. In the dependency-aware formulation, the graphical-model parameter XRn×p\mathbf{X} \in \mathbb{R}^{n \times p}7 is added to this optimization, yielding a fully integrated optimal calibration algorithm that concurrently determines the parameters of the graphical model and the T-Rex framework such that the FDR is controlled while maximizing the number of selected variables (Machkour et al., 2021, Machkour et al., 2024).

A distinctive theoretical property is the robustness of dummy generation: the original theory proves that the dummies can be sampled from any univariate probability distribution with finite expectation and variance. This differs from procedures that require covariance matching or model-specific null construction (Machkour et al., 2021).

4. Scaling implementations: Big T-Rex, permutation dummies, and virtual dummies

The original selector has linear computational complexity in the number of variables, but explicit dummy augmentation can become the practical bottleneck because storing XRn×p\mathbf{X} \in \mathbb{R}^{n \times p}8 large augmented matrices quickly overwhelms RAM. Big T-Rex addresses this with memory-mapped matrices, storing both the original and enlarged predictor matrices on disk rather than in RAM, and with selector serialization, which stores only a small set of state parameters for each selector instance (Scheidt et al., 2024).

Big T-Rex also introduces two dummy-permutation strategies based on a single reference dummy matrix XRn×p\mathbf{X} \in \mathbb{R}^{n \times p}9. In the dummy-permutating variant, the yRn\mathbf{y} \in \mathbb{R}^n0-th augmented design is

yRn\mathbf{y} \in \mathbb{R}^n1

with two reported strategies: S1, which shuffles rows and columns, and S2, which uses row-wise column permutations. After permutation, dummy columns are re-standardized to ensure zero mean and unit variance. The paper reports that Q-Q plots show that permuted dummy variables are statistically indistinguishable from fully generated i.i.d. matrices, that RAM allocations are reduced by a factor of up to 88, and that Big T-Rex can efficiently solve FDR-controlled Lasso-type problems with five million variables on a laptop in thirty minutes (Scheidt et al., 2024).

A later development removes dummy matrix materialization altogether. The virtual-dummy framework formalizes the information flow of forward selection through a filtration and shows that compatible selectors interact with unselected dummies solely through projections onto an adaptively evolving low-dimensional subspace. For rotationally invariant dummy distributions, the method samples these projections sequentially from their exact conditional distribution. The resulting Virtual Dummy LARS (VD-LARS) preserves the exact selection law and FDR guarantees of the T-Rex selector while reducing memory and runtime by several orders of magnitude (Koka et al., 8 Apr 2026).

Variant Implementation idea Reported property
T-Rex Explicit dummy augmentation across yRn\mathbf{y} \in \mathbb{R}^n2 experiments Linear in the number of variables
Big T-Rex Memory mapping and selector serialization Five million variables on a laptop in thirty minutes
DP Big T-Rex One reference dummy matrix with S1/S2 permutations Identical FDR and TPR curves
VD-T-Rex Sequential sampling of dummy projections Exact selection law and FDR guarantees preserved

For VD-LARS, the reported memory and time expressions are

yRn\mathbf{y} \in \mathbb{R}^n3

and per-step time is reduced from yRn\mathbf{y} \in \mathbb{R}^n4 to yRn\mathbf{y} \in \mathbb{R}^n5. The paper states that, in typical GWAS-scale applications with yRn\mathbf{y} \in \mathbb{R}^n6, this reduces dummy memory by a factor yRn\mathbf{y} \in \mathbb{R}^n7 and lowers dummy correlation computation from yRn\mathbf{y} \in \mathbb{R}^n8 to yRn\mathbf{y} \in \mathbb{R}^n9 per step (Koka et al., 8 Apr 2026).

5. Extensions to sparse PCA and dependent-variable settings

A major extension is T-Rex PCA, introduced as an alternative formulation of sparse PCA driven by the false discovery rate. The motivation is explicit: sparse PCA algorithms are usually expressed as a trade-off between explained variance and sparsity of the loading vectors, but a high explained variance is not necessarily synonymous with relevant information, and these methods are prone to select irrelevant variables. T-Rex PCA instead leverages the T-Rex selector to automatically determine an FDR-controlled support of the loading vectors, with the stated advantage that no sparsity parameter tuning is required (Machkour et al., 2024).

The construction is iterative over principal components. One computes the ordinary PCs p>np>n0, applies the T-Rex selector with elastic net as the base selector to choose the support p>np>n1 at target FDR p>np>n2, and then estimates the sparse loading by ridge regression on the selected variables: p>np>n3 The method is presented as removing the need to tune the sparsity parameter p>np>n4, because variable selection is terminated when a pre-specified number of dummies have entered rather than at a fixed penalty value (Machkour et al., 2024).

Another extension addresses highly dependent variable groups, which are common in genomics and finance. The dependency-aware T-Rex selector integrates hierarchical graphical models within the T-Rex framework and replaces the raw relative occurrence p>np>n5 with a penalized score

p>np>n6

where the penalty depends on a group p>np>n7 of associated variables. Final selection becomes

p>np>n8

The theoretical condition stated for valid group design is the monotonicity principle

p>np>n9

and martingale theory is again used to prove FDR control (Machkour et al., 2024).

These extensions preserve the central T-Rex idea: repeated dummy-augmented experiments, early stopping by dummy entry, aggregation by relative occurrence, and calibration under an explicit FDR constraint. What changes is the structure imposed on the selection problem—principal components in the unsupervised case, or hierarchical dependency groups in the dependent-variable case.

6. Empirical behavior, application domains, and software

The empirical record reported across the papers is broad. In the original selector paper, numerical simulations confirm that the FDR is controlled at the target level while allowing for high power, and the method outperforms state-of-the-art methods for FDR control in numerical experiments and on a simulated genome-wide association study, while its sequential computation time is more than two orders of magnitude lower than that of the strongest benchmark methods (Machkour et al., 2021).

In sparse PCA, numerical experiments and a stock market data example demonstrate a significant performance improvement. The reported synthetic experiments use FDR=E[A^A1A^],\operatorname{FDR} = \mathbb{E} \left[ \frac{|\widehat{\mathcal{A}} \setminus \mathcal{A}|}{1 \vee |\widehat{\mathcal{A}}|} \right],0, FDR=E[A^A1A^],\operatorname{FDR} = \mathbb{E} \left[ \frac{|\widehat{\mathcal{A}} \setminus \mathcal{A}|}{1 \vee |\widehat{\mathcal{A}}|} \right],1, a 3-factor model, and metrics including FDR, TPR, and explained variance. The paper states that T-Rex PCA empirically controls FDR at the desired FDR=E[A^A1A^],\operatorname{FDR} = \mathbb{E} \left[ \frac{|\widehat{\mathcal{A}} \setminus \mathcal{A}|}{1 \vee |\widehat{\mathcal{A}}|} \right],2 level over a wide range of SNRs and true sparsity, achieves near-optimal TPR, and recovers the signal proportion of explained variance rather than variance attributable to spurious noise variables. In the S&P 500 example, only T-Rex-based methods clearly reveal industry clusters and interpretable dependency structure in residual correlations after removing the top principal components (Machkour et al., 2024).

In dependent high-dimensional data, numerical experiments and a breast cancer survival analysis use-case demonstrate that the proposed method is the only one among the state-of-the-art benchmark methods that controls the FDR and reliably detects genes that have been previously identified to be related to breast cancer. The reported TCGA analysis involves gene expression and survival times for 1,072 breast cancer patients with about 19,400 candidate genes; at FDR=E[A^A1A^],\operatorname{FDR} = \mathbb{E} \left[ \frac{|\widehat{\mathcal{A}} \setminus \mathcal{A}|}{1 \vee |\widehat{\mathcal{A}}|} \right],3 FDR, the dependency-aware method selects 3 genes—ITM2A, SCGB2A1, and RYR2—and the paper states that these were previously validated in the literature as breast-cancer-related (Machkour et al., 2024).

At the largest scales, Big T-Rex reports that all variants—T-Rex, Big T-Rex, and DP Big T-Rex—demonstrate identical FDR and TPR curves, and virtual-dummy experiments on realistic genome-wide association study data report that VD-T-Rex controls FDR and achieves power at scales where all competing methods either fail or time out (Scheidt et al., 2024, Koka et al., 8 Apr 2026).

Software availability is a persistent feature of the T-Rex literature. The open source R package TRexSelector containing the implementation of the T-Rex selector is available on CRAN, and the original ecosystem also references tlars for LARS-based forward selection. The package is described as supporting standard and extended calibration algorithms, large-scale data, and parallel execution of random experiments (Machkour et al., 2021).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Terminating-Random Experiments (T-Rex).