Skip to content

Tabular Deep Learning parameters#454

Open
edgararuiz wants to merge 6 commits into
mainfrom
deep-learning
Open

Tabular Deep Learning parameters#454
edgararuiz wants to merge 6 commits into
mainfrom
deep-learning

Conversation

@edgararuiz

Copy link
Copy Markdown

Closes #452

  1. Adds 14 new parameters for deep learning models:
  • SAINT (via brulee):

    • attention_type() - values: "column", "row", "both"
    • dropout_hidden() - range: 0, 0.5
    • dropout_last() - range: 0, 0.5
  • tdl package (brulee engine):

    • bottleneck_units() - range: 2L, 25L
    • dropout_attn() - range: 0, 0.5
    • dropout_embedding() - range: 0, 0.5
    • num_attn_blocks() - range: 1L, 6L
    • num_attn_feat() - range: 8L, 64L
    • num_attn_heads() - range: 1L, 8L
    • num_embedding() - range: 8L, 64L
    • penalty_average() - range: -15, -5 (log10 scale)
    • penalty_type() - values: "L1", "L2"
    • resid_at() - range: 2L, unknown()
    • step_rate() - range: 0, 8 (log10 scale)
  1. All new parameters are added to the pkgdown reference index.

  2. Several existing .Rd files have incidental changes from roxygen2 dropping \docType{data} and \format{} blocks for values_* vectors.

Example:

library(dials)

attention_type()
#> Attention Type (qualitative)
#> 3 possible values include:
#> 'column', 'row', and 'both'

dropout_hidden()
#> Hidden Dropout Rate (quantitative)
#> Range: [0, 0.5]

dropout_last()
#> Final Layer Dropout Rate (quantitative)
#> Range: [0, 0.5]

saint_params <- parameters(attention_type(), dropout_hidden(), dropout_last())
grid_random(saint_params, size = 5)
#> # A tibble: 5 × 3
#>   attention_type dropout_hidden dropout_last
#>   <chr>                   <dbl>        <dbl>
#> 1 column                 0.286        0.447 
#> 2 row                    0.497        0.0539
#> 3 both                   0.0125       0.0425
#> 4 column                 0.331        0.305 
#> 5 both                   0.0550       0.285 

- 11 parameter source files (R/param_*.R): bottleneck_units, dropout_attn, dropout_embedding, num_attn_blocks, num_attn_feat, num_attn_heads, num_embedding, penalty_average, penalty_type, resid_at, step_rate

- 11 corresponding Rd documentation files (man/*.Rd)
Modified files

Updates

- NEWS.md and  _pkgdown.yml

- tests/testthat/test-params.R — 11 new range assertions + 1 values assertion

Roxygen2 cleanup (unrelated to our changes)

18 existing man/*.Rd files stripped of \docType{data}, \format{}, and \keyword{datasets} — side effect of running devtools::document() with a newer roxygen2
Adds attention_type(), dropout_hidden(), and dropout_last() parameters
@edgararuiz edgararuiz requested a review from topepo June 12, 2026 19:26
Comment thread R/param_dropout_attn.R Outdated
#' @inheritParams Laplace
#'
#' @details
#' Used as a tuning parameter for `tabular_auto_int()` in the `tdl` package

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it is time to make a call on the new package name: bartab tabular.

I'll update this and start the renaming process.

@topepo topepo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I changed the package name from tdl

@edgararuiz edgararuiz requested a review from hfrick June 14, 2026 19:45
@hfrick

hfrick commented Jun 15, 2026

Copy link
Copy Markdown
Member

I usually do a separate PR for updating the roxygen2 version so that it's easier to check for diffs due to that vs diffs of other nature. I've updated this PR from main with those changes so that we now only have the changes related to the new parameters on here.

Are all these parameters ones you expect to reuse across different engines or models? If not, could you please group them in a meaningful way? So far we've grouped by engine, that might also be right choice here. Grouping helps with navigating the options/docs and the code base. The rest is probably very straightforward and I'll take a look once we've established if they can be grouped. 🙌

Groups parameters in 4 families. Attention, RLN, Restnet, and the more generic ones into the existing param_network script
@edgararuiz

Copy link
Copy Markdown
Author

Hi @hfrick!

Thanks! So the new groupings will be:

Group File Doc topic Parameters
Neural network (generic) R/param_network.R ?dropout dropout, epochs, hidden_units, hidden_units_2, batch_size, dropout_hidden, dropout_last, num_embedding, dropout_embedding
Attention-based tabular models R/param_attention.R ?attention-param attention_type, dropout_attn, num_attn_heads, num_attn_blocks, num_attn_feat
Regularization learning networks R/param_rln.R ?rln-param penalty_average, step_rate, penalty_type
Residual networks R/param_resnet.R ?resnet-param bottleneck_units, resid_at

@hfrick hfrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@topepo

topepo commented Jun 16, 2026

Copy link
Copy Markdown
Member

I have one more parameter to add. I'll put it in this PR today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tabular Deep Learning parameters

3 participants