Skip to main content
QUICK REVIEW

[Paper Review] A Method of Moments Embedding Constraint and its Application to Semi-Supervised Learning

Michael Majurski, Sumeet Menon|arXiv (Cornell University)|Apr 27, 2024
Neural Networks and ApplicationsComputer Science1 citations
TL;DR

This paper proposes a Method of Moments (MoM) embedding constraint to improve semi-supervised image classification by enabling deep neural networks to model the joint distribution p(Y, X) rather than just the conditional p(Y|X). By replacing the standard softmax layer with a differentiable Axis-Aligned Gaussian Mixture Model (AAGMM) and applying MoM constraints up to 4th order, the method achieves state-of-the-art accuracy on CIFAR-10 and STL-10 with only 40 labeled examples, while enabling robust outlier detection via Mahalanobis distance.

ABSTRACT

Discriminative deep learning models with a linear+softmax final layer have a problem: the latent space only predicts the conditional probabilities $p(Y|X)$ but not the full joint distribution $p(Y,X)$, which necessitates a generative approach. The conditional probability cannot detect outliers, causing outlier sensitivity in softmax networks. This exacerbates model over-confidence impacting many problems, such as hallucinations, confounding biases, and dependence on large datasets. To address this we introduce a novel embedding constraint based on the Method of Moments (MoM). We investigate the use of polynomial moments ranging from 1st through 4th order hyper-covariance matrices. Furthermore, we use this embedding constraint to train an Axis-Aligned Gaussian Mixture Model (AAGMM) final layer, which learns not only the conditional, but also the joint distribution of the latent space. We apply this method to the domain of semi-supervised image classification by extending FlexMatch with our technique. We find our MoM constraint with the AAGMM layer is able to match the reported FlexMatch accuracy, while also modeling the joint distribution, thereby reducing outlier sensitivity. We also present a preliminary outlier detection strategy based on Mahalanobis distance and discuss future improvements to this strategy. Code is available at: \url{https://github.com/mmajurski/ssl-gmm}

Motivation & Objective

  • To address the overconfidence and outlier sensitivity of softmax-based deep classifiers in semi-supervised learning.
  • To enable modeling of the full joint distribution p(Y, X) in the latent space, not just the conditional p(Y|X).
  • To develop a differentiable final layer that explicitly models class cluster centroids with Gaussian mixture components.
  • To reduce model overconfidence and hallucinations by flagging low-prior inputs as outliers.
  • To improve robustness in semi-supervised learning under limited labeled data by learning a well-structured latent space.

Proposed method

  • Applies Method of Moments (MoM) constraints using polynomial moments from 1st to 4th order to regularize the latent space toward well-behaved Gaussian distributions.
  • Replaces the final linear+softmax layer with a differentiable Axis-Aligned Gaussian Mixture Model (AAGMM) that explicitly models cluster centroids and covariance.
  • Uses Mahalanobis distance in the latent space as a preliminary outlier detection strategy based on the learned joint distribution.
  • Applies MoM penalties to all unlabeled data, not just high-confidence pseudo-labeled samples, to fit the full joint distribution.
  • Trains the model using consistency regularization and pseudo-labeling, with the AAGMM layer enabling joint distribution learning.
  • Employs a differentiable training pipeline that backpropagates through the AAGMM layer and MoM constraints.

Experimental results

Research questions

  • RQ1Can Method of Moments constraints improve the structure of the latent space in semi-supervised learning?
  • RQ2Does modeling the joint distribution p(Y, X) reduce model overconfidence and improve outlier detection?
  • RQ3Can a differentiable AAGMM layer achieve performance comparable to SOTA while enabling generative modeling of the latent space?
  • RQ4How does the inclusion of higher-order MoM constraints affect model accuracy and memory usage?
  • RQ5Can Mahalanobis distance in the latent space serve as an effective, differentiable outlier detection mechanism?

Key findings

  • The AAGMM layer with 2nd or 4th order MoM constraints achieved 94.98% accuracy on CIFAR-10 with 40 labels, matching the reported FlexMatch performance.
  • The MoM-AAGMM method reduced latent space cluster compactness by 48% on CIFAR-10 (0.53 L2 distance) compared to baseline AAGMM (1.03) and KMeans (18.41).
  • On STL-10, the method achieved 71.11% accuracy with 1st-order MoM, outperforming baseline FixMatch (35.97%) and FlexMatch (29.15%) with 40 labels.
  • Outlier removal using 90th percentile Mahalanobis distance reduced test accuracy by ~7% on CIFAR-10 when MoM was applied, indicating over-aggressive filtering of inliers.
  • GPU memory usage increased significantly with higher-order MoM constraints, reaching 8.76 GiB for 4th order with 8D embeddings and 20.47 GiB for 32D embeddings, limiting practical scalability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.