In-Context Learning (ICL) allows pre-trained models to make predictions on new data without any retraining. The TabPFN R package brings this capability to tabular data by applying a Transformer architecture — the same used in LLMs — to spreadsheet rows instead of text tokens. Rather than training on real-world datasets, TabPFN was trained on millions of synthetically generated mathematical dependency structures, giving it broad pattern recognition for tabular data. A demo using the iris dataset achieves 97.8% accuracy with no hyperparameter tuning, positioning TabPFN as a compelling alternative to Random Forests or XGBoost for small to medium datasets.
Table of contents
The Transformer: From Text to TablesThe Training Matrix: Learning the Shape of MathsLet’s see it in actionConclusionSort: