Skip to content
Proyek

Tentang

Toolkit dan benchmark komprehensif untuk pembelajaran data tabular, yang mencakup lebih dari 35 metode deep learning, lebih dari 10 metode klasik, dan 300 dataset tabular yang beragam.

AI dan pembelajaran mesin

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
+3
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

GitHub stars Latest commit
PyTorch - Version Python - Version Documentation Status MIT license

TALENT: A Tabular Analytics and Learning Toolbox

[Paper] [中文解读] [Docs]


🎉 Introduction

Welcome to TALENT, a benchmark with a comprehensive machine learning toolbox designed to enhance model performance on tabular data. TALENT integrates advanced deep learning models, classical algorithms, and efficient hyperparameter tuning, offering robust preprocessing capabilities to optimize learning from tabular datasets. The toolbox is user-friendly and adaptable, catering to both novice and expert data scientists.

TALENT offers the following advantages:

  • Diverse Methods: Includes various classical methods, tree-based methods, and the latest popular deep learning methods.
  • Extensive Dataset Collection: Equipped with 300 datasets, covering a wide range of task types, size distributions, and dataset domains.
  • Customizability: Easily allows the addition of datasets and methods.
  • Versatile Support: Supports diverse normalization, encoding, and metrics.

📚Citing TALENT

If you use any content of this repo for your work, please cite the following bib entries:

@article{ye2024closerlookdeeplearning,
         title={A Closer Look at Deep Learning on Tabular Data}, 
         author={Han-Jia Ye and 
         		 Si-Yang Liu and 
         		 Hao-Run Cai and 
         		 Qi-Le Zhou and 
         		 De-Chuan Zhan},
         journal={arXiv preprint arXiv:2407.00956},
         year={2024}
}

