arXiv:2608.24782cs.CVAug 2026

Manuscript Offprint

arXiv:2608.24782

Image Difference Quantification Using Autoencoder-Based Latent Representations

Manish Sharma, Timothy Yim, Clifton Forlines

Abstract

Traditional image similarity metrics such as Mean Squared Error (MSE), Peak Signal-to-Noise Ratio (PSNR), and the Structural Similarity Index Measure (SSIM) rely on pixel-level comparisons and therefore often fail to capture perceptually meaningful differences between images. In contrast, latent representations learned by deep neural networks have demonstrated strong alignment with human visual perception by encoding high-level semantic features. This paper proposes a convolutional autoencoder-based framework for image difference quantification using cosine similarity computed in latent space. The model learns compact semantic embeddings that enable robust differentiation between visually distinct images, even under variations in illumination, pose, and background. Extensive evaluations across dog-cat images and additional cross-domain datasets demonstrate clear class-wise clustering in the latent space and strong inter-class separability, with 98.4% of dog-cat image pairs exhibiting similarity scores below 0.5. Perceptual validation using the TID2013 dataset further confirms that latent-space distance correlates positively with human Mean Opinion Scores (MOS), indicating sensitivity to perceptually relevant distortions. The proposed approach provides a computationally efficient, semantically grounded alternative to traditional pixel-based metrics, offering utility for applications in content-based retrieval, perceptual quality assessment, and semantic similarity analysis.

Keywords: Autoencoder, Image Similarity, Latent Space, Cosine Similarity, Deep Learning, Perceptual Metrics.

1. Introduction

Image similarity assessment is a fundamental problem in computer vision with applications across content-based image retrieval [1], image quality assessment [2], anomaly detection [3], automated inspection [4], and multimedia analysis. Conventional similarity metrics such as Mean Squared Error (MSE), Peak Signal-to-Noise Ratio (PSNR), and the Structural Similarity Index Measure (SSIM) have been widely used due to their simplicity and low computational cost [5]. However, these metrics primarily operate on pixel intensities and local statistics, making them sensitive to noise, illumination variations, and minor geometric transformations. As a result, they often fail to capture perceptually meaningful differences between images, particularly when semantic content diverges while low-level pixel patterns remain similar.

Advances in deep learning have demonstrated that neural networks can learn hierarchical, structured representations of visual data [6]. Convolutional neural networks (CNNs), autoencoders, and generative models have shown strong capabilities in extracting features that correspond to high-level semantics such as texture, shape, structure, and object identity [7, 8]. These learned representations provide an alternative to pixel-based metrics, offering improved alignment with human visual perception.

Autoencoders (AEs), and specifically convolutional autoencoders (CAEs), are well-suited for unsupervised representation learning [9]. By compressing an image into a low-dimensional latent vector and reconstructing it, they encourage the network to retain the most salient structural and semantic information. When similarity is measured directly in the latent space particularly using cosine similarity, which emphasizes relational structure rather than magnitude semantic relationships between images can be quantified more effectively than using traditional metrics.

The motivation for this study stems from two key gaps in existing literature. First, despite the demonstrated advantages of deep representation learning, there is limited systematic analysis of cosine similarity in autoencoder latent spaces as a general-purpose image difference metric [10, 11]. Second, while prior research explores autoencoders for clustering or anomaly detection, few studies evaluate their capability to quantify semantic differences across diverse domains or validate their perceptual alignment using human-rated datasets such as TID2013 [12].

To address these gaps, this work proposes a convolutional autoencoder-based framework for image difference quantification using cosine similarity in latent space. We evaluate the approach using three distinct datasets representing natural images, geometric shapes, and outline-shaded image pairs. Additionally, perceptual validity is assessed using the TID2013 dataset, which includes human-provided Mean Opinion Scores (MOS) [12].

The contributions of this work are:

● A latent-space similarity framework based on convolutional autoencoders that measures semantic image differences using cosine similarity.

● Comprehensive empirical evaluation demonstrating strong class-wise separability, cross-domain generalization, and perceptual alignment with human judgments.

● A computationally efficient methodology with linear-time similarity computation, enabling large-scale or real-time use cases.

The results indicate that the proposed latent similarity measure provides a semantically grounded, perceptually meaningful, and computationally efficient alternative to traditional pixel-level metrics, making it suitable for modern image analysis applications.