strable 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. strable-0.1.0/LICENSE +29 -0
  2. strable-0.1.0/PKG-INFO +467 -0
  3. strable-0.1.0/README.md +399 -0
  4. strable-0.1.0/pyproject.toml +113 -0
  5. strable-0.1.0/setup.cfg +4 -0
  6. strable-0.1.0/strable/__init__.py +13 -0
  7. strable-0.1.0/strable/data/folds/aca-federal-upper-limits-wide.parquet +0 -0
  8. strable-0.1.0/strable/data/folds/aijob_ai-ml-ds-salaries.parquet +0 -0
  9. strable-0.1.0/strable/data/folds/animalandveterinary-event.parquet +0 -0
  10. strable-0.1.0/strable/data/folds/antenna-structure-registration.parquet +0 -0
  11. strable-0.1.0/strable/data/folds/awarded-grants.parquet +0 -0
  12. strable-0.1.0/strable/data/folds/beer-ratings.parquet +0 -0
  13. strable-0.1.0/strable/data/folds/broadband-availability.parquet +0 -0
  14. strable-0.1.0/strable/data/folds/california-houses.parquet +0 -0
  15. strable-0.1.0/strable/data/folds/child-adult-healthcare-quality.parquet +0 -0
  16. strable-0.1.0/strable/data/folds/china-overseas-finance-inventory.parquet +0 -0
  17. strable-0.1.0/strable/data/folds/chocolate-bar-ratings.parquet +0 -0
  18. strable-0.1.0/strable/data/folds/clear-corpus.parquet +0 -0
  19. strable-0.1.0/strable/data/folds/cohort-default-rate.parquet +0 -0
  20. strable-0.1.0/strable/data/folds/college-creditcard-marketing.parquet +0 -0
  21. strable-0.1.0/strable/data/folds/college-deposit-product-marketing.parquet +0 -0
  22. strable-0.1.0/strable/data/folds/colleges-and-universities.parquet +0 -0
  23. strable-0.1.0/strable/data/folds/commitments-in-trust-funds.parquet +0 -0
  24. strable-0.1.0/strable/data/folds/community-banking_wide.parquet +0 -0
  25. strable-0.1.0/strable/data/folds/conflict-events_wide.parquet +0 -0
  26. strable-0.1.0/strable/data/folds/contract-awards-investment-project-financing.parquet +0 -0
  27. strable-0.1.0/strable/data/folds/contributions-to-financial-intermediary-funds.parquet +0 -0
  28. strable-0.1.0/strable/data/folds/corporate-procurement-contract-awards.parquet +0 -0
  29. strable-0.1.0/strable/data/folds/cosmetic-event.parquet +0 -0
  30. strable-0.1.0/strable/data/folds/covid-clinical-trials.parquet +0 -0
  31. strable-0.1.0/strable/data/folds/device-classification.parquet +0 -0
  32. strable-0.1.0/strable/data/folds/device-covid19serology.parquet +0 -0
  33. strable-0.1.0/strable/data/folds/device-pma.parquet +0 -0
  34. strable-0.1.0/strable/data/folds/disbursements-in-trust-funds.parquet +0 -0
  35. strable-0.1.0/strable/data/folds/discretionary-grant.parquet +0 -0
  36. strable-0.1.0/strable/data/folds/drug-drugsfda.parquet +0 -0
  37. strable-0.1.0/strable/data/folds/drug-enforcement.parquet +0 -0
  38. strable-0.1.0/strable/data/folds/drug-ndc.parquet +0 -0
  39. strable-0.1.0/strable/data/folds/drug-shortages.parquet +0 -0
  40. strable-0.1.0/strable/data/folds/electric-generating-plants.parquet +0 -0
  41. strable-0.1.0/strable/data/folds/electric-retail-service-territories.parquet +0 -0
  42. strable-0.1.0/strable/data/folds/external-clinician-dashboard.parquet +0 -0
  43. strable-0.1.0/strable/data/folds/financial-intermediary-funds-cash-transfers.parquet +0 -0
  44. strable-0.1.0/strable/data/folds/financial-intermediary-funds-commitments.parquet +0 -0
  45. strable-0.1.0/strable/data/folds/financial-intermediary-funds-funding-decisions.parquet +0 -0
  46. strable-0.1.0/strable/data/folds/financial-management.parquet +0 -0
  47. strable-0.1.0/strable/data/folds/financial-product-complaint.parquet +0 -0
  48. strable-0.1.0/strable/data/folds/first-time-nadac-rates.parquet +0 -0
  49. strable-0.1.0/strable/data/folds/food-enforcement.parquet +0 -0
  50. strable-0.1.0/strable/data/folds/food-event.parquet +0 -0
  51. strable-0.1.0/strable/data/folds/food-prices_wide.parquet +0 -0
  52. strable-0.1.0/strable/data/folds/foreign-gift-and-contract.parquet +0 -0
  53. strable-0.1.0/strable/data/folds/fts-funding.parquet +0 -0
  54. strable-0.1.0/strable/data/folds/fts-requirement-and-funding.parquet +0 -0
  55. strable-0.1.0/strable/data/folds/gainful-employment.parquet +0 -0
  56. strable-0.1.0/strable/data/folds/global-dams-database.parquet +0 -0
  57. strable-0.1.0/strable/data/folds/global-power-plant.parquet +0 -0
  58. strable-0.1.0/strable/data/folds/grant.parquet +0 -0
  59. strable-0.1.0/strable/data/folds/health-professional-shortage-areas.parquet +0 -0
  60. strable-0.1.0/strable/data/folds/historic-perimeters-wildfires.parquet +0 -0
  61. strable-0.1.0/strable/data/folds/historical-earthquake-locations.parquet +0 -0
  62. strable-0.1.0/strable/data/folds/historical-volcanic-locations.parquet +0 -0
  63. strable-0.1.0/strable/data/folds/hospitals.parquet +0 -0
  64. strable-0.1.0/strable/data/folds/hypertension-control-wide.parquet +0 -0
  65. strable-0.1.0/strable/data/folds/ibrd-statement-loans-guarantees.parquet +0 -0
  66. strable-0.1.0/strable/data/folds/ida-statement-credits-grants-guarantees.parquet +0 -0
  67. strable-0.1.0/strable/data/folds/ifc-advisory-services-projects.parquet +0 -0
  68. strable-0.1.0/strable/data/folds/ifc-investment-service-projects.parquet +0 -0
  69. strable-0.1.0/strable/data/folds/industry-payments-entity.parquet +0 -0
  70. strable-0.1.0/strable/data/folds/industry-payments-project.parquet +0 -0
  71. strable-0.1.0/strable/data/folds/insurance-company-complaints.parquet +0 -0
  72. strable-0.1.0/strable/data/folds/journal-ranking_wide.parquet +0 -0
  73. strable-0.1.0/strable/data/folds/kickstarter-projects.parquet +0 -0
  74. strable-0.1.0/strable/data/folds/lending-club-loan.parquet +0 -0
  75. strable-0.1.0/strable/data/folds/local-government-renewable-action.parquet +0 -0
  76. strable-0.1.0/strable/data/folds/local-law-enforcements.parquet +0 -0
  77. strable-0.1.0/strable/data/folds/managed-care-enrollment.parquet +0 -0
  78. strable-0.1.0/strable/data/folds/manifest.json +1090 -0
  79. strable-0.1.0/strable/data/folds/media-ranking_wide.parquet +0 -0
  80. strable-0.1.0/strable/data/folds/medically-underserved-areas-populations.parquet +0 -0
  81. strable-0.1.0/strable/data/folds/medicines.parquet +0 -0
  82. strable-0.1.0/strable/data/folds/mercari.parquet +0 -0
  83. strable-0.1.0/strable/data/folds/meta-critic_whisky.parquet +0 -0
  84. strable-0.1.0/strable/data/folds/michelin-ratings.parquet +0 -0
  85. strable-0.1.0/strable/data/folds/miga-issued-projects.parquet +0 -0
  86. strable-0.1.0/strable/data/folds/mlr-summary-reports.parquet +0 -0
  87. strable-0.1.0/strable/data/folds/mobile-home-parks.parquet +0 -0
  88. strable-0.1.0/strable/data/folds/museums.parquet +0 -0
  89. strable-0.1.0/strable/data/folds/national-average-drug-acquisition-cost.parquet +0 -0
  90. strable-0.1.0/strable/data/folds/oil-natural-gas-platform.parquet +0 -0
  91. strable-0.1.0/strable/data/folds/orphan-designations.parquet +0 -0
  92. strable-0.1.0/strable/data/folds/osha-accidents.parquet +0 -0
  93. strable-0.1.0/strable/data/folds/paediatric-investigation-plan.parquet +0 -0
  94. strable-0.1.0/strable/data/folds/pol-terminal.parquet +0 -0
  95. strable-0.1.0/strable/data/folds/power-plants.parquet +0 -0
  96. strable-0.1.0/strable/data/folds/prepaid-financial-product.parquet +0 -0
  97. strable-0.1.0/strable/data/folds/prison-boundaries.parquet +0 -0
  98. strable-0.1.0/strable/data/folds/ramen-ratings.parquet +0 -0
  99. strable-0.1.0/strable/data/folds/rasff_window.parquet +0 -0
  100. strable-0.1.0/strable/data/folds/rasnf_notification_list.parquet +0 -0
  101. strable-0.1.0/strable/data/folds/recipient-executed-grants-commitments-disbursements.parquet +0 -0
  102. strable-0.1.0/strable/data/folds/schools.parquet +0 -0
  103. strable-0.1.0/strable/data/folds/sf-building-permits.parquet +0 -0
  104. strable-0.1.0/strable/data/folds/summary-of-deposit_wide.parquet +0 -0
  105. strable-0.1.0/strable/data/folds/tax-incentives.parquet +0 -0
  106. strable-0.1.0/strable/data/folds/terms-cc-plans.parquet +0 -0
  107. strable-0.1.0/strable/data/folds/tobacco-problem.parquet +0 -0
  108. strable-0.1.0/strable/data/folds/total-contributions-ibrd-ida-ifc.parquet +0 -0
  109. strable-0.1.0/strable/data/folds/transmission-lines.parquet +0 -0
  110. strable-0.1.0/strable/data/folds/transmission-towers.parquet +0 -0
  111. strable-0.1.0/strable/data/folds/us-school-bus-fleet.parquet +0 -0
  112. strable-0.1.0/strable/data/folds/vehicles.parquet +0 -0
  113. strable-0.1.0/strable/data/folds/wine-dataset.parquet +0 -0
  114. strable-0.1.0/strable/data/folds/workforce-demographics-wide.parquet +0 -0
  115. strable-0.1.0/strable/data/folds/yelp_business.parquet +0 -0
  116. strable-0.1.0/strable/datasets.py +92 -0
  117. strable-0.1.0/strable/encoders.py +25 -0
  118. strable-0.1.0/strable/evaluation.py +110 -0
  119. strable-0.1.0/strable/taxonomy.py +156 -0
  120. strable-0.1.0/strable.egg-info/PKG-INFO +467 -0
  121. strable-0.1.0/strable.egg-info/SOURCES.txt +125 -0
  122. strable-0.1.0/strable.egg-info/dependency_links.txt +1 -0
  123. strable-0.1.0/strable.egg-info/requires.txt +41 -0
  124. strable-0.1.0/strable.egg-info/top_level.txt +1 -0
  125. strable-0.1.0/tests/test_datasets.py +51 -0
  126. strable-0.1.0/tests/test_encoders_taxonomy.py +97 -0
  127. strable-0.1.0/tests/test_evaluation.py +75 -0
