TabSketchFM: Sketch-Based Tabular Representation Learning for Data Discovery Over Data Lakes

Aamod Khatiwada, Harsha Kokel, Ibrahim Abdelaziz, Subhajit Chaudhury, Julian Dolby, Oktie Hassanzadeh, Zhenhan Huang, Tejaswini Pedapati, Horst Samulowitz, Kavitha Srinivas

TL;DR

TabSketchFM is a novel transformer-based model designed to navigate massive "data lakes" by representing tables as compact statistical "sketches" rather than raw text. By bypassing the token limits of traditional language models, it achieves state-of-the-art performance in identifying joinable, unionable, and subset table pairs across diverse enterprise datasets.

What Problem Does This Paper Address?

Modern enterprises store critical data in "data lakes"—vast, often messy repositories of tabular data. A core challenge for data scientists and engineers is data discovery: finding tables that are related to one another. Specifically, they need to find tables that can be joined (sharing a common key), unioned (containing similar types of data to expand a dataset), or identified as subsets (detecting copies or partial overlaps for data privacy compliance).

Existing tabular neural models typically "linearize" tables, turning cell values into sentences. This approach has two major flaws:

  1. Token Limits: Standard encoders (like BERT) are limited to ~512 tokens. You simply cannot fit a table with millions of rows into that window.
  2. Loss of Numerical Semantics: Treating numbers as text strings ignores their mathematical properties (e.g., the relationship between a mean and a percentile).

Methods

The authors introduce TabSketchFM, which adapts the BERT architecture to process "sketches"—mathematical summaries of a column's content—instead of raw cell values.

The Sketching Process

For every column, the model generates:

  • Numerical Sketches: Statistical features like mean, standard deviation, and percentiles (10th through 90th).
  • MinHash Sketches: A technique used to estimate the Jaccard similarity (overlap) between sets. They create MinHashes for both raw cell values and individual words within those values.
  • Content Snapshots: A table-level MinHash derived from the first 10,000 rows to capture the "flavor" of the entire table.

Architecture

As shown in Figure 1, these sketches are converted into embeddings and summed with traditional NLP embeddings (column names, positions, and data types).

TabSketchFM Table Representation

The model undergoes two phases:

  1. Pre-training: Using Masked Language Modeling (MLM) on a massive corpus of 197,000 enterprise-like tables. The model learns to predict a masked column name based on the surrounding column names and their associated sketches.
  2. Fine-tuning: The model is converted into a "cross-encoder" (Figure 2) to predict the relationship between two input tables.
Pretraining and Finetuning Architectures

Datasets

  • LakeBench: A suite of 8 benchmarks covering union, join, and subset tasks.
  • Enterprise Corpus: ~197k tables from CKAN and Socrata used for pre-training.
  • New Benchmarks: Because no standard benchmarks existed for certain search tasks, the authors created Wiki Join (based on Wikidata entity mappings) and Eurostat Subset (using European Union open data).

Key Insights and Ideas

  • Task-Specific Sketch Importance: The authors' ablation study revealed that different sketches drive different tasks. MinHash is the "MVP" for join tasks (where value overlap is key), while Numerical Sketches are essential for identifying subsets (where the distribution of data must match).
  • Contextual Disambiguation: A column named "Age" means something different in a table about "Buildings" than in one about "People." By using a transformer, TabSketchFM uses the other column names in the table to disambiguate these semantics.
  • The Power of Hybridization: While sketches are great for overlap, they sometimes miss pure semantic meaning. The authors found that concatenating TabSketchFM embeddings with SBERT (Sentence-BERT) embeddings—which focus on the meaning of the text—created a "best of both worlds" model for union search.

Key Results

  • Superiority over SOTA: TabSketchFM outperformed established models like TUTA, TaBERT, and TABBIE on 5 out of 8 LakeBench tasks.
  • The Subset Breakthrough: On the CKAN Subset task, TabSketchFM achieved an F1 score of 0.98, while all other baseline models failed completely, performing no better than random guessing (~0.43).
  • Search Performance: In the Wiki Join search, TabSketchFM achieved a Mean F1 of 89.09, which jumped to 92.81 when combined with SBERT, rivaling specialized traditional join methods like Josie.
  • Generalization: Models fine-tuned on one domain (e.g., Wiki data) generalized remarkably well to entirely different domains (e.g., Eurostat), proving the robustness of the pre-trained representations.

Limitations and Future Work

The authors note that while sketches are efficient, they are lossy. A purely sketch-based approach might miss very subtle semantic relationships that only raw cell values can provide. Future work could involve more sophisticated ways to integrate "snippets" of raw data alongside sketches. Additionally, while the model is robust to row shuffling, column order still has a minor impact on the transformer's attention mechanism, which could be further optimized for true permutation invariance.

Summary updated

BibTeX
@inproceedings{khatiwada2025tabsketchfm,
  author = {Aamod Khatiwada and Harsha Kokel and Ibrahim Abdelaziz and Subhajit Chaudhury and Julian Dolby and Oktie Hassanzadeh and Zhenhan Huang and Tejaswini Pedapati and Horst Samulowitz and Kavitha Srinivas},
  title = {{TabSketchFM: Sketch-Based Tabular Representation Learning for Data Discovery Over Data Lakes}},
  booktitle = {ICDE},
  year = {2025},
  doi = {10.1109/icde65448.2025.00118},
}
Figure