@article{JMLR:v26:25-0512,
  author  = {Si-Yang Liu and
			 Hao-Run Cai and
 			 Qi-Le Zhou and
			 Huai-Hong Yin and
			 Tao Zhou and
			 Jun-Peng Jiang and
			 Han-Jia Ye},
  title   = {Talent: A Tabular Analytics and Learning Toolbox},
  journal = {Journal of Machine Learning Research},
  year    = {2025},
  volume  = {26},
  number  = {226},
  pages   = {1--16},
  url     = {http://jmlr.org/papers/v26/25-0512.html}
}

📰 What's New

  • [2026-12] The TALENT Leaderboard is live. Explore benchmark results for tabular classification and regression.

  • [2026-12] Updated the training-row defaults for TabPFN v2.5 and Mitra-v2, kept the standard single-split workflow independent of CV, and improved compatibility with newer NumPy and scikit-learn versions.

  • [2026-11] Added opt-in cross-validation, cross-fold Optuna tuning and resumable studies, and separate fit, search, and prediction timing. Added Seldon, Seldon-mini, Inpriora, LimiX-2-1016, TabDPT 1.3, and explicit Causilo 1.0 and 1.5 entries. Fixed GrowNet's classification training.

  • [2026-10]🌟 Add the September 2026 wave of tabular foundation models: TabPFN-3.5, LimiX-2, NVIDIA Kumo Tabular, Mitra-v2, Causilo, Xiaomi-TabLDM and EXAONE-Tabular. The new adapters document their weight sources and supported options; tabpfn_v3 now pins the TabPFN-3 checkpoint (tabpfn>=9.0 changed the package default to TabPFN-3.5).

  • [2026-08]🌟 Add TRC (TPAMI 2026), a post-hoc representation corrector that trains and freezes an FT-Transformer backbone before learning representation re-estimation and light-space mapping.

  • [2026-07]🌟 Add TabFM (Google Research, zero-shot tabular foundation model) as an optional method via pip install -U "tabfm[pytorch]".

  • [2026-06]🌟 Add TabPFN v2.5 (PriorLabs, Nov 2025) and TabDPT (Layer 6 AI, ICL + retrieval). TALENT now ships the full TabPFN family (v1, v2, v2.5, v3) plus TabDPT alongside the other tabular foundation models.

  • [2026-06]🌟 Evaluation improvements: calibration metrics (Brier, ECE) are now reported by default for every classifier, decision thresholds are tuned on the validation set for binary classification (used for Accuracy/F1/Precision/Recall; threshold-independent metrics like AUC/LogLoss/Brier/ECE are unaffected), and RunResult exposes a uniform predict_proba/predict_labels interface regardless of whether the underlying method natively returns logits or probabilities. Bundled checkpoints are now resolved via importlib.resources so methods work from any working directory.

  • [2026-05]🌟 Add TabPFN v3 (PriorLabs 2026) and TabICL v2 (ICML 2026, regression support added).

  • [2026-03]🌟 We have updated the TALENT-extension datasets and results. Link

  • [2025-11]🌟 Add RFM (Science).

  • [2025-11]🌟 Add Real-TabPFN.

  • [2025-11]🌟 Add LimiX.

  • [2025-09]🌟 Add xRFM.

  • [2025-08]🌟 Add Mitra.

  • [2025-06]🌟 Add TabAutoPNPNet (Electronics 2025).

  • [2025-06]🌟 Add TabICL (ICML 2025). The current code is based on TabICL v0.1.2.

  • [2025-05]🌟 Check out our three papers MMTU, Tabular-Temporal-Shift, and BETA accepted at ICML 2025!

  • [2025-04]🌟 Check out our new survey Representation Learning for Tabular Data: A Comprehensive Survey (Repo). We organize existing methods into three main categories according to their generalization capabilities: specialized, transferable, and general models, which provides a comprehensive taxonomy for deep tabular representation methods.🚀🚀🚀

  • [2025-02]🌟 Add T2Gformer (AAAI 2023).

  • [2025-02]🌟 Add TabPFN v2 (Nature).

  • [2025-02]🌟 Thanks to Hengzhe Zhang for providing a Scikit-Learn compatible wrapper for TALENT!

  • [2025-01]🌟 Check out our new baseline ModernNCA (ICLR 2025), inspired by traditional Neighbor Component Analysis, which outperforms both tree-based and other deep tabular models, while also reducing training time and model size!🚀🚀🚀

  • [2025-01]🌟 Check out our latest version of the benchmark paper for updated and expanded results and analysis!

  • [2025-01]🌟We have curated and released new benchmark datasets, along with updated results of the dataset across a broader range of methods. This update focuses on enhancing dataset quality, including removing duplicates, and correcting tasks where bin-class was mistakenly treated as regression. We have also separated the larger datasets and formed the basic benchmark (300 datasets, including 120 bin-class, 80 multi-class, and 100 regression), and the large benchmark (22 datasets).

  • [2024-12]🌟 Add TabM (ICLR 2025).

  • [2024-09]🌟 Add Trompt (ICML 2023).

  • [2024-09]🌟 Add AMFormer (AAAI 2024).

  • [2024-08]🌟 Add GRANDE (ICLR 2024).

  • [2024-08]🌟 Add Excelformer (KDD 2024).

  • [2024-08]🌟 Add MLP_PLR (NeurIPS 2022).

  • [2024-07]🌟 Add RealMLP(NeurIPS 2024).

  • [2024-07]🌟 Add ProtoGate (ICML 2024).

  • [2024-07]🌟 Add BiSHop (ICML 2024).

  • [2024-06]🌟 Check out our new baseline ModernNCA, inspired by traditional Neighbor Component Analysis, which outperforms both tree-based and other deep tabular models, while also reducing training time and model size!

  • [2024-06]🌟 Check out our benchmark paper about tabular data, which provides comprehensive evaluations of classical and deep tabular methods based on our toolbox in a fair manner!

🌟 Methods

TALENT integrates an extensive array of 30+ deep learning architectures for tabular data, including but not limited to:

  1. MLP: A multi-layer neural network, which is implemented according to RTDL.
  2. ResNet: A DNN that uses skip connections across many layers, which is implemented according to RTDL.
  3. SNN: An MLP-like architecture utilizing the SELU activation, which facilitates the training of deeper neural networks.
  4. DANets: A neural network designed to enhance tabular data processing by grouping correlated features and reducing computational complexity.
  5. TabCaps: A capsule network that encapsulates all feature values of a record into vectorial features. Its classifier returns probabilities. Prior versions applied softmax to those probabilities a second time in the public runner.
  6. DCNv2: Consists of an MLP-like module combined with a feature crossing module, which includes both linear layers and multiplications.
  7. NODE: A tree-mimic method that generalizes oblivious decision trees, combining gradient-based optimization with hierarchical representation learning.
  8. GrowNet: A gradient boosting framework that uses shallow neural networks. Classification uses a row-wise second-order cross-entropy objective for binary and multiclass tasks. The corrective step jointly updates the ensemble. Scores from earlier releases can differ.
  9. TabNet: A tree-mimic method using sequential attention for feature selection, offering interpretability and self-supervised learning capabilities.
  10. TabR: A deep learning model that integrates a KNN component to enhance tabular data predictions through an efficient attention-like mechanism.
  11. ModernNCA: A deep tabular model inspired by traditional Neighbor Component Analysis, which makes predictions based on the relationships with neighbors in a learned embedding space.
  12. DNNR: Enhances KNN by using local gradients and Taylor approximations for more accurate and interpretable predictions.
  13. AutoInt: A token-based method that uses a multi-head self-attentive neural network to automatically learn high-order feature interactions.
  14. Saint: A token-based method that leverages row and column attention mechanisms for tabular data.
  15. TabTransformer: A token-based method that enhances tabular data modeling by transforming categorical features into contextual embeddings.
  16. FT-Transformer: A token-based method which transforms features to embeddings and applies a series of attention-based transformations to the embeddings.
  17. TANGOS: A regularization-based method for tabular data that uses gradient attributions to encourage neuron specialization and orthogonalization.
  18. SwitchTab: A self-supervised method tailored for tabular data that improves representation learning through an asymmetric encoder-decoder framework. Following the original paper, our toolkit uses a supervised learning form, optimizing both reconstruction and supervised loss in each epoch.
  19. PTaRL: A regularization-based framework that enhances prediction by constructing and projecting into a prototype-based space. New Optuna trials enable the configured regularizers. Earlier tuned configurations could disable them by storing their flags as strings.
  20. TabPFN: A general model which involves the use of pre-trained deep neural networks that can be directly applied to any tabular task.
  21. HyperFast: A meta-trained hypernetwork that generates task-specific neural networks for instant classification of tabular data.
  22. TabPTM: A general method for tabular data that standardizes heterogeneous datasets using meta-representations, allowing a pre-trained model to generalize to unseen datasets without additional training.
  23. BiSHop: An end-to-end framework for deep tabular learning which leverages a sparse Hopfield model with adaptable sparsity, enhanced by column-wise and row-wise modules.
  24. ProtoGate: A prototype-based model for feature selection in HDLSS biomedical data that adapts global and local feature selection to enhance prediction accuracy and interpretability, addressing co-adaptation issues through a non-parametric prototype-based mechanism.
  25. RealMLP: An improved multilayer perceptron (MLP).
  26. MLP_PLR: An improved multilayer perceptron (MLP), which utilizes periodic activations.
  27. Excelformer: A deep learning model for tabular data prediction, featuring a semi-permeable attention module to address rotational invariance, tailored data augmentation, and an attentive feedforward network, making it a reliable solution across diverse datasets.
  28. GRANDE: A tree-mimic method for learning hard, axis-aligned decision tree ensembles using end-to-end gradient descent.
  29. AMFormer: A token-based method which improves the transformer architecture for tabular data by incorporating parallel addition and multiplication attention mechanisms, utilizing prompt tokens to constrain feature interactions.
  30. Trompt: A prompt-based deep neural network for tabular data that separates learning into intrinsic column features and sample-specific feature importance.
  31. TabM : A model based on MLP and variations of BatchEnsemble.
  32. TabPFN v2: A general model which involves the use of pre-trained deep neural networks that can be directly applied to any tabular task.
  33. T2Gformer: A Transformer network for tabular learning that processes data guided by relation graphs and uses a Cross-level Readout for global semantics in prediction.
  34. TabICL: A comparable tabular foundation model with performance on par with TabPFN v2.
  35. TabAutoPNPNet: A tabular model based on periodicity, particularly the Fourier transform and Chebyshev polynomials, with performance on par with or superior to FT-Transformer.
  36. Mitra: A tabular foundation model learned with mixed synthetic priors.
  37. LimiX: A tabular foundation model that leverages transformers to support a wide range of tasks, from prediction to imputation and causal inference, within a unified architecture.
  38. Real-TabPFN: An enhanced tabular foundation model that extends TabPFNv2 through continued pre-training on real-world datasets for classification tasks.
  39. RFM: A non-deep, backpropagation-free feature learning algorithm, iteratively applies AGOP to a kernel machine to adaptively learn task-specific features. To reload RFM with train=False, supply the original training data so the model can reconstruct its kernel centres. Older RFM checkpoint files that contain no fitted weights require a fresh fit.
  40. xRFM: A tabular model that combines RFMs with an adaptive tree structure, enabling it to learn features local to data subsets and scale log-linearly with the number of samples.
  41. TabPFN v3: TabPFN v3 (PriorLabs 2026), with native context up to ~1M rows × 200 features, 160-class support, and an optional thinking mode. Requires pip install -U 'tabpfn>=8.0.0'.
  42. TabICL v2: TabICL v2 (ICML 2026), now supporting both classification and regression (via TabICLRegressor), with native quantile regression. Requires pip install -U 'tabicl>=2.0.0'.
  43. TabPFN v2.5: TabPFN v2.5 (PriorLabs, Nov 2025), the intermediate release between v2 and v3. Prior Labs lists up to 100,000 training rows for the local model. Requires pip install -U 'tabpfn>=8.0.0'.
  44. TabDPT: A tabular foundation model from Layer 6 AI that combines in-context learning with retrieval and self-supervised pre-training on real data, removing fixed context-size limits. Requires pip install -U tabdpt.
  45. TabFM: Google's zero-shot tabular foundation model for classification and regression, using in-context learning over training rows as context. Requires pip install -U "tabfm[pytorch]"; the upstream model weights use the TabFM Non-Commercial License.
  46. TRC: A post-hoc Tabular Representation Corrector that freezes a trained backbone, learns to remove representation shift, and maps corrected representations into a compact light-embedding space.
  47. TabPFN-3.5: TabPFN-3.5 (PriorLabs, Sep 2026), the successor of TabPFN-3 with published maxima of 1M rows and 20k features; set general.fast for the TabPFN-3.5-Fast checkpoint. Requires pip install -U 'tabpfn>=9.0.0'; the weights use a non-commercial license (for headless runs, set TABPFN_TOKEN after accepting it on the Prior Labs platform).
  48. Kumo Tabular: NVIDIA's tabular foundation model (Sep 2026, small / medium / large via general.size) for classification and regression; weights under the commercially usable OpenMDW-1.1 license. Requires Python >= 3.11 and pip install git+https://github.com/NVIDIA/structured-data-models.git.
  49. Mitra-v2: The second-generation Mitra (AutoGluon, Sep 2026) for classification and regression (1000-bin distributional head), run zero-shot through TALENT's Mitra code.
  50. Causilo: Use causilo_v1_0 for the original classifier and regressor or causilo_v1_5 for the 1.5 checkpoints. Install the optional backend with pip install "causilo>=1.5.0". Both methods explicitly select the architecture and use the installed backend's ensemble defaults. Pin the package version when reproducing a result. For example, 1.5.0 uses eight estimators for both tasks, while 1.5.1 defaults to four for 1.5 classification and eight for regression. Set general.n_estimators to fix the ensemble size. The existing causilo entry retains its eight-estimator configuration and backend-selected architecture.
  51. Xiaomi-TabLDM: Xiaomi's tabular foundation model (Sep 2026) for classification and regression. Requires pip install git+https://github.com/xiaomi-research/xiaomi-tabldm.git; check the model card for the weights license.
  52. EXAONE-Tabular: LG AI Research's tabular foundation model (2026) for classification and regression. Requires Python >= 3.11 and pip install "exaonetabular @ git+https://github.com/LGAI-Research/EXAONE-Tabular.git"; the weights are for research and education only. The released regressor can fail the publisher’s quantile-grid check on Windows with CPU or CUDA. Classification with the public weights was verified on CPU.
  53. LimiX-2: The 400M-parameter successor of LimiX (StableAI, Sep 2026) for classification (2-10 classes) and regression. Requires Python >= 3.12 and pip install git+https://github.com/limix-ldm-ai/LimiX.git; the weights use the StableAI LimiX Non-Commercial License.

🔧 If you want to check the default hyperparameters and hyperparameter search spaces of all methods, please visit:
👉 https://6sy666.github.io/TALENT-Configs/

Use TALENT.display_name(model_type) for a figure or table label. For example, tabicl is TabICL v1 and tabpfn is TabPFN v1. The legacy causilo key follows its backend, so use a version-specific key when reporting a fixed checkpoint.

☄️ How to Use TALENT

🕹️ Quick Start

Install with the newest version through GitHub:

python -m pip install --upgrade git+https://github.com/LAMDA-Tabular/TALENT.git@main

From a source checkout, the CLI scripts live in test/ and sample data in example_datasets/. The deep-learning launcher follows this workflow:

from tqdm import tqdm
from TALENT.benchmark.measurement import elapsed_call
from TALENT.model.utils import get_deep_args, show_results, tune_hyper_parameters, get_method, set_seeds
from TALENT.model.lib.data import get_dataset
from TALENT.model.lib.evaluation import evaluate
from TALENT.model.method_registry import get_method_spec

if __name__ == '__main__':
    loss_list, results_list, time_list = [], [], []
    args, default_para, opt_space = get_deep_args()
    train_val_data, test_data, info = get_dataset(args.dataset, args.dataset_path)
    if args.tune:
        args = tune_hyper_parameters(args, opt_space, train_val_data, info)

    spec = get_method_spec(args.model_type)
    for seed in tqdm(range(args.seed_num)):
        args.seed = seed    # update seed
        set_seeds(args.seed)
        method = get_method(args.model_type)(args, info['task_type'] == 'regression')
        _, fit_time = elapsed_call("fit_seconds", args.device, method.fit, train_val_data, info)
        # evaluate() standardizes predict_proba and (for binary tasks) tunes
        # the decision threshold on the validation split.
        eval_result = evaluate(
            method, train_val_data, test_data, info,
            model_name=args.evaluate_option,
            output_type=spec.output_type,
            tune_threshold=True,
        )
        loss_list.append(eval_result["loss"])
        results_list.append(eval_result["metrics"])
        metric_name = eval_result["metric_names"]
        time_list.append((fit_time, eval_result["predict_time"]))

    show_results(args, info, metric_name, loss_list, results_list, time_list)
python test/train_model_deep.py --model_type mlp --dataset bank --dataset_path example_datasets --seed_num 1 --max_epoch 1

For TRC, use integer-encoded categorical features as required by its FT-Transformer backbone:

python test/train_model_deep.py --model_type trc --cat_policy indices --dataset bank --dataset_path example_datasets --seed_num 1

TRC first trains the backbone for at most --max_epoch epochs, freezes it, and then trains the representation corrector for at most the same number of epochs. Ablations and paper hyperparameters are available in TALENT/configs/default/trc.json; set shift_estimator, space_mapping, or loss_orth to false to disable the corresponding component.

🐍 Python API (library mode)

TALENT also exposes a library-style API alongside the CLI scripts, so you can call methods directly from Python or a Jupyter notebook without manipulating sys.argv:

import TALENT
from TALENT.model.lib.data import get_dataset

train_val, test, info = get_dataset("bank", "./example_datasets")

# Single-seed run
result = TALENT.run("LogReg", train_val, test, info)
print(dict(zip(result.metric_names, result.metrics)))
print("Fit (s)", result.fit_time, "HPO (s)", result.hpo_time, "Inference (s)", result.predict_time)

# Multi-seed run with hyperparameter tuning
result = TALENT.run("catboost", train_val, test, info, tune=True, n_trials=50, seed_num=3)
print("Mean metrics:", dict(zip(result.metric_names, result.metrics_mean)))
print("Std metrics:",  dict(zip(result.metric_names, result.metrics_std)))

Reproducible benchmarks

Use stable string row IDs to save the exact training, validation, test and context rows. This example compares logistic regression with the dummy baseline on the same 32 training rows and the same held-out data.

import tempfile
from pathlib import Path

import numpy as np
from TALENT.benchmark import BenchmarkSplit, compare_runs, make_split, result_record

X = np.random.default_rng(7).normal(size=(100, 4))
y = (X[:, 0] > 0).astype(int)
ids = [f"row-{i}" for i in range(len(y))]
info = {"task_type": "binclass", "n_num_features": 4, "n_cat_features": 0}
split = make_split(ids, seed=42).with_context(32)
split.save("split.json")
split = BenchmarkSplit.load("split.json")

methods = ["LogReg", "dummy"]
records = []
with tempfile.TemporaryDirectory() as tmp:
    for method in methods:
        result = split.run(method, ids, X, None, y, info, device="cpu",
                           measure=True, save_path=str(Path(tmp) / method))
        records.append(result_record(result, "demo-v1", "Accuracy"))

report = compare_runs(records, expected={"demo-v1": [split.split_id]},
                      methods=methods, metric="Accuracy", reference="dummy")
print(report["ranking"], report["counts"], report["contrasts"])

For a classification holdout, pass stratify=y to make_split. The validation and test fractions both refer to the full dataset. Grouped and chronological splits use their own boundaries.

For an existing pipeline that applies its own per-fold preprocessing, import iter_shuffled_fold_indices or shuffled_holdout_indices from TALENT.benchmark. They return ordered training, validation, and test row positions. Both interpret the validation fraction relative to the development partition. The single holdout accepts an explicit validation seed. To enforce a ceiling before your own preprocessing, call subsample_fold_training_indices(train, limit=cap, seed=fold_seed) after splitting. Pass labels=y[train] for proportional sampling by class. Use the original validation and test indices.

Choosing a split. Pass groups= to keep whole groups together or timestamps= for chronological training, validation and test periods. Equal timestamps stay together. Validation and test fractions apply to the number of rows, groups or distinct timestamps, respectively. with_context(k) selects nested training subsets and preserves both holdouts. Temporal contexts use the most recent training rows. For classification, check class coverage when choosing small contexts. You can also construct BenchmarkSplit(train, val, test, context) with your own ordered ID sequences. The manifest stores IDs in plain text and fingerprints their assignments and order. Use non-sensitive IDs and record the dataset version separately. Replaying the manifest accepts reordered source data and checks that the row IDs match.

Limiting a holdout. make_split, make_folds and cross_validate use every evaluation row by default. Set val_limit or test_limit to sample only that holdout after splitting. With class labels, a stratified sample preserves class representation. With timestamps, the selection keeps the newest complete timestamp blocks that fit the row budget. Otherwise the selection is uniform and reproducible with a fixed seed. The selected IDs become part of the split fingerprint. Use split.run(..., allow_extra_rows=True) when replaying a reduced split against the full table. For a custom selection strategy on an existing split, use split.with_holdout_limits(...) and pass labels or times keyed by row ID.

For data that already has train, validation and test partitions, run and run_from_dataset accept the same two limits. They stratify classification holdouts and sample regression holdouts uniformly. Set holdout_seed for a specific draw or supply holdout_timestamps={"val": val_times, "test": test_times} for chronological selection. The timestamps follow the supplied order within each holdout. For every reduced holdout, result.provenance["holdout_indices"] records its original row positions in prediction order. Training rows are unchanged.

Measuring a run. Every run reports three durations in seconds. result.fit_time and result.predict_time measure the final fit and test prediction calls, averaged across seeds. Individual times are in result.per_seed. result.hpo_time measures the Optuna search once across all seeds, including candidate training and validation. It is zero when tuning is disabled or an existing tuned configuration is loaded. Both CLIs report the shared search as HPO_Time. CUDA timings synchronise the configured device. Test timing includes preprocessing and metrics inside the adapter's prediction call and excludes the evaluator's separate threshold search. Use result.fit_role to interpret fit time. Frozen in-context adapters such as Mitra and LimiX report context_setup and result.parameter_training_time == 0.0. Their measured fit still includes support preparation and checkpoint loading performed inside the call. Ordinary estimators report model_fit, and pretrained backends that manage their own fit report backend_fit. For both, parameter_training_time is None because parameter updates are not timed separately. Older versions relied on adapter-specific timings, so historical times can differ.

Pass measure=True for initialization, shared tuning time (including cache lookup), memory and provenance. Where instrumented, load_seconds measures backend initialization with checkpoint loading and overlaps fit time.

The record includes the PyTorch version, CUDA device name, fitted model device, optional backend version and checkpoint identity where observable. Set hash_checkpoint=True to hash a resolved local checkpoint file. Memory values are sampled peaks for the current process (RSS with optional psutil) and PyTorch allocations on the configured CUDA device. Short-lived allocations can fall between samples. Use one process per run for comparable memory measurements.

Set capture_support_ids=True on a measured split.run to retain the ordered IDs selected by TALENT's shared support sampler. Its sample_size option accepts a row count or a fraction for both classification and regression. Mitra also records the context passed to each test query after its inference cap. External backends can perform further per-query retrieval. Unavailable observations are None.

Comparing methods. Supply the full planned dataset and split schedule, including runs that produced no result. Record an unsuccessful run with dataset, split_id, method, status ("failed" or "skipped") and an optional reason. The report lists every planned cell, including missing and non-finite results. Rankings use splits completed by every method, average splits within each dataset, then weight datasets equally. Fit, HPO and prediction costs use the same cells and include their measurement counts. Each reference comparison uses its own matched splits and reports per-dataset differences plus a paired Student t interval when at least two datasets contribute. These are unadjusted intervals across dataset means. Set higher_is_better=False for a loss. Positive differences always favor the method being compared with the reference.

Cross-validation

The standard TALENT.run(), TALENT.run_from_dataset() and command-line scripts use the supplied training, validation and test split. Increasing seed_num repeats that split with different model seeds. With tune=True, ordinary Optuna tuning scores candidates on the supplied validation set and can reuse the saved best configuration.

Choose cross_validate() or cross_validate_from_dataset() to create folds. Pass hpo_cv to the CV call with tune=True to score each candidate across inner folds, threshold_cv to choose a binary threshold from inner-fold predictions, or resume_dir to save fold results and continue an interrupted run. Each option can be used independently.

Use the row IDs, feature arrays and task information from the example above. The same runner accepts classical, neural and foundation model IDs.

import TALENT

cv_result = TALENT.cross_validate(
    "LogReg", ids, X, None, y, info, cv=5, split_seed=42, device="cpu",
    threshold_cv=3, threshold_metric="f1",
)
print(cv_result.metrics_mean)
row_ids, probabilities = cv_result.out_of_fold("predict_proba")

For a TALENT-format dataset on disk, use TALENT.cross_validate_from_dataset("LogReg", "bank", "./example_datasets", cv=5). It reads only the training and validation files. The original test set can be kept separately for final evaluation. Row IDs such as train/0 refer to positions in that dataset version. Supply any group or timestamp metadata in training-then-validation order.

  • Outer folds. Ordinary classification uses stratified folds and regression uses shuffled folds. Pass groups=group_ids to keep entire groups together, or timestamps=dates for expanding-window evaluation. Equal timestamps stay together. Optional gap=k leaves k distinct timestamp blocks between training and validation and between validation and test. Initial history and gap rows receive predictions only if they later appear in a test fold.
  • Model and threshold selection. Each fit reserves val_fraction (default 0.2) of its development rows, groups or time blocks for validation. Optuna uses this partition when tune=True, for example with n_trials=20, tune_metric="AUC". By default, binary classifiers also select their threshold on validation. Set threshold_cv=3 to pool out-of-fold probabilities from three inner fits on outer development data and choose one threshold per seed. Inner fits have their own validation data, group or time boundaries, and HPO directories. The final fit uses the outer training and validation partitions and applies that threshold to the outer test predictions. tune_threshold=False disables selection.
  • Results and cost. results contains one standard RunResult per outer fold. metrics_mean averages the seed-averaged metrics across folds with equal weight. out_of_fold() returns scored row IDs alongside last-seed predictions. fold_seconds includes all inner fits, HPO, threshold selection and the final outer run. Five outer folds with three inner threshold folds require twenty runner calls before counting HPO trials or multiple seeds.
  • Replaying folds. Inspect splits and threshold_splits on the result, or call TALENT.make_folds() to plan folds before fitting. Save a fold with split.save(path). To replay an inner or temporal manifest against the full source table, call split.run(..., allow_extra_rows=True). To reuse a completed fold's inner-selected thresholds, also pass the same seeds and settings and decision_threshold={s["seed"]: s["threshold"] for s in fold_result.per_seed}. Each CV invocation creates a fresh subdirectory under save_path for its checkpoints and tuned configurations.

Tuning across folds and resuming a run

import TALENT

result = TALENT.cross_validate_from_dataset(
    "LogReg", "bank", "./example_datasets",
    cv=5, tune=True, hpo_cv=3, n_trials=10, tune_metric="AUC",
    resume_dir="./runs/bank-logreg", device="cpu",
)

hpo_cv=3 samples one configuration per Optuna trial, fits it separately on three inner folds, and optimises the unweighted mean of their held-out scores. Each candidate fit has its own validation partition for early stopping. The selected configuration is refitted for the enclosing split. Without an explicit metric, fold-averaged HPO uses accuracy for classification, RMSE for classical regression and MAE for deep regression. With threshold_cv enabled, each threshold fit gets its own HPO study restricted to its development rows. Group and time boundaries apply at every level. The example runs 150 candidate fits and five outer refits. Omitting hpo_cv retains single-validation HPO.

Set resume_dir to an empty local directory, then repeat the same call there after interruption. Completed outer and threshold fits are restored with their predictions, scores and timings. Each tuned fit stores its Optuna history in study.sqlite3 under its own fold-N/outer or fold-N/inner-M directory. Histories include sampled parameters, the resolved configuration, trial state and duration. Fold-averaged trials also record the scoring-fold IDs and individual scores. Load a database with optuna.load_study(study_name="tuning", storage="sqlite:////absolute/path/to/study.sqlite3") (on Windows use sqlite:///C:/.../study.sqlite3).

One process owns each resume directory at a time. TALENT checks input contents, split assignments, configuration, source, runtime and recognised local checkpoint paths before reusing results. Use resume_key to identify external model or data revisions that the backend resolves independently. A changed protocol or trial budget uses a new directory. Persisted results contain per-row predictions and exclude live fitted estimators. The normal save_path workflow continues to create fresh runs.

Use hpo_timeout=300 in Python or --hpo_timeout 300 on the CLI to limit each Optuna search to five minutes. TALENT stops starting new trials at the trial or time limit. Running trials can finish after the budget. Final fitting is outside that budget. Persistent CV subtracts the recorded duration of previous finished trials from the allowance.

Completed trials and recorded candidate failures count toward n_trials. An abandoned trial is replaced. Future TPE proposals can differ from an uninterrupted search. Recovered fold time includes the recorded duration of earlier completed trials and fits. The CV result’s hpo_time sums the searches for every outer fold and its inner threshold fits. Restoring a completed fold preserves its recorded HPO time. Partial work in a killed trial has no reliable duration. With measure=True, tuning_seconds records the current tuning call and recovered_trial_seconds records prior trial time.

Selecting a foundation model release

Use the method ID in TALENT.run(), run_from_dataset() or the deep-method CLI. Each entry below supports classification and regression. Install only the backend you intend to use.

Method ID Optional backend Weights and configuration
limix_v2_1016 Python 3.12+, publisher's LimiX package Selects LimiX-2-1016.ckpt and the corresponding inference recipe. limix_v2 selects the original release.
tabdpt_v1_3 pip install "tabdpt==1.3.*" Uses Layer 6's 1.3 weights. The existing tabdpt ID supports other backend versions.
inpriora pip install "scikit-learn>=1.6,<2" "inpriora @ git+https://github.com/ai-for-data/inpriora.git" Loads the classifier or regressor. For offline use, supply the task-specific local directory.
seldon, seldon_mini pip install "neuralk-oss>=0.3.0" Local SDK inference with Seldon or Seldon-mini. Obtain access to the gated weights or supply a local model directory.

All five entries accept config["general"]["model_path"]. LimiX and TabDPT expect a checkpoint file. Seldon and Inpriora expect a directory. TabDPT also accepts its native model_weight_path spelling.

The LimiX 2.0 backend imports Triton even during CPU inference. On Windows, the local CPU checks used triton-windows for this dependency.

spec = TALENT.get_method_spec("tabdpt_v1_3")
print(spec.preflight(checkpoint_path="/models/tabdpt1_3.safetensors"))

result = TALENT.run(
    "tabdpt_v1_3", train_val, test, info,
    config={"general": {"model_path": "/models/tabdpt1_3.safetensors", "n_estimators": 2}},
)
print(result.provenance)

Preflight reads registry and installed-package metadata and checks the existence of an optional local path. A real prediction exercises the backend and weights. result.provenance identifies the method, configured device, declared backend distribution, detected version and checkpoint when the adapter can identify it. Unknown values are None.

Choosing the HPO objective metric

By default the hyperparameter search optimizes TALENT's historical objective (validation Accuracy for classification, MAE / RMSE for regression). With tune=False, TALENT fits once per model seed using the method configuration under TALENT/configs/default/, or the configuration supplied by the caller. Optuna samples the separate distributions under TALENT/configs/opt_space/; the default configuration does not enter the study automatically.

Pass tune_metric to optimize any metric that Method.metric reports instead; the optimization direction is inferred automatically.

# Tune on ROC-AUC (classification) or R2 (regression) rather than the default
result = TALENT.run("catboost", train_val, test, info,
                    tune=True, n_trials=50, tune_metric="AUC")

from TALENT.model.lib.tuning_metric import supported_tune_metrics
print(supported_tune_metrics())
# ('Accuracy', 'Avg_Recall', 'Avg_Precision', 'F1', 'AUC',
#  'LogLoss', 'Brier', 'ECE', 'R2', 'MAE', 'RMSE')

tune_metric is also exposed on the CLI (--tune_metric AUC). It defaults to None, which preserves the historical objective. TabNet, PTaRL and TabCaps use an internal objective for single-validation HPO. With hpo_cv, outer candidate selection can use a reported metric while those methods retain their own early-stopping criteria.

Tuning checks that the requested metric applies to the task. In native CV, AUC requires every class and R2 requires at least two rows in each validation partition and each held-out HPO scoring fold. Check these conditions when using small groups or short time windows.

Custom scores and validation predictions

Use a TALENT.Scorer to specify which predictions a metric consumes and whether larger scores are better. For example, select a model by binary average precision and choose its decision threshold by validation misclassification cost:

from sklearn.metrics import average_precision_score
from TALENT import Scorer, run

ap = Scorer("AveragePrecision", lambda y, p: average_precision_score(y, p[:, 1]),
            response="proba", greater_is_better=True)

def cost(y, decision):
    return ((5 * ((y == 1) & (decision == 0))) + ((y == 0) & (decision == 1))).mean()

loss = Scorer("DecisionCost", cost, response="labels", greater_is_better=False)
result = run("LogReg", train_val, test, info, tune=True, n_trials=5,
             tune_metric=ap, threshold_metric=loss, scoring=loss,
             return_validation_predictions=True)
val_proba = result.validation_predict_proba
test_cost = dict(zip(result.metric_names, result.metrics))["DecisionCost"]

scoring adds a test metric. tune_metric chooses hyperparameters using validation data and threshold_metric chooses a binary decision threshold. Classification scorers receive integer labels in sorted training-class order and either predicted labels or the full probability matrix. Use response="prediction" for regression in original target units. Custom HPO scores the candidate's selected checkpoint and keeps the adapter's ordinary early-stopping rule. A standalone search with a custom objective runs fresh trials. Use resumable CV to reuse those studies. These options also work with hpo_cv and threshold_cv. For resumable CV, set resume_key to a version for your scoring functions and change it when their behavior or parameters change.

return_validation_predictions=True retains validation_predictions and, for probabilistic classifiers, validation_predict_proba in validation-row order. Top-level arrays refer to the last seed. Each per_seed entry has its own arrays. Binary threshold tuning reuses the same validation pass. Other runs request one extra prediction pass only when these outputs are requested.

Evaluation batches

A query batch controls how many rows the fitted model predicts at once. All selected validation and test rows are collected in their original order before scoring. Set config={"general": {"predict_chunk_size": 256}} to request batches of at most 256 rows in TabPFN v1, v2, Real-TabPFN, v2.5, v3 and v3.5, TabFM, Mitra v1 and v2, Seldon and Seldon-mini. LimiX-2 and its 1016 release forward this setting to the publisher's test_batch_size.

TabPFN v1 and TabFM start with the entire query by default, bundled TabPFN v2 and Real-TabPFN start with up to 8,192 rows, and Mitra starts with up to 1,024. These adapters retry a CUDA out-of-memory error with smaller query batches while keeping the fitted context. Other backends retain their own batching and memory policies. Batching bounds memory per prediction call. The benchmark still needs enough host memory to collect the predictions.

Introspect or filter methods via the unified registry:

# What does this method need?
spec = TALENT.get_method_spec("tabicl_v2")
print(spec.cat_policy, spec.normalization, spec.supports_regression, spec.supports_hpo)

# List deep methods registered with the GPU hardware category that support regression
for s in TALENT.list_methods(
    architecture=TALENT.Architecture.DEEP,
    hardware=TALENT.Hardware.GPU,
    supports_regression=True,
):
    print(s.name)

Both the CLI scripts and the Python API are backed by the same MethodSpec registry, which dispatches to the registered adapter. New adapters also need default and search-space configurations.

Training rows and prediction context

TALENT.get_method_spec(name).train_row_limit is the default maximum number of rows supplied from a training fold. None supplies the whole fold. To override a foundation model's default, set config["general"]["sample_size"] to a positive integer, a fraction such as 0.5, or "all". Integer 1 selects one row and float 1.0 selects every row. The adapter samples before fitting preprocessing. Model-specific context selection and available memory still govern prediction. For any estimator, a split's with_context(k) can also specify exactly which training rows to use.

Adapter Default training-row budget Source and interpretation
TabPFN v1 1,000 The authors' recommended range. The bundled implementation warns above 1,024.
TabPFN v2 and Real-TabPFN v2 10,000 The local v2 release and its real-data checkpoint.
TabPFN v2.5 100,000 Current local model specifications. The SDK also provides a more conservative 50,000-row pretraining guard. TALENT defaults to ignore_pretraining_limits=True for this adapter.
TabPFN v3 and v3.5 1,000,000 each Prior Labs' local model specifications. Feasible combinations of rows and features depend on the version and available memory.
Mitra v1 10,000 AutoGluon's v1 fit guard. TALENT's default prediction support is 8,192 rows.
Mitra-v2 Full fold The authors' release specifies a prediction support budget of 16,384 rows for binary and 32,768 for multiclass and regression. TALENT uses these budgets in its zero-shot adapter and balances a sampled binary support. Set general.max_samples_support to change this budget for either Mitra version.
TabICL v1 500,000 The v1 paper, Appendix E measures a 500,000-row table with 400,000 training and 100,000 test rows. TALENT retains its configurable 500,000-training-row default.
TabICL v2 1,000,000 The v2 paper, Appendix H measures a million-row table with 800,000 training and 200,000 test rows. TALENT retains its configurable million-training-row default.
Other registered methods Full fold No additional TALENT dataset cap. An estimator may select a smaller context internally.

Both TabICL papers benchmark inference on 500-feature tables with offloading. Runtime and memory depend on the table and hardware. Set general.sample_size to a row count, fraction or "all" to change the training budget. TALENT applies this setting to each training fold. Validation and test rows are counted separately.

For example, TabFM samples contexts for ensemble members, TabDPT retrieves or samples support and Seldon uses a per-member context and batches queries. EXAONE configures a 100,000-row support and a 1,024-row query batch in its runtime. A benchmark can evaluate more than 1,024 rows with that model. A smaller val_limit or test_limit explicitly changes which observations are scored.

Pre-trained weights. Foundation models download their weights automatically on first use (from the Hugging Face Hub, or figshare for HyperFast) unless the checkpoint is bundled under TALENT/model/models/; TALENT.get_method_spec(name).weights states the source of each model. If loading the weights fails, the error names the source and the usual fixes:

  • TabPFN v2.5 / v3 / 3.5: accept the model license once; on headless machines, accept it on the Prior Labs platform and set TABPFN_TOKEN (and TABPFN_NO_BROWSER=1).
  • Machines without internet access (e.g. cluster compute nodes): run each model once on a connected machine, then reuse the caches (HF_HOME with HF_HUB_OFFLINE=1, TABPFN_MODEL_CACHE_DIR, and TALENT_CACHE_DIR for HyperFast).
  • TabPTM: only the regression checkpoint is distributed; the classification checkpoint is not publicly available.
  • TabPTM's Bray–Curtis distance can be undefined for opposing standardized values. Check predictions for non-finite values when evaluating such data.

For researchers:

🕹️ Clone

Clone this GitHub repository:

git clone https://github.com/LAMDA-Tabular/TALENT
cd TALENT
python -m pip install -e .

🔑 Run experiment

  1. From the checkout root, edit TALENT/configs/default/[MODEL_NAME].json and TALENT/configs/opt_space/[MODEL_NAME].json for global settings and hyperparameters.

  2. Run:

    python test/train_model_deep.py --model_type mlp --dataset bank --dataset_path example_datasets --seed_num 1 --max_epoch 1
    

    for deep methods, or:

    python test/train_model_classical.py --model_type LogReg --dataset bank --dataset_path example_datasets --seed_num 1
    

    for classical methods.

🛠️ How to Add New Methods

For methods like the MLP class that only need to design the model, you only need to:

  • Add the model class in TALENT/model/models.
  • Inherit from TALENT/model/methods/base.py and override the construct_model() method in the new class.
  • Register the method in the unified registry TALENT/model/method_registry.py by appending a MethodSpec(...) entry. The CLI argparse choices and get_method() are both derived from this registry, so no other dispatcher edits are needed.
  • Add the parameter settings for the new method in TALENT/configs/default/[MODEL_NAME].json and TALENT/configs/opt_space/[MODEL_NAME].json.

For other methods that require changing the training process, partially override functions based on TALENT/model/methods/base.py. For details, refer to the implementation of other methods in TALENT/model/methods/.

See our Contribution Guide for more details.

📦 Dependencies

   pip install -r requirements.txt

TabR uses FAISS for nearest-neighbour search. Install a GPU-enabled build for CUDA runs:

conda install faiss-gpu -c pytorch

For CPU runs, install faiss-cpu and pass device="cpu" to the Python API.

🗂️ Benchmark Datasets

Datasets are available at Google Drive.

📂 How to Place Datasets

TALENT loads each dataset from <dataset_path>/<dataset>. The dataset path can be absolute or relative to your working directory. For example, from the checkout root, --dataset_path example_datasets --dataset bank loads example_datasets/bank.

Each dataset folder args.dataset consists of:

  • Numeric features: N_train/val/test.npy (can be omitted if there are no numeric features)

  • Categorical features: C_train/val/test.npy (can be omitted if there are no categorical features)

  • Labels: y_train/val/test.npy

  • info.json, which must include the following three contents (task_type can be "regression", "multiclass" or "binclass"):

    {
      "task_type": "regression", 
      "n_num_features": 10,
      "n_cat_features": 10
    }
    

📝 Experimental Results

We provide comprehensive evaluations of classical and deep tabular methods based on our toolbox in a fair manner in the Figure. Three tabular prediction tasks, namely, binary classification, multi-class classification, and regression, are considered, and each subfigure represents a different task type.

We use Accuracy and RMSE as the metrics for classification tasks and regression tasks, respectively. To calibrate the metrics, we choose the average performance rank to compare all methods, where a lower rank indicates better performance, following Sheskin (2003). Efficiency is calculated by the average training time in seconds, with lower values denoting better time efficiency. The model size is visually indicated by the radius of the circles, offering a quick glance at the trade-off between model complexity and performance.

Binary classification
(a) Binary classification
Multiclass Classification
(b) Multiclass classification
Regression
(c) Regression
All tasks
(d) All tasks

👨🏫 Acknowledgments

We thank the following repos for providing helpful components/functions in our work:

🤗 Contact

If there are any questions, please feel free to propose new features by opening an issue or contact the author: Si-Yang Liu ([email protected]) and Hao-Run Cai ([email protected]) and Qile Zhou ([email protected]) and Jun-Peng Jiang ([email protected]) and Huai-Hong Yin ([email protected]) and Tao Zhou ([[email protected]]) and Han-Jia Ye ([email protected]). Enjoy the code.

🚀 Star History

Thanks LAMDA-PILOT and LAMDA-ZhiJian for the template.

Jelajahi proyek terkait

Memuat…