arXiv:2610.05297cs.LGOct 2026

Manuscript Offprint

arXiv:2610.05297

Do Neural Networks Learn Structure-Preserving Maps? A Case Study in Latent-to-Hilbert Embeddings

Muhammad Adnan Shahzad

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We ask whether a neural network can learn a structure-preserving map from a compressed latent space to a Hilbert-space representation. Using an 8-dimensional autoencoder bottleneck on MNIST and n-qubit product-state targets from PCA-based angle encoding, we report four findings. Although the target angles are generated by a nonlinear sigmoid transformation of the latent projections, the resulting mapping is well approximated by a linear function over the observed latent distribution: linear regression from z to the true target angles achieves R2=0.98R^2 = 0.98, while regression to the MLP's recovered angles achieves R2=0.91R^2 = 0.91. The learned map's primary direction is strongly aligned with the target-induced direction, with cosine similarity 0.989, while remaining nearly orthogonal to the input's principal direction, with cosine similarity 0.002. The map is genuinely rank-4: removing any singular direction degrades inner-product preservation by 2.5−5.9×2.5-5.9\times despite a singular-value spectrum with two dominant and two small values. The learned subspace does not coincide with the PCA basis used to construct the target, and different random seeds recover the same primary direction but diverge in higher ranks. Finally, kernel ridge regression with an RBF kernel outperforms a tuned MLP (IP error 0.0144 vs. 0.0197), suggesting that for approximately linear structure-preserving mappings, classical kernel methods may be a simpler and more effective alternative.

1 Introduction

Machine learning has increasingly focused on learning representations rather than direct input-output mappings. A recurring problem in this context is measuring whether two learned representations preserve the same underlying structure. Canonical correlation analysis [5], centered kernel alignment [4], and Procrustes-based alignment [1] are widely used to compare representations, but they typically assume a fixed target and ask whether a learned representation is close to it. In this paper, we ask a related but distinct question: given a latent vector z and a target Hilbert-space representation ψ\psi, can a neural network learn a mapping f(z)=ψf(z) = \psi that preserves inner products between points?

This question has practical relevance in settings where geometric structure matters—representation alignment, structure-preserving embeddings, and classical-to-quantum mappings—and is theoretically motivated by the desire to understand when a neural network can recover geometric content rather than merely fit observations.

The problem sits at the intersection of three threads of prior work. The first is representation similarity analysis, which includes canonical correlation analysis and its deep variants [5][5], centered kernel alignment [4], and Procrustes-based alignment [1]. These methods assume a fixed target representation and ask whether a learned representation is close to it. Our setup is different: we do not assume that a target exists, but rather ask whether a network can learn a mapping into a specified target space while preserving geometric structure. The second thread is kernel methods, in particular kernel ridge regression [6], which combines a linear model in a high-dimensional feature space with L2L_{2} regularization. With an RBF kernel, KRR can approximate a wide class of smooth functions and typically serves as a strong baseline for low-dimensional regression tasks. The relationship between kernel methods and infinitely wide neural networks has been studied through the neural tangent kernel [3]; for finite-width networks and small datasets, kernel methods frequently perform competitively or better, and our experiments add a specific instance of this phenomenon. The third thread is quantum machine learning, where quantum feature spaces have been proposed as a route to enhanced expressivity [2, 7]. A common construction maps classical data to quantum states via angle encoding; our target representation follows this approach, using product-state amplitudes as the target for a classical mapping.

We investigate the question in a controlled setting. We use an 8-dimensional autoencoder bottleneck trained on MNIST, and construct a target Hilbert-space representation via PCA-based angle encoding of the latent vectors. We train several models—linear regression, an MLP trained on MSE only, an MLP trained on MSE plus an inner-product loss, and kernel ridge regression—to map z to ψ\psi. We evaluate them on inner-product preservation error (IP_err), reconstruction error (MSE), and pairwise distance preservation error (dist_err).

Our findings are as follows. First, the learned mapping is approximately linear, with a linear regression from z to the recovered angle space achieving R2=0.91R^{2} = 0.91, and its primary direction is target-driven rather than input-driven. Second, the learned map requires all singular directions: rank reduction degrades IP_err by a factor of 2.5 to 5.9. Third, the learned subspace does not equal the PCA basis, and seed-to-seed variation appears in the higher-rank structure while the primary direction remains stable. Fourth, in this controlled setting, kernel ridge regression with an RBF kernel outperforms the tuned MLP, suggesting that classical kernel methods may be preferable when the underlying mapping is approximately linear.