← Back to all sparks
T

tabnet

ANALYTICS
Velocity2.5

An R implementation of TabNet. Contribute to mlverse/tabnet development by creating an account on GitHub.

A tabular deep-learning model in R that keeps widening what counts as a tabular task.

tabular-deep-learningtorchtidymodelsparsnipexplainabilityr-package
Current state
tabnet ports the TabNet attentive tabular architecture to R on torch, wired into tidymodels through parsnip so it slots into workflows, tuning, and case weights like any other engine. The model surface has grown well past plain supervised fitting: unsupervised pretraining, missing values in predictors, multi-outcome fitting, hierarchical multi-label classification, and built-in explainability via tabnet_explain(). The 0.9.x line has been consolidating rather than adding, with 0.9.0 finally making hierarchical classification work correctly by accounting for the ancestor matrix.
Where it's heading
Two threads run through the release history. The first is task surface — each minor version tends to admit a class of problem the model previously could not express, from missing data to hierarchy to imbalanced binary outcomes. The second is torch-level performance and correctness, visible in the torch_ignite_adam default that cut pretraining time roughly 30% and the fix for optimizers frozen after checkpointing on cuda and mps. Tidymodels integration is treated as a first-class obligation, with parsnip breaking changes tracked release by release.
Prediction
The hierarchical path is the least finished: 0.5.0 introduced it and 0.9.0 only just made it effective, so the next releases most likely extend evaluation and explainability to hierarchical fits rather than adding another task type.

Recent moves

  1. 21d ago

    vip dependency moves to r-universe

    A one-line packaging change relocating the {vip} dependency to r-universe distribution. No effect on the model or its API.

    View source ↗
  2. 2mo ago

    Hierarchical classification made effective, augment() added

    Takes the ancestor matrix into account so hierarchical classification actually works — closing a gap left open since 0.5.0 introduced the feature. Also adds augment() alongside documented predict(), and fixes a steady-loss bug where the optimizer stayed frozen after checkpointing on cuda and mps accelerators.

    View source ↗
  3. 6mo ago

    entmax15 and sparsemax15 masks, AUM loss for imbalanced data

    Adds 1.5-alpha entmax15() and sparsemax15() mask types with optimal threshold and support size plus an optional mask_topk config, and nn_aum_loss() for optimizing area under Min(FPR,FNR) on unbalanced binary classification. Defaulting to torch_ignite_adam where available cut pretraining and fitting time by about 30%.

    View source ↗
  4. 1y ago

    Bugfix release for R 4.5 and dials tuning

    Fixes tabnet_pretrain() failing under R 4.5, a dials namespace error when calling tune() on tabnet parameters, and a vignette that called the wrong function. Maintenance against moving dependencies.

    View source ↗
  5. 2y ago

    Case weights and warm-start parameters via parsnip

    parsnip models now pass case weights through workflows::add_case_weights() and accept tabnet_model and from_epoch, making warm starts and weighted fitting available from the tidymodels side rather than only the native API. Tracks a parsnip v1.2 breaking change in the same release.

    View source ↗
  6. 2y ago

    Hierarchical multi-label classification via data.tree

    ⚡ SPARK

    Introduces hierarchical multi-label classification driven by a {data.tree} Node dataset, the first task type tabnet supports that is not flat supervised or unsupervised learning. It took until 0.9.0 for the ancestor matrix handling to make this correct, so the capability was declared here and delivered later.

    View source ↗