This study addresses the challenge of automatically detecting semantic column types in relational tables, a key task in many real-world applications. Zero-shot modeling eliminates the need for user-provided labeled training data, making it ideal for scenarios where data collection is costly or restricted due to privacy concerns. However, existing zero-shot models suffer from poor performance when the number of semantic column types is large, limited understanding of tabular structure, and privacy risks arising from dependence on high-performance closed-source LLMs. We introduce ZTab, a domain-based zero-shot framework that addresses both performance and zero-shot requirements. Given a domain configuration consisting of a set of predefined semantic types and sample table schemas, ZTab generates pseudo-tables for the sample schemas and fine-tunes an annotation LLM on them. ZTab is domain-based zero-shot in that it does not depend on user-specific labeled training data; therefore, no retraining is needed for a test table from a similar domain. We describe three cases of domain-based zero-shot. The domain configuration of ZTab provides a trade-off between the extent of zero-shot and annotation performance: a "universal domain" that contains all semantic types approaches "pure" zero-shot, while a "specialized domain" that contains semantic types for a specific application enables better zero-shot performance within that domain. Source code and datasets are available at https://github.com/hoseinzadeehsan/ZTab
Figures & tables
Fig. 1: Comparison between (a) pure zero-shot column type annotation and (b) domain-based zero-shot ZTab. ZTab takes a class list and table schema collection as inputs, generates class prototypes (1) and pseudo-tables based on class prototypes (2), and fine-tunes an annotation LLM (3).
Dataset
# Class
# Training Tables
# Test Tables
WikiTable
255
397098
4764
SOTAB sch
82
44769
609
SOTAB sch-s
82
10631
609
SOTAB dbp
46
37631
279
T2D
37
160
109
Efthymiou
31
-
614
TABLE I: Summary of datasets
Category
Model
Train Data
Inf. Disclosure
Ours (Privacy)
ZTab-pri (Llama3.1-70B,Qwen-1.5B)
No
No
ZTab-pri (Llama3.1-70B,Llama-7B)
No
No
ZTab-pri (Llama3.1-70B,Mistral-7B)
No
No
ZTab-pri (Llama3.1-70B,Qwen2.5-7B)
No
No
Ours (Performance)
ZTab-per (GPT-4.1-mini,GPT-4.1-mini)
No
Yes
ZTab-per (GPT-4o-mini,GPT-4o-mini)
No
Yes
TABLE II: ZTab, baselines, and reference algorithms. Yes/No indicates whether a model uses training data and whether user information is disclosed at inference time.
Category
Model
In-Domain
Cross-Domain
Cross-Ontology
Comparing ZTab-privacy with zero-shot baselines that use open-source LLMs
TableLlama (Llama-7B)
48.2
77.5
38.1
ZTab-pri (Llama3.1-70B,Llama-7B)
65.7
82.0
67.1
Jellyfish (Mistral-7B)
24.0
68.5
26.7
ZTab-pri (Llama3.1-70B,Mistral-7B)
69.1
87.4
72.1
ArcheType ZS (T5)
43.3
73.0
48.3
GPT-20B-based
21.9
80.0
26.6
TABLE III: Main results: we compare ZTab-privacy with zero-shot baselines that use open-source LLMs, and compare ZTab-performance with zero-shot baselines that use closed-source LLMs.
In-Domain
Category
Model
WikiTable
SOTAB sch
SOTAB sch-s
SOTAB dbp
T2D
Efthymiou
Limaye
Zero-shot
TableLlama (Llama-7B)
59.6
32.6
32.6
38.1
78.2
68.9
86.0
ZTab-pri (Llama3.1-70B,Llama-7B)
24.7
73.1
71.9
69.6
90.4
82.5
85.9
Jellyfish (Mistral-7B)
0.0
8.4
8.4
26.7
76.7
58.9
78.0
ZTab-pri (Llama3.1-70B,Mistral-7B)
30.6
74.6
73.5
73.2
93.5
87.0
91.1
ArcheType ZS (T5)
6.3
40.1
40.1
48.3
81.6
67.7
78.3
TABLE IV: Details of Comparing ZTab-privacy with open-source based models for In-domain generalization.
In-Domain
Category
Model
WikiTable
SOTAB sch
SOTAB sch-s
SOTAB dbp
T2D
Efthymiou
Limaye
Zero-shot
Chorus (GPT-3.5)
15.3
60.3
60.3
64.8
83.4
82.5
87.4
GPT-3.5-based
28.3
64.0
64.0
70.0
89.4
82.7
90.4
CENTS (GPT-3.5)
25.6
49.7
49.7
53.7
88.0
87.9
89.5
ZTab-per (GPT-3.5,GPT-3.5)
42.3
77.3
77.0
77.4
96.2
92.4
92.5
CENTS (GPT-4o-mini)
33.0
59.8
59.8
61.1
92.4
85.6
86.8
TABLE VI: Details of Comparing ZTab-performance with closed-source based models for In-domain generalizations.
Fig. 3: Top 50 classes in WikiTable dataset ranked by improvement of ZTab-performance (GPT-4.1-mini,GPT-4.1-mini) over baseline CENTS (GPT-4.1-mini)
Dataset
ZTab
ZTab with pseudo-tables generated by TabGen [ 40 ]
WikiTable
34.1
12.9
SOTAB sch
76.9
39.5
SOTAB sch-s
75.1
35.7
SOTAB dbp
76.2
50.3
T2D
96.2
91.9
TABLE VIII: Effect of table generation on micro-F1 score.
Dataset
ZTab
ZTab w/o S
ZTab w/o P
WikiTable
34.1
28.4
3.9
SOTAB sch
76.9
71.1
18.6
SOTAB sch-s
75.1
71.1
18.6
SOTAB dbp
76.2
72.7
31.3
T2D
96.2
93.9
67.4
Efthymiou
91.3
91.3
51.5
TABLE IX: Effect of pseudo-table settings on micro-F1 score.
Class Prototype Size
Dataset
All
50
25
12
6
WikiTable
34.1
32.8
32.4
31.2
30.9
SOTAB sch
76.9
75.9
75.4
74.7
73.6
SOTAB sch-s
75.1
74.2
73.3
72.5
72.8
SOTAB dbp
76.2
74.4
74.2
73.3
72.1
T2D
96.2
95.9
95.4
95.6
95.2
TABLE X: Effect of class prototype size e on micro-F1 score.
Presentation
col-by-col
col-by-col
row-by-row
row-by-row
Prediction
target
all
target
all
WikiTable
34.1
31.3
32.2
28.8
SOTAB sch
76.9
74.0
74.3
71.5
SOTAB sch-s
75.1
73.5
74.1
71.1
SOTAB dbp
76.2
75.2
74.3
72.0
T2D
96.2
94.4
95.1
92.4
TABLE XI: Effect of prompt design on micro-F1 score.
Dataset
#Schemas
#Unique Schemas
WikiTable
397,098
9,849
SOTAB sch
44,769
4,189
SOTAB sch-s
10,631
1,643
SOTAB dbp
37,631
1,780
T2D
160
64
TABLE XII: Number of total and unique schemas in datasets.
Fig. 4: Effect of fine-tuning epochs on micro F1 score (avg. over datasets).
Learning Dataset
ZTab
ZTab only-remapping
SOTAB sch
75.2
55.6
SOTAB sch-s
74.4
54.9
TABLE XIV: Effect of label remapping on micro-F1 under ontology shift.
Zero-shot learning lets models recognize classes or solve tasks absent from task-specific training examples by using semantic descriptions or pretrained knowledge.