ZTab Beats GPT-4o at Reading Messy Tables Without Touching Your Data
A new framework fine-tunes an annotation model on synthetic tables built from class prototypes, dodging the privacy and accuracy limits of GPT-based zero-shot approaches.
ProTakeaways
- ZTab is a domain-based zero-shot framework for annotating semantic column types without user-labeled training data.
- Fine-tunes an LLM on pseudo-tables built from class prototypes and sample schemas, sidestepping data collection.
- ZTab-performance beats the strongest GPT-4o zero-shot baseline by 4.5% micro-F1 on In-Domain generalization.
- ZTab-privacy runs fully local with open-source 7B models and beats the best open-source baseline by 23.5%.
- A 1.5B Qwen variant outperforms Llama3.1-70B baselines despite being 47x smaller, enabling edge deployment.
- Code and datasets available on GitHub; published at IEEE ICDE 2026.
Tables in the wild are messy. Headers get stripped by ETL pipelines, replaced with placeholders like col1, or filled with unhelpful strings like Value. Recovering the semantic type of each column, is this a Country, a GDP figure, or a person's name, is a foundational step for data lakes, schema matching, and data discovery. A new ICDE 2026 paper called ZTab proposes a domain-based zero-shot framework that fine-tunes an LLM on synthetic tables built from class prototypes, and it beats GPT-4o baselines while offering a fully local, privacy-preserving variant.
Why zero-shot table annotation has been stuck
The dominant approaches today fall into two camps, both flawed. Supervised methods like Sherlock, SATO, Doduo, and RECA fine-tune BERT on labeled tabular data, but collecting that data is expensive and often blocked by regulations like HIPAA or GDPR. They also generalize poorly: models like HNN and ColNet trained on T2D show weak performance on Limaye and Efthymiou datasets despite shared classes.
The alternative, LLM-based zero-shot annotation with GPT or Llama, has three well-documented pain points:
- Accuracy collapses with many classes. LLMs struggle with closely related classes like addressRegion, addressLocality, streetAddress, and PostalAddress, and it gets worse as the class count grows.
- Weak grasp of table structure. LLMs pre-trained on unstructured text struggle to learn structural relationships between columns within tables.
- Privacy leakage. The best performers require sending real user tables to closed-source APIs.
The trick: fine-tune on tables that never existed
ZTab reframes the problem. Instead of training on user data or prompting a giant model at inference time, it takes only a schema-level configuration: a list of semantic types (e.g., Country, Capital, GDP) plus some sample table schemas describing which types appear together. From that, it manufactures its own training data.
The learning phase runs in three steps:
- Class prototype generation. For each class, a prototype LLM is prompted with something like "Generate 500 real-world examples of the semantic type City commonly found in web tables." The result is a bank of representative values per class.
- Pseudo-table assembly. For each sample schema, ZTab randomly samples
kvalues from the prototype bank of every column type in that schema, stitching together a fake but realistically structured table. Crucially, the pseudo-table for a given schema is constructed on the fly during each epoch, so it can differ between epochs, increasing data diversity. - Fine-tuning. An annotation LLM is fine-tuned on these pseudo-tables using a column-by-column prompt design. Each prompt shows the full table for context but asks the model to label only one target column at a time.
At inference, the fine-tuned model annotates columns of an unseen table. A label remapping step handles the case where the model outputs a token that isn't literally in the target ontology, mapping it to the closest class by cosine similarity in the model's embedding space.
Two flavors: privacy or peak accuracy
The framework ships as two variants that trade off privacy against performance:
| Variant | Prototype + Annotation LLM | Data leaves your machine? |
|---|---|---|
| ZTab-privacy | Open-source: Llama3.1-70B, Qwen2.5-7B, Mistral-7B, Qwen-1.5B | No |
| ZTab-performance | Closed-source: GPT-3.5, GPT-4o-mini, GPT-4o, GPT-4.1-mini | Yes |
The privacy variant regenerates pseudo-tables every epoch for maximum diversity. The performance variant pre-generates them once because the closed-source fine-tuning policy requires providing a fixed training dataset in advance rather than generating new samples during fine-tuning.
How much does it help?
The authors evaluate on seven datasets, WikiTable, T2D, Limaye, Efthymiou, and three variants of SOTAB-V2, covering three generalization regimes. The headline numbers on micro-F1:
- In-Domain: ZTab-performance outperforms the strongest GPT-4o baseline by 4.5%, and ZTab-privacy with 7-8B parameter open-source models improves over the strongest open-source baseline by 23.5%.
- Cross-Domain (train on T2D, test on Limaye/Efthymiou): ZTab-performance improves existing zero-shot baselines by at least 2.7%, and ZTab-privacy by 1.4%. It also beats supervised models like Doduo by 26.8% here, because supervised models overfit to T2D.
- Cross-Ontology (Schema.org to DBpedia): ZTab-performance beats baselines by 3.8%, ZTab-privacy by 9.5%.
A notable practical result: the compact Qwen-1.5B annotator, roughly 47x smaller than Llama3.1-70B, still outperforms the 70B baseline on In-Domain (+18.7%) and Cross-Ontology (+3.9%) settings. That makes on-device or edge deployment realistic.
Where it falls short
ZTab still lags true supervised models when clean labeled tables exist for the target domain. On In-Domain SOTAB and WikiTable, Doduo and ArcheType finetuned on user data beat ZTab-performance by 6-7 F1 points. It also isn't a free lunch computationally: fine-tuning takes a few minutes for T2D but around seven hours for WikiTable on 4x RTX 6000 Ada GPUs, though this cost is amortized because no retraining is needed as long as the test domain fits one of the three generalization scenarios.
The framework is also currently scoped to simple relational tables. Merged cells, multi-level headers, or nested JSON require either a preprocessing step (flattening or extracting via tools like TWIX) or modifying the pseudo-table generation to handle complex structures directly.
Why this matters beyond the leaderboard
The real innovation isn't just a better score. It's the observation that you can fine-tune an LLM for a structured task using only schema-level configuration, no user data, no labels, no scraping. The class list plus a handful of schema templates is enough for the LLM's world knowledge to bootstrap useful training examples. That pattern likely generalizes to other tabular tasks like column relationship extraction, entity linking, and schema matching.
The code and datasets are on GitHub. If you're doing data cataloging, building a data lake search layer, or automating column tagging for privacy compliance, ZTab-privacy is worth trying: it runs entirely locally with a 1.5B or 7B model and comfortably outperforms Llama3.1-70B on the task.