Stop That Join! Discarding Dimension Tables when Learning High Capacity Classifiers

Vraj Shah, Arun Kumar, Xiaojin Zhu · OpenReview

Abstract

Machine learning (ML) over relational data is often hindered by the "sourcing bottleneck"—the arduous process of joining numerous dimension tables to a central fact table to extract features. While previous work suggested that these joins could be avoided for linear models under specific conditions, it was widely believed that high-capacity models would overfit without descriptive features. This paper refutes that intuition, demonstrating that high-capacity classifiers like Decision Trees, SVMs, and Neural Networks are remarkably robust to avoiding joins. By using the foreign key (FK) itself as a categorical feature, these models achieve accuracy parity with traditional "JoinAll" approaches while realizing massive training speedups.

Introduction

In modern data science, the standard workflow for relational databases involves joining a central "fact" table with multiple "dimension" tables. This "JoinAll" approach is computationally expensive and introduces significant technical debt. Recent research introduced the concept of "avoiding joins safely" for linear classifiers, leveraging key-foreign key dependencies (KFKDs). However, the applicability of this technique to high-capacity models—those capable of learning complex, non-linear patterns—remained an open question. Conventional wisdom suggested that such models would overfit on high-cardinality foreign keys if denied the descriptive features in dimension tables.

Methodology

The authors evaluate two primary strategies across seven real-world datasets (Walmart, Flights, Yelp, MovieLens, Expedia, LastFM, and Books):

  1. JoinAll: The standard approach of joining all tables to provide every available feature.
  2. NoJoin: A streamlined approach that ignores dimension tables, using only fact table features and the Foreign Key (FK) as a categorical feature.

The study examines three classes of high-capacity models: Decision Trees (CART), non-linear SVMs (RBF and Quadratic kernels), and Artificial Neural Networks (ANNs), with 1-Nearest Neighbor (1-NN) as a baseline.

Key Insights: The Foreign Key as a Proxy

The core finding is that high-capacity classifiers are counter-intuitively more robust to avoiding joins than linear models. While linear models typically require a high "tuple ratio" (ratio of examples to unique FKs) to maintain accuracy without joins, Decision Trees and ANNs remain effective even with low ratios.

This robustness stems from the fact that an FK acts as a "compressed" representation of the dimension table's features due to functional dependencies. High-capacity models excel at extracting signal directly from these FKs. Furthermore, their internal feature selection mechanisms (e.g., tree splitting) naturally resist the noise or "confusion" that high-cardinality FKs might otherwise introduce, refuting standard VC-dimension-based intuitions about overfitting.

Experimental Results

The empirical results demonstrate that the NoJoin approach consistently maintains accuracy within 1% of JoinAll across nearly all tests. Beyond accuracy parity, the NoJoin approach offers substantial performance gains.

Training time comparison for RBF-SVM and Naïve Bayes across datasets.

As shown in the figures, avoiding joins significantly reduces end-to-end training time. While high-capacity models like SVMs and Decision Trees see an average 2x speedup, simpler models like Naive Bayes can experience speedups as high as 707x due to the reduction in feature dimensionality.

Training time comparison for Decision Trees and 1-NN across datasets.

Conclusion and Future Work

This research challenges the "more features are always better" dogma in relational ML. By showing that high-capacity models can effectively use foreign keys as proxies for dimension table features, the authors provide a path to drastically simplify ML pipelines. Future work includes extending these findings to many-to-many relationships and developing automated "advisors" to help data scientists identify safe joins to skip before model development begins.

Summary updated

BibTeX
@article{shah2017stop,
  author = {Vraj Shah and Arun Kumar and Xiaojin Zhu},
  title = {{Stop That Join! Discarding Dimension Tables when Learning High Capacity Classifiers}},
  journal = {Proc. VLDB Endow.},
  year = {2017},
  url = {https://openreview.net/forum?id=f98KtMZPJj},
}
Figure