TERM Model: Tensor Ring Mixture Model for Density Estimation

Ruituo Wu, Jiani Liu, Ce Zhu, Anh-Huy Phan, Ivan V. Oseledets, Yipeng Liu

TL;DR

The TERM model introduces a novel approach to probability density estimation by leveraging Tensor Ring (TR) decomposition. By combining multiple variable permutations into an adaptive mixture model, it overcomes the rigid structural limitations of traditional tensor methods and provides a more interpretable, stable, and efficient alternative to neural network-based generative models.

What Problem Does This Paper Address?

Density estimation—learning the underlying probability distribution of a dataset—is a cornerstone of machine learning, powering everything from anomaly detection to data generation. While deep learning models like GANs and VAEs are popular, they often act as "black boxes" that are difficult to tune, lack tractable log-likelihoods, and struggle with basic statistical tasks like calculating marginal distributions.

Tensor-based methods offer a more interpretable alternative by representing high-dimensional probability tensors in compressed formats. However, existing methods like Tensor Train (TT) are highly sensitive to the order (permutation) of variables. A "bad" ordering can lead to a massive loss in accuracy. Finding the "optimal" permutation is an NP-hard problem, and most researchers simply search for one "best" structure, potentially ignoring valuable information hidden in other variable arrangements.

Methods

The authors propose two key components:

  1. TRDE (Tensor Ring Density Estimator): Instead of a linear chain (like Tensor Train), this model uses a Tensor Ring structure—essentially a loop of smaller tensors. This circularity provides "rotational invariance," meaning it is naturally more robust to variable ordering and offers more balanced expressive power across dimensions.
  2. The model expands the density function using a B-spline basis, ensuring the resulting distribution is smooth and non-negative.
  3. It allows for exact sampling and efficient calculation of marginal and cumulative densities, which are often impossible or approximate in neural network models.
Fig. 1. The TT and TR decompositions of a third-order tensor under various permutations.
  1. TERM (Tensor Ring Mixture Model): Inspired by ensemble learning, the authors argue that we shouldn't just look for one perfect permutation. Instead, they combine multiple TRDEs, each using a different circular permutation of the variables, into a mixture model with adaptive weights.
A schematic diagram of a four-dimensional TERM, composed of basic TRDE components with adaptive weight, collectively forming TERM.

Datasets

The model was evaluated across three categories of data:

  • 2D Toy Distributions: Including complex shapes like 2-Spirals, Checkerboard, Rings, and the Sierpinski Carpet.
  • 3D Synthetic Datasets: Swissroll, Circles, and S-curve, used to test the model's ability to capture manifolds in higher dimensions.
  • Real-world UCI Benchmarks: Four standard tabular datasets: POWER, GAS, HEPMASS, and MINIBOONE. These are used to compare against state-of-the-art normalizing flows and autoregressive models.

Key Insights and Ideas

  • The Power of the Loop: The transition from a chain (TT) to a ring (TR) is significant. In a chain, the "middle" variables are often better represented than the "boundary" variables. The ring structure distributes this expressive power more evenly.
  • Suboptimal is Useful: A core philosophical shift here is the move away from "structure search" (finding the one best graph) toward "ensemble learning." The authors show that even "suboptimal" permutations contain unique structural information that, when weighted adaptively, improves the overall density estimate.
  • Interpretability through Hyperparameters: Unlike the opaque layers of a neural network, TERM’s parameters have clear meanings: the basis size acts like the resolution of a histogram, while the TR rank and number of components directly represent the model's complexity and expressive capacity.
Fig. 6. Approximation of the ‘2 Spirals’ distribution using TRDE with various basis function sizes and TR-ranks.

Key Results

  • Visual Fidelity: On 2D and 3D toy tasks, TRDE/TERM produced significantly cleaner samples with fewer outliers than popular normalizing flows like Real NVP and NSF. It successfully reconstructed complex manifolds like the Swissroll where other models failed.
Approximation of different 2-D toy distributions. The top row is real data, and the bottom row is the result of TRDE.
  • State-of-the-Art Performance: On the POWER and GAS datasets, TERM achieved the highest log-likelihood scores compared to a wide array of competitors, including Glow, FFJORD, and MAF.
  • Efficiency: The model achieved these results with a lower parameter count and faster sampling times than most neural network-based density estimators. For example, on 3D datasets, TRDE used roughly 1/4th the parameters of NSF while providing better accuracy.

Limitations and Future Work

  • Overfitting on Small Data: On datasets with limited samples (like HEPMASS and MINIBOONE), the model showed signs of overfitting, a common challenge for high-capacity tensor models.
  • Numerical Instability: While TR is powerful, its loop structure can lead to numerical instability during training when using very large ranks.
  • Future Directions: The authors suggest exploring more complex tensor network structures beyond simple rings and developing better regularization techniques to combat overfitting in low-data regimes.

Summary updated

BibTeX
@article{wu2026term,
  author = {Ruituo Wu and Jiani Liu and Ce Zhu and Anh-Huy Phan and Ivan V. Oseledets and Yipeng Liu},
  title = {{TERM Model: Tensor Ring Mixture Model for Density Estimation}},
  journal = {IEEE Trans. Big Data},
  year = {2026},
  doi = {10.1109/tbdata.2025.3648288},
}
Figure