Tabnetics
A Python toolkit for high-dimensional, low-sample-size (HDLSS) tabular classification. Tabnetics grew out of the review paper Machine learning on small size samples: A synthetic knowledge synthesis, which provided the library's initial theoretical background for small-sample learning. The library combines distribution-aware preprocessing, portfolio-based feature selection, and game-theoretic method aggregation into a single pipeline designed for settings where p >> n.
Homepage: tabnetics.org
pip install tabnetics
Tabnetics 2.0 installs the classical pipeline and boosted-tree backends by default. Install tabnetics[deep] for PyTorch and the official TabM and RealMLP-TD backends. The full extra also includes the TabPFN comparator.
Leakage-safe training balancing is also opt-in: install
pip install "tabnetics[balancing]" and select one of smote,
propensity_match, random_over, or random_under through
TrainingBalanceConfig. The default remains none; validation/test rows are
never resampled. See the usage guide.
Licensed under Apache 2.0.
Tabnetics depends on several third-party libraries with separate licenses and use terms. Those upstream terms still apply when you install or enable the related Tabnetics feature. Review Third-party integrations and licenses before using the packaged dependencies or the full extra.
What's new in 2.0.0
Migration from 1.6. The 2.0 API removes the Diakrino classifier, learned selectors, configuration fields and CLI flags. For existing Diakrino checkpoint workflows, install tabnetics==1.6.0 in a separate environment and follow the 1.6 usage guide. Workflows using the official TabM or RealMLP-TD adapters should install the deep extra. Tabnetics 1.6 usage guide
Classical pipeline. The default pipeline can add up to ten mRMR-JMI features after core selection, subject to the feature cap. Set DFFSConfig(fs_augmentation_ranker="") to disable these additions. This release fixes Stage-2 scoring and tie-breaking, fold-local feature lineage and selector handling for string labels. D-vine fit reuse and lower-memory HSIC Lasso are available as opt-in configurations.
What's new in 1.6.0
Grouped feature correlation and cross-fitted stacking, both opt-in. Tabnetics 1.6.0 adds a bounded-memory grouped-correlation prefilter for feature schemas with known correlated groups, preserving protected features and recording a reproducible fitted identity. It also adds cross-fitted, probability-validated stacking for eligible pipeline members, with a safe fixed-baseline fallback whenever the stacking contract cannot be met. Neither capability changes the production default profile: enable them explicitly through the relevant pipeline configuration and validate them for your data.
What's new in 1.5.0
Historical Diakrino sidecar. Tabnetics 1.5.0 introduced Diakrino (from the Greek διακρίνω, “to discern”), a roughly 279M-parameter transformer. Its joint path used up to 256 support rows to rank chunks of up to 1,024 features. The 1.x package included the opt-in sidecar under tabnetics.classification. Gated weights were distributed separately. Hugging Face model
Follow-up experiments compared its rankings with classical selectors in the same augmentation slot and tested recovery of planted signal in real HDLSS data. Neither experiment established a ranking advantage. The original integration and replay instructions now live in the 1.x archive. Diakrino campaign results
Pre-trained on EuroHPC MareNostrum 5. Part of the model was pre-trained on the EuroHPC supercomputer MareNostrum 5 at the Barcelona Supercomputing Center; see Acknowledgements.
What's new in 1.1.0
Packaged auto router, explicit opt-in. Tabnetics ships the V25 calibrated score-router inside the package. Enable it with DFFSConfig(auto_router_enabled=True) to compute training-data descriptors, predict balanced accuracy and macro-F1 for supported candidate profiles, and apply its calibrated policy before the pipeline starts. No network download is required. The default remains off until V25 passes a frozen registered-holdout campaign.
Router evidence published. The V25 router was trained with 10-fold dataset-level CV on 57 training datasets and 513 policy groups, excluding the frozen holdout IDs and using only dataset-computable descriptors. Its calibrated policy improves mean balanced accuracy by +0.0038 and macro-F1 by +0.0053 versus the current default-like candidate on the training-CV policy groups, with 124 / 513 non-default selections and 264 / 513 policy-defaulted selections. The latest available frozen-router holdout evidence predates V25 and remains labeled as context rather than claimed V25 holdout validation.
Results browser refreshed. The public interactive browser now includes an Auto Router tab with the V25 policy summary, per-dataset out-of-fold deltas, candidate selection counts, and holdout status alongside the Val-18 through Val-21 benchmark bundle.
Manual flags remain the default. DFFSConfig() keeps the router off, so explicit method/config flags remain authoritative. Router experiments must opt in with auto_router_enabled=True.
When to use Tabnetics
Tabnetics is built for tabular classification problems where the number of features greatly exceeds the number of samples:
- Transcriptomics — microarray and RNA-seq gene expression
- Proteomics and metabolomics — mass-spec feature matrices
- Other HDLSS settings — any structured tabular problem with
p >> n
In these regimes the dominant failure modes are not model selection — they are unstable preprocessing, brittle feature selection, information leakage, and inflated validation estimates. Tabnetics addresses all four.
What Tabnetics adds to the HDLSS problem is not just another selector: it turns many unstable HDLSS choices into a multiplayer portfolio game. Feature-selection methods and classifier candidates are treated as competing players, oracle scores become the payoff structure, and the resulting MNPO equilibrium is used to select a robust portfolio under small-sample constraints.
Usage guide → · Methods & references → · Benchmark results → · Tabnetics Diakrino results → · Results browser → · Announcements
Call for collaboration
We are actively looking for testers, collaborators, and co-authors to help validate Tabnetics on real-world HDLSS datasets, shape the companion article, and improve the codebase. If you work with high-dimensional tabular data — transcriptomics, proteomics, metabolomics, or similar — we would love to hear from you. See the Discussions page for ongoing conversations, or open a new thread to introduce your use case.
Citation
If you use Tabnetics in research, cite the repository for the specific version you used. The library is still under active development, and a companion paper will be published after the current testing and validation cycle is complete.
Repository URL: https://github.com/klokedm/tabnetics-public
@software{kokol_tabnetics_2026,
author = {Kokol, Marko},
title = {Tabnetics},
year = {2026},
url = {https://github.com/klokedm/tabnetics-public}
}
Benchmark results
The deprecated Val-18 through Val-21 campaigns recorded 57,217 successful runs across 278 pipeline profiles. Their primary HDLSS panel contains 63 datasets. After excluding one batch-label endpoint, the retrospective best profiles scored above, within and below the published reference bands on 29, 25 and 8 datasets respectively. The historical V21 default covered 58 eligible datasets with mean balanced accuracy 0.7806. These measurements predate the current feature-augmentation default. Historical results · Results browser
Auto router
The bundled V25 router is available as an opt-in method/config selector. When enabled, it chooses among supported, already-tested candidates using only descriptors available on a new dataset: sample and feature counts, class-balance statistics, feature-distribution summaries, complexity measures, and candidate action encodings. It does not use holdout labels, validation tiers, or dataset identity.
V25 remains opt-in. Its reported gains come from training-corpus out-of-fold predictions. The archived campaigns provide no independent V25 holdout result. See Auto Router for the model card, evidence summary, opt-in flag, and direct inspection API.
Key ideas
-
Distribution-aware preprocessing. Each feature is fitted to a parametric family (from 20+ candidates) using goodness-of-fit testing, bootstrap calibration, and L-moment prescreening. CDF-based transforms replace ad-hoc normalization.
-
Portfolio feature selection. Forty feature-selection paths are available overall, including 39 engineered selectors plus a random-baseline reference used in validation. The benchmark MNPO portfolios combine stability selectors, copula knockoffs, tree-based importance, mutual-information filters, IPSS, HSIC-Lasso, and more into a single robust HDLSS feature portfolio. MNPO builds pairwise preference matrices from multiple oracles (performance, stability, complexity, etc.) and solves for a Nash equilibrium via KL-regularized mirror descent. The multiplayer game framing draws conceptual inspiration from Wu et al.'s Multiplayer Nash Preference Optimization, though the HDLSS adaptation is a distinct contribution with different players, oracles, and data regime (see BACKGROUND.md for details).
-
Regime-aware classification. An MNPO-based classifier oracle picks from regime-appropriate pools. The HDLSS extreme pool now spans 33 candidate backends, including linear/GLM baselines, LDA/QDA families, bias-corrected HDLSS discriminants, PLS and sparse PLS variants, random-projection and random-Fourier lifts, nearest-subspace and spatial-median geometry, copula-style discriminants, confusion-pursuit, DWD / ECOC wrappers, and lightweight or full-fidelity deep-tabular models (TabM, RealMLP). The HDLSS moderate pool includes RBF SVM, GPC, KNN, and voting ensembles. Standard-regime routing can also unlock tree families such as RF, Extra Trees, XGBoost, LightGBM, and CatBoost. The base package includes the boosted-tree backends. The official TabM and RealMLP-TD adapters use the
deepextra. -
Strict validation. All learned preprocessing and selection is train-only. The HuggingFace bundle is the authoritative reproducibility mirror of the public upstream datasets used for validation. Synthetic fallback is not allowed for evidence-bearing runs.
Quick start
The quick-start path assumes the recommended expanded install above, so the broader optional selector and backend surface is already available when you need it.
from tabnetics.pipeline import DistributionFeatureSelectionPipeline, DFFSConfig
config = DFFSConfig(random_seed=42)
pipeline = DistributionFeatureSelectionPipeline(config)
result = pipeline.run(X, y, dataset_name="my_dataset", seed=42)
print(f"Accuracy: {result.accuracy:.3f}")
print(f"Selected features: {result.selected_features}")
The quick-start config uses the fixed manual defaults. To evaluate the packaged router, use DFFSConfig(auto_router_enabled=True).
Operational defaults
The packaged runtime currently follows the promoted post-review workflow:
auto_router_enabled=Falseis the default; set it toTrueto let the V25 packaged score-router choose a supported method/config profile from the training split before DF/FS/classification runs.df_stage_position="after_fs"is the default, so distribution fitting runs on the feature space that actually survives selection.- Evidence-bearing benchmark and validation runs treat the HuggingFace bundle as the authoritative reproducibility mirror of the public upstream datasets and default to
dataset_integrity_policy="error". - Conformal prediction is opt-in and should be interpreted as an uncertainty layer (coverage, prediction-set size, singleton rate), not as a balanced-accuracy optimizer.
- Training balancing is default-off. When explicitly enabled, it is fitted only on each classifier-CV training fold and final-fit training rows; held-out prevalence is untouched.
multiomics_adapter="split_halves"is a benchmark-time shortcut; real multi-omics studies should use explicit blocks withtabnetics.multiomics.
Command line workflows
Editable installs expose installed wrappers, and every wrapper has the same packaged python -m ... equivalent:
tabnetics-benchmark --datasets leukemia_golub --seeds 11 23 37
tabnetics-validation-suite --dataset-sets fs_easy --seeds 11 23 37
The corresponding module entrypoints are:
python -m tabnetics.benchmarks.clitabnetics-validation-plan/python -m tabnetics.validation.generate_planfor replaying deprecated campaign planspython -m tabnetics.validation.core.shard_runnerpython -m tabnetics.validation.suite
Selected literature anchors
The full methods table lives in BACKGROUND.md. For a quick orientation, these are the main papers behind the current public positioning:
- Kokol. Machine learning on small size samples: A synthetic knowledge synthesis — the original HDLSS review context behind the library.
- Freund & Schapire. Adaptive game playing using multiplicative weights — the mirror-descent / multiplicative-weights foundation used by the MNPO solver.
- Wu et al. Multiplayer Nash Preference Optimization — conceptual inspiration for the multiplayer Nash framing, not the solver implementation.
- Marron et al. Distance-Weighted Discrimination, Lê Cao et al. Sparse PLS discriminant analysis, and Dietterich & Bakiri Error-Correcting Output Codes — key anchors behind the expanded HDLSS classifier pool.
- Rahimi & Recht Random Features for Large-Scale Kernel Machines, Hall et al. Median-Based Classifiers for High-Dimensional Data, Tsuda Subspace classifier in the Hilbert space, and Han et al. CODA — the kernel, robust, subspace, and copula-style classifier families reflected in the current backend surface.
- Singh et al. DIABLO and Rohart et al. MINT — the reference points for explicit multi-omics integration.
- Taquet et al. MAPIE: an open-source library for distribution-free uncertainty quantification — the conformal/UQ reference behind the classifier-side uncertainty outputs.
Package structure
| Subpackage | Purpose |
|---|---|
tabnetics.auto_router |
Packaged V25 router model, dataset descriptor builder, and runtime profile application |
tabnetics.core |
MNPO game-theoretic primitives, sklearn compatibility layer, runtime configuration |
tabnetics.distribution |
Univariate distribution fitting (20+ families), bootstrap GOF, CDF-based transforms |
tabnetics.feature_selection |
30 selection methods, MNPO portfolio aggregation, copula knockoffs, stability selectors |
tabnetics.classification |
Regime-aware classifier pools, classical and specialist HDLSS backends, MNPO classifier oracle, and conformal helpers |
tabnetics.pipeline |
End-to-end DF+FS+classification pipeline with leakage prevention |
tabnetics.datasets |
Dataset registry, HuggingFace/OpenML loaders, meta-feature extraction |
tabnetics.domains |
Domain adapters (bioinformatics prefilters, face-domain projection) |
tabnetics.multiomics |
Multi-block PLS-DA (DIABLO-style) and MINT batch-correction integration |
tabnetics.benchmarks |
Benchmark runner, method-set profiles, SOTA comparison, gaming detection |
tabnetics.validation |
Validation campaign planner, shard execution, promotion gates |
Feature selection methods
The FeatureSelector supports 40 methods out of the box, including 39 engineered selectors plus a random-baseline reference path:
| Category | Methods |
|---|---|
| Stability selectors | Lasso stability, subspace stability, decorrelated stability, cluster stability, TIGRESS |
| Wrapper methods | RFECV (SVM, RF, LR), Boruta |
| Filter methods | ANOVA F-test, mutual information, mRMR, JMI, CMIM, FCBF, Wilcoxon AUC |
| Tree-based | GBDT importance, TreeSHAP, random forest |
| Knockoff methods | Copula knockoff (D-vine, FDR-controlled via e-values), derandomized knockoffs |
| Embedded | OA-Elastic Net, Joint AUC+L1, HSIC-Lasso |
| Other | IPSS, k-TSP, OVA/ECOC wrappers, Rashomon importance |
Methods are aggregated via MNPO with configurable oracle presets (minimal, perf_only, perf_complexity, full, etc.).
The opt-in fs_diversity_oracle_mode="categorical" pipeline setting
(FeatureSelector(diversity_oracle_mode="categorical"), or
OracleConfig(diversity_mode="categorical")) uses class-aligned probabilities
through inner CV, diversity scoring, and portfolio extraction. Prediction
similarity is 1 - mean(total_variation); the diversity oracle combines
0.4 * feature_overlap + 0.6 * prediction_similarity as redundancy. Extraction
uses the existing overlap and >0.90 similarity thresholds and backfill rule.
Class renaming only permutes probability columns; nominal labels have no numeric
distance. Classifiers without probabilities use one-hot predictions, and
regression retains its continuous correlation path. Fold classes absent from
training have zero columns; failed predictions have unavailable rows, not zero
probabilities. Pairwise valid-row counts and unavailable-pair counts are emitted
in oracle diagnostics; no common valid rows receives conservative similarity 1.
The benchmark CLI accepts --fs-diversity-oracle-mode categorical. Existing
defaults and all legacy modes are unchanged; legacy multiclass numeric-label
correlation/PID do not inherit this invariance guarantee. This corrects an
opt-in prediction-geometry path, not fold-local selector fitting, and is not a
validated performance/default promotion. Relevant CPU checks on a lab host:
PYTHONPATH=core/src:. python -m pytest -q core/tests/test_categorical_prediction_diversity.py core/tests/test_cv_multimodel.py.
See BACKGROUND.md for the full list of implemented papers, USING.md for detailed usage, and RESULTS.md for benchmark results.
Installation
Recommended install for the quick-start and usage-guide examples:
pip install tabnetics
Install PyTorch and the official TabM and RealMLP-TD adapters with pip install "tabnetics[deep]". For the TabPFN comparator, use the following command.
pip install "tabnetics[full]"
Requirements
- Python >= 3.11
- Plain
tabneticsprovides the classical pipeline - The
deepextra installs the official neural backends. Thefullextra includes those backends and TabPFN.
Development
git clone https://github.com/klokedm/tabnetics-public.git
cd tabnetics-public
pip install -e ".[dev]"
pytest
Acknowledgements
Part of the Tabnetics Diakrino model (see Tabnetics Diakrino results) was pre-trained on the EuroHPC supercomputer MareNostrum 5 within the scope of a EuroHPC Joint Undertaking project:
This work was granted access to the EuroHPC supercomputer MareNostrum 5, hosted by the Barcelona Supercomputing Center (BSC-CNS, Spain), through a EuroHPC AI Factory Fast Lane Access call (project EHPC-AIF-2026FL01-314, "Neural HDLSS Oracle for High-Dimensional Tabular AI"). Part of the Tabnetics Diakrino model was pre-trained on MareNostrum 5 within the scope of this EuroHPC project.
We acknowledge the EuroHPC Joint Undertaking and the Barcelona Supercomputing Center for the allocation and support.
License
Apache 2.0 — see LICENSE.
This documentation is auto-generated from internal notes and sources with the support of rule-based transformations and generative AI. Errors are possible — please report any issues via Discussions.
Metadata
Release files for tabnetics 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tabnetics-2.0.0.tar.gz | 2.4 MB | Without provenance | Details for tabnetics-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tabnetics-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for tabnetics-2.0.0-py3-none-any.whl |
Total release size: 4.3 MB
Release files / tabnetics-2.0.0.tar.gz
| Download URL | tabnetics-2.0.0.tar.gz |
|---|---|
| Size | 2.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
382307406761a2a8670034907534f24fd08e9e32e75600f6cd18980aae32f2c3
|
|
BLAKE2b-256 checksum How to use checksums |
0f91211df5a993d86e362b0ee67055dac8be617649c9031c2ea33e347336439a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / tabnetics-2.0.0-py3-none-any.whl
| Download URL | tabnetics-2.0.0-py3-none-any.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d7f5f8438b14af8230d4e0aaaa4ac847dbe4bd5c8d84c873bea9bf719c5f691
|
|
BLAKE2b-256 checksum How to use checksums |
ffdb25d610c1f043c96c314ba2ec4e025575ef0c5ac1a1739b25fcd188d85533
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Security for tabnetics 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.