NeuroTabular
Neural networks for tabular data, with automatic preprocessing and a scikit-learn-style API.
NeuroTabular uses PyTorch to train neural models for binary classification, multiclass classification, and single-output regression on pandas DataFrames. It handles numerical and categorical columns, missing values, and reusable training-only preprocessing inside the estimator.
Install
python -m pip install neurotabular
Use a supported Python 3.11–3.14 environment for the usual installation path.
This command installs the version currently available on PyPI; release source
version 2.0.0 is not proof that 2.0.0 has already been published.
See installation details for
supported runtime combinations and alternatives.
Quick start
Binary classification with a real dataset:
from sklearn.datasets import load_breast_cancer
from neurotabular import NeuroTabularClassifier
X, y = load_breast_cancer(return_X_y=True, as_frame=True)
model = NeuroTabularClassifier(random_state=42, max_epochs=10)
model.fit(X, y)
labels = model.predict(X.iloc[:5])
probabilities = model.predict_proba(X.iloc[:5])
For mixed numeric/categorical data, missing values, and unseen categories, see the complete mixed-data example. These snippets demonstrate usage, not model quality; evaluate on a separate held-out test set.
Multiclass classification uses the same estimator, without a task parameter:
from sklearn.datasets import load_iris
from neurotabular import NeuroTabularClassifier
X, y = load_iris(return_X_y=True, as_frame=True)
clf = NeuroTabularClassifier().fit(X, y)
probabilities = clf.predict_proba(X) # shape (150, 3), columns follow clf.classes_
labels = clf.predict(X)
Regression:
from sklearn.datasets import load_diabetes
from neurotabular import NeuroTabularRegressor
X, y = load_diabetes(return_X_y=True, as_frame=True)
reg = NeuroTabularRegressor().fit(X, y)
prediction = reg.predict(X) # original target units, shape (442,)
These examples demonstrate the API; evaluate quality on a separate test set.
Integer-coded categorical columns should be named explicitly:
model = NeuroTabularClassifier(categorical_features=["postal_code"])
For a user-controlled holdout:
model.fit(X_train, y_train, eval_set=(X_valid, y_valid))
Preprocessing is fitted only on the training rows. Categories and numerical statistics from an external validation frame never enter the learned training preprocessor.
Highlights
- retain CPU prediction-path overhead reductions from 0.3.1;
NeuroTabularClassifierautomatically handles binary and multiclass targets;NeuroTabularRegressorlearns a continuous target and predicts in original units;- automatic numerical, object, string, categorical, and boolean handling;
- training-only median imputation, standard scaling, missing indicators, categorical vocabularies, rare buckets, quantile knots, and log-frequency side features;
- declared-but-unobserved pandas
Categoricallevels remain truly unseen; - adaptive categorical embedding widths with a compact aggregate width budget;
- scalar numerical inputs by default, with affine, periodic, and piecewise representations available explicitly for experiments;
- compact residual MLP backbone with optional lightweight input gating;
- AdamW, cosine learning-rate scheduling, automatic batching, deterministic validation, early stopping, and strict best-checkpoint restoration;
sample_weightacross all tasks andclass_weight="balanced"for classification, with zero-weight rows ignored before target discovery, splitting, and preprocessing;- transactional re-fitting: a failed refit preserves a previously fitted model;
- caller Python, NumPy, and PyTorch CPU RNG states are restored after fitting;
- explicit checks for unsafe float32 conversion, overflowing numerical training statistics, complex-valued inputs and complex sample weights;
- CPU/CUDA device diagnostics, synchronized CUDA usability probing, and AMP only on compatible CUDA hardware;
- scikit-learn cloning, pipelines, and cross-validation compatibility;
- pickle/joblib round trips validated in fresh processes for all three tasks;
- conventional Python 3.11–3.14 coverage and Python 3.10 legacy compatibility;
- Linux CPU software checks, historical Windows 11 Sandbox qualification, installed-artifact checks, and exact-version CI requirements; see the support scope.
The default configuration is intentionally conservative: scalar numerical representation, categorical frequency features enabled, no feature gate, and no full-data refit. Experimental research ideas are not enabled by default without broader evidence.
Environments, development and dependencies
The installation command above uses the currently published PyPI release. For notebooks, pinned legacy versions, development checkouts, and nonstandard Python environments, use the following guidance.
In a fresh Kaggle or Colab notebook using a supported Python runtime:
!pip install neurotabular
from neurotabular import NeuroTabularClassifier
The historical 1.0.2 audit tested exact CPython 3.13.15, including normal
PyPI dependency resolution. It has not been executed inside Kaggle or Colab.
When reproducing the published baseline, install neurotabular==1.0.3 and check
that neurotabular.__version__ is 1.0.3. A development checkout can retain
different version metadata; see Status before installing from source.
Check neurotabular.__version__ after installation. Restart an existing notebook
session if it already imported another version.
Python 3.10 works in the tested legacy stack but is upstream EOL. Python 3.15 passes the full Linux CPU code suite using the official PyTorch CPU channel; ordinary PyPI installation is currently limited by missing Torch wheels. If you need 3.15, install Torch using its documented channel before NeuroTabular:
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
python -m pip install neurotabular
This is an explicit alternative installation path. CPython 3.11–3.14 is preferred for the ordinary one-command experience. The upstream distribution gap has no promised resolution date. See the PyTorch 2.14 announcement.
An initial host Windows audit was blocked by Application Control; subsequent native Windows 11 Sandbox qualification passed in its pinned CPython 3.12 x64 environment without disabling protections. That does not certify every Windows configuration. CI coverage and local-host validation are distinct; macOS is not locally validated. Physical NVIDIA CUDA remains best effort and unvalidated. The support scope records the environments and limits of executed evidence.
From a local checkout:
python -m venv .venv
Activate that environment before installing (choose the command for your shell):
source .venv/bin/activate # Linux/macOS bash
.\.venv\Scripts\Activate.ps1 # Windows PowerShell
Then use its Python:
python -m pip install --upgrade pip
python -m pip install -e .
If your shell prevents activation, use .venv/bin/python on Linux/macOS or
.\.venv\Scripts\python.exe on Windows in place of python; no policy change
is needed. Confirm python -c "import neurotabular; print(neurotabular.__version__)".
For development and verification:
python -m pip install -e ".[dev]"
python -m ruff check .
python -m ruff format --check .
python -m pytest -W error
Runtime requirements are NumPy 1.24+, pandas 2.0+, scikit-learn 1.3+, and PyTorch 2.0+. Pip also resolves Python-specific joblib floors for stdlib, caching and parallel-worker compatibility. LightGBM and CatBoost are optional benchmark-only comparisons and are not runtime dependencies.
Optional representations
The release default should be the starting point. Alternatives are explicit:
affine = NeuroTabularClassifier(numerical_embedding="affine")
piecewise = NeuroTabularClassifier(numerical_embedding="piecewise")
gated = NeuroTabularClassifier(feature_gating=True)
periodic and piecewise numerical embeddings are implemented and tested but
were not selected as defaults in the internal ablation suite. Likewise,
full_data_refit=True retrains on all primary rows for the selected number of
epochs; it remains opt-in because its quality/cost trade-off was not consistently
better in development experiments.
Validation, metrics, and weights
Without eval_set, NeuroTabular creates a deterministic validation split,
stratified for classification and shuffled without stratification for regression.
Classifier eval_metric accepts "loss" and "accuracy"; "roc_auc" is
binary-only. Regressor metrics are "loss" (MSE), "rmse", "mae", and "r2".
Loss is the default for every task. The strictly best observed model state is
restored after early stopping; min_delta controls patience rather than blocking
restoration of a smaller strict improvement.
Use class_weight="balanced" for inverse-frequency class weighting or pass
non-negative per-row sample_weight values to fit. If both are supplied for
classification, their effects are multiplied. Rows with zero effective sample
weight are ignored before target validation and preprocessing.
Regression uses train-only weighted population mean and standard deviation for the target, with MSE on the standardized scale and an automatic inverse transform at prediction. A constant training target produces the exact constant. See the API reference for task-specific details.
Persistence
Pickle and joblib round trips are tested in fresh processes for binary, multiclass, and regression models. Use matching package/dependency versions when loading persisted models; cross-version and cross-device persistence compatibility is not guaranteed. Only load trusted pickle/joblib artifacts. See the usage guide.
Devices and performance
device="auto" performs a real synchronized CUDA kernel probe. It falls back to
CPU with a diagnostic warning if CUDA is reported but unusable. An explicit CUDA
request fails with diagnostic details instead of silently changing devices.
Training data is converted once and kept on the selected device, batches are formed with index tensors, and inference is batched. AMP is enabled only after a compatible CUDA probe. CPU execution uses a plain null context when AMP is disabled.
For the 0.3.1 patch, the internal P35 CPU/WSL software panel measured median
latency reductions of about 31% for predict and 36% for predict_proba versus
the 0.3.0 path, with bit-for-bit outputs on the frozen equivalence checks. These
figures are hardware- and workload-specific; see
0.3.1 performance validation.
The frozen 0.3 development benchmark contains 330 fits across 22 task/dataset
cases and three seeds, comparing NeuroTabular with four fixed tree recipes. Mean
binary ROC-AUC is 0.8461, multiclass accuracy is 0.8275, and regression R² is
0.5320. These are workload-specific engineering measurements, not a claim of
universal superiority. See 0.3 benchmark evidence for
scope, exact aggregates, comparisons, and known failure cases. Historical 0.2
binary measurements remain in BENCHMARK_REPORT.md.
scikit-learn use
from sklearn.base import clone
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import cross_val_score
from neurotabular import NeuroTabularClassifier
X, y = load_breast_cancer(return_X_y=True, as_frame=True)
base = NeuroTabularClassifier(max_epochs=10, random_state=7)
copy = clone(base)
scores = cross_val_score(copy, X, y, cv=3, scoring="roc_auc")
For a complete DataFrame-preserving Pipeline, CV and small grid-search example,
run python examples/pipeline_workflow.py from the local development checkout.
Input to fitting and prediction must be a pandas DataFrame with unique column names. Prediction may reorder columns by learned schema, but missing or unexpected columns are rejected rather than guessed.
Documentation
Maintenance policies and stable scope
The stable 1.0 API follows the API maintenance, deprecation, persistence, warning and versioning policies. The reviewed 1.0 API boundary is the stable public contract; items explicitly classified as experimental or internal remain outside that guarantee. Support scope documents the validated Linux Python 3.11–3.14 CPU matrix, 3.10 legacy support and remaining evidence limits. CUDA remains optional best effort with physical NVIDIA validation pending; macOS remains outside the validated support scope. Historical reference models and private validation evidence are not packaged. See the canonical policy index for sources of truth.
Complete mixed-data workflows
Run the same executable example for each supported task:
python examples/mixed_dataframe_workflow.py --task binary
python examples/mixed_dataframe_workflow.py --task multiclass
python examples/mixed_dataframe_workflow.py --task regression
It includes a train/test split, nullable and categorical features, missing and
unseen values, reordered prediction columns and scores. Add --output-dir ./models
for a same-runtime joblib round-trip and optional metadata JSON. The small
synthetic examples demonstrate usage; they are not benchmark results or tuning
recommendations. See usage.
NeuroTabular 1.0.2 includes the optional input_schema_ diagnostic. The
examples exercise the stable task APIs while keeping diagnostic-only fields
outside the core prediction contract.
- Usage guide
- API reference
- Minimal reproducer and safe environment report
- 0.3 benchmark evidence
- 0.3.1 performance validation
- 0.3 architecture overview
- Historical 0.2 benchmark report
- Historical 0.2 performance profile
- Historical 0.2 ablation report
- Research notes
- Release notes
- Publishing guide
Other tabular research
NeuroTabular is an independent neural approach. The author's separate CodAdapt project investigates adaptive coded memory and compact lookup-based inference; MorphTree investigates the evolution of tree-learning rules. They are separate research lines, not NeuroTabular dependencies or evidence of its predictive performance.
Limitations
- pandas DataFrame input only;
- single-output targets; no multilabel, multioutput regression, or calibrated-probability API;
- multiclass ROC-AUC is not an early-stopping metric; use loss or accuracy;
- credit-g and Titanic show weaker binary results and split sensitivity;
- car can collapse to its majority class; yeast/glass have weak rare-class coverage;
- quake has negative R² and triazines is weak and split-sensitive; see the benchmark limitations;
- no claim of state-of-the-art accuracy or tree-model superiority;
- internal validation reduces the rows used for the selected model unless optional full-data refit is enabled;
- the embedding-width budget is not a byte-level RAM/VRAM cap; very high-cardinality categoricals can still increase model size substantially;
- concurrent
fitcalls in the same process are not guaranteed thread-safe because fitting temporarily controls process-global RNG state; - performance and memory measurements are hardware- and workload-specific;
- CUDA behavior is covered by fallback/probe regression tests, but physical GPU validation was not completed for this release.
Status
Version 2.0.0 consolidates the stable neural product and its maintenance policies. The major number reflects the maintainer's maturity milestone; it does not establish a new predictive architecture, a general accuracy gain, or a universal training-speed or RAM improvement. The public API and defaults retain their 1.x behavior. Invalid complex-valued numerical inputs are rejected before lossy conversion, including when mixed with pandas nullable columns. Conservative preprocessing and inference optimizations already present in 1.0.3 are retained; those historical gains must not be presented as newly measured 2.0 accelerations. See release notes, support scope, API boundary, and target contract.
The longer-term scientific goal is a distinct neural tabular method with stronger accuracy and generalization at lower end-to-end training, inference, and memory costs. These are research objectives, not demonstrated advantages of this release. The canonical vision and contributor-agent instructions document that direction; private research prototypes are not included in the stable distribution.
These are the NeuroTabular 2.0.0 release sources. Published 1.0.3 artifacts and earlier tags remain immutable historical baselines. Version 2.0 consolidates the product and its validation; it does not introduce a new predictive architecture or establish general accuracy, training-speed or RAM gains.
Dedicated native Linux/Windows performance qualification of the additional complex-plus-nullable validation remains incomplete. The maintainer explicitly approved proceeding without making that qualification a prerequisite for this release, accepting the unquantified performance risk. Historical inconclusive results remain unchanged; this decision is not a performance PASS or independent certification. Functional tests and exact-commit release CI remain mandatory.
Registry availability is determined by the actual published artifacts, not this source version. Release actions require separate maintainer authorization and the exact-source checks described in publishing. Current capabilities and limitations remain distinct from the research vision.
License
NeuroTabular is created by Luca Lullo and released under the MIT License. Dependency notices are in THIRD_PARTY_NOTICES.md. See LEGAL.md for the project's legal/naming note.
Author
Created by Luca Lullo.
Metadata
Release files for neurotabular 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 |
|---|---|---|---|---|
| neurotabular-2.0.0.tar.gz | 164.4 kB | With provenance | Details for neurotabular-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neurotabular-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for neurotabular-2.0.0-py3-none-any.whl |
Total release size: 207.0 kB
Release files / neurotabular-2.0.0.tar.gz
| Download URL | neurotabular-2.0.0.tar.gz |
|---|---|
| Size | 164.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12d4956d251e947abbcb61a3930f5ff2b9236d834947f8403513e2ae248e0614
|
|
BLAKE2b-256 checksum How to use checksums |
71968eec0eb016002585c46b7580c2eb0c533e84af0c08dc5eaa21fc0c8c7804
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / neurotabular-2.0.0-py3-none-any.whl
| Download URL | neurotabular-2.0.0-py3-none-any.whl |
|---|---|
| Size | 42.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebd24d39c34916784e6306567bf1d3ada5ba127a0e86f461fa1689d28e575c9f
|
|
BLAKE2b-256 checksum How to use checksums |
a50e2e3d4a18f0828af24c90c81274655549f33e92ad5302b6701901185b61a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logSecurity for neurotabular 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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for neurotabular-2.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logA 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.