## 2 Related Work
### Autoencoders  
Autoencoders are unsupervised learning models widely used for dimensionality reduction, feature learning, and data reconstruction [35; 36; 37]. The primary idea behind autoencoders is to map the input data through an encoder to a lower-dimensional latent space and then reconstruct the data back to their original form through a decoder [38; 39]. The core of the autoencoder lies in the construction of the latent space, which typically has a lower dimension than the input data. This means that the autoencoder extracts key features from the input data through compression, thereby providing an efficient representation of the data. The architecture of the autoencoder makes it highly effective in noise removal and anomaly detection [40; 41]. Through a set of functions \(h=f(x)\), mapping the input data \(x\) to the low-dimensional representation \(h\) in the latent space, where \(h\) is a vector in the latent space. The encoder typically uses a series of neural network layers for feature extraction and mapping, continuously optimizing parameters so that the resulting latent representation retains the core information of the input data. The decoder is responsible for reconstructing the low-dimensional representation \(h\) in the latent space to a reconstructed version \(\hat{x}\) that closely matches the original input data \(x\), i.e., through the function \(g(h)=\hat{x}\) for decoding. The encoder and decoder aim to minimize the difference between the input data \(x\) and the reconstructed data \(\hat{x}\) by optimizing a loss function. The goal of the autoencoder is to minimize the reconstruction error between the input data \(x\) and the reconstructed data \(\hat{x}\). The mean squared error (MSE) is commonly used as the loss function, which can be expressed as:  
\[\mathcal{L}=\|x-\hat{x}\|^{2}=\sum_{i=1}^{n}(x_{i}-\hat{x}_{i})^{2}, \tag{5}\]where \(x_{i}\) and \(\hat{x}_{i}\) represent the \(i\)th component of the input data \(x\) and the reconstructed data \(\hat{x}\), respectively, and \(n\) is the dimensionality of the data. By minimizing the loss function, the autoencoder adjusts the parameters of both the encoder and decoder, ensuring that the input data \(x\) are effectively represented in the latent space, and the output \(\hat{x}\) reconstructed by the decoder closely resembles the original input. In the autoencoder structure, the latent space is typically designed with a dimension smaller than the input data dimension. This implies that, during the mapping process, the encoder discards some redundant information and retains only the key features that effectively represent the data. This compression process improves the model's generalization ability, enabling the autoencoder to learn the underlying patterns of the input data. However, the choice of latent space dimensionality needs to be carefully considered. A too-low dimensionality may lead to information loss, negatively affecting reconstruction quality, while a too-high dimensionality may result in overfitting. To better understand the role of latent space, the mathematical model of the autoencoder can be used. Suppose the input data \(x\) are a \(d\)-dimensional vector. The encoder maps the input data to a low-dimensional representation \(h\) in the latent space using a mapping function \(h=f(x;\theta)\), where \(\theta\) denotes the parameters of the encoder. Then, the decoder reconstructs the data \(\hat{x}\) from the latent representation \(h\) using a mapping function \(\hat{x}=g(h;\phi)\), where \(\phi\) represents the parameters of the decoder. The entire autoencoder process can be expressed as:  
\[\hat{x}=g(f(x;\theta);\phi), \tag{6}\]  
where \(f\) and \(g\) represent the encoder and decoder functions, respectively, parameterized by neural networks. The training goal of the autoencoder is to optimize the parameters \(\theta\) and \(\phi\) by minimizing the loss function \(\mathcal{L}\), i.e., minimizing the difference between the input data \(x\) and the reconstructed data \(\hat{x}\).