[Paper Review] Clustering-Oriented Representation Learning with Attractive-Repulsive Loss
This paper proposes Clustering-Oriented Representation Learning (COREL), a novel loss framework that optimizes neural network representations for natural clusterability in the latent space using attractive-repulsive loss with cosine or Gaussian similarity functions. COREL variants outperform categorical cross-entropy (CCE) in classification accuracy (especially Gaussian-COREL) and consistently produce more naturally clusterable representations than CCE, particularly via Cosine-COREL.
The standard loss function used to train neural network classifiers, categorical cross-entropy (CCE), seeks to maximize accuracy on the training data; building useful representations is not a necessary byproduct of this objective. In this work, we propose clustering-oriented representation learning (COREL) as an alternative to CCE in the context of a generalized attractive-repulsive loss framework. COREL has the consequence of building latent representations that collectively exhibit the quality of natural clustering within the latent space of the final hidden layer, according to a predefined similarity function. Despite being simple to implement, COREL variants outperform or perform equivalently to CCE in a variety of scenarios, including image and news article classification using both feed-forward and convolutional neural networks. Analysis of the latent spaces created with different similarity functions facilitates insights on the different use cases COREL variants can satisfy, where the Cosine-COREL variant makes a consistently clusterable latent space, while Gaussian-COREL consistently obtains better classification accuracy than CCE.
Motivation & Objective
- To shift neural network training from pure accuracy optimization to building naturally clusterable latent representations.
- To address the limitation of CCE in producing structurally meaningful, cluster-like representations in the final hidden layer.
- To propose a generalizable loss framework—Attractive-Repulsive (AR) loss—that supports multiple similarity functions for clustering-oriented learning.
- To evaluate whether COREL variants improve both clusterability and classification performance across image and text classification tasks.
- To demonstrate that COREL representations enable high accuracy with simple clustering algorithms, reducing reliance on final classification layers.
Proposed method
- Proposes Attractive-Repulsive (AR) loss as a general framework, where loss is composed of attractive and repulsive terms based on a similarity function s(h, w_k).
- Defines the AR loss as a weighted sum: L_AR = Σ[-λ·L_attract(h, w_y) + (1−λ)·L_repulse(h, W)] over N samples.
- Introduces two COREL variants: Cosine-COREL using cosine similarity and Gaussian-COREL using negative squared Euclidean distance as the similarity function.
- Uses the softmax operation in Gaussian-COREL to map similarity scores to class probabilities, while Cosine-COREL avoids softmax by directly optimizing cosine-based attraction.
- Employs standard clustering algorithms (e.g., k-means) on final-layer representations to evaluate natural clusterability without using the classifier head.
- Trains models using feed-forward and convolutional networks on image and text datasets, comparing COREL variants to CCE and center loss.
Experimental results
Research questions
- RQ1Can a loss function be designed to explicitly promote natural clusterability in the latent space of deep neural networks?
- RQ2How do different similarity functions (cosine vs. Gaussian) affect the clusterability and classification accuracy of learned representations?
- RQ3Does COREL produce representations that are both more clusterable and more accurate than standard CCE and center loss?
- RQ4Can simple clustering algorithms achieve high test accuracy when applied to COREL-learned representations, bypassing the final classifier layer?
- RQ5What are the relative trade-offs between clusterability (as in Cosine-COREL) and classification accuracy (as in Gaussian-COREL)?
Key findings
- Gaussian-COREL consistently achieves higher test accuracy than both CCE and center loss across all evaluated image and text classification tasks.
- Cosine-COREL produces latent representations that are consistently more naturally clusterable than those from CCE, as confirmed by k-means clustering performance.
- Applying k-means to the final hidden layer representations of Cosine-COREL models achieves test accuracy comparable to using the full classifier head.
- The latent space from Cosine-COREL shows well-defined, distinct clusters corresponding to class labels, even without explicit clustering supervision.
- Gaussian-COREL's use of negative squared Euclidean distance with softmax leads to better discriminative features than CCE, especially in complex datasets.
- COREL variants require no architectural modifications beyond loss function changes, making them simple to implement and effective across diverse model architectures.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.