*TABERTA visualized: a wise owl learning a relevance function f(q,T) while riding a dragon that brute-forces the table space ... fast, fearless, and only slightly less chaotic thanks to structure-aware supervision (illustration generated with ChatGPT 5.2).
TABERTA: Structure-Aware Table Retrieval with Bi-Encoders
TABERTA is a structure-aware fine-tuning framework for learning dense representations of relational tables.
Unlike approaches that flatten tables into unstructured text, TABERTA explicitly exposes schema structure and table content through controlled serialization views and retrieval-oriented training objectives.
The resulting table encoders support accurate and generalizable table retrieval across heterogeneous tasks, including:
ad-hoc dataset discovery,
question answering evidence selection,
fact verification,
and schema grounding for text-to-SQL.
This repository provides:
the TABERTA codebase (training, serialization, evaluation),
and 7 fine-tuned table encoders, released via Hugging Face.
Core Idea
Given a natural-language query ( q ) and a corpus of tables ( \mathcal{T} ), TABERTA learns an encoder
( E(\cdot) ) such that relevant tables are ranked highly using standard similarity search.
Two design choices are central:
Serialization View — how table structure and content are exposed to the encoder.
Fine-Tuning Objective — how retrieval relevance is learned.
TABERTA systematically studies the interaction between these choices.
Table Serialization Views
TABERTA supports three complementary serialization strategies:
SchemaView
Encodes only schema-level information (table name, column names, types).
Emphasizes structural and semantic intent.
Robust to noise and large tables.
Best suited for ad-hoc table retrieval and dataset discovery.
RowView
Encodes individual rows paired with schema context.
Grounds semantics in concrete values.
Supports evidence-based retrieval.
Useful when relevance depends on specific tuples.
Hybrid / FullView
Combines schema information with sampled or aggregated table content.
Balances abstraction and grounding.
Most general and consistently effective across tasks.
Used as the default in cross-benchmark evaluation.
Released Models
All models are bi-encoders initialized from a sentence-transformer backbone and fine-tuned for table retrieval.
They differ in supervision signal and training objective.
TABERTA is fine-tuned on WikiDBs, a large-scale corpus of relational databases automatically extracted from Wikidata, containing over 100K databases and 1.6M tables spanning diverse domains and realistic schema designs. WikiDBs is used only for representation learning no downstream benchmark queries or relevance labels are observed during training by making the learned embeddings reusable across tasks.
1from sentence_transformers import SentenceTransformer
23model = SentenceTransformer("TABERTA/7_hybrid_model_reg")4## you can try all 7 variances of the fine-tuned models and compare between all of them 56## Encode Tables789table_embeddings = model.encode(10 serialized_tables,11 normalize_embeddings=True,12 show_progress_bar=True13)1415161718## Encode Queries and Retrieve19query_embedding = model.encode(query, normalize_embeddings=True)20scores = table_embeddings @ query_embedding
21top_k = scores.argsort()[-k:][::-1]222324## TBA :)25@inproceedings{taberta,26 title ={TABERTA: Structure-Aware Fine-Tuning of Bi-Encoders for Table Retrieval},27 author ={…},28 booktitle ={…},29 year ={2026}30}31