Tidy Interfaces for Tabular Deep Learning

Model definitions for fitting, tuning, and predicting with deep learning models for tabular data using the 'parsnip' and 'tidymodels' frameworks. Supported models include the 'TabPFN' foundation model of Hollmann et al. (2025) , 'TabICL' by Qu et al. (2025) , 'SAINT' by Somepalli et al. (2021) , and the tabular 'ResNet' of Gorishniy et al. (2021) , among others. Helper functions are also included to create space-filling grids for tuning parameters that are defined on a per-layer basis. These functions define the model interfaces; the computations are carried out by separate engine packages.


tabby

Lifecycle:experimental R-CMD-check Codecov testcoverage

tabby provides parsnip interfaces for tabular deep learning models. Within tidymodels, they follow the same fit() and predict() flow as any other model. This means you can do things like tune and resample them right alongside the rest of your workflow. tabby supplies only the interface, and the fitting happens in engine packages you install separately, namely brulee and tabpfn. All supported models run on Torch.

Two of the supported models ask a little more of your setup. TabPFN and Chronos-2 are pretrained, so they download their weights the first time you use them, and TabPFN also needs a Python environment, created via reticulate. Being pretrained, they also have few or no hyperparameters to tune, whereas the other supported models carry the usual knobs to optimize.

Supported models

Model Function Mode Engine Python
TabPFN tabular_pfn() classification, regression tabpfn ✔
TabICL tabular_icl() classification, regression brulee
ResNet tabular_resnet() classification, regression brulee
SAINT tabular_saint() classification, regression brulee
AutoInt tabular_auto_int() classification, regression brulee
Regularization Learning Network tabular_rln() regression brulee
Chronos-2 (forecasting) tabular_chronos() quantile regression, regression brulee

Installation

You can install the released version of tabby from CRAN via:

install.packages("tabby")

You can install the development version of tabby from GitHub with:

# install.packages("pak")
pak::pak("tidymodels/tabby")

Example

Create a model specification the same way you would for any parsnip model. Here is a ResNet for classification:

library(tabby)
#> Loading required package: parsnip

resnet_spec <-
  tabular_resnet(
    mode = "classification",
    hidden_units = 32L,
    epochs = 100L,
    penalty = 0.01
  )

resnet_spec
#> tabular resnet Model Specification (classification)
#> 
#> Main Arguments:
#>   hidden_units = 32
#>   penalty = 0.01
#>   epochs = 100
#> 
#> Computational engine: brulee

Fit and predict as usual:

resnet_fit <- fit(resnet_spec, class ~ ., data = train_data)
predict(resnet_fit, new_data = test_data)

Mark any argument with tune() to optimize it with the tune package.

Tuning grids for layered networks

Some models take per-layer parameters, such as a vector of hidden units with one entry per layer. tabby provides helpers to build space-filling grids over these list-valued parameters:

rn_spec <-
  tabular_resnet(
    hidden_units = tune(),
    bottleneck_units = tune(),
    penalty = tune()
  )

rn_grid <- neural_net_grid_space_filling(rn_spec)
rn_grid |> expand_list_parameters()

Code of Conduct

Please note that the tabby project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("tabby")

0.0.1 by Max Kuhn, 7 hours ago


https://github.com/tidymodels/tabby, https://tabby.tidymodels.org/


Report a bug at https://github.com/tidymodels/tabby/issues


Browse source code at https://github.com/cran/tabby


Authors: Max Kuhn [aut, cre] , Edgar Ruiz [aut] , Posit Software , PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports cli, dials, dplyr, generics, hardhat, purrr, rlang, tibble

Depends on parsnip

Suggests brulee, modeldata, spelling, testthat, torch, withr


See at CRAN