Abstract
Semi-supervised learning (SSL) has seen significant progress through consistency regularization, which encourages models to produce similar predictions for different augmentations of the same unlabeled image. However, current "point-wise" approaches often ignore the rich relational structure existing between different samples within a mini-batch. We introduce RelationMatch, a framework designed to bridge this gap by ensuring that inter-sample relationships remain consistent across augmentations. Central to our approach is the Matrix Cross-Entropy (MCE) loss, a mathematically rigorous generalization of standard cross-entropy to the domain of positive semi-definite matrices. RelationMatch demonstrates substantial performance gains, notably achieving an 86.06% accuracy on the STL-10 benchmark with only 40 labels—a 15.21% improvement over existing state-of-the-art methods.
1. Introduction
The core of modern semi-supervised learning (SSL) lies in leveraging unlabeled data through consistency regularization. Methods like FixMatch and FlexMatch utilize a "teacher-student" paradigm where a model's prediction on a weakly augmented image serves as a pseudo-label for a strongly augmented version of the same image. While effective, these methods treat each image as an independent entity, neglecting the global structural information inherent in the data distribution.
RelationMatch proposes a shift from point-wise consistency to relational consistency. By considering how images in a batch relate to one another, the model can capture broader structural cues that are otherwise lost. This is achieved through a novel Matrix Cross-Entropy loss that enforces the preservation of the batch's relationship matrix across different levels of data augmentation.
2. The Relational Consistency Problem
Traditional SSL methods focus on the mapping $x \to y$. If $x_w$ and $x_s$ are weak and strong augmentations of $x$, the goal is to minimize the distance between $f(x_w)$ and $f(x_s)$. However, if a batch contains a "dog" and a "cat," the model's internal representation should not only identify them correctly but also maintain their relative similarity (or dissimilarity) regardless of the augmentation applied. Ignoring these relationships results in a loss of "global" signal, which is particularly critical in label-scarce regimes where every bit of structural information counts.
3. The RelationMatch Framework
The RelationMatch framework augments standard SSL pipelines by introducing a relational consistency branch alongside the traditional point-wise consistency branch.
3.1 Relationship Matrices
For a mini-batch of images, the model generates a relationship matrix $R = AA^\top$, where $A$ represents the matrix of model predictions for the batch. Each entry $R_{ij}$ quantifies the similarity between the $i$-th and $j$-th samples in the prediction space.
3.2 Matrix Cross-Entropy (MCE)
To enforce consistency between the relationships of weakly augmented images (target) and strongly augmented images (prediction), we utilize Matrix Cross-Entropy (MCE). Derived from von Neumann entropy and Bregman divergence in information geometry, MCE is defined as: $$\text{MCE}(P, Q) = \text{tr}(-P \log Q + Q)$$ where $P$ is the relationship matrix for weakly augmented images and $Q$ is the matrix for strongly augmented images. To ensure differentiability and computational efficiency, the matrix logarithm is approximated using a Taylor series expansion.
4. Theoretical Insights
RelationMatch is not merely a procedural heuristic; it is grounded in matrix analysis. A key insight is that standard scalar cross-entropy is a special case of MCE where the relationship matrices are diagonal. By moving to non-diagonal matrices, MCE becomes sensitive to the spectral components (eigenvalues and eigenvectors) of the batch, allowing it to monitor and preserve the model's internal clustering structure. Furthermore, MCE mathematically preserves the one-hot nature of target distributions, avoiding the potential blurring of class boundaries often associated with label smoothing.
5. Experimental Evaluation
The authors evaluated RelationMatch on CIFAR-10, CIFAR-100, and STL-10. The results highlight the framework's efficacy, particularly in low-label scenarios.
5.1 STL-10 Breakthrough
On the STL-10 benchmark, which features a large unlabeled set and a small labeled set, RelationMatch (combined with Curriculum Pseudo Labeling) achieved an accuracy of 86.06% using only 40 labels. This represents a 15.21% absolute improvement over the previous state-of-the-art, FlexMatch (70.85%).
5.2 Consistency and Scalability
RelationMatch consistently outperformed baselines across various label counts (40, 250, 4,000) on CIFAR datasets. Interestingly, the method also provided benefits in fully supervised settings, suggesting that relational cues provide a useful inductive bias even when labels are plentiful.
6. Conclusion and Future Work
RelationMatch introduces a powerful new dimension to semi-supervised learning by focusing on in-batch relationships. While the calculation of relationship matrices and matrix logarithms introduces some computational overhead, the significant accuracy gains—especially on challenging benchmarks like STL-10—justify the approach. Future work includes scaling the method to larger batch sizes, conducting more exhaustive comparisons with contrastive learning methods like SimMatch, and extending the relational consistency principle to modalities beyond computer vision, such as natural language processing and audio analysis.
Summary updated