Exponential Machines

Alexander Novikov, Mikhail Trofimov, Ivan V. Oseledets

TL;DR

Exponential Machines (ExM) allow researchers to model all possible feature interactions of every order (pairs, triplets, etc.) without suffering from an exponential explosion in parameters. By representing an exponentially large weight tensor in the highly compact Tensor Train (TT) format, the authors achieve a model where complexity scales linearly with the number of features. Furthermore, they successfully train this architecture using a novel Riemannian optimization approach that significantly outperforms standard stochastic gradient descent.

What Problem Does This Paper Address?

In many machine learning tasks—especially those involving categorical data like sentiment analysis or recommender systems—the relationship between features isn't merely additive. For example, the words "not" and "like" individually might be neutral, but their interaction ("not like") provides a strong negative signal.

While modeling pairwise interactions is common (e.g., in Factorization Machines), it requires $O(d^2)$ parameters. If you want to capture all possible interactions (triplets, quadruplets, up to the full set of $d$ features), you theoretically need $2^d$ parameters. For a modest dataset with 160 features, this means a weight tensor with $2^{160}$ entries—more than the number of atoms in the observable universe. The core challenge is: how do we model these "exponential" interactions efficiently without overfitting or running out of memory?

Methods

The authors introduce Exponential Machines (ExM), which rely on two key innovations to solve this dimensionality crisis:

  1. Tensor Train (TT) Format: Instead of storing a massive $2^d$ tensor, the model factorizes it into a sequence of small, interconnected 3D tensors called "cores."
Tensor Train (TT) format factorizing a large tensor into smaller interconnected cores.

This factorization reduces the parameter count from $2^d$ to $O(d \cdot r^2)$, where $r$ (the TT-rank) is a hyperparameter that controls the model's capacity. This format inherently acts as a natural regularizer.

  1. Stochastic Riemannian Optimization: Training models in factorized formats using standard Stochastic Gradient Descent (SGD) is notoriously difficult due to vanishing or exploding gradients and poor scaling. The authors treat the set of TT-tensors as a Riemannian manifold. Their algorithm projects the gradient onto the manifold's tangent space, takes a step, and then "retracts" the result back onto the manifold.
  2. Smart Initialization: The authors prove that a standard linear model (like logistic regression) is actually a special case of an ExM with rank $r=2$. They use the solution of a simple linear model to "warm-start" the ExM, preventing the optimization process from freezing early on.

Datasets

The authors evaluated ExM on four distinct benchmarks:

  • UCI Car & HIV Datasets: Standard classification tasks used to test convergence and basic performance.
  • Synthetic Data: A custom dataset with 30 features where the target is a 6th-degree polynomial. This specifically tests the model's ability to recover high-order interactions that standard models (like SVMs or Random Forests) might miss.
  • MovieLens 100K: A classic recommender system dataset used to compare ExM against state-of-the-art Factorization Machines.

Key Insights and Ideas

  • The "Linear" Connection: One of the most elegant findings is that ExM is a direct generalization of linear regression. By setting the TT-rank to 2, you recover a standard linear model. Increasing the rank allows the model to gradually learn more complex, non-linear interactions.
  • Riemannian vs. SGD: The paper demonstrates that standard SGD on the factorized cores is highly unstable. Riemannian optimization is the "secret sauce" that makes training viable.
Training loss over time comparing Riemannian optimization against standard SGD on the Car and HIV datasets.

As seen in the training loss curves, Riemannian optimization converges smoothly and rapidly. On the HIV dataset, it converged roughly 20 times faster than the SGD baseline.

  • Handling Categorical Data: The authors propose a specific "one TT-core per feature" approach for categorical data. This is more efficient than standard one-hot encoding because it avoids modeling impossible interactions (like a feature interacting with another version of itself).

Key Results

  • High-Order Superiority: On synthetic data with 6th-order interactions, ExM (rank 16) achieved an AUC of 0.96, matching the best high-order Factorization Machines. In contrast, standard Logistic Regression and Neural Networks only achieved an AUC of 0.50 (random guessing) on this specific task.
  • Efficiency: The Riemannian optimization procedure allowed the authors to fit a weight tensor with $2^{160}$ entries (on the HIV dataset) on standard hardware.
  • Competitive Performance: On MovieLens 100K, ExM performed on par with 3rd-order Factorization Machines, achieving a test AUC of 0.784.

Limitations and Future Work

  • Sparsity Issues: The current Riemannian optimization algorithm does not natively support sparse data. For datasets with hundreds of thousands of sparse features, the authors had to fall back to the less efficient SGD-based baseline.
  • Rank Selection: Currently, the TT-rank $r$ must be chosen via grid search. The authors suggest that future work could incorporate algorithms like DMRG (Density Matrix Renormalization Group) to automatically adjust the rank during training.
  • GPU Acceleration: While the authors prototyped a version in TensorFlow to use GPU acceleration, the full Riemannian optimizer was primarily implemented for CPU in the ttpy library. Further optimization for modern hardware could yield even greater speedups.

Summary updated

BibTeX
@inproceedings{novikov2017exponential,
  author = {Alexander Novikov and Mikhail Trofimov and Ivan V. Oseledets},
  title = {{Exponential Machines}},
  booktitle = {International Conference on Learning Representations},
  year = {2017},
  url = {https://openreview.net/forum?id=rkYmiD9lg},
}
Figure