File size: 6,445 Bytes
7925dbe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
---
language:
- en
license: mit
size_categories:
- 1M<n<10M
task_categories:
- text-classification
- feature-extraction
- text-retrieval
tags:
- tabular
- embedding
- benchmark
- contrastive-learning
- retrieval
- classification
pretty_name: TabBench - Tabular Embedding Benchmark
---

<div align="center">

# TabBench: Tabular Embedding Benchmark

### A Comprehensive Evaluation Suite for Tabular Embedding Models

[![GitHub](https://img.shields.io/badge/GitHub-TabEmbed-black)](https://github.com/qiangminjie27/TabEmbed)

</div>

---

## Overview

**TabBench** is a comprehensive benchmark designed to evaluate the tabular understanding capability of embedding models. It assesses two critical dimensions of tabular representation: **linear separability** (via classification) and **semantic alignment** (via retrieval).

TabBench aggregates diverse datasets from four authoritative repositories and provides a standardized evaluation pipeline.

## Benchmark Statistics

| Category | Count | Samples / Corpus |
|:---|---:|---:|
| **Classification** | | |
| Grinsztajn | 56 datasets | 521,889 |
| OpenML-CC18 | 66 datasets | 249,939 |
| OpenML-CTR23 | 34 datasets | 210,026 |
| UniPredict | 155 datasets | 386,618 |
| *Classification Total* | *311 datasets* | *1,368,472* |
| **Retrieval** | | |
| Corpus | — | 1,394,247 |
| Numeric Queries | 10,000 | — |
| Categorical Queries | 10,000 | — |
| Mixed Queries | 10,000 | — |
| *Retrieval Total* | *30,000 queries* | *1,394,247* |

## Data Format

### Serialization

All tabular rows are serialized into natural language using the template:

```
The {column_name} is {value}. The {column_name} is {value}. ...
```

For example:
```
The age is 25. The occupation is Engineer. The salary is 75000.50. The city is New York.
```

### Classification Task

Each dataset directory contains:
- `train.jsonl` / `test.jsonl`: Each line is a JSON object with the following fields:
  - `text`: Serialized tabular row
  - `label`: Target label (string)
  - `dataset`: Dataset name
  - `benchmark`: Source benchmark name
  - `task_type`: Task type (`clf`)
- `train.csv` / `test.csv`: Original tabular data in CSV format
- `metadata.json`: Dataset metadata including `dataset`, `benchmark`, `sub_benchmark`, `task_type`, `data_type`, `target_column`, `label_values`, `num_labels`, `train_samples`, `test_samples`, `train_label_distribution`, `test_label_distribution`

```json
{"text": "The age is 36. The workclass is Private. The fnlwgt is 172256.0. ...", "label": ">50K", "dataset": "adult", "benchmark": "openml_cc18", "task_type": "clf"}
```

### Retrieval Task

The retrieval directory contains:
- `corpus.jsonl`: Global corpus of serialized rows (~1.4M documents), each with fields `idx`, `text`, `label`, `dataset`, `benchmark`
- `queries.jsonl`: All retrieval queries (30,000 total: 10k numeric + 10k categorical + 10k mixed)

Corpus format:
```json
{"idx": 0, "text": "The V1 is 3.0. The V2 is 559.0. ...", "label": "1.0", "dataset": "albert", "benchmark": "grinsztajn"}
```

Query format:
```json
{
  "task": "retrieval",
  "query_id": "retrieval_numeric_000001",
  "query_text": "find records where Easter is 0",
  "query_type": "numeric",
  "conditions": [{"field": "Easter", "operator": "==", "value": 0.0, "type": "numeric"}],
  "num_conditions": 1,
  "matching_indices": [1384050, 1384051, ...],
  "num_matches": 1822
}
```

## Evaluation Protocol

### Classification (Linear Probing)
1. Extract frozen embeddings for all samples using the target model
2. Train an independent Logistic Regression classifier per dataset (`max_iter=1000`, `random_state=42`)
3. Report **Accuracy** and **Macro-F1** on the test split

### Retrieval (Dense Retrieval)
1. Encode all corpus documents and queries
2. Build a Faiss `IndexFlatIP` index (cosine similarity via L2-normalized vectors)
3. Retrieve top-k documents for each query
4. Report **MRR@10** and **nDCG@10**

### Overall Score
The **Overall** metric is the macro-average of Accuracy, F1, MRR@10, and nDCG@10.

## Leaderboard

| Model | #Params | Overall | Accuracy | F1 | MRR@10 | nDCG@10 |
|:---|:---:|:---:|:---:|:---:|:---:|:---:|
| Jina-Embeddings-v3 | 0.6B | 41.48 | 60.33 | 46.11 | 32.49 | 26.98 |
| Jasper-Token-Compression | 0.6B | 42.75 | 61.25 | 47.69 | 33.56 | 28.50 |
| Qwen3-Embedding-0.6B | 0.6B | 44.92 | 62.81 | 50.32 | 36.00 | 30.56 |
| **TabEmbed-0.6B** | **0.6B** | **65.27** | **67.16** | **56.56** | **71.72** | **65.64** |
| F2LLM-4B | 4B | 48.02 | 64.92 | 52.48 | 40.60 | 34.08 |
| Octen-Embedding-4B | 4B | 48.62 | 65.36 | 53.64 | 40.97 | 34.51 |
| Qwen3-Embedding-4B | 4B | 48.91 | 65.09 | 52.72 | 42.04 | 35.76 |
| **TabEmbed-4B** | **4B** | **70.71** | **69.51** | **59.75** | **79.33** | **74.25** |
| SFR-Embedding-Mistral | 7B | 49.42 | 64.28 | 50.75 | 44.23 | 38.41 |
| Linq-Embed-Mistral | 7B | 50.74 | 66.06 | 53.33 | 44.65 | 38.92 |
| GTE-Qwen2-7B-Instruct | 7B | 51.27 | 64.67 | 51.76 | 47.44 | 41.19 |
| Qwen3-Embedding-8B | 8B | 48.03 | 65.08 | 52.81 | 40.06 | 34.16 |
| **TabEmbed-8B** | **8B** | **71.62** | **69.88** | **60.19** | **80.58** | **75.83** |

## Quick Start

```bash
# Clone the evaluation code
git clone https://github.com/qiangminjie27/TabEmbed.git
cd TabEmbed
pip install -r requirements.txt

# Run evaluation
python src/run_benchmark.py \
    --benchmark_dir /path/to/TabBench \
    --model_name_or_path your-model-name \
    --output_dir results/ \
    --max_seq_length 1024 \
    --batch_size 64
```

## Source Datasets

TabBench is built upon the following high-quality data sources:
- [Grinsztajn et al. (2022)](https://arxiv.org/abs/2207.08815) — Tree-based models benchmark
- [OpenML-CC18](https://www.openml.org/s/99) — OpenML curated classification benchmark
- [OpenML-CTR23](https://www.openml.org/s/336) — OpenML tabular regression benchmark
- [UniPredict](https://arxiv.org/abs/2310.03266) — Universal prediction benchmark

Raw evaluation data is sourced from [tabula-8b-eval-suite](https://huggingface.co/datasets/mlfoundations/tabula-8b-eval-suite).

## Citation

If you use TabBench in your research, please cite:

> Paper coming soon. Please check back later for the BibTeX citation.

## License

This benchmark is released under the [MIT License](https://opensource.org/licenses/MIT).

Note: The individual upstream datasets included in this benchmark may have their own respective licenses. Please refer to the original data sources for their specific terms.