Towards Cross-Table Masked Pretraining for Web Data Mining

Chao Ye, Guoshan Lu, Haobo Wang, Liyao Li, Sai Wu, Gang Chen, Junbo Zhao

Abstract

Tabular data pervades the landscape of the World Wide Web, playing a foundational role in the digital architecture that underpins online information. Given the recent influence of large-scale pretrained models like ChatGPT and SAM across various domains, exploring the application of pretraining techniques for mining tabular data on the web has emerged as a highly promising research direction. Indeed, there have been some recent works around this topic where most (if not all) of them are limited in the scope of a fixed-schema/single table. Due to the scale of the dataset and the parameter size of the prior models, we believe that we have not reached the ''BERT moment'' for the ubiquitous tabular data. The development on this line significantly lags behind the counterpart research domains such as natural language processing. In this work, we first identify the crucial challenges behind tabular data pretraining, particularly overcoming the cross-table hurdle. As a pioneering endeavor, this work mainly (i)-contributes a high-quality real-world tabular dataset, (ii)-proposes an innovative, generic, and efficient cross-table pretraining framework, dubbed as CM2, where the core to it comprises a semantic-aware tabular neural network that uniformly encodes heterogeneous tables without much restriction and (iii)-introduces a novel pretraining objective -- prompt Masked Table Modeling (pMTM) -- inspired by NLP but intricately tailored to scalable pretraining on tables. Our extensive experiments demonstrate CM2's state-of-the-art performance and validate that cross-table pretraining can enhance various downstream tasks.

Introduction

Tabular data serves as the backbone of the web, powering critical systems from recommendation engines to risk management. While Natural Language Processing (NLP) and Computer Vision (CV) have achieved significant breakthroughs through large-scale pretraining—often referred to as their "BERT moments"—tabular data mining has remained largely confined to fixed-schema, single-table models.

The challenge of achieving a "BERT moment" for tabular data compared to vision and language domains.

The primary obstacles to a universal tabular model include data scarcity of high-quality pretraining corpora, the inherent heterogeneity of schemas across different tables, and the structural requirement of permutation invariance. Unlike the sequential nature of text or the spatial structure of images, tables allow for row and column swapping without loss of meaning, a property that standard NLP objectives often fail to respect.

Methodology: The CM2 Framework

To address these challenges, we introduce CM2 (Cross-table Masked Modeling), a framework designed for large-scale cross-table pretraining. CM2 moves beyond the "one model per table" limitation through three core innovations:

Semantic-Aware Feature Encoder

Instead of relying on simple lookup tables for categorical data, CM2 employs a pretrained BERT model to encode the semantic meaning of column names and cell values together. By treating the column name as a "prompt" (e.g., "Age: 25"), the model can bridge the gap between heterogeneous datasets, recognizing that "Age" in one table is semantically equivalent to "Years Old" in another.

Comparison between traditional word-level modeling and the proposed feature-level modeling in CM2.

Permutation-Invariant Transformer

The architecture utilizes a Transformer backbone but intentionally omits positional encodings. This ensures the model treats the table as a set of features rather than a sequence, thereby respecting the inherent structural properties of tabular data.

Prompt Masked Table Modeling (pMTM)

Inspired by Masked Language Modeling, we introduce pMTM. During pretraining, 35% of the features in a row are randomly masked. The model is tasked with reconstructing these missing values using the remaining features and their corresponding column name prompts. This objective forces the model to learn deep correlations between disparate data types.

Data and Evaluation

A significant contribution of this work is OpenTabs, a massive pretraining corpus sourced from public repositories including OpenML, UCI, Kaggle, and various government databases. OpenTabs contains approximately 46 million samples across diverse domains, subjected to rigorous cleaning to ensure semantic meaningfulness.

We evaluated CM2 against 16 diverse public benchmarks, covering binary and multi-class classification, regression, and anomaly detection.

Key Insights and Results

  • Modeling at the Feature Level: Our results indicate that maintaining the "feature" (header + value) as the atomic unit is significantly more effective than breaking tables into word sequences for capturing structural relationships.
  • Scaling Laws for Tables: Training on the 46-million-sample OpenTabs dataset allowed our 50-million-parameter model to develop a general understanding of data relationships. CM2 achieved state-of-the-art performance on 12 out of 16 downstream datasets, outperforming established baselines like XGBoost and FT-Transformer.
  • Few-Shot Learning: In scenarios with limited labeled data (e.g., 5-10 samples per class), the pretrained CM2 model significantly outperformed models trained from scratch, demonstrating successful knowledge transfer.
  • Versatility: CM2 proves adaptable to various tasks, including regression and missing value imputation, without requiring architectural changes.

Conclusion

CM2 represents a significant step toward a universal foundation model for tabular data. By leveraging semantic prompts and large-scale cross-table pretraining, we demonstrate that the "BERT moment" for the web's most ubiquitous data format is finally within reach. Future work will explore scaling to billions of parameters and refining feature alignment strategies.

Summary updated

BibTeX
@inproceedings{ye2023towards,
  author = {Chao Ye and Guoshan Lu and Haobo Wang and Liyao Li and Sai Wu and Gang Chen and Junbo Zhao},
  title = {{Towards Cross-Table Masked Pretraining for Web Data Mining}},
  booktitle = {The Web Conference},
  year = {2023},
}
Figure