MMbeddings: Parameter-Efficient, Low-Overfitting Probabilistic Embeddings Inspired by Nonlinear Mixed Models

Giora Simchoni, Saharon RossetarXiv 2025 · DOI

Introduction

In modern machine learning, categorical features with high cardinality—such as User IDs, product codes, or geographic identifiers—pose a significant challenge. The standard approach involves entity embeddings, which map each category to a dense vector in a lookup table. However, this approach encounters a "cardinality wall": as the number of unique categories grows, the parameter count scales linearly, leading to massive memory requirements and severe overfitting for categories with sparse observations.

MMbeddings addresses these issues by reinterpreting categorical embeddings through the lens of Nonlinear Mixed Models (NLMM). By treating embeddings as probabilistic "random effects" within a Variational Autoencoder (VAE) framework, the proposed method achieves order-of-magnitude reductions in parameter counts while enhancing generalization.

Methodology

The core innovation of MMbeddings is the transition from static lookup tables to a generative process. Instead of learning a fixed matrix, the model employs a VAE architecture to infer embeddings dynamically.

The MMbeddings architecture: An encoder $q$ processes category-specific data to produce distribution parameters, from which a latent embedding $\mathbf{b}_i^\xi$ is sampled for the decoder $f$.

As shown in Figure 1, the architecture consists of:

  1. The Encoder ($q$): Rather than a simple lookup, an encoder network processes available covariates and outcomes for a specific category to output the mean ($\mu$) and variance ($\tau$) of a probability distribution.
  2. The Latent Space: The embedding is treated as a latent random effect sampled from this inferred distribution.
  3. The Decoder ($f$): A separate network utilizes the sampled embedding alongside input features to generate final predictions.
  4. Loss Function: The model is trained by minimizing the negative Evidence Lower Bound (ELBO). This objective includes a reconstruction term for accuracy and a Kullback-Leibler (KL) divergence term that serves as a natural regularizer, preventing the embeddings from over-complexifying and memorizing noise.

Crucially, the parameter count in MMbeddings is determined by the size of the encoder and decoder networks, making the model's complexity independent of the feature's cardinality.

Experimental Evaluation

The authors evaluated MMbeddings against several baselines, including standard embeddings, L2-regularized embeddings, and TabNet. Experiments were conducted on:

  • Simulated Data: Testing scaling and overfitting across cardinalities from $10^2$ to $10^5$.
  • Amazon Video Games Ratings: A collaborative filtering task involving 90,000 users and 20,000 games.
  • Tabular Benchmarks: Five real-world datasets (IMDb, News, IE, Spotify, and UK Biobank) covering regression and classification tasks.

Results and Discussion

MMbeddings demonstrates significant advantages in both efficiency and robustness. In the Amazon dataset experiment, standard embeddings required 1.2 million parameters, whereas MMbeddings achieved superior performance with only 5.4 thousand parameters—a 200x reduction.

Performance metrics: (Left) Mean runtime per epoch vs. cardinality $q$. (Right) Normalized validation loss over epochs, comparing standard embeddings to MMbeddings.

As illustrated in Figure 4, MMbeddings effectively eliminates the overfitting common in high-cardinality settings. While standard embeddings exhibit a characteristic "U-shaped" validation loss curve—where performance degrades rapidly after initial training—MMbeddings remains stable. Furthermore, the model maintains competitive runtimes even as cardinality increases, despite the additional computational overhead of the encoder pass.

Statistical analysis revealed that the VAE's natural regularization provides a form of "shrinkage," pulling estimates for sparse categories toward the global average. Interestingly, the authors found that simply averaging the encoder's outputs for all observations in a category outperformed more complex shrinkage formulas derived from classical theory, suggesting that the VAE's inherent regularization is highly effective.

Conclusion

MMbeddings successfully bridges classical statistical theory and modern deep learning. By treating embeddings as generative probabilistic distributions rather than static points, it provides a scalable, parameter-efficient solution for high-cardinality data. Future work may extend this approach to sequence data and incorporate more complex covariance structures to further enhance embedding quality.

Summary updated

BibTeX
@misc{simchoni2025mmbeddings,
  author = {Giora Simchoni and Saharon Rosset},
  title = {{MMbeddings: Parameter-Efficient, Low-Overfitting Probabilistic Embeddings Inspired by Nonlinear Mixed Models}},
  year = {2025},
  eprint = {2510.22198},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.22198},
}
Figure