Introduction
Deep Kernelized Autoencoders (dkAE) represent a significant step toward bridging the gap between deep learning and traditional kernel methods. While autoencoders (AEs) are powerful tools for unsupervised representation learning, they often lack explicit control over the nature of the learned representations. Conversely, kernel methods like Kernel PCA offer elegant mathematical properties but suffer from poor scalability—typically requiring $O(n^2)$ memory and $O(n^3)$ computation—and the notorious "pre-image problem," which makes mapping data from a high-dimensional kernel space back to the original input space difficult.
The dkAE framework addresses these challenges by forcing an autoencoder's hidden layer to mimic a user-specified kernel space. This provides a scalable, mini-batch-friendly way to perform kernel-based operations while leveraging the decoder to solve the pre-image problem through a simple forward pass.
Methodology
The dkAE is structured as a stacked autoencoder trained with a novel unsupervised loss function. The total loss is a weighted combination of two primary terms:
- Reconstruction Loss ($L_r$): The standard objective of ensuring the output $\tilde{\mathbf{x}}_i$ is as close to the input $\mathbf{x}_i$ as possible.
- Code Loss ($L_c$): This term facilitates "kernel alignment." The model calculates the inner products of the hidden representations (the "codes") for a mini-batch and minimizes the normalized Frobenius distance between this matrix and a pre-specified "prior" kernel matrix $P$.
By minimizing $L_c$, the encoder learns to approximate the mapping to a kernel space explicitly. Because the framework utilizes mini-batch training, it avoids the memory bottlenecks inherent in traditional spectral methods. Furthermore, the decoder acts as an explicit inverse mapping, providing a direct solution for visualizing or utilizing data points from the kernel space.
Experimental Setup
The researchers evaluated the dkAE using the MNIST dataset of handwritten digits. To accommodate the initial computation of the prior kernel, a subset of 20,000 samples was used. The chosen prior was the Probabilistic Cluster Kernel (PCK), an ensemble-based kernel known for its robustness to hyperparameters. The model architecture featured a bottleneck structure with layers of sizes 784-500-500-2000, leading into the code layer $N_c$.
Results and Discussion
Kernel Approximation and Denoising
The dkAE demonstrated superior kernel approximation compared to Kernel PCA (kPCA) when using a small number of components ($m < 16$). In image denoising tasks, the dkAE outperformed traditional kPCA both quantitatively—achieving a Mean Squared Error of 0.0358 compared to kPCA's 0.0427—and qualitatively, producing sharper, more accurate reconstructions.
Robustness and Regularization
A key insight from the study is that the kernel alignment term acts as a powerful regularizer. Even as the size of the hidden layer increased, the model did not overfit, as the kernel prior constrained the representation space. Sensitivity analysis showed that the model is remarkably robust to the weighting hyperparameter $\lambda$, maintaining stable performance across a wide range of values.
Conclusion
The Deep Kernelized Autoencoder provides a flexible framework where any valid kernel matrix (e.g., RBF, PCK) can be used as a prior to shape hidden representations. While the initial computation of the prior kernel matrix $P$ remains a hurdle for massive datasets, the dkAE's ability to provide explicit forward and backward mappings makes it a versatile tool for manifold learning and denoising. Future work may explore differentiable similarity measures like mutual information to further refine the alignment process.
Summary updated