From Uniform to Learned Knots: A Study of Spline-Based Numerical Encodings for Tabular Deep Learning
Organizations: BASF · Clausthal University of Technology · Amazon Music · Bielefeld School of Business, Hochschule Bielefeld (HSBI)
Abstract
Numerical preprocessing remains a critical component of tabular deep learning, as the representation of continuous features can strongly affect downstream performance. We systematically study spline-based numerical encodings, including B-splines, M-splines, and integrated splines (I-splines), under uniform, quantile-based, target-aware, and learnable-knot placement. For the learnable variants, we adopt a differentiable knot parameterization that enables stable end-to-end optimization of knot locations jointly with the backbone. We evaluate these encodings on a diverse collection of public regression and classification datasets using MLP, ResNet, and FT-Transformer backbones, and compare them against common numerical preprocessing baselines. Our results show that the effectiveness of numerical encoding depends strongly on the task, encoding size, and backbone. For classification, piecewise-linear encoding (PLE) is the most robust choice overall, while spline-based encodings remain competitive. For regression, no single encoding dominates, with performance depending on the spline family and knot-placement strategy, and larger gains generally observed for MLP and ResNet than for FT-Transformer. Learnable-knot variants can be optimized stably but may substantially increase training cost. Overall, numerical encodings should therefore be assessed jointly in terms of predictive performance and computational overhead. The implementation is publicly available at https://github.com/mkumar73/tdl-numerical-encodings/.
Figures & tables
| Preprocessing variant | Transformation cost | Forward | Backward |
| Std | – | – | |
| MinMax | – | – | |
| PLE | – | – | |
| Fixed knots | – | – | |
| Learnable knots | – |
| Factor | Setting | Start with | Guideline |
| Backbone | MLP or ResNet-style models | Explicit encodings | These models benefit most from numerical encodings because their input representation is relatively simple. Use PLE for classification and B-splines for regression, starting with small output sizes such as – . |
| Backbone | Feature-tokenizing or high-capacity models | Std or MinMax | For models such as FT-Transformer, TabM, TabTransformer, or SAINT, simple preprocessing is a strong first choice. Add PLE or fixed-knot splines only if the simple baseline is insufficient. |
| Task | Classification | PLE | PLE is the strongest default for classification, with robust rankings across output sizes and backbones. It should usually be tried before more expensive spline variants. |
| Task | Regression | B-splines | Start with B-splines using uniform or quantile knot placement. With larger budgets, include target-aware knots and I-splines in the sweep. |
| Budget | Learnable-knot variants | BS-Grad-U | Among learnable-knot variants, BS-Grad-U provides the most favorable tradeoff between efficiency and performance. MS-Grad-U and IS-Grad-U should be treated as high-cost options. |
| Caution | M-splines | Not first choice | M-splines are not recommended as the default. In our experiments, both fixed and learnable M-spline variants were less attractive due to stability and efficiency concerns. |
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
| Category | Method | Description | Target-aware | Learnable-knot |
| Baseline | Std | Standardization (z-score) | – | – |
| MinMax | min-max scaling to | – | – | |
| PLE | Piecewise Linear Encoding | – | ||
| Adaptive PLE with selected by tree splits (Table 8 ) | – | |||
| B-Spline | BS-U | Uniform knot placement | – | – |
| BS-Q | Quantile-based knot placement | – | – |
| Dataset | Abbr. | #cat | #num | Train | Val | Test | Ratio | Reference / OpenML ID |
| Regression | ||||||||
| Abalone | AB | 1 | 7 | 3008 | 334 | 835 | – | Nash et al. (1994) |
| California Housing | CA | 1 | 8 | 14861 | 1651 | 4128 | – | OpenML: 45028 |
| CPU Small | CPU | 0 | 12 | 5899 | 655 | 1638 | – | OpenML: – |
| Diamonds | DI | 3 | 6 | 38837 | 4315 | 10788 | – | OpenML: 44979 |
| House Sales | HS | 0 | 18 | 15562 | 1729 | 4322 | – | OpenML: 42092 |
| Metric | Regression | Classification | Total |
| Number of datasets | 13 | 12 | 25 |
| Total samples | 255,489 | 255,928 | 511,417 |
| Avg. samples per dataset | 19,653 | 21,327 | 20,456 |
| Avg. features per dataset | 10.5 | 13.0 | 11.7 |
| Min. features | 5 | 6 | 5 |
| Max. features | 19 | 23 | 23 |
| Symbol | Meaning |
| Number of training samples in the current fold | |
| Number of numerical features | |
| Input vector for sample | |
| Numerical feature vector for sample | |
| Categorical feature vector for sample | |
| Scalar value of numerical feature for sample |
| Model | Architecture | Configuration |
| MLP | 3-layer MLP | Hidden dims ; ReLU activations; dropout . |
| ResNet | Residual MLP blocks ( Gorishniy et al. (2021) ) | Block: Linear BN ReLU Dropout Linear BN + skip; ; ; ; dropout ; batch normalization. |
| FTT | ||
| (FT-Transformer) | Feature Tokenizer + Transformer ( Gorishniy et al. (2021) ) | ; ; ; attention dropout ; FFN dropout ; residual dropout ; ; ReGLU activations. |
| Shared training setup (all models) | ||
| AdamW with backbone learning rate and weight decay , batch size , and a maximum of epochs. Early stopping patience is set to , and ReduceLROnPlateau uses patience with factor . For FT-Transformer, weight decay is excluded from feature token embeddings, layer normalization parameters, the [CLS] token, and bias terms. | ||
| Method | Variant | Component | Non-adaptive (fixed) | Adaptive (range) |
| PLE | CART-based | Output size | ||
| Tree regularization | ||||
| Splines | CART-based | Output size | – | |
| Tree / knot constraints | – | |||
| Splines | LightGBM-based | Output size | – | |
| GBDT hyperparameters | – |
| Preprocessing Method | Avg. rank, | Avg. rank, | Avg. rank, |
| Std | 9.29 | 8.96 | 8.46 |
| MinMax | 11.36 | 10.67 | 10.05 |
| PLE | 8.50 | 7.36 | 5.91 |
| BS-U | 7.29 | 7.82 | 7.97 |
| BS-Q | 5.65 | 7.08 | 8.42 |
| BS-CART | 5.91 | 7.46 | 9.73 |
| Preprocessing Method | Avg. rank, | Avg. rank, | Avg. rank, |
| Std | 11.33 | 11.21 | 10.21 |
| MinMax | 12.53 | 12.10 | 11.25 |
| PLE | 5.01 | 3.96 | 3.33 |
| BS-U | 8.15 | 7.64 | 8.56 |
| BS-Q | 6.12 | 7.78 | 8.64 |
| BS-CART | 5.25 | 5.78 | 8.00 |
Tabular Representation Learning
Tabular representation learning builds useful embeddings of structured rows, columns, and tables for prediction, retrieval, clustering, and generation.
See all 53 papers