strable-0.1.0/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024-2025 The STRABLE developers.
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ * Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
strable-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,467 @@
1
+ Metadata-Version: 2.4
2
+ Name: strable
3
+ Version: 0.1.0
4
+ Summary: STRABLE: Benchmarking Tabular Machine Learning with Strings
5
+ Author: Myung Jun Kim, Félix Lefebvre, Lennart Purucker, Alan Arazi, Eilam Shapira, Roi Reichart, Frank Hutter, Marine Le Morvan, David Holzmüller, Gaël Varoquaux
6
+ Author-email: Gioia Blayer <gioia.blayer@inria.fr>
7
+ License-Expression: BSD-3-Clause
8
+ Project-URL: Homepage, https://github.com/soda-inria/strable
9
+ Project-URL: Leaderboard, https://gblayer.github.io/strable-leaderboard/
10
+ Project-URL: Dataset, https://huggingface.co/datasets/inria-soda/STRABLE-benchmark
11
+ Project-URL: Paper, https://arxiv.org/abs/2605.12292
12
+ Keywords: strable,tabular,benchmark,strings
13
+ Classifier: Development Status :: 2 - Pre-Alpha
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Topic :: Scientific/Engineering
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Operating System :: MacOS
20
+ Classifier: Operating System :: POSIX
21
+ Classifier: Operating System :: Microsoft :: Windows
22
+ Classifier: Natural Language :: English
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Requires-Python: >=3.10
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: numpy<2.4
30
+ Requires-Dist: pandas
31
+ Requires-Dist: pyarrow
32
+ Requires-Dist: scikit-learn>=1.6
33
+ Requires-Dist: skrub>=0.6
34
+ Requires-Dist: huggingface_hub
35
+ Requires-Dist: nltk>=3.8
36
+ Provides-Extra: test
37
+ Requires-Dist: pytest; extra == "test"
38
+ Requires-Dist: coverage; extra == "test"
39
+ Provides-Extra: paper
40
+ Requires-Dist: skrub==0.6.2; extra == "paper"
41
+ Requires-Dist: scipy>=1.11; extra == "paper"
42
+ Requires-Dist: matplotlib>=3.7; extra == "paper"
43
+ Requires-Dist: seaborn>=0.13; extra == "paper"
44
+ Requires-Dist: fastparquet>=2024.11; extra == "paper"
45
+ Requires-Dist: joblib<1.6,>=1.3; extra == "paper"
46
+ Requires-Dist: tqdm>=4.65; extra == "paper"
47
+ Requires-Dist: statsmodels>=0.14; extra == "paper"
48
+ Requires-Dist: scikit-posthocs>=0.10; extra == "paper"
49
+ Requires-Dist: xgboost==3.1.1; extra == "paper"
50
+ Requires-Dist: catboost==1.2.8; extra == "paper"
51
+ Requires-Dist: pytabkit==1.7.1; extra == "paper"
52
+ Requires-Dist: tabpfn==6.0.6; extra == "paper"
53
+ Requires-Dist: tabicl==2.0.3; extra == "paper"
54
+ Requires-Dist: tabstar==1.1.15; extra == "paper"
55
+ Requires-Dist: tarte_ai==0.0.6; extra == "paper"
56
+ Requires-Dist: deeptab==1.6.1; extra == "paper"
57
+ Requires-Dist: fasttext>=0.9.3; extra == "paper"
58
+ Requires-Dist: sentence-transformers==5.2.3; extra == "paper"
59
+ Requires-Dist: transformers==4.57.3; extra == "paper"
60
+ Requires-Dist: huggingface_hub==0.36.0; extra == "paper"
61
+ Requires-Dist: openml>=0.14; extra == "paper"
62
+ Requires-Dist: xmltodict>=0.13; extra == "paper"
63
+ Requires-Dist: gdown>=5.0; extra == "paper"
64
+ Provides-Extra: extra
65
+ Requires-Dist: openml; extra == "extra"
66
+ Requires-Dist: xmltodict; extra == "extra"
67
+ Dynamic: license-file
68
+
69
+ ![Python versions](https://img.shields.io/badge/python-3.12-blue)
70
+ ![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)
71
+ [![Hugging Face Benchmark](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Benchmark-FFD21E.svg)](https://huggingface.co/datasets/inria-soda/STRABLE-benchmark)
72
+ [![arXiv](https://img.shields.io/badge/arXiv-2605.12292-b31b1b.svg)](https://arxiv.org/abs/2605.12292)
73
+ [![Leaderboard](https://img.shields.io/badge/%F0%9F%8F%86-Leaderboard-2E7D32.svg)](https://gblayer.github.io/strable-leaderboard/)
74
+ [![Agent-friendly](https://img.shields.io/badge/Agent--friendly-AGENTS.md-7B61FF.svg)](https://github.com/soda-inria/strable/blob/main/AGENTS.md)
75
+
76
+ # STRABLE: Benchmarking Tabular Machine Learning with Strings
77
+
78
+ > **TL;DR** — STRABLE is a benchmark of **108 real-world tables with strings**. We evaluate **modular pipelines** (a string encoder feeding a tabular learner) as well as **end-to-end** architectures that jointly model strings and numbers.
79
+
80
+ ## 🔑 Key findings
81
+
82
+ - **Decoder-only LLM embeddings need the right post-processing — i.e. dimensionality reduction.** Default PCA hurts them; standard-scaling-then-PCA, or no-PCA (slicing the first N raw embedding dimensions), recovers their performance.
83
+
84
+ ![Post-processing affects LLM embeddings](https://raw.githubusercontent.com/soda-inria/strable/main/figures/post_processing.png)
85
+
86
+ - **Modular pipelines outperform today's end-to-end string-tabular architectures**.
87
+
88
+ ![Critical-difference diagram of encoder–learner pipelines](https://raw.githubusercontent.com/soda-inria/strable/main/figures/CD_diagram.png)
89
+
90
+ - **Lightweight encoders paired with advanced learners dominate the Pareto frontier (the best performance-vs-runtime trade-off)** — a consequence of STRABLE's string taxonomy: Categoricals 49%, Names 23%, Structured Codes 17%, Datetimes 2%, Identifiers 0.5% and only **8%** Free Text.
91
+
92
+ ![Pareto optimality of tabular learners and string encoders](https://raw.githubusercontent.com/soda-inria/strable/main/figures/pareto_plot.png)
93
+
94
+ ---
95
+
96
+ ## 📦 Install and use
97
+
98
+ ```bash
99
+ pip install strable
100
+ ```
101
+
102
+ ```python
103
+ import strable
104
+ from sklearn.ensemble import HistGradientBoostingRegressor
105
+ from sklearn.pipeline import make_pipeline
106
+
107
+ X, y, task = strable.load_table("beer-ratings") # downloaded from Hugging Face once, then cached
108
+ folds = strable.get_folds("beer-ratings") # the benchmark's 3 (train_idx, test_idx) folds
109
+
110
+ pipeline = make_pipeline(strable.encoders.tfidf(), HistGradientBoostingRegressor())
111
+ scores = strable.evaluate(pipeline, tables=["beer-ratings"]) # one row per fold: R² or ROC-AUC
112
+ print(scores[["table", "fold", "score"]])
113
+
114
+ columns, mix = strable.profile(X) # type of each string column, and the table's mix
115
+ ```
116
+
117
+ `strable.list_tables()` names the 108 tables (`list_tables("regression")`, `"classification"`, …). `evaluate` uses the [leaderboard](https://gblayer.github.io/strable-leaderboard/)'s folds, metrics and checks; with no `tables`, it runs every regression table for a regressor and every classification table for a classifier. Scores can move slightly with other library versions: SciPy 1.17 and later shift the Tf-Idf features by about 1e-7, and learners change across scikit-learn versions. The leaderboard's environment has scikit-learn 1.7.2, SciPy 1.16.3 and skrub 0.7.0. The tables are public, so no Hugging Face token is needed. On its first call, `profile` downloads NLTK's `words` and `stopwords` corpora (about 800 KB) if they are missing. The package does not include the paper's experiments: for those, set up the full environment of Step 1 below.
118
+
119
+ ---
120
+
121
+ ## 🗂️ Repository layout
122
+
123
+ ```text
124
+ strable/
125
+ ├── configs/
126
+ │ ├── exp_configs.py
127
+ │ ├── model_parameters.py
128
+ │ ├── paper_runs.py # Runs (<ABLATION>/<save_dir>) each paper figure reads
129
+ │ └── path_configs.py
130
+ ├── data/
131
+ │ └── download_datasets.py
132
+ ├── figures/
133
+ │ ├── _main.py
134
+ │ ├── pareto_plot.png
135
+ │ ├── main_paper/
136
+ │ └── appendix/
137
+ ├── scripts/
138
+ │ ├── download_datasets.py
139
+ │ ├── compile_results.py
140
+ │ ├── compile_results_llm_times.py
141
+ │ ├── datasets_metadata_recap.py
142
+ │ ├── datasets_representation.py
143
+ │ ├── embedding_extraction_scripts/
144
+ │ ├── evaluate_scripts/
145
+ │ ├── script_preprocess_data/
146
+ │ ├── script_data_modification/
147
+ │ ├── natural_language_test_VSE_vs_STRABLE_vs_CARTE_vs_TTB.py
148
+ │ ├── OHE_vs_passthrough_analysis_xgb.py
149
+ │ └── qwen-3-8b_matrioska_embedding_check.py
150
+ ├── src/
151
+ │ ├── encoding.py
152
+ │ ├── llm_encoder.py
153
+ │ ├── inference.py
154
+ │ ├── param_search.py
155
+ │ ├── utils_evaluation.py
156
+ │ ├── utils_preprocess.py
157
+ │ └── utils_visualization.py
158
+ ├── strable/ # the pip package: tables, folds, evaluate, Tf-Idf, profile
159
+ ├── tests/ # tests of the package (pytest)
160
+ ├── requirements.txt
161
+ ├── pyproject.toml
162
+ └── LICENSE
163
+ ```
164
+
165
+ `results/`, `results_pics/`, `results_tables/`, `results_compiled/`, and `data/data_processed*` are runtime-generated and gitignored. The repository ships no results CSV: every figure input is produced by the pipeline below.
166
+
167
+ ---
168
+
169
+ ## 🛠️ Step 1 – Install
170
+
171
+ Python **3.12**.
172
+
173
+ ```bash
174
+ python3 -m venv .venv && source .venv/bin/activate
175
+ pip install -r requirements.txt
176
+ export STRABLE_ROOT=$(pwd)
177
+ export HF_TOKEN=hf_<your-token>
178
+ ```
179
+
180
+ `HF_HOME` controls the Hugging Face cache (default `~/.cache/huggingface`).
181
+
182
+ > **TabPFN-2.5** — the `tabpfn` and `realtabpfn` learners load the paper's checkpoints from `data/models/tabpfn_2_5/` (Prior Labs' licence applies):
183
+ > ```bash
184
+ > hf download Prior-Labs/tabpfn_2_5 --revision 6c45f3a6d0d07c6c5f62572e04a0c2929de91b8b --local-dir data/models/tabpfn_2_5 \
185
+ > tabpfn-v2.5-classifier-v2.5_default.ckpt tabpfn-v2.5-regressor-v2.5_default.ckpt \
186
+ > tabpfn-v2.5-classifier-v2.5_real.ckpt tabpfn-v2.5-regressor-v2.5_real.ckpt
187
+ > ```
188
+
189
+ > **ContextTab** is not on PyPI: `requirements.txt` installs it (`sap_rpt_oss`) from <https://github.com/SAP-samples/sap-rpt-1-oss> at the commit the paper used, so `pip` needs `git`.
190
+
191
+ ---
192
+
193
+ ## 💾 Step 2 – Get the data
194
+
195
+ Paths are wired automatically through [`configs/path_configs.py`](https://github.com/soda-inria/strable/blob/main/configs/path_configs.py).
196
+
197
+ ### 2a. Default variant (Hugging Face) — 🤗
198
+
199
+ The main benchmark (108 preprocessed tables) is mirrored on the [`inria-soda/STRABLE-benchmark`](https://huggingface.co/datasets/inria-soda/STRABLE-benchmark) Hugging Face repository.
200
+
201
+ ```bash
202
+ python data/download_datasets.py
203
+ ```
204
+
205
+ This populates `data/data_processed/`.
206
+
207
+ ### 2b. Ablation variants (Google Drive)
208
+
209
+ The three ablation variants are released as a single Drive bundle:
210
+
211
+ 📦 <https://drive.google.com/file/d/1wq2edCjNUGi2uBwAKgGj5eikswmFxFEZ/view?usp=sharing>
212
+
213
+ | Variant CLI flag | Folder | Used by |
214
+ |---|---|---|
215
+ | `default` | `data/data_processed/` | `script_evaluate.py`, `script_evaluate_30_thres_*.py`, `script_evaluate_impute_missing_val.py` |
216
+ | `full` | `data/data_processed_FULL/` | `script_evaluate_FULL.py` |
217
+ | `feature-eng` | `data/data_processed_feature_eng/` | `script_evaluate_feature_eng.py` |
218
+ | `raw-targets` | `data/data_processed_skewness_inverse_transformation/` | `script_evaluate_skewness.py` |
219
+
220
+ ```bash
221
+ python scripts/download_datasets.py # default only
222
+ python scripts/download_datasets.py --variants default,full,feature-eng,raw-targets
223
+ ```
224
+
225
+ ### 2c. Re-running preprocessing from raw sources 🛠️
226
+
227
+ The Drive bundle does not include upstream raw files. To regenerate:
228
+
229
+ 1. Get raw sources from the URLs in **Appendix C.4** of the paper.
230
+ 2. Drop them under `<STRABLE_ROOT>/data/data_raw/`, at the path each script's `data_path = …` names (most scripts read `data/data_raw/<file>`).
231
+ 3. Run:
232
+ - [`scripts/script_preprocess_data/`](https://github.com/soda-inria/strable/tree/main/scripts/script_preprocess_data) — for the default 108 tables.
233
+ - [`scripts/script_data_modification/script_preprocess_subsample_75k/`](https://github.com/soda-inria/strable/tree/main/scripts/script_data_modification/script_preprocess_subsample_75k) — for the tables subsampled to 75,000.
234
+ - [`scripts/script_data_modification/script_preprocess_feature_eng/feature_engineering_performed/`](https://github.com/soda-inria/strable/tree/main/scripts/script_data_modification/script_preprocess_feature_eng) — `feature-eng` variant for 43 datasets. Runs **on top of** `data/data_processed/` (i.e. after the default preprocessing), not on the raw sources.
235
+ - [`scripts/script_data_modification/apply_inverse_label_transformation.py`](https://github.com/soda-inria/strable/blob/main/scripts/script_data_modification/apply_inverse_label_transformation.py) — `raw-targets` variant: undoes the default skewness transform on regression labels.
236
+
237
+ ### 2d. Benchmarks comparison (CARTE / TTB / VSE)
238
+
239
+ Required only to reproduce the cross-benchmark appendix Figure E.1.
240
+
241
+ | Benchmark | Source | Layout |
242
+ |---|---|---|
243
+ | **CARTE** | [CARTE benchmark](https://tinyurl.com/carte-benchmark) | `data/CARTE_datasets/` |
244
+ | **TTB** | <https://github.com/mrazmartin/TextTabBench/tree/main/datasets_notebooks/paper_datasets> | `data/TTB_datasets/paper_datasets/` |
245
+ | **VSE** | <https://figshare.com/articles/dataset/Datasets_with_text_entries/24879042?file=43775007> | `data/VSE_datasets/` |
246
+
247
+ ---
248
+
249
+ ## 🚦 Pipeline
250
+
251
+ 1. **Data** (Step 2 above).
252
+ 2. **Pre-compute LLM embeddings** — only for LLM-encoder pipelines. Non-LLM encoders (TableVectorizer / TargetEncoder / Tf-Idf) and end-to-end learners (ContextTab / TabSTAR / Mambular / Catboost) do **not** need this step:
253
+ ```bash
254
+ python scripts/embedding_extraction_scripts/script_extract_llm_embeddings.py \
255
+ -m llm-qwen3-8b -dn all-wide -ns 3 -fi all -dv cuda -cf False -oc False
256
+ ```
257
+ GPU memory: the 8B encoders (Qwen-3-8B, LLaMA-3.1-8B) run in float32, as in the paper, so their weights alone take 30 to 32 GB; use a GPU with at least 40 GB (e.g. A40, A100). When a batch does not fit, the script retries with half the batch.
258
+ 3. **Run the experiment.** Each `scripts/evaluate_scripts/script_evaluate*.py` writes under an ablation folder: `script_evaluate.py` under `default`, or `no-pca` with `--no_pca True`; each other script under its hard-coded `ABLATION` tag (`ct30-ohe`, `ct30-passthrough`, `feature-eng`, `full-data`, `imputed`, `no-target-transform`).
259
+
260
+ ![STRABLE cross-validation protocol](https://raw.githubusercontent.com/soda-inria/strable/main/figures/strable_cv_protocol.png)
261
+
262
+ Output lands at:
263
+
264
+ ```
265
+ results/<ABLATION>/<save_dir>/<dataset>/<method_marker>/score/<marker>.csv
266
+ ```
267
+
268
+ Each variant takes the same core flags (`-dn -ns -m -fi -dv -cf -oc -ti -sd -norm -nopca -ndim`); `script_evaluate.py` also takes `--dry-run`, and `script_evaluate_impute_missing_val.py` adds `-mvp/--missing_val_policy`.
269
+
270
+ ```bash
271
+ python scripts/evaluate_scripts/script_evaluate.py \
272
+ --save_dir benchmark_main -m num-str_tabvec_xgb \
273
+ -dn all-wide -ns 3 -fi all -dv cpu -cf False -oc False -ti default
274
+ ```
275
+ 4. **Compile per-fold scores**:
276
+ ```bash
277
+ python scripts/compile_results.py default/benchmark_main
278
+ # → results/compiled_results/result_default_benchmark_main.csv
279
+ ```
280
+ The output name is always `result_<run name with "/" → "_">.csv` (`compiled_results_path()` in [`configs/path_configs.py`](https://github.com/soda-inria/strable/blob/main/configs/path_configs.py)).
281
+ 5. **Figures**: one script per figure, runnable independently. Scripts read benchmark results only from compiled runs; the runs they need (run name, script, flags, methods) are listed once in [`configs/paper_runs.py`](https://github.com/soda-inria/strable/blob/main/configs/paper_runs.py). `python configs/paper_runs.py` prints the evaluate + compile commands for all of them. A figure needs the compiled results of every run it reads, so the figures come after the full benchmark. They also read per-table statistics (rows, columns, cardinality, string length, missing values) that `scripts/datasets_representation.py` writes once to `dataset_summary_wide.parquet`.
282
+ ```bash
283
+ python scripts/datasets_representation.py
284
+ python figures/main_paper/figure_3.py
285
+ python figures/appendix/figure_E10.py
286
+ ```
287
+ Outputs land in `results_pics/<YYYY-MM-DD>/` (tables in `results_tables/<YYYY-MM-DD>/`).
288
+
289
+ ---
290
+
291
+ ## ⚡ Quickstart pipelines
292
+
293
+ Each block below is copy-paste runnable. Adjust `-dv cpu/cuda` for your hardware.
294
+
295
+ ### 1. Fresh-environment setup
296
+
297
+ ```bash
298
+ python3 -m venv .venv && source .venv/bin/activate
299
+ pip install -r requirements.txt
300
+ export STRABLE_ROOT=$(pwd)
301
+ export HF_TOKEN=hf_<your-token>
302
+ python scripts/download_datasets.py
303
+ ```
304
+
305
+ ### 2. Embedding extraction with a light LLM
306
+
307
+ ```bash
308
+ python scripts/embedding_extraction_scripts/script_extract_llm_embeddings.py \
309
+ -m llm-all-MiniLM-L6-v2 \
310
+ -dn yelp_business beer-ratings \
311
+ -ns 3 -fi all -dv cpu -cf False -oc False
312
+ ```
313
+
314
+ ### 3. End-to-end learner on one dataset
315
+
316
+ ```bash
317
+ python scripts/evaluate_scripts/script_evaluate.py \
318
+ --save_dir benchmark_main -m num-str_contexttab_contexttab \
319
+ -dn yelp_business -ns 3 -fi 0 \
320
+ -dv cpu -cf False -oc False -ti default
321
+ python scripts/compile_results.py default/benchmark_main
322
+ ```
323
+
324
+ ### 4. Light learner, tuned, on a few datasets
325
+
326
+ ```bash
327
+ python scripts/evaluate_scripts/script_evaluate.py \
328
+ --save_dir benchmark_main -m num-str_tabvec_xgb \
329
+ -dn yelp_business beer-ratings ramen-ratings \
330
+ -ns 3 -fi all -dv cpu -cf False -oc False -ti tune
331
+ python scripts/compile_results.py default/benchmark_main
332
+ ```
333
+
334
+ ### 5. Foundation-model learner with a light encoder
335
+
336
+ ```bash
337
+ python scripts/evaluate_scripts/script_evaluate.py \
338
+ --save_dir benchmark_main -m num-str_tabvec_tabpfn \
339
+ -dn yelp_business beer-ratings ramen-ratings \
340
+ -ns 3 -fi all -dv cuda -cf False -oc False -ti default
341
+ python scripts/compile_results.py default/benchmark_main
342
+ ```
343
+
344
+ ### 6. No-PCA ablation (Fig. 2, E.2)
345
+
346
+ The no-PCA path is a flag on the main script; `--no_pca True` keeps the first `--n_dimensions` raw embedding dimensions instead of running PCA. Re-uses the same embeddings as the default run; only the dimensionality-reduction step differs. Results land under `results/no-pca/...`.
347
+
348
+ ```bash
349
+ python scripts/evaluate_scripts/script_evaluate.py \
350
+ --save_dir benchmark_main -m num-str_llm-qwen3-8b_tabpfn \
351
+ -dn all-wide -ns 3 -fi all \
352
+ -dv cuda -cf False -oc False -ti default \
353
+ --no_pca True
354
+ python scripts/compile_results.py no-pca/benchmark_main
355
+ ```
356
+
357
+ ### 7. CT=30 routing (Fig. E.11)
358
+
359
+ Routes string columns with cardinality `<30` through one-hot encoding (Ridge) or passthrough (XGBoost / TabPFN); columns with cardinality `≥30` still go through the LLM encoder. Two scripts, one per learner family:
360
+
361
+ ```bash
362
+ # LLaMA-3.1-8B embeddings, read by both branches (a gated model: accept its licence on Hugging Face, set HF_TOKEN)
363
+ python scripts/embedding_extraction_scripts/script_extract_llm_embeddings.py \
364
+ -m llm-llama-3.1-8b -dn all-wide -ns 3 -fi all -dv cuda -cf False -oc False
365
+
366
+ # OHE branch (Ridge)
367
+ python scripts/evaluate_scripts/script_evaluate_30_thres_OHE.py \
368
+ --save_dir benchmark_main -m num-str_llm-llama-3.1-8b_ridge \
369
+ -dn all-wide -ns 3 -fi all -dv cuda -cf False -oc False -ti default
370
+ python scripts/compile_results.py ct30-ohe/benchmark_main
371
+
372
+ # Passthrough branch (XGBoost / TabPFN)
373
+ python scripts/evaluate_scripts/script_evaluate_30_thres_lowcard_passthrough.py \
374
+ --save_dir benchmark_main -m num-str_llm-llama-3.1-8b_xgb \
375
+ -dn all-wide -ns 3 -fi all -dv cuda -cf False -oc False -ti default
376
+ python scripts/compile_results.py ct30-passthrough/benchmark_main
377
+ ```
378
+
379
+ ### 8. Full-data ablation (Fig. E.10)
380
+
381
+ Reads from `data/data_processed_FULL/` (un-subsampled tables); requires the matching embeddings extracted via the FULL-variant script.
382
+
383
+ ```bash
384
+ python scripts/embedding_extraction_scripts/script_extract_llm_embeddings_FULL.py \
385
+ -m llm-all-MiniLM-L6-v2 -dn all-wide -ns 3 -fi all -dv cuda -cf False -oc False
386
+
387
+ python scripts/evaluate_scripts/script_evaluate_FULL.py \
388
+ --save_dir benchmark_main -m num-str_llm-all-MiniLM-L6-v2_xgb \
389
+ -dn all-wide -ns 3 -fi all -dv cuda -cf False -oc False -ti default
390
+ python scripts/compile_results.py full-data/benchmark_main
391
+ ```
392
+
393
+ ### 9. Feature-engineering ablation (Fig. E.7)
394
+
395
+ Reads from `data/data_processed_feature_eng/`. Requires running the feature-eng-variant embedding script first.
396
+
397
+ ```bash
398
+ python scripts/embedding_extraction_scripts/script_extract_llm_embeddings_feat_eng.py \
399
+ -m llm-all-MiniLM-L6-v2 -dn all-wide -ns 3 -fi all -dv cuda -cf False -oc False
400
+
401
+ python scripts/evaluate_scripts/script_evaluate_feature_eng.py \
402
+ --save_dir benchmark_main -m num-str_llm-all-MiniLM-L6-v2_xgb \
403
+ -dn all-wide -ns 3 -fi all -dv cuda -cf False -oc False -ti default
404
+ python scripts/compile_results.py feature-eng/benchmark_main
405
+ ```
406
+
407
+ ### 10. Raw-target ablation (Fig. E.8)
408
+
409
+ Reads from `data/data_processed_skewness_inverse_transformation/`, where the default skewness transform on regression labels has been inverted back to the raw target.
410
+
411
+ ```bash
412
+ python scripts/evaluate_scripts/script_evaluate_skewness.py \
413
+ --save_dir benchmark_main -m num-str_tabvec_xgb \
414
+ -dn all-wide -ns 3 -fi all -dv cpu -cf False -oc False -ti default
415
+ python scripts/compile_results.py no-target-transform/benchmark_main
416
+ ```
417
+
418
+ ### 11. Imputation ablation (Fig. E.9)
419
+
420
+ Adds `-mvp/--missing_val_policy` (`uniform_impute` or `none`). Mean imputation for numeric columns and mode for categorical, applied **after** the train/test split.
421
+
422
+ ```bash
423
+ python scripts/evaluate_scripts/script_evaluate_impute_missing_val.py \
424
+ --save_dir benchmark_main -m num-str_tabvec_xgb \
425
+ -dn all-wide -ns 3 -fi all -dv cpu -cf False -oc False -ti default \
426
+ -mvp uniform_impute
427
+ python scripts/compile_results.py imputed/benchmark_main
428
+ ```
429
+
430
+ ### 12. Dry-run on one dataset / one fold
431
+
432
+ ```bash
433
+ python scripts/evaluate_scripts/script_evaluate.py --dry-run \
434
+ --save_dir benchmark_main -m num-str_tabvec_ridge \
435
+ -dn yelp_business -ns 3 -fi 0 \
436
+ -dv cpu -cf False -oc False -ti default
437
+ ```
438
+
439
+ ---
440
+
441
+ ## 🏷️ Method tokens (`-m / --method`)
442
+
443
+ Method strings have the form `<dtype>_<encoder>_<learner>`. The full enumeration of valid combinations lives in [`scripts/evaluate_scripts/METHOD_NAMES.md`](https://github.com/soda-inria/strable/blob/main/scripts/evaluate_scripts/METHOD_NAMES.md); display-name maps live in [`figures/_main.py`](https://github.com/soda-inria/strable/blob/main/figures/_main.py) (`dtype_map`, `encoder_map`, `learner_map`).
444
+
445
+ The `_default` / `_tune` suffix is appended automatically based on `-ti / --tune_indicator`; do **not** put it in `-m`. `scripts/compile_results.py` adds it to the compiled `method` column (e.g. `num-str_tabvec_xgb_tune`) for learners listed in `estim_configs` ([`configs/exp_configs.py`](https://github.com/soda-inria/strable/blob/main/configs/exp_configs.py)); the other learners keep the bare name (`num-str_contexttab_contexttab`).
446
+
447
+ ---
448
+
449
+ ## 📑 Citation
450
+
451
+ If you use STRABLE in your work, please cite:
452
+
453
+ ```bibtex
454
+ @misc{blayer2026strablebenchmarkingtabularmachine,
455
+ title={STRABLE: Benchmarking Tabular Machine Learning with Strings},
456
+ author={Gioia Blayer and Myung Jun Kim and Félix Lefebvre and Lennart Purucker and Alan Arazi and Eilam Shapira and Roi Reichart and Frank Hutter and Marine Le Morvan and David Holzmüller and Gaël Varoquaux},
457
+ year={2026},
458
+ eprint={2605.12292},
459
+ archivePrefix={arXiv},
460
+ primaryClass={cs.LG},
461
+ url={https://arxiv.org/abs/2605.12292},
462
+ }
463
+ ```
464
+
465
+ ## ⚖️ License
466
+
467
+ This project is released under the [BSD 3-Clause License](https://github.com/soda-inria/strable/blob/main/LICENSE).