Canonical Tensor Decomposition for Knowledge Base Completion

Timothée Lacroix, Nicolas Usunier, Guillaume Obozinski

Overview

This work revitalizes the classic Canonical Tensor Decomposition (CP) for Knowledge Base Completion (KBC). By combining a novel tensor nuclear $p$-norm regularizer with a simple "reciprocal" data reformulation and improved optimization techniques, the authors demonstrate that the foundational CP model can match or even outperform specialized, state-of-the-art models like ComplEx.

The Problem: KBC as Tensor Completion

Knowledge Base Completion involves predicting missing links in a graph of facts. These facts are represented as triples containing a subject, predicate, and object—for example, (Paris, capital_of, France). Mathematically, this forms a 3rd-order tensor completion problem across the dimensions of (Subject, Predicate, Object).

For years, the general-purpose Canonical Decomposition (CP)—the tensor equivalent of Matrix Factorization—was considered a poor fit for KBC. Researchers instead favored specialized models like DistMult or ComplEx to handle the unique symmetries and asymmetries of relational data. This paper challenges that assumption, asking: Is CP actually limited, or have we just been training it suboptimally?

Core Methods and Improvements

The authors introduce three key improvements to the CP training pipeline that drastically alter its performance:

Tensor representation of KBC and reciprocal relations.
  1. Reciprocal Reformulation: The authors treat every relation as having an inverse. For every training triple $(s, p, o)$, they inject a reciprocal triple $(o, p^{-1}, s)$ into the dataset. This makes the model "semantically invariant," ensuring it learns effectively regardless of whether the dataset stores "A is the capital of B" or "B has the capital A."
  2. Nuclear 3-Norm Regularization: Standard models typically rely on Frobenius norm regularization (the sum of squared weights), which the authors argue is not a true tensor norm. Instead, they propose a variational form of the nuclear 3-norm. This is more theoretically grounded for 3rd-order tensors and effectively prevents overfitting, especially in high-rank models.
  3. Better Optimization: The authors abandon standard ranking losses in favor of a multiclass log-loss (essentially applying a softmax over all possible entities) and conduct a much more exhaustive hyperparameter search than previous studies.

Key Insights and Results

The models were evaluated on five standard benchmarks, including WN18, FB15K, their leakage-free counterparts (WN18RR & FB15K-237), and the large-scale YAGO3-10 dataset. The results were striking:

  • Massive Gains for CP: On the FB15K dataset, "Vanilla" CP previously scored a Mean Reciprocal Rank (MRR) of 0.33. With the authors' improvements, it surged to 0.86, matching the performance of the much more complex ComplEx model.
  • New State-of-the-Art: The CP-N3 (CP with 3-norm) and ComplEx-N3 models achieved new state-of-the-art results across almost all datasets. On WN18RR, for instance, they achieved an MRR of 0.48, outperforming the previous best of 0.46.
  • The Power of Simplicity: CP is highly expressive. Its previous failures were not due to a lack of capacity, but a lack of proper constraints and data formulation. Explicitly modeling reciprocal relations allows it to handle non-symmetric relations seamlessly.
  • High Rank is Beneficial: The authors found that using a very high rank (up to 4000) was advantageous, provided the new N3 regularizer was utilized to keep the model's complexity in check.

Optimization and Hyperparameter Sensitivity

A major takeaway from this research is that a significant portion of the "state-of-the-art" gains reported by complex architectures in recent years were actually driven by better loss functions and hyperparameter tuning, rather than fundamental architectural breakthroughs.

Impact of batch size on MRR.

The paper highlights that performance is extremely sensitive to optimization parameters. For example, batch size and learning rate drastically alter the convergence and final MRR of the model. This sensitivity can make these models finicky to train in new domains, requiring careful tuning.

Limitations and Future Work

While the empirical results are robust, the authors note a lingering theoretical gap: there is still no solid theoretical justification for why CP performs so similarly to ComplEx once reciprocal relations are added. Additionally, training with very high ranks ($R=4000$) and full multiclass log-loss is computationally intensive, though the authors managed to keep epoch times reasonable (around 2 minutes for FB15K on a single GPU). Future work will likely need to address these computational bottlenecks and formalize the theoretical underpinnings of reciprocal CP.

Summary updated

BibTeX
@inproceedings{lacroix2018canonical,
  author = {Timothée Lacroix and Nicolas Usunier and Guillaume Obozinski},
  title = {{Canonical Tensor Decomposition for Knowledge Base Completion}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
  url = {https://openreview.net/forum?id=rkVGm3bO-r},
}
Figure