Stacked Similarity-Aware Autoencoders

Wenqing Chu, Deng Cai

Introduction

Unsupervised deep learning often relies on the autoencoder—a neural network designed to compress input data into a latent representation and reconstruct it. While effective, standard autoencoders suffer from two primary limitations. First, powerful networks may simply learn an "identity function," copying inputs to outputs without capturing meaningful data structures. Second, they typically ignore the geometric relationships between data points; semantically similar objects are not explicitly encouraged to reside near each other in the latent space.

Methodology

The proposed Stacked Similarity-Aware Autoencoders (SSA-AE) address these issues by introducing a geometric constraint into the learning process. The architecture combines traditional reconstruction loss with a similarity-aware center loss.

Architecture of the Similarity-Aware Autoencoder showing the dual loss structure.

Pseudo-Labeling and Center Loss

To operate without manual labels, SSA-AE utilizes agglomerative clustering on input features to generate "pseudo-labels." These labels guide an improved center loss function that enforces:

  1. Intra-class Compactness: Pulling latent codes with the same pseudo-label toward a shared cluster center.
  2. Inter-class Separation: Pushing different cluster centers apart using a margin-based penalty.

Hierarchical Stacking

The model is constructed by stacking these layers. As the network depth increases, the number of clusters is reduced via a shrinking factor $\alpha$. This hierarchical approach forces deeper layers to distill information into increasingly abstract and compact semantic categories.

Experimental Results

The model was evaluated on the COIL100 and MNIST datasets. In unsupervised feature learning followed by classification with a simple linear SVM, SSA-AE demonstrated superior performance.

On COIL100, the model achieved a recognition rate of 92.41%, outperforming Denoising Autoencoders (88.47%). In semi-supervised tests on MNIST using only 100 labeled samples, SSA-AE reached a test error of 2.78%, significantly lower than the 22.98% error of a standard CNN trained on the same limited data. Ablation studies indicated that a three-layer stacked structure provides the optimal balance between feature abstraction and information retention; deeper architectures tended to over-compress the data.

t-SNE visualization of the learned latent representations, demonstrating clear class separation.

Visualization via t-SNE confirms that the similarity constraint effectively organizes the latent space into distinct, well-separated clusters corresponding to semantic categories. This structure is significantly more discriminative than the representations learned by standard autoencoders.

Discussion

A key insight of this work is that "good enough" pseudo-labels are sufficient to guide feature learning. Despite the inherent noise in unsupervised clustering, the joint supervision of reconstruction and center loss remains robust. However, the computational overhead of agglomerative clustering remains a bottleneck for scaling to larger datasets. Future research may explore more efficient pseudo-labeling techniques to bring similarity-aware learning to large-scale computer vision tasks.

Summary updated

BibTeX
@inproceedings{chu2017stacked,
  author = {Wenqing Chu and Deng Cai},
  title = {{Stacked Similarity-Aware Autoencoders}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2017},
  doi = {10.24963/ijcai.2017/216},
}
Figure