# A Multi-Scale Unsupervised Feature Extraction Network with Structured Layer-Wise Decomposition
## 2 Materials and Methods
### Loss Functions  
To guide the network branches to learn distinct yet complementary feature representations, we select loss functions grounded in well-established theory and practice from image processing and deep learning. Because of its simplicity and effectiveness in penalizing overall reconstruction error, as described in the foundational deep learning literature [44], researchers widely adopt the pixel-wise Mean Squared Error (MSE) loss of image reconstruction tasks. To encourage spatial smoothness in the smooth layer and reduce high-frequency noise, we employ a squared gradient penalty that approximates the Total Variation (TV) regularization principle, which has proven effective for noise removal while preserving edges in images [45]. Conversely, the detail layer directly uses the L1 norm of the gradient to impose a first-order TV loss, thus preserving important edges and fine structures through sharp transitions [46]. These complementary norms balance smoothness and edge preservation. Lastly, residual layer loss uses a logarithmic penalty that controls the scale of activations robustly, promoting sparsity and suppressing unstructured noise components. Together, this set of loss functions enables the multi-branch auto-encoder to disentangle smooth, detailed, and residual features effectively. \[Loss(\hat{f})=MSE+\mathcal{L}_{\text{smooth}}+\mathcal{L}_{\text{detail}}+ \mathcal{L}_{\text{residual}} \tag{1}\]  
This formulation includes a pixel-wise mean squared error (MSE) between the reconstructed image and the ground truth, along with three specialized regularization terms for smooth, detail, and residual layers, respectively, in the corresponding decoder branches. The general form of the loss is expanded as follows:  
\[Loss(\hat{f})=\sum_{i,j}(\hat{f}_{i,j}-f_{i,j})^{2}+\lambda_{1}\sum_{i,j} \Bigl{(}\
abla f_{i,j}^{(1)}\Bigr{)}^{2}+\lambda_{2}\sum_{i,j}\Bigl{|}\
abla f _{i,j}^{(2)}\Bigr{|}+\lambda_{3}\sum_{i,j}\log(1+f_{i,j}^{(3)}) \tag{2}\]  
Here, \(\hat{f}\) is the reconstructed image composed of the three branches \(f^{(1)}\), \(f^{(2)}\), and \(f^{(3)}\), which correspond to the smooth, detail, and residual layers, respectively. The first term  
Figure 1: The proposed method architecture. Yellow blocks represent convolutional layers, red blocks indicate max pooling operations, and blue blocks correspond to upsampling layers. penalizes reconstruction errors. The second term enforces spatial smoothness using the squared gradient magnitude of the smooth layer \(f^{(1)}\). The third term uses the \(L_{1}\) norm of the gradient to preserve fine structures and edges in the detail layer \(f^{(2)}\). The final term encourages sparsity in the residual branch \(f^{(3)}\) to separate noise and unstructured information. We begin by defining the continuous form of the smoothness loss based on the squared 2D spatial gradient:  
\[Loss(f^{(1)},f^{(2)},f^{(3)}) =\sum_{i,j}\Bigl{(}(f^{(1)}_{i,j}+f^{(2)}_{i,j}+f^{(3)}_{i,j})-f_ {i,j}\Bigr{)}^{2}\] \[\quad+\lambda_{1}\sum_{i,j}\Biggl{[}\left(\frac{\partial f^{(1)} _{i,j}}{\partial x}\right)^{2}+\left(\frac{\partial f^{(1)}_{i,j}}{\partial y} \right)^{2}\Biggr{]}\] \[\quad+\lambda_{2}\sum_{i,j}\[PERSON]{[}\left|\frac{\partial f^{(2)} _{i,j}}{\partial x}\right|+\left|\frac{\partial f^{(2)}_{i,j}}{\partial y} \right|\[PERSON]{]}\] \[\quad+\lambda_{3}\sum_{i,j}\log(1+f^{(3)}_{i,j}) \tag{3}\]  
To encourage spatial coherence in the output feature maps, we introduce smooth layer loss, which penalizes sharp variations between neighboring activations. This regularization is particularly beneficial in tasks such as image synthesis, segmentation, or depth estimation, where the output is expected to vary smoothly over space. In Equation (3), \(f^{(1)}_{i,j}\) represents the activation at spatial location \((i,j)\) on a given feature map, and the terms \(\frac{\partial f^{(1)}_{i,j}}{\partial x}\) and \(\frac{\partial f^{(1)}_{i,j}}{\partial y}\) denote the partial derivatives of the activation values in the horizontal and vertical directions, respectively.