TP-BERTa
A RoBERTa-based language model for table prediction that turns numbers into relative magnitude tokens.
Tabular and recommender · 363 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 127.5M
- Operations
- 363
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICLR 2024 (spotlight)
- Cited by
- 2 (as of 27 October 2026)
- Authors
- Jiahuan Yan, Bo Zheng, Hongxia Xu and others
- Source
- GitHub: jyansir/tp-berta
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m20824
- Graph hash
- 20bcfb9b3520973a93cbc06c72b9583e52d240c0a1709f156dbd842bea559ecb
- Skeleton hash
- 8c54114a1772e32051c6dce83a8b11c989627ad32e5188f3c7d6eb2955d4be02
- Architecture hash
- 056b49f85c710cd341025dc031d6c3da17361a8391a52366f9ad27a1db50a906
- Diagram SHA-256
- 65cf8ccfb6c614c6a5474d700edfc1324e178c1e4917313cce4a95006283557a
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
TP-BERTa is a language model, built on RoBERTa, that is pre-trained to make predictions from tables. The paper's starting point is that language models can read feature names from any table, but their discrete text representation does not fit numerical feature values.
Numbers are handled by relative magnitude tokenization: each numerical value is assigned to a bin, and the bins are treated as new words added to the RoBERTa vocabulary. A triplet loss on these magnitude embeddings pulls the embedding of a bin toward those of nearby bins and away from distant ones. A second module, intra-feature attention, is a single multi-head self-attention layer shared across all features that fuses the embeddings of one feature's name and value into a single vector before RoBERTa sees it. Because each feature arrives as one vector, the main encoder needs no position encoding, so predictions do not depend on the order of the columns.
Pre-training used 101 binary classification and 101 regression datasets with about 10 million samples. On 145 downstream datasets, the paper reports that TP-BERTa outperforms the other tabular neural networks it compares and is competitive with gradient boosted decision trees. The repository notes that the model must be fine-tuned on each downstream dataset.
Key idea. The paper adapts RoBERTa to tabular prediction by turning numerical values into relative magnitude tokens and fusing each feature's name and value with intra-feature attention.
- tp-berta
- tpberta
- tabular prediction
- tabular data
- relative magnitude tokenization
- intra-feature attention
- pre-trained language model for tables
- tabular transfer learning
- tabular classification
- tabular regression
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{yan2024makingpretrainedlanguagemodels,
title={Making Pre-trained Language Models Great on Tabular Prediction},
author={Jiahuan Yan and Bo Zheng and Hongxia Xu and Yiheng Zhu and Danny Z. Chen and Jimeng Sun and Jian Wu and Jintai Chen},
year={2024},
eprint={2403.01841},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2403.01841},
}