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 built on 'torch'.


tabby

CRANstatus Downloads 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 ✔
TabPFN tabular_pfn() classification, regression brulee
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:

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()
#> # A tibble: 10 × 7
#>          penalty hidden_units_1 hidden_units_2 hidden_units_3 bottleneck_units_1
#>            <dbl>          <int>          <int>          <int>              <int>
#>  1 0.00599                    2             50             28                 18
#>  2 0.0000359                  7             18             34                 23
#>  3 0.00000278                12              2             44                 39
#>  4 0.0000000001              18             28             18                  2
#>  5 0.00000000129             23             34              2                 44
#>  6 0.0774                    28              7             12                 34
#>  7 0.000000215               34             39             39                 50
#>  8 0.000464                  39             12              7                  7
#>  9 1                         44             44             23                 28
#> 10 0.0000000167              50             23             50                 12
#> # ℹ 2 more variables: bottleneck_units_2 <int>, bottleneck_units_3 <int>

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.1.0 by Max Kuhn, a day 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