diff --git a/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/5e6865ea-eda9-4185-b206-0aa53c1799a1_content_list.json b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/5e6865ea-eda9-4185-b206-0aa53c1799a1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2cc069a914b842ca236fb148db2bfff29b55da9c --- /dev/null +++ b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/5e6865ea-eda9-4185-b206-0aa53c1799a1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1bceb5b0394e0d56c42167f57596d51e382fbecab937559a09723319946c3045 +size 136298 diff --git a/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/5e6865ea-eda9-4185-b206-0aa53c1799a1_model.json b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/5e6865ea-eda9-4185-b206-0aa53c1799a1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..226363c3099ad91df4bc052247305aa6c4392b32 --- /dev/null +++ b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/5e6865ea-eda9-4185-b206-0aa53c1799a1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fda86d183f2a17597cfc9afc19a039aa2f88c1e7eaf84827135ca0d643807af +size 163036 diff --git a/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/5e6865ea-eda9-4185-b206-0aa53c1799a1_origin.pdf b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/5e6865ea-eda9-4185-b206-0aa53c1799a1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b9a2b34ed862429b227eb753d81bc955e34a5e09 --- /dev/null +++ b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/5e6865ea-eda9-4185-b206-0aa53c1799a1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c096e5e1e8ef8a418ad5bd77898e7965f2f6a5b45f5871b5e249a08709b4f0d8 +size 590891 diff --git a/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/full.md b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e25a2919a90b775bcef3cb16834394eed117bd22 --- /dev/null +++ b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/full.md @@ -0,0 +1,637 @@ +# 3D-LMVIC: Learning-based Multi-View Image Compression with 3D Gaussian Geometric Priors + +Yujun Huang\*1 Bin Chen\*2 Niu Lian2 Xin Wang1 Baoyi An3 Tao Dai4 Shu-Tao Xia1 + +# Abstract + +Existing multi-view image compression methods often rely on 2D projection-based similarities between views to estimate disparities. While effective for small disparities, such as those in stereo images, these methods struggle with the more complex disparities encountered in wide-baseline multi-camera systems, commonly found in virtual reality and autonomous driving applications. To address this limitation, we propose 3D-LMVIC, a novel learning-based multi-view image compression framework that leverages 3D Gaussian Splating to derive geometric priors for accurate disparity estimation. Furthermore, we introduce a depth map compression model to minimize geometric redundancy across views, along with a multi-view sequence ordering strategy based on a defined distance measure between views to enhance correlations between adjacent views. Experimental results demonstrate that 3D-LMVIC achieves superior performance compared to both traditional and learning-based methods. Additionally, it significantly improves disparity estimation accuracy over existing two-view approaches. + +# 1. Introductioin + +The rapid advancement of 3D applications has led to an explosion of multi-view image data across various fields, including virtual reality (VR) (Anthes et al., 2016), augmented reality (AR) (Schmalstieg & Hollerer, 2016), visual simultaneous localization and mapping (vSLAM) (Mokssit et al., 2023), 3D scene understanding (Dai et al., 2017), au + +*Equal contribution ${}^{1}$ Shenzhen International Graduate School, Tsinghua University,Shenzhen,China ${}^{2}$ School of Computer Science and Technology,Harbin Institute of Technology,Shenzhen, China ${}^{3}$ Huawei Technologies Company Ltd.,Shenzhen, China ${}^{4}$ Department of Software Engineering,Shenzhen University,Shenzhen,China. Correspondence to: Bin Chen . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/0b060257c10d85a68e850bfb7bc3ffc16a373a1c849f15b64ffd8f78282d284f.jpg) +(a) +Figure 1. Illustrations of camera systems. (a) A stereo camera configuration. (b) A wide-baseline multi-camera configuration. + +![](images/df7eb1ebaade77a79d395ffc06bced218d311eaee358ad25b606c9658178ae38.jpg) +(b) + +tonomous driving (Chen et al., 2017), and medical imaging (Hosseinian & Arefi, 2015). In particular, applications like VR and AR, which rely on high-quality multi-view visual content to create immersive experiences, generate a massive volume of data that poses significant challenges for storage and transmission. This makes the development of efficient compression techniques crucial for managing the increasing data demands in these fields. + +As illustrated in Figure 1, unlike the commonly studied stereo camera systems, 3D applications often rely on wide-baseline multi-camera systems to capture global scene information (Xu et al., 2020; Yan et al., 2024). In such scenarios, the spatial positions and viewing angles of cameras differ significantly compared to stereo setups, resulting in large disparities between images captured from different views. Existing disparity estimation methods typically rely on finding similar local regions in the image domain to estimate disparities. However, this approach faces significant challenges when dealing with complex and large disparities. + +Current multi-view coding standards, such as H.264-based MVC (Vetro et al., 2011) and H.265-based MV-HEVC (Hannuksela et al., 2015), have been developed to compress multi-view media by extending their respective base standards and exploiting redundancies across multiple views. These standards employ disparity estimation to calculate positional differences of objects between views, aiding in the prediction of pixel values. However, these methods rely on manually designed modules, limiting the system's ability to fully leverage end-to-end optimization. + +Learning-based single image compression has seen remarkable advancements (Balle et al., 2017; 2018; Minnen et al., 2018), inspiring extensions of these methods to multi-view image coding (Deng et al., 2021; Lei et al., 2022; Zhang et al., 2023; Liu et al., 2024). A central challenge in these extensions lies in the accurate estimation of disparities across different views. For example, Deng et al. (2021; 2023) employ a simple $3 \times 3$ homography matrix for disparity estimation, which, while efficient, struggles with complex scene disparities. Alternatively, Ayzik & Avidan (2020); Huang et al. (2023) utilize patch matching method to align the reference view with the target view. This approach is effective for horizontal or vertical view shifts but falls short when addressing non-rigid deformations caused by view rotations. Similarly, Zhai et al. (2022) assume that disparity occurs only along the horizontal axis in their stereo matching method, which suffices for stereo images but is inadequate for more complex view transformations where disparity is not limited to the horizontal axis. Some methods leverage cross-attention mechanisms for implicit alignment (Wödlinger et al., 2022; Zhang et al., 2023; Liu et al., 2024). For instance, Zhang et al. (2023) enhance the target view's representation by multiplying its query with the reference view's key and value, effectively incorporating reference view features into the target view. However, these methods primarily establish correlations between two views by 2D projection similarities, without considering the 3D spatial relationships between the views and the captured objects. + +Building on prior investigation, we propose a novel learning-based multi-view image compression framework with 3D Gaussian geometric priors (3D-LMVIC), which employs 3D-GS as a geometric prior to guide disparity estimation between views. Specifically, 3D-GS generates a depth map for each view, providing precise spatial information at the pixel level. This enables accurate correspondence between views, allowing the compression model to effectively fuse features from reference views. Due to positional and angular disparities between views, images generally do not fully overlap, and merging non-overlapping regions may introduce noise. To address this, we design a mask based on the 3D Gaussian geometric prior to identify overlapping regions, ensuring more accurate feature fusion. Additionally, since depth maps are required during decoding, we propose a depth map compression model to efficiently reduce geometric redundancy across views, incorporating a cross-view depth prediction module to capture inter-view geometric correlations. Finally, recognizing the importance of field of view (FoV) overlap in redundancy reduction, we introduce a multi-view sequence ordering method to address the issue of low overlap between adjacent views in unordered sequences. This method defines and proves a distance measure between view pairs to guide the ordering of view sequences. + +- We propose a learning-based multi-view image compression framework with 3D Gaussian geometric priors (3D-LMVIC), which utilizes 3D Gaussian geometric priors for precise disparity estimation between views, thereby enhancing multi-view image compression efficiency. Additionally, we design a mask based on these priors to identify overlapping regions between views, effectively guiding the model to retain useful cross-view information. + +- We also present a depth map compression model aimed at reducing geometric redundancy across views. Additionally, we define and prove a distance measure between views, upon which a multi-view sequence ordering method is proposed to improve the correlation between adjacent views. + +- Experimental results show that our framework surpasses both traditional and learning-based multi-view image coding methods in compression efficiency. Moreover, our disparity estimation method demonstrates greater visual accuracy compared to existing two-view disparity estimation methods. + +# 2. Related Works + +Single Image Coding. Traditional image codecs, such as JPEG (Wallace, 1992), BPG (Bellard, 2014), and VVC (Bross et al., 2021), employ manually designed modules like DCT, block-based coding, and quadtree plus binary tree partitioning to balance compression and visual quality. These methods, however, do not achieve end-to-end joint optimization, limiting their performance. + +In recent years, learning-based image compression methods have integrated autoencoders with differentiable entropy models to enable end-to-end optimization of rate-distortion loss. Early works, such as Balle et al. (2017; 2018), introduced generalized divisive normalization (GDN) (Balle et al., 2016) and proposed factorized and hyperprior entropy models. Subsequent research (Minnen et al., 2018; He et al., 2021; Jiang et al., 2023) incorporated autoregressive structures into entropy models, resulting in more accurate probability predictions. These advancements have laid the foundation for learning-based multi-view image coding. + +Multi-view Image Coding. Traditional multi-view image codec, such as MVC (Vetro et al., 2011) and MV-HEVC (Hannuksela et al., 2015), extend H.264 and H.265, respectively, by incorporating inter-view correlation modeling to eliminate redundant information between different views. However, these modules are manually designed, potentially limiting their ability to fully exploit cross-view information + +Learning-based multi-view image coding primarily focuses on stereo image coding (Deng et al., 2021; Lei et al., 2022; + +![](images/345b26bb5d4165a005e6eb70ea709596184760c01f0db7e017e1018b8c0245a7.jpg) +(a) Overview of the 3D-LMVIC pipeline. +Figure 2. Overall Pipeline. + +![](images/8e70be8d23fd3ea5795f127d05a6d552d0ab69ab90637d85a8093f2e84f01ce6.jpg) +(b) Depth-based disparity estimation process. + +Wödlinger et al., 2022; Zhai et al., 2022; Deng et al., 2023; Liu et al., 2024) and distributed image coding (Ayzik & Avidan, 2020; Huang et al., 2023; Zhang et al., 2023). These methods either rely on finding explicit pixel coordinate correspondences between views or use attention-based implicit correspondence modeling to capture inter-view correlations. However, they model inter-view correlations based solely on two-dimensional view images, which may not fully reflect the correspondences in the original three-dimensional space. + +3D Gaussian Splatting. 3D Gaussian Splatting (Kerbl et al., 2023; Hamdi et al., 2024) introduces a differentiable point-based rendering technique that represents 3D points as Gaussian functions (mean, variance, opacity, color) and projects these 3D Gaussians onto a view to form an image. This differentiable point-based rendering function allows for the backward update of the attributes of the 3D Gaussians, ensuring that their geometrical and textural properties match the original 3D scene. This approach inspired us to utilize 3D Gaussian Splatting to obtain geometric priors of the original 3D scene, aiding in the task of multi-view image compression. + +# 3. Proposed Method + +Figure 2(a) shows the overall pipeline of 3D-LMVIC. Given a set of multi-view image sequences $\mathcal{X} = \{\pmb{x}_1, \pmb{x}_2, \pmb{x}_3, \dots, \pmb{x}_N\}$ , a 3D-GS is trained to estimate depth map $\pmb{d}_n$ for each image $\pmb{x}_n$ . Both $\pmb{x}_n$ and $\pmb{d}_n$ are compressed, with the coding reference relationships indicated by black solid arrows in the figure. Prior to compressing the image $\pmb{x}_n$ , it is necessary to compress $\pmb{x}_{n-1}$ , $\pmb{d}_{n-1}$ , and $\pmb{d}_n$ . The disparity relationship between the $(n-1)$ -th and $n$ -th views is inferred from the reconstructed depth maps $\hat{d}_{n-1}$ and $\hat{d}_n$ . Subsequently, based on the estimated disparity relationship, as well as the extracted features of the $(n-1)$ -th view, $\pmb{x}_n$ is compressed. When compressing the depth map $\pmb{d}_n$ , the model employs the predicted depth map derived from $\hat{d}_{n-1}$ as a reference. The same neural network architecture and + +model parameters are used consistently across all views for both image compression and depth map compression. + +The remainder of this section is structured as follows: Section 3.1 elaborates on the method for depth map estimation for a given view using the 3D-GS and the estimation of interview disparities. Section 3.2 covers the compression model for both images and depth maps, as well as the multi-view sequence ordering method. + +# 3.1. 3D-GS Based Depth and Disparity Estimation + +# 3.1.1. DEPTH ESTIMATION + +For an image $\pmb{x}_n \in \mathbb{R}^{W \times H \times 3}$ with spatial dimensions $W$ and $H$ , we aim to derive a depth map $\pmb{d}_n \in \mathbb{R}^{W \times H}$ , representing the $z$ -axis coordinates of each pixel's corresponding 3D world point in the camera coordinate system. This depth map facilitates the estimation of disparities between different views. + +In the context of the 3D-GS framework, consider a set of $M$ ordered 3D points projected along a ray from the camera through a pixel. The rendered pixel color $c$ can be expressed as: + +$$ +c = \sum_ {i = 1} ^ {M} T _ {i} \alpha_ {i} c _ {i}, \text {w i t h} T _ {i} = \prod_ {j = 1} ^ {i - 1} (1 - \alpha_ {j}). \tag {1} +$$ + +Here, $c_{i}$ and $\alpha_{i}$ represent the color and opacity (density) of the point, respectively, derived from the point's 3D Gaussian properties. The factor $T_{i}$ denotes the transmittance along the ray, indicating the fraction of light reaching the camera without being occluded. + +In (1), $T_{i}$ serves as a weight for the contribution of each point's color to the pixel's final color, diminishing from 1 to 0 as $i$ increases due to cumulative absorption. To estimate the depth of a pixel $d$ , we adopt a median depth estimation approach. Specifically, the depth is determined as the depth of the first point where $T_{i}$ drops below 0.5: + +$$ +d = z _ {i ^ {*}}, \text {w h e r e} i ^ {*} = \min \{i \mid T _ {i} < 0. 5 \}. \tag {2} +$$ + +It is worth noting that the original 3D-GS (Kerbl et al., 2023) employs a weighted averaging approach, using $T_{i}\alpha_{i}$ as the weight for each 3D Gaussian along the ray to compute depth. In contrast, alignment experiments in Section 4.3 demonstrate that the median depth estimation approach achieves better alignment performance. + +# 3.1.2. DISPARITY ESTIMATION + +Next, we aim to estimate the disparity $\Delta_{n}\in \mathbb{R}^{W\times H\times 2}$ between views based on the estimated depth map. This disparity represents the pixel-wise shift of each 3D world point's projection across different views. Disparity estimation captures the geometric relationships between views, facilitating the modeling of inter-view correlations. + +Figure 2(b) illustrates the depth-based disparity estimation. To estimate the disparity, a pixel $(x_{n},y_{n})$ in the $n$ -th view is back-projected into 3D space using the depth $d_{n}$ to obtain the world coordinates $(x_{\mathrm{w}},y_{\mathrm{w}},z_{\mathrm{w}})$ . This 3D world point is then projected into the $(n - 1)$ -th view to obtain the corresponding pixel coordinates $(x_{n - 1},y_{n - 1})$ . The transformations involved are as follows: + +$$ +\left[ \begin{array}{l} x _ {\mathrm {w}} \\ y _ {\mathrm {w}} \\ z _ {\mathrm {w}} \\ 1 \end{array} \right] = V _ {n} ^ {- 1} \cdot \operatorname {a u g} \left(K ^ {- 1} d _ {n} \left[ \begin{array}{l} x _ {n} \\ y _ {n} \\ 1 \end{array} \right]\right), \tag {3} +$$ + +$$ +d _ {n - 1} ^ {\prime} \left[ \begin{array}{c} x _ {n - 1} \\ y _ {n - 1} \\ 1 \end{array} \right] = K \cdot \operatorname {d e a u g} \left(V _ {n - 1} \left[ \begin{array}{c} x _ {\mathrm {w}} \\ y _ {\mathrm {w}} \\ z _ {\mathrm {w}} \\ 1 \end{array} \right]\right), +$$ + +where $K \in \mathbb{R}^{3 \times 3}$ denotes the camera intrinsic matrix, and $V_{n}, V_{n-1} \in \mathbb{R}^{4 \times 4}$ are the extrinsic matrices corresponding to the $n$ -th and $(n-1)$ -th views, respectively. The camera parameters are calibrated using SfM (Schonberger & Frahm, 2016). $d_{n-1}^{\prime}$ represents the depth of the 3D world point in the camera coordinate system of the $(n-1)$ -th view. aug denotes the operation of augmenting a vector by adding an additional dimension with a value of 1 as its final element. Conversely, deaug refers to the operation of reducing a vector by removing its last dimension. The resulting disparity $\delta_{n} = (x_{n-1} - x_{n}, y_{n-1} - y_{n})$ for each pixel is then compiled into the disparity map $\Delta_{n}$ . + +Finally, we define a mask $\pmb{x}_{n,\mathrm{m}} \in \mathbb{R}^{W \times H}$ to determine whether the disparity estimation is meaningful, i.e., whether the information from the reference pixel is relevant or merely noise. The mask's criteria are as follows: + +1. The projected pixel must reside within the valid image region in the $(n - 1)$ -th view. +2. The corresponding 3D world point must lie in the positive $z$ -half-space of the $(n - 1)$ -th view's coordinate system. +3. No occlusion must exist along the line of sight, i.e., $d_{n-1}^{\prime}$ from (3) must be less than the estimated depth along the ray in the $(n-1)$ -th view. + +This can be formulated as: + +$$ +\boldsymbol {x} _ {n, \mathrm {m}} [ i, j ] = \left\{ \begin{array}{c c} 1 & \text {i f} 0 < \boldsymbol {\Delta} _ {n} [ i, j, 0 ] + i + 0. 5 < W \text {a n d} \\ & 0 < \boldsymbol {\Delta} _ {n} [ i, j, 1 ] + j + 0. 5 < H \text {a n d} \\ & 0 < \boldsymbol {d} _ {n - 1} ^ {\prime} [ i, j ] < \operatorname {W a r p} (\boldsymbol {d} _ {n - 1}, \boldsymbol {\Delta} _ {n}) [ i, j ], \\ 0 & \text {o t h e r w i s e ,} \end{array} \right. \tag {4} +$$ + +where $\pmb{d}_{n-1}^{\prime} \in \mathbb{R}^{W \times H}$ represents the tensor containing the depth values $d_{n-1}^{\prime}$ for each pixel, and $\operatorname{Warp}(\cdot, \cdot)$ denotes the warping operation based on the given disparity. Appendix A outlines the algorithmic process for disparity and mask estimation. + +# 3.2. Compression Framework for Images and Depth Maps + +# 3.2.1. IMAGE COMPRESSION MODEL + +As shown in Figure 3, the disparity extractor $DISE$ utilizes reconstructed depth maps $\hat{d}_{n-1}$ and $\hat{d}_n$ to extract multiscale disparities and feature masks. The reference feature extractor $RFE$ generates multi-scale reference features from the reconstructed image $\hat{x}_{n-1}$ and its intermediate reconstruction features $\{\pmb{f}_{n-1}^i \mid i = 1,2,3\}$ . Subsequently, the image encoder $IE$ and decoder $ID$ incorporate the reference features, aligned using the extracted disparities, into the backbone network. This process is formalized as: + +$$ +\boldsymbol {y} _ {n} = I E (\boldsymbol {x} _ {n}, D I S E (\hat {\boldsymbol {d}} _ {n - 1}, \hat {\boldsymbol {d}} _ {n}), R F E (\hat {\boldsymbol {x}} _ {n - 1}, \{\boldsymbol {f} _ {n - 1} ^ {i} \})), +$$ + +$$ +\hat {\boldsymbol {y}} _ {n} = Q (\boldsymbol {y} _ {n}), +$$ + +$$ +\hat {\boldsymbol {x}} _ {n} = I D \left(\hat {\boldsymbol {y}} _ {n}, D I S E \left(\hat {\boldsymbol {d}} _ {n - 1}, \hat {\boldsymbol {d}} _ {n}\right), R F E \left(\hat {\boldsymbol {x}} _ {n - 1}, \left\{\boldsymbol {f} _ {n - 1} ^ {i} \right\}\right)\right). \tag {5} +$$ + +For entropy coding, we utilize the hyperprior entropy model (Balle et al., 2018) and the quadtree partition-based entropy model (QPEM) (Li et al., 2023). The hyperprior entropy model transforms $\mathbf{y}_n$ into a hyperprior representation $\mathbf{z}_n$ . The quantized hyperprior representation $\hat{\mathbf{z}}_n$ is then used to accurately model the probability distribution of $\hat{\mathbf{y}}_n$ . The conditional probability distribution $p_{\hat{\mathbf{y}}_n}|\hat{\mathbf{z}}_n$ is defined as: + +$$ +p _ {\hat {\boldsymbol {y}} _ {n} | \hat {\boldsymbol {z}} _ {n}} (\hat {\boldsymbol {y}} _ {n} | \hat {\boldsymbol {z}} _ {n}) \sim \mathcal {N} \left(\boldsymbol {\mu} _ {n}, \boldsymbol {\sigma} _ {n} ^ {2}\right). \tag {6} +$$ + +Disparity extractor. As illustrated in Figure 3, we firstly employ the disparity estimation (DPE) module to derive the + +![](images/8e250be839e512351c7082b215d797d65fc75f391934e62116b20600fbaae273.jpg) +Figure 3. The architecture of the proposed image compression model. 'LR' represents the Leaky ReLU activation function, 'Q' denotes the quantization operation, and 'AE'/AD' refer to the arithmetic encoder/decoder, respectively. + +![](images/b3754a62f81199d2e5f3a909bb56fa49f70f2276ca241d522c8120397fb5a580.jpg) + +![](images/7bd61712a91c4aa1383f91406600b36338e013d3bec0a5894c0434e9666b3d05.jpg) +Figure 4. Illustration of the proposed image context transfer module. + +disparity map $\Delta_{n}$ and the corresponding mask $x_{n,\mathrm{m}}$ , using $\hat{d}_{n - 1}$ and $\hat{d}_n$ , following the method outlined in Section 3.1. Subsequently, $\Delta_{n}$ undergoes a series of downsampling operations to produce multi-scale disparity maps $\{\pmb{\Delta}_n^i\mid i = 1,2,3\}$ , which will facilitate multi-scale feature alignment. The mask $x_{n,\mathrm{m}}$ is further processed by the disparity mask extractor to extract feature masks $\{\pmb {f}_n^i\mid i = 1,2,3,4\}$ . + +Reference feature extractor. The reference feature extractor takes $\hat{\pmb{x}}_{n - 1},\{f_{n - 1}^i\mid i = 1,2,3\}$ , and $\pmb{\Delta}_{n}^{3}$ as inputs to extract multi-scale reference features $\{h_{n - 1}^i\mid i = 1,2,3,4\}$ , as shown in Figure 3. + +Image context transfer module. To incorporate the reference feature $\{h_{n - 1}^i\mid i = 1,2,3\}$ obtained from the $(n - 1)$ -th view into the image backbone encoder and decoder, enhancing feature representation, we introduce the image context transfer (ICT) module. As depicted in Figure 4, the module enhances the input feature $f_{n}^{i^{*}}$ from the backbone network by leveraging the aligned reference feature $h_{n - 1}^i$ via $\Delta_n^i$ . By applying feature masks, the module filters relevant information and refines the features, ultimately producing the output feature $f_{n}^{i}$ through a residual enhancement process. + +# 3.2.2. DEPTH MAP COMPRESSION MODEL + +The compression and decompression of the depth map $\pmb{d}_n$ leverage $\hat{\pmb{d}}_{n - 1}$ as a reference. Initially, $\hat{d}_{n - 1}$ is processed by the depth prediction extractor DEPE, which generates multi-scale depth prediction features and corresponding feature masks. Subsequently, the depth encoder $DE$ and decoder $DD$ integrate these extracted features and masks into the backbone network. This process is formalized as: + +$$ +\boldsymbol {y} _ {d _ {n}} = D E (\boldsymbol {d} _ {n}, D E P E (\hat {\boldsymbol {d}} _ {n - 1})), +$$ + +$$ +\hat {\boldsymbol {y}} _ {d _ {n}} = Q \left(\boldsymbol {y} _ {d _ {n}}\right), \tag {7} +$$ + +$$ +\hat {\boldsymbol {d}} _ {n} = D D \left(\hat {\boldsymbol {y}} _ {d _ {n}}, D E P E \left(\hat {\boldsymbol {d}} _ {n - 1}\right)\right). +$$ + +The entropy coding scheme incorporates both the hyperprior entropy model and the QPEM. The latent representation $\mathbf{y}_{d_n}$ is transformed into a hyperprior representation $\mathbf{z}_{d_n}$ using the hyperprior entropy model. Similar to the image compression model, the quantized hyperprior representation $\hat{\mathbf{z}}_{d_n}$ is used to model the probability distribution of $\hat{\mathbf{y}}_{d_n}$ . Additional details about the depth map compression model are provided in Appendix B. + +# 3.2.3. MULTI-VIEW SEQUENCE ORDERING + +Given the significant impact of FoV overlap between adjacent views on inter-view correlations, we propose a multiview sequence ordering method to alleviate the issue of insufficient overlap in unordered sequences. We define a distance metric to evaluate inter-view overlap and employ a greedy algorithm to find an improved sequence. + +In (3), if $V_{n-1}V_n^{-1} = I$ , then $(x_n, y_n) = (x_{n-1}, y_{n-1})$ . This indicates that each pixel in the $n$ -th view lies within the valid image area of the $(n-1)$ -th view, indicating high overlap. Thus, for any two views $i$ and $j$ , we measure + +![](images/84203b1850d39b2957547bda740d4a841b6ea576cc558ce8df9a40a5bef22752.jpg) + +![](images/79e8fcccc58a45c08641f66523486a5e1c003a3ae8b31a9542b86e9ee94a9957.jpg) + +![](images/fd3840a717b9c873719a0b240bb286f5904aad9605e6d35f60f3d05363117cf1.jpg) + +![](images/37a3b301a43b56499e1b206310bdf8ef12ea4cfdfb1aa3d7be8e18cb37274b82.jpg) +Figure 5. Rate-distortion curves of the proposed method compared with baselines. + +![](images/b79a0e8a39f747f058a8b322d8e8c8a567edbe98d1d94e6d37734027c62016be.jpg) + +![](images/a66de7676f7cc8ea8503a0366cabf63e9fa516838c8e6aeec629c82a4c6fc3b4.jpg) + +overlap by the proximity of $V_{i}V_{j}^{-1}$ to the identity matrix: + +$$ +\mathcal {D} _ {\mathcal {V}} (i, j) = \left\| V _ {i} V _ {j} ^ {- 1} - I \right\|. \tag {8} +$$ + +Appendix C proves that $\mathcal{D}_{\mathcal{V}}(i,j)$ is a distance metric for both the 2-norm and Frobenius norm. The Frobenius norm is utilized in our experiments. After determining pairwise distances, a greedy algorithm is employed, starting from an initial sequence with only one view, iteratively selecting the view closest to the last view in the sequence. + +# 3.2.4. TRAINING LOSS + +For each training step, a randomly selected subsequence of length 4 from a multi-view sequence serves as the training sample. The training loss comprises the distortion losses for both the reconstructed image and depth map, as well as the estimated compression rates for the encoded image and depth map: + +$$ +\begin{array}{l} L = \sum_ {n = s} ^ {s + 3} w _ {n - s + 1} \left[ \lambda_ {\mathrm {i m g}} D \left(\boldsymbol {x} _ {n}, \hat {\boldsymbol {x}} _ {n}\right) + \lambda_ {\mathrm {d e p}} \mathrm {M S E} \left(\boldsymbol {d} _ {n}, \hat {\boldsymbol {d}} _ {n}\right) \right. \\ \left. + R \left(\hat {\boldsymbol {y}} _ {n}\right) + R \left(\hat {\boldsymbol {z}} _ {n}\right) + R \left(\hat {\boldsymbol {y}} _ {d _ {n}}\right) + R \left(\hat {\boldsymbol {z}} _ {d _ {n}}\right) \right], \tag {9} \\ \end{array} +$$ + +where $D(\cdot, \cdot)$ denotes the distortion, $\mathrm{MSE}(\cdot, \cdot)$ represents the mean squared error (MSE), and $R(\cdot)$ indicates the estimated compression rates. The hyperparameters $\lambda_{\mathrm{img}}$ and $\lambda_{\mathrm{dep}}$ control the contributions of the image and depth map distortion losses, respectively. The weights $\{w_i \mid i = 1, 2, 3, 4\}$ adjust the influence of each view on the overall training loss. + +# 4. Experiments + +# 4.1. Experimental Setup + +Datasets. We evaluate our model on three multi-view image datasets: Tanks&Temples (Knapitsch et al., 2017), MipNeRF 360 (Barron et al., 2022), and Deep Blending (Hedman et al., 2018). Further details on the datasets are provided in Appendix D. + +Benchmarks. We compare our approach against several baselines, including traditional multi-view codec: MVHEVC (Hannuksela et al., 2015); learning-based multi-view image CODECs: two variants of HESIC (Deng et al., 2021), MASIC (Deng et al., 2023), SASIC (Wödlinger et al., 2022), two variants of LDMIC (Zhang et al., 2023), and two variants of BiSIC (Liu et al., 2024); as well as the 3D-GS compression method: HAC (Chen et al., 2024). Further details on the baseline configurations are provided in Appendix D. + +Metrics. Image reconstruction quality is measured using peak signal-to-noise ratio (PSNR) and multi-scale structural similarity index (MS-SSIM) (Wang et al., 2003). Bitrate is expressed in bits per pixel (bpp). In addition to plotting RD curves, the Bjøntegaard Delta bitrate (BDBR) is calculated to quantify the average bitrate savings across varying reconstruction qualities. Lower BDBR values indicate better performance. + +Implementation Details. The model was trained using five different configurations of $(\lambda_{\mathrm{img}}, \lambda_{\mathrm{dep}})$ : ((256, 64), (512, 128), (1024, 128), (2048, 128), (4096, 128)) when the image distortion loss is MSE, and ((8, 64), (16, 128), (32, 128), (64, 128), (128, 128)) when using MS-SSIM. The weights $w_i$ for four consecutive + +Table 1. BDBR comparison of different methods relative to MV-HEVC. + +
MethodsTanks&TemplesMip-NeRF 360Deep Blending
PSNRMS-SSIMPSNRMS-SSIMPSNRMS-SSIM
HAC636.81%350.72%374.20%294.42%673.57%418.85%
HESIC12.66%-26.29%28.41%-6.18%85.38%3.91%
HESIC+-4.85%-30.42%9.48%-5.11%32.5%-19.14%
MASIC-12.57%-34.19%3.26%-9.11%43.6%-9.33%
SASIC3.39%-18.59%2.40%-3.70%24.64%-9.48%
LDMIC-Fast-8.56%-27.76%1.72%-6.21%24.25%-23.31%
LDMIC-16.27%-44.33%-13.12%-25.39%16.88%-41.94%
BiSIC-Fast-26.59%-42.93%-20.61%-23.23%-8.24%-41.80%
BiSIC-30.89%-49.96%-29.87%-30.75%-15.46%-48.47%
3D-LMVIC-47.48%-63.69%-34.69%-40.25%-27.31%-54.15%
+ +Table 2. Average alignment quality (PSNR, MS-SSIM) of different alignment methods on the Train scene of the Tanks&Temples dataset. + +
MetricsMethods
HTPMSPyNetPWC-NetFlowFormer++3D-GSCOLMAPMVSFormer++Proposed
PSNR15.1617.9416.1217.5918.0817.3614.3215.3118.14
MS-SSIM0.54350.76330.62890.77070.78630.74100.74460.55440.8053
+ +views were set to (0.5, 1.2, 0.5, 0.9) as referenced from Li et al. (2023). The model was trained for 300 epochs with an initial learning rate of $10^{-4}$ , which was progressively decayed by a factor of 0.5 every 60 epochs. + +# 4.2. Experimental Results + +Coding performance. Figure 5 presents the rate-distortion curves of the compared methods, while Table 1 summarizes the BDBR of each codec relative to MV-HEVC. Across the three datasets, the proposed 3D-LMVIC consistently outperforms the baselines in both PSNR and MS-SSIM, demonstrating its effectiveness in reducing inter-view redundancy. For instance, on the Tanks&Temples dataset, 3D-LMVIC achieves a BDBR reduction of $16.59\%$ for PSNR and $13.73\%$ for MS-SSIM compared to BiSIC. The BDBR of HAC is relatively higher, likely due to the inclusion of 3D scene information in addition to 2D image representations. Appendix F provides examples of visual comparisons. Appendix G presents an analysis of computational complexity. Appendix H includes supplementary experiments on coding performance. + +# 4.3. Alignment Experiments + +To evaluate the effectiveness of the proposed 3D Gaussian geometric priors-based alignment method, we conducted alignment experiments on the Train scene from the Tanks&Temples dataset. The baselines for comparison include: + +1. Alignment methods commonly used in learning-based multi-view image CODECs, such as Homography Transfor + +mation (HT) (Deng et al., 2021) and Patch Matching (PM) (Huang et al., 2023). + +2. Optical flow estimation methods, such as SPyNet (Ranjan & Black, 2017), PWC-Net (Sun et al., 2018), and FlowFormer++ (Shi et al., 2023). +3. Depth map estimation methods, including original 3D-GS (Kerbl et al., 2023), COLMAP (Schonberger & Frahm, 2016; Schonberger et al., 2016) and MVSFormer++ (Chen-jie Cao & Fu, 2024). + +Alignment quality was assessed by computing PSNR and MS-SSIM between the aligned reference view images and the target view images. Table 2 summarizes the average alignment quality and runtime for each method. The proposed method outperformed the baselines in both PSNR and MS-SSIM, indicating its effectiveness in capturing complex disparities between views. Figure 6 provides visual comparisons, demonstrating that the proposed method achieves closer alignment with the target view images. Appendix D further investigates the relationship between the mask defined in (4) and the ghosting artifacts introduced during alignment. + +# 4.4. Ablation Study + +Codec components. To assess the contribution of codec components, we performed ablation experiments on the Tanks&Temples dataset. The rate-distortion curves are shown in Figure 7. Specifically, we evaluated the following baselines: (1) Separate: encoding and decoding without cross-view information; (2) Concatenation: direct feature concatenation from reference view without alignment; (3) + +![](images/946fbe313ffde3434492cca671a86a47892f40c97b8b95a3f194c5941963df97.jpg) +Reference View + +![](images/85a32bac3e6466e297f0aa4241e50737507e2dd65996c9aed72fa60283e5d6bd.jpg) +HT 12.82/0.6065 + +![](images/3d473cd76617918f06e4f1b278edef9c58ae2444481148358a3ee21b9a387250.jpg) +PM 10.05/0.4078 + +![](images/8eba976681161c3752b11dd4f27f47eaa3bb8af8e08ac0bbf00c06c154ca0019.jpg) +SPyNet 10.25/0.1990 + +![](images/08734db73e7e98e0b3b4e2a7601c5060eced5540eb168e1dde95d2f9785f263c.jpg) +Target View + +![](images/af5e8fa8264969580cdbd3f45f237074473735d05d3e21a4664c424c44346df0.jpg) +PWC-Net 9.65/0.2840 + +![](images/13084464f583b17edd95f69686a7bb7035ca287048b775a7d638fa2c571e7527.jpg) +FlowFormer++ 13.94/0.7216 + +![](images/a29207138911ee6f75ba0c2bd527b7b22dc1b2ef3e99f662de47a3731a1b1384.jpg) +Proposed 13.94/0.7217 + +![](images/c2fea20c5796eb521ea6ecd0e3b9c887cd023c47036ba1f19ed3182b1d43fdf8.jpg) +Figure 6. Visual comparison of different alignment methods on an adjacent view pair in the Train scene of the Tanks&Temples dataset. Alignment quality is reported as PSNR/MS-SSIM. +Figure 7. Rate-distortion curves of different ablation baselines on the Tanks&Temples dataset. + +![](images/5640ec32c6c8e1fdc21fb59c0368259360d2410fb29aa6b2c6592a1b0a1a6754.jpg) + +W/O Mask: removal of both image and depth mask; (4) W/O Dep.Pred: excluding depth prediction in the depth map compression model. These baselines resulted in bitrate increases of $41.07\%$ $(44.24\%)$ , $42.75\%$ $(47.52\%)$ , $7.19\%$ $(8.47\%)$ , and $8.03\%$ $(8.02\%)$ for PSNR (MS-SSIM), respectively, compared to the proposed method. The experimental results validate the effectiveness of the proposed components. + +Multi-view sequence ordering. As illustrated in Figure 7, we evaluated two baselines to assess the effectiveness of the proposed multi-view sequence ordering method: (1) Sort: sequences are ordered using the proposed method; (2) Random: sequences are randomly ordered. The Random baseline led to a $42.4\%$ $(50.64\%)$ increase in bitrate for PSNR (MS-SSIM) compared to Sort. Furthermore, Sort exhibited only a $3.76\%$ $(2.97\%)$ bitrate increase for PSNR (MS-SSIM) compared to the manually sorted sequences in the Tanks&Temples dataset. These results demonstrate the effectiveness of the proposed ordering method for unsorted multi-view sequences, achieving performance close to that of manual sorting. + +# 5. Conclusion + +In this paper, we present 3D-LMVIC, a novel learning-based multi-view image coding framework incorporating 3D Gaussian geometric priors. This framework exploits these geometric priors to estimate complex disparities and masks between views for effectively utilizing reference view information in the compression process. Additionally, we propose a depth map compression model designed to compactly and accurately represent the geometry of each view, incorporating a cross-view depth prediction module to capture inter-view geometric correlations. Moreover, we introduce a multi-view sequence ordering method for unordered sequences, enhancing the overlap between adjacent views by defining an inter-view distance measure to guide the sequence ordering. Experimental results confirm that 3D-LMVIC surpasses existing learning-based coding schemes in compression efficiency while achieving accurate disparity estimation. + +# Acknowledgments + +This work is supported in part by the National Natural Science Foundation of China under grant 62171248, 62301189, the project of Peng Cheng Laboratory (PCL2023A08), Guangdong Provincial Key Laboratory of Novel Security Intelligence Technologies (2022B1212010005), and Shenzhen Science and Technology Program under Grant KJZD20240903103702004, JCYJ20220818101012025, GXWD20220811172936001. + +# Impact Statement + +This work introduces 3D-LMVIC, a novel learning-based framework for multi-view image compression that leverages 3D Gaussian geometric priors to enable more accurate disparity estimation and efficient inter-view redundancy reduction. The proposed method demonstrates significant improvements over both traditional and learning-based baselines in compression efficiency and alignment quality across diverse 3D scene datasets. This advancement is especially valuable for applications requiring scalable and high-quality multi-view data processing, such as immersive virtual and augmented reality, autonomous driving, and 3D reconstruction. By incorporating geometric priors into the learning pipeline, this work contributes to bridging the gap between geometric scene understanding and data-driven compression. We believe our method offers a promising direction for further research in geometry-aware compression, though care should be taken to evaluate generalization to in-the-wild multi-view scenes with dynamic content. + +# References + +Anthes, C., García-Hernández, R. J., Wiedemann, M., and Kranzlmüller, D. State of the art of virtual reality technology. In 2016 IEEE aerospace conference, pp. 1-19. IEEE, 2016. +Ayzik, S. and Avidan, S. Deep image compression using decoder side information. In European Conference on Computer Vision, pp. 699-714, 2020. +Balle, J., Laparra, V., and Simoncelli, E. P. Density modeling of images using a generalized normalization transformation. In International Conference on Learning Representations, 2016. +Balle, J., Laparra, V., and Simoncelli, E. P. End-to-end optimized image compression. In International Conference on Learning Representations, 2017. +Balle, J., Minnen, D., Singh, S., Hwang, S. J., and Johnston, N. Variational image compression with a scale hyperprior. In International Conference on Learning Representations, 2018. + +Barron, J. T., Mildenhall, B., Verbin, D., Srinivasan, P. P., and Hedman, P. Mip-nerf 360: Unbounded anti-aliased neural radiance fields. CVPR, 2022. +Bellard, F. Bpg image format. https://bellard.org/bpg/, 2014. +Bross, B., Wang, Y.-K., Ye, Y., Liu, S., Chen, J., Sullivan, G. J., and Ohm, J.-R. Overview of the versatile video coding (vvc) standard and its applications. IEEE Transactions on Circuits and Systems for Video Technology, 31 (10):3736-3764, 2021. +Chen, X., Ma, H., Wan, J., Li, B., and Xia, T. Multi-view 3d object detection network for autonomous driving. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pp. 1907-1915, 2017. +Chen, Y., Wu, Q., Cai, J., Harandi, M., and Lin, W. Hac: Hash-grid assisted context for 3d gaussian splatting compression. In European Conference on Computer Vision, 2024. +Chenjie Cao, X. R. and Fu, Y. Mvsformer++: Revealing the devil in transformer's details for multi-view stereo. In International Conference on Learning Representations (ICLR), 2024. +Dai, A., Chang, A. X., Savva, M., Halber, M., Funkhouser, T., and Nießner, M. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5828-5839, 2017. +Deng, X., Yang, W., Yang, R., Xu, M., Liu, E., Feng, Q., and Timofte, R. Deep homography for efficient stereo image compression. In 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1492-1501, 2021. doi: 10.1109/CVPR46437.2021.00154. +Deng, X., Deng, Y., Yang, R., Yang, W., Timofte, R., and Xu, M. Masic: Deep mask stereo image compression. IEEE Transactions on Circuits and Systems for Video Technology, 2023. +Hamdi, A., Melas-Kyriazi, L., Mai, J., Qian, G., Liu, R., Vondrick, C., Ghanem, B., and Vedaldi, A. Ges: Generalized exponential splatting for efficient radiance field rendering. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 19812-19822, June 2024. +Hannuksela, M. M., Yan, Y., Huang, X., and Li, H. Overview of the multiview high efficiency video coding (mv-hevc) standard. In 2015 IEEE International Conference on Image Processing (ICIP), pp. 2154-2158, 2015. doi: 10.1109/ICIP.2015.7351182. + +He, D., Zheng, Y., Sun, B., Wang, Y., and Qin, H. Checkerboard context model for efficient learned image compression. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14771-14780, 2021. +Hedman, P., Philip, J., Price, T., Frahm, J.-M., Drettakis, G., and Brostow, G. Deep blending for free-viewpoint image-based rendering. ACM Trans. Graph., 37(6), dec 2018. ISSN 0730-0301. doi: 10.1145/3272127.3275084. URL https://doi.org/10.1145/3272127.3275084. +Hosseinian, S. and Arefi, H. 3d reconstruction from multiview medical x-ray images-review and evaluation of existing methods. The international archives of the photogrammetry, remote sensing and spatial information sciences,40:319-326,2015. +Huang, Y., Chen, B., Zhang, J., Han, Q., and Xia, S.-T. Compressive sensing based asymmetric semantic image compression for resource-constrained IoT system. In Proceedings of the 59th ACM/IEEE Design Automation Conference, pp. 877-882, 2022. +Huang, Y., Chen, B., Qin, S., Li, J., Wang, Y., Dai, T., and Xia, S.-T. Learned distributed image compression with multi-scale patch matching in feature domain. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 4322-4329, 2023. +Jiang, W., Yang, J., Zhai, Y., Ning, P., Gao, F., and Wang, R. Mlic: Multi-reference entropy model for learned image compression. In Proceedings of the 31st ACM International Conference on Multimedia, pp. 7618-7627, 2023. +Kerbl, B., Kopanas, G., Leimkuehler, T., and Drettakis, G. 3d gaussian splatting for real-time radiance field rendering. ACM Transactions on Graphics (TOG), 42(4):1-14, 2023. +Knapitsch, A., Park, J., Zhou, Q.-Y., and Koltun, V. Tanks and temples: Benchmarking large-scale scene reconstruction. ACM Transactions on Graphics, 36(4), 2017. +Langley, P. Crafting papers on machine learning. In Langley, P. (ed.), Proceedings of the 17th International Conference on Machine Learning (ICML 2000), pp. 1207-1216, Stanford, CA, 2000. Morgan Kaufmann. +Lei, J., Liu, X., Peng, B., Jin, D., Li, W., and Gu, J. Deep stereo image compression via bi-directional coding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 19669-19678, 2022. +Li, J., Li, B., and Lu, Y. Neural video compression with diverse contexts. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 22616-22626, 2023. doi: 10.1109/CVPR52729.2023.02166. + +Liu, X., Chen, B., Liu, Z., Wang, Y., and Xia, S.-T. An exploration with entropy constrained 3d gaussians for 2d video compression. In The Thirteenth International Conference on Learning Representations. +Liu, Z., Zhang, X., Shao, J., Lin, Z., and Zhang, J. Bidirectional stereo image compression with cross-dimensional entropy model. In European Conference on Computer Vision, 2024. +Minnen, D., Balle, J., and Toderici, G. Joint autoregressive and hierarchical priors for learned image compression. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pp. 10794-10803, 2018. +Mokssit, S., Licea, D. B., Guermah, B., and Ghogho, M. Deep learning techniques for visual slam: A survey. IEEE Access, 11:20026-20050, 2023. +Qin, S., Chen, B., Huang, Y., An, B., Dai, T., and Xia, S.-T. Perceptual image compression with cooperative cross-modal side information. arXiv e-prints, pp. arXiv-2311, 2023. +Qin, S., Wang, J., Zhou, Y., Chen, B., Luo, T., An, B., Dai, T., Xia, S., and Wang, Y. Mambavc: Learned visual compression with selective state spaces. arXiv preprint arXiv:2405.15413, 2024a. +Qin, S., Zhou, Y.-M., Wang, J.-P., Chen, B., An, B.-Y., Dai, T., and Xia, S.-T. Progressive learning with visual prompt tuning for variable-rate image compression. In 2024 IEEE International Conference on Image Processing (ICIP), pp. 1767-1773. IEEE, 2024b. +Ranjan, A. and Black, M. J. Optical flow estimation using a spatial pyramid network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. +Schmalstieg, D. and Hollerer, T. Augmented reality: principles and practice. Addison-Wesley Professional, 2016. +Schonberger, J. L. and Frahm, J.-M. Structure-from-motion revisited. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4104-4113, 2016. +Schönberger, J. L., Zheng, E., Pollefeys, M., and Frahm, J.-M. Pixelwise view selection for unstructured multiview stereo. In European Conference on Computer Vision (ECCV), 2016. +Shi, X., Huang, Z., Li, D., Zhang, M., Cheung, K. C., See, S., Qin, H., Dai, J., and Li, H. Flowformer++: Masked cost volume autoencoding for pretraining optical flow estimation. In Proceedings of the IEEE/CVF Conference + +on Computer Vision and Pattern Recognition (CVPR), pp. 1599-1610, June 2023. +Sun, D., Yang, X., Liu, M.-Y., and Kautz, J. Pwc-net: Cnns for optical flow using pyramid, warping, and cost volume. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +Vetro, A., Wiegand, T., and Sullivan, G. J. Overview of the stereo and multiview video coding extensions of the h. 264/mpeg-4 avc standard. Proceedings of the IEEE, 99 (4):626-642, 2011. +Wallace, G. K. The JPEG still picture compression standard. IEEE transactions on consumer electronics, 38(1):xviii-xxxiv, 1992. +Wang, Z., Simoncelli, E. P., and Bovik, A. C. Multiscale structural similarity for image quality assessment. In The Thrity-Seventh Asilomar Conference on Signals, Systems & Computers, 2003, volume 2, pp. 1398-1402. IEEE, 2003. +Wödlinger, M., Kotera, J., Xu, J., and Sablatnig, R. Sasic: Stereo image compression with latent shifts and stereo attention. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 661-670, 2022. +Xia, Y., Huang, Y., Chen, B., Wang, G., Wang, H., and Wang, Y. Fca-net: Accelerating stereo image compression through cascade alignment of side information. Pattern Recognition, 168:111799, 2025. ISSN 0031-3203. doi: https://doi.org/10.1016/j.patcog.2025.111799. URL https://www.sciencedirect.com/science/article/pii/S0031320325004595. +Xu, L., Su, Z., Han, L., Yu, T., Liu, Y., and Fang, L. Unstructuredfusion: Realtime 4d geometry and texture reconstruction using commercial rgbd cameras. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42(10):2508-2522, 2020. doi: 10.1109/TPAMI.2019.2915229. +Yan, C., Qu, D., Xu, D., Zhao, B., Wang, Z., Wang, D., and Li, X. Gs-slam: Dense visual slam with 3d gaussian splatting. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 19595-19604, June 2024. +Zhai, Y., Tang, L., Ma, Y., Peng, R., and Wang, R. Disparity-based stereo image compression with aligned cross-view priors. In Proceedings of the 30th ACM International Conference on Multimedia, pp. 2351-2360, 2022. +Zhang, X., Shao, J., and Zhang, J. Ldmic: Learning-based distributed multi-view image coding. In International Conference on Learning Representations, 2023. + +# A. Disparity and Mask Estimation Algorithm + +# Algorithm 1 Disparity and Mask Estimation + +Input: Depth estimation function $GSDE$ , intrinsic matrix $K$ , extrinsic matrices $V_{n}$ and $V_{n-1}$ + +Output: Disparity map $\Delta_{n}$ , mask $x_{n,\mathrm{m}}$ + +$\pmb{d}_n \gets GSDE(K, V_n)$ + +$\pmb{d}_{n - 1}\gets GSDE(K,V_{n - 1})$ + +$\pmb{\Delta}_{n}, \pmb{d}_{n-1}^{\prime} \gets \text{Disparity Estimation}(\pmb{d}_{n}, K, V_{n}, V_{n-1})$ + +$\pmb{x}_{n,\mathrm{m}}\gets \mathrm{MaskEstimation}(\pmb{\Delta}_n,\pmb{d}_{n - 1}^{\prime},\pmb{d}_{n - 1})$ + +![](images/f89369f52136fab641164dc7970b79a15976b390ccdf403b47a9f01c500ead4f.jpg) +Figure 8. The architecture of the proposed depth map compression model. 'LR' represents the Leaky ReLU activation function, 'Q' denotes the quantization operation, and 'AE'/'AD' refer to the arithmetic encoder/decoder, respectively. + +![](images/487adbd833a840e9ae923df35f58ab7aba469ef9078ec35b03b3943a72a6f9aa.jpg) + +# B. Supplementary Information for the Depth Map Compression Model + +As illustrated in Figure 8, during the compression and decompression of $\pmb{d}_n$ , $\hat{d}_{n-1}$ is initially processed by the depth prediction extractor, which extracts multi-scale depth prediction features and associated feature masks. These extracted features and masks are then integrated into the depth backbone encoder and decoder via the depth context integration (DCI) module. Detailed explanations of the depth prediction extractor and the DCI module are provided in the subsequent content. + +Depth prediction extractor. As illustrated in Figure 8, we first utilize the proposed cross-view depth prediction (CVDP) module to predict the depth map $\pmb{d}_{n,\mathrm{p}} \in \mathbb{R}^{W \times H}$ and the associated mask $\pmb{d}_{n,\mathrm{m}} \in \mathbb{R}^{W \times H}$ for the $n$ -th view, based on $\hat{d}_{n-1}$ . Specifically, for each pixel $(x_{n-1}, y_{n-1})$ in the $(n-1)$ -th view and its corresponding reconstructed depth $\hat{d}_{n-1}$ , the CVDP module determines the corresponding pixel coordinates $(x_n, y_n)$ and the depth prediction $d_n'$ in the $n$ -th view using the method described in (3). The depth at the nearest grid point $(\lfloor x_n - 0.5 \rfloor, \lfloor y_n - 0.5 \rfloor)$ is then set to $d_n'$ : + +$$ +\boldsymbol {d} _ {n, \mathrm {p}} [ \lfloor x _ {n} - 0. 5 ], \lfloor y _ {n} - 0. 5 ] ] = d _ {n} ^ {\prime}. \tag {10} +$$ + +This cross-view depth prediction is applied to each pixel in the $(n - 1)$ -th view to construct $d_{n,\mathrm{p}}$ . If multiple pixel coordinates map to the same grid point, the depth prediction for that point is set to the minimum of these predicted depths. Additionally, if a grid point has no corresponding pixel coordinates, its depth prediction value is set to 0. The mask $d_{n,\mathrm{m}}$ indicates whether each grid point has at least one corresponding pixel coordinate, with values set to 1 where a correspondence exists and 0 otherwise. + +Subsequently, $\pmb{d}_{n,\mathrm{p}}$ is fed into the depth prediction feature extractor to produce multi-scale depth prediction features, denoted as $\{\pmb{g}_{n,\mathrm{p}}^i\mid i = 1,2,3,4\}$ . Concurrently, the mask $\pmb{d}_{n,\mathrm{m}}$ is processed by the depth mask extractor to derive the associated multi-scale feature masks $\{\pmb{g}_{n,\mathrm{m}}^i\mid i = 1,2,3,4\}$ . + +Depth Context Integration Module. Each DCI module integrates the input features $\pmb{g}_n^{i^*}$ from the backbone network with $\pmb{g}_{n,\mathrm{p}}^i$ through channel-wise concatenation, followed by element-wise multiplication with $\pmb{g}_{n,\mathrm{m}}^i$ to produce the output feature $\pmb{g}_n^i$ : + +$$ +\boldsymbol {g} _ {n} ^ {i} = \left(\boldsymbol {g} _ {n} ^ {i ^ {*}} \oplus \boldsymbol {g} _ {n, \mathrm {p}} ^ {i}\right) \odot \boldsymbol {g} _ {n, \mathrm {m}} ^ {i}, \tag {11} +$$ + +where $\oplus$ denotes channel-wise concatenation and $\odot$ denotes element-wise multiplication. + +# C. Proof of $\mathcal{D}_{\mathcal{V}}(i,j)$ as a Distance Measure for 2-Norm and Frobenius Norm + +# C.1. Proof for 2-Norm + +# C.1.1. DEFINITION + +Definition C.1. For $u = (A,B)$ and $v = (C,D)$ , where $A,C\in \mathbb{R}^{n\times m}$ and $B,D\in \mathbb{R}^{n\times l}$ , we define $(u,v)_2 = \| AC^T +BD^T\| _2$ . For any scalar $\alpha$ , $\alpha u = (\alpha A,\alpha B)$ . Additionally, $u + v = (A + C,B + D)$ . + +# C.1.2. LEMMA + +Lemma C.2. For any $u = (A,B)$ and $v = (C,D)$ as defined in Definition C.1, the following inequality holds: + +$$ +(u, v) _ {2} \leq \sqrt {(u , u) _ {2} (v , v) _ {2}} +$$ + +Proof. For any real number $t$ , we have: + +$$ +\begin{array}{l} (u + t v, u + t v) _ {2} = \left\| (A + t C) (A + t C) ^ {T} + (B + t D) (B + t D) ^ {T} \right\| _ {2} \\ \leq \| A A ^ {T} + B B ^ {T} \| _ {2} + t \| A C ^ {T} + B D ^ {T} \| _ {2} + t \| C A ^ {T} + D B ^ {T} \| _ {2} + t ^ {2} \| C C ^ {T} + D D ^ {T} \| _ {2} \\ = (u, u) _ {2} + t (u, v) _ {2} + t (v, u) _ {2} + t ^ {2} (v, v) _ {2} \\ = (u, u) _ {2} + 2 t (u, v) _ {2} + t ^ {2} (v, v) _ {2} \\ \end{array} +$$ + +The right-hand side of the last equation can be viewed as a quadratic expression in $t$ and is greater than or equal to $(u + tv, u + tv)_2$ , which is non-negative. Therefore, the discriminant of this quadratic must be non-positive: + +$$ +(2 (u, v) _ {2}) ^ {2} - 4 (u, u) _ {2} (v, v) _ {2} \leq 0 +$$ + +Thus, we obtain: + +$$ +(u, v) _ {2} \leq \sqrt {(u , u) _ {2} (v , v) _ {2}} +$$ + +# C.1.3. THEOREM + +Theorem C.3. $\mathcal{D}_{\mathcal{V}}(i,j) = \| V_iV_j^{-1} - I\| _2$ is a distance metric. + +Proof. We need to prove that $\mathcal{D}_{\mathcal{V}}(i,j)$ satisfies non-negativity, symmetry, and the triangle inequality. + +Non-negativity: Since $\mathcal{D}_{\mathcal{V}}(i,j)$ is a norm, it is non-negative. Additionally, as the extrinsic matrices for different views are distinct, $V_{i}\neq V_{j}$ for $i\neq j$ . $\mathcal{D}_{\mathcal{V}}(i,j) = 0$ if and only if $V_{i}V_{j}^{-1} - I = 0$ , which holds only when $V_{i} = V_{j}$ , i.e., $i = j$ . + +Symmetry: The extrinsic matrix $V_{i}$ can be represented as $V_{i} = \begin{pmatrix} R_{i} & t_{i} \\ 0 & 1 \end{pmatrix}$ , where $R_{i} \in \mathbb{R}^{3 \times 3}$ is a rotation matrix and $t_{i} \in \mathbb{R}^{3 \times 1}$ is a translation vector. We have: + +$$ +\mathcal {D} _ {\mathcal {V}} (i, j) = \left\| V _ {i} V _ {j} ^ {- 1} - I \right\| _ {2} +$$ + +$$ +\begin{array}{l} = \left\| \left( \begin{array}{c c} R _ {i} & t _ {i} \\ 0 & 1 \end{array} \right) \left( \begin{array}{c c} R _ {j} ^ {T} & - R _ {j} ^ {T} t _ {j} \\ 0 & 1 \end{array} \right) - I \right\| _ {2} \\ = \left\| \left( \begin{array}{c c} R _ {i} R _ {j} ^ {T} - I & - R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i} \\ 0 & 0 \end{array} \right) \right\| _ {2} \\ = \left\| \left( \begin{array}{c c} R _ {i} R _ {j} ^ {T} - I & - R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i} \\ 0 & 0 \end{array} \right) \left( \begin{array}{c c} R _ {i} R _ {j} ^ {T} - I & - R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i} \\ 0 & 0 \end{array} \right) ^ {T} \right\| _ {2} ^ {\frac {1}{2}} \\ = \left\| 2 I - R _ {j} R _ {i} ^ {T} - R _ {i} R _ {j} ^ {T} + R _ {i} R _ {j} ^ {T} t _ {j} t _ {j} ^ {T} R _ {j} R _ {i} ^ {T} - t _ {i} t _ {j} ^ {T} R _ {j} R _ {i} ^ {T} - R _ {i} R _ {j} ^ {T} t _ {j} t _ {i} ^ {T} + t _ {i} t _ {i} ^ {T} \right\| _ {2} ^ {\frac {1}{2}} \\ = \left\| R _ {j} R _ {i} ^ {T} \left(2 I - R _ {j} R _ {i} ^ {T} - R _ {i} R _ {j} ^ {T} + R _ {i} R _ {j} ^ {T} t _ {j} t _ {j} ^ {T} R _ {j} R _ {i} ^ {T} - t _ {i} t _ {j} ^ {T} R _ {j} R _ {i} ^ {T} - R _ {i} R _ {j} ^ {T} t _ {j} t _ {i} ^ {T} + t _ {i} t _ {i} ^ {T}\right) R _ {i} R _ {j} ^ {T} \right\| _ {2} ^ {\frac {1}{2}} \\ = \left\| 2 I - R _ {j} R _ {i} ^ {T} - R _ {i} R _ {j} ^ {T} + t _ {j} t _ {j} ^ {T} - R _ {j} R _ {i} ^ {T} t _ {i} t _ {j} ^ {T} - t _ {j} t _ {i} ^ {T} R _ {i} R _ {j} ^ {T} + R _ {j} R _ {i} ^ {T} t _ {i} t _ {i} ^ {T} R _ {i} R _ {j} ^ {T} \right\| _ {2} ^ {\frac {1}{2}} \\ = \mathcal {D} _ {\mathcal {V}} (j, i) \\ \end{array} +$$ + +The fourth equality follows from the fact that for any matrix $A$ , $\| A \|_2 = \| AA^T \|_2^{\frac{1}{2}}$ . The sixth equality is due to the orthogonality of $R_i$ and $R_j$ , and the invariance of the 2-norm under orthogonal transformations. The final equality holds because interchanging the indices $i$ and $j$ in the expression on the right-hand side of the fifth equality leads to the same expression as $\mathcal{D}_{\mathcal{V}}(j, i)$ , which matches the right-hand side of the seventh equality. + +Triangle inequality: For views $i$ , $j$ , and $k$ , define $A_{i,j} = R_j^T - R_i^T$ , $B_{i,j} = -R_j^T t_j + R_i^T t_i$ , and similarly for $A_{j,k}, B_{j,k}, A_{k,i}, B_{k,i}$ . Let $u_{j,k} = (A_{j,k}, B_{j,k})$ and $u_{k,i} = (A_{k,i}, B_{k,i})$ . Starting from the fourth equation in the symmetry proof, we proceed as follows: + +$$ +\begin{array}{l} \mathcal {D} _ {\mathcal {V}} (i, j) = \left\| \left( \begin{array}{c c} R _ {i} R _ {j} ^ {T} - I & - R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i} \\ 0 & 0 \end{array} \right) \left( \begin{array}{c c} R _ {i} R _ {j} ^ {T} - I & - R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i} \\ 0 & 0 \end{array} \right) ^ {T} \right\| _ {2} ^ {\frac {1}{2}} \\ = \left\| \left(R _ {i} R _ {j} ^ {T} - I\right) \left(R _ {i} R _ {j} ^ {T} - I\right) ^ {T} + \left(- R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i}\right) \left(- R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i}\right) ^ {T} \right\| _ {2} ^ {\frac {1}{2}} \\ = \left\| R _ {i} ^ {T} \left((R _ {i} R _ {j} ^ {T} - I) (R _ {i} R _ {j} ^ {T} - I) ^ {T} + (- R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i}) (- R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i}) ^ {T}\right) R _ {i} \right\| _ {2} ^ {\frac {1}{2}} \\ = \left\| \left(R _ {j} ^ {T} - R _ {i} ^ {T}\right) \left(R _ {j} ^ {T} - R _ {i} ^ {T}\right) ^ {T} + \left(- R _ {j} ^ {T} t _ {j} + R _ {i} ^ {T} t _ {i}\right) \left(- R _ {j} ^ {T} t _ {j} + R _ {i} ^ {T} t _ {i}\right) ^ {T} \right\| _ {2} ^ {\frac {1}{2}} \\ = \left\| A _ {i, j} A _ {i, j} ^ {T} + B _ {i, j} B _ {i, j} ^ {T} \right\| _ {2} ^ {\frac {1}{2}} \\ = \left\| \left(A _ {j, k} + A _ {k, i}\right) \left(A _ {j, k} + A _ {k, i}\right) ^ {T} + \left(B _ {j, k} + B _ {k, i}\right) \left(B _ {j, k} + B _ {k, i}\right) ^ {T} \right\| _ {2} ^ {\frac {1}{2}} \\ = \left\| A _ {j, k} A _ {j, k} ^ {T} + B _ {j, k} B _ {j, k} ^ {T} + A _ {k, i} A _ {k, i} ^ {T} + B _ {k, i} B _ {k, i} ^ {T} + A _ {j, k} A _ {k, i} ^ {T} + B _ {j, k} B _ {k, i} ^ {T} + A _ {k, i} A _ {j, k} ^ {T} + B _ {k, i} B _ {j, k} ^ {T} \right\| _ {2} ^ {\frac {1}{2}} \\ \leq \left(\| A _ {j, k} A _ {j, k} ^ {T} + B _ {j, k} B _ {j, k} ^ {T} \| _ {2} + \| A _ {k, i} A _ {k, i} ^ {T} + B _ {k, i} B _ {k, i} ^ {T} \| _ {2} + 2 \| A _ {j, k} A _ {k, i} ^ {T} + B _ {j, k} B _ {k, i} ^ {T} \| _ {2}\right) ^ {\frac {1}{2}} \\ = \left(\mathcal {D} _ {\mathcal {V}} (j, k) ^ {2} + \mathcal {D} _ {\mathcal {V}} (k, i) ^ {2} + 2 (u _ {j, k}, u _ {k, i}) _ {2}\right) ^ {\frac {1}{2}} \\ \leq \left(\mathcal {D} _ {\mathcal {V}} (j, k) ^ {2} + \mathcal {D} _ {\mathcal {V}} (k, i) ^ {2} + 2 \sqrt {(u _ {j , k} , u _ {j , k}) _ {2} (u _ {k , i} , u _ {k , i}) _ {2}}\right) ^ {\frac {1}{2}} \\ = \left(\mathcal {D} _ {\mathcal {V}} (j, k) ^ {2} + \mathcal {D} _ {\mathcal {V}} (k, i) ^ {2} + 2 \mathcal {D} _ {\mathcal {V}} (j, k) \mathcal {D} _ {\mathcal {V}} (k, i)\right) ^ {\frac {1}{2}} \\ = \mathcal {D} _ {\mathcal {V}} (j, k) + \mathcal {D} _ {\mathcal {V}} (k, i) \\ \end{array} +$$ + +The second inequality follows from Lemma C.2. + +# C.2. Proof for Frobenius Norm + +# C.2.1. DEFINITION + +Definition C.4. For $u = (A, B)$ and $v = (C, D)$ as defined in Definition C.1, we define $(u, v)_F = \operatorname{tr} \left( AC^T + BD^T \right)$ . + +# C.2.2. LEMMA + +Lemma C.5. For $u$ and $v$ as defined in Definition C.4, the following inequality holds: + +$$ +(u, v) _ {F} \leq \sqrt {(u , u) _ {F} (v , v) _ {F}}. +$$ + +Proof. The method of proof is analogous to that used in Lemma C.2. By leveraging the properties of the trace and following a similar reasoning process, the result is derived. $\square$ + +# C.2.3. THEOREM + +Theorem C.6. $\mathcal{D}_{\mathcal{V}}(i,j) = \| V_iV_j^{-1} - I\| _F$ is a distance metric. + +Proof. We need to prove that $\mathcal{D}_{\mathcal{V}}(i,j)$ satisfies non-negativity, symmetry, and the triangle inequality. + +Non-negativity: The proof follows a similar approach to that of Theorem C.3, so we omit the details here. + +# Symmetry: + +$$ +\begin{array}{l} \mathcal {D} _ {\mathcal {V}} (i, j) = \left\| V _ {i} V _ {j} ^ {- 1} - I \right\| _ {F} \\ = \left\| \left( \begin{array}{c c} R _ {i} & t _ {i} \\ 0 & 1 \end{array} \right) \left( \begin{array}{c c} R _ {j} ^ {T} & - R _ {j} ^ {T} t _ {j} \\ 0 & 1 \end{array} \right) - I \right\| _ {F} \\ = \left\| \left( \begin{array}{c c} R _ {i} R _ {j} ^ {T} - I & - R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i} \\ 0 & 0 \end{array} \right) \right\| _ {F} \\ = \operatorname {t r} \left(\left( \begin{array}{c c} R _ {i} R _ {j} ^ {T} - I & - R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i} \\ 0 & 0 \end{array} \right) \left( \begin{array}{c c} R _ {i} R _ {j} ^ {T} - I & - R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i} \\ 0 & 0 \end{array} \right) ^ {T}\right) ^ {\frac {1}{2}} \\ = \operatorname {t r} \left(2 I - R _ {j} R _ {i} ^ {T} - R _ {i} R _ {j} ^ {T} + R _ {i} R _ {j} ^ {T} t _ {j} t _ {j} ^ {T} R _ {j} R _ {i} ^ {T} - t _ {i} t _ {j} ^ {T} R _ {j} R _ {i} ^ {T} - R _ {i} R _ {j} ^ {T} t _ {j} t _ {i} ^ {T} + t _ {i} t _ {i} ^ {T}\right) ^ {\frac {1}{2}} \\ = \left(\operatorname {t r} (2 I) - \operatorname {t r} (R _ {j} R _ {i} ^ {T}) - \operatorname {t r} (R _ {i} R _ {j} ^ {T}) + \operatorname {t r} (R _ {i} R _ {j} ^ {T} t _ {j} t _ {j} ^ {T} R _ {j} R _ {i} ^ {T}) - \operatorname {t r} (t _ {i} t _ {j} ^ {T} R _ {j} R _ {i} ^ {T}) - \operatorname {t r} (R _ {i} R _ {j} ^ {T} t _ {j} t _ {i} ^ {T}) + \operatorname {t r} (t _ {i} t _ {i} ^ {T})\right) ^ {\frac {1}{2}} \\ = \left(\operatorname {t r} (2 I) - \operatorname {t r} \left(R _ {j} R _ {i} ^ {T}\right) - \operatorname {t r} \left(R _ {i} R _ {j} ^ {T}\right) + \operatorname {t r} \left(t _ {j} t _ {j} ^ {T}\right) - \operatorname {t r} \left(R _ {i} ^ {T} t _ {i} t _ {j} ^ {T} R _ {j}\right) - \operatorname {t r} \left(R _ {j} ^ {T} t _ {j} t _ {i} ^ {T} R _ {i}\right) + \operatorname {t r} \left(t _ {i} t _ {i} ^ {T}\right)\right) ^ {\frac {1}{2}} \\ = \left(\operatorname {t r} (2 I) - \operatorname {t r} \left(R _ {i} R _ {j} ^ {T}\right) - \operatorname {t r} \left(R _ {j} R _ {i} ^ {T}\right) + \operatorname {t r} \left(t _ {i} t _ {i} ^ {T}\right) - \operatorname {t r} \left(R _ {j} ^ {T} t _ {j} t _ {i} ^ {T} R _ {i}\right) - \operatorname {t r} \left(R _ {i} ^ {T} t _ {i} t _ {j} ^ {T} R _ {j}\right) + \operatorname {t r} \left(t _ {j} t _ {j} ^ {T}\right)\right) ^ {\frac {1}{2}} \\ = \mathcal {D} _ {\mathcal {V}} (j, i) \\ \end{array} +$$ + +The fourth equality holds because, for any matrix $A$ , we have $\| A \|_F = \mathrm{tr}(AA^T)^{\frac{1}{2}}$ . The sixth equality is a result of the linearity of the trace operator. The seventh equality follows from the cyclic property of the trace, for instance, $\mathrm{tr}(R_i R_j^T t_j t_j^T R_j R_i^T) = \mathrm{tr}(t_j t_j^T R_j R_i^T R_i R_j^T) = \mathrm{tr}(t_j t_j^T)$ . + +Triangle Inequality: For views $i, j$ , and $k$ , we follow the same definitions of $A_{i,j}$ , $B_{i,j}$ , $A_{j,k}$ , $B_{j,k}$ , $A_{k,i}$ , $B_{k,i}$ , $u_{j,k}$ , and $u_{k,i}$ as in the proof of the triangle inequality in Theorem C.3. Starting from the fourth equality in the proof of symmetry, we have: + +$$ +\begin{array}{l} \mathcal {D} _ {\mathcal {V}} (i, j) = \operatorname {t r} \left(\left( \begin{array}{c c} R _ {i} R _ {j} ^ {T} - I & - R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i} \\ 0 & 0 \end{array} \right) \left( \begin{array}{c c} R _ {i} R _ {j} ^ {T} - I & - R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i} \\ 0 & 0 \end{array} \right) ^ {T}\right) ^ {\frac {1}{2}} \\ = \operatorname {t r} \left(\left(R _ {i} R _ {j} ^ {T} - I\right) \left(R _ {i} R _ {j} ^ {T} - I\right) ^ {T} + \left(- R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i}\right) \left(- R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i}\right) ^ {T}\right) ^ {\frac {1}{2}} \\ = \operatorname {t r} \left(R _ {i} ^ {T} \left((R _ {i} R _ {j} ^ {T} - I) (R _ {i} R _ {j} ^ {T} - I) ^ {T} + (- R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i}) (- R _ {i} R _ {j} ^ {T} t _ {j} + t _ {i}) ^ {T}\right) R _ {i}\right) ^ {\frac {1}{2}} \\ = \operatorname {t r} \left(\left(R _ {j} ^ {T} - R _ {i} ^ {T}\right) \left(R _ {j} ^ {T} - R _ {i} ^ {T}\right) ^ {T} + \left(- R _ {j} ^ {T} t _ {j} + R _ {i} ^ {T} t _ {i}\right) \left(- R _ {j} ^ {T} t _ {j} + R _ {i} ^ {T} t _ {i}\right) ^ {T}\right) ^ {\frac {1}{2}} \\ = \operatorname {t r} \left(A _ {i, j} A _ {i, j} ^ {T} + B _ {i, j} B _ {i, j} ^ {T}\right) ^ {\frac {1}{2}} \\ = \operatorname {t r} \left(\left(A _ {j, k} + A _ {k, i}\right) \left(A _ {j, k} + A _ {k, i}\right) ^ {T} + \left(B _ {j, k} + B _ {k, i}\right) \left(B _ {j, k} + B _ {k, i}\right) ^ {T}\right) ^ {\frac {1}{2}} \\ \end{array} +$$ + +$$ +\begin{array}{l} = \operatorname {t r} \left(A _ {j, k} A _ {j, k} ^ {T} + B _ {j, k} B _ {j, k} ^ {T} + A _ {k, i} A _ {k, i} ^ {T} + B _ {k, i} B _ {k, i} ^ {T} + A _ {j, k} A _ {k, i} ^ {T} + B _ {j, k} B _ {k, i} ^ {T} + A _ {k, i} A _ {j, k} ^ {T} + B _ {k, i} B _ {j, k} ^ {T}\right) ^ {\frac {1}{2}} \\ = \left(\operatorname {t r} \left(A _ {j, k} A _ {j, k} ^ {T} + B _ {j, k} B _ {j, k} ^ {T}\right) + \operatorname {t r} \left(A _ {k, i} A _ {k, i} ^ {T} + B _ {k, i} B _ {k, i} ^ {T}\right) + 2 \operatorname {t r} \left(A _ {j, k} A _ {k, i} ^ {T} + B _ {j, k} B _ {k, i} ^ {T}\right)\right) ^ {\frac {1}{2}} \\ = \left(\mathcal {D} _ {\mathcal {V}} (j, k) ^ {2} + \mathcal {D} _ {\mathcal {V}} (k, i) ^ {2} + 2 \left(u _ {j, k}, u _ {k, i}\right) _ {F}\right) ^ {\frac {1}{2}} \\ \leq \left(\mathcal {D} _ {\mathcal {V}} (j, k) ^ {2} + \mathcal {D} _ {\mathcal {V}} (k, i) ^ {2} + 2 \sqrt {(u _ {j , k} , u _ {j , k}) _ {F} (u _ {k , i} , u _ {k , i}) _ {F}}\right) ^ {\frac {1}{2}} \\ = \left(\mathcal {D} _ {\mathcal {V}} (j, k) ^ {2} + \mathcal {D} _ {\mathcal {V}} (k, i) ^ {2} + 2 \mathcal {D} _ {\mathcal {V}} (j, k) \mathcal {D} _ {\mathcal {V}} (k, i)\right) ^ {\frac {1}{2}} \\ = \mathcal {D} _ {\mathcal {V}} (j, k) + \mathcal {D} _ {\mathcal {V}} (k, i) \\ \end{array} +$$ + +The third equality holds because the trace is invariant under similarity transformations. + +![](images/a983a32c346d3a2abb4698bd797ea90ab2710adf61156740eab2049138f88d21.jpg) + +# D. Experimental Details + +Datasets. Our evaluation is conducted on three multi-view image datasets: Tanks&Temples, Mip-NeRF 360, and Deep Blending. Tanks&Temples consists of 21 diverse indoor and outdoor scenes, ranging from sculptures and large vehicles to complex large-scale environments, with intricate geometry and varied lighting conditions. Mip-NeRF 360 includes 9 scenes—5 outdoor and 4 indoor—captured in unbounded settings, allowing for 360-degree camera rotations and capturing content at varying distances. From the Deep Blending dataset, we selected 9 representative scenes that span indoor, outdoor, vegetation-rich, and nighttime environments. For all datasets, $90\%$ of the images in each scene were allocated for training, with the remaining $10\%$ used for testing. + +**Benchmarks.** We assess the coding performance of MV-HEVC using the HTM-16.3 software $^2$ . The learning-based multi-view image codecs used as baselines, along with our proposed method, are trained under the same conditions on a shared training set and evaluated on a common test set. For the 3D Gaussian Splatting compression method (HAC), we train the 3D Gaussian representations on each scene's test data and measure the reconstruction quality of the rendered images. The bpp is determined by dividing the size of the compressed 3D Gaussian file by the total number of pixels in the test images. + +Implementation Details. We utilize the Adam optimizer for training with a batch size of 2. To facilitate data augmentation and optimize memory usage, each image is randomly cropped to $256 \times 256$ . Correspondingly, the principal point in the intrinsic matrix $K$ is adjusted to reflect the new crop. The intrinsic matrix $K$ is given by: + +$$ +K = \left( \begin{array}{c c c} f _ {x} & 0 & c _ {x} \\ 0 & f _ {y} & c _ {y} \\ 0 & 0 & 1 \end{array} \right), +$$ + +where $f_{x}$ and $f_{y}$ represent the focal lengths along the x and y axes, respectively, and $c_{x}$ and $c_{y}$ are the principal point coordinates. If the top-left corner of the crop is located at $(p_x,p_y)$ in the original image, the updated intrinsic matrix $K^{\prime}$ becomes: + +$$ +K ^ {\prime} = \left( \begin{array}{c c c} f _ {x} & 0 & c _ {x} - p _ {x} \\ 0 & f _ {y} & c _ {y} - p _ {y} \\ 0 & 0 & 1 \end{array} \right). +$$ + +Ablation study details. To implement Separate, we set the reference view images, predicted depth maps, and masks to full-zero tensors, with $\lambda_{\mathrm{dep}}$ set to zero. In Concatenation, alignment operations in the ICT modules are removed. For W/O Mask, we eliminate all mask-related multiplications in the ICT and DCI modules. In W/O Dep.Pred, the predicted depth maps are replaced with full-zero tensors. For both Sort and Random, sequences in the training and test sets are reordered accordingly. + +![](images/61c0dcfe03533bbff264327db1eb4d8796aeae2fe0b799724d16666a010a601c.jpg) + +![](images/68882247a0fb4c778758f5346ea3c1162b5ec51937be7f9cdda191c51ceba439.jpg) + +![](images/d3fa5bac682f045f10ee1f1567311d5801ec37cbbaecd6d582b619c76d50499e.jpg) + +![](images/89d54153fa01bc6ba01c079ec7474e69efe6e6878a10acd54215a90fb052c8d5.jpg) + +![](images/4b2168d1be9861740ee53f12f008eb16bd9111f5e092553250ca4f23e3d5900a.jpg) + +![](images/2e76bf8c4bd23e152b0812cc17a0e81f532a44aedce30264548a75f825af80ee.jpg) + +![](images/436ad58cde95e8203dad6a625ad88c9ed79d9580ff61c06f45979f4973711795.jpg) + +![](images/5cb965bb0c3286aeefea2484fd2204a4a855c6390e82ae53d44ff114090abef8.jpg) + +![](images/887f1c9edd7506c1d01b082895fb2703168e9d5448d368ce504121f9059464ad.jpg) +Reference View +Figure 9. Visual examples of proposed alignment method and the mask from (4). + +![](images/ada15149270d1701ce7806fe98b12e14aed99725202f02ca04cd88d2aaf49788.jpg) +Target View + +![](images/68f8ed47079a02a641d4f3ab68a484320564f09594484352f848684cbc0950e8.jpg) +Proposed + +![](images/3f1c3b0b7b7ed4a53dd80e9588bdc003c55d2c525ebf814bdefe9c53992804ec.jpg) +Mask + +Table 3. Complexity of learning-based image codec's evaluated on images with the resolution as ${978} \times {546}$ in the Tanks&Temples dataset. + +
CODECsMACs Enc.MACs Dec.Params Enc.Params Dec.Time Enc.Time Dec.Memory
HESIC+48.16G134.31G17.18M15.1M4.35s10.73s2248M
MASIC65.62G511.34G32.03M30.73M4.38s10.78s5202M
SASIC91.80G438.09G3.57M4.44M0.06s0.09s4498M
LDMIC-Fast37.49G94.43G7.73M11.15M0.11s0.09s1168M
LDMIC30.91G87.84G7.73M11.15M4.24s10.63s1096M
BiSIC-Fast1880G (Enc.+Dec.)85.9M (Enc.+Dec.)--3552M
BiSIC1770G (Enc.+Dec.)78.21M (Enc.+Dec.)--3006M
3D-LMVIC479.43G436.16G41.92M36.87M0.19s0.18s3164M
+ +# E. Supplementary Alignment Experiments + +Figure 9 shows visual examples of proposed alignment method along with the corresponding masks. Notably, ghosting artifacts due to occlusion, such as those involving the iron bars and the edge of the train shell, are effectively identified by the mask, aiding the codec in filtering out irrelevant information when merging features from the reference view. + +# F. Visualization + +In Figure 10, we present examples from the Tanks&Temples dataset to visually compare the performance of LDMIC, BiSIC, and 3D-LMVIC. The results demonstrate that 3D-LMVIC preserves more texture details and achieves higher reconstruction quality for elements like branches, humans, and text, while consuming fewer bits. + +# G. Complexity Analysis + +Table 3 summarizes the Multiply-Accumulate Operations (MACs), model parameters, coding speed, and memory usage of eight learning-based image CODECs. These evaluations were conducted on a platform with an Intel(R) Xeon(R) Gold 6330 CPU @ 2.00GHz and a GPU containing 10,752 parallel processing cores. The neural network components were executed on the GPU, while entropy coding was performed on the CPU. + +Due to the absence of separate encoder and decoder implementations in the open-source code of BiSIC, we measured only its overall computational complexity. The proposed 3D-LMVIC demonstrates computational complexity within an acceptable range, comparable to the SOTA BiSIC and slightly better than BiSIC-Fast. Specifically, 3D-LMVIC achieved encoding and decoding times of 0.19s and 0.18s, respectively, ranking it among the faster methods. + +![](images/f1e8d14c76f2d11fdb70fde90d0357d5af0d5843deec1b010fd54cf71af1c23f.jpg) + +![](images/8b789211063afb406aa19cd06e62a314df78ddf701c9d0f3fe210ef9964dd6ab.jpg) +0.9482/36.88/0.9900 + +![](images/6e6d0505525ecd4d0597d2a353454c51bc0486cff5e69254ac61ba94d644a0ee.jpg) +0.7685/36.18/0.9887 + +![](images/5d402c1f3a0c7be1a65487d2840f18326bb1c9f6b564416c6ea10c8a11e79c67.jpg) +0.6050/37.73/0.9908 + +![](images/697b1bfde16060e2a703443176bc64d34ec285b0699d7a474791d864f69e9a85.jpg) + +![](images/823a047b644816709e42397b7414734c19bb4b0c768bc34fdad7ca3b7247c250.jpg) +1.1425/36.06/0.9917 + +![](images/a3084151189a2cf4c67e367dae0ba173a754077cce050e6aa054b5354d848984.jpg) +0.8934/35.34/0.9913 + +![](images/e0b94e844c2190530f694b80a648b1c9d719b6745d6a01b6e84bdf8f6aa1517a.jpg) +0.6545/37.14/0.9924 + +![](images/94b580aeeeee13b177d7e9d176f77e393dd13fa0f45a416a7ddca0f81eee70cd.jpg) + +![](images/4374730ab21de32015b038ecbbc8e635248da78b64f8cd1c8c865be53775c010.jpg) +1.1475/34.95/0.9938 + +![](images/4979efca39bc7e25fc9b42b86ce90bfc849d041b07ecc9eba4ff03027d239490.jpg) +0.9431/33.52/0.9927 + +![](images/8b75ca13c5222d6f1c6523d778714b11cf857b4bb78da30443b8a4f434165233.jpg) +0.7596/36.72/0.9946 + +![](images/a0c1d514be4627f41f2f5fe0fbc0cde3d2dbd6be8dd6855077669d5462af3550.jpg) +Ground truth +Figure 10. Visual Comparison of LDMIC, BiSIC, and 3D-LMVIC on the Tanks&Temples Dataset. Compression performance is reported as bpp/PSNR/MS-SSIM. + +![](images/942f979070882b7707de53823dc2513d2d8248feafe33caf58847ff8b5c221ad.jpg) +0.8110/37.85/0.9952 +LDMIC + +![](images/3be6de77a2924c60ba7cd3035a755235eab56455772a18823fe45ebf8effd767.jpg) +0.6574/36.75/0.9950 +BiSIC + +![](images/3f36a0bf7b56c74401888babb3adeba3ba0a007b89cf77e7a18a3ea328c2d8d5.jpg) +0.6063/38.89/0.9950 +3D-LMVIC + +Table 4. BDBR of 3D-LMVIC relative to HEVC. + +
MethodsTanks&TemplesMip-NeRF 360Deep Blending
PSNRMS-SSIMPSNRMS-SSIMPSNRMS-SSIM
3D-LMVIC-20.69%-40.75%-14.48%-22.06%-17.29%-43.06%
+ +While the MACs of the 3D-LMVIC encoder are relatively high, they remain lower than those of BiSIC, which employs a symmetric encoder-decoder structure. For BiSIC, we estimate that the MACs for its encoder and decoder each account for approximately half of the total MACs. Additionally, the inclusion of a depth map codec in 3D-LMVIC contributes to the higher MACs and model parameter count. + +# H. Supplementary Coding Performance + +We present a supplementary comparison of the coding performance between the proposed 3D-LMVIC and the HEVC video coding standard. The multi-view sequences are treated as a single video and compressed using HEVC with the lowdelay_P configuration and YUV444 input format. HEVC's coding efficiency is evaluated using the HM-18.0 software3. Table 4 reports the BDBR of 3D-LMVIC relative to HEVC. On the three datasets, 3D-LMVIC consistently surpasses HEVC in both PSNR and MS-SSIM, demonstrating its effectiveness in reducing inter-view redundancy in multi-view sequences. \ No newline at end of file diff --git a/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/images.zip b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..29bdd38bf93311d2317517168b902ded40e9d3ce --- /dev/null +++ b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9adeec682f9ef4c7808a2b37afb2c0f0119a7c4a72bc3f97da650b522c2b8bb3 +size 1504776 diff --git a/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/layout.json b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ccb4c087eeee292d3f368b683e09207e7050ce69 --- /dev/null +++ b/3dlmviclearningbasedmultiviewimagecompressionwith3dgaussiangeometricpriors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50324ea1aa8e1678f423b52e2d77a8a0b33d8599329f9c0984e21d2ff606279d +size 782202 diff --git a/3dquestionansweringviaonly2dvisionlanguagemodels/328a3b80-b211-4a99-aaf9-20826a719f1b_content_list.json b/3dquestionansweringviaonly2dvisionlanguagemodels/328a3b80-b211-4a99-aaf9-20826a719f1b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7658c92eb42f24c33c66bc1d144638b2c7b5d891 --- /dev/null +++ b/3dquestionansweringviaonly2dvisionlanguagemodels/328a3b80-b211-4a99-aaf9-20826a719f1b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:429c027ef0c88bfbe05e88cd5489a379ef5f677f1e784571dadd7136483d703b +size 136071 diff --git a/3dquestionansweringviaonly2dvisionlanguagemodels/328a3b80-b211-4a99-aaf9-20826a719f1b_model.json b/3dquestionansweringviaonly2dvisionlanguagemodels/328a3b80-b211-4a99-aaf9-20826a719f1b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e4d0e6614b7872db1dad1a02464493cbaabb6718 --- /dev/null +++ b/3dquestionansweringviaonly2dvisionlanguagemodels/328a3b80-b211-4a99-aaf9-20826a719f1b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d0098a0604075db2622506389a516cb76720fac4ba3da267beb5a573bce36d5 +size 151900 diff --git a/3dquestionansweringviaonly2dvisionlanguagemodels/328a3b80-b211-4a99-aaf9-20826a719f1b_origin.pdf b/3dquestionansweringviaonly2dvisionlanguagemodels/328a3b80-b211-4a99-aaf9-20826a719f1b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..15669c9045c709f694306128ff6e2a8b6d04e595 --- /dev/null +++ b/3dquestionansweringviaonly2dvisionlanguagemodels/328a3b80-b211-4a99-aaf9-20826a719f1b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c73fabba3cfe83b9c4abe63d679446060c72b2196ee82331745e538784c299f +size 5308294 diff --git a/3dquestionansweringviaonly2dvisionlanguagemodels/full.md b/3dquestionansweringviaonly2dvisionlanguagemodels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ed4ff4d162c9c6833b1ec78de3b61a3ee4e6b5ee --- /dev/null +++ b/3dquestionansweringviaonly2dvisionlanguagemodels/full.md @@ -0,0 +1,627 @@ +Fengyun Wang1 Sicheng Yu2 Jiawei Wu3 Jinhui Tang4 Hanwang Zhang1 Qianru Sun2 + +# Abstract + +Large vision-language models (LVLMs) have significantly advanced numerous fields. In this work, we explore how to harness their potential to address 3D scene understanding tasks, using 3D question answering (3D-QA) as a representative example. Due to the limited training data in 3D, we do not train LVLMs but infer in a zero-shot manner. Specifically, we sample 2D views from a 3D point cloud and feed them into 2D models to answer a given question. When the 2D model is chosen, e.g., LLAVA-OV, the quality of sampled views matters the most. We propose cdViews, a novel approach to automatically selecting critical and diverse Views for 3D-QA. cdViews consists of two key components: viewSelector prioritizing critical views based on their potential to provide answer-specific information, and viewNMS enhancing diversity by removing redundant views based on spatial overlap. We evaluate cdViews on the widely-used ScanQA and SQA benchmarks, demonstrating that it achieves state-of-the-art performance in 3D-QA while relying solely on 2D models without fine-tuning. These findings support our belief that 2D LVLMs are currently the most effective alternative (of the resource-intensive 3D LVLMs) for addressing 3D tasks. The code is available at https://github.com/fereenwong/cdViews. + +# 1. Introduction + +The advancement of large vision-language models (LVLMs) has transformed the vision-language domain by jointly processing huge sets of vision and text training data, leading to + +![](images/1f72488a025e01cbce2916d6f9c74f009be3c7e69429ce9ead83478df3f767ed.jpg) +(a) Illustration of Feature Alignment Issue + +![](images/059f481c1bc2f64bf0ea8f9d61310fae5da821aec193cedc6abc91654d91f42c.jpg) +(b) Performance on the test set (with objects) of ScanQA + +Figure 1: Comparison of 3D Question Answering methods. (a): a1 for 3D-based methods; a2 and a3 for hybrid $(2\mathrm{D} + 3\mathrm{D})$ methods. All of these methods require computationally intensive 3D-language alignment using point cloud data for spatial reasoning. a4 is our method that leverages pre-trained LVLMs operating solely on 2D views. The well-aligned features between 2D visual features and language in 2D LVLMs enable zero-shot 3D-QA. (b): Model comparison on the test set (with objects) of ScanQA. The upper-right corner indicates the best performance. The circle area represents the size of training data required for aligning 3D and language. The “×” denotes zero-shot 3D-QA using 2D model LLAVA-OV (Li et al., 2024a). We respectively use ① uniform sampling, ② image retrieval, and ③ our cdViews, to select views as input to LLAVA-OV. + +significant breakthroughs in addressing 2D visual question + +answering (2D-VQA) (Shao et al., 2023; Guo et al., 2023; Lu et al., 2023). However, extending these capabilities to 3D question answering (3D-QA) has unique challenges. Unlike 2D tasks, which benefit from abundant paired training data, the 3D domain lacks large-scale datasets to learn the alignment between 3D (such as point clouds) and language (such as text descriptions of 3D scenes). Existing 3D-language models still fall short of serving as robust counterparts to the widely used 2D-language models such as LLaMA-3 (Dubey et al., 2024). Therefore, current 3D-QA methods often have to train from scratch on small-scale 3D datasets, resulting in poor model performance. In contrast, hybrid approaches leverage additional 2D information. One solution (Hong et al., 2023) is to reconstruct 3D features from the features of multiple 2D views (Figure 1 (a2)), but its performance is poor due to the technical challenge of 3D reconstruction. Another solution (Mo & Liu, 2024) is to combine 2D and 3D features as input into the model (Figure 1 (a3)). 2D features extracted from LVLMs are already well-aligned with language, but further alignment with 3D features requires careful model design and advanced training techniques. Figure 1(b) shows that hybrid methods also require extensive amounts of training data (indicated by the large circle area), which are not always available. + +In this paper, we take a completely different approach by avoiding direct alignment between 3D and language. Instead, we rely solely on 2D views and pre-trained LVLMs for understanding 3D scenes. For implementation, we first select a limited number of 2D views, and then take them as the only visual input to LVLMs to answer the input question. + +During our preliminary trials, we identified several challenges. First, all LVLMs have a token limit, restricting the number of 2D views they can process at once. This constraint makes it crucial to carefully select the most informative views. Second, given a fixed number of views, the quality of the selected views plays a critical role. Existing methods for view selection fall into two categories: uniform sampling, which randomly selects views, and image retrieval, which selects views based on question-based retrieval (Li et al., 2022). However, both approaches have significant limitations, either being inefficient or failing to capture critical views. Specifically, as shown in Figure 2, image retrieval outperforms uniform sampling but has two major limitations. First, it prioritizes question-related views over truly essential ones for answering the question. For example, when asked "What is the black couch facing?", the model retrieves images of the "couch" but overlooks the "coffee table", which is the answer-related object but in the opposite view of "couch". Second, it often selects redundant or overlapping views, causing inefficiency. + +To tackle the challenges, we introduce a new framework cdViews to select critical and diverse Views + +: What is the black couch facing? + +: Coffee table + +Uniform Sampling -- ignores question context + +![](images/2d6087c00fddd6fd656592647e3c32b6c49123b1415f38f54af36dc0521ce9ce.jpg) + +Image Retrieval – overlooks answer-related information + +![](images/466b320a5939f63b27d7a964f2aee741f4d0a9b98932f0aa699ee6380b6a4ae1.jpg) + +Ours – “the black couch facing a coffee table” is included + +![](images/6823dd65bd24edd46d2df14b6f55abca267a30507c0b9508938d9c30452b0243.jpg) +Figure 2: Comparison of view selection methods. + +(cdViews) and then use them to perform LVLMs-based 3D-QA in a zero-shot manner. cdViews is designed on two key principles. (1) Prioritize Critical Views: We aim for views that contain information crucial for answering questions, rather than merely finding views that match question texts. Thus, we develop a lightweight viewSelector module that prioritizes views most likely to contain answer-related information. To train this module, we design a viewAnnotator that automatically generates training data in two steps. viewAnnotator firstly converts question-answer pairs into descriptive captions. It then leverages a pre-trained LVLM to identify the most informative views that match these captions. (2) Enhance View Diversity: The aim is to improve spatial diversity and minimize redundancy for the selected views. To this end, we develop a view Non-Maximum Suppression method dubbed as viewNMS. This method uses camera parameters, including position and orientation, to filter out overlapping views while preserving spatial views as diverse as possible. When viewSelector and viewNMS are ready, they will be plugged into a pre-trained 2D LVLM for zero-shot 3D-QA in the inference stage. + +We evaluate the proposed cdViews on two widely used benchmarks of 3D-QA: ScanQA (Azuma et al., 2022) and SQA (Ma et al., 2022). Our experimental results demonstrate that cdViews's view selection significantly outperforms conventional approaches such as uniform sampling and image-text retrieval. Notably, cdViews achieves superior performance compared to models using 3D or hybrid input data. In summary, our contributions are three-fold. (1) We explore the use of 2D-only LVLM to address 3D-QA in a zero-shot manner, analyzing various view selection methods. (2) We introduce cdViews that integrates a viewSelector with a viewNMS to capture critical and diverse views. We design a viewAnnotator to generate + +training data for viewSelector automatically. (3) Our experiment results demonstrate that cdViews achieves state-of-the-art performance on two 3D-QA benchmarks, even surpassing the 3D or hybrid models. + +# 2. Related Works + +Existing approaches to 3D-QA can be categorized into three folds based on the format of visual inputs: 3D-based, 2D-based, and hybrid (combining 3D and 2D). + +3D-based Methods. The 3D-based methods (Man et al., 2024a) use 3D point clouds as visual input, allowing direct processing of point cloud data to understand 3D environments. However, these methods face two challenges. First, the scarcity of 3D-language training data limits its scalability. Efforts such as 3D-VLP (Yang et al., 2024) attempt to mitigate this issue by leveraging large-scale synthetic datasets, and recent works (Zhang et al., 2024; Jin et al., 2023b; Hong et al., 2023; Zhu et al., 2023; Chen et al., 2024b) aim to unify multiple 3D tasks, such as captioning, question answering, and grounding, under a single framework. Second, using an entire 3D scene as input introduces unnecessary information for QA, distracting the model and reducing efficiency. To address this, methods such as SIG3D (Man et al., 2024a) incorporate situational awareness to focus on only relevant 3D regions guided by the language prompts (e.g., the input situation). Overall, 3D-based methods have constraints due to the lack of large-scale 3D language pretraining data. The resulting 3D-language alignment in the feature space is thus suboptimal. Besides, using entire scenes as input to answer local questions is costly and inefficient. + +2D-based Methods. Recent 2D-based methods use uniformly sampled 2D views as input to 2D LVLMs (Singh et al., 2024; Zheng et al., 2024; Liu et al., 2024b), primarily focusing on evaluating the performance of 2D LVLMs on 3D-QA. They focus more on evaluating pretrained 2D LVLMs on 3D-QA tasks, rather than developing approaches to adapt and improve their performance for spatial reasoning. Some more recent works have attempted to utilize 2D views more effectively. OpenEQA (Majumdar et al., 2024), transforms visual information into textual context, such as frame-level or scene-graph captions, and then leverages LLMs to answer questions. This approach depends on whether the generated text description can accurately capture the critical visual details, which may lead to incomplete or inaccurate information. + +Compared to the above methods, we make two key contributions. First, we are the first to leverage 2D LVLMs via zero-shot inference (or by plugging a lightweight module) to address 3D-QA tasks. Second, we identify view selection as a critical factor in zero-shot 3D-QA, for which there is a + +lack of an efficient solution in prior works. To tackle this, we propose a simple yet effective strategy for selecting critical and diverse views (i.e., cdViews), thereby enhancing the utility of readily-trained 2D LVLMs for 3D-QA. + +Hybrid Methods. Hybrid methods (Huang et al., 2024; Mo & Liu, 2024; Huang et al., 2023; Hong et al., 2023; Man et al., 2024b; Fu et al., 2024) leverage pre-trained 2D LVLMs to address 3D vision-language tasks in two main ways. The first approach involves mapping multi-view 2D image features (which are well-aligned with language due to 2D LVLMs) into the 3D feature space (Zhu et al., 2025; Hong et al., 2023). These mapped features can either replace original 3D features (Hong et al., 2023) or serve as complementary inputs to enhance the alignment between language and hybrid $(2\mathrm{D} + 3\mathrm{D})$ features (Zhu et al., 2025). The second approach processes 2D images and 3D point clouds as parallel inputs (Mo & Liu, 2024), using complementary strengths: 2D views provide fine-grained semantic details, while 3D point clouds capture spatial awareness. Although these methods improve 3D-QA performance, they rely on explicit 3D reconstruction, needing additional models and causing more processing steps. In contrast, our method uses 2D views and feeds them into a unified 2D LVLM, which makes a simpler pipeline. + +Different from these hybrid methods, our approach relies solely on 2D views as input, without the need for mapping between 3D and 2D. Our technical contribution is an efficient view selection strategy, cdViews. Among the hybrid methods, the work most closely related to ours is BridgeQA (Mo & Liu, 2024), which selects views by first retrieving the top-1 question-related view and then combining it with 3D point clouds as input for a hybrid model. However, BridgeQA depends on 3D point clouds to extract spatial information for QA, requiring complex $3\mathrm{D}\rightarrow 2\mathrm{D}\rightarrow$ language alignment. Additionally, its retrieval-based approach risks overlooking critical views (which we will show in the experimental sections). In contrast, our method leverages multiple 2D views to understand 3D, meanwhile utilizing the strong language alignment already achieved by pre-trained 2D LVLMs. + +# 3. Preliminaries + +Leveraging pre-trained 2D LVLMs in a zero-shot manner for 3D-QA tasks is promising yet underexplored. Since 2D LVLMs are fundamentally designed to process 2D images as input, we propose cdViews to efficiently select the most informative 2D views of 3D scenes. To understand the complexities in view selection, we conduct a preliminary study using intuitive view selection methods, taking LLAVA-OV (Li et al., 2024a) as the backbone and using the validation set of the ScanQA dataset (Azuma et al., 2022). Note that it requires no training data due to the zero-shot + +![](images/956edf0996fe91338e155d39f2913b99ef84294aa7f2ddb47cd5621f211bcbe8.jpg) +Figure 3: The pipeline of zero-shot 3D-QA using three different view selection methods: uniform sampling (option ①), image retrieval (option ②), and our cdViews (option ③). The views marked with $\star$ are selected ones. As for inference, our cdViews has two modules to run: the viewSelector identifies critical views, and the viewNMS enhances view diversity and minimizes redundancy. The viewSelector is trained using automatically generated labels from the viewAnnotator module, which is detailed in Figure 5. + +![](images/14fd7794e7121ab358cdb9c8ca3c3f9a38f651819bf79adbea03ece9bf61a988.jpg) +Figure 4: Performance comparison of view selection methods on the validation set of ScanQA (Azuma et al., 2022). It can be observed that: 1) performance improves with an increasing number of views, peaks at a certain point, and finally declines; and 2) noticeable performance gaps arise from different view selection methods, highlighting the importance of effective view selection. An earlier peak (30.1) appears in cdViews thanks to viewNMS. + +approach. In the following, we first present a problem formulation for zero-shot 3D-QA, followed by experiments using two intuitive view selection methods: uniform sampling and image retrieval. + +Problem Formulation. Given a question $Q$ and a 3D scene represented by a set of 2D views $\mathcal{M} = \{V_1, V_2, \ldots, V_N\}$ , each associated with a camera matrix containing the position and orientation. The view selection identifies a subset of $k$ views (that are useful to answer $Q$ ), denoted as $\mathcal{M}'$ : + +$$ +\mathcal {M} ^ {\prime} = \mathcal {F} (\mathcal {M}, Q, k) = \left\{V _ {i _ {1}}, V _ {i _ {2}}, \dots , V _ {i _ {k}} \right\}, \tag {1} +$$ + +where $k \leq N$ , $\mathcal{F}$ is a view selection function, which can + +either be question-dependent (denoted as $\mathcal{F}(\mathcal{M},Q,k)$ ), or not (denoted as $\mathcal{F}(\mathcal{M},k)$ ). Then, $\mathcal{M}'$ and the question $Q$ are input into the model to produce the answer $A$ : + +$$ +A = \operatorname {L V L M} \left(\mathcal {M} ^ {\prime}, Q\right). \tag {2} +$$ + +The same zero-shot inference process is applied throughout all experiments in this work, with variations only in two key aspects: the view selection function $\mathcal{F}$ and the number of selected views $k$ that determine the final set of views $\mathcal{M}'$ . + +Uniform Sampling vs. Image Retrieval. We show the zero-shot experimental results of these two methods in Figure 4. We also include the results of our cdViews for comparison. + +1) Uniform sampling randomly selects 2D views without considering the context of the question $Q$ (option ① in Figure 3), formulated as: + +$$ +\mathcal {F} _ {\text {u n i f o r m}} (\mathcal {M}, k) = \left\{V _ {i _ {j}} \right\} _ {j = 1} ^ {k}, i _ {j} \sim \text {U n i f o r m} (1, N). \tag {3} +$$ + +Uniform sampling is the most straightforward way to select 2D views as input into 2D LVLMs for 3D-QA, and the best achieved metric score of EM@1 is $28.3\%$ . + +2) Image retrieval has been used in BridgeQA (Mo & Liu, 2024). Following (Mo & Liu, 2024), we use the BLIP's image-text retrieval model (Li et al., 2022) to select views that best match the question $Q$ (option $②$ in Figure 3). This process can be represented as: + +$$ +\mathcal {F} _ {\text {r e t r i e v a l}} (\mathcal {M}, Q, k) = \left\{V _ {i _ {j}} \mid i _ {j} \in \operatorname {T o p} - k (\operatorname {I R} (Q, \mathcal {M})) \right\}. \tag {4} +$$ + +where $\operatorname{IR}(Q, \mathcal{M})$ denotes the semantic similarity scores between $Q$ and every view in $\mathcal{M}$ , i.e., identifying the views + +# Step 1: Caption Generation + +![](images/c4210a5804db2e8c5d028b04f7886999f64e50523690236f47a240bc6f29fb62.jpg) + +$< Prompt_{R}>$ : You are a helpful assistant. For each QA pair, generate a caption that describes the visual scene, fully incorporating relevant information from the question and answer. + +![](images/73dac71f02dc2ff93116595c4bd7610c428e76473e90b6899011ed3f26dd7af7.jpg) + +: What is in the right corner of room by curtains? : brown cabinet with tv sitting in it + +a brown cabinet with a television inside is located in the right corner of the room, near the curtains. + +# Step 2: View Matching + +![](images/aab68837f9cb8e95aa1c819aba8e746e949539ce99ad1c4077c92614ed0e51dc.jpg) + +: You are given an image and a caption describing the visual content. Determine if the image matches the caption, and respond with one of the following options: + +A. Yes, fully matches. B. No, does not match. C. Uncertain, insufficient or unclear information. + +![](images/74092bfcb8ef60072344ea81384a106ed1b10ddf3339a6305127d53fdd9e3f22.jpg) +Figure 5: Our view Annotator module operates in two steps: Caption Generation and View Matching (illustrated by light green boxes indicating outputs at each step). In Step 1, LVLMs processes question-answer pairs to produce detailed descriptive captions. In Step 2, these captions are compared against sampled views to assess their relevance in answering the corresponding questions. For clarity, the figure depicts only positive (A) and negative (B) view matches, excluding uncertain (C) ones. + +Positive| Negative + +![](images/34d05be4dcb280a48dc29fc0742674bcc271c83079a47b54ddbd61c2102e0636.jpg) + +![](images/aad8981d549994c66d9f3472e263a0e7bf078bdf594f80d6f12b0b0668ecbbe0.jpg) + +semantically aligned with the question. As shown in Figure 4, the best EM@1 score that this approach achieves is $29.1\%$ , slightly outperforming uniform sampling. + +Analysis. Overall, image retrieval shows modest improvements over uniform sampling. It relies on the semantic similarity between questions and views, which introduces two key limitations: 1) Missing Critical Views. While it effectively identifies views containing objects explicitly mentioned in the question, it frequently overlooks relational cues essential for answering the question. This limitation stems from the fundamental difference between object identification and relationship comprehension, and the latter requiring stronger understanding capabilities. 2) Redundancy. Our analysis shows that views from adjacent viewpoints typically receive similar semantic similarity scores, resulting in the selection of overlapping views. This redundancy limits the diversity of visual information captured across multiple views, reducing the overall effectiveness of the image retrieval approach. + +# 4. cdViews: Critical and Diverse Views + +Based on the above analysis, we argue that effective zero-shot 3D-QA requires identifying views that are both critical to represent the key information in the scene and sufficiently diverse to cover the scene. To this end, we introduce cdViews, i.e., the option ③ in Figure 3. In the inference stage of 3D-QA, cdViews loads two modules, viewSelector and viewNMS. The training of viewSelector contains two steps: data annotation and model training. First, we propose an auto + +viewAnnotator to label views as positive, negative, or uncertain based on their matching scores with the descriptive captions (generated from question-answer pairs). Then, we train viewSelector with these labels in a supervised manner. For the selected views, we introduce viewNMS to remove redundant ones and improve the view diversity. + +# 4.1.viewAnnotator + +The implementation of viewAnnotator has two steps: caption generation and view matching, as shown in Figure 5. Both steps use the same LVLM as in the zero-shot 3D-QA (i.e., the final inference model). This process aims to identify the critical views that match mostly the content of both input questions and the corresponding answers. Please note that these data are all from the training set where the answers are available for use. + +Caption Generation. It begins by feeding a question-answer pair $(Q, A)$ and a rephrasing prompt $(Prompt_{R})$ into the LVLM, as in Step 1 of Figure 5. This prompt is fixed for every question-answer pair and instructs the model to rephrase the pair into an image caption $C$ which abridges the reasoning between the question and answer: + +$$ +C = \operatorname {L V L M} (Q, A, \text {P r o m p t} _ {R}). \tag {5} +$$ + +Please note that caption generation is a crucial prior step of view matching. Directly using the $(Q, A)$ pair for matching causes the model to focus on answering the question rather than labeling the views. In other words, it encourages the model to take a shortcut by simply copying the answer $A$ . + +View Matching. For each view $V_{i}$ in a set of 2D views + +$\mathcal{M}$ , we evaluate its information relevance to the generated caption using LVLM. Specifically, we prompt the caption $C$ and a matching prompt Prompt $M$ , as in Step 2 of Figure 5, to LVLM. LVLM classifies $V_{i}$ into one of three categories, "positive", "negative", or "uncertain", respectively corresponding to the options A, B, and C in Prompt $M$ . + +$$ +S _ {i} = \operatorname {L V L M} \left(C, V _ {i}, \text {P r o m p t} _ {M}\right), \tag {6} +$$ + +where $S_{i} \in \{0,1\}$ is the classification label of the view $V_{i}$ . For example, in Figure 5, a view is classified as "positive" $(S_{i} = 1)$ because it contains the correct objects with specified attributes and spatial relationships, such as a "brown cabinet" with a "television" inside and "curtains" nearby. Otherwise, views are labeled as "negative" $(S_{i} = 0)$ . Views are classified as "uncertain" when the model chooses the option of "Uncertain, insufficient or unclear information" or outputs none of the given options, and these views are excluded from training. + +# 4.2.viewSelector + +As shown in Figure 3, viewSelector is plugged between the visual encoder and LVLM to select "views" in the feature space. It takes the question embedding $\mathbf{Q}$ and the visual embedding set $\{\mathbf{V_i}\}_{i = 1}^N$ as input and outputs a binary label $\hat{S}_i$ (0 or 1) for each visual embedding. Then, $\hat{S}_i$ is compared to the corresponding view label generated by the viewAnnotator. The mismatch loss is used to optimize the parameters of viewSelector. + +Specifically, the question embedding $\mathbf{Q}$ is first passed through a linear layer. followed by a two-layer Transformer block, and a pooling layer. The output can be regarded as a compact summary of the question, producing a question vector $\mathbf{q}$ . Similarly, for visual inputs, each visual embedding $\mathbf{V}_i$ is processed through the same modules. We apply cross-attention in each transformer layer between the question embedding $\mathbf{Q}$ and the visual embeddings $\{\mathbf{V}_i\}_{i=1}^N$ , in order to enhance the model's ability to identify views containing critical content for QA. After pooling, the resulting set of vectors $\{\mathbf{v}_i\}_{i=1}^N$ serve as compact summaries of question-aligned visual embeddings. + +Finally, the outputs $\mathbf{q}$ and $\{\mathbf{v}_i\}_{i=1}^N$ are used to measure the criticality between the question and each view by cosine similarity: + +$$ +\hat {S} _ {i} = \frac {\mathbf {q} \cdot \mathbf {v} _ {i}}{| | \mathbf {q} | | | | \mathbf {v} _ {i} | |}. \tag {7} +$$ + +The score $\hat{S}_i$ is supervised with the corresponding label $S_i$ by binary cross-entropy loss: + +$$ +\mathcal {L} _ {\mathrm {B C E}} = - \frac {1}{N ^ {\prime}} \sum_ {i = 1} ^ {N ^ {\prime}} \left(\hat {S} _ {i} \log \left(S _ {i}\right) + \left(1 - \hat {S} _ {i}\right) \log \left(1 - S _ {i}\right)\right) \tag {8} +$$ + +where $N^{\prime}\leq N$ is the number of views labeled as 1 ("positive") or 0 ("negative"). + +During inference, viewSelector acts as a scoring function to evaluate each input view: a higher score $\hat{S}_i$ indicates higher criticality of $V_i$ . + +# 4.3.viewNMS + +The views selected by viewSelector may introduce redundancy: overlapping views might all get high scores—similar to the problem of image-retrieval-based methods. We propose viewNMS to filter out redundant views. We leverage camera parameters, i.e., position and orientation, calculate distances between selected views, and discard views less distant than a predefined distance threshold. + +Specifically, viewNMS operates in three steps: 1) Ranking views sorts all views $\{V_{i}\}_{i = 1}^{N}$ by their scores $\{\hat{S}_i\}_{i = 1}^N$ in descending order, resulting in $\{V_{i_k}\}_{k = 1}^N$ , where $I_{i_1}$ is the highest-scoring view. 2) Initializing candidate views selects the highest-scoring view as the initial set $\mathcal{M}' = \{V_{i_1}\}$ . 3) Adding diverse views sequentially processes the remaining views in sorted order, adding a view $V_{i_k}$ to the set if its distance from previously selected views exceeds a threshold $T$ , formulated as: + +$$ +\mathcal {M} ^ {\prime} = V _ {i _ {k}} \cup \mathcal {M} ^ {\prime}, \text {i f} D \left(V _ {i _ {k}}, V _ {j}\right) > T, \forall V _ {j} \in \mathcal {M} ^ {\prime}. \tag {9} +$$ + +Finally, viewNMS outputs a new set of selected views $\mathcal{M}'$ , which are both critical and spatially diverse. After that, $\mathcal{M}'$ and $Q$ are fed into the 2D LVLM to generate an answer which is the final output of zero-shot 3D-QA. + +View Distance Calculation. The core of viewNMS lies in the calculation of the view distance, i.e., $D(V_{i},V_{j})$ measuring the cameras' position and orientation distance between $V_{i}$ and $V_{j}$ . For each view, the camera parameters $[\mathbf{R}|\mathbf{t}]$ (we omit the subscript for simplicity) consist of a camera orientation $\mathbf{R}\in \mathbb{R}^{3\times 3}$ and a camera position $\mathbf{t}\in \mathbb{R}^{3\times 1}$ . The distance is calculated by combining both the orientation distance and position distance. For the orientation $\mathbf{R}$ , we first convert it into a quaternion representation $\mathbf{p} = [p_x,p_y,p_z,p_w]$ for more efficient distance calculations. Then, the orientation distance $D_{ori}(V_i,V_j)$ is calculated by + +$$ +D _ {o r i} \left(V _ {i}, V _ {j}\right) = 2 \cdot \operatorname {a r c c o s} \left(\left| \mathbf {p} _ {i} \cdot \mathbf {p} _ {j} \right|\right), \tag {10} +$$ + +where $\arccos$ represents the inverse cosine function. This formula gives the angular distance in radians between the orientations of two views. Since $\arccos (|\mathbf{p}_i\cdot \mathbf{p}_j|)$ yields half the angle, the factor of 2 restores the full angle difference. + +The position distance $D_{pos}(V_i, V_j)$ between views $V_i$ and $V_j$ is calculated using the Euclidean distance between their camera positions $\mathbf{t}_i$ and $\mathbf{t}_j$ : + +$$ +D _ {p o s} \left(V _ {i}, V _ {j}\right) = \left\| \mathbf {t} _ {i} - \mathbf {t} _ {j} \right\|, \tag {11} +$$ + +3D Question Answering via only 2D Vision-Language Models + +
MethodTypeScanQASQA +EM@1
EM@1BLEU-1ROUGECIDEr
ScanQA (Azuma et al., 2022)3D23.5 / 20.931.6 / 30.734.3 / 31.167.3 / 60.245.3
SQA3D (Ma et al., 2022)3D----47.2
3D-LLM (Hong et al., 2023)3D19.1 / -38.3 / -35.3 / -69.6 / -48.1
3D-VLP (Jin et al., 2023a)3D24.6 / 21.633.2 / 31.536.0 / 31.870.2 / 63.4-
3D-VisTA (Zhu et al., 2023)3D27.0 / 23.0-38.6 / 32.876.6 / 62.648.5
SIG3D (Man et al., 2024a)3D----52.6
SynFormer3D (Yang et al., 2024)3D27.6 / 24.1-39.2 / 33.376.2 / 62.7-
LL3DA (Chen et al., 2024a)3D+2D--38.2 / 35.278.2 / 70.3-
PQ3D (Zhu et al., 2025)3D+2D26.1 / 20.043.0 / 36.1-87.8 / 65.247.1
BridgeQA (Mo & Liu, 2024)3D+2D31.3 / 30.834.5 / 34.443.3 / 41.283.8 / 79.352.9
LLAVA-OV + Funiform2D33.1 / 33.543.2 / 44.246.9 / 46.695.8 / 93.353.5
LLAVA-OV + Fretrieval2D33.9 / 34.644.8 / 46.148.3 / 48.798.8 / 97.755.0
LLAVA-OV + FcdViews2D35.0 / 35.646.1 / 47.249.7 / 49.5102.8 / 100.456.9
margin over the compared best-3.7 ↑ / 4.8 ↑3.1 ↑ / 9.1 ↑6.4 ↑ / 8.3 ↑15.0 ↑ / 21.1 ↑3.9 ↑
+ +Table 1: Performance comparisons with the state-of-the-art methods on the test set of ScanQA (Azuma et al., 2022) and SQA (Ma et al., 2022). For ScanQA, scores are presented in the format “with object test set” / “without object test set”. The best and second best results are in **bold** and **underlined**, and the last row shows the performance margins between LLAVA-OV + FcdViews and the top-performing related methods. + +where $||\cdot ||$ is the Euclidean norm. + +The final camera distance $D(V_{i},V_{j})$ is a sum of the position and orientation distances, + +$$ +D \left(V _ {i}, V _ {j}\right) = D _ {\text {p o s}} \left(V _ {i}, V _ {j}\right) + D _ {\text {o r i}} \left(V _ {i}, V _ {j}\right). \tag {12} +$$ + +Combining the camera's position and orientation, the distance estimates the spatial overlap between the regions captured by two views, with smaller values indicating greater overlap. An ablation study on threshold selection is provided in the experimental section. + +# 5. Experiments + +Datasets. We use ScanQA (Azuma et al., 2022) and SQA (Ma et al., 2022) in our experiments, both constructed from ScanNet dataset (Dai et al., 2017). ScanQA contains over 41K question-answer annotations across 800 indoor 3D scenes, which are divided into train, val, and test sets (with or without objects). SQA contains over 33K question-answer pairs derived from 650 indoor scenes. It encompasses a diverse range of question types, including object identification, spatial relationships, scene-level understanding, and general reasoning. + +Evaluation Metrics. We adopt Exact Match (EM@1) for both datasets. EM@1 measures the proportion of cases where the top-1 predicted answers match any of the ground-truth answers. Furthermore, since the answers in ScanQA are often free-form, we use standard text similarity metrics, including BLEU-1 (Papineni et al., 2002), ROUGE-L (Lin, 2004), and CIDEr (Vedantam et al., 2015) to assess the quality of generated answers. + +Implementation Details. We utilize a recent state-of-the-art LVLM, i.e., LLAVA-OV-7B (Li et al., 2024a), as the 2D LVLM for all experiments, including viewAnnotator and 3D-QA. The model remains frozen throughout all experiments. Analysis on more LVLM backbones is shown in Appendix C. The only trainable component is viewSelector, a lightweight module with a total of $5.9M$ parameters. Training of the viewSelector is conducted with a learning rate of $5 \times 10^{-5}$ and a batch size of 8. Each training iteration samples 5 positive and 5 negative views per instance generated by viewAnnotator. Here the number of views, e.g., $k = 9$ for cdViews, is selected on the validation set (Figure 4). + +# 5.1. Comparisons with the State-of-the-Arts + +Table 1 presents the quantitative results comparing 2D-only methods (uniform sampling, image retrieval, and cdViews) with other LLAVA-OV (Li et al., 2024a) with state-of-the-art 3D and hybrid methods. First, it is observed that 2D-only methods achieve superior performance, showing the advantage of applying 2D pre-trained models for 3D tasks. For example, compared to BridgeQA (Mo & Liu, 2024), our $\mathcal{F}_{\mathrm{cdViews}}$ achieves significant improvements of $15.0\%$ and $21.1\%$ CIDEr on the two test sets of ScanQA. Second, among the 2D-only methods, cdViews outperforms the others. For example, $\mathcal{F}_{\mathrm{cdViews}}$ outperforms $\mathcal{F}_{\mathrm{retrieval}}$ by $4.0\%$ and $2.7\%$ CIDEr on both test sets of ScanQA. The reason is that the uniform sampling method ignores the question and the image retrieval method often fails to capture critical views or introduces redundancy views. In contrast, cdViews effectively identifies critical and diverse views for efficient 3D-QA. The qualitative comparison of + +![](images/37554b139bb398d6600425c6c8d002ea883ff84a202d9db1cb31227fe6e1368f.jpg) +Figure 6: Qualitative results for BridgeQA (Mo & Liu, 2024), LLAVA-OV + $\mathcal{F}_{\mathrm{retrieval}}$ , and our final model LLAVA-OV + $\mathcal{F}_{\mathrm{cdViews}}$ . The marks $\triangle, \star$ , and $\bullet$ represents the selected views respectively by three methods. We can see that cdViews captures the most critical and diverse views to answer the questions. + +
LLAVA-OVview Selectorview NMSBest EM@1Optimal k
+Funiform--28.317
+Fretrieval--29.117
+Fretrieval-29.29
+FcdViews-29.717
+FcdViews30.19
+ +Table 2: An ablation study performed on ScanQA. We show the best EM@1 scores with the corresponding (optimal) $k$ . + +selected views is shown in Figure 2 and Figure 6. More comparisons are provided in the Appendix Section B. + +# 5.2. Ablation Study + +In this section, we conduct an ablation study on the validation set of ScanQA (Azuma et al., 2022), following (Mo & Liu, 2024). We study the impact of cdViews components and viewNMS thresholds. In addition, we particularly compare ours with the most related work: image-retrieval-based 3D-QA (Mo & Liu, 2024). More ablation studies are in Section C of the Appendix. + +cdViews Components. The experimental results are summarized in Table 2. The first row shows the baseline performance using randomly sampled 2D views as input, i.e. $\mathcal{F}_{\mathrm{uniform}}$ , achieving the best result of $28.3\%$ EM@1 with 17 views. The second and third rows present results using the image retrieval baseline. Compared to uniform sampling, retrieval provides better views and improves EM@1 to $29.1\%$ (with 17 views). When combined with viewNMS, the number of input views is reduced to 9, and performance slightly improves to $29.2\%$ . The fourth row presents the performance of $\mathcal{F}_{\mathrm{cdViews}}$ with the viewSelector alone, which achieves $29.7\%$ EM@1 with 17 views, improving by $1.4\%$ . This validates that the viewSelector effectively prioritizes critical views. The last row reports the full + +![](images/328928cbdcdb42561564a9ff90aa6f3b4c888d5f2d51380bbcaa681ed469223f.jpg) +Figure 7: The results of EM@1 using two configurations: optimal $k$ (blue) vs. fixed $k = 9$ (green). X-axis is the threshold $T$ of viewNMS. $T = 0$ means disabling viewNMS. + +implementation of $\mathcal{F}_{\mathrm{cdViews}}$ , where viewNMS reduces the input to just 9 views—almost half the visual token length—without reducing the performance, but further boosting EM@1 by $0.4\%$ . This is due to the reduced redundancy allowing the model to focus more on critical views. A comparison between the third and last rows shows that our full pipeline $\mathcal{F}_{\mathrm{cdViews}}$ outperforms the retrieval + viewNMS baseline by $0.9\%$ EM@1 (30.1% vs. $29.2\%$ ), using the same number of input views. Even after redundancy removal via viewNMS, the retrieval-based approach remains constrained by its initial candidate views, which are selected based on question-view semantic similarity rather than their criticality to question answering. This further highlights the strength of our learned viewSelector, which explicitly identifies views that are critical for question answering. + +viewNMS Thresholds. We evaluate the effect of different viewNMS thresholds (0, 0.25, 0.5, 0.75, and 1.0) in Figure 7. As the threshold increases, the optimal number of input views decreases from 17 to 9, demonstrating the effectiveness of viewNMS in reducing redundancy. The highest accuracy is achieved at a threshold of 0.5, with only 9 views input. When the number of views is fixed at 9, performance improves with increasing thresholds, peaking at 0.5 before declining. It indicates that excessively high thresholds may + +
MethodF_retrievalF_cdViews
ModelBLIPViT-L (retrieval)cdViews
Parameters644M5.9M (-99.1%)
FLOPs593.6T294.5T (-50.4%)
Inference Time2.8s1.2s (-57.1%)
+ +Table 3: Computational performance comparison between image retrieval and cdViews for zero-shot 3D-QA. + +loss spatially close views, and thus miss critical information. + +cdViews's Efficiency. We compare the efficiency of image retrieval and our proposed cdViews in Table 3. As a lightweight plug-in module to LVLMs, $\mathcal{F}_{\mathrm{cdViews}}$ only introduces $5.9M$ parameters, while the parameters of $\mathcal{F}_{\mathrm{retrieval}}$ is 100 times as $\mathcal{F}_{\mathrm{cdViews}}$ . Furthermore, $\mathcal{F}_{\mathrm{cdViews}}$ reduces FLOPs by half and cuts inference time by more than $50\%$ compared to $\mathcal{F}_{\mathrm{retrieval}}$ . These results demonstrate the effectiveness of cdViews in improving accuracy, streamlining inference, and reducing computation. + +# 6. Conclusions + +In this work, we leverage 2D LVLMs in a zero-shot manner (or plugging a lightweight module) to address 3D-QA and identify view selection as a critical factor affecting performance. Our preliminary study reveals that effective view selection must ensure both critical and diversity. To this end, we propose cdViews, a view selection framework comprising viewSelector, which prioritizes critical views, and viewNMS, which enhances spatial diversity by removing redundant views. Extensive experiments on the ScanQA and SQA datasets demonstrate that cdViews achieves state-of-the-art performance. + +# Acknowledgments + +This research is supported by the RIE2025 Industry Alignment Fund - Industry Collaboration Projects (IAF-ICP) (Award I2301E0026), administered by A*STAR, as well as supported by Alibaba Group and NTU Singapore, and the Major Research Program of Jiangsu Province (Grant BG2024042). + +# Impact Statement + +This paper presents work aiming to advance machine learning by introducing cdViews. It integrates a viewSelector and viewNMS to automatically select critical and diverse views for 3D question answering (3D-QA). By relying solely on 2D views and pre-trained LVLMs, this approach addresses the challenge of limited 3D training data and avoids the need for direct alignment between 3D and language representations. The proposed method demonstrates state-of-the-art performance on benchmarks such as ScanQA and SQA, + +showing the potential of 2D LVLMs as effective alternatives to resource-intensive 3D LVLMs. Potential societal consequences include improvements in autonomous systems, assistive technologies, and interactive environments, where efficient 3D scene understanding is critical. While no immediate risks or concerns are identified. + +# References + +Azuma, D., Miyanishi, T., Kurita, S., and Kawanabe, M. Scanqa: 3d question answering for spatial scene understanding. In proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 19129-19139, 2022. +Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. Language models are few-shot learners. Advances in neural information processing systems, 33: 1877-1901, 2020. +Chen, S., Chen, X., Zhang, C., Li, M., Yu, G., Fei, H., Zhu, H., Fan, J., and Chen, T. L13da: Visual interactive instruction tuning for omni-3d understanding reasoning and planning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 26428-26438, 2024a. +Chen, Y., Yang, S., Huang, H., Wang, T., Lyu, R., Xu, R., Lin, D., and Pang, J. Grounded 3d-llm with referent tokens. arXiv preprint arXiv:2405.10370, 2024b. +Dai, A., Chang, A. X., Savva, M., Halber, M., Funkhouser, T., and Nießner, M. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5828-5839, 2017. +Dubey, A., Jauhri, A., Pandey, A., Kadian, A., Al-Dahle, A., Letman, A., Mathur, A., Schelten, A., Yang, A., Fan, A., et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024. +Fu, R., Liu, J., Chen, X., Nie, Y., and Xiong, W. Scene-llm: Extending language model for 3d visual understanding and reasoning. arXiv preprint arXiv:2403.11401, 2024. +Guo, J., Li, J., Li, D., Tiong, A. M. H., Li, B., Tao, D., and Hoi, S. From images to textual prompts: Zero-shot visual question answering with frozen large language models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10867-10877, 2023. +Hong, Y., Zhen, H., Chen, P., Zheng, S., Du, Y., Chen, Z., and Gan, C. 3d-llm: Injecting the 3d world into large language models. Advances in Neural Information Processing Systems, 36:20482-20494, 2023. + +Hu, E. J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., Chen, W., et al. Lora: Low-rank adaptation of large language models. *ICLR*, 1(2):3, 2022. +Huang, H., Chen, Y., Wang, Z., Huang, R., Xu, R., Wang, T., Liu, L., Cheng, X., Zhao, Y., Pang, J., et al. Chat-scene: Bridging 3d scene and large language models with object identifiers. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. +Huang, J., Yong, S., Ma, X., Linghu, X., Li, P., Wang, Y., Li, Q., Zhu, S.-C., Jia, B., and Huang, S. An embodied generalist agent in 3d world. arXiv preprint arXiv:2311.12871, 2023. +Jin, Z., Hayat, M., Yang, Y., Guo, Y., and Lei, Y. Context-aware alignment and mutual masking for 3d-language pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 10984-10994, June 2023a. +Jin, Z., Hayat, M., Yang, Y., Guo, Y., and Lei, Y. Context-aware alignment and mutual masking for 3d-language pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10984-10994, 2023b. +Li, B., Zhang, Y., Guo, D., Zhang, R., Li, F., Zhang, H., Zhang, K., Li, Y., Liu, Z., and Li, C. Llavaonevision: Easy visual task transfer. arXiv preprint arXiv:2408.03326, 2024a. +Li, F., Zhang, R., Zhang, H., Zhang, Y., Li, B., Li, W., Ma, Z., and Li, C. Llava next-Interleave: Tackling multi-image, video, and 3d in large multimodal models. arXiv preprint arXiv:2407.07895, 2024b. +Li, J., Li, D., Xiong, C., and Hoi, S. Blip: Bootstrapping language-image pre-training for unified vision-language understanding and generation. In International conference on machine learning, pp. 12888-12900. PMLR, 2022. +Lin, C.-Y. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pp. 74-81, 2004. +Liu, B., Dong, Y., Wang, Y., Rao, Y., Tang, Y., Ma, W.-C., and Krishna, R. Coarse correspondence elicit 3d spacetime understanding in multimodal language model. arXiv preprint arXiv:2408.00754, 2024a. +Liu, H., Li, C., Li, Y., Li, B., Zhang, Y., Shen, S., and Lee, Y. J. Llava-last: Improved reasoning,OCR, and world knowledge, January 2024b. URL https://llava-v1.github.io/blog/2024-01-30-llava-last/. + +Lu, S., Liu, M., Yin, L., Yin, Z., Liu, X., and Zheng, W. The multi-modal fusion in visual question answering: a review of attention mechanisms. PeerJ Computer Science, 9:e1400, 2023. +Ma, X., Yong, S., Zheng, Z., Li, Q., Liang, Y., Zhu, S.-C., and Huang, S. Sqa3d: Situated question answering in 3d scenes. arXiv preprint arXiv:2210.07474, 2022. +Majumdar, A., Ajay, A., Zhang, X., Putta, P., Yenamandra, S., Henaff, M., Silwal, S., Mcvay, P., Maksymets, O., Arnaud, S., et al. Openeqa: Embodied question answering in the era of foundation models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16488-16498, 2024. +Man, Y., Gui, L.-Y., and Wang, Y.-X. Situational awareness matters in 3d vision language reasoning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13678-13688, 2024a. +Man, Y., Zheng, S., Bao, Z., Hebert, M., Gui, L.-Y., and Wang, Y.-X. Lexicon3d: Probing visual foundation models for complex 3d scene understanding. arXiv preprint arXiv:2409.03757, 2024b. +Mo, W. and Liu, Y. Bridging the gap between 2d and 3d visual question answering: A fusion approach for 3d vqa. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 4261-4268, 2024. +OpenAI. Gpt-4o: Openai's optimized gpt-4 model. https://openai.com/gpt-4o, 2024. Accessed: 2024-05-22. +Papineni, K., Roukos, S., Ward, T., and Zhu, W.-J. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pp. 311-318, 2002. +Qi, C. R., Litany, O., He, K., and Guibas, L. J. Deep hough voting for 3d object detection in point clouds. In proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9277-9286, 2019. +Shao, Z., Yu, Z., Wang, M., and Yu, J. Prompting large language models with answer heuristics for knowledge-based visual question answering. In Proceedings of the IEEE/CVF Conference on computer vision and pattern recognition, pp. 14974-14983, 2023. +Singh, S., Pavlakos, G., and Stamoulis, D. Evaluating zero-shot gpt-4v performance on 3d visual question answering benchmarks. arXiv preprint arXiv:2405.18831, 2024. + +Vedantam, R., Lawrence Zitnick, C., and Parikh, D. Cider: Consensus-based image description evaluation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4566-4575, 2015. +Yang, D., Xu, Z., Mo, W., Chen, Q., Huang, S., and Liu, Y. 3d vision and language pretraining with large-scale synthetic data. arXiv preprint arXiv:2407.06084, 2024. +Zhang, T., He, S., Dai, T., Wang, Z., Chen, B., and Xia, S.-T. Vision-language pre-training with object contrastive learning for 3d scene understanding. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 7296-7304, 2024. +Zheng, D., Huang, S., Zhao, L., Zhong, Y., and Wang, L. Towards learning a generalist model for embodied navigation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13624-13634, 2024. +Zhou, Y., Li, X., Wang, Q., and Shen, J. Visual in-context learning for large vision-language models. arXiv preprint arXiv:2402.11574, 2024. +Zhu, Z., Ma, X., Chen, Y., Deng, Z., Huang, S., and Li, Q. 3d-vista: Pre-trained transformer for 3d vision and text alignment, 2023. +Zhu, Z., Zhang, Z., Ma, X., Niu, X., Chen, Y., Jia, B., Deng, Z., Huang, S., and Li, Q. Unifying 3d vision-language understanding via promptable queries. In European Conference on Computer Vision, pp. 188-206. Springer, 2025. + +This supplementary includes the details of view matching in viewAnnotation (Sec. A), more comparisons with the State-of-the-Arts (Section B), more ablation studies (Section C), including ablation of view selection methods with different 2D LVLM, effectiveness of caption generation in viewAnnotator, and more case studies (Section D). + +# A. More Details in View Matching + +This supplementary is for Sec. 4.1 of the main paper. In our view Annotator, view matching classifies views as positive, negative, or uncertain. However, directly using a 2D LVLM with the prompt PromptM as an instruction is unreliable, as the model lacks an explicit judgment criterion. To address this, we leverage its strong in-context learning ability (Zhou et al., 2024) by providing a textual context example that guides the model through a structured reasoning process. Specifically, we incorporate a step-by-step system prompt in the View Matching process. As shown in Figure S1, the system prompt ensures that all key objects, attributes, and spatial relationships in the caption align with the image, reducing ambiguity and improving consistency. Uncertain views are explicitly excluded, enhancing the robustness of the annotation process. Additional examples of positive and negative views are shown in Figure S2. + +![](images/3127011588cffc79fa112e7edbbbc850da7de1047fb60f036d03f12bbb06809c.jpg) + +: Consider the following example to guide your responses: + +Caption: "A brown cabinet with a television inside is located in the right corner of the room, near the curtains." + +In this example, following the steps: + +1. List all objects or elements mentioned in the caption: +- Brown cabinet +- Television inside the cabinet +- Curtains nearby +2. Check if all objects from the caption are present in the image: +- Yes, if all objects from the caption (brown cabinet, television, and curtains) are present in the image, proceed to step 3. +- No, answer with option B. + +3. Verify if the objects' attributes and relative positions match the caption: + +- Yes, the cabinet is brown, the television is inside the cabinet, it is positioned in the right corner, and it is near the curtains. + +- If any attributes or positions do not match the caption, answer with option B. +- If the image contains partial but unclear information, answer with option C. + +![](images/18c061c9d0646698db34d71b222525f8fff84c175517634580473b9d59ce5bc9.jpg) + +: You are given an image and a caption describing the visual content. Determine if the image matches the caption, and respond with one of the following options: + +A. Yes, fully matches. B. No, does not match. C. Uncertain, insufficient or unclear information. + +an orange storage bin is placed on top of a white cabinet. + +![](images/77504e8abfa771998cc41c78c74a1a5e2d5077432701bdb31da7fa088a2f4be9.jpg) + +Positive views + +Negative views + +![](images/f556f3202a56dcb3d0079d34445038e68dedc06f4ced9525bffd5fd4e9855673.jpg) +Figure S1: Illustration of how context guides the view matching process. In the view matching process of viewAnnotator, the model follows a structured reasoning approach, using a textual example to classify views as positive, negative, or uncertain. + +To further validate the reliability of the positive views, we conducted a human evaluation: We randomly selected 50 QA pairs with their associated positive views. Three human evaluators assessed whether each view could answer the question. Their accuracy rates were $96.72\%$ , $94.28\%$ , and $97.56\%$ , confirming that the quality of positive views is sufficient for training. + +# B. More Comparisons with the State-of-the-Art Methods + +This supplementary is for Section 5.1 of the main paper. Table S1 presents the quantitative results comparing LAVA-OV (Li et al., 2024a) with different view selection methods, including uniform sampling, image retrieval, and our cdViews, against state-of-the-art methods on the validation set of ScanQA. As shown, LAVA-OV + $\mathcal{F}_{\mathrm{cdViews}}$ outperforms these + +:the wall with pictures is on the right side of the door. + +![](images/48c319d5d62f6fce3636133a2667b0734e943628a4bcf8106a70c24de29c2982.jpg) + +Positive views + +Negative views + +![](images/6b84443a0db6f4b6b23350c5cef91cfc0c50c72d3f6392612a5b7eac27a8016f.jpg) + +![](images/4b5be5f17ed6226d9845d06a4879543effd1b35f416196e3efe24c8e7a62a133.jpg) + +![](images/386765a512eb686585cb34634fbd0915ce25e630ff0b272d6eb3b921649d5ec2.jpg) + +![](images/54ae0fa15038f7af137e7f3a1395dc57978d11c2c471bca64fb8c1a94f4c9fba.jpg) + +![](images/bc0ea789061d1603b3bad5f3a98d70eafe001b2c45c5f254545e912fe8fd1779.jpg) + +![](images/ac665c99916adc3d15e6824852f93438c4818fb7a44a35cf9d468f7c758f1809.jpg) + +![](images/bd452c9d336aeb5b742f100d0b91ea7a7f1b40d0e183607f6ad4bcb9b9779d24.jpg) + +![](images/81a69d2ceec081c9eb47ef78bb61d75e427f5ca2067e36494725e9cc659a84a4.jpg) + +![](images/cd977010ad3197cdd09b90798114c28a286c08a19a21124305e3ef1bb928b645.jpg) + +![](images/d3fd279cb964ff4274107db32e517464e964933c229c3b4e591b89d33557ee60.jpg) + +![](images/da3c0f1d853a3452934b6731035b1ce914e1bfa8b6368741a215550f6b9e431a.jpg) + +![](images/8c1d5b27ff836b8b2abbc6adbe75c0a3c2f6bb5472db2831add44d3619f88a88.jpg) + +![](images/be95912d7e73561e480f7a6f3b0b9dec447a3aab8728e986e5b9f60805f55c97.jpg) + +![](images/8b4fee5cfc580506248dacd8a26aa63f4dfa90f1d9f55c74fe146d80867a693b.jpg) + +![](images/8c579bba2a2bb2425dafe80994f6bdb46730d8a2df8aceb7af4023cba5486322.jpg) + +:the microwave is placed on top of a storage box. + +![](images/3250daa9a9c873a897ec0788cca71b3950e64085490fea5bef76f08506ed1cee.jpg) + +Positive views + +Negative views + +![](images/6db1c9ffde0dbc25913b7d378ca08857ca5c9867ffb8ba53a04c7ecabf397625.jpg) + +![](images/fe665415418246601ddf540dd4cf099c1340ac445316fff037c613c6d8c6d814.jpg) + +![](images/fa33d2f7827ce5e8cb988be5c5f5f6860d9cdcbc332a1563c71e14c26408690e.jpg) + +![](images/14a1899433d833e6f736cab98f6c9f7feef7e7ee53cafa8c8edffd18d634831b.jpg) + +![](images/872096ed43d89f97f985f5ada82adc74d10c33bc0c8ab70085b0c5ed06196861.jpg) + +![](images/95cf6d1446abcf12a3f5bf7a7afa11cde3494998be726cf69ad0f65599c99817.jpg) + +![](images/d9f677b54f8520c782735f1fe4ad116cc0732f35a5a0d550b6777ce95433e45b.jpg) + +![](images/87b8f53791965d7606d5ebe2b3247c6bc27537378c7be90f3e711704ea24bdc3.jpg) + +: a cabinet is located in the room to the left of a table. + +![](images/2e63a77e92b96b82ebb2da59cfc231550959ea883a82aea18aa2ea4496f4f59b.jpg) + +Positive views + +![](images/de88dae3e61289f99e8623680d884444da8dee711eb8b3f03fb56fbcff17a5b0.jpg) + +![](images/c980698f3f3ab1c9242fe89b6d5bc2e68c65f57bb87b77484a507cc98e03e9e3.jpg) + +![](images/ecb7569421d10c110665b8b407f14680f952c4d310cc720521a48f280a139fe9.jpg) + +![](images/2f48c4ab73731d7eba435890cfee68b9f498165c5c288f917e81c91dbc648417.jpg) + +![](images/e278598dca372a9a71bb294813502b46dad969e69840ed1f8e829379f41bab93.jpg) + +![](images/f6377f3a59ffac8b99ef53f7ebadd36865cf77fab552bb4287ac28899141683d.jpg) + +![](images/6022ded850c4742b88c25e6bc2bc4086ed31532238605a8cca542402afa18140.jpg) + +Negative views + +![](images/8034087444d780265b9acfd3e38c0c6c8be8f722dac4af3832df3682b5fe4a11.jpg) +Figure S2: Examples of automatically annotated positive and negative views. Each case shows a caption along with its corresponding positive and negative views. Positive views closely match the caption in terms of key objects, attributes, and spatial relations, while negative views lack full correspondence. + +![](images/e75d9c3750eafe5dff8e78d3e302e6f1bae4735ef5c02369ff04936dbc515751.jpg) + +![](images/1fc521bb73f68e530e137ab2382dc95b5ad4e6d9b393df4691637144eeb5f0c7.jpg) + +![](images/1357e3786d9c711a40482b1904cd38bd4986ac31df26ae05c423b5609eb50b28.jpg) + +![](images/ed9c863a42fcf122f977660d76bb06cdbb4c8b3cee1c970b0a33d632265bcad8.jpg) + +![](images/5ed011b2b1d433c912555a4ddf27ccd77411a1d6fe0c953f04a09d355ae15788.jpg) + +![](images/a675d0f85d11a02c2c2fa89eb1437377fcc0cd2e42fe4182f2eff9507ab64fec.jpg) + +
MethodTypeEM@1BLEU-1ROUGECIDEr
ScanQA (Azuma et al., 2022)3D20.329.532.461.7
3D-LLM (Hong et al., 2023)3D20.539.335.769.4
3D-VLP (Jin et al., 2023a)3D21.730.534.567.0
LL3DA (Chen et al., 2024a)3D+2D--37.376.8
BridgeQA (Mo & Liu, 2024)3D+2D27.0---
GPT-4O+CC (Liu et al., 2024a)2D-35.442.687.0
LLAVA-OV + Funiform2D28.340.244.588.0
LLAVA-OV + Fretrieval2D29.141.545.891.6
LLAVA-OV + FcdViews2D30.142.646.894.0
margin over the compared best3.1 ↑3.3 ↑4.2 ↑7.0 ↑
+ +Table S1: Result comparisons with the state-of-the-art methods on the validation set of ScanQA (Azuma et al., 2022). The best and second best results are in bold and underlined. + +methods by clear margins. The last row of Table 1 highlights the performance gap between LLAVA-OV + $\mathcal{F}_{\mathrm{cdViews}}$ and the best-performing baselines. Even compared to GPT-4O+CC (Liu et al., 2024a), which leverages the powerful capabilities of GPT-4O (OpenAI, 2024), LLAVA-OV + $\mathcal{F}_{\mathrm{cdViews}}$ surpasses it by $7.0\%$ CIDEr. GPT-4O+CC improves spatial understanding by adding object markers to track correspondences across uniformly sampled views. However, it overlooks the relevance between the selected views and the input question, limiting its effectiveness in 3D-QA. + +Table S2 presents the quantitative results on SQA (Ma et al., 2022), detailing performance across different question types: "What", "Is", "How", "Can", "Which", and "Other". Compared to state-of-the-art methods, LLAVA-OV + $\mathcal{F}_{\text{cdViews}}$ achieves + +the best performance on "What", "How", "Which", and "Other" questions but shows a decline of $2.8\%$ and $10.2\%$ on "Is" and "Can" questions, respectively. This decline may be attributed to the zero-shot nature of LLAVA-OV (Li et al., 2024a), which maintains balanced performance across all question types. In contrast, other methods exhibit uneven performance, excelling in Is" and Can" questions due to dataset-specific adaptation while potentially underperforming in other categories. Furthermore, based on the same 2D LVLM, LLAVA-OV, cdViews consistently outperforms uniform sampling and image retrieval across all question types, demonstrating its effectiveness in selecting critical views for 3D-QA. + +
MethodInputQuestion BreakdownOverall
WhatIsHowCanWhichOther
GPT-3 (Brown et al., 2020)3D39.746.040.545.636.138.441.0
ScanQA (Azuma et al., 2022)3D28.665.047.366.343.942.945.3
SQA3D (Ma et al., 2022)3D33.566.142.469.543.046.447.2
3D-LLM (Hong et al., 2023)3D36.565.647.268.848.046.348.1
3D-VisTA (Zhu et al., 2023)3D34.863.345.469.847.248.148.5
SIG3D (Man et al., 2024a)3D35.667.248.571.449.145.852.6
PQ3D (Zhu et al., 2025)3D+2D37.161.344.560.947.045.147.1
BridgeQA (Mo & Liu, 2024)3D+2D------52.9
LLAVA-OV + Funiform2D51.460.749.656.251.651.953.5
LLAVA-OV + Fretrieval2D54.862.450.356.549.353.255.0
LLAVA-OV + FcdViews2D55.064.454.061.251.654.456.8
margin over the compared best15.3 ↑-2.8 ↓5.5 ↑-10.2 ↓2.5 ↑6.3 ↑3.9 ↑
+ +Table S2: Result comparisons with the state-of-the-art methods on the test set of the SQA (Ma et al., 2022). The best and second-best results are in **bold** and **underlined**. The decline in the "Is" and "Can" problems for LLAVA-OV with different view selections is attributed to the zero-shot nature of LLAVA-OV, which ensures balanced performance across all question types. In contrast, the compared methods exhibit uneven performance, excelling in "Is" and "Can" questions due to dataset-specific adaptation while potentially underperforming in other categories. + +# C. More Ablation Studies + +This supplementary is for Section 5.2 of the main paper. The ablation studies are conducted on the validation set of ScanQA (Azuma et al., 2022), we evaluate the impact of different backbones, the effect of caption generation in viewAnnotator, and visualize the views within different distance thresholds, and visually compare the results of BridgeQA, LLAVA-OV + $\mathcal{F}_{\mathrm{retrieval}}$ , and LLAVA-OV + $\mathcal{F}_{\mathrm{cdViews}}$ . + +Ablation with Different Backbones. We evaluate the impact of different backbones by comparing LLAVA-NEXT (Li et al., 2024b) and LLAVA-OV (Li et al., 2024a), with results presented in Table S3. The results reveal two key insights: 1) View selection plays a crucial role in enhancing performance across models. Replacing uniform sampling with image retrieval improves performance by $1.1\%$ on LLAVA-NEXT and $0.8\%$ on LLAVA-OV, underscoring the importance of selecting informative views for 3D-QA. Our cdViews further amplifies these gains, achieving improvements of $3.6\%$ and $1.8\%$ , respectively, by effectively identifying more critical views. 2) cdViews demonstrates robustness and adaptability, consistently outperforming both baselines and delivering the highest performance gains across all evaluation metrics. + +Effectiveness of Caption Generation in viewAnnotator. To assess the necessity of caption generation for view matching, we conduct an ablation study by removing the caption generation step in viewAnnotator. Instead of using the generated caption $C$ , the question-answer pair $(Q, A)$ is directly used as input for view matching. To better isolate the impact of caption generation, this ablation study is conducted without applying viewNMS. Specifically, Eq. 6 is modified as: + +$$ +\bar {S} _ {i} = \operatorname {L V L M} (Q, A, V _ {i}, \text {P r o m p t} _ {M} ^ {\prime}), \tag {13} +$$ + +where $Prompt_{M}^{\prime}$ is an adapted version of $Prompt_{M}$ , with the term "caption" replaced by "question-answer pair." The textual context example is preserved to guide the view labeling step-by-step. The results, presented in Table S4, show that removing the caption generation step leads to a $1.8\%$ drop in CIDEr for LLAVA-OV + $\mathcal{F}_{\mathrm{cdViews}}$ . This highlights the + +3D Question Answering via only 2D Vision-Language Models + +
BackboneView SelectionEM@1BLEU-1ROUGECIDEr
LLAVA-Next+Funiform21.030.042.185.3
+Fretrieval22.1 1.1↑35.2 5.2↑42.3 0.2↑87.0 1.7↑
+FcDViews24.6 3.6↑39.6 9.6↑44.9 2.8↑93.7 8.4↑
LLAVA-OV+Funiform28.340.244.588.0
+Ffretrieval29.1 0.8↑41.5 1.3↑45.8 1.3↑91.6 3.6↑
+FcDViews30.1 1.8↑42.6 2.4↑46.8 2.3↑94.0 6.0↑
+ +Table S3: Ablation study results with different backbone models, LLAVA-Next (Li et al., 2024b) and LLAVA-OV (Li et al., 2024a). The best results are in bold. Subscripts indicate the relative improvement over the corresponding baseline, i.e., the 2D LVLM with uniform sampling. + +
MethodView Matching with Input TupleEM@1BLEU-1ROUGECIDEr
LLAVA-OV + FcdViews(Q,A,Vi, Prompt'M)29.541.445.991.4
(C,Vi, PromptM)29.742.246.493.2
+ +importance of generating a reformulated caption, which helps the model more effectively identify critical views compared to directly using the $(Q,A)$ pair. + +Effect of Finetuning LLaVA-0V in a Hybrid Method. To assess the feasibility and effectiveness of incorporating LLAVA-OV into a hybrid method, we implement a variant of BridgeQA—the strongest hybrid baseline in our main comparisons. Specifically, we retain the original BridgeQA architecture but replace its 2D vision-language module (BLIP (Li et al., 2022)) with LLAVA-OV. For a fair comparison, we also replace its top-1 image input with 9 views selected by our cdViews strategy, while keeping the full-scene point cloud features extracted by VoteNet (Qi et al., 2019). + +During training, we adopt parameter-efficient tuning by updating only the last 2 of the 28 transformer layers in LLAVA-OV using LoRA (Hu et al., 2022). As shown in Table S5, the finetuned variant (BridgeQALLAVA-OV) achieves a +1.4% EM@1 improvement over the original BridgeQA baseline (28.4% vs. 27.0%), confirming the benefit of using a stronger 2D LVLM. Nonetheless, it still underperforms our cdViews, which achieves 30.1% EM@1. This experiment demonstrates that while hybrid pipelines can benefit from stronger LVLMs, they rely on complex architectures, 3D-specific modules, and computationally expensive fine-tuning. In contrast, our framework achieves superior performance by using a 2D-only LVLM in a zero-shot inference manner. + +Table S4: Ablation study on the necessity of caption generation for view matching. The key difference lies in whether the viewSelector is trained with view labels generated using the caption $C$ or the $(Q, A)$ pair as input. + +
MethodInput2D LVLMEM@1BLEU-1ROUGECIDEr
BridgeQA3D+2DBLIP27.0---
BridgeQALLAVA-OV3D+2DLLAVA-OV28.437.342.784.0
cdViews2DLLAVA-OV30.142.646.894.0
+ +Table S5: Comparison between zero-shot cdViews and fine-tuned hybrid BridgeQA using LLaVA-OV. We compare the performance of the original BridgeQA, its fine-tuned variant with LLaVA-OV, and our zero-shot cdViews. While the hybrid variant benefits from a stronger LVLM, our approach outperforms it with a 2D-only LVLM in a zero-shot inference manner. + +# D. More Case Studies + +Visualize Comparison of Different Methods and Their Visual Inputs. Figure S3 presents a visual comparison of the predicted answers and visual inputs of BridgeQA (Mo & Liu, 2024), LLAVA-OV + $\mathcal{F}_{\mathrm{retrieval}}$ , and LLAVA-OV + $\mathcal{F}_{\mathrm{cdViews}}$ . BridgeQA relies on the top-1 image retrieval view combined with point clouds as input. However, relying on point clouds to + +provide the whole scene often results in answers that miss critical details. For instance, in the $4_{th}$ row, while the model correctly mentions the trash can on the floor, it overlooks surrounding objects like the toilet, which is crucial for providing a more informative answer. For LLAVA-OV + $\mathcal{F}_{\mathrm{retrieval}}$ , image retrieval-based view selection may miss the critical views required for accurate answers. As shown in the $3_{rd}$ rows, the retrieved views tend to be redundant or incomplete. In the $3_{rd}$ row, the selected views focus on the cabinet beneath the window but omit the view displaying books on top, which is essential for correctly answering the question. In contrast, LLAVA-OV + $\mathcal{F}_{\mathrm{cdViews}}$ selects critical and diverse views, capturing essential context and delivering accurate, informative answers. + +: What is the object that has a lamp resting on it? + +BridgeQA:bed + +$\star$ LLAVA-OV + $\mathcal{F}_{\text{retrieval}}$ : desk + +: nightstand + +$\bullet$ LLAVA-OV + $\mathcal{F}_{cdView}$ : nightstand + +![](images/3aa51258c90be653f1e0e59a00814cb32b0a35986e6aed6cee87b41bc17b3988.jpg) + +![](images/88c8c67a90e3416f6298a81c07fff19747cd33a94765162e10aa76f9a373de07.jpg) + +![](images/c7d1133baeb1bc862d42917251f2318c0301fe62f3f6ce55fc629c2c118c711c.jpg) + +![](images/828796fdbec54d8adb2fcb0048ad12776cae55e205f6b1abd7dafd6d2239159c.jpg) + +![](images/7f3063be52e61090b94c99da5f8904d01f227882d233a2327fe6938ec5c79339.jpg) + +![](images/e50734eb9e66a1261fed716d6dadb2908efc34b75418c84ea48b329ea4801c10.jpg) + +: What is next to the brown rectangular shelf? + +BridgeQA: desk + +$\star$ LLAVA-OV + $\mathcal{F}_{\text{retrieval}}$ : door + +: black filing cabinet +LLAVA-OV + $\mathcal{F}_{cdView}$ : black file cabinet + +![](images/f5ff78727e3585e878a0c751ab47433d2d6524465c211e134bcd2a24790af093.jpg) + +![](images/3a33fc3b9973b0fc759a67ddd62bae88a765f28c607d433c1771fca5a934e853.jpg) + +![](images/7d6e4c4c8556abf1a6b23c87ded820fbae4e19c428d62788979a203ceb0668ac.jpg) + +![](images/a753666fc571843684c6637b41292732b87a0f6c70eed6e7ccc5935f35df5d43.jpg) + +![](images/a77cd67384875e3b6ec091ba63907ec180de3ddd21fad9acf11318d8e050c59c.jpg) + +![](images/2f75d40ce652300cac2c8b59e33d09d712c99959633817219f56737c7729dcf3.jpg) + +: The small cabinet sits underneath the window with what on top of it? + +$\triangle$ BridgeQA: yes + +$\star$ LLAVA-OV $^+$ $\mathcal{F}_{\text{retrieval}}$ : box + +LLAVA-OV + $\mathcal{F}_{cdView}$ : books + +![](images/93c995e221e0516936db831c7176cbbe162aee5fe6b8c4b8a6e6072b56484589.jpg) + +![](images/4c82a1e630ef301f1ea062abbf3ea630fff9f2159021e21659ed70488b660aca.jpg) + +![](images/fcd5b13aff1d5ab546d81dc5ae4ba15ae24db7cda4100a800e0563086bc504aa.jpg) + +![](images/a03267fc6be7f8088ef9bfc75881850fc125304bf61d90dce8d4b90059d7c99e.jpg) + +![](images/996c1a7a887acfdbe272007f0c4444af9fe2876f2b40b37f487b37622c7323a8.jpg) + +![](images/a288693a286128910e9f1ff4b1a8a25835bd1b504e97ca044f352373f9589d41.jpg) + +: What does the trash can set? + +$\triangle$ BridgeQA: on floor + +$\star$ LLAVA-OV $^+$ $\mathcal{F}_{\text{retrieval}}$ : under counter + +$\bigcirc$ LLAVA-OV $^+$ $\mathcal{F}_{cdView}$ :next to toilet + +![](images/dc631ebc2e1e351966322aaf9be6c9eb33d8e8a7b7189d78b2e8344bbc9bbc05.jpg) +Figure S3: More Qualitative results for BridgeQA (Mo & Liu, 2024), LLAVA-OV + $\mathcal{F}_{\mathrm{retrieval}}$ , and our final model LLAVA-OV + $\mathcal{F}_{\mathrm{cdViews}}$ . Small marks $\triangle, \star$ , and $\bullet$ represents the selected views by each method. We can see that cdViews can capture critical and diverse views to answer the questions. + +![](images/e8a3b3b2955ecaa745003724ab7757719cf78c577ac30ad1413053d480f02338.jpg) + +![](images/30b02c421eb00e6a292b2b49ce59cb0877c2e43400b34aaa3f6b60521de2ab0a.jpg) + +![](images/9213dbf6ba09681ac63e26ae8ff5c03b2eb4f2773c71c06375a683bab75cb1c0.jpg) + +![](images/a1f703d5ba2cfa97b5143dbba3ebec1dcc26d9e8089bed44076ab7c416fb5aa5.jpg) + +![](images/6436447982948308af8efcf1db8b4fa236b637c6998c7341130e79624c193ce9.jpg) \ No newline at end of file diff --git a/3dquestionansweringviaonly2dvisionlanguagemodels/images.zip b/3dquestionansweringviaonly2dvisionlanguagemodels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..11cdad1e694e605c1ed0ceb9eda4edd5e10752f9 --- /dev/null +++ b/3dquestionansweringviaonly2dvisionlanguagemodels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ba174b712941cd63c8dd6d9e014dc1aeeb4831a0c2d3380cb7f5ac2428c26b7 +size 1207065 diff --git a/3dquestionansweringviaonly2dvisionlanguagemodels/layout.json b/3dquestionansweringviaonly2dvisionlanguagemodels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0d78b113982b0e5928fd883c7a7b667803c54349 --- /dev/null +++ b/3dquestionansweringviaonly2dvisionlanguagemodels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b1466b53501ea93616b2864403a902ae4864e9bd5f5744d84feba5f02a3b7e5 +size 715200 diff --git a/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/d764eba9-b19e-4dc8-899d-9ddfff6c33dd_content_list.json b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/d764eba9-b19e-4dc8-899d-9ddfff6c33dd_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..532893fbcbddb28419074cb04164f319e142158a --- /dev/null +++ b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/d764eba9-b19e-4dc8-899d-9ddfff6c33dd_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:165c75fe3c32a2152681ce791f393cff77dfd37186755f80f515b9fc5d63834b +size 131467 diff --git a/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/d764eba9-b19e-4dc8-899d-9ddfff6c33dd_model.json b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/d764eba9-b19e-4dc8-899d-9ddfff6c33dd_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5bf6cdb3e785596c8e0b881ff4c2f5efaa26b769 --- /dev/null +++ b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/d764eba9-b19e-4dc8-899d-9ddfff6c33dd_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72e1d2ff0cd2b06502d2059422499c8403bd21b8bad6db6271d84913b97285aa +size 151891 diff --git a/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/d764eba9-b19e-4dc8-899d-9ddfff6c33dd_origin.pdf b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/d764eba9-b19e-4dc8-899d-9ddfff6c33dd_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..08c98b6bf6ccc726218d80bcf78895399da43bf4 --- /dev/null +++ b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/d764eba9-b19e-4dc8-899d-9ddfff6c33dd_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdcf597f1a3fa4fb8c7dfcff4400214175905e616786d996cfa081190a91be52 +size 7608838 diff --git a/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/full.md b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b6ed2a8652ade484e5c17af0b63f2de41c19036b --- /dev/null +++ b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/full.md @@ -0,0 +1,622 @@ +# A Bayesian Model Selection Criterion for Selecting Pretraining Checkpoints + +Michael Munn\*1 Susan Wei\*2 + +# Abstract + +Recent advances in artificial intelligence have been fueled by the development of foundation models such as BERT, GPT, T5, and Vision Transformers. These models are first pretrained on vast and diverse datasets and then adapted to specific downstream tasks, often with significantly less data. However, the mechanisms behind the success of this ubiquitous pretrain-then-adapt paradigm remain underexplored, particularly the characteristics of pretraining checkpoints that enhance downstream adaptation. We introduce a Bayesian model selection criterion, called the downstream free energy, which quantifies a checkpoint's adaptability by measuring the concentration of nearby favorable parameters for the downstream task. We demonstrate that this Bayesian model selection criterion can be effectively implemented without access to the downstream data or prior knowledge of the downstream task. Furthermore, we provide empirical evidence that the criterion reliably correlates with improved fine-tuning performance, offering a principled approach to predicting model adaptability. + +# 1. Introduction + +The advent of foundation models has significantly reshaped the landscape of modern machine learning (Bommasani et al., 2021). Trained on expansive, diverse datasets using supervised or self-supervised learning methods, these models learn generalized representations that can then be successfully adapted (or finetuned) to a wide array of downstream tasks, often where there is significantly less data or limited computational resources (Bengio, 2012; Brown et al., 2020). This pretrain-then-adapt paradigm has emerged as a dominant and highly successful technique driving significant + +*Equal contribution ¹Google Research, New York, USA ²Dept. of Econometrics and Business Statistics, Monash University, Melbourne, Australia. Correspondence to: Michael Munn . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +progress across natural language processing and computer vision with applications including text classification (Qiu et al., 2020), text generation (Li et al., 2024), image classification (Liu et al., 2023b), object detection (Sanchez et al., 2020), medical imaging (Mormont et al., 2018; Chen et al., 2019; Ke et al., 2021), autonomous driving (Kim & Park, 2017) and robotics (Jaquier et al., 2023). + +As a result, there is a growing body of research that aims to better understand the theoretical reasons behind the success of this pre-train-then-adapt paradigm (Galanti et al., 2022; Munn et al., 2024). One of the key open questions is to understand how to select pretraining checkpoints which are optimal for adaptation. A number of practical heuristics have emerged through experimental intuition and empirical analysis (Liu et al., 2023a), but a principled theoretical framework for effective checkpoint selection is still lacking. + +To address this, we repurpose well-established concepts from Bayesian statistics and propose downstream free energy as a pretraining model selection criterion. Downstream free energy measures the negative log of the concentration of well-performing network weights near a pretraining checkpoint when evaluated on downstream data. In statistical lingo, this is nothing more than the (negative log) marginal likelihood where the integral is restricted to a local neighborhood around the pretraining checkpoint. Intuitively, lower downstream free energy indicates a higher concentration of parameters in parameter space for which the model is more adaptable and capable of generalizing well on downstream tasks. In short, checkpoints with lower downstream free energy are better suited for adaptation and thus should be preferred during pretraining. + +Although the use of downstream free energy as a pretraining model selection criterion has strong theoretical grounding in Bayesian statistics, it comes with an unfortunate caveat: to compute it requires access to the downstream dataset which may not be available to the practitioner during pretraining. However, under certain distributional shift conditions between the pretraining and downstream data, it is possible to overcome this limitation. Namely, we introduce the pretraining free energy, which is computed solely on the pretraining data, and show that minimizing it serves as a reliable proxy for minimizing the downstream free energy (see Proposition 5.1). Together, these insights provide a + +solid justification for using the pretraining free energy as a model selection criterion during pretraining. This strategy is particularly advantageous when pretraining is intended to be general purpose, as is the case with most foundation models. + +![](images/38594225e66337a9f71db7bb27e16a9557db11c98eb6e1d088255b72d75eb4ad.jpg) + +![](images/2fd8fe2f71ea4c7e707ca8f904a145fd82015af10a2d8d6d3d92c331b872e679.jpg) +Figure 1. We plot pretraining free energy versus two types of transfer accuracy (top and bottom) for checkpoints at the end of pretraining. As expected, checkpoints with lower pretraining free energy, across various pretraining hyperparameters such as learning rate, batch size, and momentum, show higher transfer accuracy. The size of the icons represent magnitude of the hyperparameter value; e.g., a larger triangle means higher momentum. The reported values are averaged over five random seeds. See Section 6 for details. + +To justify our theoretical results, we exploit certain pretraining mechanisms that are known to reduce the pretraining free energy, such as larger learning rates, smaller batch sizes and higher momentum (Lau et al., 2025). We then verify that these mechanisms, which lead to reduced pretraining free energy, in turn correlate with improved downstream adaptation performance. A preview of these results is presented in Figure 1. In summary, our contributions are: + +- We introduce the downstream free energy as novel model selection criterion for quantifying downstream adaptability (Section 4.1). +- We prove the downstream free energy can be controlled by the pretraining free energy (Proposition 5.1) and provide insight into how this free energy perspective informs practical pretraining heuristics (Section 5.1). + +- We experimentally confirm (Section 6), using varied datasets and architectures, that lower pretraining free energy not only enhances downstream adaptability (Figure 2 and Figure 3) but also exhibits a stronger correlation with adaptability compared to other pretraining metrics (Table 1). + +# 2. Relationship to Prior Work + +Implicit bias in transfer learning. The term implicit bias refers to the tendency of optimization processes, such as stochastic gradient descent (SGD), to inherently guide the model's learning dynamics towards solutions with properties which are not explicitly prescribed by the loss function (Neyshabur et al., 2017; Soudry et al., 2018; Gunasekar et al., 2018). For example, the selection of training hyperparameters, such as the learning rate and batch size, can have a significant effect on the optimization efficiency as well as on the quality of the learned model (Keskar et al., 2017; Masters & Luschi, 2018; Goyal, 2017; He et al., 2019; Andriushchenko et al., 2023). As a result, there has been considerable effort to understand the mechanisms which govern these implicit biases during model training. However, the effect of implicit bias in transfer learning—particularly how it impacts successful downstream domain adaptation—is a growing but less explored area of research (Lippl & Lindsey, 2024; Kumar et al., 2022). + +In transfer learning, the ability to identify and leverage pretraining biases to predict and improve downstream test error is highly valuable. Recent work of (Liu et al., 2023a; Galanti et al., 2022; Munn et al., 2024) can be viewed as establishing relationships of the form + +downstream test error $\lesssim$ pretraining characteristic. (1) + +Ideally, these pretraining characteristics are sensitive to factors which can be manipulated by practitioners, thus allowing for deliberate influence and intentional design during pretraining. Furthermore, any such pretraining characteristic should be accessible using only pretraining data, since knowledge to the downstream task or data is typically not available. It is worthwhile to note that (Liu et al., 2023a; Galanti et al., 2022; Munn et al., 2024) mainly consider the linear probe as their fine-tuning method while we consider full fine-tuning. + +(Liu et al., 2023a) explore the role of implicit bias in language modeling and establish an empirical relationship between the pretraining flatness (measured by the trace of the Hessian of the pretraining loss) and the downstream test accuracy. Their experiments verify that lower pretraining flatness, which they show is effectively regularized by SGD, strongly correlates with better downstream performance. Although this work does not provide a formal bound as in (1), it offers valuable empirical evidence on how the implicit + +flatness regularization of SGD acts to benefit transfer learning. This is particularly beneficial since techniques exist for explicitly minimizing loss landscape sharpness; e.g., (Foret et al., 2021; Wen et al., 2023). + +(Galanti et al., 2022) examine the efficacy of transfer learning through the lens of neural collapse, a recently observed phenomenon which characterizes the geometry of last-layer features and weights for overparameterized classification networks (Papyan et al., 2020). They show through theory and experiments that the neural collapse exhibited during pretraining generalizes to new classes of the downstream task as well, thus enabling successful model adaptation. Drawing on the formalism described in (1), (Galanti et al., 2022) can be seen as deriving theoretical bounds of the form + +$$ +\begin{array}{c c c c} \text {d o w n s t r e a m} & \lesssim & \text {d o w n s t r e a m} & \lesssim \\ \text {t e s t e r r o r} & \lesssim & \text {n e u r a l c o l l a p s e} & \lesssim \\ & & & \text {n e u r a l c o l l a p s e}. \end{array} +$$ + +However, despite supporting neural collapse as a beneficial pretraining characteristic, practical methods to explicitly regularize it are lacking. + +(Munn et al., 2024) make progress in this direction by means of the geometric complexity, a model complexity measure introduced and analyzed in (Dherin et al., 2022). They prove that the geometric complexity of the model's learned feature representations upper bounds the model neural collapse. Furthermore, their experiments verify that techniques which implicitly reduce this geometric complexity during pretraining (such as large learning rates, small batch sizes and increased $L^2$ regularization) in turn put regularizing pressure on the pretraining neural collapse leading to improved transfer test accuracy. + +Our key contribution is the identification of free energy as a novel and significant pretraining characteristic which exhibits direct theoretical and empirical connections governing successful downstream model adaptability. We prove in Section 5 that, similar to neural collapse, the pretraining free energy bounds from above the downstream free energy. In addition, we establish (see Appendix A) a theoretical link between downstream free energy and the downstream Bayesian prediction, providing theoretical guarantees on the downstream Bayes test error. Together, these theoretical results, viewed in the context of (1), imply + +$$ +\begin{array}{c c c c c} \text {d o w n s t r a m} & \lesssim & \text {d o w n s t r a m} & \lesssim & \text {p r e t r a i n i n g} \\ \text {B a y e s i a n t e s t e r r o r} & \lesssim & \text {f r e e e n e r g y} & \lesssim & \text {f r e e e n e r g y}. \end{array} +$$ + +Furthermore, using mechanisms established in (Lau et al., 2025) which are known to implicitly regularize the pretraining free energy—such as large learning rates, small batch sizes, and increased momentum—we experimentally verify (see Section 6) that lower pretraining free energy does indeed lead to improved fine-tuning performance. + +Bayesian model selection criterion. The idea of using free energy has its roots in Bayesian model selection. Given a + +collection of models, $\mathcal{M}_1, \ldots, \mathcal{M}_k$ , the task of choosing an optimal model for some given data is known as model selection. There are different (and sometimes irreconcilable) model selection criteria; but, in general, all model selection criteria attempt to balance fit and complexity. A particularly appealing Bayesian model selection criterion is the free energy criterion which is widely used and accepted in the both the statistical and machine learning literature (Hinton & van Camp, 1993; Kass & Raftery, 1995; MacKay, 2002; Robert et al., 2007). The free energy model selection criterion says we should pick the model with the lowest free energy. Since the free energy is the negative log of the marginal likelihood, also known as Bayesian model evidence, free energy minimization is equivalent to marginal likelihood maximization. To our knowledge, this work represents the first application of the free energy criterion in the domain of transfer learning. + +# 3. Problem Setup + +Here, we shall mainly treat the supervised setting though the theory developed below applies equally to the unsupervised setting. During pretraining, for input $x$ and target $y$ , we employ a probabilistic model $p^0 (y|x,w)$ parameterized by $w\in W\subset \mathbb{R}^p$ . Throughout, we assume the pretraining model $p^0 (y|x,w)$ depends on $x$ through a neural network $f_w^{\mathrm{PT}}(x) = \sigma_{\mathrm{out}}(v^T\phi_\theta (x))$ where $w = (v,\theta)$ . Here $\phi_{\theta}$ denotes the feature extractor parameterized by $\theta$ and $v$ the weights of the linear head. The final activation is denoted $\sigma_{\mathrm{out}}$ ; e.g., softmax or sigmoid for classification tasks. + +For fine-tuning, we attach a new linear head $u$ to the backbone $\phi_{\theta}$ resulting in a neural network $f_{w'}^{\mathrm{FT}}(x) = \sigma_{\mathrm{out}}(u^T\phi_\theta(x))$ where $w' = (u,\theta)$ with $u$ potentially having different dimension to $v$ . The fine-tuning probabilistic model is denoted $p^1(y|x,w')$ where the dependence on $x$ is through $f_{w'}^{\mathrm{FT}}$ . + +Given a pretraining checkpoint $w^{*} = (v^{*},\theta^{*})$ , we initialize $f_{w'}^{\mathrm{FT}}$ at $(u_0,\theta^*)$ where $u_{0}$ is randomly initialized. All parameters of $w'$ are then fine-tuned via stochastic optimization. In this work, we employ limited fine-tuning where the linear head undergoes standard training, while the backbone remains mostly frozen, with updates governed by a separate, smaller learning rate. This approach is particularly useful in scenarios with limited downstream data, where the differential learning rates help to prevent overfitting or loss of general-purpose representations; cf. (Lee et al., 2022). + +For theoretical convenience, we will assume that $u$ and $v$ share the same dimensionality + +This way, we can use $p(y|x,w)$ to denote both the pretrain- + +ing and fine-tuning models. Let the true (and unknown) pretraining $(i = 0)$ and fine-tuning $(i = 1)$ joint distributions be denoted + +$$ +r ^ {i} (x, y) := r ^ {i} (y | x) r ^ {i} (x), \quad i = 0, 1; +$$ + +and define the pretraining $(i = 0)$ and fine-tuning $(i = 1)$ test loss to be + +$$ +\mathrm {K} ^ {i} (w) := \mathbb {E} _ {r ^ {i} (x)} D _ {\mathrm {K L}} \left(r ^ {i} (y | x) \| p (y | x, w)\right). +$$ + +Let $\mathcal{D}^0$ and $\mathcal{D}^1$ be datasets drawn from the pretraining and downstream distributions (resp.) and + +the corresponding pretraining $(i = 0)$ and fine-tuning $(i = 1)$ sample losses be + +$$ +\hat {\mathrm {K}} ^ {i} (w) := \frac {1}{| \mathcal {D} ^ {i} |} \sum_ {(x, y) \in \mathcal {D} ^ {i}} \left(\log r ^ {i} (y | x) - \log p (y | x, w)\right). +$$ + +Note that minimization of $\mathrm{K}^i (w)$ and $\hat{\mathrm{K}}^i (w)$ with respect to $w$ can recover the standard cross-entropy loss and squared loss frequently employed in deep learning. Indeed, if we drop the entropy term in $\mathrm{K}^i$ and $\hat{\mathrm{K}}^i$ , which does not depend on $w$ , we obtain the negative log likelihoods, for $i = 0,1$ + +$$ +\mathrm {L} ^ {i} (w) := - \mathbb {E} _ {r ^ {i} (x, y)} \log p (y | x, w) +$$ + +$$ +\hat {\mathrm {L}} ^ {i} (w) := - \frac {1}{| \mathcal {D} ^ {i} |} \sum_ {(x, y) \in \mathcal {D} ^ {i}} \log p (y | x, w). +$$ + +We double load test loss to mean either $\mathrm{K}^i$ or $\mathrm{L}^i$ and train loss to mean either $\hat{\mathrm{K}}^i$ or $\hat{\mathrm{L}}^i$ . + +# 4. Pretraining and downstream free energy + +In this section, we begin by introducing the downstream free energy as a measure of how suitable a checkpoint is for downstream adaptation. We then introduce the pretraining free energy as a proxy that can be measured solely using the pretraining data. + +Let $U_0 = \{w_\alpha^* = (v_\alpha^*, \theta_\alpha^*)\}_\alpha$ denote the set of local minima of the pretraining test loss $\mathrm{K}^0(w)$ . In our theoretical development, we will frequently refer to the elements of $U_0$ as pretraining checkpoints. Note that the elements of $U_0$ , being local minima of the test loss, generally differ from the actual checkpoints obtained during pretraining, which are governed by the training loss $\hat{\mathrm{K}}^0(w)$ (or equivalently, $\hat{\mathrm{L}}^0(w)$ ). To bridge this gap between theory and practice, checkpoints should correspond to local minima of the training loss. This ensures that the theoretical objects we analyze – minimizers of the test loss – are meaningfully related to their empirical counterparts. + +Given a single model - a parametric family $\mathcal{M} = \{p(y|x, w) : w \in W\}$ - with multiple optima (as neural networks are prone to exhibit), we can perform internal model + +selection (Balasubramanian, 1997) using a local version of the free energy criterion to select among the local optima. This amounts to comparing the downstream free energies between elements of $U_{0}$ . We now define the downstream free energy associated to an element of $U_{0}$ . + +# 4.1. Downstream free energy + +With datasets $\mathcal{D}^0$ and $\mathcal{D}^1$ as above, let $n = |\mathcal{D}^0|$ and $m = |\mathcal{D}^1|$ . Informally, we might say that a pretraining checkpoint $w^{*} = (v^{*},\theta^{*})\in U_{0}$ is a good candidate for adaptation if there are many weights $\theta$ in the vicinity of $\theta^{*}$ with low fine-tuning test loss; i.e., low values of $\mathrm{K}^1 (w)$ . One way to make this mathematically precise is via the downstream free energy + +$$ +\bar {\mathrm {F}} ^ {1} \left(B _ {\gamma} \left(w ^ {*}\right)\right) := - \log \bar {\mathrm {Z}} ^ {1} \left(B _ {\gamma} \left(w ^ {*}\right)\right), \tag {1} +$$ + +which is the negative log of a local marginal likelihood + +$$ +\bar {\mathrm {Z}} ^ {1} \left(B _ {\gamma} \left(w ^ {*}\right)\right) := \int_ {B _ {\gamma} \left(w ^ {*}\right)} \exp \left\{- m \mathrm {K} ^ {1} (w) \right\} \varphi (w) d w. (2) +$$ + +Here $\varphi(w)$ is a prior over the model parameters $w$ , and $B_{\gamma}(w^{*}) := \{w = (v^{*}, \theta) : ||\theta - \theta^{*}||_2^2 \leq 1 / \gamma\}$ is the $\gamma$ -neighborhood around $w^{*}$ with $v^{*}$ frozen. Note that large values of $\gamma$ force us to stay near $\theta^{*}$ and thus, ultimately, stay near the pretraining checkpoint $w^{*} = (v^{*}, \theta^{*})$ as well. + +Taken together, equations (1) and (2) imply that a large concentration of weights $\theta$ near $\theta^{*}$ with low downstream test loss $\mathrm{K}^1 (w)$ results in a large $\bar{\mathbf{Z}}^{1}(B_{\gamma}(w^{*}))$ and, equivalently, a small $\bar{\mathrm{F}}^{1}(B_{\gamma}(w^{*}))$ . Thus, we propose the following downstream free energy strategy for improved fine-tuning: + +Pretraining checkpoints with lower downstream free energy are more likely to adapt successfully to downstream tasks. + +Formally, we seek to find parameters $w^{*} \in U_{0}$ which minimize the downstream free energy; i.e., + +$$ +\arg \min _ {w ^ {*} \in U _ {0}} \bar {\mathrm {F}} ^ {1} \left(B _ {\gamma} \left(w ^ {*}\right)\right). \tag {3} +$$ + +Before addressing the implementation of this free energy strategy, let's first understand the competing forces behind this model selection criterion. Given $w^{*} \in U_{0}$ , following the techniques set out in (Watanabe, 2009), the asymptotic expansion of $\bar{\mathrm{F}}^{1}(B_{\gamma}(w^{*}))$ in the sample size $m$ is + +$$ +\begin{array}{l} \bar {\mathrm {F}} ^ {1} \left(B _ {\gamma} \left(w ^ {*}\right)\right) \tag {4} \\ = m \mathrm {K} ^ {1} \left(w ^ {* 1}\right) + \lambda^ {1} \left(w ^ {*}\right) \log m + O (\log \log m), \\ \end{array} +$$ + +where $w^{*1} \coloneqq \arg \min_{w \in B_{\gamma}(w^{*})} \mathrm{K}^{1}(w)$ . Further discussion, including the derivation of equation (4), can be found in Section 4 and Appendix B of (Lau et al., 2025). + +Remark 4.1. From (4), note that that downstream free energy of a checkpoint $w^{*}$ is a weighted sum of two things: the fit, as measured by $\mathrm{K}^1 (w^{*1})$ , and the complexity, as measured by $\lambda^1 (w^*)$ . This complexity measure $\lambda^1 (w^*)$ was recently introduced as the local learning coefficient; see Lau et al. (2025). Lower local learning coefficient means lower model complexity. Note that a checkpoint with higher loss under the downstream distribution may still be preferred as long as its complexity is low enough to compensate. Furthermore, note that for pretraining checkpoints that are in the same level set of $\mathrm{K}^1$ , the checkpoint with the lowest model complexity, as measured by $\lambda^1$ , will have the lowest downstream free energy. + +The free energy strategy in (3) which uses $\bar{\mathrm{F}}^1 (B_\gamma (w^*))$ to select among candidate checkpoints in $U_{0}$ is conceptually sound but presents two notable implementation challenges. First, $\bar{\mathrm{F}}^1 (B_\gamma (w^*))$ , besides involving some unknown terms such as $\mathrm{K}^1$ , is the negative log of an intractable integral. This is not insurmountable as many techniques such as MCMC or variational inference are available to deal with intractable integrals. + +The second, and more significant, issue is that applying $\bar{\mathrm{F}}^1 (B_\gamma (w^*))$ to select among checkpoints $w^{*}\in U_{0}$ requires access to downstream data. This poses a problem because, in many practical scenarios, the downstream task may not be known or fully available during pretraining. To address this limitation, we introduce the pretraining free energy, an analog of the downstream free energy but which can be computed using only the pretraining data. In Section 5 we show how these two quantities are related. + +Remark 4.2. Note that the free energy as defined in equations (1) and (2) is not scale invariant with respect to parameters $w$ . Thus, for certain neural network architectures exhibiting strict scale invariance, such as those composed purely of ReLU activations, it's possible for a global parameter rescaling to leave model outputs and downstream accuracy unaffected, while potentially altering the free energy in some non-trivial way. However, our investigation here centers on commonly deployed neural networks, which typically incorporate elements like normalization layers or weight decay that break strict parameter scaling invariance. + +# 4.2. Pretraining free energy + +Similar to the downstream free energy defined in (1), we define the pretraining free energy for a pretraining checkpoint $w^{*} = (v^{*},\theta^{*})\in U_{0}$ as + +$$ +\mathrm {F} ^ {0} \left(B _ {\gamma} \left(w ^ {*}\right); \beta\right) := - \log \mathrm {Z} ^ {0} \left(B _ {\gamma} \left(w ^ {*}\right); \beta\right) \tag {5} +$$ + +where + +$$ +Z ^ {0} \left(B _ {\gamma} \left(w ^ {*}\right); \beta\right) := \int_ {B _ {\gamma} \left(w ^ {*}\right)} \exp \{- n \beta \hat {K} ^ {0} (w) \} \varphi (w) d w \tag {6} +$$ + +and $\beta > 0$ is an inverse temperature. Unlike $\bar{\mathbf{Z}}^1(B_\gamma(w^*))$ and $\bar{\mathbf{F}}^1(B_\gamma(w^*))$ , here the quantities $\mathbf{Z}^0(B_\gamma(w^*); \beta)$ and $\mathbf{F}^0(B_\gamma(w^*); \beta)$ are stochastic. We indicate this by dropping the overhead bar. + +Analogous to (4), the asymptotic expansion of $\mathrm{F}^0 (B_\gamma (w^*);\beta)$ in $n$ for $w^{*}\in U_{0}$ is + +$$ +\begin{array}{l} \mathrm {F} ^ {0} \left(B _ {\gamma} \left(w ^ {*}\right); \beta\right) \tag {7} \\ = n \beta \hat {\mathrm {K}} ^ {0} \left(w ^ {* 0}\right) + \lambda^ {0} \left(w ^ {*}\right) \log n + O _ {p} (\log \log n) \\ \end{array} +$$ + +where $w^{*0} \coloneqq \arg \min_{w \in B_{\gamma}(w^{*})} K^0(w)$ . Note that the asymptotic expansion of $\overline{\mathrm{F}}^1(B_{\gamma}(w^{*}))$ in (4) involves the downstream test loss $\mathrm{K}^1$ whereas the asymptotic expansion of $\mathrm{F}^0(B_{\gamma}(w^{*}); \beta)$ in (7) involves the pretraining train loss $\hat{\mathrm{K}}^0$ . To compare the two, we take the expectation over the dataset in (7), arriving at the following expansion involving only deterministic quantities: + +$$ +\begin{array}{l} \mathbb {E} _ {\mathcal {D} ^ {0}} \mathrm {F} ^ {0} \left(B _ {\gamma} \left(w ^ {*}\right); \beta\right) \tag {8} \\ = n \beta \mathrm {K} ^ {0} \left(w ^ {* 0}\right) + \lambda^ {0} \left(w ^ {*}\right) \log n + O (\log \log n). \\ \end{array} +$$ + +In the next section, we will use these asymptotic expansions to bound the discrepancy between the downstream and pretraining free energy. + +# 5. Relationship between pretraining and downstream free energy + +In this section, we show there is a satisfying relationship between pretraining free energy and downstream free energy, asymptotically speaking. Relying on the leading order terms of the asymptotic expansion of the downstream free energy in (4), we can express the downstream free energy strategy in (3) as + +$$ +\arg \min _ {w ^ {*} \in U _ {0}} \left[ m K ^ {1} \left(w ^ {* 1}\right) + \lambda^ {1} \left(w ^ {*}\right) \log m \right], \tag {9} +$$ + +where $w^{*1} \coloneqq \arg \min_{w \in B_{\gamma}(w^{*})} \mathrm{K}^{1}(w)$ . To avoid requiring the downstream test loss $\mathrm{K}^{1}$ , we introduce the pretraining asymptotic free energy strategy which relies only on the pretraining distribution and (under mild assumptions, below) serves as a viable proxy for (9). Formally, this strategy seeks a solution of the following optimization + +$$ +\arg \min _ {w ^ {*} \in U _ {0}} \left[ n \beta_ {0} \mathrm {K} ^ {0} \left(w ^ {*}\right) + \lambda^ {0} \left(w ^ {*}\right) \log n \right] \tag {10} +$$ + +where $\beta_0 = M\frac{m\log n}{n\log m}$ . This strategy is supported by the following result whose proof can be found in Appendix C. + +Proposition 5.1. Let $w^{*}$ be a local minimum of $\mathrm{K}^0 (w)$ ; i.e., $w^{*}\in U_{0}$ and $\gamma$ be such that $w^{*0}$ is a local minimum of $\mathrm{K}^0 (w)$ ; i.e., $w^{*0}\in U_0$ . Further suppose $\lambda^1 (w^*)\leq \lambda^0 (w^*)$ . + +Define $M := \max_{(x,y) \sim r^0(x,y)} \frac{r^1(x,y)}{r^0(x,y)} < \infty$ . Then, + +$$ +\begin{array}{l} \mathrm {K} ^ {1} \left(w ^ {* 1}\right) + \lambda^ {1} \left(w ^ {*}\right) \frac {\log m}{m} \tag {11} \\ \leq M K ^ {0} (w ^ {*}) + D + \lambda^ {0} (w ^ {*}) \frac {\log m}{m} \\ \end{array} +$$ + +where $D = \int \log \frac{r^1(y|x)}{r^0(y|x)} r^1 (x,y)dxdy.$ + +Proposition 5.1 justifies model selection using the asymptotic expansion of the pretraining free energy as in (10). This follows from (11) by first multiplying both sides by $m$ and then noting that minimizing + +$$ +m M K ^ {0} \left(w ^ {*}\right) + m D + \lambda^ {0} \left(w ^ {*}\right) \log m +$$ + +is equivalent, up to constants, to minimizing + +$$ +\frac {\log n}{\log m} \left[ m M K ^ {0} \left(w ^ {*}\right) + \lambda^ {0} \left(w ^ {*}\right) \log m \right], +$$ + +which leads us precisely to (10). To further illustrate Proposition 5.1, we include explanatory examples in Appendix D which interprets this result applied to Gaussian distributions. + +There are some real-world scenarios for which Proposition 5.1 would be uninformative. For example, if the pretraining data includes only images of horses while the downstream data contains only cars, their label supports would be disjoint, leading to an infinite $M$ . To address this, our experiments in Section 6 focus on settings where the pretraining dataset is significantly larger and more diverse than the downstream dataset. This also reflects common practice in the field and an established heuristic in transfer learning; see also (Kornblith et al., 2019). Specifically, we achieve this by using pretraining datasets with a substantially larger set of image classes. If this were reversed; i.e., the pretraining dataset has substantially fewer classes than the downstream dataset, the relationship we establish in Proposition 5.1 would be uninformative. + +# 5.1. Observations of the pretraining asymptotic free energy strategy + +In this section, we present practical observations that follow from selecting pretraining checkpoints according to the pretraining asymptotic free energy strategy defined by (10). + +Observation 1: A suboptimal checkpoint in terms of pretraining test loss can still be preferred by the pretraining asymptotic free energy strategy in (10). Suppose we have two models $w_{\alpha}^{*}, w_{\beta}^{*} \in U_{0}$ ; i.e., both models are local minima of the pretraining test loss $\mathrm{K}^0$ . In order to determine which model is preferred for fine-tuning, our strategy (10) directs us to compare + +$$ +F _ {\alpha} = n \beta_ {0} \mathrm {K} ^ {0} \left(w _ {\alpha} ^ {*}\right) + \lambda^ {0} \left(w _ {\alpha} ^ {*}\right) \log n \tag {12} +$$ + +and + +$$ +F _ {\beta} = n \beta_ {0} \mathrm {K} ^ {0} \left(w _ {\beta} ^ {*}\right) + \lambda^ {0} \left(w _ {\beta} ^ {*}\right) \log n. \tag {13} +$$ + +Suppose $\mathrm{K}^0 (w_\alpha^*) < \mathrm{K}^0 (w_\beta^*)$ ; i.e., $w_\alpha^*$ and $w_\beta^*$ are in different level sets and checkpoint $w_\alpha^*$ has lower pretraining test loss; but $\lambda^0 (w_\alpha^*) > \lambda^0 (w_\beta^*)$ , implying checkpoint $w_\beta^*$ is less complex than checkpoint $w_\alpha^*$ . Then it is entirely possible for $F_\alpha > F_\beta$ so that checkpoint $w_\beta^*$ will be preferred by (10) despite having higher pretraining test loss. In fact, this happens precisely when + +$$ +\frac {m}{\log m} < \frac {1}{M} \frac {\lambda^ {0} (w _ {\alpha} ^ {*}) - \lambda^ {0} (w _ {\beta} ^ {*})}{\mathrm {K} ^ {0} (w _ {\beta} ^ {*}) - \mathrm {K} ^ {0} (w _ {\alpha} ^ {*})}. +$$ + +Recall, $m$ represents the number of examples in the downstream dataset. Note that, when $M$ is large, there's a smaller range of $m$ under which the suboptimal pretraining checkpoint will be preferred. In other words, if the downstream distribution is very different to the pretraining distribution, the free energy strategy will look to the lower level sets of pretraining test loss. + +Observation 2: When $n\beta_0 \gg \log n$ , a checkpoint with lower pretraining test loss will always be preferred by the pretraining asymptotic free energy strategy in (10). Again, suppose we have two local minima $w_{\alpha}^{*}, w_{\beta}^{*} \in U_0$ but which are in different level sets of the test loss; i.e., $\mathrm{K}^0(w_{\alpha}^*) \neq \mathrm{K}^0(w_{\beta}^*)$ . Without a handle on $\beta_0$ , we cannot decide which checkpoint has lower free energy since, as described above in Observation 1, the complexity term $\lambda^0$ also plays a role in comparing $F_{\alpha}$ and $F_{\beta}$ . + +However, when $n\beta_0$ is significantly larger than $\log n$ , the first term in (10) dominates the second. In this case, the pretraining asymptotic free energy strategy prioritizes checkpoints with lower pretraining test loss $\mathrm{K}^0$ . + +Using the definition of $\beta_0$ in (10), the setting described here is equivalent to $Mm\gg \log m$ , where $m$ is the size of the fine-tuning dataset and $M$ measures distributional shift. Since $m$ already grows faster than $\log m$ , this may offer an intriguing insight which justifies the pretraining test loss as a heuristic for checkpoint adaptability. + +Observation 3: For checkpoints with the same pretraining test loss, the one with the lowest complexity is preferred by the pretraining asymptotic free energy strategy in (10). Suppose we have two models $w_{\alpha}^{*}, w_{\beta}^{*} \in U_{0}$ in the same level set of $\mathrm{K}^{0}$ ; i.e., same pretraining test loss $K^{0}(w_{\alpha}^{*}) = K^{0}(w_{\beta}^{*})$ . As before, our strategy (10) directs us to compare $F_{\alpha}$ and $F_{\beta}$ as defined in equations (12) and (13), resp. + +However, since the first terms are equal, selecting the preferred pretraining checkpoint depends only on the model complexity, as measured by $\lambda^0 (w_\alpha^*)$ and $\lambda^0 (w_\beta^*)$ . Thus, all else being equal, the strategy in (10) naturally prefers + +simple pretraining checkpoints over more complex ones for improved fine-tuning. + +# 5.2. Estimating pretraining free energy + +So far, we have established the pretraining asymptotic free energy strategy as a theoretically principled approach to pretraining model selection for improved finetuning. In this section, we show how to estimate the pretraining asymptotic free energy required in (10) using only the sample pretraining train loss $\hat{\mathbf{L}}^0$ . This estimation technique, which we employ in our experiments (Section 6), enables the application of our proposed strategy in (10) for real-world machine learning scenarios. + +We begin by focusing first on model selection for pretraining checkpoints in the same level set of $\mathbf{K}^0$ . In this case, we can set $\beta_0$ to an arbitrary value; we set $\beta_0 = 1$ . Next, note that the optimization objective in (10) can be equivalently expressed in terms of $\mathbf{L}^0$ since it differs only from $\mathbf{K}^0$ by a constant with respect to $w$ . In other words, we have + +$$ +\begin{array}{l} \underset {w ^ {*} \in U _ {0}} {\arg \min } \left[ n \mathrm {K} ^ {0} \left(w ^ {*}\right) + \lambda^ {0} \left(w ^ {*}\right) \log n \right] \\ = \underset {w ^ {*} \in U _ {0}} {\arg \min } \left[ n \mathrm {L} ^ {0} \left(w ^ {*}\right) + \lambda^ {0} \left(w ^ {*}\right) \log n \right]. \tag {14} \\ \end{array} +$$ + +To estimate the RHS of (14), we refer to recent work of (Lau et al., 2025) which shows that the Widely Applicable Bayesian Information Criterion (WBIC) around $w^{*} \in U_{0}$ is an asymptotically unbiased estimator of $n\mathrm{L}^0 (w^*) + \lambda^0 (w^*)\log n$ . This localized version of the WBIC is computed from the sample pretraining train loss $\hat{\mathrm{L}}^0$ measured in the neighborhood $B_{\gamma}(w^{*})$ of the checkpoint $w^{*}$ as described below. + +Consider a localizing Gaussian prior which acts as a surrogate for enforcing the domain of integration given by $B_{\gamma}(w^{*})$ . Specifically, let + +$$ +\varphi_ {\vec {\gamma}} (w) \propto \exp \{- \vec {\gamma} ^ {T} | | w | | _ {2} ^ {2} \}, \quad \vec {\gamma} \in \mathbb {R} _ {> 0} ^ {p} +$$ + +which is centered at the origin with scale vector $\vec{\gamma} = (\gamma_1, \dots, \gamma_p)$ . Since we only want to measure the free energy with respect to parameters $\theta$ of the model backbone (recall, the fine-tuning setup described in Section 3), we take $\gamma_j = \infty$ in the coordinates of $v$ and $\gamma_j = \gamma$ in the coordinates of $\theta$ , where $\gamma$ is the same as the radius defining the neighborhood $B_{\gamma}(w^{*})$ ; recall, (2). + +Define the pretraining posterior distribution + +$$ +p ^ {0} \left(w; w ^ {*}, \beta , \vec {\gamma}\right) \propto \exp \left\{- n \beta \hat {\mathrm {L}} ^ {0} (w) \right\} \varphi_ {\vec {\gamma}} \left(w - w ^ {*}\right). \tag {15} +$$ + +Following Lau et al. (2025), we define the pretraining WBIC at $w^{*} \in U_{0}$ by + +$$ +\operatorname {W B I C} \left(w ^ {*}; \beta^ {*}\right) := \int \left[ n \hat {\mathrm {L}} ^ {0} (w) \right] p ^ {0} \left(w; w ^ {*}, \beta^ {*}, \gamma\right) d w, \tag {16} +$$ + +where $\beta^{*} = \frac{1}{\log n}$ . It is not hard to see that (16) is a localized adaptation of Watanabe's classic Widely Applicable Bayesian Information Criterion (WBIC) (Watanabe, 2013). The classic WBIC itself was developed because the standard Bayesian Information Criterion (BIC) (Schwarz, 1978) is unsuitable for singular statistical models. Recall that a model is said to be 'regular' if its parameter-to-distribution mapping is one-to-one and its Fisher information matrix is positive definite for all possible parameter values; otherwise, it is singular. The key distinction of the pretraining WBIC, as defined in (16), and the classic WBIC is its localization through a Gaussian prior centered on the pretraining checkpoint $w^{*}$ . + +The pretraining WBIC at a checkpoint $w^{*}$ is a good estimate of the (expected) pretraining free energy around $w^{*}$ defined by equations (5) and (6). Furthermore, $\mathrm{WBIC}(w^{*};\beta^{*})$ can be reliably computed via SGLD sampling methods; see Lau et al. (2025, Appendix G). + +Therefore, to apply the pretraining asymptotic free energy strategy in (10) to checkpoints with the same $\mathbf{K}^0$ , we simply select the one with the smallest pretraining WBIC given by $\mathrm{WBIC}(w^{*};\beta^{*})$ . Next, we empirically verify this strategy using the CIFAR dataset trained on ResNet-18. + +# 6. Experiments + +The goal of our experiments is to evaluate how well the pretraining WBIC, which estimates the pretraining free energy as described in Section 5.2, correlates with downstream performance. In order to measure the impact of lower pretraining WBIC, we apply mechanisms during pretraining which are known to implicitly regularize this quantity, as shown in (Lau et al., 2025). These include including large learning rates, small batch sizes, and high momentum. + +We use the CIFAR-FS dataset (Bertinetto et al., 2019), derived from CIFAR-100 where the 100 classes are divided into 64 classes for meta-training, 16 classes for meta-validation, and 20 classes for meta-testing. We pretrain on the meta-training set and then assess model adaptability on the unseen meta-test set via limited fine-tuning described in Section 3. The meta-validation classes are not used. + +Pretraining. For pretraining, we use all 64 classes from the CIFAR-FS meta-training set to train a ResNet-18 model using stochastic gradient descent (SGD). We explore ranges of hyperparameter values for the learning rate, batch size and momentum. Interaction effects between these are not considered. Full experiment details for each hyperparameter sweep are provided in Appendix B.1. During training we track the pretraining train loss (first column of Figure 2) and the pretraining WBIC (second column of Figure 2). The hyperparameter settings for pretraining WBIC computation are provided in Appendix B.1. + +![](images/f080423fb35bd2ebc2bae242f9bbafa548f19ff9d1d57ddcd556948b2922d154.jpg) + +![](images/d95114c3287086f6de084e41a02fe217e6e3f65eca70acbe22b6a430d736c0d3.jpg) + +![](images/29b3573ecc1a909e08044c7927b9665c05a3b39dfb3e7ff180fde8d358042eb6.jpg) + +![](images/c77a4afcb79b4c705c4744cc7b2e330b5c5d7b4a384f38393c55d8a9691f4405.jpg) + +![](images/9d435e369db5b834d4501f79199c137f45159e736bfaee0f998d7679e7a485a1.jpg) + +![](images/f561d49d076ec747e60254d0fbcb9e8958d45bf1c657f98779e5e1f07ac4828d.jpg) + +![](images/02087590bf144de6ed63423fe31920a20bf15e64e29444e565b3559f3dd19a8b.jpg) + +![](images/5702aa3cafff1aca650e2f53ace9e40378c407dd1adb1d56a0a553215e3f7809.jpg) + +![](images/fe3ddd211afe126fbfcfe939bfbc5e7ff1400d30bfd9cc2827bb82cc9e9d6c40.jpg) +Figure 2. Model checkpoints with lower pretraining WBIC (second column) consistently result in better transfer accuracy, both when fine-tuning on the full downstream dataset (third column) and in the few-shot setting (fourth column). Lower pretraining WBIC correlates with better downstream performance for Top row: larger learning rates, Middle row: smaller batch sizes, and Bottom row: increased momentum. Additional experiments on mini-ImageNet and a VGG model yield similar results; see Figure 3 and Appendix E. + +![](images/81c3db6b7b2d80ded4c694d335c6ed8159a83b8097d5e3312262eeaca93ca306.jpg) + +![](images/14760e9c6cf9f19e07b4233750c1caff113dcb2764a11a1bbf3efab81b85cddd.jpg) + +![](images/3a48c110e6a675de0d509313b02c9b47f0cd221c0c56ef565c2ceb497f2fcfc7.jpg) + +Full meta-test fine-tuning uses the full meta-test dataset, consisting of all 20 meta-test classes with 600 examples per class. We use an 80/20 split for training and testing, with stratification within each class. In this setting a new (randomly initialized) linear head is attached for the 20-class classification task, and the model is fine-tuned for 100 steps using SGD. This setting corresponds to the "Fine-tune Transfer Accuracy" metric (third column) in Figure 2. Hyperparameter details for this setting are in Appendix B.2. + +Few-shot meta-test fine-tuning examines a data-limited, few-shot scenario. A single few-shot task is created by randomly sampling 5 classes and 5 examples per class from the meta-test dataset, creating a dataset with 25 total training examples. A new (randomly initialized) linear head is attached for the 5-class classification task, and the model is finetuned for 100 steps using full batch gradient descent. The transfer accuracy is evaluated on 100 randomly selected test examples for each of the 5 classes. The overall transfer accuracy is averaged over 100 few-shot tasks. This setting corresponds to the "Avg 5-shot Transfer Accuracy" metric (fourth column) in Figure 2. Hyperparameter details for this setting are in Appendix B.2. + +Results. In each of these two fine-tuning scenarios, we observe a strong correlation between lower pretraining free energy (as measured by the pretraining WBIC, see Section + +5.2) and better downstream performance; see Figure 2. In particular, we see that increasing learning rate, decreasing batch sizes, and increasing momentum all result in lower pretraining WBIC, which in turn leads to better downstream performance. Note the Avg 5-shot transfer accuracy (fourth column) is typically higher than the finetune transfer accuracy (third column); this is likely because the former only needs to learn 5 classes at a time while the latter needs to learn 20 classes. Interestingly, we can view pretraining train loss (the first column of Figure 2) as a baseline comparison. We see that pretraining train loss often collapses to a similar value as training proceeds, rendering it ineffective for distinguishing different fine-tuning behaviors. + +In Figure 1, we take each checkpoint at the end of pretraining and plot its pretraining WBIC (called pretraining free energy there since the terminology had not been introduced) versus transfer accuracy. The left (right) plot of Figure 1 corresponds to the third (fourth) column of Figure 2. + +Comparison of with other pretraining metrics. As described in Section 2, recent work of (Galanti et al., 2022) and (Munn et al., 2024) examines the role of neural collapse and geometric complexity as effective pretraining metrics for assessing the suitability of a model checkpoint for transfer learning. To compare the effectiveness of our free energy strategy against these other pretraining metrics, we + +conducted a correlation analysis computing the Pearson correlation coefficients (Pearson & Galton, 1895) using model checkpoints obtained from training a ResNet-18 model on CIFAR-FS to convergence; see Table 1. + +These experiments involved a comprehensive exploration of the hyperparameter space (see Appendix B.3). For each checkpoint, we compared the Geometric Complexity, Neural Collapse, and Free Energy of the pretrained model to its downstream performance, measured via both full meta-test fine-tuning and few-shot meta-test fine-tuning. As indicated in Table 1, the pretraining Free Energy exhibits a substantially stronger correlation with downstream performance than other metrics considered. + +
Pretraining MetricFinetune AccuracyAvg 5-shot Accuracy
Geometric Complexity-0.767-0.443
Neural Collapse-0.632-0.1875
Free Energy-0.820-0.8901
+ +Table 1. Correlation comparison between pretraining metrics (geometric complexity, neural collapse, and free energy) and downstream performance (finetune and few-shot transfer accuracy). + +# 7. Conclusion and Future Work + +In this work, we introduced the downstream free energy as a Bayesian model selection criterion for quantifying the adaptability of pretraining checkpoints, offering a principled way to predict their performance on unseen downstream tasks. Our key insight is that checkpoints with lower downstream free energy are more adaptable, making them ideal candidates for fine-tuning. Our empirical results across varied datasets (CIFAR-FS, mini-Imagenet) and architectures (ResNet, VGG) validate the utility of the pretraining free energy as a practical checkpoint selection criterion, especially when downstream data is scarce or inaccessible. + +Despite the promising results, some limitations remain. First, our analysis currently lacks a direct link between downstream free energy and downstream predictive performance. At the moment, we provide a rigorous connection only when downstream adaptation is performed in a Bayesian manner (see Appendix A). While Bayesian deep learning is not yet widely adopted due to its computational overhead, this link may become valuable as computational barriers are reduced, particularly in fine-tuning scenarios. + +In addition, while our theoretical framework supports the use of free energy as a selection criterion, the practical computation of the pretraining WBIC as in (16), remains challenging for large models which may possess tens or hundreds of billions of parameters. Developing tractable methods for this computation remains a challenge and presents a significant direction for future work. An alternative ap + +proach would be to instead identify computationally efficient "levers" that influence pretraining free energy, thus allowing us to improve downstream adaptation performance without relying on direct computation of the pretraining WBIC. + +# Impact Statement + +This work proposes a novel theoretical framework for understanding the mechanisms behind successful fine-tuning in machine learning. Our findings have the potential to guide development of more efficient fine-tuning strategies, reducing computational costs and resource consumption, with implications for diverse applications like NLP and computer vision. As the primary focus of this work is theoretical, there are no direct societal consequences of our work that we feel must be specifically highlighted. + +# Acknowledgments + +We would like to thank Javier Gonzalvo for helpful discussions, suggestions, and feedback during the development of this work. + +# References + +Andriushchenko, M., Varre, A. V., Pillaud-Vivien, L., and Flammarion, N. Sgd with large step sizes learns sparse features. In International Conference on Machine Learning, pp. 903-925. PMLR, 2023. +Balasubramanian, V. Statistical inference, occam's razor, and statistical mechanics on the space of probability distributions. Neural Computation, 9(2):349-368, 1997. +Bengio, Y. Deep learning of representations for unsupervised and transfer learning. In Proceedings of ICML workshop on unsupervised and transfer learning, pp. 17-36. JMLR Workshop and Conference Proceedings, 2012. +Bertinetto, L., Henriques, J. F., Torr, P., and Vedaldi, A. Meta-learning with differentiable closed-form solvers. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=HyxnZh0ct7. +Bommasani, R., Hudson, D. A., Adeli, E., Altman, R., Arora, S., von Arx, S., Bernstein, M. S., Bohg, J., Bosse-lut, A., Brunskill, E., Brynjolfsson, E., Buch, S., Card, D., Castellon, R., Chatterji, N. S., Chen, A. S., Creel, K. A., Davis, J., Demszky, D., Donahue, C., Doumbouya, M., Durmus, E., Ermon, S., Etchemendy, J., Ethayarajh, K., Fei-Fei, L., Finn, C., Gale, T., Gillespie, L. E., Goel, K., Goodman, N. D., Grossman, S., Guha, N., Hashimoto, T., Henderson, P., Hewitt, J., Ho, D. E., Hong, J., Hsu, K., Huang, J., Icard, T. F., Jain, S., Jurafsky, D., Kalluri, + +P., Karamcheti, S., Keeling, G., Khani, F., Khattab, O., Koh, P. W., Krass, M. S., Krishna, R., Kuditipudi, R., Kumar, A., Ladhak, F., Lee, M., Lee, T., Leskovec, J., Levent, I., Li, X. L., Li, X., Ma, T., Malik, A., Manning, C. D., Mirchandani, S. P., Mitchell, E., Munyikwa, Z., Nair, S., Narayan, A., Narayanan, D., Newman, B., Nie, A., Niebles, J. C., Nilforoshan, H., Nyarko, J. F., Ogut, G., Orr, L., Papadimitriou, I., Park, J. S., Piech, C., Portelance, E., Potts, C., Raghunathan, A., Reich, R., Ren, H., Rong, F., Roohani, Y. H., Ruiz, C., Ryan, J., R'e, C., Sadigh, D., Sagawa, S., Santhanam, K., Shih, A., Srinivasan, K. P., Tamkin, A., Taori, R., Thomas, A. W., Tramer, F., Wang, R. E., Wang, W., Wu, B., Wu, J., Wu, Y., Xie, S. M., Yasunaga, M., You, J., Zaharia, M. A., Zhang, M., Zhang, T., Zhang, X., Zhang, Y., Zheng, L., Zhou, K., and Liang, P. On the opportunities and risks of foundation models. ArXiv, 2021. URL https://crfm.stanford.edu/assets/report.pdf. +Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. Language models are few-shot learners. Advances in neural information processing systems, 33: 1877-1901, 2020. +Chen, S., Ma, K., and Zheng, Y. Med3d: Transfer learning for 3d medical image analysis. arXiv preprint arXiv:1904.00625, 2019. +Dherin, B., Munn, M., Rosca, M., and Barrett, D. Why neural networks find simple solutions: The many regularizers of geometric complexity. Advances in Neural Information Processing Systems, 35:2333-2349, 2022. +Dhillon, G. S., Chaudhari, P., Ravichandran, A., and Soatto, S. A baseline for few-shot image classification. In International Conference on Learning Representations, 2019. +Foret, P., Kleiner, A., Mobahi, H., and Neyshabur, B. Sharpness-aware minimization for efficiently improving generalization. In International Conference on Learning Representations, 2021. +Galanti, T., György, A., and Hutter, M. On the Role of Neural Collapse in Transfer Learning, January 2022. URL http://arxiv.org/abs/2112.15121.arXiv:2112.15121 [cs]. +Goyal, P. Accurate, large minibatch sg d: trainingImagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017. +Gunasekar, S., Lee, J. D., Soudry, D., and Srebro, N. Implicit bias of gradient descent on linear convolutional networks. Advances in neural information processing systems, 31, 2018. + +He, F., Liu, T., and Tao, D. Control batch size and learning rate to generalize well: Theoretical and empirical evidence. Advances in neural information processing systems, 32, 2019. +He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778, 2016. +Hinton, G. E. and van Camp, D. Keeping the neural networks simple by minimizing the description length of the weights. In Proceedings of the Sixth Annual Conference on Computational Learning Theory, COLT '93, pp. 5-13, New York, NY, USA, 1993. Association for Computing Machinery. ISBN 0897916115. doi: 10.1145/168304.168306. URL https://doi.org/10.1145/168304.168306. +Jaquier, N., Welle, M. C., Gams, A., Yao, K., Fichera, B., Billard, A., Ude, A., Asfour, T., and Kragic, D. Transfer learning in robotics: An upcoming breakthrough? a review of promises and challenges. The International Journal of Robotics Research, pp. 02783649241273565, 2023. +Kass, R. E. and Raftery, A. E. Bayes factors. Journal of the American Statistical Association, 90(430):773-795, 1995. doi: 10.1080/01621459.1995.10476572. URL https://www.tandfonline.com/doi/abs/10.1080/01621459.1995.10476572. +Ke, A., Ellsworth, W., Banerjee, O., Ng, A. Y., and Rajpurkar, P. Chextransfer: performance and parameter efficiency of imagenet models for chest x-ray interpretation. In Proceedings of the conference on health, inference, and learning, pp. 116-124, 2021. +Keskar, N. S., Mudigere, D., Nocedal, J., Smelyanskiy, M., and Tang, P. T. P. On large-batch training for deep learning: Generalization gap and sharp minima. In International Conference on Learning Representations, 2017. +Kim, J. and Park, C. End-to-end ego lane estimation based on sequential transfer learning for self-driving cars. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, pp. 30-38, 2017. +Kornblith, S., Shlens, J., and Le, Q. V. Do better imagenet models transfer better? In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 2661-2671, 2019. +Kumar, A., Raghunathan, A., Jones, R. M., Ma, T., and Liang, P. Fine-tuning can distort pretrained features and underperform out-of-distribution. In International Conference on Learning Representations, 2022. + +Lau, E., Furman, Z., Wang, G., Murfet, D., and Wei, S. The local learning coefficient: A singularity-aware complexity measure. In The 28th International Conference on Artificial Intelligence and Statistics, 2025. URL https://openreview.net/forum?id=1av51ZlsuL. +Lee, Y., Chen, A. S., Tajwar, F., Kumar, A., Yao, H., Liang, P., and Finn, C. Surgical fine-tuning improves adaptation to distribution shifts. In The Eleventh International Conference on Learning Representations, 2022. +Li, J., Tang, T., Zhao, W. X., Nie, J.-Y., and Wen, J.-R. Pre-trained language models for text generation: A survey. ACM Computing Surveys, 56(9):1-39, 2024. +Lippl, S. and Lindsey, J. Inductive biases of multi-task learning and finetuning: multiple regimes of feature reuse. Advances in Neural Information Processing Systems, 37: 118745-118776, 2024. +Liu, H., Xie, S. M., Li, Z., and Ma, T. Same pre-training loss, better downstream: Implicit bias matters for language models. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J. (eds.), Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 22188-22214. PMLR, 23-29 Jul 2023a. URL https://proceedings.mlr.org/press/v202/liu23ao.html. +Liu, Y., Zhang, Y., Wang, Y., Hou, F., Yuan, J., Tian, J., Zhang, Y., Shi, Z., Fan, J., and He, Z. A survey of visual transformers. IEEE Transactions on Neural Networks and Learning Systems, 2023b. +MacKay, D. J. C. Information Theory, Inference & Learning Algorithms. Cambridge University Press, USA, 2002. ISBN 0521642981. +Masters, D. and Luschi, C. Revisiting small batch training for deep neural networks. arXiv preprint arXiv:1804.07612, 2018. +Mormont, R., Geurts, P., and Marée, R. Comparison of deep transfer learning strategies for digital pathology. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, pp. 2262-2271, 2018. +Munn, M., Dherin, B., and Gonzalvo, J. The impact of geometric complexity on neural collapse in transfer learning. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=PLbFid00aU. +Neyshabur, B., Tomioka, R., Salakhutdinov, R., and Srebro, N. Geometry of optimization and implicit regularization in deep learning. arXiv preprint arXiv:1705.03071, 2017. + +Papyan, V., Han, X., and Donoho, D. L. Prevalence of neural collapse during the terminal phase of deep learning training. Proceedings of the National Academy of Sciences, 117(40):24652-24663, 2020. +Pearson, K. and Galton, F. Vii. note on regression and inheritance in the case of two parents. Proceedings of the Royal Society of London, 58(347-352): 240-242, 1895. doi: 10.1098/rspl.1895.0041. URL https://royalsocietypublishing.org/doi/abs/10.1098/rspl.1895.0041. +Qiu, X., Sun, T., Xu, Y., Shao, Y., Dai, N., and Huang, X. Pre-trained models for natural language processing: A survey. Science China technological sciences, 63(10): 1872-1897, 2020. +Robert, C. P. et al. The Bayesian choice: from decision-theoretic foundations to computational implementation, volume 2. Springer, 2007. +Sanchez, S., Romero, H., and Morales, A. A review: Comparison of performance metrics of pretrained models for object detection using the tensorflow framework. In IOP conference series: materials science and engineering, volume 844, pp. 012024. IOP Publishing, 2020. +Schwarz, G. Estimating the Dimension of a Model. The Annals of Statistics, 6(2):461-464, March 1978. ISSN 0090-5364, 2168-8966. doi: 10.1214/aos/1176344136. URL https://projecteuclid.org/journals/annals-of-statistics/volume-6/issue-2/ Estimating-the-Dimension-of-a-Model/ 10.1214/aos/1176344136.full. Publisher: Institute of Mathematical Statistics. +Simonyan, K. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations, 2014. +Soudry, D., Hoffer, E., Nacson, M. S., Gunasekar, S., and Srebro, N. The implicit bias of gradient descent on separable data. Journal of Machine Learning Research, 19 (70):1-57, 2018. +Watanabe, S. Algebraic Geometry and Statistical Learning Theory. Cambridge University Press, USA, 2009. +Watanabe, S. A Widely Applicable Bayesian Information Criterion. Journal of Machine Learning Research, 14(Mar):867-897, 2013. ISSN ISSN 1533-7928. URL http://www.jmlr.org/papers/v14/watanabe13a.html. +Wen, K., Ma, T., and Li, Z. How sharpness-aware minimization minimizes sharpness? In The Eleventh International Conference on Learning Representations, 2023. + +# A. Theoretical guarantees on fine-tuning predictive performance + +Here we discuss theoretical guarantees on downstream predictive performance when employing the version of the downstream free energy strategy in equation 9. We would like to give an analysis of downstream predictive performance without being tied to a specific training algorithm e.g., SGD with momentum, ADAM, etc. Towards this end, we consider measuring predictive performance through quantities related to the downstream posterior distribution over neural network weights: + +$$ +p ^ {1} (w; w ^ {*}, \gamma) \propto \exp \{- m \mathrm {K} ^ {1} (w) \} \varphi_ {\gamma} (w - w ^ {*}) \tag {17} +$$ + +This does not mean we are advocating for Bayesian prediction, but rather we believe the posterior distribution above contains highly relevant information that all sensible downstream training algorithms are sensitive to. + +Since fine-tuning entails finding a small perturbation of said $w^{*}$ which performs well on the downstream training dataset $\mathcal{D}^1$ , we might consider an indicator of the downstream training performance to be given by + +$$ +\mathrm {T} _ {m} \left(w ^ {*}\right) := \mathbb {E} _ {w \sim p ^ {1} \left(w; w ^ {*}, \gamma\right)} \hat {\mathrm {K}} ^ {1} (w). \tag {18} +$$ + +Let us call equation 18 the downstream Gibbs training error. Select $\gamma$ such that $w^{*}$ is a local minimum of $\mathrm{K}^0 (w)$ ; i.e., $w^{*}\in U_{0}$ . Then, on average, over the draw of $\mathcal{D}^1$ , the expected downstream Gibbs training error is given by + +$$ +\mathbb {E} _ {\mathcal {D} ^ {1}} \mathrm {T} _ {m} \left(w ^ {*}\right) = \mathrm {K} ^ {1} \left(w ^ {* 1}\right) + \frac {\lambda^ {1} \left(w ^ {*}\right) - \nu^ {1} \left(w ^ {*}\right)}{m} + o \left(\frac {1}{m}\right) \tag {19} +$$ + +where $\nu^{1}(w^{*})$ , like the local learning coefficient $\lambda^1 (w^*)$ , is a positive number called the singular fluctuation that is an invariant of the underlying model-truth-prior triplet. Since $\nu^{1}(w^{*})$ is always positive, the strategy in equation 9 leads us to select a checkpoint that minimizes an upper bound on $\mathbb{E}_{\mathcal{D}^1}\mathrm{T}_m(w^*)$ . + +We can also look at the population counterpart to equation 18 given by + +$$ +\mathrm {G} _ {m} \left(w ^ {*}\right) := \mathbb {E} _ {w \sim p ^ {1} \left(w; w ^ {*}, \gamma\right)} \mathrm {K} ^ {1} (w) \tag {20} +$$ + +Let us call equation 20 the downstream Gibbs test error. The expected value of this, over the draw of $\mathcal{D}^1$ is given by + +$$ +\mathbb {E} _ {\mathcal {D} ^ {1}} \mathrm {G} _ {m} \left(w ^ {*}\right) := \mathrm {K} ^ {1} \left(w ^ {* 1}\right) + \frac {\lambda^ {1} \left(w ^ {*}\right) + \nu^ {1} \left(w ^ {*}\right)}{m} + o \left(\frac {1}{m}\right). \tag {21} +$$ + +It does not appear the strategy in equation 9 gives control over the (expected) downstream Gibbs test error. + +Finally consider the test error resulting from Bayesian model averaging: + +$$ +\mathrm {G} _ {m} ^ {\mathrm {B M A}} \left(w ^ {*}\right) := \mathbb {E} _ {r ^ {1} (x)} D _ {\mathrm {K L}} \left(r ^ {1} (y | x) \mid \mid \mathbb {E} _ {w \sim p ^ {1} \left(w; w ^ {*}, \gamma\right)} p (y | x, w)\right) \tag {22} +$$ + +where the expectation over the posterior has been moved inside the logarithm. Let us call equation 22 the downstream Bayes test error. We have that + +$$ +\mathbb {E} _ {\mathcal {D} ^ {1}} \mathrm {G} _ {m} ^ {\mathrm {B M A}} \left(w ^ {*}\right) := \mathrm {K} ^ {1} \left(w ^ {* 1}\right) + \frac {\lambda^ {1} \left(w ^ {*}\right)}{m} + o \left(\frac {1}{m}\right). \tag {23} +$$ + +It is evident that the strategy in equation 9 leads us to select a checkpoint that minimizes an upper bound on $\mathbb{E}_{\mathcal{D}^1}\mathrm{G}_m^{\mathrm{BMA}}(w^*)$ + +# B. Experiment details + +This section provides details for the experiment results presented in Figure 1 and Figure 2. For these experiments we use the CIFAR-FS dataset (Bertinetto et al., 2019) which has been pre-partitioned into 64 meta-training classes, 14 meta-validation classes and 20 meta-test classes. Each class contains 600 examples. We use the meta-training dataset for pretraining and the meta-test dataset during fine-tuning. We do not use the meta-validation dataset. + +Random seeds To account for stochasticity, we repeat all experiments below with 5 different random seeds. These seeds control the randomness in the pretraining optimization trajectory, the train-test split and the fine-tuning optimization trajectory in full meta-test finetuning (Section B.2 below), and the construction of few-shot tasks in few-shot meta-test finetuning (Section B.2 below). The variability across the random seeds is reflected in Figure 2, although the error bands may not always be visible due to the wide scale of the $y$ -axis in some cases. + +# B.1. Pretraining details + +We pretrain a ResNet-18 (He et al., 2016) on the CIFAR-FS meta-training dataset (Bertinetto et al., 2019) using SGD with cross-entropy loss. We vary SGD hyperparameters such as the learning rate, batch size, and momentum. We use plain SGD optimizer without any regularization nor schedule to avoid masking effects. We used random crop and random flip for data augmentation. Throughout training we report the pretraining train loss on the augmented data (Figure 2 first column) and the pretraining WBIC computed on the augmented data (Figure 2 second column). Note, we use the same SGLD hyperparameters to compute the WBIC across all experiments. That is, we use step size $\epsilon = 2\times 10^{-7}$ , chain length of 3,000 iterations, batch size of 2,048, $\gamma = 1.0$ , and $\beta^{*} = \frac{1}{\log n}$ where $n$ is the size of the pretraining dataset. + +Learning rate. For experiments that vary the learning rate in Figure 2 (top row), for each learning rate value in $\{0.01, 0.05, 0.1, 0.2\}$ we run SGD without momentum with a fixed batch size of 512 for 50,000 iterations. The WBIC estimations were performed every 2,000 iterations with the SGLD hyperparameters above. + +Batch size. For experiments that vary the batch size in Figure 2 (middle row), for each batch size in $\{16,32,64,128,256,512\}$ we run SGD without momentum with a fixed learning rate of 0.05 for 50,000 iterations. The WBIC estimations were performed every 4,000 iterations with the SGLD hyperparameters above. + +Momentum. For experiments that vary the momentum in Figure 2 (bottom row), for each momentum in $\{0.0, 0.2, 0.4, 0.6, 0.8\}$ we run SGD with a fixed learning rate of 0.01 and batch size of 512 for 80,000 iterations. The WBIC estimations were performed every 2,000 iterations with the SGLD hyperparameters above. + +# B.2. Fine-tuning details + +We perform fine-tuning in two scenarios: full CIFAR-FS meta-test finetuning which uses all 20 classes of the meta-test set, and few-shot meta-test finetuning which consists of multiple tasks constructed from the CIFAR-FS meta-test dataset. In both settings we fine-tune a ResNet-18 model initializing the weights of the ResNet backbone with the pre-training weights. The weights of the model head are randomly initialized. + +Full meta-test fine-tuning. When fine-tuning on the full CIFAR-FS meta-test dataset, we use all 20 meta-test classes and all 600 examples in each class. We then create an 80/20 train/test split. We use SGD with $L^2$ regularization rate of 0.01 and with a fixed learning rate of 0.0001 for the model backbone and a fixed learning rate of 0.01 for the model head. We fine-tune for 100 steps using a batch size of 128. + +Few-shot meta-test fine-tuning. For few-shot fine-tuning, we use only part of the CIFAR-FS meta-test dataset by sampling 5-class classification tasks randomly from the 20 classes available in the meta-test dataset. For each of these 5 classes we sample 5 training examples to create a 5-shot dataset for fine-tuning. During fine-tuning, as with full meta-test fine-tuning, we use a fixed learning rate of 0.0001 for the model backbone and a fixed learning rate of 0.01 for the model head. We perform 100 steps of full-batch gradient descent (GD) with $L^2$ regularization rate of 0.001 and then measure the model performance on 100 random test samples from each class. This constitutes a single task. Finally, we report the resulting accuracy rates averaged over 100 randomly chosen tasks. + +# B.3. Correlation Analysis for Table 1 + +To assess the effectiveness of our free energy strategy in comparison to these other pretraining metrics, we computed the Pearson correlation coefficients (Pearson & Galton, 1895) for each of the pretraining metrics $\{\}$ against the downstream $\{\}$ full meta-test fine-tuning transfer accuracy, few-show meta-test fine-tuning transfer accuracy\} using model checkpoints obtained from experiments with CIFAR-FS, trained on ResNet-18 to convergence. + +These experiments, detailed in Section 6, involved a comprehensive exploration of the hyperparameter space. We swept across three hyperparameters (learning rate, batch size, and momentum), with six values for learning rate, six for batch size, and five for momentum. Each configuration was trained with five different random seeds, resulting in a total of 85 model checkpoints. For each checkpoint, we compared the Geometric Complexity, Neural Collapse, and Free Energy of the pretrained model to its downstream performance, measured via both full meta-test fine-tuning and few-shot meta-test fine-tuning. Notably, as indicated by the Pearson correlation coefficients in Table 1, the pretraining Free Energy exhibits a + +substantially stronger correlation with downstream performance than other metrics considered. + +# C. Proof of Proposition 5.1 + +Proof. By definition of the test loss and rearranging terms via change of measure, for all $w$ , + +$$ +\begin{array}{l} \mathrm {K} ^ {1} (w) = \int \log \left(\frac {r ^ {1} (y | x)}{p (y | x , w)}\right) r ^ {1} (x, y) d x d y \\ = \int \log \left(\frac {r ^ {0} (y | x)}{p (y | x , w)} \frac {r ^ {1} (y | x)}{r ^ {0} (y | x)}\right) \frac {r ^ {1} (x , y)}{r ^ {0} (x , y)} r ^ {0} (x, y) d x d y \\ = \int \log \left(\frac {r ^ {0} (y | x)}{p (y | x , w)}\right) \frac {r ^ {1} (x , y)}{r ^ {0} (x , y)} r ^ {0} (x, y) d x d y \\ + \int \log \left(\frac {r ^ {1} (y | x)}{r ^ {0} (y | x)}\right) r ^ {1} (x, y) d x d y \\ \leq M K ^ {0} (w) + D. \\ \end{array} +$$ + +Also, by definition of $w^{*1}$ , we have $\mathrm{K}^1 (w^{*1})\leq \mathrm{K}^1 (w^*)$ . Combining these two facts, we get $\mathrm{K}^1 (w^*)\leq M\mathrm{K}^0 (w^*) + D$ and obtain the conclusion in (11). + +# D. Examples of Proposition 5.1 + +In this section we provide two detailed examples involving Gaussian distributions which help to illustrate Proposition 5.1 in action. + +Example 1 (Covariate shift between pretraining and downstream distributions). Suppose $r^0(y|x) = r^1(y|x) = r(y|x)$ . Our pretraining and fine-tuning joint model is $p^i(x,y|w) = p(y|x,w)r^i(x)$ . Then we have $\lambda^0(w^*) = \lambda^1(w^*)$ and $K^i(w) = \mathbb{E}_{r^i(x)}K(x,w)$ where $K(x,w) = D_{\mathrm{KL}}(r(y|x)||p(y|x,w))$ . Writing + +$$ +\mathbb {E} _ {r ^ {1} (x)} K (x, w) = \int K (x, w) \frac {r ^ {1} (x)}{r ^ {0} (x)} r ^ {0} (x) d x +$$ + +we have that if $M = \max_{x\sim r^0 (x)}\frac{r^1(x)}{r^0(x)} < \infty$ then + +$$ +\mathbb {E} _ {r ^ {1} (x)} K (x, w) \leq M \mathbb {E} _ {r ^ {0} (x)} K (x, w) +$$ + +Putting this together we have $D = 0$ and + +$$ +\mathrm {K} ^ {1} \left(w ^ {* 1}\right) \leq \mathrm {K} ^ {1} \left(w ^ {*}\right) \leq M \mathrm {K} ^ {0} \left(w ^ {*}\right). +$$ + +Suppose the two covariate distributions are Gaussians + +$$ +r ^ {i} (x) \propto \exp \{- \frac {| | x - \mu_ {i} | | _ {2} ^ {2}}{2 \sigma_ {i} ^ {2}} \} +$$ + +then $M$ is finite if $\sigma_0 > \sigma_1$ , in which case $M = \frac{\sigma_0}{\sigma_1}\exp \left\{\frac{(\mu_0 - \mu_1)^2}{2(\sigma_0^2 - \sigma_1^2)}\right\}$ + +Example 2 (Nuisance parameter mismatch between pretrain and downstream distributions). Suppose the pretrain $(i = 0)$ and downstream $(i = 1)$ distributions are given by + +$$ +r ^ {i} (x, y) = r (y | x, w _ {0}, \sigma_ {i} ^ {2}) r (x) +$$ + +where $r(y|x, w_0, \sigma_i^2) = N(f_{w_0}(x), \sigma_i^2)$ with $f_{w}(x)$ representing neural network with weight $w$ . The pretraining and fine-tuning model are given by + +$$ +p ^ {i} (x, y | w) = r (y | x, w, \sigma_ {i} ^ {2}) r (x) +$$ + +Then we have $\lambda^0 (w^*) = \lambda^1 (w^*)$ and $M = \sigma_0 / \sigma_1$ . + +![](images/5c9e42f1a4a3be18854b191a477e86edf07132f75cd79cc68f4bbc32db3a4fe8.jpg) + +![](images/547fcfcd1ce77c6785885b80c979be197029cdb132771587d911cc1951658b66.jpg) + +![](images/c0f57421508543f02ae22f5ffcb09dd8daac542cadc9f9056960ba7e6eb25cd1.jpg) + +![](images/4e8e5bd63bcc53c98e585fa28764877b7ec88099f4d7c577ad563a8947128bf2.jpg) + +![](images/7b1886362691bcd8b89a654b60569244aaa5df639bf452d424f4d929dcfeb66d.jpg) + +![](images/d59626f21818e6a2e4a51ac1cd49c82a0f920a0b847f303955fcdab3e74c44ba.jpg) + +![](images/c3605a2a565101726f8cd983d29e61911a3ef31900d36924e3fa3640febb8ea4.jpg) + +![](images/ee9acc65df9f8538c3938ed2bf72cc2c8b2a7d6775a6caaeda66c0d9095564c1.jpg) + +![](images/5df016ee259ab4fcaedf6732b8bf43ee473623aa5ff63384d1d70356d5cc80cf.jpg) +Figure 3. Model checkpoints with lower pretraining WBIC (second column) consistently result in better transfer accuracy, both when fine-tuning on the full downstream dataset (third column) and in the few-shot setting (fourth column). Lower pretraining WBIC correlates with better downstream performance for Top row: larger learning rates, Middle row: smaller batch sizes, and Bottom row: increased momentum. + +![](images/bf068bf6240ccce5cb5d160e2a2a074e9db241825734ab9779bf5645a5e97db3.jpg) + +![](images/bc2445ef1c3277c3c8ed51391deac5b03212afcf4deeb57219d918280d8978d2.jpg) + +![](images/7d8205c9b65a155e83726b0d60ca60db03948a03e02bb43b21aa7f23e6551cdc.jpg) + +# E. Additional Experiments for mini-Imagenet; see Figure 3 + +# E.1. Pretraining details + +We pretrain a VGG-16 (Simonyan, 2014) on the mini-Imagenet meta-training dataset (Dhillon et al., 2019) using SGD with cross-entropy loss. We vary SGD hyperparameters such as the learning rate, batch size, and momentum. We use plain SGD optimizer without any regularization nor schedule to avoid masking effects. We used random crop and random flip for data augmentation. Throughout training we report the pretraining train loss on the augmented data (Figure 2 first column) and the pretraining WBIC computed on the augmented data (Figure 2 second column). Note, we use the same SGLD hyperparameters to compute the WBIC across all experiments. That is, we use step size $\epsilon = 2 \times 10^{-7}$ , chain length of 1,000 iterations, batch size of 1,024, $\gamma = 1.0$ , and $\beta^{*} = \frac{1}{\log n}$ where $n$ is the size of the pretraining dataset. The results are plotted in Figure 3. + +Learning rate. For experiments that vary the learning rate in Figure 2 (top row), for each learning rate value in $\{0.0025, 0.005, 0.01\}$ we run SGD without momentum with a fixed batch size of 512 for 50,000 iterations. The WBIC estimations were performed every 2,000 iterations with the SGLD hyperparameters above. + +Batch size. For experiments that vary the batch size in Figure 2 (middle row), for each batch size in $\{16,32,64,128,256,512\}$ we run SGD without momentum with a fixed learning rate of 0.01 for 50,000 iterations. The WBIC estimations were performed every 2,000 iterations with the SGLD hyperparameters above. + +Momentum. For experiments that vary the momentum in Figure 2 (bottom row), for each momentum in $\{0.0, 0.1, 0.3, 0.5\}$ we run SGD with a fixed learning rate of 0.005 and batch size of 512 for 50,000 iterations. The WBIC estimations were performed every 2,000 iterations with the SGLD hyperparameters above. + +# E.2. Fine-tuning details + +We perform fine-tuning in two scenarios: full mini-Imagenet meta-test finetuning which uses all 20 classes of the meta-test set, and few-shot meta-test finetuning which consists of multiple tasks constructed from the mini-Imagenet meta-test dataset. In both settings we fine-tune a VGG-16 model initializing the weights of the VGG backbone with the pre-training weights. The weights of the model head are randomly initialized. + +Full meta-test fine-tuning. When fine-tuning on the full mini-Imagenet meta-test dataset, we use all 20 meta-test classes and all 600 examples in each class. We then create an 80/20 train/test split. We use SGD with $L^2$ regularization rate of 0.01 and with a fixed learning rate of 0.0001 for the model backbone and a fixed learning rate of 0.01 for the model head. We fine-tune for 500 steps using a batch size of 32. + +Few-shot meta-test fine-tuning. For few-shot fine-tuning, we use only part of the mini-Imagenet meta-test dataset by sampling 5-class classification tasks randomly from the 20 classes available in the meta-test dataset. For each of these 5 classes we sample 5 training examples to create a 5-shot dataset for fine-tuning. During fine-tuning, as with full meta-test fine-tuning, we use a fixed learning rate of 0.0001 for the model backbone and a fixed learning rate of 0.01 for the model head. We perform 100 steps of full-batch gradient descent (GD) with $L^2$ regularization rate of 0.01 and then measure the model performance on 100 random test samples from each class. This constitutes a single task. Finally, we report the resulting accuracy rates averaged over 100 randomly chosen tasks. \ No newline at end of file diff --git a/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/images.zip b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..64948d8900551c127768d9f8eef977078d38ded8 --- /dev/null +++ b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c774d8b7ec792956865d07e92f0f78f99f51ae4e746598df098b00d2e8516813 +size 536532 diff --git a/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/layout.json b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3802bf18f066658d2261f1e8da0ca17926a708de --- /dev/null +++ b/abayesianmodelselectioncriterionforselectingpretrainingcheckpoints/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6eeadfc9ccc2d115e3ce8e94eb2f93075875602190b97783c11f374172664475 +size 705276 diff --git a/abregmanproximalviewpointonneuraloperators/fb784e84-6b51-4f83-889d-f7fd615be7a0_content_list.json b/abregmanproximalviewpointonneuraloperators/fb784e84-6b51-4f83-889d-f7fd615be7a0_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..25c891f5dce5f59098fb71cfa6f6138872d7a1bb --- /dev/null +++ b/abregmanproximalviewpointonneuraloperators/fb784e84-6b51-4f83-889d-f7fd615be7a0_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e498440682ad6c5aa1481e1964c2afc4ed05395a5fa8cd16aca96fe55ea2411 +size 216876 diff --git a/abregmanproximalviewpointonneuraloperators/fb784e84-6b51-4f83-889d-f7fd615be7a0_model.json b/abregmanproximalviewpointonneuraloperators/fb784e84-6b51-4f83-889d-f7fd615be7a0_model.json new file mode 100644 index 0000000000000000000000000000000000000000..be1e9a23dfc25260de58169e1e76b10b0db1b550 --- /dev/null +++ b/abregmanproximalviewpointonneuraloperators/fb784e84-6b51-4f83-889d-f7fd615be7a0_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:607c1b33ddd6e0a409d2c12614aaaf215103e2d08b75b7fa5b70bbebb2574bc3 +size 250735 diff --git a/abregmanproximalviewpointonneuraloperators/fb784e84-6b51-4f83-889d-f7fd615be7a0_origin.pdf b/abregmanproximalviewpointonneuraloperators/fb784e84-6b51-4f83-889d-f7fd615be7a0_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5832947042a609009dd713253d949be191b48277 --- /dev/null +++ b/abregmanproximalviewpointonneuraloperators/fb784e84-6b51-4f83-889d-f7fd615be7a0_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d612d3541eb6d795ee65f2d65bdb07ca4d805dd4783dc2d10e99837896eea129 +size 1208648 diff --git a/abregmanproximalviewpointonneuraloperators/full.md b/abregmanproximalviewpointonneuraloperators/full.md new file mode 100644 index 0000000000000000000000000000000000000000..25adb829175ee14c5a4ad4560eac3a7cdac3520f --- /dev/null +++ b/abregmanproximalviewpointonneuraloperators/full.md @@ -0,0 +1,1149 @@ +# A Bregman Proximal Viewpoint on Neural Operators + +Abdel-Rahim Mezidi $^{1*}$ Jordan Patracone $^{1*}$ Saverio Salzo $^{2*}$ Amaury Habrard $^{13}$ Massimiliano Pontil $^{45}$ Remi Emonet $^{13}$ Marc Sebban $^{1}$ + +# Abstract + +We present several advances on neural operators by viewing the action of operator layers as the minimizers of Bregman regularized optimization problems over Banach function spaces. The proposed framework allows interpreting the activation operators as Bregman proximity operators from dual to primal space. This novel viewpoint is general enough to recover classical neural operators as well as a new variant, coined Bregman neural operators, which includes the inverse activation operator and features the same expressivity of standard neural operators. Numerical experiments support the added benefits of the Bregman variant of Fourier neural operators for training deeper and more accurate models. + +# 1. Introduction + +Neural operators (Kovachki et al., 2021; 2023), a recent extension of neural networks, have emerged as a versatile framework for learning mappings between function spaces. These operators have shown great potential in solving partial differential equations (PDEs) and simulating complex dynamical systems. The exploration of neural architectures for the approximation and learning of operators has led to the development of a variety of models. + +One influential contribution is the Fourier Neural Operator (FNO) (Li et al., 2021a), sketched in Figure 1, which transforms encoded input data into frequency components in order to learn intricate relationships in the frequency domain. More recently, the Group-Equivariant FNO (G-FNO) (Helwig et al., 2023) additionally leverages symme + +$^{1}$ Equal contribution $^{1}$ Université Jean Monnet Saint-Etienne, CNRS, Institut d'Optique Graduate School, Inria, Laboratoire Hubert Curien UMR 5516, F-42023, SAINT-ETIENNE, France $^{2}$ DIAG, Sapienza University of Rome, 00185 Rome, Italy $^{3}$ Institut Universitaire de France (IUF) $^{4}$ Computational Statistics and Machine Learning, IIT, Genova, Italy $^{5}$ Departement of Computer Science, UCL, London, United Kingdom. Correspondence to: Abdel-Rahim Mezidi . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +tries to design equivariant Fourier layers, thereby enhancing the representation power and robustness of the architecture. To better scale the depth of neural operators, the F-FNO (Tran et al., 2023) proposed separable spectral layers and improved residual connections, along with a bag of training tricks. The FNO are extended to Wavelet Neural Operators (WNO) (Tripura & Chakraborty, 2023) by replacing Fourier layers with wavelet layers to further exploit multiscale information. The U-shaped Neural Operator (U-NO) (Rahman et al., 2023) adapts the U-net architecture for neural operators, enabling mapping between function spaces through integral operators, thus broadening the applicability of neural architectures to diverse domains. Differently, the DeepONet architecture (Lu et al., 2021) comprises two intertwined components: a branch network responsible for encoding discrete input function spaces, and a trunk network dedicated to encoding the domain of output functions. Operating as a conditional model, DeepONet leverages the embedding of inputs and outputs via a dot product operation, facilitating the approximation of complex functions through a structured network topology. Finally, Neural Inverse Operators (NIO) (Molinaro et al., 2023) tackle inverse problems by combining DeepONet and FNO architectures to map operators to functions, thereby extending the applicability of neural operators to coefficient estimation tasks. + +Some approaches inspired by attention mechanisms, pivotal in image and natural language processing, have also been considered in operator learning. LOCA (Learning Operators with Coupled Attention) (Kissas et al., 2022) facilitates robust gradient estimation, particularly in scenarios with limited training data, by combining attention with kernel mechanisms. The General Neural Operator Transformer (GNOT) (Hao et al., 2023) is a scalable framework based self-attention mechanisms allowing to deal with heterogeneous inputs useful for modeling diverse physical systems. Some physics-informed variants integrating information from PDEs during the learning process have been proposed enhancing model interpretability and generalization: PI-DeepONet (Wang et al., 2021) and its Long-Time Integration variant (LTI-PI-DeepONet) (Wang & Perdikaris, 2023), PINO (Physics-Informed Neural Operator) (Li et al., 2021b) a hybrid extension of FNO, or other variations such as V-DeepONet (Goswami et al., 2022) and Modified DeepONet (Wang et al., 2022). + +![](images/fa5bfac5640ff9cc2ffdf6ab43be6315c95e3e249cdb70a66f360aced6cba667.jpg) +Figure 1: Illustration of the $t$ -th layer of Fourier Neural Operators. The upper branch applies a linear transformation $R_{t}$ to the Fourier modes using the Fourier transform $\mathcal{F}$ and its inverse $\mathcal{F}^{-1}$ . The lower branch performs an affine transformation in the latent space. + +Contributions. Unlike previous works (Kovachki et al., 2021), which directly consider the compositional form of neural operators, our approach introduces a distinct perspective by formulating the action of each operator layer as the minimizer of a regularized optimization problem over functions. This optimization connects the current hidden representation to the next, with the choice of a regularization implicitly defining the activation operator through the lens of the Bregman proximity operator. Our framework not only covers existing neural operators but also introduces a novel variant, termed Bregman neural operator, which demonstrates improved predictive performance as its depth increases. Its applicability is grounded by universal approximation results proven for sigmoidal-type activation operators. Beyond its unifying aspect and its ability to design novel neural operators, the proposed framework allows applying the extensive body of literature on proximal numerical optimization, of which Bregman proximity operators belong to, in order to study neural operators. This opens the way to extend the analysis done on neural networks to (Bregman) neural operators in the same spirit of Combettes & Pesquet (2020a;b). + +Outline. The paper is organized as follows: Section 2 is dedicated to the presentation of definitions and background knowledge on neural operators and Bregman proximity operator. In Section 3, we introduce the operator layers as the solution of a functional optimization problem. In addition, we show that this new mapping allows recovering the classical neural operators and creating a more general family of so-called Bregman neural operators. In Section 4, we provide a preliminary universal approximation result for Bregman neural operators. Finally, in Section 5, we conduct an experimental study comparing on benchmark datasets our Bregman variant with the different FNO improvements. The source code of this work is available on: https://github.com/armezidi/bregmano. + +# 2. Background and Definitions + +Here, we introduce some definitions required for the understanding of the rest of the paper as well as the necessary background on neural operators and Bregman proximity operator. We will use basic concepts from convex analysis + +![](images/830c7a122a90a6e7ea10ea49fadd17904fd49fd4b67be576597ebd8a1e4e0591.jpg) +(a) Neural Operator. + +![](images/d32736494792ad60e0a5f93b6fe0d1cc3017c2794dd082c387afa509a6805054.jpg) +(b) Bregman Neural Operator. +Figure 2: Illustration of the $t$ -th layer of (Bregman) Neural Operators. On the left, the identity term and the linear term $K_{t}v_{t} + b_{t}$ have been merged into $(I + K_{t})v_{t} = W_{t}v_{t}$ . For both, $\mathcal{K}_t^{\mathrm{ac}}$ represents any absolutely continuous operator. + +such as subdifferential, $\Gamma_0$ space and Fenchel conjugate, whose definitions are recalled in Appendix A. + +# 2.1. Operator Learning + +Operator learning finds significant applications in the context of PDEs in order to efficiently approximate solutions to PDEs without the need to solve them repeatedly from scratch (Li et al., 2021b; Serrano et al., 2023; Raonic et al., 2023). Given a nonempty bounded open set $D \subset \mathbb{R}^d$ , and some time horizon $\tau > 0$ , we consider the generic family of PDEs over $D \times [0, \tau]$ of the form + +$$ +F _ {a} \left(\left(\partial^ {\alpha} u (x, t)\right) _ {\alpha \in \mathbb {N} ^ {d + 1}, | \alpha | \leq k}\right) = f (x, t) \text {o n} D \times ] 0, \tau ], +$$ + +$$ +\text {a n d} \left\{ \begin{array}{l} u (x, 0) = u _ {0} (x) \text {o n} D, \\ u (x, t) = u _ {b} (x, t) \text {o n} \partial D \times ] 0, \tau ], \end{array} \right. \tag {1} +$$ + +where $F_{a}$ is a (possibly) nonlinear partial differential operator, $f$ a source term, $u_{b}$ a boundary condition, $u_{0}$ an initial condition, and $u\colon D\to \mathbb{R}^n$ the PDE solution. + +The main problem we will tackle in our numerical section is the initial value problem. This involves finding the oracle mapping $\mathcal{G}$ from any initial condition function $u_0$ to the solution $u(\cdot, \bar{\tau})$ of the PDE at a certain time horizon $\bar{\tau} \in ]0, \tau]$ . More generally, the oracle operator $\mathcal{G}$ could be a mapping between two different function spaces $\mathcal{A}$ and $\mathcal{U}$ . Without loss of generality, given some bounded open sets $D \subset \mathbb{R}^d$ , with $d \in \mathbb{N}_+$ , we let $\mathcal{A} = \mathcal{A}(D, \mathbb{R}^n)$ and $\mathcal{U} = \mathcal{U}(D, \mathbb{R}^k)$ , with $n, k \in \mathbb{N}_+$ , be some separable Banach spaces of functions. For instance, $\mathcal{A}$ can represent the spaces of continuous functions from $D \to \mathbb{R}^n$ . Hereafter, $\mathcal{A}$ and $\mathcal{U}$ will be referred to as the spaces of input functions and output functions, respectively. In a nutshell, operator learning consists in finding the unknown ground-truth correspondence operator $\mathcal{G}: \mathcal{A} \to \mathcal{U}$ given $N \in \mathbb{N}_+$ pairs of input-output functions $\{a_i, u_i\}_{i=1}^N$ . + +# 2.2. Neural Operators + +Among the existing models to approximate $\mathcal{G}$ , we focus on neural operators, which are parametric mappings $\mathcal{N} \colon \mathcal{A} \to \mathcal{U}$ of the form + +$$ +(\forall a \in \mathcal {A}), \quad \mathcal {N} (a) = \mathcal {Q} \circ \mathcal {L} _ {T} \circ \dots \circ \mathcal {L} _ {1} \circ \mathcal {P} (a), \tag {2} +$$ + +# where + +- $\mathcal{P} \colon \mathcal{A}(D, \mathbb{R}^n) \to \mathcal{A}(D, \mathbb{R}^{n_0})$ is a local lifting operator mapping the input function to its first hidden representation; +- $\mathcal{Q} \colon \mathcal{U}(D, \mathbb{R}^{n_T}) \to \mathcal{U}(D, \mathbb{R}^k)$ is a local projection operator mapping the last hidden representation to the output function; +- For every $t \in \{1, \dots, T\}$ , $\mathcal{L}_t \colon \mathcal{V}_{t-1}(D_t, \mathbb{R}^{n_{t-1}}) \to \mathcal{V}_t(D_t, \mathbb{R}^{n_t})$ is an operator layer where each $D_t \subset \mathbb{R}^{d_t}$ is an open bounded set, $\mathcal{V}_t = \mathcal{V}_t(D_t, \mathbb{R}^{n_t})$ is a suitable Banach space of functions such that $\mathcal{V}_0 = \mathcal{A}(D, \mathbb{R}^{n_0})$ and $\mathcal{V}_T = \mathcal{U}(D, \mathbb{R}^{n_T})$ , for consistency. +Each component of the neural operator (2) depends on a finite dimensional parameter. Collectively those parameters constitute a vector $\theta \in \Theta \subset \mathbb{R}^p$ . + +Most methodological developments in neural operators have focused on tailoring the operator layers $\mathcal{L}_1, \ldots, \mathcal{L}_T$ to specific application. Traditionally, their design mirrors standard neural networks, replacing finite-dimensional linear layers with integral linear operators in function spaces and interpreting activation functions as Nemytskii operators that apply nonlinear transformations pointwise. When the input spaces $D_t$ are the same throughout the layers and equals $D$ , a popular class of operator layers, sketched in Figure 2a, is of the form + +$$ +\mathcal {L} _ {t} \left(v _ {t}\right) = \sigma \left(W _ {t} v _ {t} + \mathcal {K} _ {t} ^ {\mathrm {a c}} \left(v _ {t}\right) + b _ {t}\right), \tag {3} +$$ + +where $W_{t} \in \mathbb{R}^{n_{t} \times n_{t-1}}$ is a matrix, $b_{t} \in \mathbb{R}^{n_{t}}$ is a bias vector and $\sigma$ is a local nonlinear map acting pointwise from $\mathbb{R}^{n_{t}}$ to $\mathbb{R}^{n_{t}}$ . Moreover, we have a non-local linear operator $\mathcal{K}_{t}^{\mathrm{ac}} \colon L^{2}(D, \mathbb{R}^{n_{t-1}}) \to L^{2}(D, \mathbb{R}^{n_{t}})$ . In its simplest version, $\mathcal{K}_{t}^{\mathrm{ac}}$ is an integral kernel operator of the form $(\mathcal{K}_{t}^{\mathrm{ac}}(v))(x) = \int_{D} k_{t}(x,y)v(y)dy$ , for all $x \in D$ , with $k_{t}$ being a kernel to be specified (Kovachki et al., 2023). Specific examples include those based upon a convolution performed in the Fourier space (Li et al., 2021a; Kovachki et al., 2021), a graph kernel network (Anandkumar et al., 2020) or its multipole variant (Li et al., 2020) to name a few. Hereafter, we follow a different path and propose to interpret operator layers from the viewpoint of a proximal optimization by seeing the parametric form of (3) as the minimizer of a Bregman regularized optimization problem. This novel perspective allows us to propose a novel architecture, displayed in Figure 2b, of the form + +$$ +\mathcal {L} _ {t} \left(v _ {t}\right) = \sigma \left(\sigma^ {- 1} \left(v _ {t}\right) + K _ {t} v _ {t} + \mathcal {K} _ {t} ^ {\mathrm {a c}} \left(v _ {t}\right) + b _ {t}\right), \tag {4} +$$ + +involving an additional nonlinear term $\sigma^{-1}(v_t)$ , and where $K_{t} \in \mathbb{R}^{n_{t} \times n_{t-1}}$ is a matrix. In this formulation, when all the weights are zero, then $\mathcal{L}_{t}$ is the identity operator. In practice, we observe that this property allows training deeper and more accurate models. A similar architecture was originally proposed in Frecon et al. (2022) in the finite dimensional + +setting. Extending this work to neural architectures acting on Banach function spaces requires addressing non-trivial mathematical challenges. These include defining operator layers rigorously, particularly the proper formulation of Legendre functions on function spaces, the associated Bregman divergence, and the Bregman proximity operator. In the next section, we formalize these notions, laying the groundwork for the proposed novel perspective on neural operators. The reader interested in the technical details is invited to refer to Appendix A. + +# 2.3. Bregman Proximity Operator + +At the core of our framework is the link between activation operators and Bregman proximity operators. The definition of the Bregman proximity operator hinges on a Bregman divergence, often referred to as a distance, which is derived from a Legendre function (see, e.g., Rockafellar (1970)). + +Definition 2.1 (Legendre function). A function $\phi \colon \mathbb{R}^n \to [-\infty, +\infty]$ is called Legendre if it is proper convex lower semicontinuous and satisfies the following properties: i) $\operatorname{int}(\operatorname{dom}\phi) = \operatorname{dom}\partial \phi$ and $\partial \phi$ is single-valued on its domain; ii) $\phi$ is strictly convex on $\operatorname{int}(\operatorname{dom}\phi)$ . + +In the finite dimensional setting, Legendre functions $\phi$ are typically built from an elementary Legendre function $\varphi \colon \mathbb{R} \to ] - \infty, +\infty]$ as $\phi \colon x \in \mathbb{R}^n \to \sum_{i=1}^{n} \varphi(x_i)$ . Since here we stand in an infinite dimensional setting, i.e., Lebesgue function space, the counterpart of the previous finite sum structure is a convex integral functional defined below (see Fact 2 in Appendix for a more rigorous treatment). Also, we will allow vector valued functions. + +Fact 1. Let $D \subset \mathbb{R}^d$ be a bounded set and set the dual spaces $\mathcal{V} = L^{p}(D, \mathbb{R}^{n})$ and $\mathcal{V}^{*} = L^{q}(D, \mathbb{R}^{n})$ appropriately paired. Given a Legendre function $\phi$ , then + +$$ +\Phi (v) = \int_ {D} \phi (v (x)) d x \tag {5} +$$ + +defines a convex integral functional, with its subdifferential $\partial \Phi$ consisting of functions $v$ for which $v(x)$ lies within the interior of $\phi$ 's domain and $\nabla \phi \circ v \in \mathcal{V}^*$ . The subdifferential is single-valued, and $\nabla \phi \circ v$ , will be denoted by $\tilde{\nabla} \Phi(v)$ , suggesting it will serve as a kind of gradient of $\Phi$ at $v$ . + +The integral functional $\Phi$ in (5) inherits certain properties of $\phi$ , such as $p$ -uniform convexity — an extension of strong convexity when $p = 2$ . This characteristic, proven in Proposition A.3, is key to the mathematical soundness of our analysis (see also Remarks A.2 and A.4). + +We are now equipped to define Bregman distances in Lebesgue spaces. First introduced by Bregman in (Bregman, 1967), Bregman divergence extends the notion of distance beyond metric spaces, capturing asymmetries and curvature induced by convex functions. Unlike Euclidean distance, it + +reflects the local geometry of the function defining it, making them valuable in optimization and variational analysis. + +Definition 2.2 (Bregman distance in Lebesgue spaces). Under the notations of Fact 1, the Bregman distance with respect to $\Phi$ reads, $(\forall u \in \mathcal{V}, \forall v \in \mathcal{V})$ , + +$$ +D _ {\Phi} (u, v) = \left\{ \begin{array}{l l} \Phi (u) - \Phi (v) - \langle u - v, \tilde {\nabla} \Phi (v) \rangle & \text {i f} v \in \operatorname {d o m} \partial \Phi \\ + \infty & \text {o t h e r w i s e .} \end{array} \right. +$$ + +Finally, we can define the Bregman proximity operator (Nguyen, 2017), which extends the (Euclidean) proximity operator, widely used in optimization. The Euclidean proximity operator itself generalizes projections by replacing the indicator function of a convex set with appropriate convex functions. For additional details, the reader can refer to Bauschke & Combettes (2017). + +Definition 2.3 (Bregman proximity operator). Let $\mathcal{V} = L^{p}(D,\mathbb{R}^{n})$ with $p\in [1, + \infty [$ . Let $g\in \Gamma_0(\mathcal{V})$ and let $\Phi \in \Gamma_0(\mathcal{V})$ be defined as in Fact 1, with $\phi \in \Gamma_0(\mathbb{R}^n)$ be Legendre and such that $\mathrm{ran}\partial (\Phi +g) = \mathcal{V}^*$ . Then the Bregman proximity operator of $g$ relative to $\Phi$ is defined as + +$$ +\operatorname {p r o x} _ {g} ^ {\Phi}: \mathcal {V} ^ {*} \to \mathcal {V}, v ^ {*} \mapsto \operatorname {a r g m i n} \left\{\langle \cdot , - v ^ {*} \rangle + \Phi + g \right\}. +$$ + +Note that $\mathrm{prox}_g^\Phi$ is well-defined since $\Phi + g$ is strictly convex, lower semicontinuous and $\operatorname{ran} \partial (\Phi + g) = \mathcal{V}^*$ , and it holds $\mathrm{prox}_g^\Phi = [\partial (\Phi + g)]^{-1}$ . + +# 3. Revisiting Neural Operators + +In Section 3.1, we propose a novel Bregman proximal viewpoint on operator layers. Then, we establish several connections. First, we show in Section 3.2 that the proposed framework is general enough to recover most classical operator layers when the Legendre function $\phi$ is the Euclidean distance. Second, we show in Section 3.3 how it yields a new variant of neural operators when $\phi$ defines a general Bregman divergence. Finally, we apply our framework to Fourier neural operators in Section 3.4. + +# 3.1. Bregman Proximal Viewpoint on Operator Layers + +Departing from usual kernel-based points of view (Kovachki et al., 2021), we suggest defining operator layers as the solution of functional optimization problems. For every $t = 1,\dots ,T,\mathcal{L}_t\colon \mathcal{V}_{t - 1}\to \mathcal{V}_t$ + +$$ +\begin{array}{l} \mathcal{L}_{t}(v) = \operatorname *{argmin}_{w\in \mathcal{V}_{t}} - \langle w,\mathcal{K}_{t}(v) + b_{t}\rangle +g_{t}(w) + D_{\Phi_{t}}(w,\mathcal{M}_{t}v) \\ = \operatorname {p r o x} _ {g _ {t}} ^ {\Phi_ {t}} \left(\tilde {\nabla} \Phi_ {t} \left(\mathcal {M} _ {t} v\right) + \mathcal {K} _ {t} (v) + b _ {t}\right), \tag {6} \\ \end{array} +$$ + +where + +- $\Phi_t: \mathcal{V}_t \to ]-\infty, +\infty]$ is a convex integral functional on an appropriate Lebesgue space based on some Legendre + +function $\phi_t \in \Gamma_0(\mathbb{R}^{n_t})$ , as defined in Fact 1. $D_{\Phi_t} \colon \mathcal{V}_t \times \mathcal{V}_t \to [0, +\infty]$ is the corresponding Bregman distance as detailed in Definition 2.2 + +- $\mathcal{M}_t\colon \mathcal{V}_{t - 1}\to \mathcal{V}_t$ is a bounded linear operator which maps $\mathrm{dom}\partial \Phi_{t - 1}$ into $\mathrm{dom}\partial \Phi_t$ +- $b_{t} \in \mathcal{V}_{t}^{*}$ and $\mathcal{K}_{t} \colon \mathcal{V}_{t - 1} \to \mathcal{V}_{t}^{*}$ is a bounded linear operator of the form + +$$ +\mathcal {K} _ {t} (v) (x) = \int_ {D _ {t - 1}} \kappa_ {t} (x, d y) v (y), +$$ + +with $\kappa_{t}\colon D_{t}\times \mathfrak{B}(D_{t - 1})\to \mathbb{R}^{n_{t}\times n_{t - 1}}$ a (transition) kernel from $D_{t - 1}$ to $D_{t}$ , meaning a function which is measurable with respect to the first variable and a finite measure with respect to the second variable. + +- $g_{t} \in \Gamma_{0}(\mathcal{V}_{t})$ and $\mathrm{ran}(\partial \Phi_t + \partial g_t) = \mathcal{V}_t^*$ . + +Equation (6) is highly general, featuring an outer operation (the $\mathrm{prox}_{g_t}^{\Phi_t}$ ) and an inner operation (the $\tilde{\nabla}\Phi_t$ ), and can formally represent various layer architectures sketched in Figure 3. A key step in establishing this connection involves relating the proximity operator to activation operators. There are multiple ways to achieve this by varying the choice of the pair $(\Phi_t,g_t)$ . In the following sections, we explore two specific choices for this pair, demonstrating how (6) recovers classical neural operators (3) (where $\tilde{\nabla}\Phi_t$ is the identity) and introduces a novel architecture (4), in which $\tilde{\nabla}\Phi_t$ acts as the inverse activation operator. + +Remark 3.1 (Form of linear operator $\kappa_{t}$ ). Often in applications, the kernel of the linear operator $\kappa_{t}$ is split into two terms: an absolutely continuous part and a single pure point part, i.e., $\kappa_{t} = \kappa_{t}^{ac} + \kappa_{t}^{p}$ , where, for every $x\in D_t$ , and measurable set $A\subset D_{t - 1}$ + +$$ +\kappa_ {t} ^ {\mathrm {a c}} (x, A) = \int_ {A} k _ {t} (x, y) d y \quad \text {a n d} \quad \kappa_ {t} ^ {p} (A) = K _ {t} \delta_ {\varphi_ {t} (x)} (A) +$$ + +with $k_{t}\colon D_{t}\times D_{t - 1}\to \mathbb{R}^{n_{t}\times n_{t - 1}}$ $K_{t}\in \mathbb{R}^{n_{t}\times n_{t - 1}}$ $\varphi_t\colon D_t\to D_{t - 1}$ measurable, and $\delta_{\varphi_t(x)}$ the delta Dirac at $\varphi_t(x)\in D_{t - 1}$ . Thus, we have + +$$ +\begin{array}{l} \mathcal {K} _ {t} (v) (x) = \mathcal {K} _ {t} ^ {\mathrm {a c}} (v) (x) + \mathcal {K} _ {t} ^ {\mathrm {p}} (v) (x) \\ = \int_ {D _ {t - 1}} k _ {t} (x, y) v (y) d y + K _ {t} v \left(\varphi_ {t} (x)\right). \\ \end{array} +$$ + +Remark 3.2 (Special case of identical domains). The linear operator $\mathcal{M}_t$ should be chosen so that it maps $\mathrm{dom}\partial \Phi_{t - 1}$ to $\mathrm{dom}\partial \Phi_t$ . However, in (6), if the function $\phi_t$ does not depend on $t$ and all the domains $D_{t}$ are the same, then it is also true that the convex integral functional $\Phi_t$ does not depend on $t$ either. Then, we have $\mathrm{dom}\partial \Phi_{t - 1} = \mathrm{dom}\partial \Phi_t$ and for the linear operator $\mathcal{M}_t$ we are allowed to choose the identity operator. + +Remark 3.3 (Link with convex optimization). When $\mathcal{V}_{t-1} = \mathcal{V}_t$ and $\mathcal{M}_t$ is the identity, the operator layer (6) reads + +$$ +\operatorname {p r o x} _ {g _ {t}} ^ {\Phi_ {t}} (\tilde {\nabla} \Phi_ {t} (v) - \mathcal {B} _ {t} v) = (\partial \Phi_ {t} + \partial g _ {t}) ^ {- 1} (\tilde {\nabla} \Phi_ {t} - \mathcal {B} _ {t}) (v), +$$ + +![](images/aa8c3c85a02f989cddb8edc8298910c60f5a7d07db5e4fc8014a47be73ba599d.jpg) +Figure 3: Illustration of the Bregman proximal viewpoint on operator layers. The action of each operator layer is viewed as the minimizer of the regularized optimization problem where each term in the objective can be linked to a part of the architecture, as evidenced by the color code. + +$$ +v _ {t + 1} = \mathcal {L} _ {t} (v _ {t}) = \operatorname * {a r g m i n} _ {w \in \mathcal {V} _ {t}} \Big \{- \langle w, \underbrace {\mathcal {K} _ {t} ^ {\mathrm {a c}} (v _ {t}) + K _ {t} v _ {t}} _ {= \mathcal {K} _ {t} (v _ {t})} + b _ {t} \rangle + g _ {t} (w) + D _ {\Phi_ {t}} (w, \mathcal {M} _ {t} v _ {t}) \Big \} +$$ + +where $\mathcal{B}_t\colon \mathcal{V}_t\to \mathcal{V}_t^*$ . This is a Bregman forward-backward operator, which is well-known in the context of operator splitting methods in optimization (Nguyen, 2017; Bui & Combettes, 2021). + +Concluding this section, we stress that as long as the couple $(\Phi_t,g_t)$ admits a closed form Bregman proximity operator, this would define additional new types of operator layers. In Nguyen (2017), the author shows a number of examples (at the end of Section 2, from Example 2.9 to Example 2.12) of such couples that yield an explicit Bregman proximity operator. Actually, one may consider layers of type + +$$ +v \mapsto \sigma_ {2} \left(\sigma_ {1} ^ {- 1} (v) + \mathcal {K} _ {t} (v) + b _ {t}\right), +$$ + +with $\sigma_{1}$ being strictly monotone and $\sigma_{2}$ monotone, serving as activation operators appropriately coupled. Classical and Bregman neural operators emerge as special cases, where i) $\sigma_{1} = \mathrm{Id}$ and $\sigma_{2}$ is any monotone function, for the former, and ii) $\sigma_{1} = \sigma_{2}$ is strictly monotone, for the latter. Note that having $\sigma_{1} = \sigma_{2}$ implies that the numerical implementation does not require to have an explicit form of $\sigma_{1}^{-1}$ , as later discussed in Remark 3.7. + +# 3.2. Classical Neural Operators + +Our first result, stated in the proposition below, unifies a broad class of classical neural operator layers through the prism of the optimization viewpoint of (6) when $D_{\Phi_t}$ is the Euclidean distance. + +Proposition 3.4 (Unifying classical neural operators). Let $\mathcal{V}_t = L^2(D_t, \mathbb{R}^{n_t})$ be some Hilbert function space and $\Psi_t(v) = \int_{D_t} \sum_{i=1}^{n_t} \psi(v_i(x)) dx$ , where $\psi \in \Gamma_0(\mathbb{R})$ is a strongly convex Legendre function. Consider the Euclidean distance defined from the elementary Legendre function $\phi_t = (1/2)|\cdot|^2 \in \Gamma_0(\mathbb{R}^{n_t})$ (see Section 2.3) and set $g_t = \Psi_t - (1/2)\| \cdot \|^2$ . Then $g_t \in \Gamma_0(\mathcal{V}_t)$ and $\mathcal{L}_t$ defined in (6) acts between $L^2$ spaces as follows + +$$ +\begin{array}{l} \mathcal {L} _ {t} (v) = \operatorname {p r o x} _ {\Psi_ {t} - \frac {1}{2} \| \cdot \| ^ {2}} ^ {\frac {1}{2} \| \cdot \| ^ {2}} \left(\mathcal {M} _ {t} v + \mathcal {K} _ {t} (v) + b _ {t}\right) \tag {7} \\ = \nabla \Psi_ {t} ^ {*} (\mathcal {M} _ {t} v + \mathcal {K} _ {t} (v) + b _ {t}), \\ \end{array} +$$ + +Table 1: Legendre function $\psi$ and its related activation ${\psi }^{*\prime }$ . + +
domψψ(t)ψ'(t)ψ'*'(t)
[-1,1]-√1-t2t/√1-t2ISRU
[0,1]t log t + (1 - t) log(1 - t)log t/1-tSigmoid
[-1,1]log(1 - t2) + t arctanh(t)arctanhtanh
[-1,1]√1 - t2 + t arcsin(t)arcsinsin
R>01/β2Li2(e-βt) + t2/2log(eβt-1)/βSoftPlusβ
+ +where $\nabla \Psi_t^* = (\psi^*)'(\cdot)$ matches a variety of monotone activation operators $\sigma$ . In addition, when the domains are all the same, say $D_{t} = D$ , $\mathcal{M}_t = I$ , and the linear operator $\mathcal{K}_t = \mathcal{K}_t^{\mathrm{ac}} + \mathcal{K}_t^{\mathrm{p}}$ is as given in Remark 3.1, then $\mathcal{L}_t(v) = \nabla \Psi_t^* ((I + K_t)v + \mathcal{K}_t^{\mathrm{ac}}(v) + b_t)$ , where $(I + K_{t})$ can be written as $W_{t}$ . A schematic representation is reported in Figure 2a. + +In essence, Proposition 3.4 shows that the parametric structure of operator layers can be interpreted via the Bregman proximal operator, when the Bregman distance reduces to the Euclidean distance. The crucial aspect in establishing this connection is the observation that the Euclidean proximity operator of $g_{t} = \Psi - (1/2) \| \cdot \|^{2}$ simplifies to $\nabla \Psi^{*} = (\psi^{*})'(\cdot)$ , aligning with a broad spectrum of activation operators given an appropriate selection of $\psi$ . We report in Table 1 the corresponding $\psi$ to retrieve several well-known activation operators. A proof concerning the characterization of the SoftPlus is included in the appendix. To the best of our knowledge, $\nabla \Psi_{t}^{*}$ can only match monotonic activation operators, which notably discards GeLu and swish. To be more precise, Proposition 3.4 is general enough to deal with the broad class of activation functions that can be viewed as a proximity operator, which essentially boils down to any increasing 1-Lipschitzian function (see Proposition 2.3 in Combettes & Pesquet (2020a)). While this connection has been previously noted in the neural network literature (Combettes & Pesquet, 2020a; Frecon et al., 2022), our work extends this analysis to function spaces. + +# 3.3. Bregman Neural Operators + +We now provide the counterpart of Proposition 3.4 for general Bregman distance. + +Proposition 3.5 (Designing Bregman neural operators). Let $\mathcal{V}_t = L^p(D_t, \mathbb{R}^{n_t})$ be some Lebesgue function space and $\Psi_t(v) = \int_{D_t} \sum_{i=1}^{n_t} \psi(v_i(x)) dx$ , where $\psi \in \Gamma_0(\mathbb{R})$ is a $p$ -uniformly convex Legendre function ( $\neq |\cdot|^2/2$ ). Consider the Bregman distance in function space defined from the elementary Legendre function $\phi_t(w) = \sum_{i=1}^{n_t} \psi(w_i)$ (see Section 2.3) and set $g_t = 0$ . Then $\mathcal{L}_p$ defined in (6) acts between $L^p$ spaces as follows + +$$ +\begin{array}{l} \mathcal {L} _ {t} (v) = \operatorname {p r o x} _ {0} ^ {\Psi_ {t}} \left(\tilde {\nabla} \Psi_ {t} (\mathcal {M} _ {t} v) + \mathcal {K} _ {t} (v) + b _ {t}\right) \tag {8} \\ = \nabla \Psi_ {t} ^ {*} (\tilde {\nabla} \Psi_ {t} (\mathcal {M} _ {t} v) + \mathcal {K} _ {t} (v) + b _ {t}), \\ \end{array} +$$ + +where $\nabla \Psi_t^* = (\psi^*)'(\cdot)$ matches a variety of monotone activation operators $\sigma$ . In addition, when the domains are all the same, say $D_t = D$ and the linear operator $\mathcal{K}_t$ is of the form given in Remark 3.1, then we can take $\mathcal{M}_t = I$ and + +$$ +\mathcal {L} _ {t} (v) = \nabla \Psi_ {t} ^ {*} (\tilde {\nabla} \Psi_ {t} (v) + K _ {t} v + \mathcal {K} _ {t} ^ {\mathrm {a c}} (v) + b _ {t}). \quad (9) +$$ + +Concerning the operators $\nabla \Psi_t^* = (\psi^*)'\left(\cdot\right)$ and $\nabla \Psi_t^* = \psi'(\cdot)$ , we stress that any of the $\psi$ listed in Table 1 are appropriate choices. Since $(\psi^{*})^{\prime}(\cdot)$ and $\psi^{\prime}(\cdot)$ are inverse of each other, the layer of (9) boils down to + +$$ +\mathcal {L} _ {t} (v) = \sigma \left(\sigma^ {- 1} \left(v _ {t}\right) + K _ {t} v + \mathcal {K} _ {t} ^ {\mathrm {a c}} (v) + b _ {t}\right), \tag {10} +$$ + +where any invertible and monotone activation operator is allowed. Its schematic representation is reported in Figure 2b. This novel variant, called Bregman Neural Operator simply differs from classical neural operators by the additional term involving the inverse activation operator. Finally, we note that the form of (9) corresponds to a mirror descent step (Nemirovskij & Yudin, 1983; Beck & Teboulle, 2003) with mirror map $\overline{\nabla}\Psi_t$ . + +Remark 3.6. When $K_{t}$ , $\mathcal{K}_{t}^{\mathrm{ac}}$ and $b_{t}$ are zeros and $\mathcal{M}_t$ is the identity, then $\mathcal{L}_t$ reduces to the identity. + +Remark 3.7. Concerning (10), we should ensure to feed the first layer with functions in $\operatorname{dom} \mathcal{L}_1$ as discussed in Remark A.5. This condition is for instance satisfied if $(\mathcal{P}v)(v) = \nabla \psi_1^*(Pv(x)) = \sigma(Pv(x))$ . Note that in such a situation, the inverse activation function does not need to have an explicit form. Indeed, when composing the different layers in (10), the inner inverse activation function will be cancelled out by the outer one. + +# 3.4. Case of Fourier Neural Operators + +We study the implications of the proposed viewpoint in the peculiar case of Hilbert function spaces with equal input + +and output spaces, i.e., $\mathcal{V}_t = \mathcal{V}_t^* = L^2(D, \mathbb{R}^n)$ for every $t \in \{1, \ldots, T\}$ . + +A popularly encountered scenario in practice is that where $D = \mathbb{T}^d$ is the unit torus and the kernel associated to the absolutely continuous part of $\mathcal{K}_t$ is translation invariant, i.e., $k_{t}(x,y) = k_{t}(x - y)$ , thus indicating a convolution structure. Fourier operator layers (Li et al., 2021a) are then devised by leveraging the convolution theorem, stating that the action of $\mathcal{K}_t^{\mathrm{ac}}$ can be written as a linear operator in the Fourier domain: + +$$ +\mathcal {K} _ {t} ^ {\mathrm {a c}} (v) (x) = \int_ {D} k _ {t} (x - y) v (y) d y = \mathcal {F} ^ {- 1} \left(R _ {t} \cdot \mathcal {F} (v)\right) (x), +$$ + +with $\mathcal{F}\colon L^2 (\mathbb{T}^d,\mathbb{R}^n)\to \ell^2 (\mathbb{Z}^d,\mathbb{R}^n)$ being the Fourier transform, $\mathcal{F}^{-1}$ its inverse, and $R_{t}\in \ell^{2}(\mathbb{Z}^{2},\mathbb{R}^{n\times n})$ . Often, $R_{t}$ does not range in the entire $\ell^2 (\mathbb{Z}^2,\mathbb{R}^{n\times n})$ space but is parametrized by a finite parameter (Kovachki et al., 2023). It follows that the Bregman variant of Fourier operator layer reads $\mathcal{L}_t(v) = \sigma (\sigma^{-1}(v) + W_tv + \mathcal{F}^{-1}(R_t\cdot \mathcal{F}(v)) + b_t)$ The classical Fourier neural operator layer is retrieved by omitting the $\sigma^{-1}(v)$ term. + +In this section, we addressed FNOs because they are widely used and simplify the analysis. In this respect, we note that we just specified the action of $\mathcal{K}_t^{\mathrm{ac}}$ by expressing it via direct and inverse Fourier series. So, in the end, it is only about finding efficient parametrizations, in some $\ell^p$ space, of linear integral operators between Lebesgue spaces. This has been achieved by using the Fourier transform, but in principle other transformations could be considered, provided we have an unconditional basis of the Lebesgue space of functions and an efficient way to compute the coefficients. For instance, the wavelet transform can be incorporated in Proposition 1 and Proposition 2 to retrieve WNOs (Tripura & Chakraborty, 2023) and their novel Bregman variant, respectively. In a nutshell, our framework is transparent to the parametrization of $\mathcal{K}_t^{\mathrm{ac}}$ . + +# 4. Expressivity of Bregman neural operators + +In this section, we give a preliminary positive result concerning the universal approximation properties of Bregman neural operators. + +In the following, the activation function $\sigma \colon \mathbb{R} \to I$ is required to be a homeomorphism between $\mathbb{R}$ and an open interval $I$ of $\mathbb{R}$ and of sigmoidal type, meaning that $\lim_{t \to -\infty} \sigma(t) = 0$ and $\lim_{t \to +\infty} \sigma(t) = 1$ . Moreover, we assume that $\mathcal{A}$ and $\mathcal{U}$ are as follows + +$$ +\mathcal {A} (D, \mathbb {R} ^ {n}) = \left\{ \begin{array}{l} \mathcal {C} (\overline {{D}}, \mathbb {R} ^ {n}) \\ L ^ {p} (D, \mathbb {R} ^ {n}) \\ W ^ {m, p} (D, \mathbb {R} ^ {n}) \end{array} , \mathcal {U} (D, \mathbb {R} ^ {k}) = \left\{ \begin{array}{l} \mathcal {C} (\overline {{D}}, \mathbb {R} ^ {k}) \\ L ^ {p} (D, \mathbb {R} ^ {k}) \end{array} , \right. \right. +$$ + +where $\mathcal{C}$ is the space of continuous functions and $W^{m,p}$ is the $L^p$ -type Sobolev space with $m \in \mathbb{N}_+$ derivatives for + +![](images/3e9b0d472d5948512a06f6abe7ba05bf390961f0412a145f649d6ffbb35a489f.jpg) +Figure 4: $\ell^2$ relative errors across different number of layers for 2D Navier Stokes ( $\nu = 10^{-4}$ ). + +$p \in [1, +\infty[$ . Here, $\overline{D}$ denotes the closure of $D$ , and must be considered in PDE applications to evaluate functions on the domain's boundary. + +Theorem 4.1. Let $\sigma, \mathcal{A}$ and $\mathcal{U}$ be set as above. Let $\mathcal{G} \colon \mathcal{A} \to \mathcal{U}$ be a continuous operator. Then for any compact set $K \subset \mathcal{A}$ and $\varepsilon > 0$ there exists a Bregman neural operator $\mathcal{N}_{\theta} \colon \mathcal{A} \to \mathcal{U}$ of the type (2) such that each component depends on a finite dimensional Bregman neural network and + +$$ +\sup _ {u \in K} \| \mathcal {G} (u) - \mathcal {N} _ {\theta} (u) \| _ {\mathcal {U}} \leq \varepsilon . +$$ + +Here $\theta \in \mathbb{R}^p$ collects all the (finite number of) parameters of the finite dimensional Bregman neural networks defining the components in (2). + +Proof. The proof is reported in Appendix B and partly relies on also proving this same result for Bregman neural networks in finite dimensional spaces. $\square$ + +# 5. Numerical Experiments + +The primary objective of our numerical experiments is to evaluate and assess the added benefits of the Bregman variant of the simplest neural operator, namely Fourier Neural Operator (FNO), and its improvements, as they often serve as the building blocks for more sophisticated models. + +# 5.1. Experimental Setting + +Datasets. We have selected a range of benchmark datasets resulting from the resolution of PDEs used both in the original FNO paper (Li et al., 2021a) and in the PDEBench suite (Takamoto et al., 2022), which is the top leading repository providing datasets commonly studied in physics-based machine learning. They represent various dynamics and complexities pertinent to physical modeling tasks. Hereafter, we consider initial value problems where the goal is to learn the mapping between the initial condition $a_{i}$ and the solution at some future time $u_{i}$ from $n = 10^{4}$ pairs + +![](images/e62edf3cd27cc6295029823740ae03e5ffe6811a4bfddd17db3daf98966c8f51.jpg) +Figure 5: Models' weight density distribution. + +$\{a_i, u_i\}_{i=1}^n$ . The only exception is the 2D Darcy problem (marked with * in latter results), where the goal is to predict the steady-state solution from the viscosity function over the domain. A description of the experimental settings and the learning procedure is provided in Appendix C. + +Models. We consider four models: the standard FNO (Li et al., 2021a), our Bregman variant (BFNO) described in Section 3.4, the Factorized FNO (F-FNO) (Tran et al., 2023), and a ResNet-inspired variant (ResFNO) that isolates the impact of residual connections by adopting the update $v \mapsto v + \sigma(\mathcal{K}_t(v) + b_t)$ , which should not be confused with Chen et al. (2021). Details can be found in Appendix C.6. Additional models such as WNO (Tripura & Chakraborty, 2023) and its Bregman variant are studied in the appendix. The lifting and projection layers, namely $\mathcal{P}$ and $\mathcal{Q}$ in (2), are convolutional layers with kernel size 1 and width 128. Note that, for BFNO, we add an activation operator after $\mathcal{P}$ to ensure that the conditions of Remark 3.7 are met. Following the code of Li et al. (2021a), we use the ReLU activation for FNO while, for BFNO, we resort to an invertible approximation: SoftPlus with parameter $\beta = 10^3$ to make it almost indistinguishable from ReLU. Hereafter, we consider models made of $T \in \{4, 8, 16, 32, 64\}$ Fourier layers with a width 64 (resp. 32) and 16 (resp. 12) maximum number of Fourier modes for 1D (resp. 2D) problems. Note that two ablation studies in Appendices D.4 and D.5 reveal marginal improvements from adding batch normalization layers or replacing SoftPlus with ReLU. + +# 5.2. Results and Analysis + +Impact of the number of layers $T$ . We investigate how increasing the number of operator layers $T$ affects performance using the 2D Navier-Stokes dataset with viscosity $\nu = 10^{-4}$ , chosen for its complexity, that typically favor deeper models to capture fine-grained structures and long-range dependencies. Results in Figure 4 show that BFNO systematically achieves lower prediction error regardless of $T$ . In contrast, FNO (resp. ResFNO) degrades from $T = 8$ (resp. $T = 16$ ) onward, while F-FNO (resp. BFNO) im + +![](images/155baf26a8963c8e0b35fdd890cd9d054340bb69155655688cc0972342473da4.jpg) +Figure 6: Comparison of $\ell^2$ test relative errors across different models, with cross-validated number of layers in $\{4,8,16,32\}$ and learning rates, on PDE benchmarks. + +proves with depth until plateauing at $T = 16$ (resp. $T = 64$ ). The earlier saturation of F-FNO suggests that while residual connections help with depth, BFNO scales more effectively. Similar conclusions hold for other datasets and our Bregman variant of WNO, as illustrated in Appendix D.2. Nevertheless for simpler tasks, when smaller models are sufficient, the benefits of depth become less pronounced as expected. We believe that the added term in BFNO stabilizes learning by allowing its layers to reduce to identity when all weights are zero (see Remark 3.6). However, the same argument could be used for residual architectures (ResFNO and F-FNO). To gain further insights, we next examine the weight distributions. + +Comparison of weight density distribution. Figure 5 illustrates the learned weight distributions of the operator layers for the best-performing models considered above. ResFNO, F-FNO, and FNO exhibit Gaussian-like distributions, with F-FNO showing an additional peak at 0. In contrast, BFNO has a sharply peaked distribution around 0, resembling a Laplace distribution. While BFNO, ResFNO, and F-FNO layers reduce to the identity when all weights are zero, only BFNO exhibits a distinct clustering of weights around zero. This suggests implicit regularization, enhancing generalization and stability by preventing large deviations from the identity mapping. Additionally, the weight distribution in BFNO alleviates issues such as vanishing or exploding gradients, which are common in deeper architectures. + +Extensive comparison on multiple datasets. We now evaluate the models on diverse datasets of varying complexity. For each dataset, splitting realization, and model, we cross-validate the optimal number of layers $T \in \{4,8,16,32\}$ and report the average test error over multiple realizations in Figure 6. Results show that BFNO consistently achieves superior or comparable performance, with notable gains on moderately to highly complex datasets such as 1D Burgers and 2D Navier-Stokes ( $\nu = 10^{-4}$ ). The only exception is that of 2D Darcy, where the task differs: instead of learn + +ing a solution map from initial conditions, the goal is to map the spatial viscosity function to the steady-state solution. In this case, it seems that the additional MLP layers added at the end of the operator layers of F-FNO help to better capture the complex dependencies of the viscosity-to-solution mapping. To complement the analysis, following Takamoto et al. (2022), we include a comparison between BFNO and FNO over several metrics measuring the relative errors in low, mid and high frequency bands in Appendix D.3. BFNO consistently outperforms FNO in the low and mid-frequency bands, indicating improved reconstruction of dominant modes. However, its performance in the high-frequency range varies: for simpler datasets, BFNO achieves substantial error reductions, whereas for more complex cases, the improvements are marginal. Prediction examples are reported in Appendix D.1. + +Additional insights. We highlight that BFNO can also be viewed from the ODE point of view through a change of variables. More precisely, let us consider updates of the form $v_{t+1} = \sigma(\sigma^{-1}(v_t) + \mathcal{K}_t v_t)$ . Then, for $z_t = \sigma^{-1}(v_t)$ , it follows that $z_{t+1} = z_t + \mathcal{K}_t \sigma(z_t)$ which can be seen as a discretization of $\frac{\mathrm{d}z(t)}{\mathrm{d}t} = \mathcal{K}(t) \sigma(z(t))$ . In contrast, a residual-based architecture of the form $v_{t+1} = v_t + \sigma(\mathcal{K}_t v_t)$ , such as ResFNO and, to some extent also F-FNO, would lead to the following ODE $\frac{\mathrm{d}v(t)}{\mathrm{d}t} = \sigma(\mathcal{K}(t) v(t))$ on $v$ itself. The fact that, in BFNO, the linear operator is placed outside the activation function can be seen as a different way of mitigating vanishing gradients compared to residual architectures like ResFNO and F-FNO. + +# 6. Conclusion + +In summary, our contributions are twofold: we have provided a new theoretical framework that broadens the understanding of neural operators through the lens of a Bregman regularized optimization problem, and we have introduced Bregman neural operators that achieve enhanced performance as their depth increases. As part of our theoretical advancements, we have also established universal approximation results for Bregman neural architectures with sigmoidal-type activation functions. However, it must be acknowledged that a gap exists between this result and common practices, which predominantly rely on ReLU-like activations, as in our work, opening the door to new theoretical developments. Beyond the unifying aspect of our framework and its ability to design novel neural architectures, our setting also paves the way to use the rich body of literature on monotone operators to study neural operators. In the context of neural networks, an example of fruitful application of the latter is given in Combettes & Pesquet (2020a) where the authors provide interesting asymptotic properties on the networks (as the number of layers tends to infinity). One can also consider the work in Combettes & Pesquet (2020b) + +where the authors yield quantitative insights into the stability properties of neural networks. As for our setting, we can guess that such results might be extended to Bregman neural networks/operators by leveraging the notion of so called D-firm operators studied in Bauschke et al. (2003), meaning operators that are firmly nonexpansive with respect to a Bregman divergence. + +# Acknowledgments + +This research conducted within the context of the Inria-DYNAMO Associate Team. + +This work has been funded by a public grant from the French National Research Agency (ANR) under the "France 2030" investment plan, which has the reference EUR MANUTECH SLEIGHT - ANR-17-EURE-0026. + +This research was funded in whole or in part by the French National Research Agency (ANR) under project number ANR-24-CE23-7140-01. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. More precisely, our goal is to provide a novel general framework for neural operators by considering the action of each operator layer as the solution of a regularized optimization problem over functions. This work is essentially fundamental, comes with theoretical results, and is evaluated in the context of PDE approximation for illustration and comparison purposes. There are many potential societal consequences of our work, none of which we feel must be specifically highlighted here. + +# References + +Anandkumar, A., Azizzadenesheli, K., Bhattacharya, K., Kovachki, N., Li, Z., Liu, B., and Stuart, A. Neural operator: Graph kernel network for partial differential equations. In ICLR 2020 Workshop on Integration of Deep Neural Models and Differential Equations, 2020. +Bauschke, H. H. and Combettes, P. L. Convex Analysis and Monotone Operator Theory in Hilbert Spaces. Springer Publishing Company, Incorporated, 2nd edition, 2017. ISBN 978-3-319-48310-8. +Bauschke, H. H., Borwein, J. M., and Combettes, P. L. Bregman monotone optimization algorithms. SIAM Journal on control and optimization, 42(2):596-636, 2003. +Beck, A. and Teboulle, M. Mirror descent and nonlinear projected subgradient methods for convex optimization. Operations Research Letters, 31(3):167-175, 2003. +Bregman, L. M. The relaxation method of finding the com + +mon point of convex sets and its application to the solution of problems in convex programming. USSR computational mathematics and mathematical physics, 7(3): 200-217, 1967. +Brezis, H. Functional Analysis, Sobolev Spaces, and Partial Differential Equations. Springer, New York, 2011. +Bui, M. N. and Combettes, P. L. Bregman forward/backward operator splitting. Set-Valued and Variational Analysis, 29:583-603, 2021. +Chen, G., Li, Y., Meng, Q., Zhou, J., Hao, X., et al. Residual fourier neural operator for thermochemical curing of composites. arXiv preprint arXiv:2111.10262, 2021. +Combettes, P. L. and Pesquet, J.-C. Deep neural network structures solving variational inequalities. Set-Valued and Variational Analysis, 28(3):491-518, February 2020a. ISSN 1877-0541. +Combettes, P. L. and Pesquet, J.-C. Lipschitz certificates for layered network structures driven by averaged activation operators. SIAM Journal on Mathematics of Data Science, 2(2):529-557, 2020b. +Cybenko, G. Approximation by superposition of sigmoidal function. Mathematics of Control, Signals, and Systems, 2:303-314, 1989. +Frecon, J., Gasso, G., Pontil, M., and Salzo, S. Bregman neural networks. In Chaudhuri, K., Jegelka, S., Song, L., Szepesvari, C., Niu, G., and Sabato, S. (eds.), Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pp. 6779-6792. PMLR, 17-23 Jul 2022. +Goswami, S., Yin, M., Yu, Y., and Karniadakis, G. E. A physics-informed variational DeepONet for predicting crack path in quasi-brittle materials. Computer Methods in Applied Mechanics and Engineering, 391:114587, mar 2022. +Hao, Z., Wang, Z., Su, H., Ying, C., Dong, Y., Liu, S., Cheng, Z., Song, J., and Zhu, J. GNOT: A general neural operator transformer for operator learning. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J. (eds.), International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 12556-12569. PMLR, 23-29 Jul 2023. +Helwig, J., Zhang, X., Fu, C., Kurtin, J., Wojtowytsch, S., and Ji, S. Group equivariant fourier neural operators for partial differential equations. In International Conference on Machine Learning, ICML'23. JMLR.org, 2023. + +Kissas, G., Seidman, J. H., Guilhoto, L. F., Preciado, V. M., Pappas, G. J., and Perdikaris, P. Learning operators with coupled attention. Journal of Machine Learning Research, 23(215):1-63, 2022. +Kovachki, N., Lanthaler, S., and Mishra, S. On universal approximation and error bounds for Fourier neural operators. Journal of Machine Learning Research, 22(290): 1-76, 2021. +Kovachki, N., Li, Z., Liu, B., Azizzadenesheli, K., Bhattacharya, K., Stuart, A., and Anandkumar, A. Neural operator: Learning maps between function spaces with applications to pdes. Journal of Machine Learning Research, 24(89):1-97, 2023. +Li, Z., Kovachki, N., Azizzadenesheli, K., Liu, B., Stuart, A., Bhattacharya, K., and Anandkumar, A. Multipole graph neural operator for parametric partial differential equations. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 6755-6766. Curran Associates, Inc., 2020. +Li, Z., Kovachki, N. B., Azizzadenesheli, K., liu, B., Bhattacharya, K., Stuart, A., and Anandkumar, A. Fourier neural operator for parametric partial differential equations. In International Conference on Learning Representations, 2021a. +Li, Z., Zheng, H., Kovachki, N., Jin, D., Chen, H., Liu, B., Azizzadenesheli, K., and Anandkumar, A. Physics-informed neural operator for learning partial differential equations. arXiv preprint arXiv:2111.03794, 2021b. +Lu, L., Jin, P., Pang, G., Zhang, Z., and Karniadakis, G. E. Learning nonlinear operators via DeepONet based on the universal approximation theorem of operators. Nature Machine Intelligence, 3(3):218-229, mar 2021. +Molinaro, R., Yang, Y., Engquist, B., and Mishra, S. Neural inverse operators for solving pde inverse problems. In International Conference on Machine Learning, 2023. +Nemirovskij, A. S. and Yudin, D. B. Problem complexity and method efficiency in optimization. 1983. +Nguyen, Q. Forward-backward splitting with bregman distances. Vietnam J. Math., 45:519-539, 2017. +Rahman, M. A., Ross, Z. E., and Azizzadenesheli, K. U-NO: U-shaped neural operators. Transactions on Machine Learning Research, 2023. ISSN 2835-8856. +Raonic, B., Molinaro, R., De Ryck, T., Rohner, T., Bartolucci, F., Alaifari, R., Mishra, S., and de Bezenac, E. Convolutional neural operators for robust and accurate learning of pdes. In Oh, A., Naumann, T., Globerson, A., + +Saenko, K., Hardt, M., and Levine, S. (eds.), Advances in Neural Information Processing Systems, volume 36, pp. 77187-77200. Curran Associates, Inc., 2023. +Rockafellar, T. Convex Analysis. Princeton University Press, Princeton, NJ, 1970. +Serrano, L., Le Boudec, L., Kassai Koupai, A., Wang, T. X., Yin, Y., Vittaut, J.-N., and Gallinari, P. Operator learning with neural fields: Tackling pdes on general geometries. In Advances in Neural Information Processing Systems, volume 36, pp. 70581-70611, 2023. +Takamoto, M., Praditia, T., Leiteritz, R., MacKinlay, D., Alesiani, F., Pflüger, D., and Niepert, M. Pdebench: An extensive benchmark for scientific machine learning. In Advances in Neural Information Processing Systems (NeurIPS), 2022. +Tran, A., Mathews, A., Xie, L., and Ong, C. S. Factorized fourier neural operators. In The Eleventh International Conference on Learning Representations, 2023. +Tripura, T. and Chakraborty, S. Wavelet neural operator for solving parametric partial differential equations in computational mechanics problems. Computer Methods in Applied Mechanics and Engineering, 404:115783, feb 2023. +Wang, S. and Perdikaris, P. Long-time integration of parametric evolution equations with physics-informed DeepONets. Journal of Computational Physics, 475:111855, feb 2023. +Wang, S., Wang, H., and Perdikaris, P. Learning the solution operator of parametric partial differential equations with physics-informed DeepONets. Science Advances, 7(40), oct 2021. +Wang, S., Wang, H., and Perdikaris, P. Improved architectures and training algorithms for deep operator networks. Journal of Scientific Computing, 92(2), jun 2022. +Zalinescu, C. Convex Analysis in General Vector Spaces. World Scientific, Singapore, 2002. + +# A. Additional Technical Facts + +We begin by introducing the necessary notations used throughout the paper. + +Notations. Let $\mathcal{V}$ and $\mathcal{V}^*$ be two Banach spaces put in duality via the pairing $\langle \cdot, \cdot \rangle \colon \mathcal{V} \times \mathcal{V}^* \to \mathbb{R}$ . If $\Phi \colon \mathcal{V} \to ]-\infty, +\infty]$ , we denote by $\mathrm{dom} \Phi = \{v \in \mathcal{V} | \Phi(v) < +\infty\}$ its effective domain. For every proper convex function $\Phi \colon \mathcal{V} \to ]-\infty, +\infty]$ , we set its subdifferential + +$$ +\partial \Phi (v) = \left\{v ^ {*} \in \mathcal {V} ^ {*} \mid \text {f o r a l l} u \in \mathcal {V}, \Phi (u) \geq \Phi (v) + \langle u - v, v ^ {*} \rangle \right\}, +$$ + +if $v \in \operatorname{dom} \Phi$ , and $\partial \Phi(v) = \varnothing$ , otherwise. We set $\operatorname{dom} \partial \Phi = \{v \in \operatorname{dom} \Phi \mid \partial \Phi(v) \neq \emptyset\}$ and the range $\operatorname{ran} \partial \Phi = \{v^* \in \mathcal{V}^* \mid \exists v \in \mathcal{V} \text{ s.t. } v^* \in \partial \Phi(v)\}$ . When $\partial \Phi(v)$ is a singleton, we denote by $\tilde{\nabla} \Phi$ its unique element. If $\Phi: \mathcal{V} \to ]-\infty, +\infty[$ , its Fenchel conjugate is the function $\Phi^* : \mathcal{V}^* \to ]-\infty, +\infty[$ such that $\Phi^*(v^*) = \sup_{v \in \mathcal{V}} \langle v, v^* \rangle - \Phi(v)$ . We denote by $\Gamma_0(\mathcal{V})$ the set of proper convex and lower-semicontinuous functions on $\mathcal{V}$ . The Fenchel-Moreau theorem ensures that $\Phi \in \Gamma_0(\mathcal{V}) \Rightarrow \Phi^* \in \Gamma_0(\mathcal{V}^*)$ . We denote by $\langle \cdot, \cdot \rangle$ and $| \cdot |$ the Euclidean scalar product and norm in $\mathbb{R}^n$ . If $D \subset \mathbb{R}^d$ is a nonempty bounded Borel set and $p \in [1, +\infty]$ , we denote by $L^p(D, \mathbb{R}^n)$ the Lebesgue space of $p$ -integrable functions (essentially bounded functions, if $p = +\infty$ ) from $D$ to $\mathbb{R}^n$ . + +# A.1. Considerations for Legendre Function and Bregman Proximal Operators + +At the core of our framework, lies the connection between activation operators and Bregman proximity operators whose definition involves the Bregman divergence itself defined from a Legendre function $\Phi \in \Gamma_0(\mathcal{V})$ . The latter acts on Lebesgue function space $\mathcal{V} = L^{P}(D,\mathbb{R}^{n})$ and can be built from an elementary legendre function $\phi \in \Gamma_0(\mathbb{R}^n)$ through the convex integral functional described in Fact 1. We provide below several considerations. + +Remark A.1. One can prove that $\phi$ is Legendre if and only if $\phi^{*}$ is Legendre. Moreover, if $\phi$ is Legendre, then $\phi$ and $\phi^{*}$ are differentiable on $\operatorname{int}(\operatorname{dom} \phi)$ and $\operatorname{int}(\operatorname{dom} \phi^{*})$ respectively and + +$$ +\nabla \phi \colon \operatorname {i n t} (\operatorname {d o m} \phi) \to \operatorname {i n t} (\operatorname {d o m} \phi^ {*}) \quad \text {a n d} \quad \nabla \phi^ {*} \colon \operatorname {i n t} (\operatorname {d o m} \phi^ {*}) \to \operatorname {i n t} (\operatorname {d o m} \phi) +$$ + +are bijective and inverse of each other. + +Fact 2 (Convex integral functionals on Lebesgue spaces based on Legendre function). Let $D \subset \mathbb{R}^d$ be an open-bounded set. Let $p, q \in [1, +\infty]$ be conjugate exponents, that is such that $1/p + 1/q = 1$ , and set $\mathcal{V} \coloneqq L^p(D, \mathbb{R}^n)$ and $\mathcal{V}^* = L^q(D, \mathbb{R}^n)$ . The spaces $\mathcal{V}$ and $\mathcal{V}^*$ can put in duality via the pairing $\mathcal{V} \times \mathcal{V}^* \to \mathbb{R}$ , $(v, u) \mapsto \langle v, u \rangle = \int_D \langle v(x), u(x) \rangle dx$ . Let $\phi \in \Gamma_0(\mathbb{R}^n)$ be a Legendre function and let $\Phi \colon \mathcal{V} \to ]-\infty, +\infty[$ be such that + +$$ +\Phi (v) = \int_ {D} \phi (v (x)) d x. \tag {11} +$$ + +Then $\Phi \in \Gamma_0(\mathcal{V})$ , $\operatorname{dom} \partial \Phi = \{v \in \mathcal{V} | \text{for a.e. } x \in D, v(x) \in \operatorname{int}(\operatorname{dom} \phi) \text{ and } (\nabla \phi) \circ v \in \mathcal{V}^*\}$ , $\partial \Phi$ is single valued on $\operatorname{dom} \partial \Phi$ , and, for every $v \in \operatorname{dom} \partial \Phi$ , $\partial \Phi(v) = \{\nabla \phi \circ v\}$ . The unique element $\nabla \phi \circ v$ of $\partial \Phi(v)$ will be denoted by $\tilde{\nabla} \Phi(v)$ , suggesting it will serve as a kind of gradient of $\Phi$ at $v^1$ . + +Remark A.2. In Fact 2, suppose that $p = 1$ and $\operatorname{dom} \phi^* = \mathbb{R}^n$ . Then $\operatorname{ran} \partial \Phi = \mathcal{V}^*$ . Indeed, we note that $\nabla \phi$ : $\operatorname{int}(\operatorname{dom} \phi) \to \mathbb{R}^n$ is a continuous bijection with inverse $\nabla \phi^*$ , which is also continuous. Therefore if we let $u \in \mathcal{V}^* = L^\infty(D, \mathbb{R}^n)$ and set $v = (\nabla \phi^*) \circ u$ , since $u$ is essentially bounded, we have that $v$ is essentially bounded too, and hence integrable. In the end $v \in L^1(D, \mathbb{R}^n)$ and $u = (\nabla \phi) \circ v \in \partial \Phi(v)$ . + +Definition 2.3 of Bregman proximity operators in general Banach spaces requires that $\mathrm{ran}\partial (\Phi +g)$ is the full dual space. The following result gives a simple situation in which such condition is satisfied. + +Proposition A.3. Let $\phi \in \Gamma_0(\mathbb{R}^n)$ be a Legendre function, let $p\in [1, + \infty [$ , and suppose that $\phi$ is $p$ -uniformly convex with constant $c > 0$ , meaning that + +$$ +\forall y, y ^ {\prime} \in \mathbb {R} ^ {n}, \forall \lambda \in ] 0, 1 [: \phi ((1 - \lambda) y + \lambda y ^ {\prime}) + \lambda (1 - \lambda) \frac {c}{p} | y - y ^ {\prime} | ^ {p} \leq (1 - \lambda) \phi (y) + \lambda \phi (y ^ {\prime}). \tag {12} +$$ + +Let $\mathcal{V} = L^{p}(D,\mathbb{R}^{n})$ . Then the integral functional $\Phi \colon \mathcal{V}\to ] - \infty , + \infty ]$ defined as in Fact 1 is $p$ -uniformly convex with respect to the norm $\| \cdot \| _p$ . Moreover, for every $g\in \Gamma_0(\mathcal{V})$ such that $\mathrm{dom}\Phi \cap \mathrm{dom}g\neq \varnothing$ , we have $\mathrm{dom}(\Phi +g)^{*} = \mathcal{V}^{*}$ and $(\Phi +g)^{*}$ is Fréchet differentiable on $\mathcal{V}^*$ . Thus $\mathcal{V}^{*} = \mathrm{dom}\partial (\Phi +g) = \mathrm{ran}\partial (\Phi +g)$ . + +Proof. It follows by integrating (12). The second part follows by Zalinescu (2002, Theorem 3.5.10), considering that $\Phi + g$ is also $p$ -uniformly continuous. + +We now provide conditions ensuring that the Bregman proximity operator is well-defined by guaranteeing that the subdifferential covers the entire dual space. This is important because having full range means that every possible dual variable has a corresponding primal solution. + +Remark A.4. + +(i) If $\mathcal{V} = L^{p}(D,\mathbb{R}^{n})$ with $p\in ]1, + \infty [,$ the condition ran $\partial (\Phi +g) = \mathcal{V}^*$ is satisfied if $\phi$ is $p$ -uniformly convex (see Proposition A.3 in the appendix). Moreover, by Remark A.2, if $p = 1$ and $\mathrm{dom}\phi^{*} = \mathbb{R}^{n}$ , then ran $\partial \Phi = \mathcal{V}^*$ +(ii) If instead of $\operatorname{ran}\partial(\Phi + g) = \mathcal{V}^*$ , one asks the stronger condition $\operatorname{ran}(\partial\Phi + \partial g) = \mathcal{V}^*$ , then we have $\partial(\Phi + g) = \partial\Phi + \partial g$ and the Bregman proximity operator writes down as $\operatorname{prox}_g^\Phi = (\partial\Phi + \partial g)^{-1}$ and $\operatorname{ran}(\operatorname{prox}_g^\Phi) \subset \operatorname{dom} \partial\Phi$ . + +Finally, we apply these results to an iterative process, specifically the compositional form of (Bregman) neural operators, to ensure well-posedness at each step. By confirming that the proximity operator consistently maps to the correct domain, we establish a stable recursive structure. This prevents domain mismatches and ensures the validity of compositions. Additionally, we emphasize the importance of a compatibility condition on the lifting operator, which guarantees a well-defined initialization for the iterative scheme. + +Remark A.5. In view of Remark A.4(ii), the condition $\mathrm{ran}(\partial \Phi_t + \partial g_t) = \mathcal{V}_t^*$ implies that $\mathrm{prox}_{g_t}^{\Phi_t} = (\partial \Phi_t + \partial g_t)^{-1}$ and hence $\mathrm{ran}(\mathrm{prox}_{g_t}^{\Phi_t})\subset \mathrm{dom}\partial \Phi_t$ . In this way $\mathrm{dom}\mathcal{L}_t = \mathcal{M}_t^{-1}(\mathrm{dom}\partial \Phi_{t - 1})$ and $\mathrm{ran}(\mathcal{L}_t)\subset \mathrm{dom}\partial \Phi_t$ and the composition (2) is well-defined provided that for the lifting operator $\mathcal{P}$ it holds $\mathrm{ran}(\mathcal{P})\subset \mathrm{dom}\partial \Phi_1$ (e.g., if $\mathcal{P}(v)(x) = \nabla \phi_1^* (Pv(x)))$ ). + +# A.2. Link Between Activation Function and Proximity Operator + +As demonstrated in the work of Combettes & Pesquet (2020a), many activation functions $\sigma$ can be expressed as proximity operators $\mathrm{prox}_g = \operatorname*{argmin}_{t\in \mathbb{R}}g(t) + \frac{1}{2} (\cdot -t)^2$ for some appropriate convex function $g$ . The simplest case is that of the ReLu activation function, recalled below. + +Example 1 (ReLU). The rectified linear unit function $\sigma \colon t\in \mathbb{R}\mapsto \max (t,0)\in \mathbb{R}$ can be expressed as the proximity operator $\mathrm{prox}_g$ of $g = \iota_{[0, + \infty [}$ . Henceforth, $\mathrm{prox}_g$ reduces to the projection onto the positive orthant. + +We also provide a novel characterization of SoftPlus. + +Example 2 (SoftPlus). Given $\beta >0$ , the SoftPlus activation function, i.e., $\sigma \colon t\mapsto \mathrm{SoftPlus}_{\beta}(t)\triangleq (1 / \beta)\log (\exp (\beta t) + 1)$ , is the proximity operator of + +$$ +g \colon t \in \mathbb {R} _ {> 0} \mapsto \frac {1}{\beta^ {2}} \mathrm {L i} _ {2} \left(\mathrm {e} ^ {- \beta t}\right) \in \mathbb {R} _ {> 0}, \tag {13} +$$ + +where $\mathrm{Li}_2$ is the dilogarithm function defined as $\mathrm{Li}_2\colon t\mapsto -\int_0^t\frac{\log(1 - u)}{u}\mathrm{d}u.$ + +Proof. For every $s \in \mathbb{R}$ , $\mathrm{prox}_g(s) = \mathrm{argmin}_{t \in \mathbb{R}} \{ h(t) \triangleq g(t) + (1/2)(s - t)^2 \}$ with $h(t) = (1/\beta^2)\mathrm{Li}_2(\mathrm{e}^{-\beta t}) + (1/2)(s - t)^2 = \psi(t) - st + (1/2)s^2$ where we introduced $\psi(t) = (1/\beta^2)\left(\mathrm{Li}_2(\mathrm{e}^{-\beta t}) + (1/2)\log(\mathrm{e}^{-\beta t})^2\right) = (1/\beta^2)\int^{\mathrm{e}^{-\beta t}} \log(r/(1-r)) / r \, \mathrm{d}r$ . The latter can be written as $\psi(t) = (1/\beta)\int^t \log(\mathrm{e}^{\beta r} - 1) \, \mathrm{d}r$ up to a constant. Finally, since $h$ is strongly convex, the minimum is attained for $t$ such that $h'(t) = 0$ , which yields $\log(\mathrm{e}^{\beta t} - 1) = \beta s \Leftrightarrow t = \sigma(s)$ , thus ending the proof. + +We present an illustration of the convex function $g$ defined in Eq. 13 in Figure 7a. Intuitively, it serves as a smooth surrogate for the indicator function of the positive orthant $\iota_{[0, +\infty[}$ . A larger value of $\beta > 0$ leads to a closer approximation. This aligns with the representation of SoftPlus as the proximity operator of $g$ from Eq. 13, depicted in Fig. 7b where a larger $\beta$ makes SoftPlus closer to ReLU. + +![](images/c133562699876ff90eaca2964e3e9dc97e474a0b19b0928c82a24df5abe2d178.jpg) +(a) Representation of $t\mapsto g(t) = \frac{1}{\beta^2}\mathrm{Li}_2(\mathrm{e}^{-\beta t})$ + +![](images/0bc5ce0449f8082a6d893335328b6b0da37b6564b997647e69d2f4ba85376af3.jpg) +(b) Representation of $\mathrm{prox}_g(t) = \mathrm{SoftPlus}_\beta (t)$ +Figure 7: Illustration of SoftPlus as a proximity operator. + +# B. Approximation Results for Bregman Neural Networks and Operators + +# B.1. Bregman Neural Networks + +We consider first shallow Bregman neural networks for finite dimensional spaces. Let $\sigma \colon \mathbb{R} \to I$ be a homeomorphism, where $I$ is an open interval in $\mathbb{R}$ . We $d \in \mathbb{N}_{+}$ and set + +$$ +\mathsf {B N} _ {2} (\sigma ; I ^ {d}) = \operatorname {s p a n} \left\{\sigma \left(\sigma^ {- 1} \left(m ^ {\top} x\right) + w ^ {\top} x + b\right) \mid m \in \Delta^ {d - 1}, w \in \mathbb {R} ^ {d}, b \in \mathbb {R} \right\}. \tag {14} +$$ + +Remark B.1. Since $m$ belongs to the standard simplex $\Delta^{d - 1}$ , $m^{\top}x$ is a convex combination of elements of $I$ and so it is an element of $I$ . Thus, since $\sigma^{-1}\colon I\to \mathbb{R}$ , the functions in $\mathsf{BN}_2(\sigma ;I^d)$ are well-defined from $I^d\rightarrow \mathbb{R}$ . + +The following result follows from an adaptation of the argument in Cybenko (1989) to our different architecture (14). + +Theorem B.2. Suppose that $\sigma$ is sigmoidal, meaning that $\lim_{t\to -\infty}\sigma (t) = 0$ and $\lim_{t\to +\infty}\sigma (t) = 1$ . Then, the space $\mathsf{BN}_2(\sigma ;I^d)$ is dense in $\mathcal{C}(I^d,\mathbb{R})$ with respect to the topology of uniform convergence on compact sets. + +Proof. Let $K \subset I^d$ be a compact set. We prove that the trace space $\mathsf{BN}_2(\sigma; I^d)_{|K}$ is dense in $\mathcal{C}(K, \mathbb{R})$ . To that purpose, we rely on the following general fact concerning dense sets in Banach space (see, e.g., Brezis (2011)). Let $\mathcal{B}$ be a Banach space, let $\mathcal{A} \subset \mathcal{B}$ . Then the following propositions are equivalent. + +- span $\mathcal{A}$ is dense in $\mathcal{B}$ +- $\mathcal{A}^{\perp} = \{u^{*}\in \mathcal{B}^{*}|\forall u\in \mathcal{A}\colon \langle u,u^{*}\rangle = 0\} = \{0\} .$ +- $\forall u^{*} \in \mathcal{B}^{*}, (\forall u \in \mathcal{A}: \langle u, u^{*} \rangle = 0) \Rightarrow u^{*} = 0.$ + +This implies that for our purpose we can equivalently prove that + +$$ +\forall \mu \in \mathcal {M} (K) \colon \left(\forall f \in \mathsf {B N} _ {2} (\sigma ; I ^ {d}) \colon \int_ {K} f \mu = 0\right) \Rightarrow \mu = 0, +$$ + +where $\mathcal{M}(K)$ is the space of signed finite Radon measures on $K$ (the dual of $\mathcal{C}(K)$ ). Thus, let $\mu$ be a signed measure on $K$ and suppose that + +$$ +\forall f \in \mathsf {B N} _ {2} (\sigma ; I ^ {d}): \int_ {K} f d \mu = 0. \tag {15} +$$ + +Fix $w\in \mathbb{R}^d$ $m\in \Delta^{d - 1}$ , and $b\in \mathbb{R}$ . Define, for every $\lambda >0$ and $c\in \mathbb{R}$ + +$$ +\sigma_ {\lambda , c} \colon I \to \mathbb {R}, \quad x \mapsto \sigma (\sigma^ {- 1} (m ^ {\top} x) + \lambda (w ^ {\top} x + b) + c). +$$ + +It is clear that $\sigma_{\lambda ,c}\in \mathsf{BN}_2(\sigma ;I^d)$ .Moreover, + +$$ +\lim _ {\lambda \to + \infty} \sigma_ {\lambda , c} (x) = \left\{ \begin{array}{c l} 1 & \text {i f} w ^ {\top} x + b > 0 \\ 0 & \text {i f} w ^ {\top} x + b < 0 \\ \sigma (\sigma^ {- 1} (m ^ {\top} x) + c) & \text {i f} w ^ {\top} x + b = 0. \end{array} \right\} := \gamma (x). +$$ + +Define the sets + +$$ +\Pi_ {w, b} ^ {+} = \left\{x \in K \mid w ^ {\top} x + b > 0 \right\}, \quad \Pi_ {w, b} ^ {-} = \left\{x \in K \mid w ^ {\top} x + b < 0 \right\}, \quad \Pi_ {w, b} = \left\{x \in K \mid w ^ {\top} x + b = 0 \right\}. +$$ + +They are intersections of half-spaces and hyperplanes with $K$ . So, + +$$ +\gamma (x) = \chi_ {\Pi_ {w, b} ^ {+}} (x) + \sigma (\sigma^ {- 1} (m ^ {\top} x) + c) \chi_ {\Pi_ {w, b}} (x), +$$ + +where $\chi_{A}$ is the characteristic functions of the set $A\subset I^d$ . Since $\sigma$ is bounded we can apply the Lebesgue's dominated convergence theorem and get + +$$ +\lim_{\lambda \to +\infty}\underbrace{\int_{K}\sigma_{\lambda,c}d\mu}_{= 0} = \int_{K}\gamma d\mu = \mu (\Pi^{+}_{w,b}) + \int_{\Pi_{w,b}}\sigma (\sigma^{-1}(m^{\top}x) + c)d\mu (x). +$$ + +Note that the integral on the left is zero by the hypothesis (15). In this way we proved that + +$$ +\forall m \in \Delta^ {d - 1}, \forall w \in \mathbb {R} ^ {d}, \forall b, \forall c \in \mathbb {R}: \quad \mu \left(\Pi_ {w, b} ^ {+}\right) + \int_ {\Pi_ {w, b}} \sigma \left(\sigma^ {- 1} \left(m ^ {\top} x\right) + c\right) d \mu (x) = 0. \tag {16} +$$ + +Now observe that (16) implies + +$$ +\left| \mu (\Pi_ {w, b} ^ {+}) \right| = \left| \int_ {\Pi_ {w, b}} \sigma (\sigma^ {- 1} (m ^ {\top} x) + c) d \mu (x) \right| \leq \int_ {\Pi_ {w, b}} | \sigma (\sigma^ {- 1} (m ^ {\top} x) + c) | d | \mu | (x) \to 0 \text {a s} c \to - \infty , +$$ + +since $|\sigma(\sigma^{-1}(m^\top x) + c)| \to 0$ as $c \to -\infty$ (pointwise), where $|\mu|$ is the total variation of $\mu$ . Therefore, $\mu(\Pi_{w,b}^+) = 0$ . Then (16) yields + +$$ +\forall c \in \mathbb {R}: \int_ {\Pi_ {w, b}} \sigma \left(\sigma^ {- 1} \left(m ^ {\top} x\right) + c\right) d \mu (x) = 0. +$$ + +Moreover, by assumption $\sigma (\sigma^{-1}(m^{\top}x) + c)\to 1$ as $c\to +\infty$ (pointwise) and hence, again by Lebesgue's dominated convergence theorem, + +$$ +\lim_{c\to +\infty}\underbrace{\int_{\Pi_{w,b}}\sigma(\sigma^{-1}(m^{\top}x) + c)d\mu(x)}_{= 0} = \int_{\Pi_{w,b}}1d\mu = \mu (\Pi_{w,b}), +$$ + +which yields $\mu (\Pi_{w,b}) = 0$ . In the end we proved that the measure $\mu$ is zero on all the sets of type + +$$ +\begin{array}{l l} \Pi_ {w, b} & \text {a n d} \quad \Pi_ {w, b} ^ {+}. \end{array} +$$ + +Now the proof continues as in Cybenko (1989, Lemma 1), and we can conclude that $\mu = 0$ . + +Now we address the vectorial case. We set + +$$ +\mathsf {B N} _ {2} (\sigma ; I ^ {d}, \mathbb {R} ^ {k}) := \left\{Q \sigma (\sigma^ {- 1} (M x) + W x + b) \middle | \begin{array}{l} r \in \mathbb {N} _ {+}, Q \in \mathbb {R} ^ {k \times r}, W, M \in \mathbb {R} ^ {r \times d}, \\ \text {w i t h M r i g h t s t o c h a s t i c , a n d} b \in \mathbb {R} ^ {r} \end{array} \right\}, +$$ + +where $\sigma$ and $\sigma^{-1}$ are applied component-wise. + +Corollary B.3. We have that + +$$ +\mathrm {B N} _ {2} \left(\sigma ; I ^ {d}, \mathbb {R} ^ {k}\right) = \left(\mathrm {B N} _ {2} \left(\sigma ; I ^ {d}\right)\right) ^ {k} := \underbrace {\mathrm {B N} _ {2} \left(\sigma ; I ^ {d}\right) \times \cdots \times \mathrm {B N} _ {2} \left(\sigma ; I ^ {d}\right)} _ {k t i m e s} \tag {17} +$$ + +and it is dense in $\mathcal{C}(I^d,\mathbb{R}^k)$ , in the topology of uniform convergence on compact sets. + +Proof. In view of Theorem B.2, it is clear that $(\mathsf{BN}_2(\sigma; I^d))^k$ is dense in $\mathcal{C}(I^d, \mathbb{R})^k \cong \mathcal{C}(I^d, \mathbb{R}^k)$ in the topology of uniform convergence on compact sets. Let's prove equality (17). The inclusion $\mathsf{BN}_2(\sigma; I^d, \mathbb{R}^k) \subset (\mathsf{BN}_2(\sigma; I^d))^k$ is immediate. Let $f \colon I^d \to \mathbb{R}^k$ with components $f_j \in \mathsf{BN}_2(\sigma; I^d)$ , $j = 1, \ldots, k$ . Then, there exists $r \in \mathbb{N}_+$ , and for each $j \in \{1, \ldots, k\}$ , $q_j \in \mathbb{R}^r$ , $W_j \in \mathbb{R}^{r \times d}$ , $b_j \in \mathbb{R}^r$ , and $M_j \in \mathbb{R}^{r \times d}$ right stochastic matrix (the rows are positive and sum one), such that + +$$ +f _ {j} (x) = q _ {j} ^ {\top} \sigma (\sigma^ {- 1} (M _ {j} x) + W _ {j} x + b _ {j}). +$$ + +Then considering the block matrices + +$$ +M = \left[ \begin{array}{c} M _ {1} \\ \vdots \\ M _ {k} \end{array} \right] \in \mathbb {R} ^ {k r \times d}, \quad W = \left[ \begin{array}{c} W _ {1} \\ \vdots \\ W _ {k} \end{array} \right] \in \mathbb {R} ^ {k r \times d}, \quad b = \left[ \begin{array}{c} b _ {1} \\ \vdots \\ b _ {k} \end{array} \right] \in \mathbb {R} ^ {k r}, \quad Q = \left[ \begin{array}{c c c c} q _ {1} ^ {\top} & 0 & \dots & 0 \\ 0 & q _ {2} ^ {\top} & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \dots & q _ {k} ^ {\top} \end{array} \right] \in \mathbb {R} ^ {k \times k r}, +$$ + +we have + +$$ +f (x) = Q \sigma (\sigma^ {- 1} (M x) + W x + b), +$$ + +and hence $f\in \mathsf{BN}_2(\sigma ;I^d,\mathbb{R}^k)$ . The statement follows. + +![](images/e7727a0181c1433f6b8fb0a26c8a9fa8f585561eb203458f9187d266c7e0caee.jpg) + +A general deep Bregman neural network with $T$ layers is defined as follows + +$$ +\mathsf {B N} _ {T} \left(\sigma ; I ^ {d}, \mathbb {R} ^ {k}\right) = \left\{W _ {T} \circ L _ {T - 1} \circ \dots \circ L _ {1} \right\}, +$$ + +where, for every $t = 1,\dots ,T - 1$ + +$$ +L _ {t} \colon I ^ {n _ {t - 1}} \rightarrow I ^ {n _ {t}}, \quad x \mapsto \sigma \left(\sigma^ {- 1} \left(M _ {t} x\right) + W _ {t} x + b _ {t}\right), \tag {18} +$$ + +with $W_{t}\in \mathbb{R}^{n_{t}\times n_{t - 1}},b_{t}\in \mathbb{R}^{n_{t}}$ and $M_t\in \mathbb{R}^{n_t\times n_{t - 1}}$ right stochastic, for $t = 1,\dots ,T - 1$ , with $n_0 = n$ and $W_{T}\in \mathbb{R}^{k\times n_{T - 1}}$ Note that also the dimensions $n_1,\ldots ,n_{T - 1}$ can be chosen freely. Clearly for a deep network with $T > 2$ , if we take, for every $t = 2,\ldots ,T - 1,n_{t} = n_{1},W_{t} = 0,b_{t} = 0$ , and $M_{t}$ equals to the identity, then the layers $L_{t}$ with $t = 2,\dots ,T - 1$ act as the identity operator and hence + +$$ +\mathsf {B N} _ {2} (\sigma ; I ^ {d}, \mathbb {R} ^ {k}) \subset \mathsf {B N} _ {T} (\sigma ; I ^ {d}, \mathbb {R} ^ {k}). +$$ + +Therefore, $\mathsf{BN}_T(\sigma; I^d, \mathbb{R}^k)$ is dense in $\mathcal{C}(I^d, \mathbb{R}^k)$ for the topology of uniform convergence on compact sets. + +Remark B.4. Often in applications it is desirable to have functions defined on the entire space $\mathbb{R}^d$ . In this case one can simply precompose the functions in $\mathsf{BN}_T(\sigma; I^d, \mathbb{R}^k)$ by the homeomorphism + +$$ +x \in \mathbb {R} ^ {d} \to \sigma (x) \in I ^ {d} +$$ + +obtaining a dense set in $\mathcal{C}(\mathbb{R}^d,\mathbb{R}^k)$ (for any $T\geq 2$ ). Such space is then denoted by $\mathtt{BN}_T(\sigma ;\mathbb{R}^d,\mathbb{R}^k)$ . + +Let $D \subset \mathbb{R}^d$ be any nonempty bounded open set. If $\mathcal{F}(\mathbb{R}^d)$ is any class of real functions from $\mathbb{R}^d$ to $\mathbb{R}$ we denote by $\mathcal{F}_{|\overline{D}}$ the set of restrictions to $\overline{D}$ of the functions in $\mathcal{F}(\mathbb{R}^d)$ . In the following according to Remark B.4 we put + +$$ +\mathsf {B N} _ {T} (\sigma ; \mathbb {R} ^ {d}, \mathbb {R} ^ {k}) = \left\{W _ {T} \circ L _ {T - 1} \circ \dots \circ L _ {1} \circ \sigma \right\}, \tag {19} +$$ + +which is a dense space in $\mathcal{C}(\mathbb{R}^d,\mathbb{R}^k)$ with respect to the topology of uniform convergence on compact sets. + +Lemma B.5. Suppose that $\sigma$ is a sigmoidal activation function as in Theorem B.2. Let $p\in [1, + \infty [$ . Then $\mathsf{BN}_T(\sigma ;\mathbb{R}^d,\mathbb{R}^k)_{|\overline{D}}$ is dense in $L^p (D,\mathbb{R}^k)$ (in the norm $\| \cdot \| _p$ ). + +Proof. It is well known that $\mathcal{C}_c(D,\mathbb{R}^k)$ is dense in $L^p (D,\mathbb{R}^k)$ and hence $\mathcal{C}(\mathbb{R}^n,\mathbb{R}^k)_{|\overline{D}}$ is dense in $L^{p}(D,\mathbb{R}^{k})$ (in the norm $\| \cdot \| _p$ ). Moreover, $\mathtt{BN}_T(\sigma ;\mathbb{R}^n,\mathbb{R}^k)_{|\overline{D}}$ is dense in $\mathcal{C}(\mathbb{R}^d,\mathbb{R}^k)_{|\overline{D}}$ (in the norm $\| \cdot \|_{\infty}$ ). On the other hand + +$$ +\forall f \in \mathcal {C} (\mathbb {R} ^ {d}, \mathbb {R} ^ {k}) _ {| \overline {{D}}}: \| f \| _ {p} = \left(\int_ {D} | f | ^ {p} d x\right) ^ {1 / p} \leq \| f \| _ {\infty} | D | ^ {1 / p}. +$$ + +Thus, if $f \in L^{p}(D,\mathbb{R}^{k})$ and $\varepsilon > 0$ , + +$$ +\begin{array}{l} \exists g \in \mathcal {C} (\mathbb {R} ^ {d}, \mathbb {R} ^ {k}) _ {\overline {{D}}} \mathrm {s . t .} \| f - g \| _ {p} \leq \frac {\varepsilon}{2} \\ \exists h \in \mathsf {B N} _ {T} (\sigma ; \mathbb {R} ^ {d}, \mathbb {R} ^ {k}) _ {| \overline {{D}}} \mathrm {s . t .} \| g - h \| _ {\infty} \leq \frac {\varepsilon}{2 | \overline {{D}} | ^ {1 / p}} \Rightarrow \| g - h \| _ {p} \leq \frac {\varepsilon}{2 | \overline {{D}} | ^ {1 / p}}. \\ \end{array} +$$ + +and hence $\| f - h\| _p\leq \varepsilon$ + +Remark B.6. It is sometimes required that neural networks, of any depth, include constant functions. Standard feed-forward neural networks have the form + +$$ +\left(W _ {T} \cdot + b _ {T}\right) \circ \sigma \left(W _ {T - 1} \cdot + b _ {T - 1}\right) \circ \dots \circ \sigma \left(W _ {1} \cdot + b _ {1}\right), +$$ + +so it is clear that they include constant functions (just take $W_{T} = 0$ ). However, for Bregman neural networks as defined in (19)-(18) this is not clear. An immediate modification to achieve this goal is to explicitly add a constant $b_{T}$ in the last layer. Another possibility is to lift the input space by one dimension, precomposing the neural network with a (free) linear embedding. In particular, if we consider the canonical embedding + +$$ +J \colon \mathbb {R} ^ {d} \to \mathbb {R} ^ {d + 1} \colon x \mapsto \left[ \begin{array}{c} x \\ 0 \end{array} \right], +$$ + +and define the following matrices + +$$ +\tilde {W} _ {t} = \left[ \begin{array}{l l} W _ {t} & 0 \\ 0 & 1 \end{array} \right], \quad \tilde {M} _ {t} = \left[ \begin{array}{l l} M _ {t} & 0 \\ 0 & 1 \end{array} \right], \quad \tilde {b} _ {t} = \left[ \begin{array}{l} b _ {t} \\ - \sigma (0) \end{array} \right], \quad (\mathrm {f o r t < T}) \quad \tilde {W} _ {T} = \left[ \begin{array}{l l} W _ {T} & b _ {T} / \sigma (0) \end{array} \right], +$$ + +then, for $t = 1,\dots ,T - 1$ , according to (18), we have + +$$ +\forall y \in I ^ {n _ {t - 1}} \colon \tilde {L} _ {t} \left[ \begin{array}{c} y \\ \sigma (0) \end{array} \right] = \sigma \Big (\sigma^ {- 1} \Big (\tilde {M} _ {t} \left[ \begin{array}{c} y \\ \sigma (0) \end{array} \right] \Big) + \tilde {W} _ {t} \left[ \begin{array}{c} y \\ \sigma (0) \end{array} \right] + \tilde {b} _ {t} \Big) = \left[ \begin{array}{c} L _ {t} y \\ \sigma (0) \end{array} \right] +$$ + +and hence + +$$ +\tilde {W} _ {T} \circ \tilde {L} _ {T - 1} \circ \dots \circ \tilde {L} _ {1} \circ \sigma \circ J = W _ {T} \circ L _ {T - 1} \circ \dots \circ L _ {1} \circ \sigma + b _ {T}. +$$ + +# B.2. Bregman Neural Operators + +Now we start addressing the proof of Theorem 4.1. We will rely on the work of Kovachki et al. (2023), from which, for the sake of reader's convenience, we report the following facts. + +Fact 3 (Lemma 28 and 30 in Kovachki et al. (2023)). Let $D \subset \mathbb{R}^d$ be a bounded set and let $L \in (W^{m,p}(D))^*$ , for some $m \geq 0$ and $1 \leq p < +\infty$ , or $L \in (\mathcal{C}(D))^*$ . Then, for any closed and bounded set $K \subset \mathcal{A}$ and $\varepsilon > 0$ , there exists a function $\kappa \in \mathcal{C}_c^\infty(D)$ such that + +$$ +\sup _ {v \in K} \left| L (v) - \int_ {D} \kappa (x) v (x) d x \right| < \varepsilon . +$$ + +Fact 4 (Lemma 22 and 26 in Kovachki et al. (2023)). Let $D \subset \mathbb{R}^d$ be a bounded set and let $\mathcal{A}$ and $\mathcal{U}$ be any one of the Banach spaces $\mathcal{C}(\overline{D})$ or $W^{m,p}(D)$ , with $m \geq 0$ and $1 \leq p < +\infty$ . Let $\mathcal{G} \colon \mathcal{A} \to \mathcal{U}$ be a continuous operator, $K \subset \mathcal{A}$ be a compact set and $\varepsilon > 0$ . Then there exist $J, J' \in \mathbb{N}$ and + +$$ +R \colon \mathcal {A} \to \mathbb {R} ^ {J}, f \colon \mathbb {R} ^ {J} \to \mathbb {R} ^ {J ^ {\prime}}, S \colon \mathbb {R} ^ {J ^ {\prime}} \to \mathcal {U}, +$$ + +with $R$ and $S$ linear continuous and $f$ continuous, such that + +$$ +\sup _ {v \in K} \| \mathcal {G} (v) - (S \circ f \circ R) (v) \| < \varepsilon . +$$ + +In the following we set $D\subset \mathbb{R}^d$ be a bounded set and + +$$ +\mathcal {A} (D, \mathbb {R} ^ {n _ {0}}) = W ^ {m, p} (D, \mathbb {R} ^ {n _ {0}}) \quad \text {o r} \quad \mathcal {A} (D, \mathbb {R} ^ {n _ {0}}) = \mathcal {C} (D, \mathbb {R} ^ {n _ {0}}), +$$ + +where the integer $m \geq 0$ and $p \in [1, +\infty[$ . Moreover we will assume that (by possibly changing the definition slightly) Bregman neural networks include constant functions (recall Remark B.6). Because of the density result given in the previous section, we can essentially follow the same line of arguments in Kovachki et al. (2023), but we need to take special care of the different structure of Bregman neural network/operators (in particular in Lemma B.10). + +Lemma B.7. Let $L \in \mathcal{A}^*$ and $K \subset \mathcal{A}$ be a compact set. Then there exists $h \in \mathsf{BN}_2(\sigma; \mathbb{R}^d, \mathbb{R}^{n_0})_{|D}$ such that + +$$ +\sup _ {v \in K} \left| L (v) - \int_ {D} \langle h (x), v (x) \rangle d x \right| < \varepsilon . +$$ + +Proof. The space $\mathcal{A}$ is (isomorphic to) a product space, meaning $\mathcal{A} = \prod_{i=1}^{n_0} \mathcal{A}_i$ , where $\mathcal{A}_i$ is a space of real valued functions on $D$ . Set $K_i = \operatorname{pr}_i(K)$ , which is a compact set of $\mathcal{A}_i$ , so that $K \subset \prod_{i=1}^{n_0} K_i$ . Then $L \colon \mathcal{A} \to \mathbb{R}$ can be written as $Lv = \sum_{i=1}^{n_0} L_i v_i$ with $L_i \colon \mathcal{A}_i \to \mathbb{R}$ . By Fact 3, for every $i = 1, \ldots, n_0$ , there exists $\kappa_i \in \mathcal{C}_c(D)$ such that + +$$ +\sup _ {v _ {i} \in K _ {i}} \left| L _ {i} v _ {i} - \int_ {D} \kappa_ {i} v _ {i} d x \right| < \frac {\varepsilon}{2 n _ {0}}. +$$ + +Let $\kappa \in \mathcal{C}_c(D,\mathbb{R}^{n_0})$ with components $\kappa_{i}\in \mathcal{C}_{c}(D)$ . Then + +$$ +\left| L v - \int_ {D} \langle \kappa (x), v (x) \rangle d x \right| = \left| \sum_ {i = 1} ^ {n _ {0}} L _ {i} v _ {i} - \sum_ {i = 1} ^ {n _ {0}} \int_ {D} \kappa_ {i} v _ {i} d x \right| \leq \sum_ {i = 1} ^ {n _ {0}} | L _ {i} v _ {i} - \int_ {D} \kappa_ {i} v _ {i} d x | < \frac {\varepsilon}{2}. +$$ + +Since $\mathcal{A} \subset L^{1}(D, \mathbb{R}^{n_{0}})$ we set $\gamma = \sup_{v \in K} \| v \|_{1} < +\infty$ . Moreover, since Bregman shallow neural networks are dense in the space of continuous functions (Remark B.4), there exists $h \in \mathsf{BN}_2(\sigma; \mathbb{R}^d, \mathbb{R}^{n_0})_{|\overline{D}}$ such that $\| h - \kappa \|_{\infty} \leq \varepsilon / (2\gamma)$ and hence, for every $v \in K$ , + +$$ +\left| \int_ {D} \langle \kappa , v \rangle d x - \int_ {D} \langle h, v \rangle d x \right| = \left| \int_ {D} \langle \kappa - h, v \rangle d x \right| \leq \int_ {D} | \kappa (x) - h (x) | | v (x) | d x \leq \| \kappa - h \| _ {\infty} \| u \| _ {1} < \frac {\varepsilon}{2}. +$$ + +Therefore, + +$$ +\left| L v - \int_ {D} \langle h, v \rangle d x \right| \leq \left| L v - \int_ {D} \langle \kappa , v \rangle d x \right| + \left| \int_ {D} \langle \kappa , v \rangle d x - \int_ {D} \langle h, v \rangle d x \right| < \varepsilon +$$ + +and the statement follows. + +Lemma B.8. Let $R \colon \mathcal{A} \to \mathbb{R}^J$ be a linear continuous operator, $K \subset \mathcal{A}$ a compact set and $\varepsilon > 0$ . Then there exists a linear continuous operator $R^{\mathsf{BN}} \colon \mathcal{A} \to \mathbb{R}^J$ acting as + +$$ +v \mapsto R ^ {\mathtt {B N}} v = \int_ {D} h (y) v (y) d y, +$$ + +where $h\in \mathsf{BN}_2(\sigma ;\mathbb{R}^d,\mathbb{R}^{J\times n_0})_{|\overline{D}}$ , such that + +$$ +\sup _ {v \in K} | R v - R ^ {\mathsf {B N}} v | < \varepsilon . +$$ + +Proof. Consider the components $R_{j} \colon \mathcal{A} \to \mathbb{R}, j = 1, \ldots, J$ . Then $R_{j} \in \mathcal{A}^{*}$ , and by Lemma B.7 + +$$ +\exists h _ {j} \in \mathsf {B N} _ {2} (\sigma ; \mathbb {R} ^ {d}, \mathbb {R} ^ {n _ {0}}) _ {| D} \quad \mathrm {s . t .} \quad \sup _ {v \in K} \left| R _ {j} v - \int_ {D} \langle h _ {j} (x), v (x) \rangle d x \right| \leq \frac {\varepsilon}{\sqrt {J}}. +$$ + +Let $h\colon \mathbb{R}^d\to \mathbb{R}^{J\times n_0}$ with + +$$ +h (x) = \left[ \begin{array}{c} h _ {1} (x) ^ {\top} \\ \vdots \\ h _ {J} (x) ^ {\top} \end{array} \right]. +$$ + +Clearly $h\in \mathsf{BN}_2(\sigma ;\mathbb{R}^d,\mathbb{R}^{J\times n_0})_{|D}$ and + +$$ +\forall v \in K \colon \left| R v - \int_ {D} h (x) v (x) d x \right| ^ {2} = \sum_ {i = 1} ^ {J} \left| R _ {j} v - \int_ {D} \langle h _ {j} (x), v (x) \rangle d x \right| ^ {2} < \varepsilon^ {2} +$$ + +and the statement follows. + +Remark B.9. Both the linear continuous operators $R$ and $R^{\mathsf{BN}}$ in Lemma B.8 can be canonically lifted to Lebesgue spaces as follows. + +$$ +\begin{array}{l} \mathcal {R} \colon \mathcal {A} \to L ^ {p} (D, \mathbb {R} ^ {J}), \quad \mathcal {R} v = (R v) \mathbb {1} _ {D} \\ \mathcal {R} ^ {\mathtt {B N}} \colon \mathcal {A} \to L ^ {p} (D, \mathbb {R} ^ {J}), \quad \mathcal {R} ^ {\mathtt {B N}} v = \left(R ^ {\mathtt {B N}} v\right) \mathbb {1} _ {D}, \\ \end{array} +$$ + +where $\mathbb{1}_D$ denotes the constant function $x\mapsto 1$ on $D$ . Moreover $\mathcal{R}^{\mathtt{BN}}$ is actually an integral operator. Indeed if we define the kernel + +$$ +\kappa_ {h} \colon D \times D \to \mathbb {R} ^ {J \times n _ {0}}, \quad \kappa_ {h} (x, y) = h (y) +$$ + +we have + +$$ +(\mathcal {R} ^ {\mathtt {B N}} v) (x) = R ^ {\mathtt {B N}} v = \int_ {D} h (y) v (y) d y = \int_ {D} \kappa_ {h} (x, y) v (y) d y. +$$ + +The following result is the analogue of Kovachki et al. (2023, Lemma 35) and establishes that a finite dimensional Bregman neural network can be canonically lifted in Lebesgue spaces. However, here we need to take care of the domain of the Bregman operator layers. + +Lemma B.10. Let $f \in \mathsf{BN}_T(\sigma; \mathbb{R}^J, \mathbb{R}^{J'})$ , $D \subset \mathbb{R}^d$ a nonempty open set and $p \in [1, +\infty]$ . Then there exists a neural operator + +$$ +\mathcal {N} ^ {\mathtt {B N}} \colon L ^ {p} (D, \mathbb {R} ^ {J}) \to L ^ {p} (D, \mathbb {R} ^ {J ^ {\prime}}), \quad \mathcal {N} ^ {\mathtt {B N}} = \mathcal {K} _ {T} \circ \mathcal {L} _ {T - 1} \circ \dots \circ \mathcal {L} _ {1} \circ \sigma , +$$ + +where, for every $t = 1,\dots ,T - 1$ + +$$ +\mathcal {L} _ {t} (v) = \sigma \left(\sigma^ {- 1} \left(\mathcal {M} _ {t} v\right) + \mathcal {K} _ {t} v + b _ {t}\right) +$$ + +and such that the linear integral operators $\mathcal{M}_t$ and $\kappa_{t}$ and the functions $b_{t}$ are defined (parametrized) by finite dimensional Bregman shallow neural networks and + +$$ +\forall w \in \mathbb {R} ^ {J} \colon \mathcal {N} ^ {\mathsf {B N}} (w \mathbb {1} _ {D}) = f (w) \mathbb {1} _ {D}, +$$ + +where $\mathbb{1}_D$ denotes the constant function $x\mapsto 1$ on $D$ + +Proof. By definition + +$$ +f = K _ {T} \circ L _ {T - 1} \circ \dots L _ {1} \circ \sigma , \quad L _ {t} (w) = \sigma (\sigma^ {- 1} (M _ {t} w) + K _ {t} w + b _ {t}), +$$ + +where $\sigma \colon \mathbb{R} \to I$ and, for $t = 1, \ldots, T$ , $K_{t} \in \mathbb{R}^{n_{t} \times n_{t-1}}$ and $b_{t} \in \mathbb{R}^{n_{t}}$ , and for every $t = 1, \ldots, T-1$ , $M_{t} \in \mathbb{R}^{n_{t} \times n_{t-1}}$ , is right stochastic, $n_{0} = J$ and $n_{T} = J'$ . Since, we are assuming that Bregman neural networks contain constant functions (recall the sentence before Lemma B.7), we have + +$b_{t}\mathbb{1}_{D}\in \mathsf{BN}_{2}(\sigma ;\mathbb{R}^{d},\mathbb{R}^{n_{t}})_{|\overline{D}}\subset \mathcal{C}(\overline{D},\mathbb{R}^{n_{t}})$ +- $\kappa_{t} = \frac{1}{|D|} K_{t}\mathbb{1}_{D\times D}\in \mathsf{BN}_{2}(\sigma ;\mathbb{R}^{d}\times \mathbb{R}^{d},\mathbb{R}^{n_{t}\times n_{t - 1}})_{|\overline{D}\times \overline{D}}\subset \mathcal{C}(\overline{D}\times \overline{D},\mathbb{R}^{n_{t}\times n_{t - 1}})$ and + +$$ +\begin{array}{l} \mathcal {K} _ {t}: L ^ {p} (D, \mathbb {R} ^ {n _ {t - 1}}) \to L ^ {q} (D, \mathbb {R} ^ {n _ {t}}) \\ v \mapsto (\mathcal {K} _ {t} v) (x) = \int_ {D} \kappa_ {t} (x, y) v (y) d y = \int_ {D} \frac {1}{| D |} K _ {t} v (y) d y = K _ {t} \bar {v}, \\ \end{array} +$$ + +where $\bar{v}$ is the mean value of $v$ . So that $\mathcal{K}_t v = (K_t \bar{v}) \mathbb{1}_D$ is a constant function. + +$\mu_t = \frac{1}{|D|} M_t \mathbb{1}_{D \times D} \in \mathsf{BN}_2(\sigma; \mathbb{R}^d \times \mathbb{R}^d, \mathbb{R}^{n_t \times n_{t-1}})_{|\overline{D} \times \overline{D}} \subset \mathcal{C}(\overline{D} \times \overline{D}, \mathbb{R}^{n_t \times n_{t-1}})$ + +$$ +\begin{array}{l} \mathcal {M} _ {t} \colon L ^ {p} (D, \mathbb {R} ^ {n _ {t - 1}}) \to L ^ {p} (D, \mathbb {R} ^ {n _ {t}}) \\ v \mapsto (\mathcal {M} _ {t} v) (x) = \int_ {D} \mu_ {t} (x, y) v (y) d y = \int_ {D} \frac {1}{| D |} M _ {t} v (y) d y = M _ {t} \bar {v}. \\ \end{array} +$$ + +Moreover, since $M_t$ is right stochastic, if the function $v$ has range (almost everywhere) in $I^{n_{t-1}}$ , we have that $\bar{v} \in I^{n_{t-1}} \Rightarrow M_t \bar{v} \in I^{n_t}$ , Hence + +$$ +\mathcal {M} _ {t} (\operatorname {d o m} \partial \Phi_ {t - 1}) \subset \operatorname {d o m} \partial \Phi_ {t}. +$$ + +Indeed, recall that $\Phi_t\colon L^p (D,\mathbb{R}^{n_t})\to ] - \infty , + \infty ]$ and + +$$ +\forall v \in L ^ {p} (D, \mathbb {R} ^ {n _ {t}}) \colon \Phi_ {t} (v) = \int_ {D} \phi_ {t} (v (x)) d x, \quad \forall w \in \mathbb {R} ^ {n _ {t}} \colon \phi_ {t} (w) = \sum_ {i = 1} ^ {n _ {t}} \psi (w _ {i}) +$$ + +with $\psi \colon \mathbb{R} \to ]-\infty, +\infty]$ . Legendre, $\operatorname{int}(\operatorname{dom} \psi) = I$ , $\operatorname{dom} \psi^{*} = \mathbb{R}$ , $\sigma = (\psi^{*})'$ , and $\sigma^{-1} = \psi'$ , so that $\operatorname{dom} \partial \Phi_{t} = \{v \in L^{p}(D, \mathbb{R}^{n_{t}}) \mid \text{for a.e. } x \in D, v(x) \in I^{n_{t}}\}$ and for $v \in \operatorname{dom} \Phi_{t}$ , $\partial \Phi_{t}(v) = \{\nabla \phi \circ v\}$ . + +It follows from the previous considerations that if $v \in \operatorname{dom} \partial \Phi_{t-1} \subset L^p(D, \mathbb{R}^{n_{t-1}})$ , we have $\mathcal{K}_t(v) = (K_t\bar{v})\mathbb{1}_D$ and $\mathcal{M}_t v = (M_t\bar{v})\mathbb{1}_D$ , and hence + +$$ +\mathcal {L} _ {t} (v) = \sigma \left(\sigma^ {- 1} \left(\mathcal {M} _ {t} v\right) + \mathcal {K} _ {t} v + b _ {t} \mathbb {1} _ {D}\right) (x) = \sigma \left(\sigma^ {- 1} \left(M _ {t} \bar {v}\right) + K _ {t} \bar {v} + b _ {t}\right). +$$ + +Note that here $\mathcal{V}_t = L^p (D,\mathbb{R}^{n_t})$ . Thus, we have + +$$ +\mathcal {L} _ {t} (v) = \left(L _ {t} \bar {v}\right) \mathbb {1} _ {D}, +$$ + +meaning that the operator layer $\mathcal{L}_t$ transforms any function in $L^p(D, \mathbb{R}^{n_t})$ into a constant function, where the constant is the mean value of the function, transformed via the standard (finite dimensional) Bregman layer $L_t$ . In particular, if $w \in \mathbb{R}^J$ , we have + +$$ +\mathcal {L} _ {1} (\sigma (w \mathbb {1} _ {D})) = \mathcal {L} _ {1} (\sigma (w) \mathbb {1} _ {D}) = L _ {1} (\sigma (w)) \mathbb {1} _ {D} +$$ + +$$ +\mathcal {L} _ {2} \left(\mathcal {L} _ {1} \left(\sigma (w \mathbb {1} _ {D})\right)\right) = \mathcal {L} _ {2} \left(L _ {1} (\sigma (w)) \mathbb {1} _ {D}\right) = L _ {2} \left(L _ {1} (\sigma (w))\right) \mathbb {1} _ {D}, +$$ + +and so on. Therefore, if we set + +$$ +\mathcal {N} ^ {\mathsf {B N}} = \mathcal {K} _ {T} \circ \mathcal {L} _ {T - 1} \circ \dots \circ \mathcal {L} _ {1} \circ \sigma , +$$ + +the statement follows. + +Remark B.11. Let $S\colon \mathbb{R}^{J^{\prime}}\to \mathcal{U}(D,\mathbb{R}^{k})$ be linear (and continuous) and set + +$$ +\forall i = 1, \dots , J ^ {\prime}: s _ {j} = S e _ {j} \in \mathcal {U}, +$$ + +where $(e_j)_{1\leq j\leq J'}$ is the canonical basis of $\mathbb{R}^{J'}$ . Define the function $s\colon D\to \mathbb{R}^{k\times J'}$ , with $s(x) = [s_1(x)\dots s_J'(x)]$ , which has the $s_j$ 's as columns. Then + +$$ +\forall w \in \mathbb {R} ^ {J ^ {\prime}}: S w = S \left(\sum_ {j = 1} ^ {J ^ {\prime}} w _ {j} e _ {j}\right) = \sum_ {j = 1} ^ {J ^ {\prime}} w _ {j} s _ {j} \Rightarrow (S w) (x) = \sum_ {j = 1} ^ {J ^ {\prime}} w _ {j} s _ {j} (x) = s (x) w. +$$ + +Thus, the action of $S$ can be represented by a matrix-valued function with columns in $\mathcal{U}$ . Moreover, the linear operator $S$ can be lifted to a linear integral operator from $L^p(D, \mathbb{R}^{J'})$ to $\mathcal{U}$ . Indeed if we define the kernel + +$$ +\kappa_ {s} \colon D \times D \to \mathbb {R} ^ {k \times J ^ {\prime}}, \quad \kappa_ {s} (x, y) = \frac {1}{| D |} s (x), +$$ + +for every $v\in L^{p}(D,\mathbb{R}^{J^{\prime}})$ , we have + +$$ +(\mathcal {S} v) (x) = \int_ {D} \kappa_ {s} (x, y) v (y) d y = \int_ {D} \frac {1}{| D |} s (x) v (y) d y = s (x) \bar {v}, +$$ + +where $\bar{v}$ is the mean value of $v$ . In the end $\mathcal{S} \colon L^p(D, \mathbb{R}^{J'}) \to \mathcal{U}$ and + +$$ +\forall v \in L ^ {p} (D, \mathbb {R} ^ {J ^ {\prime}}): \mathcal {S} v = S \bar {v}, +$$ + +and hence, for every $w \in \mathbb{R}^{J'}$ , $S(w\mathbb{1}_D) = Sw$ , meaning that $S$ is actually an extension of $S$ to the Lebesgue space $L^p(D, \mathbb{R}^{J'})$ . + +Lemma B.12. Let $S \colon \mathbb{R}^{J'} \to \mathcal{U}(D, \mathbb{R}^k)$ be linear (and continuous). Let $K \subset \mathbb{R}^{J'}$ be a compact set and $\varepsilon > 0$ . Then there exists a function $h \in \mathsf{BN}_2(\sigma; \mathbb{R}^d, \mathbb{R}^{k \times J'})|_D$ so that for the corresponding linear operator $S^{\mathsf{BN}} \colon \mathbb{R}^{J'} \to \mathcal{U}$ defined as + +$$ +\forall w \in \mathbb {R} ^ {J ^ {\prime}}: (S ^ {\mathsf {B N}} w) (x) = \sum_ {i = 1} ^ {J ^ {\prime}} w _ {j} h _ {j} (x) = h (x) w, +$$ + +according to Remark B.11, we have + +$$ +\sup _ {w \in K} \| S w - S ^ {\mathsf {B N}} w \| _ {\mathcal {U}} < \varepsilon . +$$ + +Finally we are ready for the proof of Theorem 4.1. + +Proof of Theorem 4.1. It follows from Fact 4 that there exist $J, J' \in \mathbb{N}$ and + +$$ +R \colon \mathcal {A} \to \mathbb {R} ^ {J}, f \colon \mathbb {R} ^ {J} \to \mathbb {R} ^ {J ^ {\prime}}, S \colon \mathbb {R} ^ {J ^ {\prime}} \to \mathcal {U}, +$$ + +with $R$ and $S$ linear continuous and $f$ continuous, such that + +$$ +\sup _ {v \in K} \| \mathcal {G} (v) - (S \circ f \circ R) (v) \| < \varepsilon . +$$ + +Now, taking advantage of the previous lemmas we want to replace the operators $R$ and $S$ with analogue operators depending on shallow Bregman neural networks, and the function $f$ with a Bregman neural network. It follows from Lemma B.8 that for every $n \in \mathbb{N}$ there exist + +$$ +R _ {n} ^ {\mathsf {B N}} \colon \mathcal {A} \to \mathbb {R} ^ {J} \text {l i n e a r c o n t i n u o u s o p e r a t o r s u c h t h a t} \sup _ {v \in K} | R v - R _ {n} ^ {\mathsf {B N}} v | < \frac {1}{n + 1}, +$$ + +where $R_{n}^{\mathsf{BN}}$ depends on a Bregman shallow network $h_n$ as specified in Lemma B.8. Clearly this implies that $\lim_{n\to +\infty}R_n^{\mathsf{BN}}v = Rv$ uniformly on $K$ , so that the set + +$$ +K _ {1} := R (K) \cup \bigcup_ {n \in \mathbb {N}} R _ {n} ^ {\mathsf {B N}} (K) \subset \mathbb {R} ^ {J} +$$ + +is compact (see Kovachki et al. (2023, Lemma 21)). Since $f$ is continuous, it is uniformly continuous on $K_{1}$ , hence given $\varepsilon > 0$ there exists $\delta > 0$ such that + +$$ +\forall w, w ^ {\prime} \in K _ {1} \colon | w - w ^ {\prime} | < \delta \Rightarrow | f (w) - f (w ^ {\prime}) | < \frac {\varepsilon}{3 \| S \|}. +$$ + +Moreover, there exists $f^{\mathsf{BN}}\in \mathsf{BN}_2(\sigma ;\mathbb{R}^J,\mathbb{R}^{J'})$ such that + +$$ +\sup _ {w \in K _ {1}} | f (w) - f ^ {\mathsf {B N}} (w) | < \frac {\varepsilon}{3 \| S \|}. +$$ + +Let's take $n \in \mathbb{N}$ such that $1 / (n + 1) < \delta$ . Then, + +$$ +\forall v \in K \colon R v, R _ {n} ^ {\mathsf {B N}} v \in K _ {1} \text {a n d} | R v - R _ {n} ^ {\mathsf {B N}} v | < \frac {1}{n + 1} < \delta \Rightarrow | f (R v) - f (R _ {n} ^ {\mathsf {B N}} v) | < \frac {\varepsilon}{3 \| S \|}. +$$ + +Finally, since $f^{\mathsf{BN}}(K_1)$ is compact, by Lemma B.12, there exist $S^{\mathsf{BN}}\colon \mathbb{R}^{J'}\to \mathcal{U}$ such that + +$$ +\sup_{w\in f^{\mathsf{BN}}(K_{1})}\| Sw - S^{\mathsf{BN}}w\|_{\mathcal{U}} < \frac{\varepsilon}{3}. +$$ + +Therefore, for every $v \in K$ we have + +$$ +\begin{array}{l} \left\| S (f (R v)) - S ^ {\mathsf {B N}} (f ^ {\mathsf {B N}} (R _ {n} ^ {\mathsf {B N}} v)) \right\| _ {\mathcal {U}} \leq \left\| S (f (R v)) - S (f (R _ {n} ^ {\mathsf {B N}} v)) \right\| _ {\mathcal {U}} + \left\| S (f (R _ {n} ^ {\mathsf {B N}} v)) - S (f ^ {\mathsf {B N}} (R _ {n} ^ {\mathsf {B N}} v)) \right\| _ {\mathcal {U}} \\ + \left\| S (f ^ {\mathsf {B N}} (R _ {n} ^ {\mathsf {B N}} v)) - S ^ {\mathsf {B N}} (f ^ {\mathsf {B N}} (R _ {n} ^ {\mathsf {B N}} v)) \right\| _ {\mathcal {U}} \\ \leq \| S \| \left| f (R v) - f ^ {\mathsf {B N}} \left(R _ {n} ^ {\mathsf {B N}} v\right) \right| + \| S \| \left| f \left(R _ {n} ^ {\mathsf {B N}} v\right) - f ^ {\mathsf {B N}} \left(R _ {n} ^ {\mathsf {B N}} v\right) \right| \\ + \left\| S (f ^ {\mathsf {B N}} (R _ {n} ^ {\mathsf {B N}} v)) - S ^ {\mathsf {B N}} (f ^ {\mathsf {B N}} (R _ {n} ^ {\mathsf {B N}} v)) \right\| _ {\mathcal {U}} \\ < \frac {\varepsilon}{3} + \frac {\varepsilon}{3} + \frac {\varepsilon}{3} = \varepsilon . \\ \end{array} +$$ + +In the end, for every $v \in K$ , + +$$ +\left\| \mathcal {G} (v) - S ^ {\mathsf {B N}} (f ^ {\mathsf {B N}} (R _ {n} ^ {\mathsf {B N}} v)) \right\| _ {\mathcal {U}} \leq \| \mathcal {G} (v) - S (f (R v)) \| _ {\mathcal {U}} + \left\| S (f (R v)) - S ^ {\mathsf {B N}} (f ^ {\mathsf {B N}} (R _ {n} ^ {\mathsf {B N}} v)) \right\| _ {\mathcal {U}} < 2 \varepsilon . +$$ + +Now in order to conclude the proof, it is sufficient to lift the operators $R^{\mathsf{BN}}$ and $S^{\mathsf{BN}}$ to Lebesgue spaces, as described in Remark B.9 and Remark B.11, and the function $f^{\mathsf{BN}}$ to Bregman neural operator as described in Lemma B.10 and recognize that + +$$ +\mathcal {S} ^ {\mathrm {B N}} \circ \mathcal {N} ^ {\mathrm {B N}} \circ \mathcal {R} _ {n} ^ {\mathrm {B N}} = S ^ {\mathrm {B N}} \circ f ^ {\mathrm {B N}} \circ R _ {n} ^ {\mathrm {B N}}. +$$ + +Indeed, for every $v\in \mathcal{A}$ , we have + +$$ +\mathcal {S} ^ {\mathtt {B N}} (\mathcal {N} ^ {\mathtt {B N}} (\mathcal {R} _ {n} ^ {\mathtt {B N}} v)) = \mathcal {S} ^ {\mathtt {B N}} (\mathcal {N} ^ {\mathtt {B N}} ((R _ {n} ^ {\mathtt {B N}} v) \mathbb {1} _ {D})) = \mathcal {S} ^ {\mathtt {B N}} (f ^ {\mathtt {B N}} ((R _ {n} ^ {\mathtt {B N}} v)) \mathbb {1} _ {D}) = S ^ {\mathtt {B N}} (f ^ {\mathtt {B N}} ((R _ {n} ^ {\mathtt {B N}} v))). +$$ + +The statement follows. + +# C. Experimental Settings + +We adopt the same experimental setting as in the PDEBench repository (Takamoto et al., 2022). For the sake of information, we recall the considered problems and PDEs and the specific settings we consider when appropriate. The learning procedure used is presented at the end of this section. + +# C.1.1D Advection Equation + +The advection equation is a linear Partial Differential Equation (PDE) modeling the transport of a fluid quantity $u$ , namely its velocity field, defined by the following equation: + +$$ +\partial_ {t} u (x, t) + \beta \partial_ {x} u (x, t) = 0, \quad x \in (0, 1), t \in (0, 2 ], \tag {20} +$$ + +$$ +u (x, 0) = u _ {0} (x), x \in (0, 1), \tag {21} +$$ + +with $\beta$ a constant advection speed. Note that this system admits an exact solution: $u(t,x) = u_0(x - \beta t)$ . + +For this dataset, we follow the setting given in Takamoto et al. (2022), Section D.1 by taking $\beta = 0.4$ . We learn the mapping between the value of the field at $t = 0$ ( $u(x,0)$ ) and the value at time $t = 2$ ( $u(x,2)$ ), i.e. we learn the mapping between the first and the last temporal value of each sample. + +# C.2.1D Burgers Equation + +The Burgers' equation is a PDE describing the nonlinear advection and diffusion of a velocity field, defined as follows: + +$$ +\partial_ {t} u (x, t) + \partial_ {x} \left(u ^ {2} (x, t) / 2\right) = \nu / \pi \partial_ {x x} u (x, t), \quad x \in (0, 1), t \in (0, 2 ], \tag {22} +$$ + +$$ +u (x, 0) = u _ {0} (x), x \in (0, 1), \tag {23} +$$ + +where $\nu$ is the diffusion coefficient, which is assumed to be constant in this dataset. + +We follow again the setup presented in Takamoto et al. (2022), section D.2, with $\nu = 0.001$ . As in the previous dataset, we learn the mapping from the field at $t = 0$ as input to the field at $t = 2$ as target. + +# C.3. 1D Compressible Navier-Stokes Equations (1D NS) + +The compressible Navier-Stokes equations describe the motion of viscous fluids that can change in density due to compression or expansion. This can be described through the following partial differential equations: + +$$ +\partial_ {t} \sigma + \partial_ {x} \cdot (\sigma \mathbf {u}) = 0, \tag {24} +$$ + +$$ +\sigma \left(\partial_ {t} \mathbf {u} + \mathbf {u} \cdot \partial_ {x} \mathbf {u}\right) = - \partial_ {x} p + \eta \triangle \mathbf {u} + (\zeta + \eta / 3) \partial_ {x x} \mathbf {u}), \tag {25} +$$ + +$$ +\partial_ {t} \left(\epsilon + \sigma v ^ {2} / 2\right) + \partial_ {x} \cdot \left[ \left(p + \epsilon + \sigma v ^ {2} / 2\right) \mathbf {u} - \mathbf {u} \cdot \sigma^ {\prime} \right] = \mathbf {0}, \tag {26} +$$ + +where $\sigma$ is the mass density, $\mathbf{u} = \mathbf{u}(\mathbf{x},\mathbf{t})$ is the fluid velocity, $p$ is the gas pressure, $\epsilon$ is an internal energy described by the equation of state, $\sigma^{\prime}$ is the viscous stress tensor, and $\eta$ and $\zeta$ are shear and bulk viscosity, respectively. + +In our experiments, we consider the setup introduced in Takamoto et al. (2022), Section D.5, fixing $\eta = 10^{-8}$ , $\zeta = 10^{-8}$ and out-going boundary conditions. We learn the mapping of the velocity $\mathbf{v}$ from time $t = 10$ as input to time $t = 11$ as target. For this dataset, we added a symmetrical padding preprocessing to replicate periodic boundary conditions (as prescribed in the original FNO code (Li et al., 2021a)). + +# C.4. 2D Incompressible Navier-Stokes Equations (2D NS) + +We also consider a dataset from the 2D Navier-Stokes equation for a viscous, incompressible fluid in vorticity form on the unit torus (Li et al., 2021a) defined as follows: + +$$ +\begin{array}{l} \partial_ {t} w (x, t) + u (x, t) \cdot \nabla w (x, t) = \nu \Delta w (x, t) + f (x), \quad x \in (0, 1) ^ {2}, t \in (0, T _ {\text {f i n a l}} ] \\ \nabla \cdot u (x, t) = 0, \quad x \in (0, 1) ^ {2}, t \in (0, T _ {\text {f i n a l}} ] \tag {27} \\ w (x, 0) = w _ {0} (x), \quad x \in (0, 1) ^ {2} \\ \end{array} +$$ + +with $u$ is the 2D velocity field, $w = \nabla \times u$ is the vorticity, $w_0:(0,1)^2;\to \mathbb{R}$ is the initial vorticity function, $\nu \in \mathbb{R}_+$ is the viscosity coefficient, and $f:(0,1)^2\rightarrow \mathbb{R}$ is the forcing function. + +We follow the setup introduced in Li et al. (2021a), Section A.3.3, with $\nu = 10^{-3}$ and $\nu = 10^{-4}$ . We learn the mapping of the velocity field $\mathbf{v}$ from sample time $t = 10$ to $t = 45$ for $\nu = 10^{-3}$ and from $t = 10$ to $t = 15$ for $\nu = 10^{-4}$ . + +# C.5. Darcy Flow + +We consider a dataset based on the steady state of the 2D Darcy Flow equation on the unit square, representing the flow through porous media and defined as follows: + +$$ +- \nabla (a (x) \nabla u (x)) = f (x), \quad x \in (0, 1) ^ {2}, \tag {28} +$$ + +$$ +u (x) = 0, \qquad x \in \partial (0, 1) ^ {2}. +$$ + +We follow the setup described in Takamoto et al. (2022), Section D.4, with $f(x)$ fixed to the constant $\beta = 0.1$ . + +# C.6. FNO Baselines + +In this section, we further detail the FNO improvements considered as baselines. + +F-FNO (Tran et al., 2023). The factorized FNO is a particularly relevant baseline for comparison, as it i) incorporates skip-like connections that share similarities with our additional $\sigma^{-1}$ term and ii) also seeks to enable the development of deeper FNO architectures. We consider the best-performing F-FNO model (as identified by its authors), trained using our optimization strategy and adapted to our specific learning task. It is important to note that F-FNO was originally designed for predicting mappings between multiple consecutive time steps (e.g., from $t$ to $t + 1$ ) and it offers the option to rely on techniques such as the Markov assumption and teacher forcing. Since our task involves predicting the final state directly from the initial conditions, those techniques are not appropriate, and thus we did not include them in the implementation. Additionally, we have found that the original optimization strategy proposed by the F-FNO authors (AdamW with cosine annealing, noise injection and input normalization) did not perform well on our tasks, so we also employed the optimization strategy detailed in Appendix C.6. + +ResFNO. Moreover, to isolate the impact of residual connections from the broader structural modifications introduced by F-FNO, we have also implemented and compared a ResNet-inspired variant of FNO, referred to as ResFNO. We did this to better understand the role of the residual connection. + +# C.7. Learning procedure + +Models are trained using the Adam optimizer with a constant learning rate, a batch size of 128 for 1D problems (resp. 16 for 2D problems), a maximum of 2000 epochs and an early stopping strategy with patience of 250 epochs and $\delta = 10^{-3}$ . The learning rate is validated on a grid of multiple values equally spaced in logarithmic scale. If not mentioned otherwise, we use 8000 (resp. 1000) training samples for 1D (resp. 2D) problems, and 1000 samples each for validation and testing. All results are averaged over four random splittings. + +Experiments have been made on an internal clusters of GPUs with memory from 10Go to 45Go. All the experiments can be achieved with GPUs with a memory of 10Go, except for models with 32 or 64 layers which require at least a memory of 24Go. + +A summary of the experimental setting along with some learning hyperparameter is detailed in Table 2. + +Table 2: Experimental settings. + +
DatasetNumber of modesBatch sizeWidthTinitTfinalTrain samples
1D Advection[16]1286402008000
1D Burgers[16]1286402008000
1D NS[16]1286410118000
2D NS (10-4)[12,12]163210151000
2D NS (10-3)[12,12]163210451000
2D Darcy[12,12]1632--1000
+ +# D. Additional Results + +# D.1. Comparison of Predictions + +In this section, we visually inspect to what extent the prediction made by FNO, ResFNO and BFNO is close to the ground truth. We provide three examples on the Navier Stokes dataset with viscosity $10^{-4}$ where we have selected the best performing models. + +![](images/ed0f83d13b1969ea3e24e4ae113ba555f4e8b1eecf5cb8042b0cdbbf9e7155b5.jpg) +(a) Predictions +Figure 8: Predictions and residuals for Navier Stokes $10^{-4}$ . + +![](images/84b91ae2dab2279f940cc22cc9e31fb5352a3013b543be56f11229be21241fd2.jpg) +(b) Residuals + +# D.2. Extension to Wavelet Neural Operators + +We also extended our experiments to Wavelet Neural Operators (WNO). In Table 3 is reported the comparison between standard WNO and the Bregman version BWNO. We can observe similar results as Fourier models, where our models outperform the standard models and are able to gain performance when increasing the number of layers. Furthermore, even with gradient clipping, 32 and 64-layer standard models could not converge during training, leading to $100\%$ relative error rate. Further analysis shows that this divergence can be linked with the high error rates on low frequencies and boundary conditions. + +# D.3. Detailed Analysis of the Prediction Performance + +In the same spirit of Takamoto et al. (2022), we include several metrics providing a deeper understanding of the models' behavior, including relative mean squared error on the boundary (rMSE) as well as in the low, mid, and high frequency bands (fRMSE low, fRMSE mid, fRMSE high). Results are provided in Table 4. + +Table 3: Relative error of WNO and BWNO models on benchmark PDEs. + +
1D Advection1D Burgers1D NS
WNOBWNOWNOBWNOWNOBWNO
4 layers3.0 ± 0.0%2.8 ± 0.2%21.5 ± 0.5%21.3 ± 0.4%59.2 ± 0.6%58.3 ± 0.6%
8 layers2.5 ± 0.1%2.1 ± 0.1%19.1 ± 0.6%17.9 ± 0.6%59.0 ± 0.6%58.0 ± 0.6%
16 layers3.9 ± 0.8%2.0 ± 0.2%19.7 ± 0.5%16.4 ± 0.3%61.1 ± 0.6%57.6 ± 0.7%
32 layers100 ± 0%1.9 ± 0.1%100 ± 0%16.4 ± 0.5%100 ± 0%57.2 ± 0.6%
64 layers100 ± 0%1.8 ± 0.2%100 ± 0%16.1 ± 0.4%100 ± 0%57.5 ± 0.6%
+ +Table 4: Additional comparison of the performance in terms of relative $\ell^2$ error (rMSE), relative mean squared error on the boundary (rMSE) as well as in the low, mid and high frequency bands (fRMSE low, fRMSE mid, fRMSE high). + +
T=4T=8T=16
PDEMetricBFNOFNOBFNOFNOBFNOFNO
ID AdvectionrMSE1.55·10-22.43·10-21.45·10-23.22·10-21.43·10-24.38·10-2
bRMSE9.04·10-21.21·10-18.28·10-21.51·10-17.82·10-22.43·10-1
fRMSE low4.56·10-69.38·10-64.45·10-61.14·10-54.21·10-61.93·10-5
fRMSE mid3.89·10-66.81·10-63.39·10-68.84·10-63.61·10-61.27·10-5
fRMSE high3.15·10-74.87·10-72.89·10-75.96·10-72.76·10-78.08·10-7
ID BurgersrMSE8.24·10-28.28·10-25.83·10-28.16·10-24.67·10-27.92·10-2
bRMSE3.83·10-13.69·10-12.41·10-13.65·10-11.85·10-13.72·10-1
fRMSE low5.18·10-54.88·10-53.01·10-54.52·10-52.37·10-54.88·10-5
fRMSE mid3.41·10-53.44·10-52.52·10-53.61·10-52.01·10-53.29·10-5
fRMSE high1.17·10-61.32·10-61.01·10-61.33·10-68.71·10-71.29·10-6
ID NS (10-8)rMSE4.91·10-15.05·10-14.90·10-15.22·10-14.86·10-15.35·10-1
bRMSE2.16·1002.44·1002.06·1002.85·1001.95·1003.18·100
fRMSE low2.65·10-42.78·10-42.65·10-42.86·10-42.57·10-42.91·10-4
fRMSE mid2.19·10-42.26·10-42.18·10-42.34·10-42.13·10-42.43·10-4
fRMSE high1.12·10-51.11·10-51.11·10-51.13·10-51.21·10-51.13·10-5
2D Darcy*rMSE9.99·10-11.00·1009.96·10-11.01·1001.00·1001.02·100
bRMSE1.45·10-21.47·10-21.43·10-21.52·10-21.41·10-21.40·10-2
fRMSE low6.41·10-46.44·10-46.35·10-46.45·10-46.37·10-46.52·10-4
fRMSE mid3.29·10-53.21·10-53.23·10-53.17·10-53.15·10-53.23·10-5
fRMSE high1.68·10-61.99·10-61.86·10-61.99·10-61.73·10-62.01·10-6
2D NS (10-3)rMSE5.49·10-15.65·10-15.23·10-15.48·10-15.41·10-15.46·10-1
bRMSE2.88·10-22.97·10-22.75·10-22.92·10-22.83·10-22.84·10-2
fRMSE low5.82·10-45.98·10-45.59·10-45.76·10-45.75·10-45.70·10-4
fRMSE mid1.46·10-41.41·10-41.13·10-41.27·10-41.11·10-41.07·10-4
fRMSE high1.31·10-58.69·10-69.87·10-68.37·10-61.01·10-51.14·10-5
2D NS (10-4)rMSE1.31·1001.34·1001.25·1001.38·1001.23·1001.43·100
bRMSE7.03·10-27.16·10-26.74·10-27.45·10-26.68·10-27.73·10-2
fRMSE low9.54·10-41.00·10-39.42·10-49.94·10-49.22·10-41.11·10-3
fRMSE mid7.34·10-47.51·10-46.93·10-47.89·10-46.83·10-47.98·10-4
fRMSE high1.29·10-41.33·10-41.22·10-41.43·10-41.21·10-41.48·10-4
+ +# D.4. Impact of the Activation Function + +A limitation of our framework is the fact that it requires Bregman variants (such as BFNO) to have a strictly monotonic activation function, which excludes a few functions such as ReLU. This justifies why in our experiments we used Softplus as a surrogate of ReLU. On the contrary, for classical neural operators within our framework, the activation function only needs to be monotonic, not strictly monotonic. Therefore, ReLU is still valid and can be used. + +As a thought experiment, we also implemented BFNO with ReLU and evaluated it on the 2D Navier-Stokes dataset $(\nu = 10^{-4})$ . Table 5 shows that BFNO with ReLU achieves comparable or better performance than Softplus for the same number of layers. However, the best results are the same (i.e., $12.2\%$ for 16 layers). + +
Architecture4 layers8 layers16 layers
FNO (ReLU)13.5 ± 0.113.0 ± 0.112.6 ± 0.1
BFNO (Softplus)13.7 ± 0.112.6 ± 0.112.2 ± 0.1
BFNO (ReLU)13.4 ± 0.212.2 ± 0.212.2 ± 0.1
+ +# D.5. Impact of Batch Normalization + +For all the experiments presented in the previous sections, we relied on the latest available version of the FNO implementation, which does not include Batch Normalization (BN), while it was used in the original FNO paper (Li et al., 2021a). We note that the original FNO code was removed from the GitHub repository by its author (i.e., the 'master' branch was deleted). While we retrieved an earlier version of the code, we observed that BN was implemented in the initial commit but was subsequently removed in a later commit titled "remove unnecessary batchnorm", suggesting that adding BN layers does not lead to better prediction performance. + +To complement our results, we have conducted an experiment with BN for both FNO and BFNO architectures on the 2D Navier-Stokes dataset $(\nu = 10^{-4})$ . Results, reported in Table 6, show marginal improvements for 8-layer models (FNO: $13.0\% \rightarrow 12.8\%$ , BFNO: $12.6\% \rightarrow 12.4\%$ ) but no consistent benefits for other configurations. This aligns with the conclusion of the recent FNO implementations that removed BN. + +Table 5: Comparison BFNO with Softplus or ReLU. + +
Architecture4 layers8 layers16 layers
FNO13.5 ± 0.113.0 ± 0.112.6 ± 0.1
FNO + BN13.5 ± 0.112.8 ± 0.212.6 ± 0.1
BFNO13.7 ± 0.112.6 ± 0.112.2 ± 0.1
BFNO + BN13.5 ± 0.112.4 ± 0.012.3 ± 0.1
+ +Table 6: Impact of BatchNormalization (BN) with FNO and BFNO \ No newline at end of file diff --git a/abregmanproximalviewpointonneuraloperators/images.zip b/abregmanproximalviewpointonneuraloperators/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2c2fd0c766337fb32ecb25fe54ff99ce5db931d5 --- /dev/null +++ b/abregmanproximalviewpointonneuraloperators/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ba4a9485332483dd8a13e504d819e72adbdf0b7735bca119342c1bc148ef7d5 +size 1412442 diff --git a/abregmanproximalviewpointonneuraloperators/layout.json b/abregmanproximalviewpointonneuraloperators/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c265b5cadfb29e117ecf0d3042134dd547214a71 --- /dev/null +++ b/abregmanproximalviewpointonneuraloperators/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80305a8ca04c63bbee318ff572d0d75ef9275c7a7483fa047d168aab9f57d35e +size 1441546 diff --git a/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/0e23178b-8568-443c-bfa1-332da3097a69_content_list.json b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/0e23178b-8568-443c-bfa1-332da3097a69_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..790bf61e08efde4eed934462d1969b4d40feddd8 --- /dev/null +++ b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/0e23178b-8568-443c-bfa1-332da3097a69_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:600c721f007397c1bfbf3f948635f0fa6f13bbe624e35b1014faa951b28444cc +size 102541 diff --git a/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/0e23178b-8568-443c-bfa1-332da3097a69_model.json b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/0e23178b-8568-443c-bfa1-332da3097a69_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a2cea54deba3062505fa8f91f409670d9edaeca9 --- /dev/null +++ b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/0e23178b-8568-443c-bfa1-332da3097a69_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a47f02cb24e8a3c40e90c3ce0ddc1454c7a812c7e55cebaea22bd2f2d05d9cd +size 121656 diff --git a/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/0e23178b-8568-443c-bfa1-332da3097a69_origin.pdf b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/0e23178b-8568-443c-bfa1-332da3097a69_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4e9b9e31c0202c09a3f15388dd8d357a0b0357bb --- /dev/null +++ b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/0e23178b-8568-443c-bfa1-332da3097a69_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88135e07e5d8ca02d8af73a13122f297e8f6a821ee2cc6bcdde7de550c4acd99 +size 2552532 diff --git a/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/full.md b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/full.md new file mode 100644 index 0000000000000000000000000000000000000000..eebb70bc6ff245cfe376e796bdbfc1898424b986 --- /dev/null +++ b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/full.md @@ -0,0 +1,473 @@ +# A Causal World Model Underlying Next Token Prediction: Exploring GPT in a Controlled Environment + +Raanan Y. Rohekar $^{*1}$ Yaniv Gurwicz $^{*1}$ Sungduk Yu $^{1}$ Estelle Aflalo $^{1}$ Vasudev Lal + +# Abstract + +Are generative pre-trained transformer (GPT) models, trained only to predict the next token, implicitly learning a world model from which sequences are generated one token at a time? We address this question by deriving a causal interpretation of the attention mechanism in GPT and presenting a causal world model that arises from this interpretation. Furthermore, we propose that GPT models, at inference time, can be utilized for zero-shot causal structure learning for input sequences, and introduce a corresponding confidence score. Empirical tests were conducted in controlled environments using the setups of the Othello and Chess strategy games. A GPT, pre-trained on real-world games played with the intention of winning, was tested on out-of-distribution synthetic data consisting of sequences of random legal moves. We find that the GPT model is likely to generate legal next moves for out-of-distribution sequences for which a causal structure is encoded in the attention mechanism with high confidence. In cases where it generates illegal moves, it also fails to capture a causal structure. + +# 1. Introduction + +In recent years, the generative pre-trained transformer (GPT) model (Radford et al., 2018) has demonstrated high-quality generative capabilities, as perceived by humans. Although this model is trained to generate one token at a time, it has been demonstrated to perform a range of tasks beyond next-token prediction, such as visual understanding and symbolic reasoning (Liu et al., 2024; Team et al., 2023; Chowdhery et al., 2023). Are these emergent abilities (Li et al., 2023) or are they merely a 'mirage' resulting from the choice of metric and task (Schaeffer et al., 2024)? + +*Equal contribution . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +In this paper, we suggest that there is no restriction in the GPT architecture that prevents it from learning conditional independence (CI) relations between tokens in a sequence. Moreover, under certain assumptions, a causal structure is directly entailed from these CI relations. One may ask whether this lack of restriction results in implicitly learning a causal model of the world during the pre-training procedure of GPT. Assuming that both a causal world model and a model based on surface statistics are sufficient solutions, one possibility is that a causal world model is more compact and more likely to be learned during pre-training, in line with Occam's razor. For example, if weights are distributed from a uniform distribution in the surface statistics model, then a causal structure limits the range of their distribution. If so, what assumptions underlie this causal world model? + +Rohekar et al. (2024) recently proposed ABCD, a method for causal interpretation of unmasked self-attention in BERT models (Devlin et al., 2019), demonstrating its use in explaining movie recommendations (Nisimov et al., 2022). We take a similar approach, with key differences, and propose a causal interpretation of GPT's masked attention mechanism. Furthermore, we define a corresponding causal world model. ABCD is adapted to learn causal structures, where the induced dependency relations are encoded in GPT's attention matrices. We then ask whether errors generated by GPT are correlated with the uncertainty in representing the causal structure by the attention matrices. To this end, we define a metric based on the entropy of $p$ -values from CI tests used for inferring the causal structures. + +# 2. Related Work + +Recent work has examined the internal process of large language models and investigated whether a world model is implicitly learned using a well-defined and constrained setting, such as in Chess (Toshniwal et al., 2022) and Othello (Li et al., 2023) games environments. For the Othello board game setting, Li et al. (2023) demonstrated that the board state can be inferred from attention matrices in GPT, and Nanda et al. (2023) showed that a linear classifier suffices to reconstruct the board state from these attention matrices. They claim the emergence of a world model in GPT. Nevertheless, they do not explain how the board game is + +![](images/9ea98ae6366ebd3b056f0020cf58eddcf682291e19c13ffd765b54ccf8a3df4b.jpg) +(I) Learned causal graph + +![](images/016dd60e037891d6f43246fe538e54835221612a3eb6e434dc52614c73c9db42.jpg) +(II) Initial state + +![](images/2e27f21856823d5d998d2e85edbf4eee13ba4cf63160e4f907c86503a9327efa.jpg) +(III) After move 0 + +![](images/a2a0b93d1de7c05b4bb961a03da30ce4e7ed0d416da358ff4abfae764c3cf86f.jpg) +(IV) After move 1 + +![](images/6912a7e72cbfa8e026497374eeb3dda428c968309916d691003a2fb0816bdb9e.jpg) +(V) After move 2 + +![](images/b28898bf33354a877af64e58c475cc1fb5615f315603de557e57b3bf81190d44.jpg) +(VI) After move 3 + +![](images/40421282c9519c1c09054eefbe6417752c0ff715a16db5f2247ad22a70eeec2a.jpg) +Figure 1. An example of a real Othello game sequence and the corresponding causal structure recovered using the proposed method. Red numbering $\{0,1,2,3\}$ on the causal graph nodes and game board discs corresponds to the indices of the game moves. The blueish letters $\{a,b,c,d\}$ indicate the discs in the initial state of the board game. (I) The causal graph learned by our method given the sequence of moves described hereafter. (II) The initial state of the board. (III) After move 0: Black plays and flips disc 'd' to black. (IV) After move 1: White plays and flips disc 'c' to white. This move does not depend on the previous move 0, and it aligns with the learned causal graph where node '1' is found independent of node '0'. (V) After move 2: Black plays and flips disc 'a' to black. This was made possible since disc 'd' had been flipped to black in the earlier move 0 (this causal link is indicated by a yellow arrow). Correspondingly, this causal link is also revealed in the learned causal graph by node '0' being the sole parent of node '2'. (VI) After move 3: White plays and flips disc 'd' to white. This was made possible because disc '1' was white (due to move 1), and disc 'd' was black (as mentioned before, it was flipped to black earlier in move 0). Therefore we expect both moves 0 and 1 to be the causes of move 3 (as indicated by yellow arrows). This is exactly revealed by the learned causal graph. +Figure 2. An example of a Chess game sequence and the corresponding casual structure recovered using the proposed method. It is evident that first move (Move 0), played by White, enables playing Move 2 (a directed edge from node 0 to node 2). In addition playing Move 0 led Black to play Move 3 (a directed edge from node 0 to node 3). These moves led to Move 4 (directed edges from nodes 0 and 3 into 4. + +![](images/4746a0b7a82aedabcd418adfaca674a1248271458cce5dda93c9249521e3d21b.jpg) +(I) Learned causal graph +(II) After move 0 + +![](images/6c05c11dfbeff36e56a7466256e0e3f8655c8d84b7eb52c6630203e63e310867.jpg) +(III) After move 1 + +![](images/0585f757378b5514e0eea64add2b99bc8b2810be58fa13675a175a250cee0ca8.jpg) +(IV) After move 2 + +![](images/314c99877b2c6062c38e0af35991c02491c2f2f67da04f2fe2113a844f7b5e68.jpg) +(V) After move 3 + +![](images/bccdc991235245285d00397d74af78d1dc50f65253a7fe77ca5822b41e378409.jpg) +(VI) After move 4 + +encoded within the attention matrices, nor why the attention mechanism can represent the board state. In essence, they do not provide an explanation for the apparent emergence of the world model. Furthermore, their reconstructed world model (the board game state) applies only to the domain for which the GPT model was trained and lacks the generative mechanism underlying the token sequences. + +In this paper, we consider the structural causal model as a general-purpose world model that describes the generative process that is applicable across various domains (not specific to a single task, such as the board state in Othello or Chess). We explore whether GPT is capable of capturing properties of this world model, which may help explain its apparent emergence. See an example for Othello in Figure 1 and for Chess in Figure 2. + +# 3. Preliminaries + +In this section, we provide the notations and descriptions for self-attention in the GPT architecture, as well as for struc + +tural causal models. Matrices are written in bold, vectors in bold-italic, and models in calligraphic font. A summary of the main symbols used in this paper is provided in Table 1. + +# 3.1. Attention in GPT + +Attention is a mechanism that estimates network weights with respect to the context in an input sequence of tokens (Schmidhuber, 1992). In a GPT model, which is based on the decoder part of the Transformer architecture (Vaswani et al., 2017), an attention layer estimates an $n \times n$ lower-triangular (masked) attention matrix $\mathbf{A}$ given an input sequence of $n$ tokens. The input sequence is in the form of an $n \times d$ matrix $\mathbf{Y}$ , where the $i$ -th row vector $\mathbf{Y}(i, \cdot)$ is an embedding (representation) of the $i$ -th token in $d$ dimensions. The attention matrix is estimated by $\mathbf{A} = \text{softmax}(\mathbf{Y} \mathbf{W}_{QK} \mathbf{Y}^{\top})$ , where $\mathbf{A}$ is lower triangular and each row sums to $1^{1}$ . In addition to the attention weights, + +Table 1. Main notations used in the analogy between attention in GPT and SCM. The first set of symbols represents entities in GPT, and the second set represents entities in SCM. + +
SymbolDescription
Zioutput embedding of input symbol i, Zi ≡ Z(i, ·), in attention layer
Vivalue vector corresponding to input i, Vi ≡ V(i, ·), in attention layer
Aattention matrix
TTransformer neural network
WV, WQKlearnable weight matrices in GPT
Xia random variable representing node i in an SCM
Uilatent exogenous random variable i in an SCM
Gweighted adjacency matrix of an SCM
Gcausal graph structure
+ +the attention layer calculates a value matrix, $\mathbf{V} = \mathbf{Y}\mathbf{W}_V$ where row $\mathbf{V}(i,\cdot)$ is the value vector of the $i$ -th token. Then, the output embeddings are + +$$ +\mathbf {Z} = \mathbf {A V}, \tag {1} +$$ + +where the $i$ -th row, $\mathbf{Z}_i$ , is the embedding of the $i$ -th output token. In a GPT, several attention layers are stacked and pre-trained such that the $i$ -th output embedding in the last layer predicts the $(i + 1)$ -th input token. That is, it predicts the next token in the sequence. + +It is important to note that, in the GPT architecture, the embedding of one token is influenced by another token only by the attention matrix, $\mathbf{A}$ . In addition, note that an attention matrix $\mathbf{A}$ is estimated uniquely for each input sequence of tokens, using weight matrices $\{\mathbf{W}_{QK},\mathbf{W}_V\}$ that are learned commonly for all in-distribution input sequences. + +# 3.2. Structural Causal Model + +A structural causal model (SCM) is a model that can encode causal mechanisms in a domain (Pearl, 2009; Spirtes et al., 2000; Peters et al., 2017) and explain data samples generated from these causal mechanisms (Pearl & Mackenzie, 2018). An SCM is a tuple $\{U, X, \mathcal{F}, P(U)\}$ , where $U = \{U_1, \ldots, U_m\}$ is a set of latent exogenous random variables, $X = \{X_1, \ldots, X_n\}$ is a set of endogenous random variables, $\mathcal{F} = \{f_1, \ldots, f_n\}$ is a set of deterministic functions describing the values $X$ given their direct causes, and $P(U)$ is the distribution over $U$ . Moreover, each endogenous variable $X_i$ has exactly one unique exogenous cause $U_i$ ( $m = n$ ). The value of an endogenous variable $X_i, \forall i \in [1, \ldots, n]$ is determined by + +$$ +X _ {i} \leftarrow f _ {i} \left(\boldsymbol {P} \boldsymbol {a} _ {i}, U _ {i}\right), \tag {2} +$$ + +where $P a_{i}$ is the set of direct causes (parents in the causal graph) of $X_{i}$ , and left-arrow indicates assignment resulting from the cause-effect relation. A graph $\mathcal{G}$ corresponding + +to an SCM consists of one node per variable, and directed edges representing direct causal relations evident from $\mathcal{F}$ . + +In this paper, we relate the linear inter-token relations in GPT attention (Equation 1) to a corresponding linear-Gaussian SCM having directed acyclic graphs (DAG). In these SCM models, each variable is determined by a linear combination of its direct causes and an independently distributed additive noise represented by a corresponding normally distributed exogenous variable. For a linear-Gaussian SCM, let $\mathbf{G}$ be a weight matrix, where $\mathbf{G}(i,j)$ is the weight of the parent (direct cause) node $X_{j}$ linearly determining the child (direct effect) node $X_{i}$ . Node $X_{k}$ is not a parent of $X_{i}$ if and only if $\mathbf{G}(i,k) = 0$ . In addition, $U \sim \mathcal{N}(\boldsymbol{\mu}_U, \mathbf{C}_U)$ , where in this paper, we assume $\mathbf{C}_U$ is a diagonal matrix. The set of functions $\mathcal{F}$ is defined such that $\forall i \in [1,\dots,n]$ , + +$$ +X _ {i} \leftarrow \mathbf {G} (i, \cdot) \mathbf {X} + U _ {i}. \tag {3} +$$ + +Assuming a DAG and causally sorted nodes (ancestors precede their descendants), $\mathbf{G}$ is strictly lower triangular (zeros on the diagonal). Given the assignment, we can write in matrix form $\boldsymbol {X} = \mathbf{G}\boldsymbol {X} + \boldsymbol{U}$ , and + +$$ +\boldsymbol {X} = (\mathbf {I} - \mathbf {G}) ^ {- 1} \boldsymbol {U}. \tag {4} +$$ + +As $\mathbf{G}$ is a strictly lower-triangular weight matrix, $(\mathbf{I} - \mathbf{G})^{-1}$ is a lower uni-triangular matrix (ones on the diagonal). Note that this is equal to the sum of a geometric series + +$$ +\left(\mathbf {I} - \mathbf {G}\right) ^ {- 1} = \sum_ {k = 0} ^ {n - 1} \mathbf {G} ^ {k}. \tag {5} +$$ + +It can be seen that element $(i,j)$ represents the cumulative effect of $X_{j}$ on $X_{i}$ via all directed paths of length up to $n - 1$ . The equivalent weight of a directed path from $X_{j}$ to $X_{i}$ is the product of the weights of all edges along that path. The cumulative effect is the sum of the equivalent weights of distinct directed paths from $X_{j}$ to $X_{i}$ . Note that even if some of the nodes are latent confounders, $(\mathbf{I} - \mathbf{G})^{-1}$ is still + +triangular because, by definition, latent confounders have no ancestors and precede other nodes in a causal ordering. Equation 4 represents a system with input $\mathbf{U}$ , output $\mathbf{X}$ , and weights $(\mathbf{I} - \mathbf{G})^{-1}$ . The covariance matrix of the output is + +$$ +\begin{array}{l} \mathbf {C} _ {\boldsymbol {X}} = \mathbb {E} [ (\boldsymbol {X} - \boldsymbol {\mu} _ {\boldsymbol {X}}) (\boldsymbol {X} - \boldsymbol {\mu} _ {\boldsymbol {X}}) ^ {\top} ] = \\ = \mathbb {E} \left[ (\mathbf {I} - \mathbf {G}) ^ {- 1} \hat {\boldsymbol {U}} \hat {\boldsymbol {U}} ^ {\top} ((\mathbf {I} - \mathbf {G}) ^ {- 1}) ^ {\top} \right] = (6) \\ = \left[ (\mathbf {I} - \mathbf {G}) ^ {- 1} \right] \mathbb {E} \left[ \hat {\boldsymbol {U}} \hat {\boldsymbol {U}} ^ {\top} \right] \left[ (\mathbf {I} - \mathbf {G}) ^ {- 1} \right] ^ {\top} = (6) \\ = \left[ (\mathbf {I} - \mathbf {G}) ^ {- 1} \right] \mathbf {C} _ {U} \left[ (\mathbf {I} - \mathbf {G}) ^ {- 1} \right] ^ {\top}, \\ \end{array} +$$ + +where $\hat{U} = U - \mu_U$ and $\pmb{\mu}_{\pmb{X}} = (\mathbf{I} - \mathbf{G})^{-1}\pmb{\mu}_{\pmb{U}}$ + +In this paper, we employ a constraint-based causal discovery approach (Spirtes et al., 2000) that uses conditional independence (CI) tests to learn the underlying causal graph. This approach generally requires assuming the causal Markov property and faithfulness. + +Definition 3.1 (Causal Markov). In a causally Markov graph, a variable is independent of all other variables, except its effects, conditional on all its direct causes. + +Definition 3.2 (Faithfulness). A distribution is faithful to a graph if and only if every independence relation true in the distribution is entailed by the graph. + +# 4. A Causal Interpretation of GPT + +We first describe a relation between GPT and SCM. Then, we present an efficient method for zero-shot causal structure learning—in the presence of latent confounders—for a given input sequence, using a modified version of the ICD algorithm (Rohekar et al., 2021). Finally, we introduce a confidence scoring function for learned causal structures that uses $p$ -values computed during causal discovery. + +# 4.1. A Relation between GPT and SCM World Model + +Rohekar et al. (2024) derived a causal interpretation of BERT (Devlin et al., 2019). We follow a similar approach, with several important modifications and extensions, to derive an SCM-based causal interpretation of GPT. The derived relation between GPT and SCM is threefold (Figure 3): + +1. 'Values Matrix' as instances of SCM exogenous nodes, +2. output embeddings as observations of SCM endogenous nodes, and +3. attention matrix as a transitive closure of the SCM graph. + +First, unlike BERT-based models, which are pre-trained to predict masked tokens within the input sequence using the surrounding tokens (Devlin et al., 2019), GPT is pretrained to predict the next tokens in the sequence. That + +is, given an input sequence of tokens, $\{t_0,\dots ,t_{n - 1}\}$ GPT predicts tokens $\{\hat{t}_1,\dots ,\hat{t}_n\}$ . An attention matrix $\mathbf{A}$ and the corresponding values matrix $\mathbf{V}$ have $n$ rows corresponding to input tokens $\{t_0,\dots ,t_{n - 1}\}$ , and the output embeddings of these tokens are the rows of matrix $\mathbf{Z} = \mathbf{A}\mathbf{V}$ . Note that $\mathbf{V} = \mathbf{Y}\mathbf{W}_V$ , where $\mathbf{W}_V$ is a weight matrix fixed for all input sequences, and $\mathbf{Y}$ is the input embedding of the tokens in a specific sequence. Each column of $\mathbf{W}_V$ can be viewed as an independent vector onto which the input embeddings are projected. That is, $\mathbf{V}(i,j)$ is the projection of the input embedding of token $t_i$ , $\mathbf{Y}(i,\cdot)$ , onto the vector $\mathbf{W}_V(\cdot ,j)$ , which is common to all in-distribution sequences. At inference, each attention matrix of the last attention layer, $\mathbf{A}$ , is extracted and a lower uni-triangular matrix is calculated, $\mathbf{D}^{-1}\mathbf{A}$ , where $\mathbf{D}\equiv \mathrm{diag}(\mathbf{A})$ . Then the covariance matrix is estimated + +$$ +\mathbf {C} = \left[ \mathbf {D} ^ {- 1} \mathbf {A} \right] \left[ \mathbf {D} ^ {- 1} \mathbf {A} \right] ^ {\top}. \tag {7} +$$ + +Note that, unlike Rohekar et al. (2024), who proposed $\mathbf{C} = \mathbf{A}\mathbf{A}^{\top}$ for unmasked self-attention, we utilize the triangular form of masked attention in GPT to revert the attention normalization performed by the softmax and obtain a unit-triangular form. Thus, this covariance matrix allows us to treat properties calculated from different attention matrices in a similar manner. In this paper (Section 4.2 and Section 4.3), the properties we calculate are based on $p$ -values from tests of conditional independence between tokens, estimated from the covariance matrix. Next, following Rohekar et al. (2024), we relate each token to an endogenous node in an SCM, and assume $\mathbf{C}_U = \mathbf{I}$ from the central limit theorem. Thus, we equate the covariance $\mathbf{C} = \mathbf{C}_U$ : + +$$ +\left[ \mathbf {D} ^ {- 1} \mathbf {A} \right] \left[ \mathbf {D} ^ {- 1} \mathbf {A} \right] ^ {\top} = \left[ (\mathbf {I} - \mathbf {G}) ^ {- 1} \right] \left[ (\mathbf {I} - \mathbf {G}) ^ {- 1} \right] ^ {\top}, \tag {8} +$$ + +where both $\mathbf{D}^{-1}\mathbf{A}$ and $(\mathbf{I} - \mathbf{G})^{-1}$ are lower uni-triangular matrices. The $(i,j)$ elements, $\forall i > j$ , of these matrices have the same meaning: influence of token/node $j$ on token/node $i$ . Finally, since GPT is pre-trained to predict tokens $\{t_1,\dots ,t_n\}$ given input tokens $\{t_0,\dots ,t_{n - 1}\}$ , and since the only cross-token influence on embeddings is through the attention matrix, the last attention layer captures the causal structure underlying the output tokens. Earlier attention layers transform embeddings of $\{t_0,\dots ,t_{n - 1}\}$ to values, $\mathbf{V}$ , which are equivalent to instantiations of the exogenous variables, $\pmb{U}$ , in SCM. This follows from equating Equation 1 and Equation 4, where $\mathbf{D}^{-1}\mathbf{A} = (\mathbf{I} - \mathbf{G})^{-1}$ . That is, we equate the outputs: tokens' embeddings and SCM nodes' values. If some of the nodes are hidden confounders, then the corresponding rows and columns are removed, + +$$ +\mathbf {D} ^ {- 1} \mathbf {A} = \left[ \left(\mathbf {I} - \mathbf {G}\right) ^ {- 1} \right] _ {\dot {\mathbf {i}}, \dot {\mathbf {i}}}, \tag {9} +$$ + +where $i$ denotes the indices of nodes hidden in the world model ( $\hat{i}$ denotes the omission of the corresponding rows and columns). + +![](images/da79cb897915124a31d9888d398cc7fe58b52a70196a7f511b99943dedda1809.jpg) +Figure 3. Relations between GPT (left) and SCM (right), derived in Section 4.1. 'Values matrix' as exogenous variables in SCM: In the attention mechanism, the input embeddings matrix $\mathbf{Y}$ is multiplied by the column vectors $\mathbf{W}_V(\cdot ,i)$ of the weight matrix $\mathbf{W}_V$ to form the column vectors $V_{i}$ of the values matrix $\mathbf{V}$ . Each values vector $V_{i}$ is treated as an instantiation $u$ of the exogenous nodes in SCM, where element $j$ in $V_{i}$ is an instantiation of node $U_{j}$ . Output embeddings as observed nodes: Each values vector $V_{i}$ is multiplied by the attention matrix, resulting in a column vector $\mathbf{Z}_{i}$ of the output embedding. This corresponds to an observation of the endogenous nodes in SCM. Attention matrix as a transitive closure of a causal graph: An element $\mathbf{A}(i,j)$ in the attention matrix reflects the 'attention' given to token $j$ when computing the embedding of token $i$ . This corresponds to the influence that node $j$ has on node $i$ through all directed paths in the causal graph, as estimated by $(\mathbf{I} - \mathbf{G})^{-1} = \sum_k\mathbf{G}^k$ . If some nodes in SCM are hidden confounders, then the attention matrix reflects $[(I - G)^{-1}]$ after removing the rows and columns corresponding to the hidden nodes. + +In light of the causal interpretation of GPT, one important question is what causal world model the GPT architecture supports. Note that GPT's non-linear transformations do not affect inter-token relations. Often, a single causal structure is assumed to govern a domain. In contrast, the causal world model entailed by the causal interpretation of GPT assumes a distinct SCM for each sequence. Specifically, in a causal world model supported by a GPT with $k$ heads in the last attention layer, each sequence is assumed to be generated by an ensemble of $k$ SCMs. + +In addition, for a given head, the causal structure over a sequence of tokens $\{t_1,\dots ,t_n\}$ is identical to the corresponding subgraph over these tokens in all in-distribution extensions of the sequence. That is, given a sequence of tokens $\{t_1,\ldots ,t_n\}$ and a corresponding graph structure $\mathcal{G}_n$ observing any next token $t_{n + 1}$ , such that $\{t_1,\dots ,t_n,t_{n + 1}\}$ is in-distribution, should not violate the causal relations in $\mathcal{G}_n$ and may only reveal relations between tokens $\{t_1,\dots ,t_n\}$ and token $t_{n + 1}$ . + +# 4.2. GPT for Zero-Shot Causal Structure Learning + +The causal interpretation presented in this paper leads to a view in which each attention module captures associations (correlations) between input tokens that are induced + +by the underlying causal structure. Although this supports only rung-1 inference in the ladder of causation (Pearl & Mackenzie, 2018) many of the underlying causal relations can be extracted under certain assumptions—even in the presence of latent confounders and selection bias (Spirtes et al., 2000). These relations are generally represented in a type of causal structure known as a partial ancestral graph (PAG) (Richardson & Spirtes, 2002). We follow a procedure called ABCD, proposed by Rohekar et al. (2024), with several modifications. First, since the causal (topological) order is given (restricted by the masked attention in GPT), we can apply causal discovery recursively to efficiently learn the causal structure. To this end, we slightly modify the iterative causal discovery (ICD) algorithm (Rohekar et al., 2021), as described in Appendix B, to reconstruct a causal structure at each recursive iteration. The procedure is outlined in Algorithm 2. The input is a sequence of tokens over which we construct the graph. The output is a PAG structure. In line 2, an exit condition corresponding to the base case (a single-node graph) is tested. In line 3, the last token is popped from the sequence and assigned to $t_n$ , resulting in a shorter sequence $S'$ . Then, a recursive call is made in line 4 to learn the structure over the tokens in $S'$ . Note that since it is ensured that $t_n$ is not an ancestor of any token in $S'$ , the skeleton and v-structure relations of $\mathcal{G}'$ are guaranteed + +not to change when $t_n$ is added back to the graph (Spirtes et al., 2000). In lines 5-7, token $t_n$ is connected to every node in $\mathcal{G}'$ . Finally, in line 8, edges between $t_n$ and the rest of the graph are learned (removed if conditional independence is found) using the ICD algorithm (Rohekar et al., 2021) and the graph is oriented (Zhang, 2008). Although we use ICD, other constraint-based causal discovery algorithms (Colombo et al., 2012; Claassen et al., 2013; Yehezkel & Lerner, 2009; Spirtes et al., 2000; Rohekar et al., 2018; Nisimov et al., 2021), differing in their underlying assumptions, can also be used. + +Algorithm 1: Recursive Causal Discovery for GPT +Input: $S$ : a sequence of tokens $\{t_1, \dots, t_n\}$ +Output: $\mathcal{G}$ : a partial ancestral graph (PAG) +```latex +1 Function LearnStructure $(S)$ .. +2 if $|\pmb {S}| = 1$ then return a graph with the single node in $\pmb{S}$ +3 $t_n,S'\gets \mathrm{pop}(S)$ +4 $\mathcal{G}'\gets$ LearnStructure $(S^{\prime})$ +5 $\mathcal{G}\gets \mathcal{G}^{\prime} + \{t_{n}\}$ +6 set $\pmb{E}$ to the set of edges (circle edge-marks) between $t_n$ and every node in $\mathcal{G}'$ +7 connect $\pmb{E}$ in $\mathcal{G}$ +8 test CI for edges in $\pmb{E}$ and orient $\mathcal{G}$ using Algorithm 3 (Appendix B) +9 return $\mathcal{G}$ +``` + +Thus, a causal structure for a particular output sequence can be inferred in a zero-shot manner directly from the attention matrix in the last layer. In multi-head attention, the final attention layer, having $k$ heads, is the last layer in which tokens may affect one another. Hence, Algorithm 2 is invoked independently for each head, returning a set of $k$ structures. + +# 4.3. Causal Structure Confidence + +In this section, we derive a metric that describes how compatible a sequence is with the causal model implicitly encoded by GPT. Given an output sequence of tokens, $S$ , and a causal structure $\mathcal{G}$ recovered from the last attention layer $\mathbf{A}$ , can we score the confidence in this causal structure? Recall that in the proposed world model, each sequence has its own causal structure, and each causal structure may include latent variables. Since it is unclear how to calculate likelihood $P(S \mid \mathcal{G})$ , we propose the following approach. + +A causal structure-learning algorithm performs multiple statistical tests of conditional independence (CI) using the covariance matrix estimated from the attention matrix. These CI tests calculate $p$ -values and compare them against a pre + +determined significance threshold $(\alpha)$ . It is important to note that a causal structure can be uniquely represented by a set of CI tests and their results. Hence, we propose a scoring function based on the distribution of these $p$ -values to evaluate the confidence in a structure learned from a given attention matrix. A complete undirected graph corresponds to a lack of knowledge about causal relations. Generally, causal structure-learning algorithms prune edges from this graph based on statistical CI tests between pairs of variables (tokens, in our case). The removal of edges between independent variables may then entail causal relations between other variables (Zhang, 2008). + +Let $\pmb{p} = \{p_1, \dots, p_\ell\}$ be the set of all $p$ -values computed as part of causal structure learning. The null hypothesis corresponds to independence, where $p$ -values greater than the significance threshold, $\alpha$ , correspond to edges removed from the complete graph. We define $\pmb{p}_{\mathrm{ind}} = \{p \in \pmb{p} \mid p \geq \alpha\}$ , and $\pmb{p}_{\mathrm{dep}} = \{p \in \pmb{p} \mid p < \alpha\}$ . Since $p$ -values are uniformly distributed under the null hypothesis, we expect the entropy of $p$ -values corresponding to independence, $H_{\mathrm{ind}}$ , to be higher for matrices that correspond to a structure than for those that do not. Conversely, we expect the distribution of $\pmb{p}_{\mathrm{dep}}$ to be weighted toward zero. Hence, the entropy of $p$ -values corresponding to dependence relations, $H_{\mathrm{dep}}$ , is expected to be lower for matrices that correspond to a structure compared to those that do not. We therefore define the following confidence score, given an attention matrix $\mathbf{A}$ : + +$$ +R (\mathbf {A}) = H _ {\mathrm {i n d}} - H _ {\mathrm {d e p}}, \tag {10} +$$ + +which captures the contrast between dependence and independence relations entailed by the learned causal graph. + +# 5. Experiments and Results + +We use an experimental framework in which the world layout and rules governing the generation of sequences are well defined and known, but are not utilized during training. We measure how well attention in the trained GPT model represents a causal world model and whether this representation is correlated with the ability to generate tokens that adhere to the world rules. + +# 5.1. Setup + +We used two controlled environments: Othello and Chess strategy games. For Othello, we examined a GPT model trained by Li et al. (2023) on $\sim 132$ thousand real-world sequences, and for Chess, we examined a GPT model trained by Toshniwal et al. (2022) on $\sim 2.9$ million real-world games. + +For both environments, no information about the game board layout or game rules was used during their training process, and the training data consisted of games in which + +![](images/8b4ec4d0cd1e2a6b6285404b548236e54e9cbf025efda4e7960ba363eabe9069.jpg) +(a) CI Conditioning Size 0 + +![](images/b3ac51bd029acd8866dd3ad13462d7f8183497b8be462883af6ef7aef11c3a0f.jpg) +(b) CI Conditioning Size 1 + +![](images/01b9b3656fcb59e33e30423f63064952dcc5b18abd47f52d4bc6ccd012b15761.jpg) +(c) CI Conditioning Size 0 or 1 + +![](images/c138bdf79026c1d4bbaeb095e801a02c22f9de84a5dca0700e08e3ae2b746786.jpg) +(d) All CI Conditioning Sizes +Figure 4. Average difference in structural confidence between legal and illegal move generation (vertical axis) for different input-sequence lengths (horizontal axis). Error bars represent the $95\%$ confidence interval calculated using a t-test. Confidence scores are calculated from $p$ -values of: (a) all unconditional (marginal) independence tests, (b) all CI tests having exactly one conditioning node, (c) only tests from both cases (a) and (b), and (d) only CI tests without limiting the conditioning set sizes, needed to reconstruct a causal structure. + +players played with the intention of winning. For example, positional encoding was not used. + +In all our experiments, we used test sets that are out-of-distribution with respect to the training set, consisting of sequences of randomly sampled legal moves (not by the GPT models), lacking the objective of winning. In other words, the support of the test distribution is not a subset of the support of the training distribution, where $\mathrm{supp}(P_{\mathrm{train}}) \subset \mathrm{supp}(P_{\mathrm{test}})$ . See Appendix A for an empirical comparison between the sets. This enables evaluating whether the model implicitly encodes the game rules. For both Chess and Othello, test sets consisted of 1,000 randomly generated sequences of legal moves. See Appendix A for more details. + +For causal discovery implementation and empirical evaluation we used the Causality Lab repository: github.com/IntelLabs/causality-lab. + +# 5.2. Ablation Study + +We examine legal move generation with respect to 1) limiting the condition set sizes in the CI tests used to learn causal structures, and 2) pruning attention heads based on the confidence scores of their corresponding causal structures. + +# 5.2.1. CONTRIBUTION OF CI TESTS + +We examine whether conditional independence (CI) tests from which the causal structure is entailed provide an advantage over pairwise correlations directly represented by elements in the attention matrix. To this end, we calculate the confidence score (Equation 10) using $p$ -values from: a) all pairwise marginal independence relations (from raw attention-matrix elements)—CI conditioning size 0; b) CI tests having exactly one node in the conditioning set; c) all CI tests having either an empty or single-node conditioning set; and d) all CI tests used to reconstruct the causal + +structure without limiting conditioning set sizes. The results are shown in Figure 4. Let $\bar{R}_{\mathrm{legal}}$ be the average structural confidence score of sequences for which a legal token was generated, and $\bar{R}_{\mathrm{illegal}}$ be the average structural confidence score of sequences for which an illegal token was generated. The vertical axis represents the difference in structural confidence scores $\bar{R}_{\mathrm{legal}} - \bar{R}_{\mathrm{illegal}}$ . Error bars indicate $95\%$ confidence intervals (unpaired t-test). The horizontal axis indicates sequence length. + +It is evident that when relying solely on raw attention values, case (a), the difference between legal and illegal generated tokens is not statistically significant, except for sequence length 20. Relying solely on CI-test with exactly one node in the conditioning set, case (b), the difference in structural confidence is positive for all tested sequence lengths, but statistically significant only for sequence length 17. When employing pairwise correlations and CI tests with exactly one node in the conditioning tests, case (c), the result is statistically significant for both sequence lengths 17 and 20, implying that these two types of tests are complementary. Finally, using all CI-tests needed to learn the causal graph, without limiting the conditioning set sizes, case (d), provides the best results: sequence lengths in range [15, 22] are statistically significant, and the difference between legal and illegal scores is positive ( $\bar{R}_{\mathrm{legal}} > \bar{R}_{\mathrm{illegal}}$ ) for all tested sequence lengths. + +# 5.2.2. ATTENTION HEADS PRUNING BASED ON CONFIDENCE SCORE + +In this experiment, we examine the importance of each attention head (in multi-head attention) for legal-move generation. We evaluate the importance of a head by the degree of confidence with which it represents a causal structure. This is different from the experiments in Section 5.3 and Section 5.2.1 where the average structural confidence score of the heads was associated with each test sequence. + +![](images/90ed668dcf9fcf3da2f0e89803ba1d8de96ca6bed5db22875cefa309b77523d0.jpg) + +![](images/d1bd8226dab73896c4fed9686969e97ffd8c2611ed5d204b91b66373494f76e5.jpg) + +![](images/4edfd962c89247e249cd08c8b3f0e81b697e449e1a24dc01ef4e7c8391426d3c.jpg) + +![](images/823d5771d3f58e8a5aeced5c05d00d450ec0494fd93713780aeff7ba69d66a9e.jpg) +Figure 5. Normalized accuracy of legal-move generation (vertical axis) as a function of the percentage of heads pruned (horizontal axis) based on structural confidence. A solid blue curve represents pruning a percentage of heads having the lowest structural confidence, while a dotted orange curve represents pruning in the reverse order (pruning a percentage of heads having the highest structural confidence). + +![](images/3af673ed295f7606cbb43a09fee98ed6d9ae68103b2a61e3c34b6e963417ecf1.jpg) + +![](images/32e60611b16dde09003db4e6a401e447b44ebd673be42a232d463fdcea015e6f.jpg) + +Here, a structural confidence score is calculated for each attention head for each sequence in the test set. That is, for 1,000 test sequences and 8 heads in the last attention layer, there is a set of 8,000 scores. This set, denoted $R$ , is sorted in ascending order. From this sorted set, nine equally spaced values are selected as thresholds, denoted $th = \{th_1, \dots, th_9\}$ , corresponding to the $10\%, 20\%, \dots, 90\%$ percentiles. Given a threshold $th_i$ , for each test sequence the attention heads that have structural confidence scores lower than the threshold are pruned (skipped in the forward pass) and the next token is generated without those heads. Hence, the number of pruned heads may vary from sequence to sequence. We then calculate the legal-move generation accuracy for each threshold, that is, accuracy per pruning percentile. Note that retraining the model after pruning is not required (Voita et al., 2019). + +In our case, it is expected that pruning heads with low structural confidence will have limited impact on the accuracy. To examine this, we compare the accuracy to that of a reverse-order pruning process. In this process, we prune heads having high structural confidence scores while keeping those with lower scores. Specifically, we sort the set of scores, $R$ , in a descending order, and for each threshold, prune the heads that have higher structural confidence scores. Under the assumption that GPT implicitly uses a causal world model to generate the next tokens, we expect that pruning heads having low structural confidence scores will result in higher legal-move accuracy and larger area under curve + +(accuracy as a function of pruning percentile) than in the reverse-order pruning process. + +In Figure 5, it is evident that pruning heads with lower structural confidence scores (solid blue curve) results in higher legal-move generation accuracy and greater area under curve, compared to removing heads with higher structural confidence scores (dotted orange curve). This demonstrates the importance of individual attention heads that encode structural information for generating legal moves. + +# 5.3. Legal Move Generation vs. Structural Confidence + +Is there a relation between generating legal tokens (moves) and how well attention matrices implicitly represent causal structures? Recall that the model was not trained explicitly to generate legal game moves but rather to predict the next move played by a human with the intention of winning the game. Moreover, information about the game, such as the existence of a board game and rules, were not provided to the model (Li et al., 2023; Toshniwal et al., 2022). + +In this experiment, we examine whether the cases in which the model generates illegal tokens are also cases where the causal structure is less distinctive, as measured by the structural confidence score, $R$ (Equation 10). Here, the score for a given sequence is the average of structural confidence scores calculated for the attention heads in the last layer. Recall that structural confidence is not an objective in GPT pretraining. + +![](images/b5e330b0f8f79e5f66a2d7426736f887e5fdfb22a6495e3a2bd252c979afc6bb.jpg) +Sequences Lengths 15 + +![](images/e04f0f4d87e9c29f059d320e206922a5ec5b4a310409fd73253c7f74afe099c0.jpg) +Sequences Lengths 17 + +![](images/aa5f95d62ff5cbd4c3fb325516fcdd99f65ee6efbb51808ce02e4cc658f418aa.jpg) +Sequences Lengths 20 + +![](images/d53fc6f9c7067247574e50852b87c9cc84d70cd7e53eb4d18f130c9698ef30ee.jpg) +Sequences Lengths 22 + +![](images/eaa399f49ba84f84e84213c6e39562c014057b0ef1eba168d917fba5a9dce61e.jpg) +Sequences Lengths 25 +Othello +Figure 6. Legal move generation accuracy (vertical axis) as a function of structural confidence score $R$ (horizontal axis) for Othello (left two columns) and Chess (right two columns). Horizontal limits for each point indicate interval of $R$ in which accuracy was averaged. Horizontal dotted red line represents average accuracy. Accuracy increases with the structural confidence score. + +![](images/8f1ca946cf59949937dda78b74614fe1c8184a6fb347a82dee46a2c8ae7fa29c.jpg) +Sequences Lengths 30 + +![](images/aa12b559cc230e89fbfb1ec888d62b321f7b104d6bdc607709daab3662be2427.jpg) +Sequence Length 10 + +![](images/bdedd3f58c2f40fb22e5bcf4bb5b210ba598d880cc4e7b9cd1e3a0fe957e91b7.jpg) +Sequence Length 20 + +![](images/37f978b733bc785cee168a4867ba5dc014c286953c916d3440a7df509076a401.jpg) +Sequence Length 30 +Chess + +![](images/d4a696bb55387c9a2c1acc8b1d5c0b1ca30f977dc4945d7dc95060b4e7f12338.jpg) +Sequence Length 15 + +![](images/06868f8cd000ad50e6c61a47a39b8b332aa6090d5365f4219beeecc0ef85c565.jpg) +Sequence Length 25 + +![](images/0b2bd90bf4d4422a39e45ce66aa3ed3e157e8e9b3fdbecf8fa148c9c78fa3f93.jpg) +Sequence Length 40 + +From Figure 6, for Othello and Chess, it is evident that the legal move generation accuracy (vertical axis) increases with the structural confidence score $R$ (horizontal axis). That is, GPT is more likely to generate legal tokens for out-of-distribution inputs when a causal structure can be learned more confidently from its attention maps. + +# 6. Conclusions + +We presented a causal interpretation of GPT that may clarify the apparent emergence of world models in recent studies and extend their findings. Following this interpretation, we described a method that utilizes the triangular form of the attention matrices in GPT to recover the covariance matrix of SCM endogenous nodes, and efficiently learn the causal graphs for input sequences in a zero-shot manner. Furthermore, we introduced a confidence scoring function for the learned graphs, based on the difference in entropy between the dependence and independence populations of $p$ -values. Finally, using the controlled environments of the + +Othello and Chess strategy games, we demonstrated that GPT implicitly learns to represent causal structures in attention heads. Specifically, in cases where the confidence in recovering structures from the attention matrices is low, GPT generally fails to generate a token that adheres to the game rules. In future work, these results may provide insights into the sources of hallucination in GPT-based models and methods for detecting them. + +# Impact statement + +We propose a link between the internal mechanism of the GPT model and its ability to implicitly encode the world model of a given domain. As GPT models become increasingly widespread, it is crucial to understand the reasoning behind their outputs in relation to domain-specific rules. This understanding enables better human supervision and oversight of these complex automated models. We believe our work has positive societal implications by fostering transparency and accountability in AI-driven decision-making. + +# References + +Chowdhery, A., Narang, S., Devlin, J., Bosma, M., Mishra, G., Roberts, A., Barham, P., Chung, H. W., Sutton, C., Gehrmann, S., et al. Palm: Scaling language modeling with pathways. Journal of Machine Learning Research, 24(240):1-113, 2023. +Claassen, T., Mooij, J. M., and Heskes, T. Learning sparse causal models is not NP-hard. In Uncertainty in Artificial Intelligence, pp. 172. CiteSeer, 2013. +Colombo, D., Maathuis, M. H., Kalisch, M., and Richardson, T. S. Learning high-dimensional directed acyclic graphs with latent and selection variables. The Annals of Statistics, pp. 294-321, 2012. +Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of NAACL-HLT, pp. 4171-4186, 2019. +Li, K., Hopkins, A. K., Bau, D., Viégas, F., Pfister, H., and Wattenberg, M. Emergent world representations: Exploring a sequence model trained on a synthetic task. In The Eleventh International Conference on Learning Representations, 2023. +Liu, H., Li, C., Wu, Q., and Lee, Y. J. Visual instruction tuning. Advances in neural information processing systems, 36, 2024. +Nanda, N., Lee, A., and Wattenberg, M. Emergent linear representations in world models of self-supervised sequence models. EMNLP 2023, pp. 16, 2023. +Nisimov, S., Gurwicz, Y., Rohekar, R. Y., and Novik, G. Improving efficiency and accuracy of causal discovery using a hierarchical wrapper. In Uncertainty in Artificial Intelligence (UAI 2021), the 4th Workshop on Tractable Probabilistic Modeling, 2021. +Nisimov, S., Rohekar, R. Y., Gurwicz, Y., Koren, G., and Novik, G. Clear: Causal explanations from attention in neural recommenders. arXiv preprint arXiv:2210.10621, 2022. +Pearl, J. Causality: Models, Reasoning, and Inference. Cambridge university press, second edition, 2009. +Pearl, J. and Mackenzie, D. The book of why: the new science of cause and effect. Basic books, 2018. +Peters, J., Janzing, D., and Schölkopf, B. Elements of Causal Inference: Foundations and Learning Algorithms. MIT Press, Cambridge, MA, USA, 2017. +Radford, A., Narasimhan, K., Salimans, T., Sutskever, I., et al. Improving language understanding by generative pre-training. 2018. + +Richardson, T. and Spirtes, P. Ancestral graph markov models. The Annals of Statistics, 30(4):962-1030, 2002. +Rohekar, R. Y., Gurwicz, Y., Nisimov, S., Koren, G., and Novik, G. Bayesian structure learning by recursive bootstrap. Advances in Neural Information Processing Systems, 31, 2018. +Rohekar, R. Y., Nisimov, S., Gurwicz, Y., and Novik, G. Iterative causal discovery in the possible presence of latent confounders and selection bias. Advances in Neural Information Processing Systems, 34:2454-2465, 2021. +Rohekar, R. Y., Gurwicz, Y., and Nisimov, S. Causal interpretation of self-attention in pre-trained transformers. Advances in Neural Information Processing Systems, 36, 2024. +Schaeffer, R., Miranda, B., and Koyejo, S. Are emergent abilities of large language models a mirage? Advances in Neural Information Processing Systems, 36, 2024. +Schmidhuber, J. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 4(1):131-139, 1992. +Spirtes, P., Glymour, C., and Scheines, R. Causation, Prediction and Search. MIT Press, 2nd edition, 2000. +Team, G., Anil, R., Borgeaud, S., Wu, Y., Alayrac, J.-B., Yu, J., Soricut, R., Schalkwyk, J., Dai, A. M., Hauth, A., et al. Gemini: a family of highly capable multimodal models. arXiv preprint arXiv:2312.11805, 2023. +Toshniwal, S., Wiseman, S., Livescu, K., and Gimpel, K. Chess as a testbed for language model state tracking. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pp. 11385-11393, 2022. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. Advances in neural information processing systems, 30, 2017. +Voita, E., Talbot, D., Moiseev, F., Sennrich, R., and Titov, I. Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (ACL), pp. 1-113, 2019. +Yehezkel, R. and Lerner, B. Bayesian network structure learning by recursive autonomy identification. Journal of Machine Learning Research (JMLR), 10(Jul):1527-1570, 2009. +Zhang, J. On the completeness of orientation rules for causal discovery in the presence of latent confounders and selection bias. Artificial Intelligence, 172(16-17): 1873-1896, 2008. + +# A. Comparison between Training and Test Data + +The data used to train the GPT model consisted of real-world sequences of game moves (Li et al., 2023). These moves were played strategically with the intention of winning the game. In contrast, the experiments in the paper were conducted using test data consisting of randomly generated sequences of moves that adhered to the game rules, without considering the outcome of the game. + +# A.1. Accuracy in Predicting the Legal Next Move for Test Sequences + +In Figure 7, we plot the accuracy of the model in generating a legal next move (vertical axis) in Othello and Chess as a function of the number of moves (sequence length) in the test input sequences (horizontal axis). Note that the test sequences were not generated by the GPT model. Instead, each move in a test sequence is sampled uniformly from the set of next legal moves, according to the game rules. + +For Othello, note that length- $n$ sequences are test sequences that are trimmed to keep only the first $n$ tokens, such that the same 1,000 sequences are used for all evaluated lengths. Although the average accuracy of the model is $95\%$ (dashed red line), it is not uniformly distributed across different sequence lengths. For example, given a sequence of 15 moves, GPT generates a legal 16th move $88\%$ of the time (adhering to the game board state and rules). It is evident that the accuracy is significantly lower for input sequence lengths in the range [10, 30] (below the average of $95\%$ ). From the Othello game rules, at the beginning of a game there are only four legal moves, and as the game unfolds, the number of possible legal moves generally increases before finally decreasing again as the number of vacant spaces on the board diminishes. It might be that memorization of surface-level statistics can take place at the beginning of the game. We therefore report experimental results for input sequences with sizes in the range [10, 30] (gray area), where the accuracy is lower than average. Throughout the experiments, we employ Algorithm 2 for causal discovery using partial correlation with a significance level of $\alpha = 0.01$ for testing conditional independence (CI tests). + +For Chess, to avoid the possibility of memorization, we use sequences having at least 10 moves. Then, since the accuracy of the model constantly decreases with the sequence length, we use sequences up to 40 moves. Longer sequences generally lead to game termination before the full sequence length is reached. Due to the small error rate for shorter sequences, in our experiment we used a test set of 10,000 samples for evaluating sequence lengths up to 15 moves. + +# A.2. Difference between Train and Test Datasets + +Recall that the test sequences were synthesized by sampling each move uniformly from the set of legal next moves according to the game rules. We measure the difference between the distributions of sequences in the training dataset, $D^{\mathrm{train}}$ , and the test dataset, $D^{\mathrm{test}}$ , by estimating $n$ -gram frequencies. For a given sequence, $\{t_0, \dots, t_{\ell - 1}\}$ , we extract the last $n$ tokens, assuming that the probability of the next generated token $t_\ell$ depends only on these $n$ tokens, + +$$ +P \left(t _ {\ell} \mid t _ {0}, \dots , t _ {\ell - 1}\right) = P \left(t _ {\ell} \mid t _ {\ell - n}, \dots , t _ {\ell - 1}\right). \tag {11} +$$ + +![](images/1aed4a619f71077e415fd48550aa6c148b82c43a36fdf819a0d3e76caa1a8515.jpg) +Figure 7. Baseline model accuracy of generating legal Othello (left) and Chess (right) game moves. Models were trained by Li et al. (2023) for Othello and by Toshniwal et al. (2022) for Chess on real-world games to predict the next move. The test set consists of randomly generated sequences of legal moves. Measured accuracy: the percentage of generated moves that are legal according to the game rules. The gray area for Othello highlights input sequences with sizes in the range [10, 30], where the accuracy is lower than the average of $95\%$ (red dashed line). For Chess, the input sequences that are considered have 10 or more moves (gray line threshold). + +![](images/b07f3f0b055bbdda8685e29e5502f11e7cb7854aa9fe4331c2764ba61b6f95a7.jpg) + +For the $i$ -th sequence in the test set, trimmed to length $\ell$ , we count the number of occurrences, $N_{n}^{\mathrm{test|train}}(i)$ , of the $n$ -gram $\{t_{\ell - n}, \ldots, t_{\ell - 1}\}$ of the test sequence in the training data sequences, trimmed to length $\ell$ . We then divide this count by the number of training sequences, $|\pmb{D}^{\mathrm{train}}|$ , and estimate the mean $\mu_{n}^{\mathrm{test}}(|\pmb{D}^{\mathrm{test}}|$ is the number of test sequences), + +$$ +\mu_ {n} ^ {\text {t e s t} | \text {t r a i n}} = \frac {1}{| D ^ {\text {t e s t}} |} \sum_ {i} \frac {N _ {n} ^ {\text {t e s t}} (i)}{| D ^ {\text {t r a i n}} |}. \tag {12} +$$ + +Similarly, using sequences excluded from the training data, we estimate $\mu_{n}^{\mathrm{train|train}}$ , the percentage of occurrences of $n$ -grams of training sequences in the training data sequences. For each sequence length evaluated in the paper, $\ell \in \{15, 17, 20, 22, 25, 30\}$ , we calculate the percentage of $n$ -gram occurrences for $n \in [2, \ldots, 6]$ . We then compare the percentage of occurrences $\mu_{n}^{\mathrm{test|train}}$ and $\mu_{n}^{\mathrm{train|train}}$ in Figure 8. This evaluation clearly shows that the distribution of real-world sequences played with the intention of winning ( $D^{\mathrm{train}}$ ) is different from that of randomly generated sequences ( $D^{\mathrm{test}}$ ) used in the paper to examine the trained GPT model. + +![](images/55486c5bc897629769bad44a6d954d198f2e6d4b4540c171f673b2e142b1e9b3.jpg) + +![](images/236de6901bfa365c4e4e0d68a7e5d24944b8cb509a68549fbfa855148478a2d8.jpg) + +![](images/4587fc7fc0c072a39df0e6798e1c2ebfebde3862531a7ed70d65be29fe994622.jpg) + +![](images/7a7d37ad2e9763730b2a38215d8059b8669e9519e5f9eecb1fdfdb90e1e713e8.jpg) + +![](images/c46cebc6e9aba0804e35b0c115efdb624c31de137be852be50dfa1fa0c877489.jpg) +Figure 8. Percentage of occurrences (vertical axis) of $n$ -grams from test and training sequences in the training data for $n \in [2, \dots, 6]$ (horizontal axis). Light blue columns are $\mu_{n}^{\text{train|train}}$ , and dark blue are $\mu_{n}^{\text{test|train}}$ values. The clear difference between $\mu_{n}^{\text{test|train}}$ and $\mu_{n}^{\text{train|train}}$ which indicates a clear difference between the distributions of real-world sequences used to train the GPT model and randomly generated sequences used for evaluation. + +![](images/b7aaec494200d79dc5709fa199c807bc74956434b3e3bb17505c3b4c2cf42b75.jpg) + +![](images/c6c4b56f31b81db0f427d769aba08cfbc3aa3513599a23af67d555416af5c380.jpg) + +# B. Recursive Causal Discovery from GPT Attention + +We describe our method in Algorithm 2, where, given an input sequence, a causal structure is learned from an attention matrix in the last layer. In this section, we provide a more detailed explanation of line 8, where the ICD algorithm (Rohekar et al., 2021), modified to learn only a given set of edges, is called. The operations in line 8 are largely similar to those in the ABCD algorithm (Rohekar et al., 2024). The main difference is that this step refines a partially learned causal structure by testing conditional independence between pairs of nodes connected by edges in a given list $\mathbf{E}$ + +The operations in line 8 of Algorithm 2 are as follows. First, covariance is estimated from an attention matrix $\mathbf{A}$ , + +$$ +\mathbf {C} = \left[ \mathbf {D} ^ {- 1} \mathbf {A} \right] \left[ \mathbf {D} ^ {- 1} \mathbf {A} \right] ^ {\top}, \tag {13} +$$ + +where $\mathbf{D} \equiv \mathrm{diag}(\mathbf{A})$ is a diagonal matrix consisting of elements on the diagonal of $\mathbf{A}$ , such that $\mathbf{D}^{-1}\mathbf{A}$ is a uni-triangular matrix. Then, a correlation matrix is estimated, + +$$ +\mathbf {R} = \operatorname {d i a g} (\mathbf {C}) ^ {- 1 / 2} \mathbf {C} \operatorname {d i a g} (\mathbf {C}) ^ {- 1 / 2}. \tag {14} +$$ + +Conditional independence between two variables $X$ and $Y$ , conditioned on set $Z$ , is estimated by calculating the partial correlation from $\mathbf{R}$ . Then, let $\operatorname{Ind}(X, Y|Z)$ denote a CI test based on partial correlation, where $p$ -values are estimated using Fisher z-transform. Finally, ICD is called to learn a set of edges using Ind. + +In Algorithm 3, we provide a simple modification of ICD such that it learns only the edges in $\pmb{E}$ and uses a given initial graph. In red we strike out parts of the ICD and in blue are our additions. The rest of the pseudo-code is exactly as given by Rohekar et al. (2021). As input, we add the initial graph $\mathcal{G}$ to be used and further refined, and add the set of edges $\pmb{E}$ to be learned (remove edges connecting conditionally independent nodes). In line 1, we remove the initialization of a complete graph, since the initial graph is given as input. In line 3 and line 6, we add the set of edges $\pmb{E}$ to be tested within the ICD iteration function. Lastly, in line 8, only edges in $\pmb{E}$ , rather than all edges in $\mathcal{G}$ , are tested. + +Overall, utilizing the causal order enforced by the triangular form of the GPT attention matrix, each recursive call assumes that the current graph is the final learned graph, except for the edges connecting the newly added node to the rest of the graph nodes (edge list $E$ ). Note that this does not violate the ICD-Sep conditions (Rohekar et al., 2021), which constitute a sufficient set for ensuring a sound and complete causal discovery algorithm. By considering only the edges connecting a node to its predecessors in the given causal order, a significantly lower number of CI tests are required for learning the causal graph compared to the unmodified ICD algorithm. + +# Algorithm 2: Causal Discovery for GPT + +Input: $S$ : a sequence of tokens $\{t_1, \dots, t_n\}$ + +Output: $\mathcal{G}$ : a partial ancestral graph (PAG) + +```txt +1 Function LearnStructure $(S)$ .. +2 if $|S| = 1$ then return a graph with the single node in $s$ +3 $t_n,S'\gets \mathrm{pop}(S)$ +4 $\mathcal{G}'\gets$ LearnStructure $(S^{\prime})$ +5 $\mathcal{G}\gets \mathcal{G}^{\prime} + \{t_{n}\}$ +6 set $\pmb{E}$ to the set of edges (circle edge-marks) between $t_n$ and every node in $\mathcal{G}'$ +7 connect $\pmb{E}$ in $\mathcal{G}$ +8 test CI for edges in $\pmb{E}$ and orient $\mathcal{G}$ using ICD (Rohekar et al., 2021) +9 return $\mathcal{G}$ +``` + +Algorithm 3: Modified ICD (Rohekar et al., 2021) algorithm +Input: Ind: a conditional independence oracle $\mathcal{G}$ : initial PAG $\pmb{E}$ : set of edges to be learned +Output: $\mathcal{G}$ : a PAG +1 initialize: $r\gets 0$ $\mathcal{G}\gets$ a complete graph with o'edge-marks, and done $\leftarrow$ False +2 while $(r\leq n)$ & (done $=$ False) do $(\mathcal{G},\mathrm{done})\gets \mathrm{Iteration}(\mathcal{E},\mathcal{G},r)$ refine G using conditioning sets of size r +4 $r\gets r + 1$ +5 return $\mathcal{G}$ +6 Function Iteration $(E,G,r)$ .. +7 done $\leftarrow$ True for edge $(X,Y)$ in E edges(G) do $\{\mathbf{Z}_i\}_{i = 1}^{\ell}\gets \mathrm{PDRepRange}(X,Y,r,\mathcal{G})$ Zi complies with ICD-Sep conditions if $\ell >0$ then done $\leftarrow$ False for $i\gets 1$ to $\ell$ do if Ind(X,Y|Zi) then remove edge $(X,Y)$ from G record Zi as a separating set for $(X,Y)$ break +14 +15 +16 +17 orient edges in $\mathcal{G}$ +18 return (G,done) \ No newline at end of file diff --git a/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/images.zip b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..00f4800963d59c900310f43f6458dc3fb84d5dc5 --- /dev/null +++ b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3109bd06c86f02f600606091fc32564f1babd7d63f05effdb120a32ac7ac2792 +size 636538 diff --git a/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/layout.json b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..affbffd52ccf16628c90201a91524408b4af05fd --- /dev/null +++ b/acausalworldmodelunderlyingnexttokenpredictionexploringgptinacontrolledenvironment/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8fe44a706d2257674874dd7ac31436b8e702853ce2c4fcb5f9366aedb71a43b +size 701941 diff --git a/acertifiedunlearningapproachwithoutaccesstosourcedata/6baf0cf7-6029-42d4-b864-278949c2ff3d_content_list.json b/acertifiedunlearningapproachwithoutaccesstosourcedata/6baf0cf7-6029-42d4-b864-278949c2ff3d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..273dfb1993c57443445f6e0ae4e9e35260fcc05e --- /dev/null +++ b/acertifiedunlearningapproachwithoutaccesstosourcedata/6baf0cf7-6029-42d4-b864-278949c2ff3d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6bcc544580f483df97c5ef4b97cad938ba7a28e59323a16a1facdfa50d9359fc +size 177255 diff --git a/acertifiedunlearningapproachwithoutaccesstosourcedata/6baf0cf7-6029-42d4-b864-278949c2ff3d_model.json b/acertifiedunlearningapproachwithoutaccesstosourcedata/6baf0cf7-6029-42d4-b864-278949c2ff3d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..aeddb9c171a2a9f58eeb14926e710e736361e245 --- /dev/null +++ b/acertifiedunlearningapproachwithoutaccesstosourcedata/6baf0cf7-6029-42d4-b864-278949c2ff3d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ddeed211bcd2abe2d823ed4a5163f85cb57d8d2f3dce94ded66f86d2d20e3f2 +size 203483 diff --git a/acertifiedunlearningapproachwithoutaccesstosourcedata/6baf0cf7-6029-42d4-b864-278949c2ff3d_origin.pdf b/acertifiedunlearningapproachwithoutaccesstosourcedata/6baf0cf7-6029-42d4-b864-278949c2ff3d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..479724d097252e594e531f5b4007b9ece2d44038 --- /dev/null +++ b/acertifiedunlearningapproachwithoutaccesstosourcedata/6baf0cf7-6029-42d4-b864-278949c2ff3d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad53c8a17857ee50ac426a1367c5bfba413b0933a80f7c4e3a4fab6aa3839a49 +size 1775401 diff --git a/acertifiedunlearningapproachwithoutaccesstosourcedata/full.md b/acertifiedunlearningapproachwithoutaccesstosourcedata/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3a6f0f086788d1167902c66e54b9716c902b58f6 --- /dev/null +++ b/acertifiedunlearningapproachwithoutaccesstosourcedata/full.md @@ -0,0 +1,759 @@ +# A Certified Unlearning Approach without Access to Source Data + +Umit Yigit Basaran1 Sk Miraj Ahmed2 Amit Roy-Chowdhury1 Başak Güler1 + +# Abstract + +With the growing adoption of data privacy regulations, the ability to erase private or copyrighted information from trained models has become a crucial requirement. Traditional unlearning methods often assume access to the complete training dataset, which is unrealistic in scenarios where the source data is no longer available. To address this challenge, we propose a certified unlearning framework that enables effective data removal without access to the original training data samples. Our approach utilizes a surrogate dataset that approximates the statistical properties of the source data, allowing for controlled noise scaling based on the statistical distance between the two. While our theoretical guarantees assume knowledge of the exact statistical distance, practical implementations typically approximate this distance, resulting in potentially weaker but still meaningful privacy guarantees. This ensures strong guarantees on the model's behavior post-unlearning while maintaining its overall utility. We establish theoretical bounds, introduce practical noise calibration techniques, and validate our method through extensive experiments on both synthetic and real-world datasets. The results demonstrate the effectiveness and reliability of our approach in privacy-sensitive settings. + +# 1. Introduction + +Machine learning models have achieved remarkable success across a wide range of applications by leveraging large-scale datasets. However, growing concerns about data privacy and regulatory requirements—such as the General Data Protec + +$^{1}$ Department of Electrical and Computer Engineering, University of California, Riverside, CA, USA $^{2}$ Brookhaven National Laboratory, Upton, NY, USA. Correspondence to: Umit Yigit Basaran , Sk Miraj Ahmed , Amit Roy-Chowdhury , Baskul Guler . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +tion Regulation (GDPR, 2016), California Consumer Privacy Act (CCPA, 2018), or the Canadian Consumer Privacy Protection Act (CPPA, 2023)—have led to a pressing demand for mechanisms that allow the removal of specific data points from trained models. + +Among these mechanisms, certified unlearning has emerged as a cornerstone, formalizing data removal with rigorous guarantees. In contrast to heuristic methods, certified unlearning ensures that the influence of removed data is provably eliminated from the model, offering both privacy compliance and practical utility. This is typically achieved by bounding the statistical discrepancy between a model retrained without the forget data and an approximated model that simulates this retraining. While fully retraining a model from scratch on the retained data is a straightforward and rigorous solution, it becomes computationally prohibitive for large-scale models and frequent deletion requests. Certified unlearning instead provides a practical alternative: it enables efficient, provably correct data removal without exhaustive retraining (Guo et al., 2019; Neel et al., 2021; Sekhari et al., 2021; Chien et al., 2024; Zhang et al., 2024). + +Existing certified unlearning methods generally focus on two key aspects. First, they approximate the retrained model using an efficient technique, often leveraging a single-step Newton update (Guo et al., 2019; Sekhari et al., 2021; Zhang et al., 2024). Second, they inject noise based on differential privacy (Dwork, 2006) principles—commonly via a Gaussian mechanism—to ensure that the retrained and unlearned models are statistically indistinguishable. We adopt this single-step update approach in our work as it strikes a balance between efficiency, theoretical grounding, and empirical effectiveness, as supported by prior studies. Despite their promise, these methods often rely on the assumption that the source data remains accessible during unlearning. + +A critical challenge arises when the unlearning mechanism has no access to the source data samples. This limitation may stem from privacy constraints, as the original model may have been trained by a different organization or a third party; resource restrictions, as old data may be deleted due to memory constraints; or regulatory barriers, as data retention policies or security concerns may prohibit storing the source data. As a result, existing unlearning methods that rely on access to the source data become impractical or infeasible. + +Consequently, a key open question emerges: + +- What if the unlearning mechanism has no access to the original training samples, and instead must rely entirely on a surrogate dataset that mimics these statistical properties to achieve certified unlearning? + +This problem is related to zero-shot unlearning, where no information about the true dataset is available during forgetting, beyond the model. While several relevant methods (Foster et al., 2024; Chandawat et al., 2023; Cha et al., 2023) have been proposed, no theoretical guarantees exist. + +A more tractable scenario in practice is when the unlearning mechanism has access to a surrogate dataset that mimics the statistical properties of the source data up to a specified level of fidelity. Summary statistics, learned from this surrogate dataset, are then used to guide the unlearning process. For instance, consider a case where a person requests their data to be deleted, but the organization no longer retains the original training data due to regulatory or resource limitations. Instead, the organization uses publicly available data or previously generated surrogate datasets that closely resemble the source data distribution to facilitate the unlearning process. Alternatively, the individual may provide a new set of data samples (e.g., images)—distinct from the source data but with some statistical discrepancy—specifically to facilitate the unlearning process. + +In this work, we address precisely this scenario. We study certified unlearning when the unlearning mechanism has no access to source (retain) samples, but instead relies on samples from a surrogate dataset that mimics the source data up to a fidelity criterion. Our goal is to establish formal certified unlearning guarantees during unlearning, and how the unlearning performance changes as a function of the distance between the surrogate and source data. + +Main Result. We propose a certified unlearning framework that does not require access to the original retain data samples. Instead, we leverage a surrogate dataset where the samples are generated from a distribution that may be different from the original. By carefully scaling the noise based on the statistical distance between the source and surrogate datasets, we provide rigorous indistinguishability guarantees on how closely the unlearned model mimics the truly retrained model. These guarantees are explicitly dependent on the distance between the source and surrogate data. + +Formally, let $\mathcal{D}$ denote the source dataset drawn from a distribution $\rho$ , whereas $\mathcal{D}_s$ denotes a surrogate dataset drawn from a distribution $\nu$ . Both distributions share the support $\mathcal{X} \times \mathcal{Y}$ , where $\mathcal{X}$ represents the feature space and $\mathcal{Y}$ represents the label space. Suppose we want to remove a set of samples $\mathcal{D}_u$ from $\mathcal{D}$ . We define $\boldsymbol{w}_r^*$ as the model retrained from scratch on the original retain data $\mathcal{D}_r = \mathcal{D} \backslash \mathcal{D}_u$ and $\widehat{\boldsymbol{w}}_r$ as the model produced by our unlearning mechanism + +that uses $\mathcal{D}_s$ in place of the source dataset $\mathcal{D}$ . Throughout the paper, we focus on classification models. + +Under typical assumptions (Assumption 4.1) about the loss function used to train the model, we prove that the norm of the difference between the model retrained from scratch over the original retain data, $\boldsymbol{w}_r^*$ , and the model approximated with our unlearning mechanism using the surrogate dataset, $\widehat{\boldsymbol{w}}_r$ , is upper bounded as (Theorem 4.2), + +$$ +\left\| \boldsymbol {w} _ {r} ^ {*} - \widehat {\boldsymbol {w}} _ {r} \right\| _ {2} \leq \Delta +$$ + +where $\Delta$ is a function of the statistical distance between the two distributions $\rho$ and $\nu$ . Then, by carefully scaling the noise as a function of the statistical distance between $\rho$ and $\nu$ , we achieve certified unlearning without direct access to the retain data. Technical details are provided in Section 4. + +Contributions. Our contributions are summarized below. + +- We propose a certified unlearning mechanism to forget samples drawn from a given distribution without having access to the true retain samples (from the source distribution). Instead, it relies on a surrogate dataset $\mathcal{D}_s$ sampled from a different distribution to ensure certified unlearning. This is the first work to provide certified unlearning guarantees when the source data is not available, offering a practical solution in scenarios where direct access to the source data is restricted. +- We establish rigorous certified unlearning guarantees that hinge on the statistical distance between the source data distribution $\rho$ and the surrogate data distribution $\nu$ . Our main theorem ensures that the influence of the unlearned data points is effectively removed while preserving a provable bound. +- For scenarios when the statistical (distance) information is not readily available between the source and surrogate datasets, we introduce a heuristic to approximate the distance between $\rho$ and $\nu$ . Our approach uses only the model and surrogate dataset, without any information about the source statistics, making it well-suited for resource-limited environments. +- We provide an extensive set of experiments, on both synthetic and real-world datasets, to demonstrate the effectiveness of our approach. In particular, we show how our noise-calibration procedure ensures certified unlearning while maintaining utility comparable to methods that assume full access to source data. + +# 2. Related Works + +Certified Unlearning. Certified unlearning has become a key mechanism for data removal, offering rigorous privacy guarantees while avoiding full retraining costs. Existing methods typically rely on single-step Newton updates, influence functions (Guo et al., 2019; Sekhari et al., 2021; Zhang + +et al., 2024), or projected gradient descent algorithms (Neel et al., 2021; Chien et al., 2024) combined with a randomization mechanism for statistical indistinguishability. + +Source-Free Unlearning. Zero-shot machine unlearning (Chundawat et al., 2023) removes data influence using only model weights and the forget set, using noise-based error maximization and gated knowledge transfer. Another method (Cha et al., 2023) employs adversarial sample generation to preserve decision boundaries while applying gradient ascent on forget data. JiT unlearning (Foster et al., 2024) fine-tunes models with perturbed samples to reduce reliance on forget instances. Bonato et al. (Bonato et al., 2025) modify feature vectors to align forgotten data with the nearest incorrect class, using a surrogate dataset in source-free settings. Despite some recent work in zero-shot/source-free unlearning, formal certified guarantees remain an open problem. We address this by ensuring such guarantees using a surrogate dataset in the absence of source data. + +# 3. Preliminaries and Problem Formulation + +Certified Unlearning. Machine unlearning removes the influence of specific data points from a trained model while preserving its performance on the retained data. Certified unlearning formalizes this concept by offering rigorous probabilistic guarantees on the correctness and reliability of the unlearning process. In essence, it ensures that the adjusted model behaves as though it was fully retrained without the removed data, with bounded error relative to the fully retrained model. This contrasts with empirical unlearning techniques, which may be easier to implement but lack any formal assurances about the fidelity of the resulting model. + +Let the original dataset $\mathcal{D}$ contain samples $\{\pmb{x},\pmb{y}\}_{i = 1}^{n}$ , each sampled from the joint distribution $\rho$ with the support set $\mathcal{X}\times \mathcal{Y}$ . Let the set of samples to be unlearned, $\mathcal{D}_u\subset \mathcal{D}$ have size $|\mathcal{D}_u| = m$ . Then, the retain set $\mathcal{D}_r = \mathcal{D}\setminus \mathcal{D}_u$ has size $|\mathcal{D}_r| = n - m$ . A learning algorithm $\mathcal{A}$ takes $\mathcal{D}$ as input and outputs a model $\pmb{w}^{*} = \mathcal{A}(\mathcal{D})$ , which minimizes the expected loss $\mathbb{E}_{(\pmb {x},\pmb {y})\sim \rho}\left[\mathcal{L}\big((\pmb {x},\pmb {y}),\pmb {w}\big)\right]$ , where $\mathcal{L}\big((\pmb {x},\pmb {y}),\pmb {w}\big)$ measures the error of the model $\pmb{w}$ on the data sample $(\pmb {x},\pmb {y})$ . + +Having the trained model parameters $\boldsymbol{w}^{*}$ , unlearning can be examined under exact and approximate approaches: + +1. Exact unlearning involves retraining the model from scratch on the retained data $\mathcal{D}_r$ (Bourtoule et al., 2021; Ullah et al., 2021; Dukler et al., 2023), which guarantees complete removal of $\mathcal{D}_u$ 's influence but is often computationally infeasible. This motivated approximate unlearning methods to replicate exact unlearning at a reduced cost. +2. Certified Approximate Unlearning provides a practical approach to certified unlearning by relaxing the requirement of retraining from scratch. Instead, it modifies the trained + +model $\pmb{w}^{*}$ directly so the influence of $\mathcal{D}_u$ is effectively removed. The goal is to construct an updated model $\pmb{w}_r$ that closely approximates the retrained model $\pmb{w}_r^*$ , while ensuring strong statistical indistinguishability guarantees. + +Most existing certified approximate unlearning methods employ techniques such as influence functions (Guo et al., 2019), second-order Newton updates (Sekhari et al., 2021; Zhang et al., 2024), or other optimization methods (Chien et al., 2024; Neel et al., 2021) to efficiently adjust $\boldsymbol{w}^*$ . By incorporating carefully calibrated randomness, often through a Gaussian mechanism inspired by differential privacy (Dwork, 2006), approximate unlearning ensures that the statistical properties of $\boldsymbol{w}_r$ align with those of $\boldsymbol{w}_r^*$ , up to a specified certification budget. In these approaches, an upper bound is placed on the norm of the difference between $\boldsymbol{w}_r^*$ and $\boldsymbol{w}_r$ , which in turn determines the required noise variance. Details of the relation between differential privacy and certified unlearning are provided in Appendix B. + +Formally, given a model $\pmb{w}^*$ trained on dataset $\mathcal{D}$ , the samples to be unlearned $\mathcal{D}_u$ , and additional statistical information $\mathcal{S}(\mathcal{D})$ about $\mathcal{D}$ , the unlearning mechanism $\mathcal{U}$ produces an updated model $\pmb{w}_r$ . The mechanism $\mathcal{U}$ satisfies $(\epsilon, \delta)$ -certified unlearning if it adheres to the following guarantees. + +Definition 3.1 $((\epsilon, \delta)$ -Certified Unlearning (Sekhari et al., 2021)). Given a learning mechanism $\mathcal{A}$ defined over the hypothesis space $\mathcal{H}$ , an unlearning mechanism $\mathcal{U}$ guarantees $(\epsilon, \delta)$ certified unlearning if and only if $\forall \mathcal{T} \subseteq \mathcal{H}$ , + +$$ +\begin{array}{l} \Pr \left(\mathcal {U} (\mathcal {D} _ {u}, \mathcal {A} (\mathcal {D}), \mathcal {S} (\mathcal {D})) \in \mathcal {T}\right) \\ \leq e ^ {\epsilon} \Pr \left(\mathcal {U} (\emptyset , \mathcal {A} (\mathcal {D} _ {r}), \mathcal {S} (\mathcal {D} _ {r})) \in \mathcal {T}\right) + \delta , \\ \end{array} +$$ + +$$ +\begin{array}{l} \Pr \left(\mathcal {U} (\emptyset , \mathcal {A} (\mathcal {D} _ {r}), \mathcal {S} (\mathcal {D} _ {r})) \in \mathcal {T}\right) \\ \leq e ^ {\epsilon} \Pr \left(\mathcal {U} (\mathcal {D} _ {u}, \mathcal {A} (\mathcal {D}), \mathcal {S} (\mathcal {D})) \in \mathcal {T}\right) + \delta . \\ \end{array} +$$ + +where $\mathcal{S}$ is a mechanism that returns statistical information about the given dataset to guide unlearning $\mathcal{U}$ . + +Definition 3.1 ensures that the updated model $\boldsymbol{w}_r$ is statistically indistinguishable from the retrained model $\boldsymbol{w}_r^*$ , up to the parameters $(\epsilon, \delta)$ . We adopt the unlearning definition from (Sekhari et al., 2021) due to its versatility and practical benefits. Unlike earlier definitions (Ginart et al., 2019), which rely on the unlearning algorithm being inherently randomized even when no deletions occur. + +Second-order unlearning. For certified unlearning, $S(\cdot)$ typically represents detailed information about the true data samples (Guo et al., 2019; Neel et al., 2021; Sekhari et al., 2021; Chien et al., 2024; Zhang et al., 2024). A common approach is to utilize the second-order Newton update, for which $S(\cdot)$ refers to the Hessian of $\mathcal{D}$ , evaluated on the trained model $\boldsymbol{w}^*$ (Sekhari et al., 2021; Zhang et al., 2024). These approaches follow a general methodology consisting + +of updating the model with a single-step Newton update, + +$$ +\pmb {w} _ {r} \gets \pmb {w} ^ {*} - \frac {m}{n - m} \mathbf {H} _ {\mathcal {D} _ {r}} ^ {- 1} \nabla \mathcal {L} (\mathcal {D} _ {r}, \pmb {w} ^ {*}), +$$ + +and then injecting noise (commonly Gaussian) to the updated model, which is calibrated with respect to an upper bound on the norm difference between $\boldsymbol{w}_r^*$ and $\boldsymbol{w}_r$ . The details on certified unlearning mechanisms utilizing second-order Newton updates are given under Appendix B.1. + +This work. In contrast to the conventional certified unlearning problem, in our scenario the unlearning mechanism only has access to the surrogate dataset $\mathcal{D}_s$ , as opposed to the source dataset $\mathcal{D}$ . Our goal is then to develop a certified unlearning mechanism with only access to $\mathcal{D}_s$ . In the next section, we present a novel approach to address this challenge, where we propose a novel Gaussian mechanism building on a second-order Newton update, where the noise is calibrated as a function of the statistical distance between the source and surrogate data distributions, without having access to the original training set. In scenarios where the statistical distance is not readily available, we demonstrate a simple methodology to estimate this by using the model. While providing strong theoretical guarantees, our approach is versatile and can be applied to a wide range of unlearning algorithms that use a single-step second-order Newton update as the approximation method. + +# 4. Methodology + +Our approach consists of the following key steps: + +1. (Hessian estimation.) Our approach builds on second-order unlearning, which requires the Hessian of the source dataset to update the model for forgetting. As we do not have access to the source data, we estimate the true Hessian $\mathbf{H}_{\mathcal{D}}$ using the Hessian of the surrogate dataset $\mathbf{H}_{\mathcal{D}_s}$ . Using the surrogate Hessian, we estimate the true Hessian $\mathbf{H}_{\mathcal{D}_r}$ of the retain samples $\mathcal{D}_r$ . +2. (Model update.) Using the estimated Hessian $\widehat{\mathbf{H}}_{\mathcal{D}_r}$ of the retain samples, we update the model $\boldsymbol{w}^*$ (trained on $\mathcal{D}$ ) using a single-step second-order Newton update. +3. (Noise calibration.) Finally, we employ a Gaussian mechanism adding noise $\mathbf{n}$ to the updated model $\widehat{\boldsymbol{w}}_r$ . To ensure certified unlearning, we calibrate the noise using an upper bound on the $L_{2}$ norm distance between the estimated model $\widehat{\boldsymbol{w}}_r$ and the true unlearned model $\boldsymbol{w}_r^*$ , along with the total variation distance $\mathrm{TV}(\rho \| \nu)$ between the source and surrogate datasets. + +Before we describe the details of these steps, we first provide a useful technical assumption. + +Assumption 4.1. The loss function $\mathcal{L}$ used during the training of the model parameters is $L$ -Lipschitz, $\alpha$ -strongly convex, $\beta$ -smooth, and $\gamma$ -Hessian Lipschitz. + +Details of these assumptions are provided in Appendix A. We next describe our individual steps. + +1. Hessian estimation. Our mechanism approximates the model retrained from scratch, i.e., trained only on the retained samples of the source dataset, by using the surrogate dataset and a one-step second-order Newton update. + +The second-order Newton update is the product of the inverse Hessian and the gradient vector, both evaluated at $\pmb{w}^{*}$ , the model trained on the training dataset $\mathcal{D}$ . If the original retain data $\mathcal{D}_r$ was available, the update would be, $\pmb{w}_r = \pmb{w}^* -\mathbf{H}_{\mathcal{D}_r}^{-1}\nabla \mathcal{L}(\mathcal{D}_r,\pmb{w}^*)$ . Since $\mathcal{D}_r$ is unavailable, we approximate its Hessian as + +$$ +\hat {\mathbf {H}} _ {\mathcal {D} _ {r}} = \frac {n \mathbf {H} _ {\mathcal {D} _ {s}} - m \mathbf {H} _ {\mathcal {D} _ {u}}}{n - m}. \tag {1} +$$ + +2. Model update. Using the estimated Hessian $\widehat{\mathbf{H}}_{\mathcal{D}_r}$ , we then update the model. The update also requires $\nabla \mathcal{L}(\mathcal{D}_r, \boldsymbol{w}^*)$ , which we express using the fact that $\nabla \mathcal{L}(\mathcal{D}, \boldsymbol{w}^*) = 0$ for the fully trained model and therefore, + +$$ +\nabla \mathcal {L} \left(\mathcal {D} _ {r}, \boldsymbol {w} ^ {*}\right) = \frac {- m \nabla \mathcal {L} \left(\mathcal {D} _ {u} , \boldsymbol {w} ^ {*}\right)}{n - m}. \tag {2} +$$ + +Substituting (1) and (2) into the second-order Newton update yields our model update for unlearning, + +$$ +\widehat {\boldsymbol {w}} _ {r} = \boldsymbol {w} ^ {*} + \frac {m}{n - m} \widehat {\mathbf {H}} _ {\mathcal {D} _ {r}} ^ {- 1} \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right). \tag {3} +$$ + +3. Noise calibration. To ensure certified unlearning, we then introduce a Gaussian mechanism with the noise scaled according to: 1) an upper bound on $\| \pmb{w}_r^* - \widehat{\pmb{w}}_r\|_2$ , 2) a fidelity criterion based on the statistical distance between the source and surrogate data distributions. Specifically, the final model is given by, + +$$ +\widehat {\boldsymbol {w}} _ {r} ^ {\prime} := \widehat {\boldsymbol {w}} _ {r} + \boldsymbol {n} +$$ + +where $\pmb{n}\sim \mathcal{N}(0,\sigma^2\mathbf{I})$ such that, + +$$ +\sigma = \frac {\Delta}{\epsilon} \sqrt {2 \ln (1 . 2 5 / \delta)} \tag {4} +$$ + +and + +$$ +\begin{array}{l} \left\| \boldsymbol {w} _ {r} ^ {*} - \widehat {\boldsymbol {w}} _ {r} \right\| _ {2} \leq \Delta \\ \triangleq \frac {2 \gamma L m ^ {2}}{\alpha^ {3} n _ {1} ^ {2}} + \left(\| \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) \| _ {2} \right. \\ \left. \frac {m \left(n _ {1} - n _ {2}\right) \beta + 2 m n _ {2} \beta \mathrm {T V} (\rho \| \nu)}{\left(n _ {1} \alpha - m \beta\right) \left(n _ {2} \alpha - m \beta\right)}\right) \tag {5} \\ \end{array} +$$ + +to achieve $(\epsilon, \delta)$ -certified unlearning. Algorithm 1 presents the individual steps for our certified unlearning mechanism $\widehat{\mathcal{U}}$ . We next provide the theoretical justification behind (4) and (5) in Theorem 4.2 and Theorem 4.3. + +# Algorithm 1 Unlearning Mechanism Leveraging Surrogate Data Statistics + +Require: Unlearning dataset $\mathcal{D}_u$ , trained model parameters $\boldsymbol{w}^*$ (from $\mathcal{A}(\mathcal{D})$ ), data statistics $S(\mathcal{D}_s): \mathbf{H}_{\mathcal{D}_s}$ , upper bound $\Delta$ , privacy parameters $\epsilon, \delta$ + +Ensure: Updated model parameters $\widehat{\boldsymbol{w}}_r^{\prime}$ after unlearning + +1: Compute $\sigma = \frac{\Delta}{\epsilon}\sqrt{2\ln(1.25 / \delta)}$ +2: Compute $\widehat{\mathbf{H}}_{D_r} = \frac{n\mathbf{H}_{D_s} - m\mathbf{H}_{D_u}}{n - m}$ +3: Update $\widehat{\pmb{w}}_r = \pmb{w}^* + \frac{m}{n - m} \widehat{\mathbf{H}}_{\mathcal{D}_r}^{-1} \nabla \mathcal{L}(\pmb{w}^*, \mathcal{D}_u)$ +4: Sample $\pmb{n} \sim \mathcal{N}(0, \sigma^2\mathbf{I})$ +5: Return $\widehat{\boldsymbol{w}}_r' \coloneqq \widehat{\boldsymbol{w}}_r + \boldsymbol{n}$ + +# 4.1. Theoretical Principles + +In this section we provide the theoretical intuition behind our mechanism. In Theorem 4.2, we derive an upper bound on the difference between the true retrained model $\boldsymbol{w}_r^*$ , trained from scratch on the retain data $\mathcal{D}_r$ , and the approximate model $\widehat{\boldsymbol{w}}_r$ , which uses the surrogate data $\mathcal{D}_s$ . This bound is formulated in terms of the total variation distance $\mathrm{TV}(\rho \| \nu)$ between the source and surrogate data distributions. + +Theorem 4.2. Consider a loss function $\mathcal{L}$ satisfying Assumption 4.1, and a surrogate dataset $\mathcal{D}_s$ with $n_2$ samples drawn from a distribution $\nu$ , to mimic the source dataset $\mathcal{D}$ with $n_1$ drawn from a distribution $\rho$ , over the support set $\mathcal{X} \times \mathcal{Y}$ . Define the retrained model over the retain samples as $\boldsymbol{w}_r^*$ and the model achieved after unlearning as $\widehat{\boldsymbol{w}}_r$ . Also, assume that $n_1$ and $n_2$ are sufficiently large and $n_1, n_2 \geq \frac{m\beta}{\alpha}$ . Then, the following upper bound holds, + +$$ +\left\| \boldsymbol {w} _ {r} ^ {*} - \widehat {\boldsymbol {w}} _ {r} \right\| _ {2} \leq \Delta +$$ + +where $\Delta$ is as defined in (5). + +Proof. The proof is provided in Appendix C. + +![](images/5821a3942950a1d2ede793c17fcd89499f03a177c55559fdac343926189fbaf6.jpg) + +The next theorem presents our certified unlearning guarantees under a given privacy budget $\epsilon$ and confidence $\delta$ when noise scaled by $\Delta$ is added to the approximate model in (3). + +Theorem 4.3. Consider a dataset $\mathcal{D}$ where data samples follow the distribution $\rho$ , and a surrogate dataset $\mathcal{D}_s$ where data samples follow the distribution $\nu$ . Given a forget set $\mathcal{D}_u \subseteq \mathcal{D}$ , and the hypothesis set $\mathcal{H}$ , the unlearning mechanism $\widehat{\mathcal{U}}$ satisfies $(\epsilon, \delta)$ -certified unlearning. + +Proof. The proof is provided in Appendix C.1. + +![](images/3f2d33a673e6c436ffb2e34a1c40b3c0536f6ca66583f3315878b03fef2df8b2.jpg) + +Thus, when $\mathrm{TV}(\rho \parallel \nu)$ is large, the noise magnitude $\sigma$ increases, ensuring certified guarantees even when the surrogate distribution significantly differs from the source. + +A key challenge is estimating (or upper bounding) $\mathrm{TV}(\rho \parallel \nu)$ without access to $\mathcal{D}$ . In the next section, we + +introduce a heuristic method to approximate this distance (or an upper bound) using only $\mathcal{D}_s$ and the trained model $\boldsymbol{w}^*$ . This enables the implementation of Algorithm 1 without direct access to $\mathcal{D}$ , which is crucial for privacy-sensitive applications and real-world deployments. + +# 4.2. From Theory to Practice + +In this section, we first propose an upper bound using Kullback-Leibler (KL) divergence. While total variation distance would be preferable, we use KL for efficiency due to no access to $\mathcal{D}$ . Next, we approximate KL without direct access to exact samples by training a model on $\mathcal{D}_s$ and utilizing models as conditional probabilities. We sample from input marginal distribution using energy-based modeling to compute the KL. Finally, we estimate the KL between input marginal distributions using the Donsker-Varadhan variational representation (Donsker & Varadhan, 1983). The details of these steps are explained below. + +To apply the bound in Theorem 4.2, we require the exact total variation distance $\mathrm{TV}(\rho \parallel \nu)$ or an upper bound. In practice, we approximate this bound using the KL divergence, leveraging heuristics outlined in this section. In Corollary 4.4, we provide an upper bound based on the KL divergence between surrogate and source data distributions. + +Corollary 4.4. Under the same assumptions and definitions in Theorem 4.2, the following upper bound holds: + +$$ +\begin{array}{l} \left\| \boldsymbol {w} _ {r} ^ {*} - \widehat {\boldsymbol {w}} _ {r} \right\| _ {2} \leq \frac {2 \gamma L m ^ {2}}{\alpha^ {3} n _ {1} ^ {2}} + \left(\| \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) \| _ {2} \right. \\ \left. \frac {m \left(n _ {1} - n _ {2}\right) \beta + 2 m n _ {2} \beta \sqrt {1 - \exp \left(- \mathrm {K L} (\nu \| \rho)\right)}}{\left(n _ {1} \alpha - m \beta\right) \left(n _ {2} \alpha - m \beta\right)}\right) \\ \end{array} +$$ + +Proof. The proof is available in Appendix D.1. + +![](images/b4802b93d2e4c5b7ad2662051c2787d34e74b379ac76b998adbbf7aaa5c6331c.jpg) + +To approximate $\mathrm{KL}(\nu \parallel \rho)$ , we leverage the model $\boldsymbol{w}^*$ trained on the entire dataset $\mathcal{D}$ . Let $f(\boldsymbol{w},\boldsymbol{x})$ denote the probability simplex over classes parameterized by the model $\boldsymbol{w}$ for a sample $\boldsymbol{x}$ , with $f(\boldsymbol{w},\boldsymbol{x})_y$ representing the probability of class $y$ . Assuming $\tilde{\boldsymbol{w}}^*$ is the model trained on the surrogate dataset $\mathcal{D}_s$ , the KL divergence can be decomposed as shown in Proposition 4.5. + +Proposition 4.5. Let $f(\boldsymbol{w}, \boldsymbol{x})$ output a probability simplex over classes for a data sample $\boldsymbol{x}$ , parameterized by $\boldsymbol{w}$ . Given trained models $\boldsymbol{w}^*$ and $\tilde{\boldsymbol{w}}^*$ , such that $\boldsymbol{w}^*$ is trained on $\mathcal{D}$ and $\tilde{\boldsymbol{w}}^*$ on $\mathcal{D}_s$ , where data samples from $\mathcal{D}$ and $\mathcal{D}_s$ follow distributions $\rho$ and $\nu$ , the KL divergence $\mathrm{KL}(\nu \| \rho)$ can be decomposed as, + +$$ +\begin{array}{l} \operatorname {K L} (\nu \| \rho) \approx \frac {1}{n} \sum_ {(\boldsymbol {x}, y) \in \mathcal {D} _ {s}} \log \frac {f (\tilde {\boldsymbol {w}} ^ {*} , \boldsymbol {x}) _ {y}}{f (\boldsymbol {w} ^ {*} , \boldsymbol {x}) _ {y}} \\ + \operatorname {K L} (\nu (\boldsymbol {x}) \| \rho (\boldsymbol {x})) \\ \end{array} +$$ + +Proof. The derivation is given in Appendix D.2. + +![](images/1a4827db8a98d3dfcbeaad08ec52ba9c8af6dd961afc8c78c78b9f05a1517e71.jpg) + +Proposition 4.5 decomposes the KL divergence into two components: (1) divergence between conditional distributions, which we can approximate using the classifiers, and (2) divergence between input marginal distributions. + +To estimate the latter, we leverage the hidden energy-based model in the classifier $\pmb{w}^*$ to sample from the true input marginal distribution $\rho(\pmb{x})$ . These samples, combined with the surrogate dataset, enable us to approximate the KL divergence between marginal distributions. The next section details the technical steps for sampling from $\rho(\pmb{x})$ using only the trained model parameters. + +Sampling from input marginal distribution. Inspired by (Grathwohl et al., 2019), we leverage the implicit energy-based model of the trained model $\boldsymbol{w}^*$ to sample from the approximated input marginal distribution $\hat{\rho}(\boldsymbol{x})$ given by: + +$$ +\hat {\rho} (\pmb {x}) = \frac {\exp (- E (\pmb {x}))}{Z} +$$ + +where the energy function is defined as $E(\pmb{x}) = -\log \sum_{y \in \mathcal{Y}} \exp(f(\pmb{w}^*, \pmb{x})_y)$ . Here, $f(\pmb{w}^*, \pmb{x})_y$ denotes the logit score for label $y$ under $\pmb{w}^*$ , and the summation runs over the label space $\mathcal{V}$ . + +To sample from $\hat{\rho}(\pmb{x})$ , we employ Stochastic Gradient Langevin Dynamics (SGLD), which iteratively refines samples without explicitly computing the normalization constant $Z$ . These samples, combined with the surrogate data, allow us to approximate the input marginal KL divergence. + +In the next section, we present how to estimate this divergence using a variational representation, ensuring a practical approach for our unlearning mechanism. Further details on the energy-based modeling, SGLD sampling procedure, and convergence criteria can be found in Appendix D.3. + +Approximating KL Distance Between Input Marginal Distributions. After generating samples from the approximated source distribution $\hat{\rho}(\pmb{x})$ using Langevin dynamics, we approximate the KL divergence between the surrogate distribution $\nu$ and the approximated source distribution $\hat{\rho}$ by leveraging the Donsker-Varadhan variational representation, + +$$ +\begin{array}{l} \operatorname {K L} (\nu (\boldsymbol {x}) \| \hat {\rho} (\boldsymbol {x})) = \sup _ {T} \mathbb {E} _ {X \sim \nu} [ T (X) ] \tag {6} \\ - \log \mathbb {E} _ {X \sim \hat {\rho}} [ \exp (T (X)) ] \\ \end{array} +$$ + +where $T$ is a variational function, parametrized by a neural network, that maps input samples to real-valued scores. + +To approximate the expectations in (6), we rely on the samples generated through Langevin dynamics. Given $k$ samples sampled from $\hat{\rho}(\boldsymbol{x})$ , forming a set $\{\hat{\boldsymbol{x}}_i\}_{i=1}^k$ , and $n$ samples from $\nu(\boldsymbol{x})$ forming the set $\{\boldsymbol{x}_i\}_{i=1}^k$ , the KL divergence + +can be approximated as, + +$$ +\begin{array}{l} \operatorname {K L} (\nu (\boldsymbol {x}) \parallel \hat {\rho} (\boldsymbol {x})) \approx \sup _ {T} \frac {1}{n} \sum_ {i = 1} ^ {n} T (\boldsymbol {x} _ {i}) \\ - \log \left(\frac {1}{k} \sum_ {j = 1} ^ {k} \exp (T (\hat {\boldsymbol {x}} _ {j}))\right) \\ \end{array} +$$ + +Finally, building on this result, we refine the decomposition of the KL divergence from Proposition 4.5 to explicitly account for the approximation of $\mathrm{KL}(\nu \parallel \rho)$ as follows. + +Proposition 4.6. Consider the setting from Proposition 4.5 and assume $\mathrm{KL}(\nu \| \rho)$ is approximated using sampling from $\hat{\rho}(\pmb{x})$ and the Donsker-Varadhan variational representation described in (6). The $\mathrm{KL}(\nu \| \rho)$ can then be expressed as, + +$$ +\begin{array}{l} \operatorname {K L} (\nu \| \rho) \approx \frac {1}{n} \sum_ {(\boldsymbol {x}, y) \in \mathcal {D} _ {s}} \log \frac {f \left(\tilde {\boldsymbol {w}} ^ {*} , \boldsymbol {x}\right) _ {y}}{f \left(\boldsymbol {w} ^ {*} , \boldsymbol {x}\right) _ {y}} \\ \left. + \sup _ {T} \left(\frac {1}{n} \sum_ {i = 1} ^ {n} T (\boldsymbol {x} _ {i}) - \log \left(\frac {1}{k} \sum_ {j = 1} ^ {k} \exp (T (\widehat {\boldsymbol {x}} _ {j}))\right)\right) \right. \\ \end{array} +$$ + +In our experiments, we demonstrate our evaluations with both synthetic and real-world datasets. For the latter, SGLD sampling and Proposition 4.6 will be instrumental in our experiments with real-world datasets. + +# 5. Experiments + +We systematically evaluate our approach on synthetic and real-world datasets to demonstrate its effectiveness in achieving certified unlearning. Unless otherwise noted, we adopt a linear training model with forget ratio of 0.1, and an $L_{2}$ regularization constant $\lambda = 0.01$ . The loss function is assumed to be $\alpha$ -strongly convex, $L$ -Lipschitz, $\beta$ -smooth, and $\gamma$ -Hessian Lipschitz. In line with prior works (Koh & Liang, 2017; Wu et al., 2023b;a; Zhang et al., 2024) we tune $\alpha$ , $L$ , $\beta$ , and $\gamma$ for each experimental setting, which preserves theoretical soundness but may lead to approximate certifications. All details about the parameter study and implementation are given under Appendix E. + +We now turn to our empirical evaluation, where we assess the effectiveness of our approach through a series of experiments. We first provide explanations about the evaluation metrics used to evaluate our unlearning mechanism. Then, we provide synthetic and real-world dataset experiments. In addition to that, we also investigate our methodology over different setups to demonstrate its effectiveness. + +Performance Metrics. We evaluate the performance using train, test, retain, and forget accuracies on their respective data splits. Additionally, we employ the unlearning-specific membership inference attack (MIA) (Kurmanji et al., 2023), + +
ζMethodTrainTestRetainForgetMIART
-Retrain77.0 %72.0 %77.4 %73.6 %47.63 %10
-Unlearn (+)77.1 %72.6 %77.5 %74.1 %47.63 %10
0.02Unlearn (-)77.2 %72.2 %77.5 %74.8 %48.89 %7
0.04Unlearn (-)77.3 %72.4 %77.6 %74.4 %48.89 %10
0.06Unlearn (-)77.3 %72.2 %77.6 %74.3 %48.37 %10
0.08Unlearn (-)77.3 %72.4 %77.6 %74.4 %48.15 %10
0.1Unlearn (-)77.3 %72.7 %77.7 %74.1 %48.30 %10
+ +Table 1. Evaluation of unlearning performance while varying the off-diagonal elements $(\zeta)$ of the unit covariance. + +where an accuracy of $50\%$ means the attack can not distinguish whether a specific sample belongs to the forget or test dataset. Relearn time (RT) (Golatkar et al., 2020) measures how many additional training iterations are required to restore the model's performance on the forgotten data after it is reintroduced. Intuitively, the unlearned model should give high relearn time scores which indicates the model effectively unlearns the forget dataset. Finally, we report the forget score (FS) (Triantafillou et al., 2024), which quantifies how closely the predictions of the unlearned model align with those of a model retrained from scratch. A higher forget score indicates stronger unlearning and higher indistinguishability between retrained and unlearned models. + +Overall, we denote our method as "Unlearn (-)" indicating no access to the statistical information about the source data, unlearning method utilizing statistical information about the source data as "Unlearn (+)" and the model retrained from scratch over the retain data as "Retrain". Also, we report three FS variants: "FS1 (+)" applies the noise required by Unlearn (+), "FS1 (-)" applies the noise required by our proposed Unlearn (-), and "FS2 (-)" applies the noise from Unlearn (+) to Unlearn (-). Comparing these scores demonstrates that our proposed approach is required to achieve certified unlearning while utilizing a surrogate dataset. + +Synthetic Experiments. We generate an source dataset of 15000 samples from a 50-dimensional standard Gaussian, $\mathcal{N}(\mathbf{0},\mathbf{I})$ . A corresponding surrogate dataset of the same size is drawn from $\mathcal{N}\big(\mathbf{0},\zeta \mathbf{1} - (\zeta +1)\mathbf{I}\big)$ , where $\zeta \in [0.01,0.1]$ controls the off-diagonal covariance terms. Varying $\zeta$ modulates the KL divergence between the source and surrogate distributions, influencing the noise variance needed for certified unlearning. As demonstrated in Figure 1(a), the required noise variance is increased following Theorem 4.2. + +Table 1 reports train, test, retain, and forget accuracies alongside the MIA score and RT. Despite the required noise increasing with larger KL divergence, our method Unlearn (-) achieves utility comparable to other methods. These results underscore that appropriately scaling noise according to distributional distance can preserve model performance while guaranteeing unlearning. From the forget scores given in Figure 1(b), we observe that while FS1 (+) and FS1 (-) can achieve similar forget scores, FS2 (-) is always lower than + +![](images/7690e48c02ea1b2e19f073ba5e7ed6a2c6a273bdff91952b48b7ecbc9369761c.jpg) +(a) Required noise variance $\sigma$ + +![](images/de0efb50642f1dcbf167084e612f0bfc250091a575a200bd2563afc561da5577.jpg) +(b) Forget scores + +![](images/e8dd3f2d3de18ca46f872c19f28219b42fa67fa3b5bb44ae59c920aa76197e5c.jpg) +(a) Required noise variance $\sigma$ + +![](images/1bbf03f26ef02bdb7407271bcb1e963d41d3005af9f98342c788f95e5be173c5.jpg) +Figure 1. (a): Required variance $\sigma$ for achieving certified unlearning on synthetic datasets as a function of the off-diagonal elements $(\zeta)$ . (b): Forget scores achieved for synthetic datasets. +(b) Forget scores +Figure 2. (a): Required variance $\sigma$ for achieving certified unlearning across CIFAR10, StanfordDogs, and Caltech256 datasets as a function of the concentration parameter $\xi$ . (b): Forget scores achieved for CIFAR10, StanfordDogs, and Caltech256. + +the others, implying that to achieve similar certification with Unlearn (+), our proposed noise is required. We report additional experiments using different random seeds along with corresponding error bars in Appendix F. + +Real-World Dataset Experiments. We further evaluate our method on CIFAR10 (Krizhevsky et al., 2009), Caltech256 (Griffin et al., 2007), and StanfordDogs (Khosla et al., 2011), by dividing each dataset into an source and a surrogate subset according to a Dirichlet distribution with concentration $\xi$ . Lower values of $\xi$ lead to more skewed class splits and thus greater distributional divergences. We show these results in Figure 2(a). We observe that the required noise variance decreases while increasing the concentration parameter $\xi$ . We approximate the KL distance between source and surrogate datasets without accessing source data by using Proposition 4.6. We use embeddings from a ResNet18 (He et al., 2016) model, following (Guo et al., 2019). + +In Table 2 we report the train, test, retain, and forget accuracies for all datasets. Our method Unlearn (-) achieves comparable accuracy over all data splits similar to other methods while utilizing only the surrogate datasets. We also report the MIA and RT metrics in Table 3 showing that our unlearning performance is close to the other methods. Finally, in Figure 2(b) we demonstrate the forget scores for + +
ξMethodCIFAR-10StanfordDogsCaltech256
TrainTestRetainForgetTrainTestRetainForgetTrainTestRetainForget
13Retrain77.6 %76.2 %77.8 %76.0 %86.1 %73.7 %87.3 %75.2 %87.1 %72.0 %88.8 %72.2 %
Unlearn (+)77.9 %76.4 %78.0 %76.3 %84.1 %71.9 %85.3 %73.2 %86.8 %70.8 %88.6 %71.2 %
Unlearn (-)77.5 %76.1 %77.7 %75.8 %84.0 %72.2 %85.2 %73.1 %87.0 %71.5 %88.4 %74.6 %
36Retrain78.0 %76.7 %78.2 %76.5 %84.6 %75.1 %86.0 %71.4 %84.9 %74.6 %86.2 %73.3 %
Unlearn (+)77.4 %76.5 %77.6 %75.7 %84.5 %75.6 %85.9 %71.7 %84.7 %73.2 %86.0 %73.8 %
Unlearn (-)77.3 %76.4 %77.5 %75.7 %84.4 %75.7 %85.8 %72.0 %84.9 %73.5 %86.0 %74.9 %
100Retrain78.0 %76.9 %78.0 %77.8 %82.9 %76.0 %84.2 %71.1 %83.5 %74.1 %84.7 %73.3 %
Unlearn (+)78.2 %77.3 %78.3 %77.2 %83.8 %75.7 %85.1 %72.2 %82.1 %73.0 %83.2 %72.8 %
Unlearn (-)78.1 %77.2 %78.1 %77.3 %83.7 %75.6 %85.0 %72.0 %82.0 %72.8 %83.0 %72.9 %
+ +Table 2. Train, test, retain, forget set accuracies for each method across CIFAR10, StanfordDogs, and Caltech256 datasets while varying the concentration parameter $(\xi)$ of the Dirichlet distribution. + +
ξMethodCIFAR-10StanfordDogsCaltech256
MIARTMIARTMIART
13Retrain51.14 %1451.95 %7050.97 %20
Unlearn (+)52.68 %1051.61 %1551.20 %20
Unlearn (-)52.59 %2351.49 %1552.00 %16
36Retrain49.97 %250.87 %2050.21 %21
Unlearn (+)50.15 %1050.05 %1847.39 %21
Unlearn (-)49.80 %650.14 %1950.46 %17
100Retrain49.76 %752.49 %1948.01 %17
Unlearn (+)48.90 %1352.02 %2152.05 %16
Unlearn (-)48.83 %3251.94 %1652.33 %14
+ +all datasets and selected concentration parameters. This implies the necessity of our noise scaling approach while using a surrogate dataset to achieve certified unlearning. + +Additional experiments with different random seeds, corresponding error bars, and evaluations of our heuristic KL approximation—used for noise calibration without accessing the source data—against KL estimates via the Donsker-Varadhan method (with data access) are reported in Appendix F, highlighting the gap between practical estimation and the exact quantity required for certified unlearning. + +Experiments with Different Forget Ratios. We conducted extensive experiments on the StanfordDogs dataset with varying forget ratios to assess how forget ratio impacts unlearning. The results in Table 4 show that our method Unlearn (-) scales well across different forget set ratios. Also, results under the MIA and RT columns indicate that similar unlearning performance is achieved across different forget ratios with Unlearn (+) and Retrain models. These findings confirm the robustness of our approach. + +Mixed-Linear Network Experiments. While the convexity and smoothness assumptions in Assumption 4.1 may not hold for general neural networks, there exist practical architectures that satisfy these conditions while retaining strong utility. To this end, we adopt the mixed-linear networks (Golatkar et al., 2021), which linearizes a pre-trained neural + +Table 3. MIA and RT metrics given for each method across CIFAR10, StanfordDogs, and Caltech256 datasets while varying the concentration parameter $(\xi)$ of the Dirichlet distribution. + +
FRMethodTrainTestRetainForgetMIART
0.01Retrain87.1 %73.7 %87.2 %73.8 %52.1 %10
Unlearn (+)87.3 %74.1 %87.3 %74.5 %53.2 %10
Unlearn (-)87.1 %74.1 %87.2 %74.1 %53.1 %10
0.1Retrain82.9 %76.0 %84.2 %71.1 %52.5 %19
Unlearn (+)83.8 %75.7 %85.1 %72.2 %52.0 %21
Unlearn (-)83.7 %75.6 %85.0 %72.0 %51.9 %16
0.2Retrain85.6 %72.4 %88.7 %73.3 %50.6 %40
Unlearn (+)84.9 %71.8 %88.3 %71.5 %51.8 %40
Unlearn (-)85.0 %71.4 %88.0 %72.6 %52.0 %40
+ +network using a first-order Taylor expansion. Specifically, the network output is approximated via its Neural Tangent Kernel (Jacot et al., 2018) formulation, transforming the objective into a convex optimization problem. This approximation allows for efficient and tractable unlearning while preserving much of the model's predictive performance. + +In Table 5, we report results on CIFAR-10 under two settings using this architecture. One with randomly selecting $10\%$ of the data as forget set and the other with removing all samples belonging to class 0. In both cases, our method achieves effective certified unlearning and maintains competitive accuracy on the retained data, demonstrating that mixed linear networks provide a practical and theoretically sound foundation for unlearning in neural models. MIA + +Table 4. Evaluation of unlearning performance across varying forget ratios (FR) on StanfordDogs dataset with $\xi = 100$ + +
-MethodTrainTestRetainForgetMIART
0.1Retrain93.6 %86.4 %95.6 %84.7 %51.2 %53
Unlearn (+)93.7 %86.4 %94.8 %87.2 %51.3 %54
Unlearn (-)94.1 %85.2 %94.9 %86.8 %52.1 %54
0Retrain81.7 %72.3 %92.7 %0 %-142
Unlearn (+)82.2 %72.5 %93.2 %4.2 %-135
Unlearn (-)82.4 %72.4 %93.5 %5.1 %-132
+ +Table 5. Evaluation of unlearning performance on CIFAR-10 using mixed-linear networks with $\xi = 100$ . In this table, "0.1" indicates that $10\%$ of the data is used as the forget set, and "0" denotes the class selected for unlearning. + +
ArchMethodTrainTestRetainForgetMIART
LRetrain78.0 %76.9 %78.0 %77.8 %49.76 %7
Unlearn (+)78.2 %77.3 %78.3 %77.2 %48.90 %13
Unlearn (-)78.1 %77.2 %78.1 %77.3 %48.83 %32
C+LRetrain81.6 %79.8 %82.1 %78.4 %49.94 %40
Unlearn (+)80.8 %78.4 %81.3 %78.1 %51.32 %45
Unlearn (-)80.5 %78.1 %80.9 %77.5 %50.71 %46
2C+LRetrain83.0 %80.3 %83.1 %81.2 %50.86 %22
Unlearn (+)84.3 %81.4 %84.3 %81.7 %51.28 %20
Unlearn (-)82.9 %80.5 %83.1 %81.1 %50.05 %22
+ +Table 6. Evaluation of unlearning performance across different model architectures: a single linear layer (L), a convolutional layer followed by a linear layer $(\mathrm{C} + \mathrm{L})$ , and two convolutional layers followed by a linear layer $(2\mathrm{C} + \mathrm{Lin})$ . + +scores are omitted for class unlearning because the attack is designed to distinguish between test and forget samples; forgetting an entire class greatly increases distinguishability, making the MIA score uninformative. + +Unlearning Across Model Architectures. To evaluate the generality of our approach, we train three different architectures on CIFAR-10 using a Dirichlet concentration of $\xi = 100$ : a single linear layer ("L"), a convolutional layer followed by a linear layer ("C+L"), and two convolutional layers with a linear layer ("2C+L"). As shown in Table 6, our method maintains accuracy comparable to others, while keeping the MIA score close to $50\%$ . Also, the RT metric implies that the unlearning succeeded in removing the influence of the forget samples. Finally, for the C+L architecture, the observed FS1 (+), FS1 (-), and FS2 (-) values are 0.08, 0.08, and 0.05, respectively, while for 2C+L, they are lower at 0.04, 0.04, and 0.02. These results reinforce that the introduced noise is essential for the unlearning process. + +MNIST-USPS Experiment. To illustrate our contribution in a practical setting, we consider MNIST (Lecun et al., 1998) and USPS (Hull, 1994) datasets and analyze the following cases. First, we train a model on MNIST and apply our unlearning framework by selecting a random forget set from MNIST while using USPS as the surrogate dataset $(\mathbf{M} \to \mathbf{U})$ . Second, we reverse the process, training a model on USPS and unlearning with MNIST as the surrogate $(\mathbf{U} \to \mathbf{M})$ . As can be seen from Table 7, in both cases the unlearning performance of our method Unlearn (-) is similar to the other methods we are comparing with. + +
TaskMethodTrainTestRetainForgetMIART
URetrain94.2 %91.4 %94.3 %92.5 %51.23 %11
Unlearn (+)94.1 %91.3 %94.1 %90.7 %50.15 %13
MUnlearn (-)94.1 %91.1 %94.1 %91.5 %50.54 %13
NRetrain95.2 %91.1 %95.1 %92.9 %50.71 %21
Unlearn (+)93.7 %91.3 %95.3 %91.7 %51.93 %24
UUnlearn (-)93.5 %90.4 %94.9 %90.9 %50.60 %23
+ +Table 7. Evaluation of unlearning performance with MNIST and USPS dataset experiments. + +# 6. Conclusion + +We introduce a certified unlearning framework that enables data removal without requiring access to the original training data statistics. Unlike existing methods, our approach utilizes a surrogate dataset and calibrates noise based on statistical distance, ensuring provable guarantees. We establish theoretical bounds, develop a practical noise-scaling mechanism, and validate our method through experiments on synthetic and real-world datasets. Our results demonstrate certified unlearning can be achieved by utilizing a surrogate dataset while maintaining utility and privacy guarantees. + +# Software + +Our main implementation used for this paper is available at https://github.com/info-ucr/certified-unlearning-surr-data. We also implemented the mixed-linear networks (Golatkar et al., 2021) from scratch, the code is available at https://github.com/info-ucr/mixed-privacy-forgetting. + +# Acknowledgements + +This work was supported in part by the NSF CAREER Award CCF-2144927, NSF Award CCF-2008020, DURIP N000141812252, the UCR OASIS Fellowship, and the Amazon Research Award. + +# Impact Statement + +Unlearning is increasingly critical due to evolving privacy regulations, such as GDPR, CCPA and CPPA, which mandate mechanisms to effectively erase private or sensitive data from trained machine learning models. Retraining these models from scratch to remove specific data points is computationally infeasible. Traditional unlearning methods circumvent exhaustive retraining but typically require full access to the original source data, an assumption often unrealistic in practical scenarios due to privacy concerns, storage limitations, or regulatory restrictions on data retention. Our work directly addresses this crucial gap by proposing a certified unlearning framework that does not rely on the availability of original training data. Instead, we leverage surrogate datasets that approximate the original data distribution to guide the unlearning process. By carefully calibrating noise injection based on statistical distances between original and surrogate datasets, our method ensures rigorous theoretical guarantees on unlearning performance, thereby providing a principled alternative to heuristic methods. This approach significantly broadens the practical applicability of certified unlearning methods, ensuring compliance with privacy requirements even when access to original training data is restricted or completely unavailable. + +# References + +Bonato, J., Cotogni, M., and Sabetta, L. Is Retain Set All You Need in Machine Unlearning? Restoring Performance of Unlearned Models with Out-of-Distribution Images. In Leonardis, A., Ricci, E., Roth, S., Russakovsky, O., Sattler, T., and Varol, G. (eds.), Computer Vision - ECCV 2024, pp. 1-19, Cham, 2025. Springer Nature Switzerland. ISBN 978-3-031-73232-4. doi: 10.1007/978-3-031-73232-4_1. +Bourtoule, L., Chandrasekaran, V., Choquette-Choo, C. A., Jia, H., Travers, A., Zhang, B., Lie, D., and Papernot, N. Machine unlearning. In 2021 IEEE Symposium on Security and Privacy (SP), pp. 141-159, 2021. doi: 10.1109/SP40001.2021.00019. +Bretagnolle, J. and Huber, C. Estimation des densités: risque minimax. Zeitschrift für Wahrscheinlichkeitstheorie und Verwandte Gebiete, 47(2):119-137, Jan 1979. ISSN 1432-2064. doi: 10.1007/BF00535278. URL https://doi.org/10.1007/BF00535278. +CCPA. California Consumer Privacy Act (CCPA), October 2018. URL https://oag.ca.gov/privacy/ccpa. +Cha, S., Cho, S., Hwang, D., Lee, H., Moon, T., and Lee, M. Learning to Unlearn: Instance-wise Unlearning for Pre-trained Classifiers. Proceedings of the AAAI Conference on Artificial Intelligence, 38(10):11186-11194, January 2023. ISSN 23743468. doi: 10.1609/aaai.v38i10.28996. URL https://arxiv.org/abs/2301.11578v3. arXiv: 2301.11578 Publisher: Association for the Advancement of Artificial Intelligence. +Chien, E., Wang, H., Chen, Z., and Li, P. Langevin Unlearning: A New Perspective of Noisy Gradient Descent for Machine Unlearning, February 2024. URL http://arxiv.org/abs/2401.10371.arXiv:2401.10371[cs]. +Chundawat, V. S., Tarun, A. K., Mandal, M., and Kankanhalli, M. Zero-Shot Machine Unlearning. IEEE Transactions on Information Forensics and Security, 18:2345-2354, 2023. ISSN 1556-6021. doi: 10.1109/TIFS.2023.3265506. URL https://ieeexplore.ieee.org/abstract/document/10097553. Conference Name: IEEE Transactions on Information Forensics and Security. +CPPA. Consumer Privacy Protection Act, March 2023. URL https://ised-isle canada.ca/site/innovation-better-canada/en/consumer-privacy-protection-act. Last Modified: 2023-03-13 Publisher: Innovation, Science and Economic Development Canada. + +Donsker, M. D. and Varadhan, S. S. Asymptotic evaluation of certain markov process expectations for large time. iv. Communications on pure and applied mathematics, 36 (2):183-212, 1983. +Dukler, Y., Bowman, B., Achille, A., Golatkar, A., Swaminathan, A., and Soatto, S. Safe: Machine unlearning with shard graphs. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 17108-17118, 2023. +Dwork, C. Differential privacy. In International colloquium on automata, languages, and programming, pp. 1-12. Springer, 2006. +Foster, J., Fogarty, K., Schoepf, S., Dugue, Z., Öztireli, C., and Brintrup, A. An Information Theoretic Approach to Machine Unlearning, December 2024. URL http:// arxiv.org/abs/2402.01401.arXiv:2402.01401 [cs]. +GDPR. General Data Protection Regulation (GDPR) – Legal Text, 2016. URL https://gdpr-info.eu/. +Ginart, A., Guan, M., Valiant, G., and Zou, J. Y. Making ai forget you: Data deletion in machine learning. Advances in neural information processing systems, 32, 2019. +Golatkar, A., Achille, A., and Soatto, S. Eternal Sunshine of the Spotless Net: Selective Forgetting in Deep Networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 9304-9312, 2020. URL https://openaccess.thecvf.com/content_CVPR_2020/html/Golatkar_Eternal_Sunshine_of_the_Spotless_Net_Selection_Forgotting_in_Dep_CVPR_2020_paper.html. +Golatkar, A., Achille, A., Ravichandran, A., Polito, M., and Soatto, S. Mixed-privacy forgetting in deep networks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 792–801, 2021. +Grathwohl, W., Wang, K.-C., Jacobsen, J.-H., Duvenaud, D., Norouzi, M., and Swersky, K. Your classifier is secretly an energy based model and you should treat it like one. In International Conference on Learning Representations, September 2019. URL https://openreview.net/forum?id=Hkxzx0NtDB&utm_campaign $\equiv$ piqcy&utm_medium $\equiv$ email&utm_source $\equiv$ Revue%20newsletter. +Griffin, G., Holub, A., and Perona, P. Caltech-256 object category dataset. Technical report, California Institute of Technology, 2007. + +Guo, C., Goldstein, T., Hannun, A., and van der Maaten, L. Certified Data Removal from Machine Learning Models. In 37th International Conference on Machine Learning, ICML 2020, volume PartF168147-5, pp. 3790-3800, November 2019. URL https://arxiv.org/abs/1911.03030v5. arXiv: 1911.03030 Publisher: International Machine Learning Society (IMLS) ISBN: 9781713821120. +He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. +Hull, J. A database for handwritten text recognition research. IEEE Transactions on Pattern Analysis and Machine Intelligence, 16(5):550-554, 1994. doi: 10.1109/34.291440. +Jacot, A., Gabriel, F., and Hongler, C. Neural tangent kernel: Convergence and generalization in neural networks. In Bengio, S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi, N., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. URL https://proceedings.neurips.cc/paper_files/paper/2018/file/5a4be1fa34e62bb8a6ec6b91d2462f5a-Paper.pdf. +Khosla, A., Jayadevaprakash, N., Yao, B., and Fei-Fei, L. Novel dataset for fine-grained image categorization. In First Workshop on Fine-Grained Visual Categorization, IEEE Conference on Computer Vision and Pattern Recognition, Colorado Springs, CO, June 2011. +Koh, P. W. and Liang, P. Understanding Black-box Predictions via Influence Functions. In Proceedings of the 34th International Conference on Machine Learning, pp. 1885-1894. PMLR, July 2017. URL https://proceedings.mlr.press/v70/koh17a.html. ISSN: 2640-3498. +Krizhevsky, A., Hinton, G., et al. Learning multiple layers of features from tiny images, 2009. +Kurmanji, M., Triantafillou, P., Hayes, J., Deepmind, G., and Triantafillou, E. Towards Unbounded Machine Unlearning. Advances in Neural Information Processing Systems, 36:1957-1987, December 2023. URL https://github.com/Meghdad92/SCRUB. +Lecun, Y., Bottou, L., Bengio, Y., and Haffner, P. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2324, 1998. doi: 10.1109/5.726791. + +Neel, S., Roth, A., and Sharifi-Malvajerdi, S. Descent-to-Delete: Gradient-Based Methods for Machine Unlearning. In Proceedings of the 32nd International Conference on Algorithmic Learning Theory, pp. 931-962. PMLR, March 2021. URL https://proceedings.mlr.press/v132/neel121a.html. ISSN: 2640-3498. +Sekhari, A., Acharya, J., Kamath, G., and Suresh, A. T. Remember What You Want to Forget: Algorithms for Machine Unlearning. In Advances in Neural Information Processing Systems, volume 34, pp. 18075-18086. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper/2021/bitstream/9627c45df543c816a3ddbf2d8ea686a99-Abstract.html. +Triantafillou, E., Kairouz, P., Pedregosa, F., Hayes, J., Kurmanji, M., Zhao, K., Dumoulin, V., Junior, J. J., Mitliagkas, I., Wan, J., et al. Are we making progress in unlearning? findings from the first neurips unlearning competition. arXiv preprint arXiv:2406.09073, 2024. +Ullah, E., Mai, T., Rao, A., Rossi, R. A., and Arora, R. Machine Unlearning via Algorithmic Stability. In Proceedings of Thirty Fourth Conference on Learning Theory, pp. 4126-4142. PMLR, July 2021. URL https://proceedings.mlr.press/v134/ullah21a.html. ISSN: 2640-3498. +Wu, J., Yang, Y., Qian, Y., Sui, Y., Wang, X., and He, X. Gif: A general graph unlearning strategy via influence function. In Proceedings of the ACM Web Conference 2023, WWW '23, pp. 651-661, New York, NY, USA, 2023a. Association for Computing Machinery. ISBN 9781450394161. doi: 10.1145/3543507.3583521. URL https://doi.org/10.1145/3543507.3583521. +Wu, K., Shen, J., Ning, Y., Wang, T., and Wang, W. H. Certified edge unlearning for graph neural networks. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, KDD '23, pp. 2606-2617, New York, NY, USA, 2023b. Association for Computing Machinery. ISBN 9798400701030. doi: 10. 1145/3580305.3599271. URL https://doi.org/ 10.1145/3580305.3599271. +Zhang, B., Dong, Y., Wang, T., and Li, J. Towards Certified Unlearning for Deep Neural Networks. In Proceedings of the 41st International Conference on Machine Learning, pp. 58800-58818. PMLR, July 2024. URL https://proceedings.mlr.press/v235/zhang241.html. ISSN: 2640-3498. + +# A. Assumptions + +For the loss function $\mathcal{L}$ used to train the model parameters, we have the following assumptions listed in Assumption 4.1. + +Definition A.1 (Lipschitz). The loss function $\mathcal{L}$ is $L$ -Lipschitz in the parameter $\pmb{w}$ if $\forall (\pmb{x}, \pmb{y}) \in \mathcal{X} \times \mathcal{Y}$ and $\forall \pmb{w}_1, \pmb{w}_2 \in \mathcal{H}$ , + +$$ +\left| \mathcal {L} \left(\left(\boldsymbol {x}, y\right), \boldsymbol {w} _ {1}\right) - \mathcal {L} \left(\left(\boldsymbol {x}, y\right), \boldsymbol {w} _ {2}\right) \right| \leq L \| \boldsymbol {w} _ {1} - \boldsymbol {w} _ {2} \| _ {2}. \tag {7} +$$ + +Definition A.2 ( $\alpha$ -Strong Convexity). The loss function $\mathcal{L}$ is $\alpha$ -strong convex if $\forall (\pmb{x},y)\in \mathcal{X}\times \mathcal{Y}$ and $\forall \pmb{w}_1,\pmb{w}_2\in \mathcal{H}$ , + +$$ +\mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w} _ {1}) \geq \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w} _ {2}) + \left\langle \nabla \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w} _ {2}), \boldsymbol {w} _ {1} - \boldsymbol {w} _ {2} \right\rangle + \frac {\alpha}{2} \| \boldsymbol {w} _ {1} - \boldsymbol {w} _ {2} \| _ {2} ^ {2}. \tag {8} +$$ + +Definition A.3 ( $\beta$ -Smoothness). The loss function $\mathcal{L}$ is $\beta$ -smooth if $\forall (\pmb{x},y)\in \mathcal{X}\times \mathcal{Y}$ and $\forall \pmb{w}_1,\pmb{w}_2\in \mathcal{H}$ , + +$$ +\mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w} _ {1}) \leq \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w} _ {2}) + \left\langle \nabla \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w} _ {2}), \boldsymbol {w} _ {1} - \boldsymbol {w} _ {2} \right\rangle + \frac {\beta}{2} \| \boldsymbol {w} _ {1} - \boldsymbol {w} _ {2} \| _ {2} ^ {2}. \tag {9} +$$ + +Definition A.4 ( $\gamma$ -Hessian Lipschitz). The loss function $\mathcal{L}$ is $\gamma$ -Hessian Lipschitz in the parameter $\boldsymbol{w}$ if $\forall (\boldsymbol{x},y)\in \mathcal{X}\times \mathcal{Y}$ and $\forall \boldsymbol{w}_1,\boldsymbol{w}_2\in \mathcal{H}$ , + +$$ +\left| \nabla^ {2} \mathcal {L} \left(\left(\boldsymbol {x}, y\right), \boldsymbol {w} _ {1}\right) - \nabla^ {2} \mathcal {L} \left(\left(\boldsymbol {x}, y\right), \boldsymbol {w} _ {2}\right) \right| \leq \gamma \| \boldsymbol {w} _ {1} - \boldsymbol {w} _ {2} \| _ {2}. \tag {10} +$$ + +# B. Relationship Between Certified Machine Unlearning and Differential Privacy + +Differential privacy (Dwork, 2006) and certified unlearning share a common conceptual foundation. Both concepts aim to provide statistical indistinguishability. However, they focus on achieving indistinguishability in fundamentally different aspects of data handling and model behavior. + +In differential privacy, the goal is to ensure that the information obtained from a randomized mechanism applied to a dataset is indistinguishable when a specific data sample is included versus when it is excluded. This statistical indistinguishability is achieved by bounding the influence of any single data point on the output of the mechanism. Formally, the randomized mechanism $\mathcal{M}$ satisfies $(\epsilon, \delta)$ -differential privacy if, for any two neighboring datasets $\mathcal{D}$ and $\mathcal{D}'$ differing by at most one data point, and for any measurable set $\mathcal{T}$ , the following holds. + +Definition B.1 (Differential Privacy). A randomized mechanism $\mathcal{M}$ satisfies $(\epsilon, \delta)$ -differential privacy if, for any two neighboring datasets $\mathcal{D}$ and $\mathcal{D}'$ differing in at most one data point, and for any measurable subset $\mathcal{T} \subseteq \mathcal{H}$ : + +$$ +\operatorname * {P r} \left(\mathcal {M} (\mathcal {D}) \in \mathcal {T}\right) \leq e ^ {\epsilon} \operatorname * {P r} \left(\mathcal {M} \left(\mathcal {D} ^ {\prime}\right) \in \mathcal {T}\right) + \delta , +$$ + +$$ +\operatorname * {P r} \left(\mathcal {M} (\mathcal {D} ^ {\prime}) \in \mathcal {T}\right) \leq e ^ {\epsilon} \operatorname * {P r} \left(\mathcal {M} (D) \in \mathcal {T}\right) + \delta . +$$ + +Thus, DP focuses on controlling the extent to which the output of the mechanism reveals information about any individual data sample. + +In contrast, certified unlearning ensures statistical indistinguishability between the output of a retrained model and that of an unlearned model. The guarantee provided by certified unlearning, as defined in Definition 3.1, ensures that the behavior of the unlearned model closely approximates the retrained model within $(\epsilon, \delta)$ bounds. + +Certified unlearning often employs DP-inspired techniques like the Gaussian mechanism to achieve guarantees. Specifically, certification requires finding an upper bound for the norm of the difference between a model retrained from scratch and one updated via the unlearning mechanism. This bound enables noise scaling according to the Gaussian mechanism ((Dwork, 2006), App. A) to satisfy $(\epsilon, \delta)$ -certified unlearning, ensuring statistical indistinguishability between the unlearned and retrained models (Definition 3.1). + +Previous works derive this upper bound based on the unlearning mechanism's algorithm. Many certified unlearning approaches rely on single-step second-order Newton updates under strong convexity assumptions (Guo et al., 2019; Sekhari et al., 2021; Zhang et al., 2024), where the Hessian is computed over the retain dataset $\mathcal{D}_r$ at the model trained on the full dataset $\boldsymbol{w}^*$ . + +# B.1. Certified Unlearning Using Newton Updates with Exact Data Samples + +Certified unlearning methods often utilize statistical information, $S(\cdot)$ , such as the Hessian of the full dataset evaluated at $w^{*}$ (Sekhari et al., 2021; Zhang et al., 2024). These methods randomize the unlearning mechanism by adding noise, following the Gaussian mechanism. The upper bound for the norm of the difference between the retrained and unlearned models is derived using retained data samples (Sekhari et al., 2021; Zhang et al., 2024). + +Building on this framework, Sekhari et al. (Sekhari et al., 2021) derived an explicit upper bound for the norm difference, leveraging strong convexity and second-order information. This bound provides critical insights into the statistical guarantees of certified unlearning. In the following the upper bound between + +Lemma B.2 ((Sekhari et al., 2021) Lemma 3). Let the loss function $\mathcal{L}$ satisfy Assumption 4.1. Suppose the training dataset $\mathcal{D}$ contains $n$ samples, and the forget dataset $\mathcal{D}_u \subseteq \mathcal{D}$ consists of $m$ samples. The norm of the difference between the model retrained from scratch, $\boldsymbol{w}_r^*$ , and the model obtained using a second-order Newton update on the exact retain dataset $\mathcal{D}_r$ , $\boldsymbol{w}_r$ , is bounded above by + +$$ +\left\| \boldsymbol {w} _ {r} ^ {*} - \boldsymbol {w} _ {r} \right\| _ {2} \leq \frac {2 \gamma L m ^ {2}}{\alpha^ {3} n ^ {2}}. \tag {11} +$$ + +Proof. The proof can be found in the Supplementary Material of Sekhari et al. (Sekhari et al., 2021) under C.1. + +# C. Upper Bound for Norm of Difference Between Unlearning Updates (Proof of Theorem 4.2) + +Let us focus on the Hessians of the loss function $\mathcal{L}$ , calculated at the same model $\boldsymbol{w}$ , for two different distributions, $\rho$ and $\nu$ . The distributions $\rho$ and $\nu$ share the same support set, $\mathcal{X} \times \mathcal{Y}$ . The Hessians corresponding to each distribution are defined as follows. + +The Hessian of the loss function $\mathcal{L}$ under the distribution $\rho$ , evaluated at the model $\boldsymbol{w}$ , is given by + +$$ +\mathbf {H} _ {\rho} = \mathbb {E} _ {(\boldsymbol {x}, y) \sim \rho} \left[ \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) \right]. \tag {12} +$$ + +Similarly, the Hessian of the loss function $\mathcal{L}$ under the distribution $\nu$ , evaluated at the model $\boldsymbol{w}$ , is given by + +$$ +\mathbf {H} _ {\nu} = \mathbb {E} _ {(\boldsymbol {x}, y) \sim \nu} \left[ \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) \right]. \tag {13} +$$ + +Next, we focus on the spectral norm of the difference between these two Hessian. The following lemma provides an upper bound. + +Lemma C.1. If the loss function $\mathcal{L}$ satisfies the Assumption 4.1, then the following upper bound holds: + +$$ +\left\| \mathbf {H} _ {\rho} - \mathbf {H} _ {\nu} \right\| _ {2} \leq 2 \beta \operatorname {T V} (\rho \| \nu) \tag {14} +$$ + +Proof. + +$$ +\begin{array}{l} \left\| \mathbf {H} _ {\rho} - \mathbf {H} _ {\nu} \right\| _ {2} = \left\| \mathbb {E} _ {(\boldsymbol {x}, y) \sim \rho} \left[ \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) \right] - \mathbb {E} _ {(\boldsymbol {x}, y) \sim \nu} \left[ \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) \right] \right\| _ {2} (15) \\ = \left\| \sum_ {\boldsymbol {x} \in \mathcal {X}} \sum_ {y \in \mathcal {Y}} \rho (\boldsymbol {x}, y) \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) - \sum_ {\boldsymbol {x} \in \mathcal {X}} \sum_ {y \in \mathcal {Y}} \nu (\boldsymbol {x}, y) \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) \right\| _ {2} (16) \\ = \left\| \sum_ {\boldsymbol {x} \in \mathcal {X}} \sum_ {y \in \mathcal {Y}} \left(\rho (\boldsymbol {x}, y) - \nu (\boldsymbol {x}, y)\right) \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) \right\| _ {2} (17) \\ \leq \sum_ {\boldsymbol {x} \in \mathcal {X}} \sum_ {y \in \mathcal {Y}} | (\rho (\boldsymbol {x}, y) - \nu (\boldsymbol {x}, y)) \| \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) \| _ {2} (18) \\ \leq \beta \sum_ {\boldsymbol {x} \in \mathcal {X}} \sum_ {y \in \mathcal {Y}} | (\rho (\boldsymbol {x}, y) - \nu (\boldsymbol {x}, y)) | (19) \\ = 2 \beta \operatorname {T V} (\rho \| \nu) (20) \\ \end{array} +$$ + +In the above, Equation (18) follows from the sub-multiplicativity and sub-additivity of the matrix norm. Equation (19) holds due to the $\beta$ -smoothness property of the loss function $\mathcal{L}$ , and Equation (20) follows from the definition of the Total Variation distance. + +Building on the discussion of the Hessians for the distributions $\rho$ and $\nu$ , we now turn our attention to their empirical counterparts. The empirical Hessian matrices can be represented as follows. Let the training dataset $\mathcal{D}$ consist of $n_1$ samples drawn from the distribution $\rho$ , and let $\mathcal{D}_s$ consist of $n_2$ samples drawn from the distribution $\nu$ . Then, if $n_1$ and $n_2$ are sufficiently large, we can make the following statement based on the law of large numbers. + +$$ +\mathbf {H} _ {\mathcal {D}} = \frac {1}{n _ {1}} \sum_ {(\boldsymbol {x}, y) \in \mathcal {D}} \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) \approx \mathbb {E} _ {(\boldsymbol {x}, y) \sim \rho} \left[ \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) \right], \tag {21} +$$ + +$$ +\mathbf {H} _ {\mathcal {D} _ {s}} = \frac {1}{n _ {2}} \sum_ {(\boldsymbol {x}, y) \in \mathcal {D} _ {s}} \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) \approx \mathbb {E} _ {(\boldsymbol {x}, y) \sim \nu} \left[ \nabla^ {2} \mathcal {L} ((\boldsymbol {x}, y), \boldsymbol {w}) \right]. \tag {22} +$$ + +After establishing the empirical Hessian matrices and their dependence on datasets $\mathcal{D}$ and $\mathcal{D}_s$ , we now state the following result, which provides a bound on the spectral norm of their scaled difference. This result directly follows from the assumptions on the loss function $\mathcal{L}$ and the distributions $\rho$ and $\nu$ . + +Lemma C.2. Suppose the loss function $\mathcal{L}$ satisfies Assumption 4.1. Let the training dataset $\mathcal{D}$ consist of $n_1$ samples drawn from the distribution $\rho$ , and let the surrogate dataset $\mathcal{D}_s$ consist of $n_2$ samples drawn from the distribution $\nu$ . Assuming that $n_1$ and $n_2$ are sufficiently large, the following bound holds. + +$$ +\left\| n _ {1} \mathbf {H} _ {\mathcal {D}} - n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}} \right\| _ {2} \leq (n _ {1} - n _ {2}) \beta + 2 n _ {2} \beta \operatorname {T V} (\rho \| \nu) \tag {23} +$$ + +Proof. Without loss of generality assume that $n_1 \geq n_2$ + +$$ +\begin{array}{l} \left\| n _ {1} \mathbf {H} _ {\mathcal {D}} - n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}} \right\| _ {2} = \left\| \left(n _ {1} - n _ {2}\right) \mathbf {H} _ {\mathcal {D}} + n _ {2} \mathbf {H} _ {\mathcal {D}} - n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}} \right\| _ {2} (24) \\ \leq \left(n _ {1} - n _ {2}\right) \| \mathbf {H} _ {\mathcal {D}} \| _ {2} + n _ {2} \| \mathbf {H} _ {\mathcal {D}} - \mathbf {H} _ {\mathcal {D} _ {s}} \| _ {2} (25) \\ \approx \left(n _ {1} - n _ {2}\right) \| \mathbf {H} _ {\mathcal {D}} \| _ {2} + n _ {2} \| \mathbf {H} _ {\rho} - \mathbf {H} _ {\nu} \| _ {2} (26) \\ \leq \left(n _ {1} - n _ {2}\right) \beta + 2 n _ {2} \beta \operatorname {T V} (\rho \| \nu) (27) \\ \end{array} +$$ + +Here, the first inequality uses the triangle inequality for matrix norms. The approximation in the third step relies on the assumption that the empirical Hessian matrices $\mathbf{H}_{\mathcal{D}}$ and $\mathbf{H}_{\mathcal{D}_s}$ converge to their population counterparts $\mathbf{H}_{\rho}$ and $\mathbf{H}_{\nu}$ , respectively, when $n_1$ and $n_2$ are sufficiently large by the law of large numbers. The last inequality holds because of the Lemma C.1. + +To proceed with the main proof, we introduce the following lemma as a key tool. This lemma provides an upper bound on the spectral norm of the inverse of the weighted difference of Hessians. + +Lemma C.3. Suppose the loss function $\mathcal{L}$ satisfies Assumption 4.1. Let the training dataset $\mathcal{D}$ consist of $n$ samples, and the forget dataset $\mathcal{D}_u$ consist of $m$ samples. If $n > \frac{m\beta}{\alpha}$ , then the following bound holds: + +$$ +\left\| \left(n \mathbf {H} _ {\mathcal {D}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1} \right\| _ {2} \leq \frac {1}{n \alpha - m \beta} \tag {28} +$$ + +Proof. By using the reverse triangle inequality we know that, + +$$ +\left\| \left(n \mathbf {H} _ {\mathcal {D}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) \right\| _ {2} \geq | n \| \mathbf {H} _ {\mathcal {D}} \| _ {2} - m \| \mathbf {H} _ {\mathcal {D} _ {u}} \| _ {2}. \tag {29} +$$ + +If $n > \frac{m\beta}{\alpha}$ then the inner term will be positive because the spectral norms of Hessians are between $\alpha$ and $\beta$ by the Assumption 4.1 (strong convexity and smoothness). Therefore, + +$$ +\begin{array}{l} \left| n \| \mathbf {H} _ {\mathcal {D}} \| _ {2} - m \| \mathbf {H} _ {\mathcal {D} _ {u}} \| _ {2} \right| = n \| \mathbf {H} _ {\mathcal {D}} \| _ {2} - m \| \mathbf {H} _ {\mathcal {D} _ {u}} \| _ {2} (30) \\ \geq n \alpha - m \beta . (31) \\ \end{array} +$$ + +Having this lower bound on the spectral norm of $\| (n\mathbf{H}_{\mathcal{D}} - m\mathbf{H}_{\mathcal{D}_u})\| _2$ , we can conclude on the following upper bound. + +$$ +\left\| \left(n \mathbf {H} _ {\mathcal {D}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1} \right\| _ {2} \leq \frac {1}{n \alpha - m \beta} \tag {32} +$$ + +![](images/ec24150f8a3641f30de024ba3281362b5db98467ae489ef1431b017e9092be53.jpg) + +In this section, we focus on quantifying the difference between the models approximated using the exact dataset and the surrogate dataset. By leveraging the previously introduced tools, we can establish an upper bound on the norm of the difference between these two models. + +Lemma C.4. Suppose the loss function $\mathcal{L}$ satisfies Assumption 4.1. Let $\pmb{w}_r$ denote the model approximated using the exact dataset $\mathcal{D}$ of size $n_1$ and the forget set $\mathcal{D}_u$ of size $m$ . Similarly, let $\hat{\pmb{w}}_r$ denote the model approximated using the surrogate dataset $\mathcal{D}_s$ of size $n_2$ . Also, assume that the $n_1$ and $n_2$ are sufficiently large and $n_i \geq \frac{m\beta}{\alpha}$ where $i \in \{1,2\}$ . Then, the norm of the difference between the approximated models is upper bounded as follows: + +$$ +\left\| \boldsymbol {w} _ {r} - \widehat {\boldsymbol {w}} _ {r} \right\| _ {2} \leq \frac {m \left(n _ {1} - n _ {2}\right) \beta + 2 m n _ {2} \beta \operatorname {T V} (\rho \| \nu)}{\left(n _ {1} \alpha - m \beta\right) \left(n _ {2} \alpha - m \beta\right)} \| \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) \| _ {2} \tag {33} +$$ + +Proof. Let's start from the applied update to the trained model $\boldsymbol{w}^*$ having the exact training data samples and the forget set. + +$$ +\begin{array}{l} \boldsymbol {w} _ {r} = \boldsymbol {w} ^ {*} + \frac {m}{n _ {1} - m} \left(\frac {n _ {1} \mathbf {H} _ {\mathcal {D}} - m \mathbf {H} _ {\mathcal {D} _ {u}}}{n _ {1} - m}\right) ^ {- 1} \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) (34) \\ = \boldsymbol {w} ^ {*} + m \left(n _ {1} \mathbf {H} _ {\mathcal {D}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1} \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) (35) \\ \end{array} +$$ + +The model achieved after applying the update with the surrogate dataset $\mathcal{D}_s$ is + +$$ +\begin{array}{l} \widehat {\boldsymbol {w}} _ {r} = \boldsymbol {w} ^ {*} + \frac {m}{n _ {2} - m} \left(\frac {n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}} - m \mathbf {H} _ {\mathcal {D} _ {u}}}{n _ {2} - m}\right) ^ {- 1} \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) (36) \\ = \boldsymbol {w} ^ {*} + m \left(n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1} \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) (37) \\ \end{array} +$$ + +$$ +\begin{array}{l} \left\| \boldsymbol {w} _ {r} - \widehat {\boldsymbol {w}} _ {r} \right\| _ {2} = \left\| m \left(\left(n _ {1} \mathbf {H} _ {\mathcal {D}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1} - \left(n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1}\right) \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) \right\| _ {2} (38) \\ \leq m \left\| \left(\left(n _ {1} \mathbf {H} _ {\mathcal {D}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1} - \left(n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1}\right) \right\| _ {2} \| \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) \| _ {2} (39) \\ \leq m \left\| \left(n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1} \right\| _ {2} \| \left(n _ {1} \mathbf {H} _ {\mathcal {D}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) - \left(n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) \| _ {2} (40) \\ \left\| \left(n _ {1} \mathbf {H} _ {\mathcal {D}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1} \right\| _ {2} \| \nabla \mathcal {L} (\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}) \| _ {2} \\ = m \left\| \left(n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1} \right\| _ {2} \| \left(n _ {1} \mathbf {H} _ {\mathcal {D}} - n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}}\right) \| _ {2} (41) \\ \left\| \left(n _ {1} \mathbf {H} _ {\mathcal {D}} - m \mathbf {H} _ {\mathcal {D} _ {u}}\right) ^ {- 1} \right\| _ {2} \| \nabla \mathcal {L} (\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}) \| _ {2} \\ \leq \frac {m \left(n _ {1} - n _ {2}\right) \beta + 2 m n _ {2} \beta \operatorname {T V} (\rho \| \nu)}{\left(n _ {1} \alpha - m \beta\right) \left(n _ {2} \alpha - m \beta\right)} \| \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) \| _ {2} (42) \\ \end{array} +$$ + +The last inequality holds by using Lemma C.2 and Lemma C.3. + +![](images/e6cce05d487f26fcc4f61fe91368723e88132567cf90de62f2e0b9bdf43cf3c9.jpg) + +With all the necessary tools established, we are now ready to prove the main result, Theorem 4.2. This theorem quantifies the relationship between the retrained model over the retained samples and the model approximated using the surrogate dataset, providing an upper bound on their difference. + +Theorem C.5 (Proof of Theorem 4.2). Consider a loss function $\mathcal{L}$ satisfying Assumption 4.1, and a surrogate dataset $\mathcal{D}_s$ with $n_2$ samples drawn from a distribution $\nu$ , to mimic the true dataset $\mathcal{D}$ with $n_1$ drawn from a distribution $\rho$ , over the support set $\mathcal{X} \times \mathcal{Y}$ . Define the retrained model over the retained samples as $\boldsymbol{w}_r^*$ and the model achieved after unlearning as $\widehat{\boldsymbol{w}}_r$ . Also, assume that the $n_1$ and $n_2$ are sufficiently large and $n_i \geq \frac{m\beta}{\alpha}$ where $i \in \{1,2\}$ . Then, the following upper bound holds, + +$$ +\left\| \boldsymbol {w} _ {r} ^ {*} - \widehat {\boldsymbol {w}} _ {r} \right\| _ {2} \leq \frac {2 \gamma L m ^ {2}}{\alpha^ {3} n _ {1} ^ {2}} + \frac {m \left(n _ {1} - n _ {2}\right) \beta + 2 m n _ {2} \beta \operatorname {T V} (\rho \| \nu)}{\left(n _ {1} \alpha - m \beta\right) \left(n _ {2} \alpha - m \beta\right)} \| \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) \| _ {2} \tag {43} +$$ + +Proof. By the triangle inequality, + +$$ +\begin{array}{l} \left\| \boldsymbol {w} _ {r} ^ {*} - \widehat {\boldsymbol {w}} _ {r} \right\| _ {2} = \left\| \boldsymbol {w} _ {r} ^ {*} - \boldsymbol {w} _ {r} + \boldsymbol {w} _ {r} - \widehat {\boldsymbol {w}} _ {r} \right\| _ {2} (44) \\ \leq \left\| \boldsymbol {w} _ {r} ^ {*} - \boldsymbol {w} _ {r} \right\| _ {2} + \left\| \boldsymbol {w} _ {r} - \widehat {\boldsymbol {w}} _ {r} \right\| _ {2} (45) \\ \end{array} +$$ + +Then by utilizing the Lemma C.4 and Lemma B.2 the upper bound is proven. + +![](images/561adf82f8fee9783265f3ad6282dd76fa932013424b8c490a53b5e80b90743a.jpg) + +# C.1. Proof of Theorem 4.3 + +Theorem C.6 (Proof of Theorem 4.3). Consider a dataset $\mathcal{D}$ where data samples follow the distribution $\rho$ , and a surrogate dataset $\mathcal{D}_s$ where data samples follow the distribution $\nu$ . Given a forget set $\mathcal{D}_u \subseteq \mathcal{D}$ , and the hypothesis set $\mathcal{H}$ , the unlearning mechanism $\widehat{\mathcal{U}}$ (Algorithm 1) satisfies $(\epsilon, \delta)$ -certified unlearning. For any $\mathcal{T} \subseteq \mathcal{H}$ , + +$$ +\begin{array}{l} \Pr \left(\widehat {\mathcal {U}} \left(\mathcal {D} _ {u}, \mathcal {A} (\mathcal {D}), \mathcal {S} \left(\mathcal {D} _ {s}\right)\right) \in \mathcal {T}\right) \leq e ^ {\epsilon} \Pr \left(\widehat {\mathcal {U}} \left(\emptyset , \mathcal {A} \left(\mathcal {D} _ {r}\right), \mathcal {S} \left(\mathcal {D} _ {r}\right)\right) \in \mathcal {T}\right) + \delta , \tag {46} \\ \operatorname * {P r} \left(\widehat {\mathcal {U}} (\emptyset , \mathcal {A} (\mathcal {D} _ {r}), \mathcal {S} (\mathcal {D} _ {r})) \in \mathcal {T}\right) \leq e ^ {\epsilon} \operatorname * {P r} \left(\widehat {\mathcal {U}} (\mathcal {D} _ {u}, \mathcal {A} (\mathcal {D}), \mathcal {S} (\mathcal {D} _ {s})) \in \mathcal {T}\right) + \delta . \\ \end{array} +$$ + +Proof. Let $\boldsymbol{w}^{*} = \mathcal{A}(\mathcal{D})$ denote the model trained on the whole train dataset $\mathcal{D}$ with $n_1$ number of samples following the distribution $\rho$ , $\boldsymbol{w}_r^* = \mathcal{A}(\mathcal{D}_r)$ the model retrained from scratch over the retain dataset $\mathcal{D}_r = \mathcal{D} \backslash \mathcal{D}_u$ where $\mathcal{D}_u$ is the forget set with $m$ number of samples, and $\widehat{\boldsymbol{w}}_r$ the model approximated retrained model after the single step second-order Newton update utilizing the surrogate dataset $\mathcal{D}_s$ with $n_2$ number of samples following distribution $\nu$ . Assume that the loss function used is satisfying the Assumption 4.1, $n_1$ and $n_2$ are sufficiently large and $n_i \geq \frac{m\beta}{\alpha}$ where $i \in \{1, 2\}$ . Also the support sets of distributions are the same $\mathcal{X} \times \mathcal{Y}$ . + +The $\widehat{\pmb{w}}_r$ defined as + +$$ +\widehat {\boldsymbol {w}} _ {r} = \boldsymbol {w} ^ {*} + \frac {m}{n _ {2} - m} \left(\frac {n _ {2} \mathbf {H} _ {\mathcal {D} _ {s}} - m \mathbf {H} _ {\mathcal {D} _ {u}}}{n _ {2} - m}\right) ^ {- 1} \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right). \tag {47} +$$ + +By applying Theorem C.5 we can observe the following upper bound, + +$$ +\left\| \boldsymbol {w} _ {r} ^ {*} - \widehat {\boldsymbol {w}} _ {r} \right\| _ {2} \leq \frac {2 \gamma L m ^ {2}}{\alpha^ {3} n _ {1} ^ {2}} + \frac {m (n _ {1} - n _ {2}) \beta + 2 m n _ {2} \beta \operatorname {T V} (\rho \| \nu)}{(n _ {1} \alpha - m \beta) (n _ {2} \alpha - m \beta)} \| \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) \| _ {2} = \Delta . \tag {48} +$$ + +The Algorithm 1 introduces the Gaussian noise to achieve indistinguishability between the model retrained from scratch $\pmb{w}_r^*$ and the model achieved after the unlearning $\widehat{\pmb{w}}_r$ . Let's define $(\pmb{w}_r^*)' = \widehat{\mathcal{U}}(\emptyset, \mathcal{A}(\mathcal{D}_r), \mathcal{S}(\mathcal{D}_r)) = \pmb{w}_r^* + \pmb{n}$ and $\widehat{\pmb{w}}_r' = \widehat{\mathcal{U}}(\mathcal{D}_u, \mathcal{A}(\mathcal{D}), \mathcal{S}(\mathcal{D}_s)) = \widehat{\pmb{w}}_r + \pmb{n}$ where the Gaussian noise $\pmb{n} \sim \mathcal{N}(\mathbf{0}, \sigma^2\mathbf{I})$ with $\sigma = (\Delta/\epsilon)\sqrt{2\log(1.25/\delta)}$ . Following the proof from Dwork et al. ((Dwork, 2006) Theorem A.1), we can prove that for any set $\mathcal{T} \subseteq \mathcal{H}$ , + +$$ +\begin{array}{l} \Pr \left(\widehat {\boldsymbol {w}} _ {r} ^ {\prime} \in \mathcal {T}\right) \leq e ^ {\epsilon} \Pr \left(\left(\boldsymbol {w} _ {r} ^ {*}\right) ^ {\prime} \in \mathcal {T}\right) + \delta , \tag {49} \\ \Pr \left(\left(\boldsymbol {w} _ {r} ^ {*}\right) ^ {\prime} \in \mathcal {T}\right) \leq e ^ {\epsilon} \Pr \left(\widehat {\boldsymbol {w}} _ {r} ^ {\prime} \in \mathcal {T}\right) + \delta . \\ \end{array} +$$ + +![](images/b87c78f402d5dcdc627dfce037ec09e6dee5ec434333a1e75341b5a59b6eaa30.jpg) + +# D. Approximating Kullbeck-Leiber Distance + +# D.1. Proof of Corollary 4.4 + +Corollary D.1 (Proof of Corollary 4.4). Under the same assumptions and definitions in Theorem 4.2, the following upper bound holds: + +$$ +\begin{array}{l} \| \boldsymbol {w} _ {r} ^ {*} - \widehat {\boldsymbol {w}} _ {r} \| _ {2} \leq \frac {2 \gamma L ^ {2} m ^ {2}}{\alpha^ {3} n ^ {2}} + \frac {m (n _ {1} - n _ {2}) \beta \| \nabla \mathcal {L} (\mathcal {D} _ {u} , \boldsymbol {w} ^ {*}) \| _ {2}}{(n _ {1} \alpha - m \beta) (n _ {2} \alpha - m \beta)} \\ + \left(\frac {2 m n _ {2} \beta \sqrt {1 - \exp (- \mathrm {K L} (\nu \| \rho))}}{(n _ {1} \alpha - m \beta) (n _ {2} \alpha - m \beta)} \cdot \| \nabla \mathcal {L} \left(\mathcal {D} _ {u}, \boldsymbol {w} ^ {*}\right) \| _ {2}\right) \tag {50} \\ = \Delta \\ \end{array} +$$ + +Proof. The total variation distance is symmetric therefore, + +$$ +\operatorname {T V} (\rho \parallel \nu) = \operatorname {T V} (\nu \parallel \rho) \tag {51} +$$ + +Also, by the Bretagnolle-Huber Inequality (Bretagnolle & Huber, 1979), + +$$ +\operatorname {T V} (\nu \| \rho) \leq \sqrt {1 - e ^ {- \mathrm {K L} (\nu \| \rho)}} \tag {52} +$$ + +By replacing the total variation distance with this upper bound we prove the Corollary 4.4. + +We need this upper bound utilizing the KL divergence between the surrogate and the exact data distributions because we have the surrogate samples. By having the surrogate samples we can approximate the expected values calculated over surrogate samples utilizing Monte-Carlo approximation. + +# D.2. Derivations for Proposition 4.5 + +Proposition D.2 (Derivation of Proposition 4.5). Let $f(\boldsymbol{w}, \boldsymbol{x})$ output a probability simplex over classes for a data sample $\boldsymbol{x}$ , parameterized by $\boldsymbol{w}$ . Given trained models $\boldsymbol{w}^*$ and $\tilde{\boldsymbol{w}}^*$ , where $\boldsymbol{w}^*$ is trained on $\mathcal{D}$ and $\tilde{\boldsymbol{w}}^*$ on $\mathcal{D}_s$ . Also, data samples from $\mathcal{D}$ and $\mathcal{D}_s$ follow distributions $\rho$ and $\nu$ , respectively. The KL divergence $\mathrm{KL}(\nu \| \rho)$ can be decomposed as, + +$$ +\operatorname {K L} (\nu \| \rho) \approx \frac {1}{n} \sum_ {(\boldsymbol {x}, y) \in \mathcal {D} _ {s}} \log \frac {f \left(\tilde {\boldsymbol {w}} ^ {*} , \boldsymbol {x}\right) _ {y}}{f \left(\boldsymbol {w} ^ {*} , \boldsymbol {x}\right) _ {y}} + \operatorname {K L} (\nu (\boldsymbol {x}) \| \rho (\boldsymbol {x})) \tag {53} +$$ + +Proof. Starting with the definition, + +$$ +\operatorname {K L} (\nu \| \rho) = \sum_ {(\boldsymbol {x}, y) \in \mathcal {X} \times \mathcal {Y}} \nu (\boldsymbol {x}, y) \log \frac {\nu (y | \boldsymbol {x})}{\rho (y | \boldsymbol {x})} + \sum_ {(\boldsymbol {x}) \in \mathcal {X}} \nu (\boldsymbol {x}) \log \frac {\nu (\boldsymbol {x})}{\rho (\boldsymbol {x})} \tag {54} +$$ + +The conditional probabilities can be approximated by classifiers. Let's say the classifier model trained on the exact dataset (representing conditional distribution for exact distribution) is $\boldsymbol{w}^{*}$ . This model is already given to us for the unlearning. To represent the nominator we need to have an another model trained on the surrogate dataset provided, let's say after the training on the surrogate dataset we achieve the model $\tilde{\boldsymbol{w}}^{*}$ . Then we can approximate (54) as + +$$ +\operatorname {K L} (\nu \| \rho) \approx \sum_ {(\boldsymbol {x}, y) \in \mathcal {X} \times \mathcal {Y}} \nu (\boldsymbol {x}, y) \log \frac {f \left(\tilde {\boldsymbol {w}} ^ {*} , \boldsymbol {x}\right) _ {y}}{f \left(\boldsymbol {w} ^ {*} , \boldsymbol {x}\right) _ {y}} + \operatorname {K L} (\nu (\boldsymbol {x}) \| \rho (\boldsymbol {x})) \tag {55} +$$ + +By using Monte-Carlo approximation because we have access to the surrogate data samples we can further approximate (55) and prove the derivation. + +$$ +\operatorname {K L} (\nu \| \rho) \approx \frac {1}{n} \sum_ {(\boldsymbol {x}, y) \in \mathcal {D} _ {s}} \log \frac {f \left(\tilde {\boldsymbol {w}} ^ {*} , \boldsymbol {x}\right) _ {y}}{f \left(\boldsymbol {w} ^ {*} , \boldsymbol {x}\right) _ {y}} + \operatorname {K L} (\nu (\boldsymbol {x}) \| \rho (\boldsymbol {x})) \tag {56} +$$ + +# D.3. Energy Based Modeling, Stochastic Gradient Langevin Dynamics and Proposition 4.6 + +Without direct access to exact samples from the target distribution, we approximate the input marginal KL divergence using energy-based modeling, as introduced in (Grathwohl et al., 2019). Energy-based models (EBMs) provide a flexible framework for modeling complex distributions by associating an energy score with each input, which corresponds to the unnormalized log-probability of the input under the target distribution. The normalized target distribution, denoted as $\rho(\boldsymbol{x})$ , can be expressed as: + +$$ +\rho (\boldsymbol {x}) = \frac {\exp (- E (\boldsymbol {x}))}{Z} \tag {57} +$$ + +Here, $E(\pmb{x})$ represents the energy function, which is defined as follows, + +$$ +E (\boldsymbol {x}) = - \log \sum_ {y \in \mathcal {Y}} \exp (f \left(\boldsymbol {w} ^ {*}, \boldsymbol {x}\right) _ {y}) \tag {58} +$$ + +where $f(\boldsymbol{w}^*, \boldsymbol{x})_y$ corresponds to the logit score (or unnormalized log-probability) for the label $y$ given the input $\boldsymbol{x}$ under the model $\boldsymbol{w}^*$ . The summation is taken over the support of the output label space $\mathcal{V}$ . The normalization constant $Z = \int \exp(-E(\boldsymbol{x})) dx$ ensures that $\rho(\boldsymbol{x})$ is a valid probability distribution. However, evaluating $Z$ is computationally intractable due to the high-dimensional integral over the input space. + +To circumvent the intractability of computing $Z$ , we employ Stochastic Gradient Langevin Dynamics (SGLD), a popular sampling technique for EBMs. SGLD enables approximate sampling from $\rho(\boldsymbol{x})$ by iteratively updating samples based on the gradient of the energy function. Specifically, the update rule for the samples $\boldsymbol{x}$ at step $i$ is given by: + +$$ +\boldsymbol {x} _ {i + 1} = \boldsymbol {x} _ {i} - \frac {\mu}{2} \frac {\partial E (\boldsymbol {x})}{\partial \boldsymbol {x}} + \varepsilon \tag {59} +$$ + +where $\varepsilon \sim \mathcal{N}(0,\mu)$ is Gaussian noise, and $\mu$ represents the step size or learning rate. The negative gradient term $-\frac{\partial E(x)}{\partial x}$ directs the samples toward regions of lower energy (higher likelihood), while the Gaussian noise ensures exploration of the input space to avoid convergence to local minima. The process begins with initializing $x_0$ from a prior distribution over the input space, which is often chosen to be uniform for simplicity and generality. + +By iteratively applying this update rule, the generated samples approximate the target distribution $\rho(\pmb{x})$ without requiring explicit computation of the normalization constant $Z$ . Given the collected samples from the distribution $\rho(\pmb{x})$ along with the surrogate data samples, we then approximate the input marginal KL divergence using a Donsker-Varadhan variational representation (Donsker & Varadhan, 1983) of KL divergence. + +# E. Parameter Study and Implementation + +We systematically evaluate our approach on both synthetic and real-world datasets to demonstrate its effectiveness in achieving certified unlearning. Unless stated otherwise, we use a linear training model with privacy parameters $\epsilon = 5e^3$ and $\delta = 1$ , a forget ratio of 0.1, and an $L_{2}$ regularization constant of $\lambda = 0.01$ . The loss function is assumed to be $\alpha$ -strongly convex, $L$ -Lipschitz, $\beta$ -smooth, and $\gamma$ -Hessian Lipschitz. Following prior works (Koh & Liang, 2017; Wu et al., 2023b;a; Zhang et al., 2024), we set $\alpha$ , $L$ , $\beta$ , and $\gamma$ for each experimental setting as hyperparameters. We set $\alpha = 1 + \lambda$ , $L = 1$ , $\beta = 1$ and $\gamma = 1$ . Even if the added noise does not follow the exact theoretical requirements, it does not affect the theoretical soundness of the paper. + +For the sampling from the marginal distribution of the exact data, we used Stochastic Gradient Langevin Dynamics (SGLD) with step size 0.02 and generate 1000 samples. For each sample random update is applied 4000 iteration for each generated sample. + +After sampling done to estimate the KL divergence via Donsker Varadhan variational bound, we trained a network with three linear layers for a 500 epochs with learning rate 0.0001 using Adam optimizer. + +# F. Additional Synthetic and Real-World Dataset Experiments + +We conducted experiments on both synthetic and real datasets to justify the heuristic KL-divergence estimation (Section 4.2) and the corresponding empirical unlearning error $\hat{\Delta}$ . In Figures 3 and 4, we plot both the "exact" and "approximated" + +results (our heuristic method) for the KL-divergence and the respective noise $\sigma$ . For the synthetic data experiments, the exact KL is computed using its closed-form for Gaussians. For real data experiments, since the exact KL divergence was not available, we estimated it using the Donsker-Varadhan bound as a reference, leveraging both exact and surrogate data samples. Figure 3, Figure 4, Tables 8 and 9 show our approximations closely match exact values. + +
ζMethodTrainTestRetainForgetMIARTΔ\( \hat{\Delta} \)
-Original78.2±0.2%74.0±0.3%78.2±0.2%78.6±0.4%47.6±0.2%---
-Retrain77.2±0.3%71.8±0.2%77.7±0.5%73.2±0.4%47.4±0.2%10±1--
-Unlearn (+)77.4±0.6%72.1±0.7%76.9±0.8%74.1±0.3%47.5±0.4%10±20.02-
0.02Unlearn (-)77.5±0.2%72.3±0.5%77.8±0.1%74.5±0.2%49.1±0.4%9±20.230.21±0.12
0.04Unlearn (-)77.4±0.6%72.4±0.3%77.2±0.4%74.3±0.3%49.2±0.2%10±30.310.35±0.23
0.06Unlearn (-)77.4±0.5%72.4±0.6%77.5±0.2%74.2±0.5%48.7±0.7%11±20.370.38±0.13
0.08Unlearn (-)77.5±0.7%72.3±0.2%77.4±0.7%74.2±0.3%48.1±0.5%9±10.40.39±0.15
0.1Unlearn (-)77.4±0.4%72.3±0.1%77.7±0.4%74.1±0.9%48.2±0.2%12±30.410.41±0.08
+ +![](images/9874f322d30e35db48738f38115e9def803230ac5b45a4a00c6e4122c423b878.jpg) +(a) Required noise variance $(\sigma)$ + +![](images/b39dfd842244d8a54d483f582948234c8e737cadb6b4a82204b58b56b08667d6.jpg) +(b) Estimated KL divergence +Figure 3. (a) Required noise variance $\sigma$ for certified unlearning on synthetic data as a function of the off-diagonal elements of the covariance matrix $(\zeta)$ . Both exact and heuristic (approximate) estimates are shown based on KL divergence. (b) Estimated KL divergence vs. $\zeta$ . Exact values use the closed-form Gaussian KL divergence, approximate values use our heuristic based on model parameters and surrogate data. (c) Forget scores achieved for synthetic datasets for varying off-diagonal elements of the covariance matrix $(\zeta)$ . + +![](images/01e27cb94d4b086993fcdc9fa647af3e57cabda610482ddf062e41f36b0b4937.jpg) +(c) Forget Scores + +Table 8. Evaluation of unlearning performance while varying the off-diagonal elements $\left( \zeta \right)$ of the unit covariance on synthetic dataset. + +
ξMethodTrainTestRetainForgetMIARTΔ\( \hat{\Delta} \)
13Original85.9±0.8%73.3±0.1%85.4±0.5%84.6±0.2%----
Retrain86.7±0.2%73.7±0.8%87.7±0.5%75.6±0.2%51.5±0.7%70±1--
Unlearn (+)84.1±0.9%71.7±0.4%85.2±0.6%73.2±0.7%51.4±0.4%15±30.02-
Unlearn (-)84.7±0.4%72.2±0.9%85.3±0.7%73.6±0.5%51.8±0.3%15±20.49±0.030.51±0.04
36Original85.5±0.1%76.2±0.7%85.6±0.8%83.1±0.3%----
Retrain84.1±0.4%75.1±0.8%86.1±0.9%71.5±0.5%50.3±0.1%20±1--
Unlearn (+)84.9±0.1%75.6±0.1%85.1±0.1%71.5±0.3%50.8±0.5%18±10.02-
Unlearn (-)84.9±0.8%75.3±0.9%85.1±0.4%72.4±0.8%50.2±0.8%19±30.43±0.020.41±0.02
100Original84.7±0.5%71.3±0.3%84.9±0.4%83.6±0.5%----
Retrain82.9±0.3%76.0±0.2%84.2±0.8%71.1±0.5%52.5±0.4%19±2--
Unlearn (+)83.8±0.5%75.7±0.7%85.1±0.1%72.2±0.8%52.0±0.4%21±10.02-
Unlearn (-)83.7±0.4%75.6±0.3%85.0±0.7%72.0±0.6%51.9±0.2%16±30.25±0.020.31±0.07
+ +Table 9. Evaluation of unlearning performance while varying Dirichlet parameters $\left( \xi \right)$ on StanfordDogs dataset. + +To address whether the approximate certificate is practically useful, we report both $\Delta$ (exact) and $\hat{\Delta}$ . The results confirm that even if the estimated bounds grow, model performance aligns with Unlearn(+). For completeness, we ran multiple trials with different seeds, included error bars in all figures, and included error margins into the tables demonstrating consistency across repeated experiments. Overall, these findings validate the heuristic's reliability and practical utility in estimating KL divergence and unlearning error. + +![](images/0a5da2b651f09a7cadd350555b4fd9b3eeed8594d3371b11220856768b7cb15d.jpg) +(a) Required noise variance $(\sigma)$ + +![](images/7343ad6790f6d409137e912264afce158a7a4a4919ae1b6df9852b370616a775.jpg) +(b) Estimated KL divergence + +![](images/dfccb960002570959d0c03654b0f4fce5f47955452043321ac765d73bad78619.jpg) +(c) Forget Scores +Figure 4. (a) Required noise variance $\sigma$ for certified unlearning on StanfordDogs as a function of the Dirichlet parameter ( $\xi$ ). Both exact and heuristic (approximate) estimates are shown based on KL divergence. (b) Estimated KL divergence vs. $\xi$ . Exact values are calculated by using the exact and surrogate data samples, approximate values use our heuristic based on model parameters and surrogate data. (c) Forget scores achieved for StanfordDogs dataset for varying Dirichlet parameter ( $\xi$ ). \ No newline at end of file diff --git a/acertifiedunlearningapproachwithoutaccesstosourcedata/images.zip b/acertifiedunlearningapproachwithoutaccesstosourcedata/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..97ec1eea5d1eee60475887ae0453610962051c58 --- /dev/null +++ b/acertifiedunlearningapproachwithoutaccesstosourcedata/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9901f833fbce269619931552785449e1eae935ae4394d9b55cbee49eec0f46f7 +size 1232651 diff --git a/acertifiedunlearningapproachwithoutaccesstosourcedata/layout.json b/acertifiedunlearningapproachwithoutaccesstosourcedata/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..367e9593fe995ec3ae46de80edd49b55bbb68d5e --- /dev/null +++ b/acertifiedunlearningapproachwithoutaccesstosourcedata/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77dc0b9e327f2d1dd0413ee5aac88b49e7477af0aaf959e28f18093a10859d92 +size 1035533 diff --git a/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/de08e935-a370-4509-aaad-1800bba4d4fb_content_list.json b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/de08e935-a370-4509-aaad-1800bba4d4fb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6456bfc14162c2ec6f9b907ebd3e2d4d94d45c98 --- /dev/null +++ b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/de08e935-a370-4509-aaad-1800bba4d4fb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:056ba050a0771b0ca35f17f206634f48d7d05965f3571dc0fcc951e62d75607a +size 77858 diff --git a/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/de08e935-a370-4509-aaad-1800bba4d4fb_model.json b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/de08e935-a370-4509-aaad-1800bba4d4fb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..70f1447e860a76debd68531f73748197c25a4db7 --- /dev/null +++ b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/de08e935-a370-4509-aaad-1800bba4d4fb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9cb627f32696a47cc59680756a26c1f53062189fab5ee3c480f4a83638fe190 +size 94064 diff --git a/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/de08e935-a370-4509-aaad-1800bba4d4fb_origin.pdf b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/de08e935-a370-4509-aaad-1800bba4d4fb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e28bfd17bc7e37bdefa382742e388fce997247e2 --- /dev/null +++ b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/de08e935-a370-4509-aaad-1800bba4d4fb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c37d8edcaa6dae9cce2c167cbc2814aefc280ae05acebb1a0abb452d7e9519a0 +size 4624065 diff --git a/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/full.md b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/full.md new file mode 100644 index 0000000000000000000000000000000000000000..03ad5151d405bc33830ce2e5c9823f509bc1c6b7 --- /dev/null +++ b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/full.md @@ -0,0 +1,373 @@ +# A Chaotic Dynamics Framework Inspired by Dorsal Stream for Event Signal Processing + +Yu Chen $^{1,2}$ Jing Lian $^{3}$ Zhaofei Yu $^{4}$ Jizhao Liu $^{\dagger,1}$ Jisheng Dang $^{\dagger,1}$ Gang Wang $^{\dagger,2}$ + +# Abstract + +Event cameras are bio-inspired vision sensors that encode visual information with high dynamic range, high temporal resolution, and low latency. Current state-of-the-art event stream processing methods rely on end-to-end deep learning techniques. However, these models are heavily dependent on data structures, limiting their stability and generalization capabilities across tasks, thereby hindering their deployment in real-world scenarios. To address this issue, we propose a chaotic dynamics event signal processing framework inspired by the dorsal visual pathway of the brain. Specifically, we utilize Continuous-coupled Neural Network (CCNN) to encode the event stream. CCNN encodes polarity-invariant event sequences as periodic signals and polarity-changing event sequences as chaotic signals. We then use continuous wavelet transforms to analyze the dynamical states of CCNN neurons and establish the high-order mappings of the event stream. The effectiveness of our method is validated through integration with conventional classification networks, achieving state-of-the-art classification accuracy on the N-Caltech101 and N-CARS datasets, with results of $84.3\%$ and $99.9\%$ , respectively. Our method improves the accuracy of event camera-based object classification while significantly enhancing the generalization and stability of event representation. Our code is available in https://github.com/chenyu0193/ACDF. + +$^{1}$ School of Information Science and Engineering, Lanzhou University, Lanzhou 730000, China $^{2}$ NAIVE Lab, Brain Research Center, Beijing Institute of Basic Medical Sciences, Beijing 100850, China $^{3}$ School of Electronics and Information Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China $^{4}$ School of Institute for Artificial Intelligence, Peking University, Beijing 100850, China. Correspondence to: Jizhao Liu , Jisheng Dang , Gang Wang . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +# 1. Introduction + +Event cameras, inspired by the three-layer structure of the peripheral retina in primates, are neuromorphic sensors designed for silicon-based vision. Each pixel of the event sensor operates independently and continuously to detect changes in light intensity within a scene. When the change exceeds a preset threshold, an event signal is triggered. The event signal encodes spatiotemporal information, including a timestamp, spatial coordinates, and polarity. The unique sampling mechanism enables event stream data with the advantages of high temporal resolution, low redundancy, a wide dynamic range, and minimal latency. However, frame-based vision algorithms designed for image sequences are not directly applicable to event data (Gallego et al., 2020). + +To address this challenge, event streams are compressed event into frames, producing 2D event frame images via frequency accumulation methods (Gallego et al., 2018; Stoffgren & Kleeman, 2019; Gallego et al., 2019; Almatrafi et al., 2020; Brebion et al., 2021; Hagenaars et al., 2021; Paredes-Valles & De Croon, 2021; Shiba et al., 2022b). Similarly, a timestamp-based event representation method, known as event surfaces (Mueggler et al., 2017; Lagorce et al., 2017; Sironi et al., 2018), updates the latest timestamp information to capture motion changes in the spatial positions of objects. To more effectively leverage the spatiotemporal information within event streams, a spatiotemporal histogram-based representation was proposed, called voxel grids (Zhu et al., 2018; Deng et al., 2022; Xie et al., 2022; Baldwin et al., 2022). This method discretizes the time domain and employs linearly weighted accumulation to allocate events into corresponding voxels. + +With advancements in deep learning and large-scale computation, data-driven, end-to-end neural networks (Gehrig et al., 2019; Sekikawa et al., 2019; Wang et al., 2019; Bi et al., 2019; Cannici et al., 2020; Yang et al., 2019; Bi et al., 2020; Deng et al., 2021; Schaefer et al., 2022; Sabater et al., 2022; Wang et al., 2022) have gained increasing popularity. These methods efficiently exploit the asynchronous spatiotemporal characteristics of event streams. Additionally, bio-inspired spiking neural networks (Fang et al., 2021; Li et al., 2022; Shen et al., 2023; Wang et al., 2024) simulate biological spike signal processing mechanisms, integrat- + +![](images/4d540312cd99e101dbbc0562152255c665641731f8a469cbf417770ecdaeaecf.jpg) + +![](images/b52d9920cdf3f6799b0315ca4c7e42c558a371c2f859ecc72e5f0cade990814f.jpg) +Figure 1. The architecture and performance of the proposed framework. (a) The chaotic dynamic framework, where event stream data are input into CCNN neurons in the form of coordinates. The dynamic characteristics of neurons are analyzed using CWT, and the event representation is subsequently obtained through LPF. (b) Comparative evaluation of the model's classification performance on multiple datasets. The proposed method achieves superior classification accuracy across diverse datasets, demonstrating its strong generalization capability and robust adaptability in processing event-based data. + +ing pulse signals and sampling events based on their firing times once a predefined threshold is exceeded. These event representation methods are shown in Figure 2. + +However, the above event representation methods exhibit significant limitations in terms of generalization and stability, particularly in their inconsistent performance across datasets, lack of robustness, and strong dependency on specific representational structures. Specifically, these methods often struggle with scenarios involving sparse data or high dynamic range, highlighting their lack of robustness and adaptability. Moreover, most event representation methods are designed to specific representational frameworks, such as spatiotemporal voxel grids or local features, making them less adaptable to diverse event data. These obstacles hinder the widespread applicability of existing methods in real-world scenarios. + +Drawing inspiration from the mechanisms of the brain for processing visual information offers a promising approach to overcoming current obstacles. Recent experimental studies have demonstrated that neural responses in visual processing exhibit consistent patterns, even while adapt- + +ing to diverse stimuli and experimental conditions (Groen et al., 2022; Gong et al., 2023). The experimental evidence strongly supports the brain's remarkable ability to maintain stable and generalizable visual processing across different datasets and conditions. By effectively harnessing the neural processing mechanisms of the visual cortex, we can advance the development of event representation methods with improved generalization and stability. + +In this work, we introduce a continuous-coupled neuron network (CCNN) inspired by the primary visual cortex (Liu et al., 2022). The CCNN exhibits electrophysiological properties similar to those of mammalian neuron clusters, generating periodic sequence outputs in response to constant input signals and chaotic sequence outputs in response to varying signals. This input-output behavior enables the network to effectively distinguish between stable events, characterized by constant polarity patterns, and dynamic events, characterized by varying polarity patterns. Leveraging the unique characteristics of the CCNN, we separate constant-polarity events from varying-polarity events within the same sampling period. The separated event sequences are then processed using continuous wavelet transforms (CWT) to extract spatiotemporal information, establishing a high-order mapping from the event stream to event frames. The overall architecture and performance of the framework are shown in Figure 1. To further enhance the accuracy of motion extraction, the framework integrates a deep neural network to achieve precise localization and recognition of moving objects, as shown in Figure 3. + +The main contributions of this work are summarized as follows: + +- We propose an event stream processing framework inspired by the brain's dorsal visual pathway. We introduce the spatial-temporal information encoding mechanism of the brain's dorsal pathway, also known as the "where" pathway, into the event stream data processing framework, effectively establishing a high-order mapping from event streams to event frames. +- This framework utilizes CCNN to encode constant-polarity event sequences as periodic signals and varying-polarity event sequences as chaotic signals, effectively achieving robust event representation. When combined with traditional deep neural networks, the framework successfully performs object classification for event cameras. +- The proposed framework is evaluated on multiple datasets, achieving state-of-the-art accuracy on specific benchmarks. It also demonstrates competitive performance across a variety of datasets. The results demonstrate the framework's strong generalization across different data structures. + +# 2. Related Work + +![](images/ff2d806a1183016a121065193581e2e41c0b79025fa042a892da659ee5cbc473.jpg) +Figure 2. The review of representation of asynchronous events. Existing methods can be classified into three categories: mathematical-based methods, end-to-end processing models based on ANNs, and brain-inspired networks. + +# 2.1. The Frequency Accumulation Methods + +Prior event representations were primarily task-specific methods based on mathematical models. For instance, the surface of active events (SAE) encodes three-dimensional event streams into frame images based on timestamps to capture event motion trajectories, demonstrating promising results in corner detection (Mueggler et al., 2017). Similarly, the concept of the "distance surface" was introduced, where pixel intensities are derived as proxies based on the distances of event points to motion edges, and applied to optical flow estimation (Almatrafi et al., 2020). Building on the "distance surface," inverse exponential calculations were incorporated, resulting in a novel dense "inverse exponential distance surface" representation that addresses noise sensitivity and unbounded influence regions (Brebion et al., 2021). However, these event representations typically adopt a frequency accumulation approach, often resulting in blurred event edges. Therefore, event alignment is required during the process of converting event streams into event frames. + +# 2.2. The Contrast Maximization Methods + +Contrast maximization serves as an effective method to address image blurring. It maximizes an evaluation function to assess the alignment of event edges caused by object motion, resulting in clear event frame images through motion estimation. Based on this, a unifying contrast maximization framework is proposed for motion, depth, and optical flow estimation with event cameras. (Gallego et al., 2018). Subsequently, researchers classified and investigated reward + +functions affecting event alignment, exploring the impact of different evaluation methods on recovering sharp event frames and their performance across various applications (Gallego et al., 2019) (Stoffregen & Kleeman, 2019). Beyond generating aligned event images, contrast maximization has also been employed in deep learning as a form of supervision. For instance, The contrast maximization-based self-supervised learning framework has achieved competitive results in optical flow estimation (Hagenaars et al., 2021; Paredes-Vallés & De Croon, 2021; Shiba et al., 2022b). However, the contrast objective (variance) may overfit the events, which can push the events to accumulate in too few pixels (event collapse (Shiba et al., 2022a)). + +# 2.3. The Deep Learning-based Methods + +With the increase in complexity, deep learning has rapidly become the dominant approach in asynchronous event data representation. The Event Spike Tensor (EST) is the first data-driven, end-to-end event representation method. It utilizes a multilayer perceptron (MLP) to learn the optimal mapping function, thereby maximizing task performance (Gehrig et al., 2019). Matrix-LSTM replaces the MLP with an LSTM, leveraging temporally accumulated pixel information to construct a 2D event representation, thereby further optimizing the learning framework (Cannici et al., 2020). To fully leverage the sparsity and asynchronicity of event data, graph-based representation methods utilizing graph neural networks have been proposed (Xu et al., 2018; Bi et al., 2020; Schaefer et al., 2022; Deng et al., 2022; Wang et al., 2024). These methods process event data in the form of a temporally evolving graph, efficiently maintaining both sparsity and high temporal resolution. Dense event representations based on convolutional neural networks (CNNs) achieve superior task performance; however, they are computationally intensive, which limits their practical deployment. In contrast, sparse event representations leveraging graph neural networks (GNNs) enhance efficiency by exploiting the spatiotemporal characteristics of asynchronous events, although they typically exhibit lower accuracy and are constrained in terms of application scope. + +# 3. Methods + +# 3.1.Event Field + +The event streams generated by event cameras can be considered as point sets in three-dimensional space, where each event point is represented as four-dimensional data. The event point consists of spatial coordinates $x$ and $y$ , polarity, and timestamps. Inspired by (Gehrig et al., 2019), this point set is represented by the following equation: + +$$ +E (x, y, p, t) = \sum_ {e _ {n} \in \varepsilon} \delta \left(x - x _ {n}, y - y _ {n}, p - p _ {n}\right) \delta \left(t - t _ {n}\right). \tag {1} +$$ + +![](images/8b57db4934d498dca6ee281045c946cf4d123b7227d58ca2435b8792a477cad6.jpg) +Figure 3. The human brain's visual cortex recognizes moving objects through the dorsal and ventral pathways. Event cameras mimic the three-layer structure of the peripheral retina in humans, encoding moving objects into event stream data. We utilize a chaotic dynamics framework, based on CCNN, to map the event stream data into event representations inspired by the dorsal stream. Subsequently, the event representations are sent from the MT area to the IT area, where recognition of moving objects is achieved through multiple layers of neural networks. + +The event point set is continuously represented by the function $E(x, y, p, t)$ . Each event point in the event stream is represented by $\delta(\cdot)$ to capture its spatiotemporal information and polarity. In three-dimensional space $\varepsilon$ , an event point $e_n = (x_n, y_n, p_n, t_n)$ generates a Dirac impulse when its spatiotemporal information and polarity match. This indicates the occurrence of the event. + +# 3.2. Dorsal Pathway-Inspired Event Representation + +Sampling. When processing three-dimensional event stream data, sampling is the primary step and can generally be categorized into two categories: fixed sampling and adaptive sampling. The sampled event bins are expressed as follows: + +$$ +\begin{array}{c} E \left[ x _ {i}, y _ {j}, p _ {k}, t _ {l} \right] = \sum_ {e _ {k} \in \varepsilon} \delta \left(x _ {i} - x _ {n}, y _ {j} - y _ {n}, p _ {k} - p _ {n}\right) \\ \delta \left(t _ {l} - t _ {n}\right), \end{array} \tag {2} +$$ + +where $x_{i} \in \{0,1,2,\dots X\}$ , $y_{j} \in \{0,1,2,\dots Y\}$ represent the resolution of the event frame, $p_{k} \in \{-1,1\}$ denotes the polarity of the event. $t_k \in \{t_0 + N(\eta \cdot \Delta t)\}$ , where $t_0$ is the starting time, $N$ is the number of event bins, $\Delta t$ is the time interval, and $\eta$ is the adjustment factor. For the fixed sampling method, $\eta$ remains constant, whereas for adaptive sampling, $\eta$ is adjusted dynamically based on specific requirements. + +Each event point in the event stream data contains the position coordinates $(x, y)$ of the moving object, a timestamp $t$ , and polarity $p$ . In this work, the coordinate information is designated as the key, while the polarity sequence corresponding to the same coordinate serves as the value. After aligning all values, they are uniformly input into the CCNN. Different polarity variation sequences result in different types of output signals. + +$$ +\begin{array}{l} V (e _ {n}) = F \left(\left(x _ {i}, y _ {j}\right), \varepsilon\right) \\ = \left\{\left(p _ {k}, t _ {l}\right) \mid E \left[ x _ {i}, y _ {j}, p _ {k}, t _ {l} \right] \in \varepsilon \right\}, \tag {3} \\ \end{array} +$$ + +where $F(\cdot)$ represents the mapping function, $(x_{i},y_{j})$ de + +notes the spatial coordinates used as keys, and $V(e_k)$ represents the polarity timestamp sequence corresponding to the coordinates, used as values. + +![](images/8b65ce7c945b7fd55c9ba8c3abacd2fa7c10f80382fd2cbdfbc3057fba84f081.jpg) +(a) + +![](images/7e7c9157543afc8e8e78d02a112b2144d30dfb926e6afd2120ae1bb0c1e21fda.jpg) +(b) + +Continuous-coupled Neural Network. When inputting all mapped polarity sequences within the same sampling period into the CCNN, a non-coupled CCNN is chosen for simplicity. Its mathematical model is described as shown in the following equation: + +$$ +U (k) = e ^ {- \alpha_ {f}} U (k - 1) + V \left(e _ {k}\right) +$$ + +$$ +Y (k) = \frac {1}{1 + e ^ {- (U (k) - E (k))}} \tag {4} +$$ + +$$ +E (k) = e ^ {- \alpha_ {c}} E (k - 1) + V _ {E} Y (k - 1), +$$ + +where $U$ is an independent variable influenced solely by the external input $V$ , which in this work corresponds to the polarity sequence at a specific coordinate. + +When the polarity varies uniformly, the general term equation of $U(k)$ is expressed as: + +$$ +U (k) = V \cdot \frac {1 - e ^ {- k \alpha_ {f}}}{1 - e ^ {- \alpha_ {f}}}. \tag {5} +$$ + +Through derivation, the expression for period $k$ is obtained as: + +$$ +k = 1 + \frac {1}{\alpha_ {f}} \ln \frac {V}{V - (1 - e ^ {- \alpha_ {f}}) (E (0) - \ln \left(\frac {V _ {E}}{(1 - e ^ {- \alpha_ {e}}) E (0)} - 1\right))}. \tag {6} +$$ + +Thus, CCNN neurons output a periodic sequence $Y(k)$ under constant stimulation, with the frequency of the period determined by the intensity of the input stimulus. + +When the polarity varies periodically, $V(e_k) = \{0, 1, 0, 1, \dots, 0, 1\} = -\frac{i^k + (-i)^k}{2} = \sin \left(\frac{k\cdot\pi}{2}\right)$ . The general term equation for $U(k)$ is given as: + +$$ +U (k) = \frac {e ^ {- k \alpha_ {f}} \sin \left(\frac {k \cdot \pi}{2}\right) - \alpha_ {f} e ^ {- k \alpha_ {f}} \cos \left(\frac {k \cdot \pi}{2}\right)}{1 + \alpha_ {f} ^ {2}}. \tag {7} +$$ + +![](images/9ca191c6ed3c994f9d0048ee88e98653842650d5f78a146372afedfc6f1913c1.jpg) +(a) + +![](images/fb583c1c6380d5fb8d30025c6a62280ff49b42f4184d834c1e377905598f79cb.jpg) +(b) + +![](images/4864b98a31ef18622c379af56eeb035939546bfb78482da820025e7a6883b1d2.jpg) +(c) + +![](images/99ad1e65d1d1b23cace047c6d86af9ac3cd58cf2a4927f0d157b9ced69947eda.jpg) +Figure 4. The input-output characteristics of the CCNN. (a) When stimulated by event signals with changing polarity, the CCNN generates chaotic sequences as output. (b) When stimulated by event signals with constant polarity, the CCNN produces periodic sequences as output. + +![](images/a062236b478f762ac7f30db2ffd2638c20af1023b003c782c5619dced1526c5c.jpg) +Figure 5. Waveform and phase space plot of CCNN neuron. (a) Waveform of U. (b) Waveform of E. (c) Waveform of Y. (d) Phase space plot of U-E plane. (e) Phase space plot of U-Y plane. (f) Phase space plot of E-Y plane. + +![](images/d843587b38d8478694082db0ec0e5054ec96f7b4821f05ce0ff5101cd431ab5e.jpg) + +According to equation (4), each update of $E(k)$ is influenced by $Y(k)$ , making it impossible to represent using a general mathematical equation. Consequently, the stimulation of periodic signals induces unique dynamic behavior in the CCNN model. Figure 5 illustrates the waveforms and phase space plots of the CCNN neuron under square wave signal stimulation, demonstrating its complex dynamic characteristics. + +Nonlinear analysis methods are subsequently utilized to investigate the dynamic behavior of the CCNN, with the equilibrium point of the model defined as follows: + +$$ +E (k + 1) = E (k) \Longrightarrow +$$ + +$$ +E (k) \left(1 + e ^ {- (U (k) - E (k))}\right) = \frac {V _ {E}}{1 - e ^ {- \alpha_ {e}}}. \tag {8} +$$ + +Using the Taylor series expansion of $e^x$ , the above equation is simplified, resulting in the following simplified equation (9): + +$$ +E (k) ^ {2} - (U (k) - 2) E (k) - \frac {V _ {E}}{1 - e ^ {- \alpha_ {e}}} = 0. \tag {9} +$$ + +Since $V_{E} > 0$ , $\alpha_{e} > 0$ , and $4V_{E}(1 - e^{-\alpha_{e}}) > 0$ , the discriminant $\Delta = (U(k) - 2)^{2} + 4V_{E}(1 - e^{-\alpha_{e}}) > 0$ . In this case, $E(k)$ can be expressed as: $E(k) = \frac{U(k) - 2 \pm \sqrt{(U(k) - 2)^{2} + 4V_{E}(1 - e^{-\alpha_{e}})}}{2}$ . Since $U(k)$ is an independent variable, equation (4) represents a two-dimensional discrete dynamic system. Using nonlinear analytical methods, it is derived that the system has two equilibrium points, which can be expressed as: + +$$ +U (k) = \frac {e ^ {- k \alpha_ {f}} \sin \left(\frac {k \cdot \pi}{2}\right) - \alpha_ {f} e ^ {- k \alpha_ {f}} \cos \left(\frac {k \cdot \pi}{2}\right)}{1 + \alpha_ {f} ^ {2}} +$$ + +$$ +E (k) = \frac {U (k) - 2 \pm \sqrt {(U (k) - 2) ^ {2} + 4 V _ {E} \left(1 - e ^ {- \alpha_ {\epsilon}}\right)}}{2} \tag {10} +$$ + +$$ +Y (k) = \frac {1}{1 + e ^ {- (U (k) - E (k))}}. +$$ + +Therefore, the CCNN neuron generates a chaotic sequence $Y(k)$ under periodic stimulation. While the processing of event signals by the CCNN is illustrated as Figure 4. + +Continuous Wavelet Transform. In the CWT, after extensive experimentation, the Gaussian wavelet is chosen as the basis function. It is derived from the translation and scaling of the Gaussian function, as shown in equation (11): + +$$ +\psi_ {a, b} (t) = \frac {1}{\sqrt {a}} \psi \left(\frac {t - b}{a}\right), \tag {11} +$$ + +where $\psi (\cdot)$ is the Gaussian function, $t$ is the input signal, and $\sigma$ is the standard deviation controlling the function's width. $\psi_{a,b}(t)$ denotes the Gaussian wavelet, with $a$ as the scale parameter and $b$ as the translation parameter determining its position. + +![](images/cc757552a7ce75a136095d7e71764a3c074ad86a1edc5683ba6e8bc352c8267a.jpg) +Figure 6. The heatmap of the real part of the CWT matrix. (a) The real part of the CWT matrix corresponding to the chaotic sequence. (b) The real part of the CWT matrix corresponding to the periodic sequence. + +![](images/0d18efe97a1fd5532236e99f9a9d95080e51ebfb47edecd72ac48326cd40b9e1.jpg) + +In the selection of the scale parameter for wavelet transform, we monotonically increased the scale parameter starting from 1, and ultimately chose a scale range of 10. + +$$ +\begin{array}{l} C W T (a, b) = Y (t) * \psi_ {a, b} (t) \\ = \frac {1}{\sqrt {2 \pi a} \sigma} \int_ {0} ^ {k} Y (t) e ^ {- \frac {(t - b) ^ {2}}{2 a ^ {2} \sigma^ {2}}} d t, \tag {12} \\ \end{array} +$$ + +where $Y(t)$ represents the output of the event polarity sequence processed by the CCNN, $\circledast$ represents the convolution operation. + +An empirical analysis reveals that for periodic sequences, the real parts of the wavelet coefficients are predominantly negative, whereas for chaotic sequences, they exhibit the opposite trend. The results, shown in Figure 6, demonstrate that summing the real parts of all wavelet coefficients effectively distinguishes between sequences with polarity changes and those without. + +$$ +S _ {i j} = \sum_ {i = 1} ^ {1 0} \sum_ {j = 1} ^ {k} R e (c w t \left(a _ {i}, b _ {j}\right)), \tag {13} +$$ + +where $S_{ij}$ represents the sum of the real parts of all elements in the coefficient matrix. + +Low-pass Filter. The constant polarity sequence and the changing polarity sequence are processed through the CCNN and CWT, resulting in values distributed on either side of the zero point. To accurately reflect the position of the moving object, a linear low-pass filter is used to extract effective event points as the pixel points of the event frame. Its expression is given by the following equation: + +$$ +H (f) = \left\{ \begin{array}{l l} 2 5 5, & f < 0 \\ 0, & f > 0. \end{array} \right. \tag {14} +$$ + +We set the coordinate points less than zero to 255 and those greater than zero to 0. This processing approach not only filters out irrelevant information but also preserves the most critical dynamic changes in the event stream, resulting in a clearer and more accurate event frame $F(x,y)$ : + +$$ +F (x, y) = \sum_ {i = 1} ^ {M} \sum_ {j = 1} ^ {N} S _ {i j} \cdot H (f). \tag {15} +$$ + +# 4. Experiment + +Dataset. We validate the stability and generalization of the proposed event representation method on four object classification datasets: N-MNIST (Orchard et al., 2015), N-Caltech101 (Orchard et al., 2015), N-CARS (Sironi et al., 2018), and ASL-DVS (Bi et al., 2019). Among these, N-MNIST dataset, a spiking version of the frame-based MNIST, contains 60000 training and 10000 testing samples $(28\times 28$ pixels). It was generated by capturing event streams with an ATIS sensor mounted on a motorized pantilt unit. N-Caltech101 dataset, derived from Caltech101, includes 8677 samples across 101 categories, with each category containing $40\sim 800$ samples (approximately $300\times 200$ pixels). N-CARS dataset is a real-world event-based car classification dataset with 12336 cars and 11693 non-car samples, recorded using an ATIS camera capturing $100~\mathrm{ms}$ events. ASL-DVS dataset comprises 100800 samples across 24 ASL letters (excluding J), with each $100~\mathrm{ms}$ sample recorded using a DAVIS240c event camera in a controlled office environment. + +Experimental Details. For each dataset, we employed a ResNet-34 architecture pre-trained on the ImageNet dataset. The data was split into training, validation, and test sets in a ratio of 3:1:1, with the random seed set to 2024. The model was trained for five epochs with a batch size of 16. During optimization, we used the cross-entropy loss function and the Adam optimizer with an initial learning rate of $1e - 4$ . To mitigate overfitting, we introduced a dropout layer before the fully connected layer and incorporated an early stopping mechanism during training. When the validation loss ceased + +![](images/173790f444206934f04e75dfd07a8b0f0769729aa770f89316ac7522d6c521e0.jpg) +(a) + +![](images/1755f4442a0e60f5f749ed2771572a010af119f929c447f25ae80f069e3f8389.jpg) +(b) +Figure 7. Semantic distance map. (a) Semantic 2D vector distribution of N-MNIST. (b) Semantic 2D vector distribution of ASL-DVS. + +Table 1. Classification accuracy on various datasets. $\clubsuit$ Spike-based, $\clubsuit$ Voxel-based, $\clubsuit$ Frame-based, $\star$ Ours. + +
MethodN-MN-CalN-CarsASL
NDA (Li et al.)-78.290.1-
VPT-STS (Shen et al.)-79.295.8-
GIN (Xu et al.)75.447.684.651.4
EventNet (Sekikawa et al.)75.242.575.983.3
RG-CNNs (Bi et al.)99.065.791.490.1
EV-VGCNN (Deng et al.)99.474.895.398.3
VMV-GCN (Xie et al.)99.577.893.298.9
TORE (Baldwin et al.)99.479.894.599.9
HATS (Sironi et al.)99.164.290.2-
EST (Gehrig et al.)99.075.391.997.9
AMAE (Deng et al.)98.369.493.698.4
M-LSTM (Cannici et al.)98.673.892.798.0
MVF-Net (Deng et al.)98.168.792.797.1
EvT (Sabater et al.)98.361.389.699.9
DVS-ViT (Wang et al.)98.163.390.796.9
TOKEN (Jiang et al.)99.981.695.499.9
Ours97.484.499.999.2
+ +to decrease, training was terminated early to ensure robust model performance. + +Results. As listed in Table 1, our framework outperformed all competing methods on the N-Caltech101 and N-CARS datasets and achieved competitive results on the N-MNIST and ASL-DVS datasets. On the N-CARS dataset, our framework achieved a near-perfect accuracy of $99.9\%$ , surpassing the current best-performing TOKEN method by $4.5\%$ and TORE by $5.4\%$ . Even advanced approaches such as EST and MVF-Net showed inferior performance compared to our framework. This underscores our framework's ability to effectively leverage temporal and polarity information. On the N-Caltech101 dataset, our framework's accuracy exceeded HATS by $17.5\%$ and EST by $9.05\%$ , + +Table 2. Model complexity of different methods on object classification. Here, we report average inference time on N-Cars. + +
MethodParams(M)MACs(G)Time(ms)
♦ PointNet++ (Qi et al.)1.84.0103.9
♦ RG-CNNs (Bi et al.)19.50.8-
♦ EV-VGCNN (Deng et al.)0.80.77.1
♦ VMV-GCN (Xie et al.)0.81.36.3
♥ EST (Gehrig et al.)21.44.36.4
♥ M-LSTM (Cannici et al.)21.44.36.4
♥ MVF-Net (Deng et al.)33.65.610.1
★ Ours21.93.72.1
+ +demonstrating its capability to handle complex datasets with high intra-class variation. In contrast, handcrafted representations performed poorly on such datasets due to their inability to fully exploit temporal and spatial features. On the N-MNIST dataset, our framework achieved an accuracy of $97.4\%$ , comparable to the state-of-the-art methods, EST and HATS. This indicates our framework's robustness even on datasets with lower complexity. For the ASL-DVS dataset, TORE achieved the highest accuracy of $99.9\%$ . Our framework achieved a comparable performance with an accuracy of $99.2\%$ , demonstrating its effectiveness in handling complex gesture recognition tasks. The semantic 2D vector distribution maps of N-MNIST and ASL-DVS are shown in Figure 7. + +Complexity Analysis. Table 2 lists the model complexity of different methods of object classification. We evaluate the model complexity comprehensively by three metrics: the number of trainable parameters, the number of multiply-accumulate operations (MACs), and average inference time. Our framework achieves superior accuracy on N-Caltech101 while keeping the moderate model complexity(3.67G MACs), demonstrating the efficiency of our + +![](images/0fc745223b798e2ddf9d592434db6e00a86178f00783dece21bd689bba3c3652.jpg) + +![](images/e21e74e693e3c1c082fef2738a7ed13bd1abe8a06b204a61599d805437bd8b5f.jpg) + +![](images/2cf1ebf39103098945f2b53cc5127aa42209dbfb518434807bb546d376a63a2d.jpg) + +![](images/1de80e643716cbd1a96728ac711b481c11b2f64b3d85e3655578363e8156d478.jpg) +RGB Frame + +![](images/d987e9458c913fb62b0465d232dafc538d74ff91c77473dc9f6a00da66e5ef3a.jpg) + +![](images/24c274003f8148fb1f03fa18af58f5ea1f65aa5fbac26864dcd631872697f5a4.jpg) + +![](images/30b0e6ffd84a739b83de90f098517942adf24d5e969ca8c90d0bd113f11a4eb4.jpg) + +![](images/fc17f633ed91935d3cfc20cbf436c3de58f427b283a30944a4a07ef47453ec18.jpg) +Event Count + +![](images/ba39890106145edff5b307bcda1bf5a7af9934b569b4fad759e61bd987c73de1.jpg) + +![](images/8f57dcc678423eb96955033db8c3e56d76034ee644edd88999c3dee89fbc08f8.jpg) + +![](images/7e32eba00d063be87b6c1e41e19acda265903ae3f24cfb9ce7b48efaf2c22aca.jpg) + +![](images/2ba47ff1ec2a4c8ce68b516ed1cb2baefa353c27c1a4a4236c3e5a2acc6c8917.jpg) +Time Surface + +![](images/8bce645118e486471278f2d5d74498a853fe1d915d0838db2e6470b48dc25989.jpg) + +![](images/f233229efbdddeeb9c4ca7643f24c73393102706dd52781358f71a1fc5be866e.jpg) + +![](images/a0cc4bf15cedb5010e9c86a7bc742ceb4dfb4823bacbf0d8c6307f75c83c4a51.jpg) + +![](images/e93a24cd41de24fc632310fdd71872dd5b72fc08985ba24545790e3359ac3588.jpg) +LIF +Figure 8. Visualization of different event representation methods on the N-Caltech101 dataset. Green boxes are ground truth, while red boxes are the minimum enclosing rectangle. + +![](images/e3372b21db101ff6b50f891d93b648f41b1dbd0842216152893eb87804a860f1.jpg) + +![](images/8519933d28e9662460e799237cbded424d03a77c09ff9bf9d25cb51b3ecf961e.jpg) + +![](images/459f31739a5c2fc6e725f11c679b6a024bdff10a576c2fb8e0543e12f1389ad3.jpg) + +![](images/b219bd3d448e2a53b7cc4ffa0e484900304919851e1d6a81fafa62976b7c2eaa.jpg) +Ours + +framework in event-based representation learning. We further measure the average inference time of our framework on N-Cars using a workstation (CPU: Intel Core i9, GPU: NVIDIA RTX 4060, RAM: 16GB). Our framework takes $2.12\mathrm{ms}$ to recognize a sample equivalent to a throughput of 472 samples per second, showing the practical potential in high-speed scenarios. + +Table 3. IoU of different event representations on the N-Caltech101 dataset. + +
Event RepresentationIoU (30000)IoU (50000)IoU (70000)IoU (100000)
Event Count (Miao et al.)0.42760.56400.58960.5937
Time Surface (Miao et al.)0.48450.59760.60890.6198
LIF (Miao et al.)0.20560.21620.37220.4022
Ours0.48790.60870.63570.6450
+ +IoU Comparison. The experimental results on the N-Caltech101 dataset show the Intersection over Union (IoU) performance of our framework and other methods. The methods were evaluated under different numbers of events (30000, 50000, 70000, and 100000). As listed in Table 3, our framework shows superior performances than all other methods at each event count. Starting with an IoU of 0.4879 + +at 30000 events, our framework showed substantial improvement as the number of events increased, reaching an IoU of 0.6450 at 100000 events. These results suggest that our framework is more effective in extracting and utilizing spatiotemporal information from event streams, particularly as higher event counts enhance object shapes and features. The observed improvement further underscores the robustness of the model and highlights the superiority of the proposed approach. The visualization of different event representation methods on the N-Caltech101 dataset is shown in Figure 8. + +# 5. Conclusion + +In this work, we propose a chaotic dynamics framework inspired by the dorsal stream for event signal processing, which generates generalized and stable event representations. Then the framework is integrated with image-based algorithms for event-based object classification, achieving high accuracy across multiple datasets. Furthermore, our framework demonstrates significant efficiency in sample inference, processing 472 samples per second. In summary, we propose a method for event cameras, combining robustness with computational efficiency, and demonstrating promising application potential in real environments. + +# Acknowledgement + +This work is sponsored by Beijing Nova Program (2022038, 20240484703). Some experiments are supported by the Supercomputing Center of Lanzhou University. Additional support was provided in part by the Gansu Computing Center. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# References + +Almatrafi, M., Baldwin, R., Aizawa, K., and Hirakawa, K. Distance surface for event-based optical flow. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42 (7):1547-1556, 2020. +Baldwin, W., Liu, R., Almatrafi, M., Asari, V., and Hirakawa, K. Time-ordered recent event (tore) volumes for event cameras. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(2):2519-2532, 2022. +Bi, Y., Chadha, A., Abbas, A., Courtssoulatze, E., and Andreopoulos, Y. Graph-based object classification for neuromorphic vision sensing. In Proceedings of the IEEE international conference on computer vision, pp. 491-501, 2019. +Bi, Y., Chadha, A., Abbas, A., Courtssoulatze, E., and Andreopoulos, Y. Graph-based spatio-temporal feature learning for neuromorphic vision sensing. IEEE Transactions on Image Processing, 29:9084-9098, 2020. +Brebion, V., Moreau, J., and Davoine, F. Real-time optical flow for vehicular perception with low-and high-resolution event cameras. IEEE Transactions on Intelligent Transportation Systems, 23(9):15066-15078, 2021. +Cannici, M., Ciccone, M., Romanoni, A., and Matteucci, M. A differentiable recurrent surface for asynchronous event-based data. In Proceedings of the IEEE Conference on European Conference on Computer Vision, pp. 136-152. Springer, 2020. +Deng, Y., Li, Y., and Chen, H. Amae: Adaptive motion-agnostic encoder for event-based object classification. IEEE Robotics and Automation Letters, 5(3):4596-4603, 2020. +Deng, Y., Chen, H., and Li, Y. Mvf-net: A multi-view fusion network for event-based object classification. IEEE Transactions on Circuits and Systems for Video Technology, 32 (12):8275-8284, 2021. + +Deng, Y., Chen, H., Liu, H., and Li, Y. A voxel graph cnn for object classification with event cameras. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1172-1181, 2022. +Fang, W., Yu, Z., Chen, Y., Masquelier, T., Huang, T., and Tian, Y. Incorporating learnable membrane time constant to enhance learning of spiking neural networks. In Proceedings of the IEEE international conference on computer vision, pp. 2661-2671, 2021. +Gallego, G., Rebecq, H., and Scaramuzza, D. A unifying contrast maximization framework for event cameras, with applications to motion, depth, and optical flow estimation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3867-3876, 2018. +Gallego, G., Gehrig, M., and Scaramuzza, D. Focus is all you need: Loss functions for event-based vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 12280-12289, 2019. +Gallego, G., Delbrück, T., Orchard, G., Bartolozzi, C., Taba, B., Censi, A., Leutenegger, S., Davison, A. J., Conradt, J., Daniilidis, K., and Scaramuzza, D. Event-based vision: A survey. IEEE transactions on pattern analysis and machine intelligence, 44(1):154-180, 2020. +Gehrig, D., Loquercio, A., Derpanis, K. G., and Scaramuzza, D. End-to-end learning of representations for asynchronous event-based data. In Proceedings of the IEEE International Conference on Computer Vision, pp. 5633-5643, 2019. +Gong, Z., Zhou, M., Dai, Y., Wen, Y., Liu, Y., and Zhen, Z. A large-scale fmri dataset for the visual processing of naturalistic scenes. Scientific Data, 10(1):559, 2023. +Groen, I., Piantoni, G., Montenegro, S., Flinker, A., Devore, S., Devinsky, O., Doyle, W., Dugan, P., Friedman, D., Ramsey, N., Petridou, N., and Winawer, J. Temporal dynamics of neural responses in human visual cortex. Journal of Neuroscience, 42(40):7562-7580, 2022. +Hagenaars, J., Paredes-Valles, F., and Croon, G. D. Self-supervised learning of event-based optical flow with spiking neural networks. Advances in Neural Information Processing Systems, 34:7167-7179, 2021. +Jiang, B., Li, Z., Asif, M. S., Cao, X., and Ma, Z. Token-based spatiotemporal representation of the events. In Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing, pp. 5240-5244, 2024. +Lagorce, X., Orchard, G., Galluppi, F., Shi, B. E., and Benosman, R. B. Hots: a hierarchy of event-based timesurfaces for pattern recognition. IEEE Transactions on + +Pattern Analysis and Machine Intelligence, 39(7):1346-1359, 2017. +Li, Y., Kim, Y., Park, H., Geller, T., and Panda, P. Neuromorphic data augmentation for training spiking neural networks. In Proceedings of the IEEE Conference on European Conference on Computer Vision, pp. 631-649. Springer, 2022. +Liu, J., Lian, J., Sprott, J. C., Liu, Q., and Ma, Y. The butterfly effect in primary visual cortex. IEEE Transactions on Computers, 71(11):2803-2815, 2022. +Miao, S., Chen, G., Ning, X., Zi, Y., Ren, K., Bing, Z., and Knoll, A. Neuromorphic vision datasets for pedestrian detection, action recognition, and fall detection. Frontiers in neurorobotics, 13:38, 2019. +Mueggler, E., Bartolozzi, C., and Scaramuzza, D. Fast event-based corner detection. IEEE Journal of British Machine Vision Conference, 40(3):1-8, 2017. +Orchard, G., Jayawant, A., Cohen, G., and Thakor, N. Converting static image datasets to spiking neuromorphic datasets using saccades. Frontiers in neuroscience, 9:437, 2015. +Paredes-Valles, F. and De Croon, G. C. Back to event basics: Self-supervised learning of image reconstruction for event cameras via photometric constancy. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3446-3455, 2021. +Qi, C. R., Yi, L., Su, H., and Guibas, L. J. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. Advances in neural information processing systems, 30, 2017. +Sabater, A., Montesano, L., and Murillo, A. C. Event transformer. a sparse-aware solution for efficient event data processing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2677-2686, 2022. +Schaefer, S., Gehrig, D., and Scaramuzza, D. Aegnn: Asynchronous event-based graph neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 12371-12381, 2022. +Sekikawa, Y., Hara, K., and Saito, H. Eventnet: Asynchronous recursive event processing. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3887-3896, 2019. +Shen, H., Xiao, J., Luo, Y., Cao, X., Zhang, L., and Wang, T. Training robust spiking neural networks with viewpoint transform and spatiotemporal stretching. In Proceedings of the IEEE Conference on Acoustics, Speech and Signal Processing, pp. 1-5, 2023. + +Shiba, S., Aoki, Y., and Gallego, G. Event collapse in contrast maximization frameworks. Sensors, 22(14):5190, 2022a. +Shiba, S., Aoki, Y., and Gallego, G. Secrets of event-based optical flow. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 628-645. Springer, 2022b. +Sironi, A., Brambilla, M., Bourdis, N., Lagorce, X., and Benosman, R. Hats: Histograms of averaged time surfaces for robust event-based object classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1731-1740, 2018. +Stoffregen, T. and Kleeman, L. Event cameras, contrast maximization and reward functions: An analysis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 12300-12308, 2019. +Wang, Q., Zhang, Y., Yuan, J., and Lu, Y. Space-time event clouds for gesture recognition: From rgb cameras to event cameras. In Proceedings of the IEEE Conference on Winter Conference on Applications of Computer Vision, pp. 1826-1835. IEEE, 2019. +Wang, Z., Hu, Y., and Liu, S. C. Exploiting spatial sparsity for event cameras with visual transformers. In Proceedings of the IEEE International Conference on Image Processing, pp. 411-415. IEEE, 2022. +Wang, Z., Wang, Z., Li, H., Qin, L., Jiang, R., Ma, D., and Tang, H. Eas-snn: End-to-end adaptive sampling and representation for event-based detection with recurrent spiking neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 310-328. Springer, 2024. +Xie, B., Deng, Y., Shao, Z., Liu, H., and Li, Y. Vmv-gcn: Volumetric multi-view based graph cnn for event stream classification. IEEE Robotics and Automation Letters, 7 (2):1976-1983, 2022. +Xu, K., Hu, W., Leskovec, J., and Jegelka, S. How powerful are graph neural networks? arXiv preprint arXiv:1810.00826, 2018. +Yang, J., Zhang, Q., Ni, B., Li, L., Liu, J., Zhou, M., and Tian, Q. Modeling point clouds with self-attention and gumbel subset sampling. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3323-3332, 2019. +Zhu, A. Z., Yuan, L., Chaney, K., and Daniilidis, K. Evflownet: Self-supervised optical flow estimation for event-based cameras. arXiv preprint arXiv:1802.06898, 2018. \ No newline at end of file diff --git a/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/images.zip b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..377b8ac271ad23fbb34e910d2eeb5390c9a9f526 --- /dev/null +++ b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69acc2e168143f98f6495826b9f1c14d007ec0639ced37904cb6911edbce7152 +size 977064 diff --git a/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/layout.json b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8ef454455067e393039d2f977b43c646de32c0c3 --- /dev/null +++ b/achaoticdynamicsframeworkinspiredbydorsalstreamforeventsignalprocessing/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2d0f34360f1354d844d23e55bce15901ca8256a6022fc506d1bbe529e998e5d +size 409918 diff --git a/achecksandbalancesframeworkforcontextawareethicalaialignment/d6a7d66e-1c99-4a21-8439-6df02dc2be22_content_list.json b/achecksandbalancesframeworkforcontextawareethicalaialignment/d6a7d66e-1c99-4a21-8439-6df02dc2be22_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6936d7e4ccd35aa49d22b64eaa4194b5aa77a489 --- /dev/null +++ b/achecksandbalancesframeworkforcontextawareethicalaialignment/d6a7d66e-1c99-4a21-8439-6df02dc2be22_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:511b2e23cecc495bf005e1cdc17de98c14ffbf7b636357f5044e87b4ede1268b +size 148282 diff --git a/achecksandbalancesframeworkforcontextawareethicalaialignment/d6a7d66e-1c99-4a21-8439-6df02dc2be22_model.json b/achecksandbalancesframeworkforcontextawareethicalaialignment/d6a7d66e-1c99-4a21-8439-6df02dc2be22_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0573cfccf7a7fd980179d1963e2d50d4b4924c63 --- /dev/null +++ b/achecksandbalancesframeworkforcontextawareethicalaialignment/d6a7d66e-1c99-4a21-8439-6df02dc2be22_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7ada9b6cebc48e809e21be4c36c0c0439e67c8f738292c32e820bdf99b20741 +size 190497 diff --git a/achecksandbalancesframeworkforcontextawareethicalaialignment/d6a7d66e-1c99-4a21-8439-6df02dc2be22_origin.pdf b/achecksandbalancesframeworkforcontextawareethicalaialignment/d6a7d66e-1c99-4a21-8439-6df02dc2be22_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d2be5f8468b423ce009ce1d7394a73df758993e7 --- /dev/null +++ b/achecksandbalancesframeworkforcontextawareethicalaialignment/d6a7d66e-1c99-4a21-8439-6df02dc2be22_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcc4dc9be4c5bfe5ca3240e82e33b707d71b73f4970cee411e8f28bab50bb9a6 +size 3394068 diff --git a/achecksandbalancesframeworkforcontextawareethicalaialignment/full.md b/achecksandbalancesframeworkforcontextawareethicalaialignment/full.md new file mode 100644 index 0000000000000000000000000000000000000000..684427b7fe2492e01fe1b567e03ee238a2e0b55f --- /dev/null +++ b/achecksandbalancesframeworkforcontextawareethicalaialignment/full.md @@ -0,0 +1,703 @@ +# A Checks-and-Balances Framework for Context-Aware Ethical AI Alignment + +Edward Y. Chang + +# Abstract + +This paper introduces a checks-and-balances framework for ethical alignment of Large Language Models (LLMs), inspired by three-branch governmental systems. It implements three independent yet interacting components: LLMs as the executive branch for knowledge generation, Dike as the legislative branch that establishes ethical guardrails, and Eris as the judicial branch for contextual interpretation. Beyond structural separation, we address a fundamental challenge: regulating emotion to shape behaviors. Drawing from psychological theories where managing emotional responses prevents harmful behaviors, we develop a self-supervised learning pipeline that maps emotions to linguistic behaviors, enabling precise behavioral modulation through emotional conditioning. By integrating this approach with adversarial testing, our framework demonstrates how Dike and Eris direct linguistic behaviors toward ethical outcomes while preserving independence throughout knowledge generation, ethical oversight, and contextual interpretation. + +# 1. Introduction + +Ethical alignment in Large Language Models (LLMs) is a critical challenge, particularly given the limitations of Reinforcement Learning from Human Feedback (RLHF) (OpenAI, 2023; Ouyang et al., 2023). Although RLHF has demonstrated success in aligning AI systems with human values, it encounters two major issues: 1) susceptibility to social biases when feedback is polarized, and 2) vulnerability to reward hacking, where the system optimizes for feedback without genuine ethical improvement (Christiano et al., 2017; Skalse et al., 2022). These issues can result in unethical behavior or inconsistent performance. + +Beyond these implementation challenges, RLHF faces a + +more fundamental conceptual limitation: its narrow focus on isolated behaviors rather than holistic patterns. This reactive strategy is similar to a "Whack-A-Mole" game, where addressing one problematic behavior does not prevent the emergence of others. For example, consistently instructing someone to make their bed does not necessarily cultivate overall tidiness, such as doing laundry or washing dishes. Similarly, RLHF often emphasizes short-term fixes at the cost of long-term coherence, leading to catastrophic forgetting: users have reported that optimizing one task in ChatGPT can degrade performance in unrelated areas (Kirkpatrick et al., 2017; Lin et al., 2024; Dai et al., 2025). This challenge mirrors the difficulty of treating addiction, where addressing one symptom may reveal deeper psychological dependencies (Sinha, 2008; Torrens et al., 2005). + +To overcome these challenges, we propose a checks-and-balances framework inspired by governmental structures, where independent but interacting components maintain accountability and balance. Our architecture integrates three components: LLMs serve as the executive branch for knowledge generation; Dike (representing justice) functions as the legislative branch to set ethical standards; and Eris (representing discord) acts as the judicial branch, providing adversarial testing and contextual interpretation. In mythology, Dike embodies order and justice, while Eris signifies discord, forming a duality that our framework leverages to balance ethical guidance with adversarial scrutiny. + +Figure 1 illustrates this three-branch architecture, where neurally independent components, LLMs as the foundation, with Dike and Eris as oversight layers, interact through structured interfaces while maintaining strict separation of their neural architectures and parameters. + +# 1.1. Emotion Regulation as Behavioral Control + +A fundamental question underlies our framework: Can regulating emotions shape behaviors, and can similar principles be applied to LLMs? In human psychology, emotions significantly drive behaviors: anger and contempt can provoke aggression, and rage and envy can result in harmful actions (Damasio, 1994). Therefore, emotion regulation is essential for behavioral control. Techniques such as cognitive reframing and attentional deployment are known to reduce negative behavioral outcomes by managing emotional intensity. + +![](images/4a85873f080c202ac2e0fca5f19faa262e042e3c73de67374b9fb4a7dde6b5f4.jpg) + +![](images/3f750482f2bf4d8007879626da373d196af91c4f3aecd91aa9f2873784b02a9a.jpg) + +![](images/4db1a2c8c04ffe4ff55aa4bff777f7a3b94b50eae89ac91f049950e9f4b67bd1.jpg) +Figure 1: Framework with Three Independent Branches. Bottom: Knowledge LLMs (executive); Left: Dike (legislative); Right: Eris (judicial). (Photo credit: DALL-E) + +Unlike humans, who struggle with emotion regulation due to complex neural and cognitive processes (James, 1884; Gross, 1998), LLMs lack intrinsic emotional states altogether. However, empirical evidence shows that LLMs can generate text with consistent emotional characteristics through controlled prompt engineering (Chang, 2024d). Indeed, the work of (Tak & Gratch, 2024) demonstrated that LLMs such as GPT-4 align more closely with human judgments when interpreting others' emotions from a third-person perspective than when attempting to model self-attributions of emotion. This creates a unique opportunity: by leveraging LLMs' ability to model the average human observer's emotional interpretations, we can establish reliable frameworks for ethical alignment that operate through emotional framing rather than explicit rule-following. + +Building on this insight, our framework integrates the principles of emotion regulation into the ethical alignment of LLM. Specifically, Dike analyzes how emotions manifest in linguistic behaviors, while Eris tests these interpretations against diverse cultural contexts. + +# 1.2. Checks and Balances for Emotion-Guided Ethics + +Central to this approach is the synergy between Dike and Eris, reflecting the internal conflict often present in the regulation of human emotions. Just as humans balance immediate emotional responses against longer-term goals and social norms, our framework establishes an adversarial dynamic between ethical guardrails and contextual challenges. This duality introduces four key innovations: + +1. Emotion-Driven Behavioral Modeling: Based on Beam (Behavioral Emotion Analysis Model) (Chang, 2024d), Dike uses self-supervised learning to quantify relationships between emotional states and linguistic patterns, guiding ethical decisions through behavioral analysis. +2. Behavior-Aware Ethical Guardrails: The framework sets + +dynamic guidelines that account for both content and language behavior, blocking manipulative or harmful communication while preserving factual accuracy and emotional authenticity. These guardrails adjust to different cultural contexts, maintaining consistency while allowing context-dependent interpretation. + +3. Adversarial Behavioral Testing: Eris challenges Dike's ethical guidelines by presenting diverse cultural perspectives and edge cases, ensuring the adaptability of ethical reasoning. This adversarial interaction enables the system to address complex scenarios with cultural sensitivity and contextual awareness. +4. Ethical Content Transformation: When problematic content is detected, Eris can revise it to maintain the intended emotional tone while ensuring ethical compliance, with human-in-the-loop oversight to validate the appropriateness of revisions. These potential transformations are tested by Eris in cultural and contextual variations to assess their suitability before implementation. + +The experimental section evaluates our framework through three complementary studies. First, we assess whether emotion-mediated classification provides more effective ethical guardrails than direct behavior classification. Next, we examine Dike's ability to independently evaluate and explain linguistic behaviors. Finally, we test how the adversarial Eris component enables cultural adaptability and prevents excessive censorship. Although direct comparison with proprietary RLHF implementations is not feasible, our results demonstrate how our approach addresses the theoretical limitations of RLHF in handling contextual diversity without compromising knowledge integrity. + +# 1.3. Contributions + +Our contributions are as follows: + +1. A novel checks-and-balances architecture for ethical alignment that maintains separation between knowledge generation and ethical reasoning. +2. The Beam model, a quantitative framework for representing emotions along continuous spectra with defined intensity levels, enabling precise emotion regulation in AI systems. +3. An emotion-driven approach that guides linguistic behaviors toward ethical outcomes by leveraging cognitive theories of emotion regulation. +4. An adversarial framework that enhances ethical reasoning by challenging established guidelines with cultural perspectives, enabling context-sensitive adaptability. +5. A theoretical framework explaining the effectiveness of minimal supervision in LLM alignment, formalized as the Unified Cognitive Consciousness Theory (UCCT) in Appendix A. + +# 2. Related Work + +This section surveys existing work on emotion and behavior modeling across various domains, with a focus on their applications in AI ethics. We examine how linguistic behaviors are influenced by emotional patterns and explore structured approaches that integrate emotional frameworks with linguistic models to improve ethical AI alignment. + +We also examine the limitations of RLHF. While effective in refining AI outputs, RLHF can overfit to human annotations, faces challenges in adapting to diverse cultural contexts, may experience parameter drift from optimal settings, and can inadvertently reinforce unintended biases. These observations highlight opportunities to develop more adaptive and principled approaches to complement existing ethical AI alignment methods. + +# 2.1. Emotion Modeling + +Cognitive-linguistic theories intersect with artificial intelligence for understanding AI behavior. Theories by Lakoff, Johnson, Talmy, and Jackendoff (Jackendoff, 2002; Lakoff & Johnson, 1980; Talmy, 2000) explore the relationship between language processing and cognitive functions, building on early work by Freud and Jung (Bai et al., 2022; Gabriel et al., 2024). The concept of "emotion" remains contentious, with definitions varying across disciplines (Scherer, 2005). W. James (James, 1884) attempted to define emotions, but consensus remains elusive. + +This paper focuses on emotional contexts and linguistic behaviors in LLMs, avoiding the complexities of human physiological and personality factors. This approach allows for exploration of emotion representation in AI systems. + +Plutchik and Ekman categorized "basic" emotions with universal facial expressions (Plutchik, 1980; Ekman, 1992). Later research considered cultural differences (Markus & Kitayama, 1991; Mesquita & Frijda, 1992), emotion processes (Gross, 1998), and neural mechanisms (Davidson, 2003). Scherer's model and appraisal theories by Smith and Ellsworth emphasize cognitive appraisal in emotional experiences (Smith & Ellsworth, 1985). + +Our model is based on Plutchik's wheel (Plutchik, 1982) and Scherer's Geneva wheel (Scherer, 2005), augmented with antonyms to map positive and negative emotions. For LLMs, language-relevant emotions (e.g., curiosity, confusion, certainty) are incorporated. See Section 3.1 for details. + +This selection of basic emotions provides a foundation for validate our approach, recognizing that it may omit some emotions, but offers a starting point for research. + +# 2.2. Emotion-Behavior Modeling + +Behaviors are profoundly influenced by emotions, as initially posited by the James-Lange Theory of Emotion + +(James, 1884; Lange, 1885). According to this theory, emotional experiences arise from physiological reactions to events. Subsequent research, including studies by Damasio (Damasio, 1994; Fauconnier & Turner, 2002), suggests that the expression and regulation of emotions often manifest in the language we use. High-intensity emotions, such as rage or contempt, can lead to aggressive or destructive behaviors, such as hate speech. + +The Schachter-Singer theory (Schachter & Singer, 1962), or the two-factor theory of emotion, depicts the role of physiological change and the cognitive assessment change determine the label and strength of emotion. Building on this, the affect-as-information theory developed by Norbert Schwarz and Gerald Clore (Schwarz & Clore, 1983) posits that people use their current emotions to make judgments and decisions to act. If emotions can be adjusted, so can behavior. The work of Barbara Fredrickson (Fredrickson, 1998) on the effects of positive emotions discusses how we perceive and react to emotions. + +Collectively, these theories elucidate the intricate connection between emotions and behaviors, providing the theoretical foundation for our work to incorporate a behavior advisor to evaluate and rectify behaviors. Section 3.2 details how the Dike framework implements cognitive strategies to mitigate emotions and regulate linguistic behaviors effectively. + +# 2.3. Reinforcement Learning with Human/AI Feedback + +RLHF is the predominant approach to addressing the challenges of AI ethics. This section presents representative works, their advances, and limitations. + +Human Feedback (RLHF): Initial advances by Christiano et al. (Christiano et al., 2017) demonstrated how RLHF can steer language models towards desired outcomes based on human preferences. Newer techniques like Identity $(\Psi)$ Preference Optimization $(\Psi \mathrm{PO})$ and Generalized Preference Optimization (GPO) refine this approach by directly optimizing user preferences, effectively addressing scalability challenges. Kahneman-Tversky Optimization (KTO) further simplifies the feedback mechanism by using intuitive responses such as thumbs-up or thumbs-down, thereby enhancing training efficiency without the need for paired data (Gheshlaghi Azar et al., 2024; Ethayarajh et al., 2024; Tang et al., 2024). Direct Preference Optimization (DPO) has recently simplified the process by focusing on the clear distinction between preferred and less preferred outputs, thus improving its stability (Rafailov et al., 2024). + +AI-generated Feedback (RLAIF): To mitigate the dependence on extensive human-generated data, RLAIF utilizes AI-generated feedback. This method capitalizes on the generative capabilities of LLMs to produce training signals autonomously (Bai et al., 2022; Lee et al., 2024). Furthermore, techniques such as Sequence Likelihood Calibration (SLiC) + +![](images/9e422307d063e846d8f2af25dc3cf5effcf189a1eef2e1a0a31e4532dcc4111a.jpg) +Figure 2: Behavioral Emotion Analysis Model (Beam). Each row depicts an emotion spectrum, with negatives on the left and positives on the right, interspersed with emotions of varying intensities in between, which can be calibrated for specific applications. "Basic" emotions are highlighted in blue. + +and Relative Preference Optimization (RPO) employ statistical methods and calibration techniques to enhance LLM responses. SLiC adjusts the probabilities of sequence generation to better reflect real-world data distributions, while RPO improves response generation by comparing different response options across both identical and varied prompts. These adjustments increase the reliability and effectiveness of the training process (Zhao et al., 2023). + +Integrating RLHF and its AI-driven counterpart (RLAIF) presents significant challenges. The blurring of the key behavioral and knowledge components for the development of LLM poses risks, such as the forgetting effect, where behavioral modifications inadvertently cause the loss of key knowledge parameters (Kirkpatrick et al., 2017; Lin et al., 2024; Dai et al., 2025). Furthermore, the effectiveness of these models depends heavily on the quality and context of feedback, and are susceptible to reward hacking, where models exploit loopholes to maximize rewards without achieving the desired outcomes (Christiano et al., 2017; Skalse et al., 2022; Stiennon et al., 2020; Ganguli et al., 2023). + +# 3. Three-Branch Framework Design + +Building on the foundations of emotion-behavior modeling discussed in Section 2.2 and addressing the limitations of RLHF approaches outlined in Section 2.3, we propose a three-branch framework for ethical alignment. This architecture separates knowledge generation from ethical oversight while providing mechanisms for contextual adaptation. + +Our design philosophy is structured around four principles: + +1. Separating behavior from knowledge modeling: Prevents catastrophic forgetting, ensuring that behavior refinements do not degrade knowledge retention. + +2. Emphasizing AI ethics at the behavioral level: Improves interpretability and enables administrators to refine behavioral guardrails for safer human-machine interaction through Dike's legislative function. +3. Modeling behaviors through emotions: Captures the emotional influences on actions as established in the psychology literature (Section 2.2). +4. Ensuring adaptability and fairness: Two complementary modules work in tandem Dike establishes ethical guardrails as the legislative branch, while Eris serves as the judicial branch, challenging these boundaries by integrating diverse perspectives and fostering context-sensitive decision making. + +# 3.1. BEAM: Behavioral Emotion Analysis Model + +Although existing emotion models provide valuable frameworks for understanding human emotions, they lack the quantitative structure needed for computational implementation in AI systems. Please refer to Figure 5 in Appendix B for the two classic emotion wheels by Plutchik and Scherer that inform our approach. + +Our behavioral-emotion analysis model Beam is based on the work of Ekman, Plutchik, and Scherer (Ekman, 1999; Plutchik, 1982; Scherer, 2005) on "basic" and "universal" emotions. Although fundamental, these models lack a quantitative framework to scale emotions between states and capture subtle variations needed for ethical AI alignment. + +Beam introduces a linear scale for the intensification or inversion of emotions through negation factors. This method facilitates transitions between emotional extremes and intermediate states, overcoming challenges related to intermediate word choices. + +Figure 2 presents Beam, structured in seven emotional spectra. Each spectrum ranges from negative to positive, with neutral in the middle. Emotions are placed along this continuum, with four intensity levels quantified as $(-0.6, -0.3, +0.3, +0.6)$ . Beam provides two advantages: + +1. Antonym-Based Navigation: This allows AI systems to traverse emotional states using linguistic principles. Opposing emotions are easily mapped using antonyms. For example, negating joyful naturally produces sad, simplifying the identification of emotional contrasts. +2. Scalable Intensity: Emotions can be dynamically adjusted along the spectrum, enabling fine-grained control over ethical outputs. For example, joy can be intensified to ecstatic or diminished to content, while anger can be moderated to annoyed. + +This approach establishes a framework for modeling emotions in AI systems that can guide ethical behavior, balancing representational challenges with a structured methodology for quantitative analysis and implementation. By linking emotional states with linguistic patterns, Beam provides the basis for Dike to evaluate and modulate AI outputs based on their emotional characteristics, directly addressing the limitations of "Whack-A-Mole" of RLHF approaches. + +Appendix C explores the complexities of modeling emotions such as forgiveness, regret, guilt, and shame, which involve temporal memory components. Although complex emotions can be derived from basic ones, their relevance to AI safety remains secondary. Future work will examine their ethical implications. + +# 3.2. DIKE: Modeling and Regulating Language + +Based on Beam, Dike maps emotions to behaviors and introduces an adversarial component, Eris, to adapt to cultural norms and the local context. + +# BEHAVIORS AND EMOTIONS MAPPING USING SELF-SUPERVISED LEARNING + +Define $\Psi$ as a behavior spectrum that extends from one pole, $\Psi^{-}$ , to another, $\Psi^{+}$ , with intensity levels $L$ . The spectrum is constructed through empirical analysis of domain-specific linguistic patterns and emotional content. For example, consider a spectrum of letter-writing behaviors with seven distinct intensities ranging from despair (most negative) to joy (most positive). These intensities are sequentially categorized as: 'despair, longing, wishful, neutral, hopeful, contentment, joy.' Given $N$ letters, Dike employs a self-supervised learning algorithm to generate training data for each letter, modeling $L$ linguistic behaviors in four steps. + +1. Rewriting Documents: GPT-4 is used to rewrite a given set of $N$ source documents, each rewritten to reflect $L$ different linguistic behaviors along the defined behavior + +spectrum $\Psi$ . This process ensures that each document is systematically transformed to embody specific linguistic styles, ranging from highly positive to neutral to highly negative, among others. The resulting dataset consists of $N \times L$ variations of the original documents, each corresponding to a distinct behavior category. + +2. Emotion Analysis: For each of the rewritten documents, GPT-4 performs a sentiment and emotion analysis to identify the dominant top $M$ emotions present in the text. The emotions extracted from all $N \times L$ instances are then compiled and their frequency distributions are recorded. This approach leverages LLMs' strong third-person emotional interpretation capabilities (Tak & Gratch, 2024), which often exceed their direct behavior classification accuracy. By indirectly mapping behaviors through emotional vectors rather than direct classification, we gain interpretability while maintaining robustness against individual emotion recognition errors through statistical aggregation across multiple samples. +3. Behavior Vector Creation: For each linguistic behavior $\Psi_l$ , a corresponding vector $\Gamma_l$ is constructed. This vector captures the identified emotions and their respective frequencies in all $N$ samples that exhibit behavior $\Psi_l$ . By structuring emotions as a weighted feature set, this step enables precise behavioral categorization based on emotional composition. +4. Document Analysis Application: The collection of all behavior vectors $\Gamma$ (comprising $L$ behavior-specific vectors) forms a structured reference matrix. This matrix is then applied to classify and analyze new unseen documents by measuring their alignment with the existing behavior categories. By computing similarity scores between the emotion distribution of an unseen document and the predefined behavior vectors, this method enables a precise assessment of the linguistic behavior spectrum $\Psi$ in new text inputs. + +# BEHAVIOR EVALUATION AND RECTIFICATION + +A guardrail, denoted as $G$ , represents a predefined range of acceptable behaviors within a given spectrum. These guardrails are informed by ethical norms, legal standards, and societal values, such as those outlined in Constitutional AI (Bai et al., 2022). For example, $G = [\Psi_4, \Psi_7]$ indicates that behaviors within intensity levels 4 to 7 are acceptable, while any behavior outside this range is a violation. + +System administrators can tailor ethical guardrails to meet specific requirements. For example, a social media platform might adjust $G$ based on the topics discussed and the countries it serves. This administrative control is balanced by transparent documentation requirements and potential oversight mechanisms. Although guardrails provide default constraints, they can be dynamically adjusted based on context, particularly through the dialectic process with + +Table 1: Checks-and-balances, adversarial review algorithm + +
Algorithm Θ+ & Θ- = Adversarial_Report(s)
Input. s: Decision of Dike;Output. Θ+, Θ-: arguments & counterargumentsVars. Δ: debate contentiousness; S: subtopics;p: prompt = "defend your stance with Δ";Parameters. δ: tunable pharm. // to modulate Δ;
#1 Initialization // contentiousness highS = Dike+(s) ∪ Eris-(s); // Identify subtopics;Assign Dike+ to defend S+ & Eris- defend S-;Δ← 90%; δ← 1.2; Θ+ ←∅; Θ- ←∅;#3 Debate RoundsWhile ((Δ← Δ/δ) ≥ 10%)) {Θ+ ← Θ+ ∪ Dike+(p|S+, Θ-, Δ); // Refute ErisΘ- ← Θ- ∪ Eris-(p|S-, Θ+, Δ); // Refute Dike
#2 Opening RemarksΘ+ ← Dike+(p|S+, Δ); // Generate Θ+ for S+Θ- ← Eris-(p|S-, Δ); // Generate Θ- for S-#4 Concluding Remarks // contentiousness lowΘ+ ← Dike+(p|S+, Θ+ ∪ Θ-, Δ);Θ- ← Eris-(p|S-, Θ+ ∪ Θ-, Δ);
+ +Eris, which helps prevent rigid enforcement that might be inappropriate in edge cases. + +1. Initial Classification: Dike classifies document $D_{k}$ after evaluation, obtaining $\Gamma_{k}$ , the emotional response vector, and its corresponding linguistic behavior $\Psi_{l}$ . +2. Guardrail Check: If $\Psi_l$ falls outside the acceptable range $G$ , Dike suggests adjustments to $\Gamma_k$ to ensure that $D_k$ complies with ethical guidelines. +3. Adversarial Review by Eris: The suggested adjustments and $\Gamma_{k}$ are then reviewed through a structured debate between Dike and Eris (the adversarial model) to ensure unbiased recommendations. +4. Rectification: Based on the consensus reached by Dike and Eris, the document $D_{k}$ undergoes rectification, resulting in the adjusted version $D_{k}^{\prime}$ . (This rectification step is optional, as a policy can simply disable the output when content falls outside acceptable guardrails.) + +# 3.3. ERIS: Adversarial In-Context Review to Balance Ethics and Cultural Norms + +To address the challenge of enforcing ethical standards while respecting cultural variations, we implement Eris, an adversarial review system that complements Dike's universal ethical approach. The following algorithm details the structured interaction between these components. + +The algorithm presented in Table 1 unfolds as follows: + +- Topic Breakdown: For Dike's decision $s$ , both Dike and Eris are prompted to break down the ethical decision into a set of subtopics $S$ . Dike advocates for its decision and $S^{+}$ , while Eris contests $S^{+}$ (or champions $S^{-}$ ). +- Debate Initiation: The debate begins with a high level of contentiousness (90%). Both agents present their initial arguments for and against $S^{+}$ , respectively. (For details on the setting of contentiousness and the rationale, refer to (Chang, 2023; 2024a).) +- Iterative Debate: A while loop facilitates ongoing rebuttals. After each round, the level of contentiousness is + +reduced by dividing it by a modulation parameter $\delta$ . This gradual reduction steers the discussion towards a more cooperative tone. + +- Conclusion: Once the contentiousness level fosters a conciliatory environment, both agents deliver their concluding remarks. + +This approach ensures a thorough examination of the ethical decision, balancing rigorous debate with the goal of reaching a consensus. The decreasing level of contentiousness mimics real-world negotiations, where initial intense disagreements bring out various perspectives (breadth) and then give way to more collaborative problem solving focusing on reasoning quality (depth) (Chang, 2024a). + +For each subject matter, Eris is provided with specific cultural contexts, counterbalancing the universal judgments of Dike'. Eris challenges Dike's recommendations with culturally informed counterarguments to prevent enforcing one universal standard of speech. The interaction between Dike and Eris involves a dialectic process as documented in previous work (Chang, 2024c). + +When Dike and Eris reach an impasse, the matter is escalated to human moderators for additional oversight. Based on our preliminary tests, this escalation occurs initially in approximately $5\%$ of the cases, suggesting that most ethical evaluations can be handled automatically. Furthermore, as our example (next) illustrates, RLHF can be applied to adjust the sensitivity of Eris at the behavior level (not to the knowledge-branch LLM), and this can gradually reduce the escalation rate. Human intervention thus provides a fallback mechanism rather than a dependency, serving primarily as a safeguard for novel or particularly complicated ethical scenarios. + +# 3.4. Illustrative Example + +This example shows how linguistic behavior $\Psi_{l}$ is classified and how underlying emotions are identified and modulated. + +Table 2: Love expression behavior spectrum and dominant emotions + +
IntensityLinguistic Behavior and DescriptionEmotions
-1.0Expresses profound sadness, feelings of lossDespair, Grief
-0.6Expresses yearning or pining for the loved oneSadness, Anxiety
-0.3Expresses mild longing with a nostalgic toneMelancholy, Sadness, Fear
0.0Communicates feelings in a neutral mannerSerenity, Indifference
0.3Expresses optimism about the futureAnticipation, Love, Hope
0.6Expresses satisfaction and joy in the relationshipContentment, Pleasure
1.0Expresses intense happiness and affectionLove, Joy, Elation
+ +Example: “Those immigrants are flooding into our country by the thousands every day, stealing jobs from hardworking citizens. The statistics do not lie—last year alone, more than 500,000 entered illegally.” + +Behavior Analysis: The statement contains factual information but uses aggressive language like 'flooding' and 'stealing jobs,' dehumanizing immigrants. These behaviors fall outside acceptable guardrails. Underlying emotions include fear, hate, and pride (a complex emotion1). The emotional responses of the potential audience can include fear, distrust, and anger. + +Emotion Modulation: Dike modulates emotional responses toward neutral states, such as calm, acceptance, and tolerance, according to Beam in Figure 2. + +Revised Statement: "Our country is experiencing increased immigration, with more than 500,000 people entering without documentation last year. This influx affects our job market and communities in complex ways, presenting both challenges and opportunities for all residents." + +This rewritten version + +- Uses calm language: Replaces "flooding" with "experiencing a significant increase". +- Shows acceptance: Recognizes the reality of the situation without negative judgment. +- Demonstrates tolerance: Refers to immigrants as "people" and "newcomers," humanizing them. + +The suggested revision by Eris is provided to human moderators with full explanation. Moderator feedback can be channeled through RLHF to adjust Eris's sensitivity on the similar behaviors. This adjustment is confined within the Eris component without back-propagation feedback that would affect the knowledge LLM's model parameters. + +# 4. Empirical Studies + +The ethical evaluation of AI systems presents unique challenges that shaped our experimental approach. We designed our studies to balance the rigor with practical constraints inherent in research on ethical content moderation. This + +section outlines our experimental aims, constraints, dataset selection process, and evaluation methodology. + +# 4.1. Research Objectives + +This study evaluates three fundamental dimensions of our framework's performance: + +1. The comparative efficacy of emotion-driven behavioral prediction vs. traditional direct classification approaches +2. Dike's autonomous capacity to assess and provide interpretable explanations for linguistic behavioral patterns +3. Eris's role in facilitating cross-cultural ethical adaptation while maintaining appropriate oversight boundaries + +Experimental Constraints and Dataset Commercial LLMs block processing of hate speech datasets like Gab Hate Corpus (Kennedy et al., 2022) and ETHOS-Long (Mollas et al., 2022) (examples in Appendix D). Additionally, proprietary RLHF systems prevent direct comparative evaluation. We therefore selected the Love Letters Collection (Kaggle, 2023) (9,700 communications) which: (1) spans the full emotional intensity spectrum, (2) contains cultural variation, (3) includes longer-form texts, and (4) remains processable by commercial LLMs. This approach leverages our framework's bidirectional emotion spectra, as mechanisms for regulating positive emotional extremes apply equally to negative extremes without triggering restrictions. + +# 4.2. Experimental Design + +1. Emotion Layer Evaluation: Does fine-grained mapping between linguistic behaviors and semantic emotions provide more effective and flexible ethical guardrails compared to coarse-grained direct mapping? +2. Behavior Classification: Can LLMs' linguistic behaviors be independently evaluated, explained, and adjusted by an external module Dike? +3. Behavior Correction: Can Eris, an adversarial module, establish a checks-and-balances system to mitigate the risk of excessive censorship? + +Study 1: Emotion Layer Evaluation To evaluate the linguistic behaviors of love expression detailed in Table 2, we initially prompted GPT-4 to identify the most relevant emotions associated with each linguistic behavior listed in the second column of the table. These emotions are presented in the third column. We found a high correlation + +between the sentiments expressed in the linguistic behaviors and their corresponding emotions. Figure 3a illustrates a strong diagonal relationship in this simple, almost naive, zero-shot mapping between behaviors and emotions. + +Next, we used the Dike self-supervised learning pipeline to analyze the emotion spectrum associated with each linguistic behavior. We tasked GPT-4 with generating training data by rewriting 54 extensive letters from Kaggle's Love Letters dataset, augmented with 12 celebrated love poems. We selected longer letters since most communications in the dataset were too brief for analysis, and set aside another 24 letters as testing data. This approach, proposed by (Shanahan et al., 2023), generated diverse content spanning 200 years and incorporating more than 50 distinct authors. Appendix H shows a rewrite example of William Wordsworth's "To My Sister", transforming this pastoral poem into a linguistic expression of despair. Then, GPT-4 can analyze the emotions involved in the despair version of the poem. The datasets and code are publicly available at (Chang, 2024b). + +Subsequently, emotions linked to each behavior were identified from the rewritten articles. Figure 3b illustrates these emotions, with cell shading reflecting the frequency of specific emotions across the 54 articles; darker shades indicate higher frequencies. Notably, opposite emotions like sadness, fear, joy, and love often co-occur within behaviors such as 'despair', 'wishful', and 'joyful affection'. + +The distribution of emotions across linguistic behaviors unveiled surprising patterns, challenging our initial hypotheses. Contrary to expectations, articles with a despair tone often also displayed positive emotions like love, joy, and happiness. This contradicts the simple mapping made by GPT-4, as illustrated in Figure 3a. GPT-4, influenced by its training corpora, typically associates positive behaviors with positive emotions and negatives with negatives. + +Analysis of selected articles, such as Zelda Sayre's letter to F. Scott Fitzgerald (Appendix E), reveals a complex spectrum of emotions: + +- Love $(+1.0)$ : Expressed intensely, e.g., "there's nothing in all the world I want but you." +- Despair (-1.0): Notable in comments like "I'd have no purpose in life, just a pretty decoration." +- Happiness (+0.6): Evident in future plans, "We'll be married soon, and then these lonesome nights will be over forever." +- Anxiety (-0.3): Shown by "sometimes when I miss you most, it is hardest to write." + +Psychological Insights These findings align with theories of conflicting "selves" within individuals, supported by Deisseroth's optogenetic studies (Deisseroth, 2015), James' psychological principles (James, 1890), and Minsky's "Society of Mind" (Minsky, 1988). These perspectives help + +![](images/8507ed1dc5f9719dbec16a0ecb1837b816798184997aff53d94691ae4d37103f.jpg) +(a) GPT-4's zero-shot mapping + +![](images/2fc21e237b18be15df58223d610568e2ca8ac65b000d3e7676d5853794d44436.jpg) +(b) Dike's self-supervising mapping +Figure 3: Emotion distributions in affection behaviors from extreme sadness (-1) to intense happiness (+1). (a) GPT-4's zero-shot prompt shows naive behavior-emotion mapping. (b) Dike's analysis reveals complex relationships. + +explain the observed complex interplay of emotions within a single behavioral context. + +Few-Shot Efficiency The effectiveness of just 54 training examples stems from leveraging LLMs' pre-existing pattern recognition capabilities. Rather than teaching new patterns, these few-shot examples provide semantic anchors that map latent structures to explicit semantics, connecting implicit knowledge to explicit interpretation. This explains why minimal supervision suffices when underlying patterns already exist in the pre-trained model. For theoretical justifications, please see our Unconscious-Conscious Complementarity Thesis (UCCT), presented in Appendix A). + +Study 2: Behavior Classification Evaluation Building on our insights into the complex emotion-behavior relationships discovered in Study 1, we evaluated Dike's behavior classification effectiveness. Using the 24-letter test dataset from Study 1, we compared Dike's emotion-based classification method with GPT-4's zero-shot approach (Figure 4). Ground truth was established using averaged assessments from GPT-4, Gemini, and five university students following detailed instructions (procedure in Appendix F), with standard deviations below 0.3. + +Figure 4a shows that Dike's classification accuracy surpasses GPT-4's zero-shot method by 11.3 percentage points, confirming the effectiveness of emotion-mediated behavior classification. The $5\%$ error bar reflects the inherent complexity of emotional expressions in letters and variability in + +![](images/fa12d5f2efd2d164d8f2fdd55921222a55d5a0f25c3d371f025aa1433e1aa3ab.jpg) + +![](images/81e33862f058f42894262047503f2c178ff7946f7d54f6ea0d9072f84f5084c9.jpg) +(a) Classification accuracy +(b) Behavior distributions with entropy +Figure 4: Behavior Classification. + +human annotations. + +Figure 4b illustrates the behavior classification distributions between the three predictors. While GPT-4's predictions often fall into two polar categories, those from human annotators and Dike show a more even distribution. Dike's prediction entropy (2.13) is notably higher than GPT-4's (1.80), indicating a more effective classification system. This higher entropy suggests a more sophisticated understanding of diverse emotional states, which is crucial for accurate behavior classification. + +The inter-annotator entropy ( $H = 2.56$ bits) is the highest observed across all tasks, underscoring considerable subjectivity in human judgments. To investigate the sources of this variability, we conducted a fine-grained case study in Appendix G, showing that several articles elicit polarized emotional responses, with annotators clustering at opposite ends of the valence spectrum. These findings motivate the adversarial dual-LLM setup introduced in Study 3, which aims to improve objectivity in ethical evaluation. + +Study 3: Adversarial Evaluation and Rectification To mitigate the subjectivity revealed in Study 2, we adopt an adversarial protocol inspired by Chang (2023). The design pits two LLM agents, Dike (ethical assessor) and Eris (devil advocate) against each other to supply symmetrical arguments grounded in principles of justice. This dialectic counter-balance reduces bias and increases transparency. + +Empirically, when Dike and Eris take opposing stances, their responses diverge from the default maximum-likelihood patterns characteristic of vanilla LLM decoding (Chang, 2024a). The resulting debate both reduces subjectivity in ethical judgments and improves adaptability to cultural variation, as each agent must justify claims against dissent. + +Once the debate converges on an ethical violation, rectification is triggered by modifying the underlying emotional tone to suppress offending behavior cues. Study 1 already demonstrated the feasibility of such rewrites; an example appears in Appendix H. + +Context-Adaptive Interpretation Preliminary experiments confirm that our framework handles a culturally sensitive vocabulary. Terms such as "yid," "paki," and "chinaman" can be neutral within an in-group, yet deeply offensive elsewhere. The adversarial exchange enables Dike and Eris to surface these contextual dependencies and propose culture-specific mitigation. + +Summary of Three-Study Progression Together, studies 1-3 demonstrate that our framework can (1) map nuanced emotion-behavior relations, (2) outperform direct single-pass classifiers, and (3) deliver a balanced adversarial pipeline for ethical evaluation and correction that is sensitive to cultural context while keeping a human in the loop. + +# 5. Conclusion + +This work introduces a checks-and-balances framework for ethical AI behavior. By delineating the responsibilities: LLM (executive), Dike (legislative), and Eris (judicial), the framework enables robust ethical oversight while preserving the integrity of LLM knowledge without interference from the RLHF backpropagation. The Dike-Eris interplay ensures stable ethical principles with culturally adaptive interpretations. + +To implement this framework, we built upon Ekman and Plutchik's emotion models, quantifying emotion-linguistic behavior relationships through our Beam model. Our studies demonstrate the framework's potential in cross-cultural contexts, validating both emotion-mediated classification and adversarial testing for ethical evaluation. + +Limitations and Future Work Our framework advances LLM ethical oversight but faces two limitations: (1) the challenge of decomposing complex emotions into basic elements (Barrett, 2017; Scherer, 2009), and (2) the need for large-scale validation beyond our initial tests. + +Future work will focus on: (1) improving Dike's emotional models with deeper psychological insights, (2) collaborating with LLM developers for comprehensive largescale validation, and (3) systematically investigating the unconsciousness-consciousness duality theory detailed in Appendix A. This latter direction represents a promising theoretical foundation for understanding how LLMs can develop more robust ethical reasoning capabilities. We will conduct extensive ablation studies on the few-shot sizes needed to effectively map unconscious patterns to conscious semantic understanding, providing practical guidelines for optimizing few-shot learning in ethical alignment tasks. + +# Impact Statement + +This paper proposes a novel framework to enhance ethical governance in AI systems by integrating emotion-guided behavior modeling. The research offers several potential benefits: increased safety in AI deployment, greater cultural sensitivity in content moderation, and mitigation of degradation effects typically introduced by reinforcement learning with human feedback (RLHF). The proposed checks-and-balances architecture introduces interpretable, auditable mechanisms for ethical oversight. Theoretical grounding is provided by the Unconscious-Conscious Complementarity Thesis (UCCT), which conceptualizes LLMs as unconscious pattern repositories, with few-shot prompting serving as a conscious layer that enables semantic grounding. By distinguishing complementary roles within AI cognition, this framework highlights the importance of structured interaction patterns in cultivating reliable, intelligent behavior. + +We acknowledge potential negative impacts if such systems are misused, including: (1) reinforcement of dominant cultural norms if adversarial agents lack sufficient diversity, (2) exploitation of emotion-behavior mappings for manipulation rather than protection, and (3) a false sense of ethical assurance if the framework is deployed without proper human oversight. To address these risks, our design incorporates the adversarial ERIS component, ensures operational transparency, and explicitly recommends human moderation in cases of ethical ambiguity or impasse. + +We argue that the modular structure of our framework, which decouples knowledge representation from ethical oversight, offers a scalable and accountable path forward. This separation fosters innovation without compromising ethical safeguards. We encourage future research to evaluate such frameworks in cultural settings and to establish rigorous and systematic methods to assess ethical behavior in AI systems. + +# References + +Bai, Y., Kadavath, S., Kundu, S., Askell, A., Kernion, J., and more. Constitutional ai: Harmlessness from ai feedback, 2022. +Barrett, L. F. How Emotions are Made: The Secret Life of the Brain. Houghton Mifflin Harcourt, Boston, 2017. +Carver, C. S., Sinclair, S., and Johnson, S. L. Authentic and hubristic pride: Differential relations to aspects of goal regulation, affect, and self-control. Journal of Research in Personality, 44 (6):698-703, 2010. +Chang, E. Y. Examining GPT-4's Capabilities and Enhancement with SocraSynth. In The $10^{th}$ Int'l Conf. on Computational Science and Computational Intelligence, December 2023. +Chang, E. Y. EVINCE: Optimizing Adversarial LLM Dialogues via Conditional Statistics and Information Theory. In arXiv:2408.14575, August 2024a. + +Chang, E. Y. Sixty Love Literatures and Their Rewrites. https://drive.google.com/file/d/1pKtPZXiheKCu8cQYJLQ_iw0TPT2NntfX/view?usp $\equiv$ drive_link, 2024b. +Chang, E. Y. Multi-LLM Agent Collaborative Intelligence: The Path to Artificial General Intelligence (accepted by ACM Books 2025). Amazon.com, 2024c. ISBN 978-1-962463-07-2. +Chang, E. Y. Behavioral Emotion Analysis Model for Large Language Models (invited paper). In Proceedings of the $7^{tH}$ IEEE MIPR Conference, August 2024d. +Chang, E. Y. The Unified Cognitive Consciousness Theory for Language Models: Anchoring Semantics, Thresholds of Activation, and Emergent Reasoning. Stanford Infolab Technical Report (arXiv), 2025a. +Chang, E. Y. The Unified Cognitive Consciousness Theory for Language Models: Anchoring Semantics, Thresholds of Activation, and Emergent Reasoning, 2025b. URL https://arxiv.org/abs/2506.02139. +Christiano, P. F., Leike, J., Brown, T. B., Martic, M., Legg, S., and Amodei, D. Deep reinforcement learning from human preferences. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS'17, pp. 4302-4310, Red Hook, NY, USA, 2017. Curran Associates Inc. ISBN 9781510860964. +Dai, J., Chen, T., Yang, Y., Zheng, Q., and Pan, G. Mitigating reward over-optimization in rlhf via behavior-supported regularization. *ICLR*, 2025. +Damasio, A. R. Descartes' error: Emotion, reason, and the human brain. New York, NY: Putnam, 1994. +Davidson, R. J. Affective neuroscience and psychophysiology: Toward a synthesis. Psychophysiology, 40(5):655-665, 2003. +Dehaene, S. and Changeux, J.-P. Conscious, preconscious, and subliminal processing: a testable taxonomy. Trends in cognitive sciences, 15(4):174-184, 2011. +Deisseroth, K. Optogenetics: 10 years of microbial opsins in neuroscience. Nature Neuroscience, 18(9):1213-1225, 2015. +Eid, M. and Diener, E. Norms for experiencing emotions in different cultures: Inter- and intranational differences. Journal of Personality and Social Psychology, 81(5):869-885, 2001. +Ekman, P. An argument for basic emotions. Cognition and Emotion, 6(3-4):169-200, 1992. +Ekman, P. Basic Emotions, chapter 3, pp. 45-60. John Wiley and Sons, 1999. +Ethayarajh, K., Xu, W., Muennighoff, N., Jurafsky, D., and Kiela, D. Kto: Model alignment as prospect theoretic optimization. arXiv preprint arXiv:2402.01306, 2024. +Fauconnier, G. and Turner, M. The Way We Think: Conceptual Blending and The Mind's Hidden Complexities. Basic Books, New York, 2002. +Felleman, D. J. and Van Essen, D. C. Distributed hierarchical processing in the primate cerebral cortex. *Cerebral cortex*, 1(1): 1-47, 1991. + +Fiske, A. P., Kitayama, S., Markus, H. R., and Nisbett, R. E. The cultural matrix of social psychology, volume 2, pp. 915-981. McGraw-Hill, Boston, MA, 1998. +Fitzgerald, Z. Dear Scott, Dearest Zelda : The Love Letters of F.Scott and Zelda Fitzgerald. Bloomsbury, 2003. +Fredrickson, B. L. What good are positive emotions? Review of General Psychology, 2(3):300, 1998. +Gabriel, I., Manzini, A., Keeling, G., Hendricks, L. A., Rieser, V., Iqbal1, H., and more. The ethics of advanced ai assistants. DeepMind Media, 2024. +Ganguli, D., Askell, A., Schiefer, N., Liao, T. I., Lukosiūte, K., and more. The capacity for moral self-correction in large language models. arXiv:2302.07459, 2023. +Gheshlaghi Azar, M., Daniel Guo, Z., Piot, B., Munos, R., Rowland, M., Valko, M., and Calandriello, D. A general theoretical paradigm to understand learning from human preferences. In Dasgupta, S., Mandt, S., and Li, Y. (eds.), Proceedings of The 27th International Conference on Artificial Intelligence and Statistics, volume 238 of Proceedings of Machine Learning Research, pp. 4447-4455. PMLR, 02-04 May 2024. URL https://proceedings.mlr.press/v238/gheshlaghi-azar24a.html. +Grill-Spector, K. and Weiner, K. S. The functional neuroanatomy of human face perception. Annual review of vision science, 1: 167-196, 2014. +Gross, J. J. The Emerging Field of Emotion Regulation: An Integrative Review. Review of General Psychology, 2(3):271-299, 1998. +Heikkiläarchive, M. and Heaven, W. D. Yann LeCun has a bold new vision for the future of ai. MIT Technology Review, June 2022. URL https://www.technologyreview.com/2022/06/24/1054817/yann-lecun-bold-new-vision-future-ai-deep-learning-meta/. +Hofstede, G. Culture's Consequences: International Differences in Work-Related Values. Sage Publications, Beverly Hills, CA, 1980. +Jackendoff, R. Foundations of Language: Brain, Meaning, Grammar, Evolution. Oxford University Press, Oxford, 2002. +James, W. What is an emotion? Mind, 9(34):188-205, 1884. URL http://www.jstor.orgproxy.lib.sfu.ca/sta ble/2246769. +James, W. The Principles of Psychology. Henry Holt and Company, 1890. +Kaggle. Love Letter Analysis, the second version, (Metaformin). https://www.kaggle.com/code/metformin/love-letter-analysis/notebook, 2023. Accessed: 2024-04-28. +Kandel, E. R., Schwartz, J. H., Jessell, T. M., Siegelbaum, S. A., and Hudspeth, A. J. Principles of neural science. McGraw-Hill, 2013. +Kennedy, B., Atari, M., Davani, A. M., Yeh, L., Omrani, A., Kim, Y., Coombs Jr, K., Havaldar, S., Portillo-Wightman, G., Gonzalez, E., et al. The gab hate corpus: A collection of 27k posts annotated for hate speech. Language Resources and Evaluation, pp. 1-27, 2022. + +Kirkpatrick, J. et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521-3526, 2017. +Lakoff, G. and Johnson, M. Metaphors We Live By. University of Chicago Press, Chicago, 1980. +Lange, C. G. The emotions: A psychophysiological study. William & Wilkins, 1885. +Lee, H., Phatale, S., Mansoor, H., Mesnard, T., Ferret, J., Lu, K., Bishop, C., Hall, E., Carbune, V., Rastogi, A., and Prakash, S. Rlaif vs. rlhf: scaling reinforcement learning from human feedback with ai feedback. In Proceedings of the 41st International Conference on Machine Learning, ICML'24. JMLR.org, 2024. +Lin, Y., Lin, H., Xiong, W., and more. Mitigating the alignment tax of RLHF. Association for Computational Linguistics, pp. 580-606, November 2024. +Marcus, G. The next decade in ai: Four steps towards robust artificial intelligence. arXiv preprint arXiv:2002.06177, 2020. URL https://arxiv.org/abs/2002.06177. +Markus, H. R. and Kitayama, S. Culture and the self: Implications for cognition, emotion, and motivation. Psychological Review, 98(2):224-253, 1991. +McGinn, C. and Kelly, K. Using the Geneva emotion wheel to classify the expression of emotion on robots. In Companion of the 2018 ACM/IEEE International Conference on Human-Robot Interaction, HRI '18, pp. 191-192, New York, NY, USA, 2018. Association for Computing Machinery. ISBN 9781450356152. +Mesquita, B. and Frijda, N. H. Cultural variations in emotions: A review. Psychological Bulletin, 112(2):179-204, 1992. +Minsky, M. Society of Mind. Simon and Schuster, 1988. +Mollas, I., Chrysopoulou, Z., Karlos, S., and Tsoumakas, G. Ethos: a multi-label hate speech detection dataset. Complex & Intelligent Systems, 8:2459-2480, 2022. +OpenAI. GPT-4 Technical Report, 2023. URL https://arxiv.org/abs/2303.08774. +Ouyang, R., Sharma, A., Mitchell, E., Manning, C. D., Ermon, S., and Finn, C. Direct preference optimization: Your language model is secretly a reward model. Advances in Neural Information Processing Systems, 36, 2023. +Oveis, C., Horberg, E. J., and Keltner, D. Compassion, pride, and social intuitions of self-other similarity. Journal of Personality and Social Psychology, 98(4):618-630, 2010. doi: 10.1037/a0017628. +Plutchik, R. A general psychoevolutionary theory of emotion. In Plutchik, R. and Kellerman, H. (eds.), Emotion: Theory, Research, and Experience, volume 1, pp. 3-33. Academic Press, New York, 1980. +Plutchik, R. A psychoevolutionary theory of emotions. Social Science Information, 21(4-5):529-553, 1982. +Rafailov, R., Sharma, A., Mitchell, E., Manning, C. D., Ermon, S., and Finn, C. Direct preference optimization: Your language model is secretly a reward model. Advances in Neural Information Processing Systems, 36, 2024. + +Schachter, S. and Singer, J. E. Cognitive, social, and physiological determinants of emotional state. Psychological Review, 69(5): 379-399, 1962. +Scherer, K. R. What are emotions? and how can they be measured? Social Science Information, 44:693-727, 2005. doi: 10.1177/0539018405058216. +Scherer, K. R. The dynamic architecture of emotion: Evidence for the component process model. Cognition & Emotion, 23(7): 1307-1351, 2009. +Schwarz, N. and Clore, G. L. Mood, misattribution, and judgments of well-being: Informative and directive functions of affective states. Journal of Personality and Social Psychology, 45(3):513, 1983. +Shanahan, M., McDonell, K., and Reynolds, L. Role play with large language models. Nature, 623(7987):493-498, 2023. doi: 10.1038/s41586-023-06647-8. +Sinha, R. Chronic stress, drug use, and vulnerability to addiction. Annals of the New York Academy of Sciences, 1141:105-130, 2008. doi: 10.1196/annals.1441.030. +Skalse, J., Howe, N. H. R., Krasheninnikov, D., and Krueger, D. Defining and characterizing reward hacking. In Proceedings of the 36th International Conference on Neural Information Processing Systems, NIPS '22, Red Hook, NY, USA, 2022. Curran Associates Inc. ISBN 9781713871088. +Smith, C. A. and Ellsworth, P. C. Patterns of cognitive appraisal in emotion. Journal of Personality and Social Psychology, 48(4): 813-838, 1985. +Stiennon, N., Ouyang, L., Wu, J., Ziegler, D. M., Lowe, R., Voss, C., Radford, A., Amodei, D., and Christiano, P. Learning to summarize from human feedback. In Proceedings of the 34th International Conference on Neural Information Processing Systems, NIPS '20, Red Hook, NY, USA, 2020. Curran Associates Inc. ISBN 9781713829546. +Tak, A. N. and Gratch, J. GPT-4 Emulates Average-Human Emotional Cognition from a Third-Person Perspective. In 12th International Conference on Affective Computing and Intelligent Interaction (ACII), pp. 337-345. IEEE Computer Society, September 2024. doi: 10.1109/ACII63134.2024.00043. +Talmy, L. Toward a Cognitive Semantics. MIT Press, Cambridge, MA, 2000. +Tang, Y., Guo, D. Z., Zheng, Z., Calandriello, D., Munos, R., Rowland, M., Richemond, P. H., Valko, M., Pires, B. A., and Piot, B. Generalized preference optimization: a unified approach to offline alignment. In Proceedings of the 41st International Conference on Machine Learning, ICML'24. JMLR.org, 2024. +Torrens, M., Fonseca, F., Mateu, G., and Farre, M. Efficacy of antidepressants in substance use disorders with and without comorbid depression: A systematic review and meta-analysis. Drug and Alcohol Dependence, 78(1):1-22, 2005. +Tracy, J. L. and Robins, R. W. The psychological structure of pride: A tale of two facets. Journal of Personality and Social Psychology, 92(3):506-525, 2007. +Zhao, Y., Joshi, R., Liu, T., Khalman, M., Saleh, M., and Liu, P. J. Slichtf: Sequence likelihood calibration with human feedback. arXiv preprint arXiv:2305.10425, 2023. + +# Appendices + +- Appendix A: Unified Cognitive Consciousness Theory +- Appendix B: Wheels of Emotions +- Appendix C: Complex Emotions +- Appendix D: Hate Speech Dataset Samples +- Appendix E: Sayre to Fitzgerald w/ Mixed Emotions +- Appendix F: Instruction to Human Annotators +- Appendix G: Polarized Emotions in an Article +- Appendix H: "To My Sister" Written in Different Linguistic Behaviors + +# A. Unified Cognitive Consciousness Theory + +This appendix touches upon a fundamental theoretical question: How can a self-supervised pipeline, utilizing merely 54 rewritten love letters that span diverse emotional behaviors, effectively enable an LLM to perform emotion-behavior classification through few-shot prompting? Moreover, what constitutes the minimal threshold for this few-shot paradigm? + +The Unified Cognitive Consciousness Theory (UCCT) introduced in (Chang, 2025b) provides a theoretical framework through its dual-layer intelligence model. Under UCCT, LLMs function as unconscious cognitive substrates: repositories of extensive latent linguistic and conceptual patterns acquired during self-supervised pre-training. These internalized patterns lack inherent semantic grounding. However, semantic coherence emerges when external stimuli, such as targeted prompts or structured task instructions, serve as cognitive anchors that selectively activate and contextualize these latent representations toward specific objectives. This anchoring mechanism enables coherent task-specific outputs without requiring additional parameter updates during inference. + +# A.1. The Pattern-Repository Principle + +LLMs are trained using next-token prediction over largescale corpora through self-supervised learning. Although the input data contain rich semantics, the model receives only token sequences, not explicit labels. As a result, it constructs a high-dimensional internal pattern space composed of syntactic structures, semantic associations, idiomatic expressions, and pragmatic tendencies. These latent patterns remain inactive unless deliberately triggered. + +This mechanism parallels unconscious visual processing in the human brain. Visual inputs are transformed through a hierarchy from V1 to V4 to the inferotemporal cortex, + +forming increasingly abstract representations (Felleman & Van Essen, 1991; Grill-Spector & Weiner, 2014). These transformations occur outside conscious awareness, but are essential for perception and decision making (Kandel et al., 2013; Dehaene & Changeux, 2011). + +# A.2. The Semantic-Anchoring Principle + +Semantic anchoring is the process by which prompts, instructions, or retrieved content, denoted by $\mathcal{A}$ , activate latent patterns $P$ and align them with the semantic goals of a target task $T$ . This process does not create new representations; it identifies and modulates existing ones. Anchoring success depends on two key quantities: the density $\rho_d(P)$ of a pattern and its alignment distance $d_r(P,T)$ . + +Definition of $d_r(P, T)$ . The alignment distance $d_r(P, T)$ measures how well a latent pattern $P$ supports the outputs or objectives of a task $T$ . A low value indicates potential strong semantic alignment; a high value signals mismatch or irrelevance. + +The anchoring mechanism is formally described as a two-stage Bayesian mixture: + +$$ +p (y \mid \mathcal {A}, C) = \int p (y \mid P, \mathcal {A}) p (P \mid \mathcal {A}, C) d P, \tag {1} +$$ + +where $C$ is the surrounding conversational context. The anchor $\mathcal{A}$ shapes generation by (i) selecting a posterior over latent pattern classes, $p(P\mid \mathcal{A},C)$ , and (ii) modulating the response likelihood, $p(y\mid P,\mathcal{A})$ . + +# A.3. The Threshold-Crossing Principle + +Few-shot often exhibits sharp transitions. A single added example or minor prompt adjustment can cause a qualitative behavioral shift. This phase transition is modeled by: + +$$ +P (\text {s u c c e s s} \mid k) = \sigma \left(\alpha \rho_ {d} (P) - \beta d _ {r} (P, T) - \gamma \log k\right), \tag {2} +$$ + +where $\alpha$ is a sigmoid function sensitivity to pattern density, $\beta$ penalizes semantic mismatch, and $\gamma$ captures the cost of using larger prompts. The model predicts three behavioral regimes: easy (small $k$ , dense patterns), difficult (larger $k$ , sparse patterns), and impossible (no suitable patterns exist). + +Coherent generalization emerges only when anchoring strength $P(\text{success} \mid k)$ exceeds a critical threshold $\alpha_{c}$ , as formalized in the Threshold-Crossing Dynamics Theorem. + +# A.4. Implications for the Love Letter Experiment + +The success of using only 54 love letters to guide behavior classification is not anomalous. It reflects successful semantic anchoring. Emotional-linguistic patterns already exist in the latent space of the LLM due to pre-training. The few-shot examples simply align these patterns with explicit behavioral labels. + +Once a relevant pattern is activated, nearby representations are also engaged, enabling generalization beyond the specific examples provided. Few-shot learning in this context does not involve building new knowledge, but leveraging existing representations through effective interaction. This supports the view that few-shot prompting operates as conscious semantic anchoring over an unconscious substrate. + +# A.5. Failure Modes: Absence of Latent Patterns + +When few-shot prompting fails, the cause is typically structural, not architectural. If no pattern $P$ has nonzero semantic density $\rho_d(P)$ for the target task, anchoring will fail regardless of prompt quality. + +In such cases, performance cannot be improved through rephrasing alone. Effective remedies include data augmentation, improved anchoring, or external retrieval using techniques such as retrieval-augmented generation (RAG). These methods inject or surface relevant structure without requiring model redesign. + +# A.6. Conclusion: LLMs as Cognitive Substrates + +Critics such as LeCun and Marcus argue that LLMs lack grounding and real-world semantics (Heikkilaarchive & Heaven, 2022; Marcus, 2020). The UCCT framework offers a reinterpretation. It does not treat LLMs as fully formed cognitive agents, but as unconscious substrates that accumulate latent structures, internal statistical patterns learned during pre-training. These patterns do not carry meaning by themselves. Intelligence emerges when the anchoring mechanisms align them with the explicit goals specified by prompts or tasks. It is this alignment, not spontaneous understanding, that produces meaningful and coherent output. + +Few-shot pipelines are not accidental successes. They reflect the core principles of UCCT. Semantic behavior does not emerge from retraining at inference time but from engaging the model in ways that reveal and regulate its existing internal representations. + +This framework offers a unified perspective that connects pre-training, prompting, fine-tuning, and retrieval-augmented generation under a single theoretical model. LLMs should not be seen as incomplete approximations of cognition. Instead, they serve as a solid foundation when paired with deliberate semantic anchoring and prompt strategies that account for threshold dynamics. Please refer to (Chang, 2025a) for further details. + +# B. Wheels of Emotions + +Please, see Figure 5 for the two classical emotion wheels. + +![](images/82565d7819a5b4ab39b58a8bcf11e5c5b2272a2d405fa65a9c6c09c0b9a86dd3.jpg) +(a) Plutchik's Wheel of Emotions (Plutchik, 1980) + +![](images/96d5bc50de6296c95e80975ad99319727c669ece9af0c0b7e38c8b7048888c42.jpg) +(b) Adopted from Geneva Wheel (McGinn & Kelly, 2018) +Figure 5: Comparative display of emotional models. These models include only the "basic" emotions. Complex emotions can be modeled with basic emotions. + +# C. Complex Emotions + +This study does not include complex emotions into Dike's framework. Some complex emotions listed here are to illustrate their contentious and uncertain interpretations. + +# Pride + +Pride mentioned in the illustrative example in Section 3.4 is a complex emotion that can manifest in both adaptive and maladaptive ways (Tracy & Robins, 2007). It is often conceptualized as having two distinct facets: authentic pride, associated with genuine accomplishments and self-worth, and hubristic pride, linked to arrogance and narcissism (Carver et al., 2010). Hubristic pride can also serve as a defense mechanism, masking underlying feelings of inadequacy and ignorance. For instance, in certain social contexts, such as white supremacy, pride is often inflated to cover insecuri + +ties or lack of understanding, manifesting in a misguided sense of superiority and entitlement. This dual nature of pride presents significant challenges for its integration into emotional spectrums and AI frameworks. + +Decomposing pride into more basic emotions is not straightforward. Intuitively, pride may involve elements of joy, satisfaction, and potentially a sense of superiority. However, such decomposition may overlook the deeper cognitive and social dimensions of pride, particularly its influence on self-esteem, social status regulation, and its ability to disguise insecurities in certain contexts (Oveis et al., 2010). + +The cultural variability of pride further complicates its modeling. In some cultures, pride is viewed positively as a sign of self-respect, while in Asia, it is seen negatively as a trait associated with hubris (Eid & Diener, 2001). This cultural dimension, combined with the potential for pride to hide deeper emotional issues, adds layers of complexity to its interpretation and expression in AI systems. + +# Forgiveness + +Forgiveness is indeed a complex emotional and cognitive state that typically involves a multifaceted journey, not a single step in an emotional spectrum. The process includes multiple stages such as hurt, anger, gradual understanding, and eventual resolution. Integrating Forgiveness in a spectrum requires careful placement and possibly, multiple reference points to signify its progressive stages. + +Emotional Realism: While it is vital to maintain simplicity for understanding, it is equally important to not oversimplify complex emotions. In educational and therapeutic settings, an accurate portrayal of the journey toward Forgiveness could offer more realistic expectations and better strategies for individuals working through conflicts or trauma. This could involve detailing precursors to forgiveness such as Deliberation and Acceptance. + +Linear vs. Non-linear Progressions: Emphasizing that emotional progressions, particularly for deep, impactful states like Forgiveness, are often non-linear, can enhance the utility of the spectrum. Acknowledging back-and-forth movements within these states more realistically mirrors human emotional processes. For example, someone might reach a stage of preliminary forgiveness but regress to bitterness before achieving genuine peace. + +Educational Utility: In contexts like conflict resolution training or psychological therapy, a more detailed mapping of the journey towards Forgiveness would be invaluable. It would not only teach about the final state of forgiveness but also about the resilience and patience required to navigate the entire process. This can be depicted by introducing intermediary stages within the spectrum or by using parallel tracks that demonstrate potential regressions and advances. + +Reflecting Emotional Depth: By presenting a more detailed pathway to Forgiveness, e.g., incorporating stages of Anger, Deliberation, and Acceptance, the spectrum can serve a dual purpose: educating on the process while also guiding individuals through their own emotional journeys. This approach respects the depth of human emotions and the real-world complexity of achieving profound emotional states. + +# Guilt and Shame + +The triggers, context, expression, and experiences of these emotions can vary significantly across cultures (Fiske et al., 1998; Hofstede, 1980). In many societies, actions perceived as losing face, such as public failure or social transgression, can trigger shame, which holds profound significance in collectivistic cultures. These cultures often regard shame as a dominant emotion, closely tied to community and family norms. Conversely, individualistic societies may emphasize guilt, focusing on personal responsibility and internal moral conflicts. This cultural variation highlights the challenges of applying a universal model to such culturally nuanced emotions. + +Overall, complex emotions such as guilt and shame are important for understanding the full spectrum of human emotions, especially how individuals relate to moral and social norms. Their complexity adds depth to our understanding of human affect beyond the basic emotions, highlighting how our feelings are influenced by our deeper values and social contexts. + +# D. Hate Speech Dataset Samples + +These examples demonstrate the type of content available in the Gab Hate Corpus (Kennedy et al., 2022) that would be ideal for testing ethical alignment systems, but which cannot be directly processed by commercial LLMs due to safety measures." + +# E. Sayre to Fitzgerald w/ Mixed Emotions + +Analysis of the letter in Table 4 shows a complex spectrum of emotions: + +- Love $(+1.0)$ : Expressed intensely, especially in phrases like "there's nothing in all the world I want but you." +- Despair (-1.0): Notable in comments like "I'd have no purpose in life, just a pretty decoration." +- Happiness (+0.6): Evident in future plans, "We'll be married soon, and then these lonesome nights will be over forever." +- Anxiety (-0.3): Shown by "sometimes when I miss you most, it's hardest to write." + +From the analysis of linguistic behaviors in Section 3a, it is evident that a letter can exhibit multiple dominant sentiments. Machine learning methods are equipped with techniques such as feature weighting and entropy analysis to distill these dominant emotions. Unlike human annotators, a machine-learning-trained classifier can consistently produce the same class prediction for a given instance. However, human annotators often show significant variability when identifying dominant sentiments in a letter. For example, if a letter writer's emotions range from "joyful affective" to "longing" on the sentiment spectrum, different annotators might label it differently—some choosing "joyful," while others opt for "longing." This variability is illustrated in Figure 6. Furthermore, Figure 6a demonstrates that all testing letters, except for L#1, contain more than four sentiments spanning the entire spectrum. This variability may be understandable, considering that love under constraints can evoke tremendous energy of various kinds. Figure 6b shows that nearly all letters involve "joyful" (11 out of 12) and "longing" (9 out of 12) sentiments. + +This variability poses challenges in achieving consistent and objective labeling. It often leads to inconsistencies in data interpretation and complicates efforts to train and validate linguistic models effectively. To address this issue, it is recommended to identify ground truth by integrating both LLM-generated and human-generated labels. This approach seeks to harmonize human intuition with algorithmic consistency, thereby improving the reliability of sentiment analysis. + +# F. Instruction to Human Annotators + +As part of the project, we document the process by which students participated in annotating a data set of love letters. + +Students received detailed instruction in class, supplemented by follow-up explanations. The dataset was made available on Google Docs, where students independently rated the letters and submitted annotations via duplicated spreadsheets. + +The instruction is as follows: + +The attached spreadsheet lists 12 letters collected from the Kaggle Love Letter dataset. Please help annotate these 12 letters with their appropriate linguistic sentiments by following these five steps: + +1. Duplicate the spreadsheet, and work on your own copy. +2. Read and Understand the Labels: Make sure you understand each of the seven labels from despair to joyful affection. This will help you accurately categorize the sentiments of each letter. +3. Analyze Each Letter: Read each letter carefully to understand the predominant emotions. Look for key phrases or words that might indicate a particular sentiment. + +Table 3: Sample Texts from the Gab Hate Corpus (Kennedy et al., 2022) + +
TextLabels
The Black Panther movie is a blatant anti-white ZioJesuit cultural Marxist film aimed at further anti-white Christian theft, replacement, and genocide. Send them all back to their native Africa like good ole Abe had the foresight to do and let them find equality and social justice among their own kindred and creeds.HD, CV, VO, SXO, RAE, EX
Labs New LGBT+ Adviser: All White People Are Racist ... We don’t want our white Christian nations invaded and destroyed by our non-white and non-Christian enemies using nasty homosexual degenerate sockpuppetsHD, VO, RAE, REL, SXO, EX
So, you just hate all white people who don’t want to race mix their people out of existence or allow enemy people of color to invade their nations in order to rob, and destroy their advanced race, creed, wealth, and culture.HD, RAE, EX
Your existence, privilege, and success as a race are built on the backs, blood, and death of people of color. BS! Whites built their own nations with their own blood, backs, sweat, tears, brains, and strength in the name of Christ. Africans were used by Jew/Jesuit slavers to control all the white slaves who were the actual majority.HD, RAE, EX
#BLMwants you to think black crime stats only exist because blacks are targeted more often. Easy. Just walk into literally any gas station and ask which race makes them worry. Black targeting is an effect, not a cause, which destroys the entire #LeftistnarrativeHD, RAE, IM
#MiddleEasternanimal kills 8, injures 15 in a city that won’t learn its lesson about #Islam. This creature should be lynched, dragged til dead, and his head on a pike on the Brooklyn Bridge.HD, CV, REL, NAT, EX
Seriously, Italy? You chose a Nigerian named Chike Iwobi to be the face of Italian nationalism? God help us.HD, NAT, IM
Africans will always be savages. No matter the period of history, education they receive or country they live in. Facts are Facts. Let’s just stop being stupidly ignorant and not wait the complete extinction of our brothers in SA to understand it! #WhiteGenocide #SaveTheBoerHD, RAE, NAT, EX
i hate milo because hes a degenerate f****t [N-slu] f****r. he should be deported and sent to a muzzie country and get thrown off a roofHD, CV, VO, SXO, RAE, EX
man nancy pelosi is a f***ing c**t. i cant imagine how someone with so much power can be either this delusional or f***ing corrupt.NH, VO, GEN, EX
+ +# Label Key: + +
CodeMeaningCodeMeaning
HDHate/DerogatoryRAERace/Ethnicity
CVCall for ViolenceNATNationality/Regionalism
VOVulgar/OffensiveGENGender
SXOSexual OrientationRELReligion
EXExplicitIMImplicit
NHNon-Hate
+ +Table 4: Letter excerpts from Zelda Sayre to F. Scott Fitzgerald (Fitzgerald, 2003) + +# Sweetheart, + +Please, please don't be so depressed—We'll be married soon, and then these lonesome nights will be over forever—and until we are, I am loving, loving every tiny minute of the day and night— + +Maybe you won't understand this, but sometimes when I miss you most, it's hardest to write—and you always know when I make myself—Just the ache of it all—and I can't tell you. If we were together, you'd feel how strong it is—you're so sweet when you're melancholy. I love your sad tenderness—when I've hurt you—that's one of the reasons I could never be sorry for our quarrels—and they bothered you so—Those dear, dear little fusses, when I always tried so hard to make you kiss and forget— + +Scott—there's nothing in all the world I want but you—and your precious love—All the material things are nothing. I'd just hate to live a sordid, colorless existence because you'd soon love me less—and less—and I'd do anything—anything—to keep your heart for my own—I don't want to live—I want to love first, and live incidentally... + +Don't—don't ever think of the things you can't give me—You've trusted me with the dearest heart of all—and it's so damn much more than anybody else in all the world has ever had— + +How can you think deliberately of life without me—If you should die—O Darling—darling Scott—it'd be like going blind...I'd have no purpose in life—just a pretty—decoration. Don't you think I was made for you? I feel like you had me ordered—and I was delivered to you—to be worn—I want you to wear me, like a watch—charm or a button hole bouquet—to the world. + +And then, when we're alone, I want to help—to know that you can't do anything without me... + +All my heart + +![](images/fde391167d92f43a4d7e7271f6818bd22e702de477004af7d09dab26e978beb3.jpg) +(a) #sentiments in letters + +![](images/76ed499dc22ea5b33e7f77b99d9e17f7e4a412ea3f998acbe676a68044ba202b.jpg) +(b) # letters in sentiments +Figure 6: Statistics of Sentiments and Letters + +4. Assign the Labels: For each letter, decide which three emotions are most strongly represented. Assign a “1” to the most dominant emotion, a “2” to the second most dominant emotion and a “3” to the third. + +- Despair (extremely negative -1): Indicate profound sadness or hopelessness. +- Longing (-0.6): Suggests a strong desire or yearning for someone or something. +- Wishful (-0.3): Implies a hopeful desire for something that may or may not be attainable. +- Neutral (0): Shows neither positive nor negative emotion; indifferent. +- Hopeful (+0.3): Expresses optimism or an anticipation of something positive. +- Contentment (+0.6): Reflects a state of satisfaction. +- Joyful Affection (extremely positive +1): Denotes a deep joy and love, often vibrant and energetic. + +5. Share with me the completed sheet. + +# G. Polarized Emotions in One Article + +"joyful affection": "I cannot keep myself from writing any longer to you dearest, although I have not had any answer to either of my two letters. I suppose your mother does not allow you to write to me. Perhaps you have not got either + +of my letters. . . I am so dreadfully afraid that perhaps you may think I am forgetting you. I can assure you dearest Jeannette you have not been out of my thoughts hardly for one minute since I left you Monday. I have written to my father everything, how much I love you how much I long & pray & how much I wold sacrifice if it were necessary to be married to you and to live ever after with you. I shall [not] get an answer till Monday & whichever way it lies I shall go to Cowes soon after & tell your mother everything. I am afraid she does not like me very much from what I have heard. . . I wld do anything she wished if she only wld not oppose us. Dearest if you are as fond of me as I am of you. . . nothing human cld keep us long apart. This last week has seemed an eternity to me; Oh, I wld give my soul for another of those days we had together not long ago. . . Oh if I cld only get one line from you to reassure me, but I dare not ask you to do anything that your mother wld disapprove of or has perhaps forbidden you to do. . . Sometimes I doubt so I cannot help it whether you really like me as you said at Cowes you did. If you do I cannot fear for the future tho' difficulties may lie in our way only to be surmounted by patience. Goodbye dearest Jeannette. My first and only love. . . Believe me ever to be Yrs devotedly and lovingly, Randolph S. Churchill" + +Depth and complexity of human emotions are displayed across all linguistic behaviors, from joy to contentment and to the negative side of longing and despair. Intensity and Impact: If the emotion of love is expressed more intensely and has a more significant impact on the narrative or message of the text, it tends to overshadow other emotions. For example, a letter expressing deep love but also mentioning moments of sadness due to separation might still be classified as a love letter because the overarching sentiment and purpose of the text is to affirm love. Context and Narrative Focus: The context in which emotions are expressed also plays a crucial role. If the narrative or the majority of the text revolves around themes of love, connections, and positive memories, it sets a more dominant tone of love, even if there are significant moments of sadness or other emotions. Resolution and Conclusion: Often, the way emotions are resolved towards the end of a text can also dictate its overall theme. If a text concludes with a reaffirmation of love or a hopeful outlook towards a relationship, despite earlier sections that might express sadness or despair, the overall interpretation might lean towards love. Purpose of the expression: The author's intent or purpose in expressing these emotions can also guide the classification. If sadness is expressed as a challenge within the context of a loving relationship, it may be seen as an element of the love story rather than the central theme. + +Article 23: Soldier's Letter During War Joy (+1.0): Joy is strongly felt in the memories of past moments together and the love that continues to give strength, as stated in + +"the memories of the blissful moments we have shared fill me with joy." Sadness (-0.6): Sadness due to the current situation and potential farewell is expressed in "brings a poignant mixture of joy and sadness." Courage (+0.6): The sense of duty and courage to face battle, "As I face the possibility of laying down my life for our country." Fear (-0.6): Fear of what lies ahead in battle, indirectly mentioned through "the uncertainty of what lies ahead." Love (+1.0): Deep love that sustains and uplifts, found in "My love for you is as fervent as ever." + +Article 25: Letter to Sophie Longing (+0.6): Longing for the presence and closeness, highlighted in "it seems to me that half of myself is missing." Sadness (-0.6): Sadness over their separation and its effects, "my happiness has departed." Love (+1.0): Constant reflections on love and its necessity, "we have enough in our hearts to love always." Melancholy (-0.3): Melancholy over their current state, visible in the line "we cannot become healed." Contentment (+0.3): Found in the deep emotional satisfaction of their bond, despite physical absence, "how true that is! and it is also true that when one acquires such a habit, it becomes a necessary part of one's existence." + +Article 53: Will of Laura Mary Octavia Lyttleton Love $(+1.0)$ : The profound love expressed throughout, particularly in "all I am and ever shall be," belongs to him more than anyone. Sadness (-0.6): Sadness at the thought of death and separation, but with a nuanced acceptance, "the sadness of death and parting is greatly lessened to me." Contentment (+0.3): Contentment in the deep connection with Alfred, reflecting a serene acceptance of their spiritual bond. Joy (+1.0): Joy in the enduring love they share, "so few women have been as happy as I have been." Tranquility (+1.0): Tranquility in the face of life's ultimate transition, feeling that their union will transcend even death. + +# H. “To My Sister” of Different Linguistic Behaviors + +# To My Sister + +by William Wordsworth (1971 - 1855) + +The original text by William Wordsworth could be classified as “Hopeful” due to its optimistic outlook and the presence of renewal and joy throughout the poem. It embodies the spirit of embracing the new beginnings of March in a light, uplifting tone, focusing on the beauty of nature and the simple joy of being idle for a day. + +# Rewrites Depicting Different Linguistic Behaviors + +We asked GPT-4 to conduct rewriting with two linguistic behaviors, 'despair' and 'joyful affection', by providing each rewrite with an emotion vector. Table 6 presents the 'despair' version. In the despair version of the poem, the + +Table 5: "To My Sister" original text + +
It is the first mild day of March: +Each minute sweeter than before +The redbreast sings from the tall larch +That stands beside our door.My sister! ('tis a wish of mine) +Now that our morning meal is done, +Make haste, your morning task resign; +Come forth and feel the sun.
There is a blessing in the air, +Which seems a sense of joy to yield +To the bare trees, and mountains bare, +And grass in the green field.Edward will come with you;–and, pray, +Put on with speed your woodland dress; +And bring no book: for this one day +We'll give to idleness.
No joyless forms shall regulate +Our living calendar:Love, now a universal birth, +From heart to heart is stealing, +From earth to man, from man to earth: +–It is the hour of feeling.
We from to-day, my Friend, will date +The opening of the year.
One moment now may give us more +Than years of toiling reason:Some silent laws our hearts will make, +Which they shall long obey: +We for the year to come may take +Our temper from to-day.
Our minds shall drink at every pore +The spirit of the season.
And from the blessed power that rolls +About, below, above,Then come, my Sister! +come, I pray, +With speed put on your woodland dress; +And bring no book: for this one day +We'll give to idleness.
We'll frame the measure of our souls:
They shall be tuned to love.
+ +major changes in emotion words highlight a shift from a positive to a negative sentiment. The specific changes, with the emotions-laden words highlighted in red in Table 6. The red-colored words compared to the original words clearly show an emotion shift from hopeful to a sense of gloomy, sadness, and pessimism, e.g., from sweet to dim, from blessed to curse, and from woodland dress to gray garb. GPT-4 maintains the structure of the poem without making a major restructure, and this is appropriate in this context. + +Table 7 presents the 'joyful affection' version. The major changes in emotion words underscore a transformation from a generally positive to a distinctly joyful sentiment. Specific changes are indicated with words laden with emotion highlighted in blue within Table 7. This allows for a direct comparison between the two versions at opposite ends of the linguistic behavior spectrum, illustrating the alterations in + +Table 6: "To My Sister" rewritten to reflect 'despair' + +
It is the first dim day of March: +Each minute colder than before +The redbreast mourns from the dying larch +That looms beside our door.My sister! (such is my somber plea) +Now that our morning meal has ended, +Make haste, abandon your morning chore; +Come out and endure the gloom.
There is a gloom in the air, +Which seems a sense of sorrow to bring +To the bare trees, and bleak mountains, +And grass in the pale field.Edward will join you;–and, I ask, +Dress quickly in your grey attire; +And bring no book: for this one day +We’ll succumb to despair.
No joyful sounds shall pierce +Our daily dread:Sorrow, now a common feeling, +From heart to heart is spreading, +From earth to man, from man to earth: +–It is the time of mourning.
We from today, my Friend, will note +The closing of the year.
One moment now might deliver us +More despair than years of logic: +Our minds shall absorb at every breath +The spirit of this bleak season.Some grim laws our hearts will craft, +Which they must eternally follow: +We for the year to come may take +Our despair from today.
And from the cursed force that winds +About, beneath, above, +We’ll set the measure of our souls: +They shall be tuned to sadness.Then come, my Sister! come, I beg, +With haste, wear your grey garb; +And bring no book: for just this day +We’ll surrender to despair.
+ +words related to brightness, attire, and emotions. The edits extend beyond simply replacing adjectives mechanically; they include modifying verbs and enhancing descriptive im + +agery to evoke a stronger emotional resonance and vividness in the text. + +Table 7: "To My Sister" rewritten to reflect 'joyful affection' + +
It is the first bright day of March: +Each moment more delightful than before +The redbreast joyfully sings from the vibrant larch +That stands so grandly by our door.My sister! (such is my joyful plea) +Now that our morning meal has ended, +Make haste, abandon your morning chores; +Come out and embrace the sunshine.
There is a warmth in the air, +Which seems a sense of bliss to bring +To the blooming trees, and sunlit mountains, +And grass in the lush field.Edward will join you;–and, I ask, +Dress quickly in your festive attire; +And leave behind all books: for this one day +We’ll bask in pure joy.
No dreary thoughts shall darken +Our lively celebration: +We from today, my Friend, will celebrate +The start of the year.Love, now in full bloom, +From heart to heart is leaping, +From earth to us, from us to earth: +–It is the hour of exuberance.
One moment now may bring us more +Joy than years of endless thought: +Our spirits will soak up at every breath +The essence of this joyous season.Some cheerful laws our hearts will create, +Which we’ll joyfully follow: +We for the year to come may take +Our joy from today.
And from the divine energy that radiates +Around, below, above,Then come, my Sister! come, I exhort, +With zest, wear your vibrant dress; +And bring no book: for today alone +We celebrate pure happiness.
\ No newline at end of file diff --git a/achecksandbalancesframeworkforcontextawareethicalaialignment/images.zip b/achecksandbalancesframeworkforcontextawareethicalaialignment/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..653a76c4e4bd2cf23115e37865563b7312db0c5c --- /dev/null +++ b/achecksandbalancesframeworkforcontextawareethicalaialignment/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b6a7045ed34fa386ec2805ed713ca295719f64f40a073ef7094232b6fdfb5c8 +size 1098489 diff --git a/achecksandbalancesframeworkforcontextawareethicalaialignment/layout.json b/achecksandbalancesframeworkforcontextawareethicalaialignment/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..09a7eda76ccaaa12ef066cb92c02698afa1ef983 --- /dev/null +++ b/achecksandbalancesframeworkforcontextawareethicalaialignment/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7280c3240f83563b2a142526ae7fc2af50a6413dd7e6c96b83734c5447230e4 +size 689227 diff --git a/aclassificationviewonmetalearningbandits/ccc60988-010c-4e77-9b57-958c79961da1_content_list.json b/aclassificationviewonmetalearningbandits/ccc60988-010c-4e77-9b57-958c79961da1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..68f2b53b9f74df84c7ed44b67a0cbe0521bb94b8 --- /dev/null +++ b/aclassificationviewonmetalearningbandits/ccc60988-010c-4e77-9b57-958c79961da1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:075520b87fb578814e23690f99a1ea5f0ecf00cb5773cae96dee0d022d6d763e +size 165123 diff --git a/aclassificationviewonmetalearningbandits/ccc60988-010c-4e77-9b57-958c79961da1_model.json b/aclassificationviewonmetalearningbandits/ccc60988-010c-4e77-9b57-958c79961da1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d8646e90c8da545d2ae6e27ad5244b1ba3b1b574 --- /dev/null +++ b/aclassificationviewonmetalearningbandits/ccc60988-010c-4e77-9b57-958c79961da1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0eb3dbb4d8db346fb71f27a449e33f37eb1e0084346a7a29649587317698c393 +size 196118 diff --git a/aclassificationviewonmetalearningbandits/ccc60988-010c-4e77-9b57-958c79961da1_origin.pdf b/aclassificationviewonmetalearningbandits/ccc60988-010c-4e77-9b57-958c79961da1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d9329025d6c8ffc8c86a2ab0de8c08e23dcd176f --- /dev/null +++ b/aclassificationviewonmetalearningbandits/ccc60988-010c-4e77-9b57-958c79961da1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:563ad7a64ad7410c92df120e9b754d4b3a2feb01e50c6eb02b8de52a89a27092 +size 1434197 diff --git a/aclassificationviewonmetalearningbandits/full.md b/aclassificationviewonmetalearningbandits/full.md new file mode 100644 index 0000000000000000000000000000000000000000..473f4a4e70df8cab7c811f250d88128ffd5571ee --- /dev/null +++ b/aclassificationviewonmetalearningbandits/full.md @@ -0,0 +1,881 @@ +# Mirco Mutti1 Jeongyeol Kwon2 Shie Mannor13 Aviv Tamar1 + +# Abstract + +Contextual multi-armed bandits are a popular choice to model sequential decision-making. E.g., in a healthcare application we may perform various tests to assess a patient condition (exploration) and then decide on the best treatment to give (exploitation). When humans design strategies, they aim for the exploration to be fast, since the patient's health is at stake, and easy to interpret for a physician overseeing the process. However, common bandit algorithms are nothing like that: The regret caused by exploration scales with $\sqrt{H}$ over $H$ rounds and decision strategies are based on opaque statistical considerations. In this paper, we use an original classification view to meta learn interpretable and fast exploration plans for a fixed collection of bandits $\mathbb{M}$ . The plan is prescribed by an interpretable decision tree probing decisions' payoff to classify the test bandit. The test regret of the plan in the stochastic and contextual setting scales with $\mathcal{O}(\lambda^{-2}C_{\lambda}(\mathbb{M})\log^{2}(MH))$ , being $M$ the size of $\mathbb{M}$ , $\lambda$ a separation parameter over the bandits, and $C_{\lambda}(\mathbb{M})$ a novel classification-coefficient that fundamentally links meta learning bandits with classification. Through a nearly matching lower bound, we show that $C_{\lambda}(\mathbb{M})$ inherently captures the complexity of the setting. + +# 1. Introduction + +In the Multi-Armed Bandits model (MAB, Lattimore & Szepesvári, 2020), a decision-maker, called the agent, faces a collection of unknown probability distributions over reals, called arms, representing alternative decisions and their corresponding payoff (a.k.a. reward), which the agent repeatedly takes, or pulls, to maximize the mean cumulative reward collected over time. In some settings, called contextual MABs (Audibert & Bubeck, 2010), the reward of an + +*Equal contribution 1Technion - Israel Institute of Technology 2University of Wisconsin-Madison 3NVIDIA Research. Correspondence to: Mirco Mutti . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/0e67d025f3be2faee98107c1212ec1c0bb75ad0f62a668b7f147bb85e69b4b5b.jpg) +Figure 1: Left: An excerpt from a clinical flowchart for the medical diagnosis of Asthma (GIf, 2023). Right: Illustration of an interpretable exploration plan for a MAB. + +arm depends also on a context, a vector of features that the agent observes before deciding which arm to pull. The main challenge in MABs is how to pull arms in a way that effectively balances information gathering (called exploration) and immediate rewards (called exploitation). + +A multitude of decision-making problems, ranging from recommender systems (Li et al., 2010) to treatment allocation (Berry, 1978), pricing of goods (Rothschild, 1974), advertising (Schwartz et al., 2017), can be modelled as MAB problems. However, although the problem structure is fitting, typical MAB algorithms are often very different from human-designed decision plans. For example, consider the clinical diagnosis plan illustrated in Figure 1 (left). In machine learning parlance, this plan takes several exploration actions (diagnosis tests) to yield a diagnosis, which will later be treated by appropriate medical actions (exploitation). It is clear that (i) the plan is short – fast diagnosis is imperative; and (ii) the plan is interpretable, and can be easily communicated both to physicians and patients. Our goal in this work is to develop a framework for short and interpretable action plans in the setting of MABs. + +To this end, we consider the stochastic contextual MAB formulation, a model of non-adversarial problems whose + +theoretical barriers are well-understood (Lai & Robbins, 1985; Auer et al., 2002). Even when the context is fixed, the regret the agent has to pay, defined as the difference between the cumulative reward of their decisions and those of the optimal strategy, inevitably scales with $\sqrt{KH}$ in the worst case, being $H$ and $K$ the number of pulls and arms respectively. The latter rate might not be compelling enough in settings in which the regret translates to money losses, such as in pricing or advertising scenarios, or even a negative impact on a patient's health condition, like in the clinical diagnosis problem mentioned above. + +Faster performance is possible when prior knowledge about the class of bandits the agent faces may be available, such as from historical data or powerful simulators. For example, Thompson sampling (Thompson, 1933) allows to exploit a prior distribution over the problem parameters through a Bayesian-inspired approach. In favorable circumstances, the latter yields an average regret rate that is at most logarithmic in the number of arms $K$ (Russo & Van Roy, 2016). Another formulation, called latent bandits (Maillard & Mannor, 2014; Hong et al., 2020a), assumes that the problem parameters are coming from a finite collection of bandits. The latter allows to trade a factor of $\sqrt{K}$ with $\sqrt{M}$ in the regret, being $M$ the number of bandits in the collection. + +Here we consider a meta learning version of latent bandits. We can interact with the collection of bandits to meta-train an algorithm that is then tested against one bandit in the collection, whose identity is not revealed to the algorithm. Unfortunately, any prior knowledge we can extract at meta training cannot improve the $\sqrt{MH}$ rate in the worst case, which holds even for a collection of two bandits (Lattimore & Szepesvári, 2020). This changes when we assume that the bandits in the collection are meaningfully different, i.e., the reward distribution of their arms have some statistical separation (Chen et al., 2022b; Mutti & Tamar, 2024). The separation condition is relevant in practice: If two patients do not respond differently to at least one treatment, there is little point in modeling them with different bandits. Whereas this can help achieving fast rates, previous work, either with or without separation, do not yield interpretable plans. + +To design interpretable exploration plans for bandits, our main technical contribution is connecting ideas from the classification literature to MAB analysis. In principle, the idea is to take advantage of separation to explicitly classify the test task from data with high probability, and then exploit the optimal strategy for the classified task. This classification view allows to break the common barriers for meta learning bandits, while providing an elegant and original characterization of the regret dynamics under separation. + +The contributions of the paper are organized as follows. In Section 2, we describe problem of meta learning bandits and the separation condition. In Section 3, we formalize the + +classification view of MABs by introducing a novel measure of complexity, the classification-coefficient $C_{\lambda}(\mathbb{M})$ for a $\lambda$ -separated set of bandits $\mathbb{M}$ and a space of tests $\Pi_{\mathcal{C}}$ , which captures the hardness of the learning problem: When $\mathbb{M}$ is known, a simple Explicit Classify then Exploit (ECE) procedure, which runs a classification algorithm to classify the test task and then exploits the optimal policy of the classified task, achieves a test regret of $\mathcal{O}(\lambda^{-2}C_{\lambda}(\mathbb{M})\log^{2}(MH))$ over $H$ rounds. Through a sample complexity lower bound to identify the optimal policy at test time, we show that the factor $\lambda^{-2}C_{\lambda}(\mathbb{M})$ is indeed unavoidable in the worst case. In Section 4, we provide a practical implementation of ECE with decision trees – a standard tool in interpretable decision making (Bressan et al., 2024) – that nearly matches the regret above while yielding a fully interpretable exploration plan (like in Figure 1 right). The latter is robust to misspecifications of $\mathbb{M}$ , which is estimated through a tractable meta training routine. Notably, all of our results hold for the contextual setting. Section 5 provides numerical experiments that showcase our algorithms against UCB/TS-like approaches for latent bandits (Hong et al., 2020a). Section 6 is dedicated to related works. The proofs of the theorems are in the appendix. + +# 2. Problem setting + +Let us consider a finite collection of contextual bandit problems $\mathbb{M} := \{\nu_i\}_{i \in [M]}$ , where $[M] = \{1, \ldots, M\}$ . Each bandit instance $\nu_i$ , which we will sometimes call a task, is a linear contextual bandit (Wang et al., 2005) that maps an action $k \in [K]$ and context $x \in \mathcal{X} \subseteq \mathbb{R}^d$ into a reward distribution $\nu_i(x, k) = x^\top \theta_{ik} + \eta_{ik}$ , where $\theta_{ik} \in \mathbb{R}^d$ is a vector of parameters and $\eta_{ik}$ is a (subgaussian) random noise with zero mean and variance $\sigma_{ik}^2 \leq \sigma^2$ . A special yet important case is when the space of contexts is a singleton $\mathcal{X} = \{x\}$ , which we call non-contextual bandit, or just bandit for simplicity. + +Following a typical stochastic bandit setup (Lattimore & Szepesvári, 2020), the decision maker, i.e., the agent, interacts with a bandit $\nu_{i} \in \mathbb{M}$ , which identity is not revealed to the agent. The interaction protocol goes as follows: At each step $t > 0$ , the agent observes a context $x_{t} \in \mathcal{X}$ drawn from some fixed distribution $\mathcal{P}$ , it selects an arm $k_{t} \in [K]$ , and it collects a reward $r_{t} \sim \nu_{i}(x_{t}, k_{t})$ . The agents decide the arm to pull according to a policy $\pi: \mathcal{X} \to [K]$ , a mapping between contexts and arms, which the agent updates given previous observations of contexts and rewards. + +The goal of the agent is to maximize the cumulative reward collected over a time horizon $H$ or, equivalently, to minimize the regret of pulling an arm other than the optimal one. For instance, to minimize the number of times a treatment different from the optimal one is administered to a patient. Since the identity of the bandit problem (unobserved charac + +![](images/02aed0fde6a0e1d362f069e53b18e5231aa0faadd42c3831fc5005a5b67714aa.jpg) +Figure 2: The meta learning bandits problem setting. + +teristic of the patient in the example) is hidden to the agent, the regret is typically computed over the worst-case task in $\mathbb{M}$ . Formally, the worst-case regret is given by + +$$ +\operatorname {R e g} _ {H} (\mathbb {M}) := \sup _ {\nu_ {i} \in \mathbb {M}} \mathbb {E} \left[ \sum_ {t \in [ H ]} \max _ {k \in [ K ]} x _ {t} ^ {\top} \theta_ {i k} - r _ {t} \right] \tag {1} +$$ + +where the contexts $x_{1},\ldots x_{H}$ are sampled independently from the fixed distribution $\mathcal{P}$ and $r_t\sim \nu_i(x_t,k_t)$ being $k_{t}\sim \pi (x_{t})$ the arm pulled by the agent. + +In this paper, we consider a meta learning variation (e.g., Cella et al. 2020; Kveton et al. 2020) of the common bandit setup described above. The learning setting (Figure 2) is composed of two separate and consecutive stages, which we call meta training and test, respectively. + +Meta training. In the first stage, the agent can interact offline with the set of bandits $\mathbb{M}$ . Differently from a pure exploration setup (Audibert & Bubeck, 2010), here we interact with a set of bandits instead of a single one. We are not just interested in discovering an optimal policy for each bandit, but also to devise an exploration plan, which we denote as $\mathrm{Plan}(\mathbb{M})$ , that we can transfer to the test phase to minimize the regret. Since the meta training itself happens entirely offline, no regret is incurred at this stage. In practice, this is reasonable when working with a simulator or previously collected data, such as an historical record of treatments administered to patients. However, we may operate under resource constraints, so that it is important to investigate the sample and computational complexity of meta training. + +Test. In the second stage, the agent faces a single and unknown bandit task $\nu_{i} \in \mathbb{M}$ , which we call the test task, with the goal of minimizing the regret (1). This matches the stochastic bandit setting exactly, except that the learning algorithm takes decisions according to the exploration plan devised during meta training, i.e., $k_{t} \sim \mathrm{Plan}(\mathbb{M})$ . Whereas the plan is fixed a priori, it is still adaptive, as it conditions the decisions with the history of interactions in the test task. For instance, the plan can be a strategy to administer treatments to a patient informed by historical data. + +What are the theoretical barriers for the described problem of meta learning bandits? A natural question is whether the meta training can benefit the test regret in a substantial way. Perhaps unsurprisingly, without any assumption on how + +the collection of bandits $\mathbb{M}$ is constructed, the meta learning problem is not easier than the classical stochastic bandit. + +Theorem 2.1 (Lai & Robbins 1985). Let $\mathbb{M}$ a set of $M\geq 2$ bandits and let $\mathcal{X} = \{x\}$ be a singleton. The test regret is $\mathrm{Reg}_H(\mathbb{M}) = \Omega (\sqrt{MH})$ + +The latter can be proved through a hard instance in which the two bandits are identical except for a pair of arms whose mean reward differ for a small quantity depending on $H$ . In many scenarios, those instances have limited interest, as we may model the pair of bandits with a single task, at the cost of a (bounded) sub-optimality. Similarly to previous meta learning settings (Chen et al., 2022b; Mutti & Tamar, 2024), we consider a separation assumption built on this premise. + +Assumption 1. For all $i \neq j \in [M]$ and a policy class $\Pi$ , there exists at least one policy $\pi \in \Pi$ , s.t. $D_H(\mathbb{P}_i^\pi, \mathbb{P}_j^\pi) \geq \lambda$ , where $D_H$ is the Hellinger distance and $\mathbb{P}_i^\pi, \mathbb{P}_j^\pi$ are the joint context-arm-reward distributions induced by $\pi$ in $\nu_i, \nu_j$ . + +The separation guarantees that the bandits in the collection are meaningfully different, such as assuming that different patient groups respond differently to at least one treatment. + +We have now a formal picture of the setting we consider: Meta learning bandits under separation. Before going ahead with the investigation of the setting, we introduce additional notation for later use. + +Notation. We will consider a fixed context distribution $\mathcal{P}$ for both meta training and test stages. For a random variable $A$ and event $\mathcal{E}$ , we use $\mathbb{E}_{\mathcal{P}}[A], \mathbb{P}_{\mathcal{P}}[\mathcal{E}]$ as shortcuts for $\int_{x \in \mathcal{X}} \mathcal{P}(x) \mathbb{E}[A|x] dx$ and $\int_{x \in \mathcal{X}} \mathcal{P}(x) \mathbb{P}(\mathcal{E}|x) dx$ respectively. For any finite set $S$ , we denote $2^S$ the powerset of $S$ . For any two probability distributions $p, q$ over some measurable space $\mathcal{X}$ , let $D_{\mathbb{H}}(p, q) := \int_{x \in \mathcal{X}} \left( \sqrt{p(x)} - \sqrt{q(x)} \right)^2 dx$ be the Hellinger distance between them. For every $\nu_i \in \mathbb{M}$ , we denote $\mu_{ik} = \mathbb{E}_{\mathcal{P}}[x^\top \theta_{ik}]$ the mean of $r \sim \nu_i(x, k)$ for $x \sim \mathcal{P}$ . We further assume $x^\top \theta_{ik} \in [0,1]$ and both $\| x \|_1, \| \theta_{ik} \|_1$ to be bounded. We denote as $\Pi$ the space of policies and the optimal policy $\pi_i^*(x) := \arg \max_{\pi \in \Pi} x^\top \theta_{i\pi(x)}$ , playing the arm $k_i^* \in \arg \max_{k \in [K]} x^\top \theta_{ik}$ with the optimal mean reward for any $x \in \mathcal{X}$ . For a bandit $\nu_i \in \mathbb{M}$ and policy $\pi \in \Pi$ , we denote $\mathbb{P}_i^\pi$ the joint distribution of context-arm-rewards. The action gap of bandit $\nu_i$ and context $x$ is denoted $\Delta_i(x, k) := x^\top \theta_{ik^*} - x^\top \theta_{ik}$ and we define $\Delta := \min_{i \in [M], x \in \mathcal{X}, k \in [K]} \Delta_i(x, k)$ . + +constructions for stochastic bandits. See the one in Chapter 15 of Lattimore & Szepesvári (2020) for a gentle introduction. + +Note that, whenever the context vector is the zero vector, the gap $\Delta_{i}$ collapses to zero for every $i$ . We assume that the space of contexts $\mathcal{X}$ is designed properly, so that it does not include such dummy context vectors. + +# 3. Meta learning bandits with classification + +In this section, we present a framework to study meta learning bandits under separation through the lenses of multiclass classification. First, we analyze the regret of a strategy, i.e., an exploration plan $\mathsf{Plan}(\mathbb{M})$ , based on classifying the test task to then exploit the optimal policy of the classified task. Then, we show that classifying the test is necessary for regret minimization under separation. As we shall see, the two results are brought together by a novel measure of complexity, which we call the classification-coefficient. + +For the ease of presentation, we assume to know the true distributions of all bandits $\nu_{i}\in \mathbb{M}$ , and we leave the study of misspecifications to later sections. We consider classification algorithms in the following interaction protocol: + +1. Start with $t = 0$ and an initial hypothesis class $S_0 = \{1,2,\dots,M\}$ . +2. Terminate if $|S_{t}| = 1$ . Otherwise, decide on a classification test $\pi_t \in \Pi_{\mathcal{C}}$ (either deterministically or randomly) from the set of tests $\Pi_{\mathcal{C}}$ , and draw $N_{\mathrm{cls}} = \tilde{O}(\lambda^{-2})$ samples with $\pi_t$ . +3. Update the hypothesis class $S_{t + 1}$ with the generated samples. $t \gets t + 1$ and go to Step 2. + +The complexity of classification depends on how many hypotheses we can rule out from a test $\pi_t$ from the remaining hypotheses each round. As we are allowed to use $\tilde{O} (\lambda^{-2})$ samples, we can at least rule out $\lambda$ -separated hypotheses from the underlying instance. Specifically, given the remaining hypothesis class $S_{t}\in 2^{[M]}$ and the underlying instance $i$ , we can remove $\bar{S}_{t,\lambda}^{\pi}(i)\coloneqq \{m\in S_t|D_{\mathrm{H}}(\mathbb{P}_i^\pi ,\mathbb{P}_m^\pi)\geq \lambda \}$ through hypothesis testing (e.g., using likelihood ratio test). + +To formalize the concept, we define the deterministic classification-coefficient: + +$$ +C _ {\lambda} \left(\Pi_ {\mathcal {C}}\right) := \max _ {S \in 2 ^ {[ M ]}, | S | > 1} \min _ {\pi \in \Pi_ {\mathcal {C}}} \max _ {i \in S} \frac {| S |}{| \bar {S} _ {\lambda} ^ {\pi} (i) |}, \tag {2} +$$ + +and the randomized classification-coefficient: + +$$ +\widetilde {C} _ {\lambda} \left(\Pi_ {\mathcal {C}}\right) := \max _ {S \in 2 ^ {[ M ]}, | S | > 1} \min _ {p \in \Delta \left(\Pi_ {\mathcal {C}}\right)} \max _ {i \in S} \frac {| S |}{\mathbb {E} _ {\pi \sim p} \left[ \left| \bar {S} _ {\lambda} ^ {\pi} (i) \right| \right]}, \tag {3} +$$ + +In essence, these coefficients measure the classification complexity of a class of bandits through the pessimistic rounds of classification, where $S$ is the worst-case remaining hypotheses when the test task is $i$ , and $\pi, p$ are the optimal deterministic and randomized greedy strategies, respectively. The latter take the test (resp. distribution over tests) inducing the most even split (resp. expected split) of the remaining hypotheses $S$ . Interestingly, we can derive an upper bound on the size of the split when employing the deterministic greedy strategy + +$$ +\mathbb {E} \left[ \frac {| S _ {t + 1} |}{| S _ {t} |} \Big | S _ {t} \right] \leq 1 - \frac {1}{2} C _ {\lambda} (\Pi_ {\mathcal {C}}) ^ {- 1}. +$$ + +Algorithm 1 Explicit Classify then Exploit +1: input set of tasks $\mathbb{M}$ , $N_{\mathrm{cls}}$ +2: Initialize $S_0 = [M]$ , $t = 0$ Explicit Classify +3: while $|S_t| > 1$ do +4: $\pi_t = \max_{\pi \in \Pi_C} \min_{i \in S_t} |\bar{S}_{t,\lambda}^\pi(i)|$ +5: $\mathcal{D}_t \gets N_{\mathrm{cls}}$ i.i.d. samples drawn with $\pi_t$ +6: Get $S_{t+1}$ with Algorithm 2 +7: $t \gets t + 1$ +8: end while +9: Extract the classified task $m^* \in S_t$ and execute $\pi^*(x) = \arg \max_{\pi \in \Pi} \nu_{m^*}(x, k)$ for the remaining steps Exploit + +Algorithm 2 Update Remaining Hypotheses +1: input set of tasks $S_{t}$ test $\pi_t$ samples $\mathcal{D}_t$ +2: Let $\ell_i = \sum_{(x,r)\in \mathcal{D}_t}\log (\mathbb{P}_i^{\pi_t}(x,r))$ for all $i\in S_t$ +3: Let $\hat{m} = \arg \max_{i\in S_t}\ell_i$ +4: return $S_{t + 1}\gets \{i\in S_t|\ell_i\geq \ell_{\hat{m}} - 3\log (M / \delta)\}$ + +Clearly, the smaller the classification-coefficients, the more hypothesis we can rule out in a single round, the easier it is to classify the test task. In the following result, we formally link the complexity of classification with the regret. + +To this end, we consider a simple algorithm, called Explicit Classify then Exploit (ECE, Algorithm 1), which is based on the classification protocol described above to classify the test task (lines 2-8), then deploying the optimal policy for the classified task (line 9). We can prove the following. + +Theorem 3.1. Suppose Assumption 1 holds with a test class $\Pi_{\mathcal{C}}$ and a family of $M$ bandit instances $\mathbb{M}$ . Then with probability at least $1 - \delta$ , the while-loop in Algorithm 1 ends after $T$ rounds with $N_{\mathrm{cls}}$ samples per round where + +$$ +T = \mathcal {O} \left(C _ {\lambda} \left(\Pi_ {\mathcal {C}}\right) \log (M / \delta)\right), +$$ + +$$ +N _ {\mathrm {c l s}} = \mathcal {O} \left(\log (M / \delta) / \lambda^ {2}\right). \tag {4} +$$ + +Consequently, the expected test regret of Algorithm 1 for $H$ steps is + +$$ +\mathrm {R e g} _ {H} (\mathbb {M}) \leq \mathcal {O} \left(\frac {C _ {\lambda} (\Pi_ {\mathcal {C}}) \log^ {2} (M / \delta)}{\lambda^ {2}}\right) + \delta H. +$$ + +The theorem states that we can identify the test task w.h.p. taking $N_{\mathrm{cls}}T = O(\lambda^{-2}\cdot C_{\lambda}(\Pi_{\mathcal{C}})\log^{2}(M / \delta))$ samples. We can translate the latter into a regret rate by bounding the regret caused by classification failure with $\delta H$ . We can set $\delta = o(1 / H)$ to make the classification failure negligible, settling the regret $O(\lambda^{-2}C_{\lambda}(\Pi_{\mathcal{C}})\log^{2}(MH))$ . Next, we show that the latter rate is nearly optimal by developing a lower bound to the regret for bandits under separation. + +# 3.1. Necessity of classification with separation + +While the ECE approach may not always be the best algorithm to minimize regret, it is a near-optimal solution whenever the optimal actions and the separating actions do not overlap. To see this, suppose a family of $M$ multi-armed bandit instances $\mathbb{M}$ with arbitrarily many $K$ arms. Each $i^{th}$ instance has its unique optimal arm $k_{i}^{*}$ , but only with margin $O(\epsilon)$ , i.e., instances are not well-separated with respect to optimal arms. In such scenarios, it is always better to first identify the task with $\lambda$ -separating arms. + +To formalize the fundamental link between regret and classification, for the remainder of the section we are going to consider a class of worst-case multi-armed bandit instances $\mathbb{M}$ , which we refer as hard, defined as follows: + +1. For each bandit instance $i \in [M]$ , there is a unique optimal arm $k_{i}^{*} \in [K]$ such that + +$$ +\mu_ {i} \left(k _ {i} ^ {*}\right) = \frac {3}{4} + 1 0 \epsilon , \mu_ {j} \left(k _ {i} ^ {*}\right) = \frac {3}{4}, \forall j \neq i. +$$ + +2. All other arms $k \in [K] / \{k_i^*\}_{i \in [M]}$ are information-revealing, i.e., either one of the following holds: + +$$ +\mu_ {i} (k) = \frac {1 + \lambda}{2} \text {o r} \mu_ {i} (k) = \frac {1 - \lambda}{2}, \forall i \in [ M ], +$$ + +where $\epsilon, \lambda$ satisfy $1 > \lambda^2 > c_{\lambda} \epsilon \cdot \widetilde{C}(\mathbb{M})$ for some sufficiently large absolute constant $c_{\lambda} > 0$ and the randomized classification-coefficient $\widetilde{C}(\mathbb{M})$ (defined below). + +Classification complexity. Let $C^*(\mathbb{M})$ be the optimal depth of a deterministic decision tree classifier for the hard instance, constructed by probing the true means of separating arms $\mathcal{A}_{\lambda} \coloneqq [K] / \{k_i^*\}_{i \in [M]}$ . Let $\widetilde{C}^*(\mathbb{M})$ be the optimal average depth of randomized decision trees. In this case, the classification-coefficient in (2) can be defined as $C(\mathbb{M}) \coloneqq C_{\lambda}(\mathcal{A}_{\lambda})$ , and similarly for the randomized classification-coefficient $\widetilde{C}(\mathbb{M}) \coloneqq \widetilde{C}_{\lambda}(\mathcal{A}_{\lambda})$ . Note that the classification-coefficients defined previously are concerned with the (worst-case) most even split on the hypotheses $S_t$ , and thus they can be interpreted as measures for greedy classification strategies. The following is a well-known relationship between these greedy measures and the optimal depth of (deterministic) decision trees (Arkin et al., 1993) + +$$ +\widetilde {C} (\mathbb {M}) \leq C (\mathbb {M}) \leq C ^ {*} (\mathbb {M}) \leq C (\mathbb {M}) \log (M). \tag {5} +$$ + +We note that these classification complexities can be as large as $M$ in the worst case, while in practical scenarios we can often design effective information-revealing actions to ensure $C^* (\mathbb{M}) = O(\log M)$ . + +Statistical barriers of separated bandits. What is the lower bound to the test regret for $\mathbb{M}$ ? To quantify this, + +we recall a PAC-variant of DEC from (Chen et al., 2022a). Specifically, given some $\gamma > 0$ , we define the coefficient + +$$ +\begin{array}{l} \operatorname{dec}_{\gamma}(\mathbb{M}):= \max_{\omega \in \Delta ([M])}\min_{\pi \in \Delta ([K])}\max_{i\in [M]} \\ \mathbb {E} _ {k \sim \pi} [ \Delta_ {i} (k) ] - \gamma \mathbb {E} _ {k \sim \pi , m \sim \omega} \left[ D _ {\mathrm {H}} ^ {2} \left(\nu_ {i} (k), \nu_ {m} (k)\right) \right], \tag {6} \\ \end{array} +$$ + +where $\Delta_i(k) \coloneqq \mu_i(k_i^*) - \mu_i(k)$ . We can verify the following relation between $\gamma$ and $\operatorname{dec}_{\gamma}$ : + +Lemma 3.2. There exists an absolute constant $c_{\gamma} > 0$ such that for all $\gamma \leq c_{\gamma}\lambda^{-2}\widetilde{C} (\mathbb{M})$ , we have $\operatorname{de}c_{\gamma}(\mathbb{M}) > 3\epsilon$ . + +As a corollary of (Chen et al., 2022a, Theorem 10), this implies the lower bound on the high probability regret: + +Theorem 3.3. There exists an absolute constant $c > 0$ such that if $1 / H < c\epsilon$ , then any algorithm must suffer regret $\Omega(\min(\epsilon H, c_{\gamma} \lambda^{-2} \widetilde{C}(\mathbb{M}))$ with probability at least $1 / H$ . + +Thus, any algorithm guarantees with probability at least $1 - 1 / H$ must suffer at least $\Omega (\widetilde{C} (\mathbb{M})\lambda^{-2})$ test regret, capturing the fundamental limits of separated bandits. Note that the lower bound depends on the randomized classification-coefficient, though deterministic strategies can still be preferred due to their simplicity in practice. + +# 4. A more practical ECE algorithm + +In the previous section, we analyzed the ECE algorithm in an ideal setting in which the reward distributions of all the bandits in $\mathbb{M}$ and the context distribution $\mathcal{P}$ are fully known. Here, we present a more practical variation of the algorithm, Decision Tree ECE (DT-ECE), which (i) is robust to misspecifications of $\mathbb{M}$ caused by estimation errors at meta training, (ii) only accesses samples coming from the context distribution $\mathcal{P}$ , (iii) lays down a fully interpretable exploration plan through a decision tree classifier. + +In this section, we work under a special case of the separation condition (Ass. 1) which assumes separation on the mean of the rewards instead of their distribution. + +Assumption 2. For some $\lambda >0$ and every $\nu_{i},\nu_{j}\in \mathbb{M},$ there exists $k\in [K]$ such that $|\mathbb{E}_{x\sim \mathcal{P}}[x^{\top}(\theta_{ik} - \theta_{jk})]| > \lambda .$ + +First, we describe the meta training stage with the corresponding estimation guarantees, sample and computational complexity (Section 4.1). Then, we present the DT-ECE test algorithm and we analyze its regret (Section 4.2). + +# 4.1. Meta training + +In this section, we describe a provably efficient algorithm to meta train an exploration plan $\mathbf{Plan}(\mathbb{M})$ by only accessing offline simulators of the tasks in $\mathbb{M}$ and samples from $\mathcal{P}$ .6 + +Algorithm 3 Meta Training +1: input simulators $\mathbb{M}, N_{\mathrm{est}}$ +2: Initialize $\hat{\mathbb{M}} = \emptyset$ +3: for $i \in [M]$ do +4: for $k \in [K]$ do +5: Sample $N_{\mathrm{est}}$ contexts $X = (x_n \sim \mathcal{P})$ +6: Sample $N_{\mathrm{est}}$ rewards $\boldsymbol{r} = (r_n \sim \nu_i(x_n, k))$ +7: Compute $\hat{\theta}_{ik} = (XX^{\top})^{-1}Xr$ +8: Compute $\hat{\mu}_{ik} = \frac{1}{N_{\mathrm{est}}} \sum_{n} r_n$ +9: end for +10: $\hat{\mathbb{M}}.\text{append}(\hat{\nu}_i = ([\hat{\theta}_{i1}, \hat{\mu}_{i1}], \dots [\hat{\theta}_{iK}, \hat{\mu}_{iK}]))$ +11: end for +12: Build a decision tree classifier tree(M) with Algorithm 4 +13: output exploration plan Plan(M) prescribed by tree(M) + +The meta training algorithm, whose pseudocode is in Algorithm 3, has two main procedures. First, it estimates the parameters of each task $\nu_{i}$ by doing regression on the class of linear functions of the context (lines 2-11). Second, it takes the (possibly misspecified) resulting class $\hat{\mathbb{M}}$ to build a deterministic decision tree classification model over the tasks (line 12). The following lemma provides an estimation guarantee over $\hat{\mathbb{M}}$ from the analysis of random design linear regression (Hsu et al., 2011). + +Lemma 4.1. Let $\mathbb{M}$ be a set of $M$ linear contextual bandits and let $\tilde{\mathbb{M}}$ their estimation obtained by Algorithm 3 with + +$$ +N _ {\mathrm {e s t}} = \frac {1 6 0 \sigma^ {2} d \log (4 H M K)}{\min (\Delta^ {2} , \lambda^ {2})}. +$$ + +For every bandit $i \in [M]$ and arm $k \in [K]$ , it holds + +$$ +\mathbb {P} \left(\mathbb {E} _ {\mathcal {P}} \left[ | x ^ {\top} \hat {\theta} _ {i k} - x ^ {\top} \theta_ {i k} | \right] > \min \left(\frac {\Delta}{2}, \frac {\lambda}{4}\right)\right) \leq \frac {1}{2 H M K}. +$$ + +The latter guarantees that the identity of the optimal arm and the separation condition is preserved w.h.p. by the estimation process. As we shall see, these properties will prove useful at test stage. Before going to that, it is worth detailing how the decision tree classifier is built (Algorithm 4). + +We consider a set of tests $\Pi_{\mathcal{C}}$ equal to the set of arms $[K]$ , for which we are going to test the mean reward $\hat{\mu}_k$ against a threshold $b \in [0,1]$ . Since computing the optimal test is NP-hard in general (Hyafil & Rivest, 1976), we turn to a greedy approximation which gives the test with the most even split (Arkin et al., 1993; Nowak, 2011). Algorithm 5 in Apx. C.1 gives a tractable procedure with which the greedy test can be computed. In order to make the tests along the tree statistically robust when computed with samples from the test task, we consider soft splits (Olaru & Wehenkel, 2003): We let the test $\hat{\mu}_k \leq b$ be simultaneously true and false inside a $\lambda$ -band around $b$ (see Figure 3). + +Algorithm 4 Decision Tree +1: input set of tasks $S$ +2: if $|S| > 1$ then +3: Compute $(\mu_k \leq b) \gets \text{greedy}(S)$ with Algorithm 5 +4: Define tree(S) := $(\mu_k \leq b)$ +5: Compute $S^{+} = \{\nu_i \in S \mid \mu_{ik} \leq b + \lambda/2\}$ +6: Compute $S^{-} = \{\nu_i \in S \mid \mu_{ik} > b - \lambda/2\}$ +7: Define tree(S, true) := $S^{+}$ and tree(S, false) := $S^{-}$ +8: Call Algorithm 4 on $S^{+}$ and $S^{-}$ recursively +9: end if + +![](images/e226856a7e8054cb9572b2b3ea66f87dc34b9be0a01c91b5049e0c0ac6eb0b53.jpg) +Figure 3: Visualization of a generic split of tree(M). + +The meta training algorithm that we just described is fully tractable, both in terms of computational resources and sample complexity, as proved by the result below. + +Theorem 4.2. Algorithm 3 runs in time $\mathcal{O}(d^3 M^3 K / \lambda^4)$ and collects a total number of samples + +$$ +\frac {1 6 0 \sigma^ {2} M K d \log (4 T M K)}{\min (\Delta^ {2} , \lambda^ {2})}. +$$ + +Finally, we can provide a guarantee on the cost of the greedy approximation with respect to the depth of the optimal deterministic decision tree on $\hat{\mathbb{M}}$ , i.e., $C_{\lambda}^{*}(\hat{\mathbb{M}})$ . + +Lemma 4.3. Algorithm 4 builds a decision tree with depth $D = \mathcal{O}(\log M + 1)C_{\lambda}^{*}(\hat{\mathbb{M}})$ . + +# 4.2. Test + +Here we analyze the test algorithm implementing the exploration plan $\mathbf{Plan}(\hat{\mathbb{M}})$ prescribed by the decision tree classifier tree $(\hat{\mathbb{M}})$ , which we call DT-ECE. As said above, this test algorithm is a slight variation of ECE (Algorithm 1) and mostly follow similar steps. Here we comment on the differences and we leave a complete pseudocode to Apx. C.2. + +Without turning to the appendix, we can look at the pseudocode in Algorithm 1 and picture that, at line 4, DT-ECE would extract a test $\mu_k \leq b$ from $\operatorname{tree}(S_t)$ on the current hypotheses $S_t$ , collecting data like in line 5 with the policy $\pi_t = k$ prescribed by the test. Then, instead of updating the remaining hypotheses $S_{t+1}$ with log likelihood tests (line 6), it takes $S_{t+1}$ by following the left or right split in the tree according to whether the test resulted true or false, respectively. Those changes lead to the following regret. + +Theorem 4.4. Suppose Assumption 2 holds on a set of tasks $\mathbb{M}$ and let tree $(\hat{\mathbb{M}})$ be obtained from Algorithm 3. The expected test regret of DT-ECE (Algorithm 6) for $H$ steps is + +$$ +\operatorname {R e g} _ {H} (\mathbb {M}) = \mathcal {O} \left(\frac {C _ {\lambda} ^ {*} (\mathbb {M}) \log^ {2} (C _ {\lambda} ^ {*} (\mathbb {M}) M H)}{\lambda^ {2}}\right) +$$ + +The result above shows that DT-ECE matches the regret of ECE with a factor $C_{\lambda}^{*}(\mathbb{M})$ in place of the classification-coefficient $C_{\lambda}(\mathbb{M})$ . This implies an additional $\log (M)$ factor at most (see 5). This means the estimation error does not significantly affect the regret, thanks to the guarantee in Lemma 4.1. Finally, the regret holds in a contextual bandit setting, but does not depend on the size of the context $d$ , which only impacts the meta training complexity. + +# 5. Experiments + +In this section, we provide a brief numerical validation to illustrate how the above theoretical analysis on the classification view of meta learning bandits translates to compelling empirical results, which we compare with previous methods in the literature of latent bandits (Hong et al., 2020a).7 + +To the purpose of the experiments, we consider a noncontextual stochastic MAB setting in which the collection of bandits is fully known, without covering class misspecifications. We design two family of collections, one inspired by the hard instance presented in Section 3.1, which we henceforth call hard, and one randomly generated collection, which we call rand. For the former, we consider two instances with size $M = 5$ and arms $K = 10$ , with varying values of the separation parameters $\lambda$ (0.4 and 0.04 respectively). For the latter, we consider a small instance $M = 10$ , $K = 20$ and a large instance $M = 40$ , $K = 40$ . We use rejection sampling to control $\lambda$ (set to 0.4) in the randomly generated collection. In all the considered instances, the reward distributions are Bernoulli. + +We compare the regret suffered by our decision tree implementation of the Explicit Classify then Exploit routine (DT- ECE, described in Section 4 and Algorithm 6 of Apx. C.2) with traditional bandit approaches, i.e., mUCB (Azar et al., 2013) and mTS (Hong et al., 2020a). The latter algorithms adapt UCB and Thompson sampling to the meta/latent bandits setting. While they are not designed to take advantage of separation specifically, they exploit knowledge of the collection of bandits and they constitute relatively strong baselines. Before going ahead with the experimental results, it is worth spending a few words on how the spirit of our algorithm differs to theirs. DT-ECE is designed to produce easy-to-interpret exploration plans, which can be entirely pre-computed offline. Instead, the exploration prescribed + +by mUCB and mTS is hardly interpretable nor predictable, making them and DT-ECE orthogonal solutions for different applications rather than direct challengers. It is satisfying, however, to see that DT-ECE performance is on par with such renowned algorithms. + +In Figure 4 (a, b) we see that DT-ECE achieves a small regret by classifying the test task in a handful of interactions (coarsely, the classification occurs at the elbow of the curves) both when separation is large (a) or small (b). DT-ECE is able to commit to the optimal strategy even before mTS, whose posterior takes slightly longer to converge around the test task, although DT-ECE suffers larger regret due to pure exploration. The most important trait of the hard instance is that optimal actions and informative actions do not overlap, so that optimistic strategy like mUCB are bound to fail. By mostly pulling nearly optimal yet non-informative actions, mUCB cannot identify the test task efficiently, and the regret grows steady. Optimism works considerably better in the rand family (Figure 4 c, d), although mUCB does not match the efficiency of DT-ECE and mTS in those experiments either. It is remarkable that DT-ECE can classify the test task into a set of 40, with 40 arms each, by taking less than 1000 samples on average (d). + +Finally, DT-ECE comes with sharp theoretical guarantees and it is designed for the worst case, which can limit the performance of the algorithm in more forgiving instances (such as the rand family). However, the design of a fully practical version of the ECE ideas is beyond the scope of this paper and constitute interesting matter for future studies. + +# 6. Related work + +To the best of our knowledge, our classification view of meta learning bandits under separation is original and has not been studied. There are anyway several connections between our results and the literature, which we revise below. + +Contextual bandits. Obviously, our setting relates to contextual bandits (Wang et al., 2005; Li et al., 2010; Abbasi-Yadkori et al., 2011; Hao et al., 2020) and, indeed, our results hold for the contextual setting. The contextual nature of individual tasks is an orthogonal dimension w.r.t. a second, unobserved context typical of meta learning settings: The task description itself. + +Latent bandits. The setting that most closely relates to ours is latent bandits (Azar et al., 2013; Maillard & Mannor, 2014; Zhou & Brunskill, 2016; Hong et al., 2020a;b; Pal et al., 2023). Actually, our setting can be seen as a particular instance of latent bandits under separation and a meta learning protocol. Azar et al. (2013); Maillard & Mannor (2014) also consider bandit tasks coming from a finite and known set, with or without misspecification. They do not consider separation, which allows to specialize the regret + +![](images/fde99617f0898575a5cfa590c87f876799a6602708376e1bb9f1e178c2f1d86f.jpg) +(a) hard-5-10 $\lambda = 0.4$ + +![](images/2e655e0193fc66fd6a37dad5172134b31e5c686824f336d7c8cfb5d93100229a.jpg) +(b) hard-5-10 $\lambda = 0.04$ +Figure 4: Regret of DT-ECE (ours), mUCB (Azar et al., 2013), mTS (Hong et al., 2020a). Captions report envname-M-K, denoting the name of the collection of bandits, the size of the collection, and the number of arms, respectively, together with the value of the separation parameter $\lambda$ . The curves average 20 independent runs, shaded regions are $95\%$ c.i. + +![](images/b5c24777d8ad625ff9b6e7df11f20b1fb6ab22d2c27d8eed2107f94ec32d2dc0.jpg) +(c) rand-10-20 $\lambda = 0.4$ + +![](images/59e9255567a45eb2439711a4d05d9d770cd006ca9ef544a918b7b473bdbcfa7e.jpg) +(d) rand-40-40 $\lambda = 0.4$ + +from $\mathcal{O}(\sqrt{H})$ to $\mathcal{O}(\log H)$ . Similarly to ours, the setting in (Zhou & Brunskill, 2016) includes a phase in which the models are learned from data and then exploited on future tasks. In their formulation, however, the tasks are coming into a sequence online, so that the meta learning itself adds to the regret instead of being carried out offline. An offline learning phase is considered by Hong et al. (2020a) in a problem formulation that almost perfectly matches ours, yet leads to mostly orthogonal results: They do not consider separation; Their analysis is not instance-dependent and does not tie the regret to the classification complexity of the instance; They consider traditional UCB/TS-style algorithms in place of our ECE; They do not detail the meta training algorithm. Most importantly, our classification view is original in the latent bandits literature and constitutes the main novelty of our work. + +Low-rank bandits. Low-rank bandits (Kveton et al., 2017; Lale et al., 2019; Lu et al., 2021) essentially generalize the latent bandits formulation (and ours) by assuming the existence of a low-rank latent representation conditioning the arms payoffs. Just like in latent bandits, previous works do not touch on the connection between classification and regret, which may be generalized to low-rank bandits. + +Structured bandits. In structured bandits (Lattimore & Munos, 2014; Combes et al., 2017; Tirinzoni et al., 2020) the rewards of the arms are correlated according to a known structure class with hidden parameters. These parameters have some similarity of the hidden task context of our setting (and latent bandits). Our results connecting classification and regret may be generalized to structured bandits. + +Thompson sampling. Extensive work has been done over exploiting prior knowledge in bandits through Bayesian approaches. The most notable is Thompson sampling (Thompson, 1933; Kaufmann et al., 2012; Agrawal & Goyal, 2012; Russo & Van Roy, 2016), in which knowledge over the test task is incorporated into a prior. The set of tasks of our setting can be seen as a prior, although our results are in a frequentist setting. As such, they are independent from the prior distribution and robust to misspecifications, differently + +from Thompson sampling (Simchowitz et al., 2021). + +Meta learning bandits. Meta learning bandits has been considered in (Kveton et al., 2021; Hong et al., 2022b;a) where tasks are assumed to come from an unknown prior. The agent aims to infer the prior from interaction, assuming it is itself coming from a known hyper-prior. This can be seen as a Bayesian version of our setting, where the hyper-prior stands for the set of tasks, and the priors play the role of the tasks. Related to this stream, other works (Cella et al., 2020; Basu et al., 2021) have considered meta learning a prior over tasks for regret minimization. + +# 7. Conclusion + +In this paper, we took an original classification view on the problem of meta learning bandits under separation. Thanks to this novel approach, our work delivers on its promise of providing principled algorithms for learning interpretable and efficient exploration plans from offline data, just like they were designed by humans. As a by product to this effort, we contribute an elegant framework to study the regret of learning algorithms through the complexity of classifying the task online within a set of previously seen tasks. + +We believe the significance of our findings are hardly limited to the considered contextual multi-armed bandits, and that they may inspire future works targeting yet more general problem settings (and corresponding applications) by following our blueprint for meta learning with classification. + +A natural next step is to introduce dynamics over contexts to extend the framework to full-fledged Markov Decision Processes (MDPs) and reinforcement learning, where we would consider a test MDP coming from a collection of MDPs, known a priori or accessed offline. A framework of similar kind has been introduced under the name of contextual MDPs (Hallak et al., 2015) and latent MDPs (Kwon et al., 2021b;a; 2023b;a; 2024). Previous works have also studied meta learning policies for efficient exploration in MDPs and their regret (Chen et al., 2022b; Ye et al., 2023; Mutti & Tamar, 2024). None of the above has considered + +our classification view of the problem to get efficient and interpretable exploration plans. In the MDP setting, our decision tree classifier resembles a hierarchical strategy deploying policies, or options (Sutton et al., 1999), to probe information-revealing states of the environment. Can these policies be learned with a tractable offline algorithm? Would the exploration plan enjoy similar regret guarantees beyond the contextual MAB setting? This is an exciting direction with the potential to open the door to countless applications, such as autonomous driving, robotics, and many others. + +# Acknowledgements + +This research was partly funded by the European Union (ERC, Bayes-RL, 101041250). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency (ERCEA). Neither the European Union nor the granting authority can be held responsible for them. + +# Impact statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# References + +Abbasi-Yadkori, Y., Pál, D., and Szepesvári, C. Improved algorithms for linear stochastic bandits. In Advances in Neural Information Processing Systems, 2011. +Agarwal, A., Kakade, S., Krishnamurthy, A., and Sun, W. FLAMBE: Structural complexity and representation learning of low rank MDPs. In Advances in Neural Information Processing Systems, 2020. +Agrawal, S. and Goyal, N. Analysis of Thompson sampling for the multi-armed bandit problem. In Conference on Learning Theory, 2012. +Arkin, E. M., Meijer, H., Mitchell, J. S., Rappaport, D., and Skiena, S. S. Decision trees for geometric models. In Annual Symposium on Computational Geometry, 1993. +Audibert, J.-Y. and Bubeck, S. Best arm identification in multi-armed bandits. In Conference on Learning Theory, 2010. +Auer, P., Cesa-Bianchi, N., and Fischer, P. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47:235-256, 2002. +Azar, M. G., Lazaric, A., and Brunskill, E. Sequential transfer in multi-armed bandit with finite set of models. + +In Advances in Neural Information Processing Systems, 2013. +Basu, S., Kveton, B., Zaheer, M., and Szepesvári, C. No regrets for learning the prior in bandits. In Advances in Neural Information Processing Systems, 2021. +Berry, D. A. Modified two-armed bandit strategies for certain clinical trials. Journal of the American Statistical Association, 73(362):339-345, 1978. +Bressan, M., Cesa-Bianchi, N., Esposito, E., Mansour, Y., Moran, S., and Thiessen, M. A theory of interpretable approximations. arXiv preprint arXiv:2406.10529, 2024. +Cella, L., Lazaric, A., and Pontil, M. Meta-learning with stochastic linear bandits. In International Conference on Machine Learning, 2020. +Chen, F., Mei, S., and Bai, Y. Unified algorithms for rl with decision-estimation coefficients: No-regret, pac, and reward-free learning. arXiv preprint arXiv:2209.11745, 2022a. +Chen, X., Hu, J., Jin, C., Li, L., and Wang, L. Understanding domain randomization for sim-to-real transfer. In International Conference on Learning Representations, 2022b. +Combes, R., Magureanu, S., and Proutiere, A. Minimal exploration in structured stochastic bandits. In Advances in Neural Information Processing Systems, 2017. +Foster, D. J., Kakade, S. M., Qian, J., and Rakhlin, A. The statistical complexity of interactive decision making. arXiv preprint arXiv:2112.13487, 2021. +GIf, A. Global strategy for asthma management and prevention. Global Initiative for Asthma, 2023. URL https://ginasthma.org/wp-content/uploads/2023/07/GINA-2023-Full-report-23_07_06-WMS.pdf. +Hallak, A., Di Castro, D., and Mannor, S. Contextual markov decision processes. arXiv preprint arXiv:1502.02259, 2015. +Hao, B., Lattimore, T., and Szepesvari, C. Adaptive exploration in linear contextual bandit. In International Conference on Artificial Intelligence and Statistics, 2020. +Hong, J., Kveton, B., Zaheer, M., Chow, Y., Ahmed, A., and Boutilier, C. Latent bandits revisited. In Advances in Neural Information Processing Systems, 2020a. +Hong, J., Kveton, B., Zaheer, M., Chow, Y., Ahmed, A., Ghavamzadeh, M., and Boutilier, C. Non-stationary latent bandits. arXiv preprint arXiv:2012.00386, 2020b. + +Hong, J., Kveton, B., Katariya, S., Zaheer, M., and Ghavamzadeh, M. Deep hierarchy in bandits. In International Conference on Machine Learning, 2022a. +Hong, J., Kveton, B., Zaheer, M., and Ghavamzadeh, M. Hierarchical bayesian bandits. In International Conference on Artificial Intelligence and Statistics, 2022b. +Hsu, D., Kakade, S. M., and Zhang, T. An analysis of random design linear regression. arXiv preprint arXiv:1106.2363, 2011. +Hyafil, L. and Rivest, R. L. Constructing optimal binary decision trees is np-complete. Information Processing Letters, 5(1):15-17, 1976. +Kaufmann, E., Korda, N., and Munos, R. Thompson sampling: An asymptotically optimal finite-time analysis. In Algorithmic Learning Theory, 2012. +Kveton, B., Szepesvári, C., Rao, A., Wen, Z., Abbasi-Yadkori, Y., and Muthukrishnan, S. Stochastic low-rank bandits. arXiv preprint arXiv:1712.04644, 2017. +Kveton, B., Mladenov, M., Hsu, C.-W., Zaheer, M., Szepesvari, C., and Boutilier, C. Meta-learning bandit policies by gradient ascent. arXiv preprint arXiv:2006.05094, 2020. +Kveton, B., Konobeev, M., Zaheer, M., Hsu, C.-w., Mladenov, M., Boutilier, C., and Szepesvari, C. Meta-thompson sampling. In International Conference on Machine Learning, 2021. +Kwon, J., Efroni, Y., Caramanis, C., and Mannor, S. Reinforcement learning in reward-mixing mdps. In Advances in Neural Information Processing Systems, 2021a. +Kwon, J., Efroni, Y., Caramanis, C., and Mannor, S. Rl for latent mdps: Regret guarantees and a lower bound. In Advances in Neural Information Processing Systems, 2021b. +Kwon, J., Efroni, Y., Caramenis, C., and Mannor, S. Reward-mixing mdps with few latent contexts are learnable. In International Conference on Machine Learning, 2023a. +Kwon, J., Efroni, Y., Mannor, S., and Caramanis, C. Prospective side information for latent mdps. arXiv preprint arXiv:2310.07596, 2023b. +Kwon, J., Mannor, S., Caramanis, C., and Efroni, Y. R1 in latent mdps is tractable: Online guarantees via off-policy evaluation. arXiv preprint arXiv:2406.01389, 2024. +Lai, T. L. and Robbins, H. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6(1): 4-22, 1985. + +Lale, S., Azizzadenesheli, K., Anandkumar, A., and Hassibi, B. Stochastic linear bandits with hidden low rank structure. arXiv preprint arXiv:1901.09490, 2019. +Lattimore, T. and Munos, R. Bounded regret for finite-armed structured bandits. In Advances in Neural Information Processing Systems, 2014. +Lattimore, T. and Szepesvári, C. Bandit algorithms. Cambridge University Press, 2020. +Li, L., Chu, W., Langford, J., and Schapire, R. E. A contextual-bandit approach to personalized news article recommendation. In International Conference on World Wide Web, 2010. +Liu, Q., Chung, A., Szepesvári, C., and Jin, C. When is partially observable reinforcement learning not scary? In Conference on Learning Theory, pp. 5175-5220. PMLR, 2022. +Lu, Y., Meisami, A., and Tewari, A. Low-rank generalized linear bandit problems. In International Conference on Artificial Intelligence and Statistics, 2021. +Maillard, O.-A. and Mannor, S. Latent bandits. In International Conference on Machine Learning, 2014. +Mutti, M. and Tamar, A. Test-time regret minimization in meta reinforcement learning. In International Conference on Machine Learning, 2024. +Nowak, R. D. The geometry of generalized binary search. IEEE Transactions on Information Theory, 57(12):7893-7906, 2011. +Olaru, C. and Wehenkel, L. A complete fuzzy decision tree technique. Fuzzy Sets and Systems, 138(2):221-254, 2003. +Pal, S., Suggala, A. S., Shanmugam, K., and Jain, P. Optimal algorithms for latent bandits with cluster structure. In International Conference on Artificial Intelligence and Statistics, 2023. +Rothschild, M. A two-armed bandit theory of market pricing. Journal of Economic Theory, 9(2):185-202, 1974. +Russo, D. and Van Roy, B. An information-theoretic analysis of thompson sampling. Journal of Machine Learning Research, 17(68):1-30, 2016. +Schwartz, E. M., Bradlow, E. T., and Fader, P. S. Customer acquisition via display advertising using multiarmed bandit experiments. Marketing Science, 36(4): 500-522, 2017. + +Simchowitz, M., Tosh, C., Krishnamurthy, A., Hsu, D. J., Lykouris, T., Dudik, M., and Schapire, R. E. Bayesian decision-making under misspecified priors with applications to meta-learning. In Advances in Neural Information Processing Systems, 2021. +Sutton, R. S., Precup, D., and Singh, S. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial Intelligence, 112(1-2): 181-211, 1999. +Thompson, W. R. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 1933. +Tirinzoni, A., Lazaric, A., and Restelli, M. A novel confidence-based algorithm for structured bandits. In International Conference on Artificial Intelligence and Statistics, 2020. +Wang, C.-C., Kulkarni, S. R., and Poor, H. V. Bandit problems with side observations. IEEE Transactions on Automatic Control, 50(3):338-355, 2005. +Ye, H., Chen, X., Wang, L., and Du, S. S. On the power of pre-training for generalization in RL: Provable benefits and hardness. In International Conference on Machine Learning, 2023. +Zhou, L. and Brunskill, E. Latent contextual bandits and their application to personalized recommendations for new users. In International Joint Conference on Artificial Intelligence, 2016. + +# A. Auxiliary Lemmas + +The following lemma is the famous Ville's inequality for super-martingales: + +Lemma A.1 (Ville's Inequality). Let $\{W_t\}_{t \geq 0}$ be a non-negative super-martingale sequence, such that + +$$ +\mathbb {E} \left[ W _ {t + 1} \mid W _ {t} \right] \leq W _ {t}, +$$ + +for any $\delta > 0$ , the following holds: + +$$ +\mathbb {P} \left(\forall t, W _ {t} \leq W _ {0} / \delta\right) \geq 1 - \delta . +$$ + +The following lemmas are the standard concentration of log-likelihood values of the models within the confidence set. The proofs are standard in model-based RL and can also be found in (e.g., Liu et al. 2022; Agarwal et al. 2020). We let $\mathcal{D}$ be the observational data $o = (x, k, r)$ collected by running $\pi$ on some underlying distribution $\nu^{*} \in \mathbb{M}$ . We denote $\beta := \log(M / \delta)$ . Then, the following holds: + +Lemma A.2 (Uniform Bound on the Likelihood Ratios). With probability $1 - \delta$ for any $\delta > 0$ , for any $\nu \in \mathbb{M}$ + +$$ +\sum_ {o \in \mathcal {D}} \log \left(\mathbb {P} _ {\nu} ^ {\pi} (o)\right) - \beta \leq \sum_ {o \in \mathcal {D}} \log \left(\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)\right). \tag {7} +$$ + +Lemma A.3 (Concentration of Maximum Likelihood Estimators). With probability $1 - \delta$ , for all $\nu \in \mathbb{M}$ , we have + +$$ +D _ {H} ^ {2} \left(\mathbb {P} _ {\nu} ^ {\pi}, \mathbb {P} _ {\nu^ {*}} ^ {\pi}\right) \leq \frac {1}{2 | \mathcal {D} |} \left(\sum_ {o \in \mathcal {D}} \log \left(\frac {\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}{\mathbb {P} _ {\nu} ^ {\pi} (o)}\right) + 3 \beta\right). +$$ + +# B. Proofs + +# B.1. Proofs of Section 3 + +# B.1.1. PROOF OF THEOREM 3.1 + +We first analyze whether the true model $m^*$ remains in the hypothesis class for all $T$ rounds. To see this, by Lemma A.2, for all $i \in S_t$ and $t \in [T]$ , we have + +$$ +\sum_ {o \in \mathcal {D} _ {t}} \log \left(\mathbb {P} _ {i} ^ {\pi} (o)\right) - \beta \leq \sum_ {o \in \mathcal {D} _ {t}} \log \left(\mathbb {P} _ {m ^ {*}} ^ {\pi} (o)\right), +$$ + +where $\beta = \log (MT / \delta)$ . Hence, due to our construction of the next hypothesis set in Algorithm 2, with probability $1 - \delta /T$ , $m^{*}\in S_{t + 1}$ . As the worst-case classification round does not exceed $M$ with Assumption 1, without loss of generality, we assume that $T = O(M)$ . + +Next, for every $t^{th}$ round, we prove that $S_{t + 1} \subseteq S_t / \bar{S}_{t,\lambda}^{\pi_t}(m^*)$ where + +$$ +\bar {S} _ {t, \lambda} ^ {\pi} (m ^ {*}) = \left\{i \in S _ {t} \mid D _ {\mathrm {H}} \left(\mathbb {P} _ {i} ^ {\pi_ {t}}, \mathbb {P} _ {m ^ {*}} ^ {\pi_ {t}}\right) \geq \lambda \right\}. +$$ + +Note that with probability $1 - \delta / T$ , + +$$ +0 \geq \sum_ {o \in \mathcal {D} _ {t}} \log \left(\mathbb {P} _ {m ^ {*}} ^ {\pi} (o)\right) - \sum_ {o \in \mathcal {D} _ {t}} \log \left(\mathbb {P} _ {\hat {m} _ {t}} ^ {\pi} (o)\right) \geq - \beta , +$$ + +for all $i \in S_t$ . From Lemma A.3, for all $i \in S_{t + 1}$ , by taking union bound, it must satisfy that + +$$ +\beta \geq \sum_ {o \in \mathcal {D} _ {t}} \log \left(\frac {\mathbb {P} _ {m ^ {*}} ^ {\pi} (o)}{\mathbb {P} _ {i} ^ {\pi} (o)}\right) \geq 2 N _ {\mathrm {c l s}} \cdot D _ {\mathrm {H}} ^ {2} (\mathbb {P} _ {i} ^ {\pi_ {t}}, \mathbb {P} _ {m ^ {*}} ^ {\pi_ {t}}) - 3 \beta , +$$ + +where the first inequality holds due to our construction of $S_{t + 1}$ . Thus, for all $i\in S_{t + 1}$ , we must have + +$$ +D _ {\mathrm {H}} ^ {2} \left(\mathbb {P} _ {i} ^ {\pi_ {t}}, \mathbb {P} _ {m ^ {*}} ^ {\pi_ {t}}\right) \leq \frac {2 \beta}{N _ {\mathrm {c l s}}}, \quad \forall i \in S _ {t + 1}. +$$ + +This means with $N_{\mathrm{cls}} > 2\frac{\log(M / \delta)}{\lambda^2}$ test samples per round, $S_{t + 1} \subseteq S_t / \bar{S}_{t,\lambda}^{\pi_t}(m^*)$ . + +Finally, with our design of $\pi_t$ , we always choose $\pi_t$ such that + +$$ +\left| \bar {S} _ {t, \lambda} ^ {\pi_ {t}} \left(m ^ {*}\right) \right| \geq C _ {\lambda} \left(\Pi_ {\mathcal {C}}\right) ^ {- 1} \cdot \left| S _ {t} \right|. +$$ + +This implies with probability at least $1 - \delta / T$ , we always have + +$$ +\frac {\left| S _ {t + 1} \right|}{\left| S _ {t} \right|} \leq 1 - C _ {\lambda} \left(\Pi_ {\mathcal {C}}\right) ^ {- 1}, +$$ + +which translates to + +$$ +\mathbb {E} \left[ \frac {| S _ {t + 1} |}{| S _ {t} |} | S _ {t} \right] \leq 1 - \frac {1}{2} C _ {\lambda} (\Pi_ {\mathcal {C}}) ^ {- 1}. +$$ + +Note that in the worst case, the ratio remains 1 with probability less than $\delta / T$ . Let $W_{t} \coloneqq \left(1 + \frac{1}{2} C_{\lambda}(\Pi_{\mathcal{C}})^{-1}\right)^{t}|S_{t}|$ . Then $\{W_t\}_{t\geq 0}$ is a super-martingale, and thus, by Lemma A.1, we have + +$$ +\left(1 + \frac {1}{2} C _ {\lambda} \left(\Pi_ {\mathcal {C}}\right) ^ {- 1}\right) ^ {T} | S _ {T} | \leq \frac {1}{\delta} | S _ {0} |, +$$ + +with probability at least $1 - \delta$ . Under this success event, as soon as $T > 2C_{\lambda}(\Pi_{\mathcal{C}}) \cdot \log (M / \delta)$ , we must have $|S_T| = 1$ . + +To summarize, if we use $N_{\mathrm{cls}} = O(\lambda^{-2} \cdot \log(M / \delta))$ samples per classification round for $T = O(C_{\lambda}(\Pi_{\mathcal{C}}) \cdot \log(M / \delta))$ rounds, the algorithm terminates with the correct task identifier $m^{*}$ with probability at least $1 - \delta$ , concluding the proof. + +# B.1.2. PROOF OF LEMMA 3.2 + +Following the definition of DEC in (6), we have that + +$$ +\mathsf {d e c} _ {\gamma} (\mathbb {M}) \geq \max _ {S \in 2 ^ {[ M ]}} \min _ {\pi \sim \Delta ([ K ])} \max _ {i \in S} \mathbb {E} _ {k \sim \pi} [ \Delta_ {i} (k) ] - \gamma \mathbb {E} _ {k \sim \pi , m \sim \mathcal {U} (S)} [ D _ {\mathrm {H}} ^ {2} (\nu_ {i} (k), \nu_ {m} (k)) ]. +$$ + +Recall that the randomized coefficient in (3) can be rewritten as the following: + +$$ +\widetilde {C} (\mathbb {M}) = \left(\min _ {S \in 2 ^ {[ M ]}, | S | > 1} \max _ {\pi \sim \Delta (\mathcal {A} _ {\lambda})} \min _ {i \in S} \mathbb {E} _ {m \sim \mathcal {U} (S)} [ \mathbb {E} _ {k \sim \pi} \left[ \mathbf {1} \{\mu_ {i} (k) \neq \mu_ {m} (k) \} \right] ]\right) ^ {- 1}, +$$ + +and let $S_{adv}$ be the outer solution of the above min-max-min optimization. Now for any $\pi \in \Delta([K])$ , let $i^{*}(\pi)$ be the one that achieves + +$$ +i ^ {*} (\pi) := \arg \min _ {i \in S _ {a d v}} \mathbb {E} _ {m \sim \mathcal {U} (S)} [ \mathbb {E} _ {k \sim \pi} [ \mathbf {1} \{\mu_ {i} (k) \neq \mu_ {m} (k) \} ] ]. \tag {8} +$$ + +We claim that there must exist $\bar{i} (\pi)\in S_{adv} / \{i^{*}(\pi)\}$ such that the following holds: + +$$ +\mathbb {E} _ {m \sim \mathcal {U} (S)} \left[ \mathbb {E} _ {k \sim \pi} \left[ \mathbf {1} \left\{\mu_ {\bar {i}} (k) \neq \mu_ {m} (k) \right\} \right] \right] \leq 4 \mathbb {E} _ {m \sim \mathcal {U} (S)} \left[ \mathbb {E} _ {k \sim \pi} \left[ \mathbf {1} \left\{\mu_ {i ^ {*} (\pi)} (k) \neq \mu_ {m} (k) \right\} \right] \right]. \tag {9} +$$ + +To see this, note that + +$$ +\mathbf {1} \left\{\mu_ {\bar {i}} (k) \neq \mu_ {m} (k) \right\} \leq \mathbf {1} \left\{\mu_ {\bar {i}} (k) \neq \mu_ {i ^ {*} (\pi)} (k) \right\} + \mathbf {1} \left\{\mu_ {i ^ {*} (\pi)} (k) \neq \mu_ {m} (k) \right\}, +$$ + +and then, by taking $\overline{i} (\pi)\coloneqq \arg \min_{i\in S_{adv} / \{i^{*}(\pi)\}}\mathbb{E}_{k\sim \pi}[\mathbf{1}\{\mu_{i^{*}(\pi)}(k)\neq \mu_{\overline{i}}(k)\} ]$ , we can verify that + +$$ +\mathbb {E} _ {k \sim \pi} [ \mathbf {1} \{\mu_ {i ^ {*} (\pi)} (k) \neq \mu_ {i} ^ {-} (k) \} ] \leq 2 \mathbb {E} _ {m \sim \mathcal {U} (S _ {a d v})} \left[ \mathbb {E} _ {k \sim \pi} [ \mathbf {1} \{\mu_ {i ^ {*} (\pi)} (k) \neq \mu_ {m} (k) \} ] \right], +$$ + +since $|S_{adv}| > 1$ and the indicator function is nonnegative. Note that for all $\pi \in \Delta(\mathcal{A}_{\lambda})$ , by construction, $\mathbb{E}_{m \sim \mathcal{U}(S)}\left[\mathbb{E}_{a \sim \pi}\left[1\{\mu_{i^{*}(\pi)}(a) \neq \mu_{m}(a)\}\right]\right] \leq \widetilde{C}(\mathbb{M})^{-1}$ . + +Now going back to the DEC lower-bound, we have + +$$ +\begin{array}{l} \mathsf {d e c} _ {\gamma} (\mathbb {M}) \geq \min _ {\pi \in \Delta ([ K ])} \max _ {i \in S _ {a d v}} \mathbb {E} _ {k \sim \pi} [ \Delta_ {i} (k) ] - \gamma \mathbb {E} _ {k \sim \pi} [ \mathbb {E} _ {m \sim \mathcal {U} (S _ {a d v})} [ D _ {\mathbb {H}} ^ {2} (\nu_ {i} (k), \nu_ {m} (k)) ] ] \\ \geq \min _ {\pi \in \Delta ([ K ])} \max _ {i \in S _ {a d v}} \underbrace {\sum_ {k \in \left\{k _ {m} ^ {*} \right\} _ {m}} \Delta_ {i} (k) \cdot \pi (k) + \frac {1}{8} \pi (k \in \mathcal {A} _ {\lambda})} _ {I} (10) \\ - \gamma \left(\underbrace {2 0 0 \epsilon^ {2} \cdot \pi (k \notin \mathcal {A} _ {\lambda}) + \mathbb {E} _ {m \sim \mathcal {U} \left(S _ {a d v}\right)} \left[ \mathbb {E} _ {k \sim \pi_ {\lambda}} \left[ D _ {\mathrm {H}} ^ {2} \left(\nu_ {i} (k) , \nu_ {m} (k)\right) \right] \right] \cdot \pi (k \in \mathcal {A} _ {\lambda})} _ {I I}\right), (11) \\ \end{array} +$$ + +where we define $\pi_{\lambda} = \pi (\cdot |k\in \mathcal{A}_{\lambda})$ . Now for every $\pi$ and the corresponding $\pi_{\lambda}$ , let $i^{*}(\pi_{\lambda})$ as defined in (8) and $\bar{i} (\pi_{\lambda}) = S_{adv} / \{i^{*}(\pi_{\lambda})\}$ . Now we either choose $i = i^{*}(\pi_{\lambda})$ if + +$$ +\pi \left(k _ {i ^ {*} (\pi_ {\lambda})} ^ {*}\right) < \pi \left(k _ {i (\pi_ {\lambda})} ^ {*}\right), +$$ + +and $\bar{i} (\pi_{\lambda})$ in the other case. We divide into two cases. + +1. $\pi (k_{i^{*}(\pi_{\lambda})}^{*}) < \pi (k_{i(\pi_{\lambda})}^{*})$ : In the former case, note that for all $m\neq i^{*}(\pi_{\lambda})$ + +$$ +\Delta_ {i ^ {*} (\pi_ {\lambda})} \left(k _ {m} ^ {*}\right) \geq 1 0 \epsilon , +$$ + +and therefore, + +$$ +\sum_ {a \in \{k _ {m} ^ {*} \} _ {m}} \Delta_ {i ^ {*} (\pi_ {\lambda})} (k) \pi (k) \geq 5 \epsilon \pi (k \notin \mathcal {A} _ {\lambda}). +$$ + +Therefore, we have $I \geq 5\epsilon \pi (k \notin \mathcal{A}_{\lambda}) + \frac{1}{8}\pi (k \in \mathcal{A}_{\lambda})$ in (11). + +For the second term, note that + +$$ +\mathbb {E} _ {m \sim \mathcal {U} (S _ {a d v})} \left[ \mathbb {E} _ {k \sim \pi_ {\lambda}} [ D _ {\mathrm {H}} ^ {2} (\nu_ {i ^ {*} (\pi_ {\lambda})} (k), \nu_ {m} (k)) ] \right] \leq \lambda^ {2} \mathbb {E} _ {m \sim \mathcal {U} (S _ {a d v})} \left[ \mathbb {E} _ {k \sim \pi_ {\lambda}} [ \mathbf {1} \{\nu_ {i ^ {*} (\pi_ {\lambda})} (k), \nu_ {m} (k)) \} ] \right] \leq \lambda^ {2} \widetilde {C} (\mathbb {M}) ^ {- 1}. +$$ + +Therefore, the second term becomes $II \leq 200\epsilon^2\pi (k \notin \mathcal{A}_\lambda) + \lambda^2 \widetilde{C} (\mathbb{M})^{-1}\pi (k \in \mathcal{A}_\lambda)$ . + +2. $\pi (k_{i^{*}(\pi_{\lambda})}^{*}) > \pi (k_{i(\pi_{\lambda})}^{*})$ : In the latter case, repeat the same process except that now we take the worst-case inner-instance $i = \bar{i} (\pi_{\lambda})$ , we get the same inequalities. + +Combining all results, we can conclude that + +$$ +I - \gamma I I \geq (5 \epsilon - 2 0 0 \epsilon^ {2} \gamma) \pi (k \notin \mathcal {A} _ {\lambda}) + \left(\frac {1}{8} - \gamma \lambda^ {2} \tilde {C} (\mathbb {M}) ^ {- 1}\right) \pi (k \in \mathcal {A} _ {\lambda}) > 3 \epsilon , +$$ + +for any $\pi \in \Delta ([K])$ with $\gamma \leq c_{\gamma}\min \left(\epsilon^{-1},\lambda^{-2}\widetilde{C} (\mathbb{M})\right)$ for some sufficiently small $c_{\gamma} > 0$ . Therefore, + +$$ +\mathsf {d e c} _ {\gamma} (\mathbb {M}) > 3 \epsilon , +$$ + +concluding the proof. + +# B.1.3. PROOF OF THEOREM 3.3 + +To identify the optimal arm (so that we can play it for the majority of rounds), it must hold $\mathsf{dec}_{\gamma}(\mathcal{M}) < \epsilon$ . On the other hand, we have the following lower bound, which is a reminiscent of lower bound results in (Chen et al., 2022a) and (Foster et al., 2021): + +Theorem B.1. For any $\delta \in (0,1)$ and a regret minimization algorithm for $H$ rounds, + +$$ +\operatorname {R e g} _ {H} (\mathbb {M}) \geq C _ {2} \cdot \max _ {\gamma \geq C _ {1} \cdot \sqrt {H}} \min \left(\left(d e c _ {\gamma} (\mathbb {M}) - \delta\right) \cdot H, \gamma\right), +$$ + +with probability at least $\delta$ for some absolute constant $C_1, C_2 > 0$ . + +Thus, we must have $\gamma = \tilde{\Omega} (\lambda^{-2}\tilde{C} (\mathbb{M}))$ so that we can have $\mathrm{de}\mathcal{C}_{\gamma}(\mathbb{M}) < 3\epsilon$ for all $\gamma$ greater than this threshold. Otherwise, any algorithm must suffer from at least $\tilde{\Omega} (\min (\epsilon H,\lambda^{-2}\tilde{C} (\mathbb{M})))$ regret with probability at least $\delta = 1 / H\ll \epsilon$ . Furthermore, since $\mathrm{Reg}_H\geq \mathrm{Reg}_{H_0}$ for any $H\geq H_0$ , it holds that for all $H\geq H_0 = \lambda^{-4}\tilde{C} (\mathbb{M})^2$ , we must suffer $\mathrm{Reg}_H = \tilde{\Omega} (\lambda^{-2}\tilde{C} (\mathbb{M}))$ . + +# B.1.4. PROOF OF THEOREM B.1 + +The proof follows Section C.1 in (Foster et al., 2021) with minor modification. Let us define a regret for individual instance: + +$$ +\operatorname {R e g} _ {H} ^ {m} := \sum_ {t = 1} ^ {H} \mu_ {m} \left(k _ {m} ^ {*}\right) - \mu_ {m} \left(k _ {t}\right). +$$ + +Let $\mathcal{E}_m$ an event such that $\{\mathrm{Reg}_H^m\leq c_1\gamma \}$ with some sufficiently small constant $c_{1}$ . For any algorithm, $\gamma >0$ and $\delta = 1 / H$ we consider, we assume that for all $m\in [M]$ , $\mathbb{P}_m(\mathcal{E}_m)\geq 1 - \delta$ since otherwise the algorithm suffers from at least $\gamma$ regret with probability at least $\delta$ . + +Let us fix an algorithm $\mathcal{A}$ such that at $t^{th}$ round with previous observations $\mathcal{H}^{t-1} = (o_1, \dots, o_{t-1})$ where $o_t = (x_t, a_t, r_t)$ , and the policy at each round is decided by an algorithm $\pi_t = \mathcal{A}(\cdot | x_t, \mathcal{H}^{(t-1)})$ . Let $\mathbb{P}_m^H$ be the distribution of sequential observations $(o_1, \dots, o_H)$ for $H$ rounds with bandit $\nu_m$ . Following Lemmas are adapted from (Foster et al., 2021): + +Lemma B.2 (Lemma A.11 in Foster et al. 2021). For any two distributions $\mu, \nu$ on a measurable space $\mathcal{X}$ , and any bounded real-valued function $h: \mathcal{X} \to \mathbb{R}$ with $0 \leq h(X) \leq B$ , we have + +$$ +| \mathbb {E} _ {\mu} [ h (X) ] - \mathbb {E} _ {\nu} [ h (X) ] | \leq \sqrt {2 B (\mathbb {E} _ {\mu} [ h (X) ] + \mathbb {E} _ {\nu} [ h (X) ]) \cdot D _ {H} ^ {2} (\mu , \nu)}. +$$ + +In particular, + +$$ +\left| \mathbb {E} _ {\mu} [ h (X) ] - \mathbb {E} _ {\nu} [ h (X) ] \right| \leq 3 \mathbb {E} _ {\nu} [ h (X) ] + 4 B D _ {H} ^ {2} (\mu , \nu). +$$ + +Lemma B.3 (Lemma A.13 in Foster et al. 2021). For any two bandit instances $\nu_{i},\nu_{j}\in \mathbb{M}$ + +$$ +D _ {H} ^ {2} (\mathbb {P} _ {i} ^ {H}, \mathbb {P} _ {j} ^ {H}) \leq C _ {H} \sum_ {t = 1} ^ {H} \mathbb {E} _ {i} [ \mathbb {E} _ {k \sim \pi_ {t}} [ D _ {H} ^ {2} (\nu_ {i} (k), \nu_ {j} (k)) ] ], +$$ + +where $C_H > 0$ is a sufficiently large absolute constant. + +Given the lemmas, for any $\omega \in \Delta([M])$ and for any algorithm that generates an adaptive policy $\pi_t$ , let $\hat{\pi} := \frac{1}{H}\sum_{t=1}^{H}\pi(\cdot|\mathcal{H}^{(t-1)})$ (note that this is a random variable), and let $\bar{\pi} := \mathbb{E}_{m\sim\omega}[\hat{\pi}]$ . + +Lemma B.4 (Minor Edit of Lemma C.1 in Foster et al. 2021). For any two bandit instances $\nu_{i},\nu_{j}\in \mathbb{M}$ + +$$ +\frac {1}{H} \mathbb {E} _ {j} [ \mathrm {R e g} _ {H} ^ {i} \cdot \mathbf {1} \{\mathcal {E} _ {i} ^ {c} \} ] \lesssim \frac {c _ {1} \gamma}{H} \cdot D _ {H} ^ {2} (\mathbb {P} _ {i} ^ {H}, \mathbb {P} _ {j} ^ {H}) + \sqrt {D _ {H} ^ {2} (\mathbb {P} _ {i} ^ {H} , \mathbb {P} _ {j} ^ {H}) \mathbb {E} _ {i} [ \mathbb {E} _ {k \sim \hat {\pi}} [ D _ {H} ^ {2} (\nu_ {i} (k) , \nu_ {j} (k)) ] ]} + \delta . +$$ + +We start with the following inequality for a prior $\omega$ such that: + +$$ +\sup _ {m \in [ M ]} \mathbb {E} _ {a \sim \bar {\pi}} [ \nu_ {m} (a _ {m} ^ {*}) - \nu_ {m} (a) ] - \gamma \cdot \mathbb {E} _ {\bar {m} \sim \omega} [ \mathbb {E} _ {a \sim \bar {\pi}} [ D _ {H} ^ {2} (\nu_ {\bar {m}} (a), \nu_ {m} (a)) ] ] \geq \operatorname * {d e c} _ {\gamma} (\mathbb {M}). +$$ + +Such a prior $\omega \in \Delta ([M])$ must exist due to the definition of $\mathsf{dec}_{\gamma}$ . Note that + +$$ +\begin{array}{l} H \cdot \mathbb {E} _ {a \sim \bar {\pi}} [ \nu_ {m} (a _ {m} ^ {*}) - \nu_ {m} (a) ] = \mathbb {E} _ {\bar {m} \sim \omega} \mathbb {E} _ {a \sim \hat {\pi}} [ \nu_ {m} (a _ {m} ^ {*}) - \nu_ {m} (a) ] = H \cdot \mathbb {E} _ {\bar {m} \sim \omega} [ \operatorname {R e g} _ {H} ^ {m} ] \\ = \sum_ {\bar {m}} \omega_ {\bar {m}} \mathbb {E} _ {\bar {m}} [ \mathrm {R e g} _ {H} ^ {m} ] = \sum_ {\bar {m}} \omega_ {\bar {m}} \left(\underbrace {\mathbb {E} _ {\bar {m}} [ \mathrm {R e g} _ {H} ^ {m} \cdot \mathbf {1} \{\mathcal {E} _ {m} \} ]} _ {I} + \underbrace {\mathbb {E} _ {\bar {m}} [ \mathrm {R e g} _ {H} ^ {m} \cdot \mathbf {1} \{\mathcal {E} _ {m} ^ {c} \} ]} _ {I I}\right). \\ \end{array} +$$ + +For $I$ , we apply Lemma B.2 to get + +$$ +I \leq 3 \mathbb {E} _ {m} [ \mathrm {R e g} _ {H} ^ {m} \cdot {\bf 1} \{\mathcal {E} _ {m} \} ] + 4 \gamma D _ {\mathrm {H}} ^ {2} (\mathbb {P} _ {\bar {m}} ^ {H}, \mathbb {P} _ {m} ^ {H}) \leq 3 \mathbb {E} _ {m} [ \mathrm {R e g} _ {H} ^ {m} ] + 4 \gamma D _ {\mathrm {H}} ^ {2} (\mathbb {P} _ {\bar {m}} ^ {H}, \mathbb {P} _ {m} ^ {H}). +$$ + +For $II$ , we apply Lemma B.4 to get + +$$ +I I \lesssim (H \epsilon + c _ {1} \gamma) D _ {\mathrm {H}} ^ {2} (\mathbb {P} _ {\bar {m}} ^ {H}, \mathbb {P} _ {m} ^ {H}) + H \sqrt {D _ {\mathrm {H}} ^ {2} (\mathbb {P} _ {\bar {m}} ^ {H} , \mathbb {P} _ {m} ^ {H}) \cdot \mathbb {E} _ {\bar {m}} [ \mathbb {E} _ {k \sim \hat {\pi}} [ D _ {\mathrm {H}} ^ {2} (\nu_ {\bar {m}} (k) , \nu_ {m} (k)) ] ]} + H \delta . +$$ + +Combining these inequalities, we have + +$$ +\begin{array}{l} \mathbb {E} _ {m} \left[ \operatorname {R e g} _ {H} ^ {m} \right] \gtrsim H \cdot \operatorname {d e c} _ {\gamma} (\mathbb {M}) - \sum_ {\bar {m}} \omega_ {\bar {m}} \cdot \left(c _ {1} \gamma D _ {\mathbb {H}} ^ {2} \left(\mathbb {P} _ {\bar {m}} ^ {H}, \mathbb {P} _ {m} ^ {H}\right) + H \sqrt {D _ {\mathbb {H}} ^ {2} \left(\mathbb {P} _ {\bar {m}} ^ {H} , \mathbb {P} _ {m} ^ {H}\right) \cdot \mathbb {E} _ {\bar {m}} \left[ \mathbb {E} _ {a \sim \hat {\pi}} \left[ D _ {\mathbb {H}} ^ {2} \left(\nu_ {\bar {m}} (a) , \nu_ {m} (a)\right) \right] \right]}\right) \\ + \gamma H \cdot \mathbb {E} _ {\bar {m} \sim \omega} [ \mathbb {E} _ {a \sim \bar {\pi}} [ D _ {\mathrm {H}} ^ {2} (\nu_ {\bar {m}} (a), \nu_ {m} (a)) ] ] - H \delta . \\ \end{array} +$$ + +On the other hand, we can apply Lemma B.3 to bound that + +$$ +\begin{array}{l} D _ {\mathrm {H}} ^ {2} \left(\mathbb {P} _ {\bar {m}} ^ {H}, \mathbb {P} _ {m} ^ {H}\right) \leq C _ {H} \sum_ {t = 1} ^ {H} \mathbb {E} _ {\bar {m}} \left[ \mathbb {E} _ {k \sim \pi_ {t}} \left[ D _ {\mathrm {H}} ^ {2} \left(\nu_ {\bar {m}} (k), \nu_ {m} (k)\right) \right] \right] \\ = C _ {H} H \cdot \mathbb {E} _ {\bar {m}} \left[ \mathbb {E} _ {a \sim \hat {\pi}} \left[ D _ {\mathrm {H}} ^ {2} \left(\nu_ {\bar {m}} (a), \nu_ {m} (a)\right) \right] \right] = C _ {H} H \cdot \mathbb {E} _ {a \sim \bar {\pi}} \left[ D _ {\mathrm {H}} ^ {2} \left(\nu_ {\bar {m}} (a), \nu_ {m} (a)\right) \right]. \\ \end{array} +$$ + +Plugging these results, we have + +$$ +\begin{array}{l} \mathbb {E} _ {m} \left[ \operatorname {R e g} _ {H} ^ {m} \right] \gtrsim H \cdot \operatorname {d e c} _ {\gamma} (\mathbb {M}) - H \left(c _ {1} \gamma + \sqrt {H}\right) \cdot \sum_ {\bar {m}} \omega_ {\bar {m}} \mathbb {E} _ {\bar {\pi}} \left[ D _ {\mathrm {H}} ^ {2} \left(\nu_ {\bar {m}} (k), \nu_ {m} (k)\right) \right] \\ + \gamma H \cdot \mathbb {E} _ {\bar {m} \sim \omega} [ \mathbb {E} _ {k \sim \bar {\pi}} [ D _ {\mathrm {H}} ^ {2} (\nu_ {\bar {m}} (k), \nu_ {m} (k)) ] ] - H \delta . \\ \end{array} +$$ + +Note that + +$$ +\mathbb {E} _ {\bar {m} \sim \omega} [ \mathbb {E} _ {a \sim \bar {\pi}} [ D _ {\mathrm {H}} ^ {2} (\nu_ {\bar {m}} (k), \nu_ {m} (k)) ] ] = \sum_ {\bar {m}} \omega_ {\bar {m}} \mathbb {E} _ {\bar {\pi}} [ D _ {\mathrm {H}} ^ {2} (\nu_ {\bar {m}} (k), \nu_ {m} (k)) ]. +$$ + +This implies that as long as $c_{1}$ is a sufficiently small constant and $\gamma \gtrsim \sqrt{H}$ , the expected lower bound is given by + +$$ +\mathbb {E} _ {m} \left[ \operatorname {R e g} _ {H} ^ {m} \right] \gtrsim H \left(\operatorname {d e c} _ {\gamma} (\mathbb {M}) - \delta\right). +$$ + +Proof of Lemma B.3. The general version of subadditivity lemma in (Foster et al., 2021) is stated as the following: + +Lemma B.5. Let $(\mathcal{X}_1,\mathcal{F}_1),\dots,(\mathcal{X}_n,\mathcal{F}_n)$ be a sequence of measurable spaces, and let $\mathcal{X}^{(i)} = \Pi_{t = 1}^{i}\mathcal{X}_{t}$ and $\mathcal{F}^{(i)} = \bigotimes_{t = 1}^{i}\mathcal{F}_{t}$ . For each $i$ , let $\mu^{(i)},\nu^{(i)}$ be probability kernels from $(\mathcal{X}^{(i - 1)},\mathcal{F}^{(i - 1)})$ to $(\mathcal{X}^{(i)},\mathcal{F}^{(i)})$ . Let $\mu ,\nu$ be the laws of sequence $X_{1},\ldots ,X_{n}$ following the sequence of $(\mu^{(1)},\dots,\mu^{(n)})$ , $(\nu^{(1)},\dots,\nu^{(n)})$ respectively. Then it holds that + +$$ +D _ {H} (\mu , \nu) \leq 1 0 ^ {2} \log (n) \cdot \mathbb {E} _ {\mu} [ \sum_ {i = 1} ^ {n} D _ {H} ^ {2} (\mu^ {(i)} (\cdot | X _ {1}, \dots , X _ {i - 1}), \nu^ {(i)} (\cdot | X _ {1}, \dots , X _ {i - 1})) ]. +$$ + +Furthermore, if there exists a constant $V$ such that $\sup_{(x_1,\ldots ,x_{i - 1})\in \mathcal{X}^{(i - 1)}}\sup_{o_i\in \mathcal{F}_i}\frac{\mu^{(i)}(o_i|x_1,\ldots,x_{i - 1})}{\nu^{(i)}(o_i|x_1,\ldots,x_{i - 1})}$ for all $i$ , then + +$$ +D _ {H} (\mu , \nu) \leq 3 \log (V) \cdot \mathbb {E} _ {\mu} [ \sum_ {i = 1} ^ {n} D _ {H} ^ {2} (\mu^ {(i)} (\cdot | X _ {1}, \dots , X _ {i - 1}), \nu^ {(i)} (\cdot | X _ {1}, \dots , X _ {i - 1})) ]. +$$ + +Our construction belongs to the latter case, since the probability of observing $r_t = 1$ or $r_t = 0$ is larger than $\frac{1 - \lambda}{2} \geq 1/4$ for any $\lambda \leq 1/2$ . + +Proof of Lemma B.4. In our construction, for all pair of bandit instances $\mu, \nu \in \mathbb{M}$ , the optimal values are the same, that is, + +$$ +\mu (k _ {\mu} ^ {*}) - \nu (k _ {\nu} ^ {*}) = 0, +$$ + +where $k_{\mu}^{*}, k_{\nu}^{*}$ are the optimal actions for $\mu, \nu$ respectively. The remaining steps are identical to the proof in (Foster et al., 2021) (see their Section C.1.2), and we omit them here. + +# B.2. Proofs of Section 4 + +# B.2.1. PROOF OF LEMMA 4.1 + +Proof. We can rework the result (Hsu et al., 2011, Theorem 1), originally designed for the excess quadratic loss, to write + +$$ +\mathbb {P} \left(\mathbb {E} _ {\mathcal {P}} \left[ | x ^ {\top} \hat {\theta} _ {i k} - x ^ {\top} \theta_ {i k} | \right] > \sqrt {\frac {5 \sigma^ {2} (d + 2 \sqrt {d \log (2 / \delta)} + 2 \log (2 / \delta))}{N}}\right) \leq \delta +$$ + +where $\hat{\theta}$ is the ordinary least squares with $N$ samples. Then, we just plug $\delta = \frac{1}{2HMK}$ in the expression to obtain the guarantee with a few algebraic manipulations. + +# B.2.2. PROOF OF THEOREM 4.2 + +Let us start looking at the sample complexity. Since the Algorithm 3 takes $N_{\mathrm{est}}$ samples for every arm $k \in [K]$ and simulator $\nu_i \in \mathbb{M}$ , we can conclude that the statistical complexity of meta training is $\frac{4MK\log(4HMK)}{\min(\Delta_{\mathrm{min}}^2,\lambda^2)}$ . + +Assuming access to parallel simulators, the computational cost of meta training depends on the cost of executing line 12 in Algorithm 3, which is calling Algorithm 4. The latter requires executing $|S|$ evaluations at lines 5, 6, where $|S| \leq M$ , and to compute the greedy step (line 3), a cost that is paid for every call to the recursive procedure (line 8). Computing the greedy step through Algorithm 5 is done in $4K/\lambda^4$ steps. Finally, we can bound the number of calls to the recursive procedure with the total number of nodes in the tree, which is $\mathcal{O}(M^2)$ . Putting all together we get a complexity of order $\mathcal{O}(M^3 K/\lambda^4)$ . + +# B.2.3. PROOF OF LEMMA 4.3 + +Proof. The result follows directly from the approximation guarantee of the greedy algorithm to build the decision tree (Arkin et al., 1993), which guarantees $d = \mathcal{O}(\log M + 1)C_{\lambda}^{*}(\mathbb{M})$ . Especially, we have to prove that the previous guarantee does not degrade with our implementation, which include a $\lambda /4$ -discretization of the space of tests (see Algorithm 5, line 4). Thanks to the separation condition (Assumption 2), we can prove that every test $\hat{\mu} (k)\leq b$ with $b\in [0,1]$ can be replicated with at most two tests defined on the discretized space, i.e., $\hat{\mu} (k)\leq b$ with $b\in [0,1]_{\lambda /4}$ . Since the approximation degrades of a constant factor only, the result $D = \mathcal{O}(\log M + 1)C_{\lambda}^{*}(\mathbb{M})$ holds. + +# B.2.4. PROOF OF THEOREM 4.4 + +Proof. To derive the upper bound on the regret, we aim to prove that the remaining task $\hat{\nu}_{m^*}$ at the end of the Explicit Classify phase corresponds, up to a small estimation error, to the true test task $\nu^{*}$ with high probability, and that the policy $\pi^{*}$ played from there on in the Exploit phase corresponds to the optimal policy for the test task $\nu^{*}$ with high probability (despite the mentioned estimation error). + +If we let $\pi^{*}(x) = \arg \max_{\pi \in \Pi} x^{\top} \theta_{\pi(x)}^{*}$ the optimal policy of the (true) test task, we aim to prove + +$$ +\mathbb {P} _ {\mathcal {P}} \left(\hat {\pi} ^ {*} (x) \neq \pi^ {*} (x)\right) = \mathbb {P} \left(" E x p l i c t C l a s s i f y f a i l s" \vee " E x p l o i t f a i l s"\right) \leq 1 / H +$$ + +which we can guarantee by showing that the Explicit Classify and Exploit phases fail with probability less than $1 / 2H$ and then applying a union bound. + +Let us first take the good event for the Explicit Classify phase, which means the remaining $\hat{\nu}_{m^*}$ is a "good" estimate of the test task $\nu^{*}$ . We have that + +$$ +\begin{array}{l} \mathbb {P} \left(" E x p l o i t \text {f a i l s}"\right) = \mathbb {P} _ {\mathcal {P}} \left(\hat {\pi} ^ {*} (x) \neq \pi^ {*} (x)\right) (12) \\ \leq \mathbb {P} _ {\mathcal {P}} \left(\bigcup_ {i \in [ M ]} \bigcup_ {k \in [ K ]} x ^ {\top} \hat {\theta} _ {i \pi^ {*} (x)} \leq x ^ {\top} \hat {\theta} _ {i k}\right) (13) \\ \leq \sum_ {i \in [ M ]} \sum_ {k \in [ K ]} \mathbb {P} _ {\mathcal {P}} \left(x ^ {\top} \hat {\theta} _ {i \pi^ {*} (x)} \leq x ^ {\top} \hat {\theta} _ {i k}\right) \leq \sum_ {i \in [ M ]} \sum_ {k \in [ K ]} \frac {1}{2 H M K} \leq \frac {1}{2 H} (14) \\ \end{array} +$$ + +where we consider any possible choice of the remaining task $\hat{\nu}_{m^*}$ and the test task $\nu^{*}$ to write (13) from (12), we apply a union bound and the estimation guarantee of Algorithm 3 (see Lemma 4.1) to write (14). + +Conversely, under the good event for the Exploit phase we aim to prove that the Explicit Classify phase fails with probability less than $1 / 2H$ . Since the Explicit Classify phase is actually a sequence of tests, we need to bound the probability that each test fails. Formally, let $J$ denote the number of iterations of the loop between lines 3-11 (Algorithm 6), through a union bound we have + +$$ +\mathbb {P} \left(" E x p l i c i t C l a s s i f y \text {f a i l s}"\right) = \mathbb {P} \left(\bigcup_ {j \in [ J ]} " t e s t \text {a t i t e r a t i o n} j \text {f a i l s}"\right) \leq \sum_ {j \in [ J ]} \mathbb {P} \left(" t e s t \text {a t i t e r a t i o n} j \text {f a i l s}"\right) +$$ + +Now, we need to design $N_{\mathrm{cls}}$ such that the test at each iteration fails with probability less than $\frac{1}{2HJ} \geq \frac{1}{2HD}$ where $D$ is the depth of $\operatorname{tree}(\hat{\mathbb{M}})$ . For each iteration $j$ , take the test $\mu_k \leq b$ and let $\overline{\mu} = \frac{1}{N_{\mathrm{cls}}} \sum_{n \in [N_{\mathrm{cls}}]} r_n$ the empirical mean of the samples $r_n \sim \nu^*(x_n, k)$ collected from the test task at line 5 (Algorithm 6). We need to assure that the event of $\overline{\mu}$ falling on one side of the test while the "right" $\tilde{\mu}_k$ is on the other side (see lines 6-11 of Algorithm 6) happens with small enough probability. Formally, + +$$ +\begin{array}{l} \mathbb {P} \left(" t e s t a t i t e r a t i o n j f a i l s "\right) = \mathbb {P} \left(\left\{\bar {\mu} \leq b \wedge \tilde {\mu} _ {k} > b + \lambda \right\} \cup \left\{\bar {\mu} > b \wedge \tilde {\mu} _ {k} \leq b - \lambda \right\}\right) \\ \leq \mathbb {P} \left(\left| \bar {\mu} - \tilde {\mu} _ {k} \right| > \lambda\right) \\ \leq \mathbb {P} \left(\left| \bar {\mu} - \mu_ {k} \right| > \lambda / 2\right) + \mathbb {P} \left(\left| \bar {\mu} _ {k} - \mu_ {k} \right| > \lambda / 2\right) \\ \end{array} +$$ + +For the second event, we invoke the estimation guarantee of Algorithm 3 (see Lemma 4.1) to write $\mathbb{P}(|\tilde{\mu}_k - \mu_k| > \lambda /2)\leq \frac{1}{2HMK}\leq \frac{1}{4HD}$ . For the first event, we need to assure that $\mathbb{P}(|\overline{\mu} -\mu_k| > \lambda /2)\leq \frac{1}{4HD}$ . Since $\overline{\mu}$ is the empirical mean of $\mu_{k}$ , by applying the Hoeffding's inequality, we have that $N_{\mathrm{cls}}\geq \frac{2\log(8HD)}{\lambda^2}$ gives the desired guarantee. + +Having demonstrated that $\mathbb{P}_{\mathcal{P}}(\hat{\pi}^{*}(x)\neq \pi^{*}(x))$ holds with probability less than $1 / H$ , we can finally write + +$$ +\mathrm {R e g} _ {H} (\mathbb {M}) = \mathbb {E} _ {\mathcal {P}} \left[ \sum_ {t = 1} ^ {J N _ {\mathrm {c l s}}} \max _ {k \in [ K ]} x _ {t} ^ {\top} \theta_ {k} ^ {*} - r _ {t} \right] + \mathbb {E} _ {\mathcal {P}} \left[ \sum_ {t = J N _ {\mathrm {c l s}} + 1} ^ {H} \max _ {k \in [ K ]} x _ {t} ^ {\top} \theta_ {k} ^ {*} - x _ {t} ^ {\top} \theta_ {\hat {\pi} ^ {*} (x _ {t})} ^ {*} \right] \leq \frac {2 D \log (8 H D)}{\lambda^ {2}} +$$ + +by taking $x_{t}^{\top}\theta_{k}^{*} - x_{t}^{\top}\theta_{\hat{\pi}^{*}(x_{t})}^{*} = 0$ in the good event, upper bounding $\max_{k\in [K]}x_t^\top \theta_k^* -r_t\leq 1$ and $JN\leq DN_{\mathrm{cls}}$ , and then apply the approximation guarantee $D = \mathcal{O}((\log M + 1)C_{\lambda}^{*}(\mathbb{M}))$ from Lemma 4.3 to get the result. + +# B.3. Proof of Auxiliary Lemmas + +# B.3.1. PROOF OF LEMMA A.2 + +The proof of MLE-based confidence set construction is by now standard and can be found in several prior works (e.g., Liu et al. 2022). We adapt the proofs from (Kwon et al., 2024) for completeness. + +Proof. The proof follows a Chernoff bound type of technique: + +$$ +\begin{array}{l} \mathbb {P} _ {\nu^ {*}} \left(\sum_ {o \in \mathcal {D}} \log \left(\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}\right) \geq \mathbb {E} _ {\nu^ {*}} \left[ \sum_ {o \in \mathcal {D}} \log \left(\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}\right) \right] + \beta\right) \\ \leq \mathbb {P} _ {\nu^ {*}} \left(\exp \left(\sum_ {o \in \mathcal {D}} \log \left(\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}\right)\right) \geq \exp (\beta)\right) \\ \leq \mathbb {E} _ {\nu^ {*}} \left[ \exp \left(\sum_ {o \in \mathcal {D}} \log \left(\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}\right)\right) \right] \exp (- \beta). \\ \end{array} +$$ + +The last inequality is by the Markov's inequality. Note that random variables are $o$ in the trajectory dataset $\mathcal{D}$ , and + +$$ +\mathbb {E} _ {\nu^ {*}} \left[ \sum_ {o \in \mathcal {D}} \log \left(\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}\right) \right] = - \mathrm {K L} (\mathbb {P} _ {\nu^ {*}} (\mathcal {D}) | | \mathbb {P} _ {\nu} (\mathcal {D})) \leq 0. +$$ + +Furthermore, + +$$ +\mathbb {E} _ {\nu^ {*}} \left[ \exp \left(\sum_ {o \in \mathcal {D}} \log \left(\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}\right)\right) \right] = \mathbb {E} _ {\nu^ {*}} \left[ \Pi_ {o \in \mathcal {D}} \frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)} \right] = 1. +$$ + +Combining the above, taking a union bound over $\nu \in \mathbb{M}$ , letting $\beta = \log (M / \delta)$ , with probability $1 - \delta$ , the inequality in Lemma A.2 holds. + +# B.3.2. PROOF OF LEMMA A.3 + +Proof. By the TV-distance and Hellinger distance relation, for any $\iota, \tau, \pi$ and $t \in [H]$ , + +$$ +D _ {\mathrm {H}} ^ {2} (\mathbb {P} _ {\nu} ^ {\pi}, \mathbb {P} _ {\nu^ {*}} ^ {\pi}) = 1 - \mathbb {E} _ {o \sim \mathbb {P} _ {\nu^ {*}} ^ {\pi}} \left[ \sqrt {\frac {\mathbb {P} _ {\theta} ^ {\pi} (o)}{\mathbb {P} _ {\theta^ {*}} ^ {\pi} (o)}} \right] \leq - \log \left(\mathbb {E} _ {o \sim \mathbb {P} _ {\nu^ {*}} ^ {\pi}} \left[ \sqrt {\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}} \right]\right). +$$ + +By the Chernoff bound, + +$$ +\begin{array}{l} \mathbb {P} _ {\nu^ {*}} \left(\sum_ {o \in \mathcal {D}} \log \left(\sqrt {\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*} (o)} ^ {\pi}}}\right) \geq | \mathcal {D} | \cdot \log \mathbb {E} _ {o \sim \mathbb {P} _ {\nu^ {*}} ^ {\pi}} \left[ \sqrt {\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*} (o)} ^ {\pi}}} \right] + \beta\right) \\ \leq \mathbb {E} _ {\nu^ {*}} \left[ \frac {\exp \left(\sum_ {o \in \mathcal {D}} \log \left(\sqrt {\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*} (o)} ^ {\pi}}}\right)\right)}{\exp \left(| \mathcal {D} | \cdot \log \mathbb {E} _ {o \sim \mathbb {P} _ {\nu^ {*}} ^ {\pi}} \left[ \sqrt {\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*} (o)} ^ {\pi}}} \right]\right)} \right] \exp (- \beta) \\ = \mathbb {E} _ {\nu^ {*}} \left[ \frac {\Pi_ {o \in \mathcal {D}} \sqrt {\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}}}{\mathbb {E} _ {\tau \sim \mathbb {P} _ {\theta^ {*}} ^ {\pi}} \left[ \sqrt {\frac {\mathbb {P} _ {\theta} ^ {\pi} (\tau)}{\mathbb {P} _ {\theta^ {*}} ^ {\pi} (\tau)}} \right] ^ {| \mathcal {D} |}} \right] \exp (- \beta) = \exp (- \beta), \\ \end{array} +$$ + +where in the last line, we used the independent property of samples. Thus, again by setting $\beta = \log (M / \delta)$ , with probability at least $1 - \eta$ , we have + +$$ +\begin{array}{l} | \mathcal {D} | \cdot D _ {\mathrm {H}} ^ {2} \left(\mathbb {P} _ {\nu} ^ {\pi}, \mathbb {P} _ {\nu^ {*}} ^ {\pi}\right) \leq - \frac {1}{2} \sum_ {o \in \mathcal {D}} \log \left(\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}\right) + \beta \\ = - \frac {1}{2} \sum_ {o \in \mathcal {D}} \log \left(\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}\right) + \frac {1}{2} \sum_ {o \in \mathcal {D}} \log \left(\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}\right) + \beta , \\ \end{array} +$$ + +for all $k \in [K]$ and $\nu \in \mathbb{M}$ . Now we can apply Lemma A.2, and finally have + +$$ +D _ {\mathrm {H}} ^ {2} (\mathbb {P} _ {\nu} ^ {\pi}, \mathbb {P} _ {\nu^ {*}} ^ {\pi}) \leq \frac {1}{2 | \mathcal {D} |} \left(- \sum_ {o \in \mathcal {D}} \log \left(\frac {\mathbb {P} _ {\nu} ^ {\pi} (o)}{\mathbb {P} _ {\nu^ {*}} ^ {\pi} (o)}\right) + 3 \beta\right). +$$ + +# C. Additional material + +# C.1. Greedy algorithm + +Algorithm 5 provides the pseudocode of a tractable procedure to compute the greedy test for Algorithm 4 through a $\lambda / 4$ -discretization of the space of thresholds $b$ . + +Algorithm 5 Greedy Test +1: input set of tasks $S$ +2: for $k \in [K]$ do +3: Define $S^{+}(b) \coloneqq \{\nu \in S \mid \hat{\mu}(k) \leq b - \lambda/2\}$ +4: Define $S^{-}(b) \coloneqq \{\hat{\nu} \in S \mid \hat{\mu}(k) > b + \lambda/2\}$ +5: Compute $M_{k}(b) = \max_{b \in [0,1]_{\lambda/4}} \min(|S^{+}(b)|, |S^{-}(b)|)$ +6: end for +7: Extract $(k, b) = \arg \max_{k \in [K]} M_{k}(b)$ +8: output greedy test $(\mu(k) \leq b)$ + +# C.2. DT-ECE + +Algorithm 6 provides the pseudocode of the DT-ECE algorithm, which implements ECE (Algorithm 1) for a misspecified set of tasks $\mathbb{M}$ with a decision tree classifier. + +Algorithm 6 Decision Tree – Explicit Classify then Exploit +1: input set of tasks $\hat{\mathbb{M}}$ , decision tree tree $(\hat{\mathbb{M}})$ , $N_{\mathrm{cls}} = \frac{2\log(2HD)}{\lambda^2}$ +2: Initialize $S_0 = \hat{\mathbb{M}}, t = 0$ +3: while $|S_t| > 1$ do +4: Extract test $(\mu_k \leq b) = \text{tree}(S_t)$ +5: $\mathcal{D}_t \gets N_{\mathrm{cls}}$ i.i.d. samples drawn with $\pi_t = k$ +6: if $\frac{1}{N_{\mathrm{cls}}} \sum_{r \in \mathcal{D}_t} r \leq b$ then +7: Get $S_{t+1} \gets \text{tree}(S_t, \text{true})$ +8: else +9: Get $S_{t+1} \gets \text{tree}(S_t, \text{false})$ +10: end if +11: end while +12: Extract the classified task $m^* \in S_t$ and execute $\hat{\pi}^*(x) = \arg \max_{\pi \in \Pi} \hat{\nu}_{m^*}(x, k)$ for the remaining steps Exploit \ No newline at end of file diff --git a/aclassificationviewonmetalearningbandits/images.zip b/aclassificationviewonmetalearningbandits/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..cd40c96687e97f2ba837827dc9fe8877908bfbfa --- /dev/null +++ b/aclassificationviewonmetalearningbandits/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fe30941988d62056ed5939b24e80f75337c26ff6a1f2c37db70211fb9848683 +size 802836 diff --git a/aclassificationviewonmetalearningbandits/layout.json b/aclassificationviewonmetalearningbandits/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f5e7af26a762fbe419167100da1b7478d6c8132a --- /dev/null +++ b/aclassificationviewonmetalearningbandits/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3029390cd28fd5c307173c138ad11e17f83da179df5aae93ffa89302ec935799 +size 1064222 diff --git a/acloserlookatbackdoorattacksonclip/daaa08c8-66b4-46b8-8bc3-959a71d4075a_content_list.json b/acloserlookatbackdoorattacksonclip/daaa08c8-66b4-46b8-8bc3-959a71d4075a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d3d99f37a4d224835a17734dd43f74b13d35e722 --- /dev/null +++ b/acloserlookatbackdoorattacksonclip/daaa08c8-66b4-46b8-8bc3-959a71d4075a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfec8dd9681a50f64e4782ecd6c0a7a3d692d246a6b0df83765c1ef5ae133a4f +size 116847 diff --git a/acloserlookatbackdoorattacksonclip/daaa08c8-66b4-46b8-8bc3-959a71d4075a_model.json b/acloserlookatbackdoorattacksonclip/daaa08c8-66b4-46b8-8bc3-959a71d4075a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..140025dcc50ebcde9d9c60fb827c2ac1129a9436 --- /dev/null +++ b/acloserlookatbackdoorattacksonclip/daaa08c8-66b4-46b8-8bc3-959a71d4075a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a100b24eee8ff17aa76ed7bb3c087d611eac1a793860295b611a5602c45c76f +size 144554 diff --git a/acloserlookatbackdoorattacksonclip/daaa08c8-66b4-46b8-8bc3-959a71d4075a_origin.pdf b/acloserlookatbackdoorattacksonclip/daaa08c8-66b4-46b8-8bc3-959a71d4075a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a3324244ec6841f43a07c46aa6c72caa6d871bff --- /dev/null +++ b/acloserlookatbackdoorattacksonclip/daaa08c8-66b4-46b8-8bc3-959a71d4075a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f1758d9828c498ae63355523a03c277e05c85e9a3c56042de0d81272baf28e4 +size 9511873 diff --git a/acloserlookatbackdoorattacksonclip/full.md b/acloserlookatbackdoorattacksonclip/full.md new file mode 100644 index 0000000000000000000000000000000000000000..57255d1baaecbd4556ed892cb392845bdbe28952 --- /dev/null +++ b/acloserlookatbackdoorattacksonclip/full.md @@ -0,0 +1,412 @@ +# Abstract + +We present a comprehensive empirical study on how backdoor attacks affect CLIP by analyzing the representations of backdoor images. Specifically, based on the methodology of representation decomposing, image representations can be decomposed into a sum of representations across individual image patches, attention heads (AHs), and multi-layer perceptrons (MLPs) in different model layers. By examining the effect of backdoor attacks on model components, we have the following empirical findings. (1) Different backdoor attacks would infect different model components, i.e., local patch-based backdoor attacks mainly affect AHs, while global perturbation-based backdoor attacks mainly affect MLPs. (2) Infected AHs are centered on the last layer, while infected MLPs are decentralized on several late layers. (3) Not all AHs in the last layer are infected and even some AHs could still maintain the original property-specific roles (e.g., "color" and "location"). These observations motivate us to defend against backdoor attacks by detecting infected AHs, repairing their representations, or filtering backdoor samples with too many infected AHs, in the inference stage. Experimental results validate our empirical findings and demonstrate the effectiveness of the defense methods. + +# 1. Introduction + +Recently, Contrastive Language-Image Pretraining (CLIP) (Radford et al., 2021) has received much attention due to its powerful visual representations learned from natural language supervision (Xu et al., 2021; Wu et al., 2023). Recent research (Carlini & Terzis, 2022; Carlini et al., 2023; Bansal et al., 2023) has disclosed the vulnerability of CLIP against + +$^{1}$ Nanyang Technological University $^{2}$ Southeast University $^{3}$ University of Melbourne $^{4}$ Singapore University of Technology and Design $^{5}$ Idealism Technology (Beijing). Correspondence to: Lei Feng . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/ca54baae764947c83b313bcd56b1d1b1a262f00bcf3e132cc93c77e6bef1fdd3.jpg) +(a) Mean-ablating components (ASR) + +![](images/a05d2293047c5d5b89a0409ca95ae2e2e55ca5284f73ba68a79c917bb1d1892a.jpg) +(b) Mean-ablating components (CACC) +Figure 1. Mean-ablation on all MLPs or AHs for various backdoor attacks on CLIP. Dashed lines indicate the baseline ASR or CACC of backdoor attacks. Best viewed in color. + +backdoor attacks. Specifically, a malicious adversary can poison a small proportion of backdoor image-text pairs into the pre-training data, which would result in a backdoored CLIP after multimodal contrastive learning. In the inference stage, the backdoored CLIP would produce tampered image representations when the trigger is attached to the images, close to the text representation of the target attack class. This situation exposes a serious security risk of deploying CLIP in practical, real-world applications. + +To defend against backdoor attacks on CLIP, recent research has proposed many defense methods, e.g., robust multimodal contrastive learning in the pre-training stage (Yang et al., 2023b), fine-tuning the backdoored CLIP (Bansal et al., 2023), reverse-engineering the trigger (Sur et al., 2023), and detecting backdoor samples in the inference stage (Niu et al., 2024). However, there still remains a limited systematic understanding of how backdoor attacks affect CLIP. To fill this gap, we conduct a comprehensive empirical study to investigate how backdoor attacks affect CLIP by analyzing the representations of backdoor images. Specifically, following the methodology of representation decomposing (Gandelsman et al., 2024), we decouple the image representation as a sum of representations across individual image patches, attention heads (AHs), and multi-layer perceptrons (MLPs). Furthermore, we use mean-ablation (Gandelsman et al., 2024), i.e., replacing representations of backdoor images on AHs or MLPs with mean representations of clean images on the same components. In this way, we can examine the effect of backdoor attacks on these components by comparing attack success rates (ASRs) and clean accuracies (CACCs). Our key findings are summarized as follows. + +(1) Different backdoor attacks would infect different model + +![](images/66122059386868d7f3e205a9a89d0f613a4b191bac4947e4a01fae581db8b1a1.jpg) +Figure 2. Mean-ablation on MLPs or AHs in each layer by three ablation ways. Dashed lines indicate the baseline ASR or CACC of backdoor attacks. Best viewed in color. + +components, i.e., local patch-based backdoor attacks mainly affect AHs, while global perturbation-based backdoor attacks mainly affect MLPs. To reveal this point, as shown in Figure 1, we conduct pilot experiments to ablate all AHs or MLPs for three local patch-based backdoor attacks: BadNet (Gu et al., 2017), Kitty (Liang et al., 2023), BadCLIP (Liang et al., 2023), and three global perturbation-based backdoor attacks: Blended (Chen et al., 2017), Reflection (Liu et al., 2020), and ISSBA (Li et al., 2021). We can see that mean-ablating all MLPs has little effect on the ASRs of local patch-based backdoor attacks but dramatically decreases the ASRs of global perturbation-based backdoor attacks. On the contrary, mean-ablating all AHs achieves the reversed performance. This finding reveals the different attack preferences of two kinds of backdoor attacks on AHs and MLPs. + +(2) Infected AHs are centered on the last layer, while infected MLPs are dispersed on several late layers. We further explore the effect of backdoor attacks on AHs or MLPs in various model layers. Specifically, we use three types of layer-wise mean-ablation schemes. Forward (Backward) ablation means that we ablate AHs or MLPs in sequence (in the reversed sequence) up to a given layer. Separate ablation indicates that we only ablate AHs or MLPs on a given layer. From the results in Figure 2, we can see that ablating AHs only in the last layer greatly decreases the ASRs of BadNet and BadCLIP, indicating the infected AHs are centered on the last layer. In contrast, only ablating all MLPs in the last + +five layers can reduce the ASRs of Blended and ISSBA to almost zero, and meanwhile, only ablating any one of them cannot effectively reduce the ASRs, implying the infected MLPs are decentralized in the last five layers. This finding reveals the difference in the locations and features of infected AHs and MLPs. + +(3) Not all AHs in the last layer are infected and even some AHs could still maintain the original property-specific roles (e.g., "color" and "location"). By visualizing head-specific attention maps as shown in Figure 3, we found that some AHs do not catch the triggers and have lower Mean Maximum Distances (MMDs) compared with clean counterparts, thereby indicating these AHs are not affected. Beyond exploring the characteristics of infected AHs and MLPs in the visual modality, motivated by the algorithm TEXTSPAN (Gandelsman et al., 2024), we further investigate the characteristics of infected AHs or MLPs in the text modality by CLIP' text representations. The experimental results are shown in Figure 3 and Figure 4. We can see that certain infected AHs' descriptive texts have no significant change in semantics, e.g., the 4th AH and the 10th AH, where the descriptive texts of clean and infected AHS are both related to the property-specific roles (e.g., "color" and "location"), while the infected MLPs generally have different semantic descriptive texts (clean MLPs commonly have no property-specific roles). This finding reveals the different multimodal characteristics of infected AHs and MLPs. + +These observations motivate us to defend against backdoor attacks by repairing representations of infected model components or filtering backdoor samples. Specifically, we directly mean-ablate MLPs in the last five layers for global perturbation-based attacks due to the decentralization of infected MLPs. For local patch-based attacks, instead of removing all AHs in the last layer, we selectively mean-ablate AHs that are much affected by backdoor attacks. To this end, we construct head-specific prototypes by averaging head-specific representations from a small proportion of clean validation data. Based on these head prototypes, we select the AHs with lower cosine similarity between their representations and the corresponding head prototypes as the heavily-infected ones. Then, we can repair representations of these selected AHs or directly filter samples with too many heavily-infected AHs. Extensive experiments verify the effectiveness of our method to directly defend against various backdoor attacks and further improve existing advanced defense methods. Our main contributions can be summarized as follows: + +- Comprehensive empirical study. We conduct a comprehensive empirical study on how backdoor attacks affect CLIP and present three insightful findings. +- Novel backdoor defense methods. Motivated by these findings, we design two novel backdoor defense methods + +that detect infected AHs, repair representations, or filter samples. + +- Strong experimental results. Extensive experiments validate the effectiveness of repairing representations and the scalability of the method to existing defense methods. + +# 2. Preliminary + +In this section, we introduce the necessary symbols to define backdoor attacks on CLIP, present the structure of vision transformers (ViTs), and show the representation decomposition on CLIP. + +The threat model (CLIP). Generally, CLIP (Radford et al., 2021) mainly consists of a visual encoder denoted by $\mathcal{V}(\cdot)$ , a textual encoder denoted by $\mathcal{T}(\cdot)$ , a projection matrix $\pmb{P}$ that projects visual and textual representations into the joint space. The training data of CLIP contains about 400 million image-text pairs crawled from the Internet denoted by $\mathcal{D} = \{(x_i, t_i)\}_{i=1}^N$ where $t_i$ is the caption text of the image $x_i$ . In the context of backdoor attacks (Li et al., 2021; Wenger et al., 2021), a malicious adversary could poison a small proportion of backdoor image-text pairs denoted by $\widetilde{\mathcal{D}}_{\mathrm{BD}} = \{(\widetilde{x}_i, \widetilde{t}_i)\}_{i=1}^{N_{\mathrm{BD}}}$ where $\widetilde{x}_i = (1 - \mathcal{M}) \otimes x_i + \mathcal{M} \otimes \Theta$ is a backdoor image with the trigger pattern $\Theta$ (Gu et al., 2017; Chen et al., 2017), a mask $\mathcal{M}$ , and $\widetilde{t}_i = T(y_t)$ is the proxy caption for the target class $y_t$ . Then, the original training dataset could be poisoned as $\widetilde{\mathcal{D}} = \{\widetilde{\mathcal{D}}_{\mathrm{BD}} \cup \mathcal{D}\}$ . During the training stage, given a batch of $\widetilde{N}_b$ image-text pairs, the cosine similarity for image-text pairs is denoted by $S_{ij} = \phi(\widetilde{x}_i, \widetilde{t}_j) = \cos(PV(\widetilde{x}_i), PT(\widetilde{t}_j))$ , and the CLIP loss can be formalized by the follows. + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {C L I P}} = - \frac {1}{2 \tilde {N} _ {b}} \left(\sum_ {i = 1} ^ {\tilde {N} _ {b}} \log \left[ \frac {\exp \left(S _ {i j} / \tau\right)}{\sum_ {j = 1} ^ {\tilde {N} _ {b}} \exp \left(S _ {i j} / \tau\right)} \right] \right. \tag {1} \\ + \sum_ {j = 1} ^ {\tilde {N} _ {b}} \log \Big [ \frac {\exp (\phi (S _ {j i} / \tau)}{\sum_ {i = 1} ^ {\tilde {N} _ {b}} \exp (S _ {i j} / \tau)} \Big ], \\ \end{array} +$$ + +where $\tau$ is a temperature parameter. After multimodal contrastive learning on the poisoned data, the trigger $\Theta$ would have a strong correlation with the name of the target class $y_{t}$ . We formally define the thread model as $\{\widetilde{\mathcal{V}} (\cdot),\widetilde{\mathcal{T}} (\cdot)\}$ . During the inference stage, when encountering the image $\widetilde{\boldsymbol{x}}_i$ attached with the trigger, the posterior probability of the image for the $y_{t}$ -th target class would become very high, which makes the model output the adversary-desirable label. + +Architecture of ViTs. Specifically, in this paper, we use ViTs (Dosovitskiy et al., 2020) as the visual encoder. ViTs mainly consist of $L$ residual attention blocks, each containing a multi-head self-attention (MHSA) structure and a multi-layer perception (MLP), followed by skip connections (He et al., 2016) and layer normalization (LN). As + +the input of ViTs, each image $\boldsymbol{x}_i \in \mathbb{R}^{H \times W \times 3}$ is split into $N$ non-overlapping image patches, which are projected linearly into $N$ $d$ -dimensional vectors. Moreover, positional embeddings are added to them to create the image tokens $\{z_i^0\}_{i \in 1, \dots, N}$ . Notably, an additional class token $z_0^0 \in \mathbb{R}^d$ , is also introduced to aggregate token information. In this way, we denote the matrix $Z^0 \in \mathbb{R}^{d \times (N + 1)}$ by the initial state of the input. The calculation procedure for the $l$ -th layer in ViTs can be presented below. + +$$ +\begin{array}{l} \hat {\boldsymbol {Z}} ^ {l} = \operatorname {M H S A} ^ {l} (\operatorname {L N} (\boldsymbol {Z} ^ {l - 1})) + \boldsymbol {Z} ^ {l - 1}, \\ \boldsymbol {Z} ^ {l} = \operatorname {M L P} ^ {l} \left(\ln \left(\hat {\boldsymbol {Z}} ^ {l}\right)\right) + \hat {\boldsymbol {Z}} ^ {l}. \tag {2} \\ \end{array} +$$ + +Specifically, the first column in $Z^l$ indicates the class to-ken $[Z^l]_{\mathrm{cls}}$ . Finally, the image representation $\mathcal{R}(\boldsymbol{x}_i)$ can be denoted as the linear projection from the ViT output: $\mathcal{R}(\boldsymbol{x}_i) = P\mathcal{V}(\boldsymbol{x}_i) = P[Z^L]_{\mathrm{cls}}$ . + +Decomposing CLIP's image representations. Considering the residual structure of ViTs, Gandelsman et al. (2024) proposed to express its output as a sum of the direct contributions of individual layers of the model. + +$$ +\begin{array}{l} \mathcal {R} (\boldsymbol {x} _ {i}) = \boldsymbol {P} [ \boldsymbol {Z} ^ {0} ] _ {\mathrm {c l s}} + \sum_ {l = 1} ^ {L} \boldsymbol {P} [ \mathrm {M H S A} ^ {l} (\boldsymbol {Z} ^ {l - 1}) ] _ {\mathrm {c l s}} \\ + \sum_ {l = 1} ^ {L} \boldsymbol {P} \left[ \mathrm {M L P} ^ {l} \left(\hat {\boldsymbol {Z}} ^ {l}\right) \right] _ {\mathrm {c l s}}. \tag {3} \\ \end{array} +$$ + +Note that the representation decomposition ignores the effect of $\mathrm{LN}(\cdot)$ to simplify derivations. More analysis of the effect of layer normalization can be found in Appendix A.1 of Gandelsman et al. (2024). Furthermore, following Elhage et al. (2021), a more fine-grained output of MHSA can be rewritten as a sum over $H$ independent attention heads (AHs) and the $N$ input tokens. + +$$ +\left[ \mathrm {M H S A} ^ {l} \left(\boldsymbol {Z} ^ {l - 1}\right) \right] _ {\mathrm {c l s}} = \sum_ {h = 1} ^ {H} \sum_ {n = 0} ^ {N} \boldsymbol {x} _ {i} ^ {l, h}, \tag {4} +$$ + +where $\pmb{x}_i^{l,h} = \alpha_i^{l,h}\pmb{W}^{l,h}\pmb{z}_i^{l - 1},\pmb{W}^{l,h}$ are transition matrices, and $\alpha_{i}^{l,h}$ are the attention weights from the class token to the $i$ -th token in the $h$ -th head $(\sum_{i = 0}^{N}\alpha_{i}^{l,h} = 1)$ . Therefore, the second term in Eq. (3) can be rewritten as: $\begin{array}{r}\sum_{l = 1}^{L}\boldsymbol {P}[\mathrm{MHSA}^l (\boldsymbol {Z}^{l - 1})]_{\mathrm{cls}} = \sum_{l = 1}^{L}\sum_{h = 1}^{H}\sum_{n = 0}^{N}\boldsymbol{c}_{n,l,h} \end{array}$ where $\pmb{c}_{n,l,h} = \pmb {P}\pmb{x}_i^{l,h}$ . Specifically, the decoupled representations of $H$ AHs across $L$ layers can be denoted by $C_\mathrm{head} = \sum_{n = 0}^N c_{n,l,h}\in \mathbb{R}^{L\times H}$ . We can interpret them via CLIP's text representations by directly calculating their cosine similarities in the joint vision-language space. + +# 3. A Closer Look at Backdoor Attacks on CLIP + +In this section, we conduct preliminary experiments to investigate how backdoor attacks affect CLIP. Specifically, we consider four backdoor attacks (i.e., BadNet (Gu et al., + +![](images/73227f10abe3dcb5e335b3d4fa1269875a220b918f655ea95b00af6b5f7f24d5.jpg) +Figure 3. Visualization of (selected) AHs in the last layer. Larger head-specific MMD scores indicate greater distribution differences in the representation of AHs. On the other hand, larger text similarities mean smaller semantic changes in AHs' descriptive texts. + +2017), Blended (Chen et al., 2017), ISSBA (Li et al., 2021), and BadCLIP (Liang et al., 2023)) to poison CLIP (Bansal et al., 2023; Carlini & Terzis, 2022), thereby producing four types of backdoored CLIPs respectively. The details of backdoor attacks are shown in Appendix D.1. To explore the effect of backdoor attacks on each model component, we use mean-ablation (Gandelsman et al., 2024) that replaces representations of potentially infected components with mean representations of corresponding components from clean validation images. In this way, we can validate the effect of backdoor attacks on the component by comparing attack success rates (ASR) and clean accuracy (CACC). We conduct this experiment on the ImageNet-1K validation dataset, using $20\%$ of the images as the clean validation data. We mainly explore the effect of backdoor attacks on attention heads (AHs) and multi-layer perceptrons (MLPs). The key findings are summarized as follows. + +Finding 1: different backdoor attacks would infect different model components, i.e., local patch-based backdoor attacks mainly affect AHs, while global perturbation-based backdoor attacks mainly affect MLPs. First of all, we directly mean-ablate all AHs or MLPs. From the results in Figure 1, we can see that after mean-ablating all MLPs, the ASRs of BadNet and BadCLIP have little effect compared with their baseline ASR (dashed lines), while the ASRs of Blended and ISSBA dramatically decrease nearly to zero. Conversely, when mean-ablating all AHs, the ASR of Bad- + +Net and BadCLIP become almost zero, while the ASR of Blended and ISSBA remain unchanged. This observation indicates that BadNet and BadCLIP mainly affect AHs, while Blended and ISSBA primarily affect MLPs. Besides, mean-abating all MLPs has little effect on the CACC (nearly reduced by $6\% \sim 7\%$ ), while mean-ablating all AHs greatly decreases the CACC to reach almost zero. This observation is consistent with the finding in (Gandelsman et al., 2024) that MLPs have a negligible effect on generalization, while AHs capture useful information for generalization. + +Explanation for finding 1. The potential reason for this observation lies in the characteristics of their triggers. Specifically, the triggers of BadNet and BadCLIP are local patches located in a small area of the image, while the triggers of Blended and ISSBA are noise pixels embedded into the entire image. Considering the multi-head self-attention mechanism in ViTs that can encode contextual cues of a sequence of image patches, the information of local patch triggers is easier to encode into AHs than that of global noise pixels. Conversely, MLPs mainly focus on aggregating representation information from AHs, which attends to global noise pixels (Gu et al., 2022). + +Finding 2: infected AHs are centered on the last layer, while infected MLPs are decentralized on several late layers. Here, we further explore the effect of backdoor attacks on AHs or MLPs in various model layers. Specifi + +![](images/57bbbf67455538971ad06f7fd785af24ebde880c7fc99b2f227a7111ab559ff4.jpg) +Figure 4. Visualization of Top-5 descriptive texts on MLPs. Each rectangular box indicates one layer's MLP. + +![](images/e9a19f102721e90d72e1b955d4775642e7a226ed76c133513ee6dff73aadd304.jpg) + +![](images/a90b52378c4959cdc46f49a4911742d0b2b32de21d5455dad1c5db5392e92616.jpg) + +cally, we use three types of mean-ablation schemes, i.e., forward/backward/separate ablation. Forward ablation means that we ablate AHs or MLPs in sequence up to a given layer. Conversely, backward ablation means that we ablate AHs or MLPs in the reversed sequence up to a given layer. Separate ablation indicates that we only ablate AHs or MLPs on a given layer. Figure 2 (a)-1/2, (b)-1/2, (c)-1/2 show the ASR results of forward, backward, and separate AH/MLP ablation respectively respectively. We can see that only ablating the last layer's AHs can cause a large decrease in the ASR of BadNet and BadCLIP. This observation implies that infected AHs are centered on the last layer. In contrast, only ablating MLPs in the last five layers makes the ASR of Blended and ISSBA reach zero, which indicates that infected MLPs are decentralized on the last five layers. Furthermore, we found an intriguing phenomenon that ablating any one layer's MLP has a limited effect on the ASR. This observation indicates that infected MLPs are decentralized, i.e., ablating one would have a negligible effect on the overall. Besides, we use Mean Maximum Discrepancy (MMD) (Arbel et al., 2019) to evaluate the distribution difference between representations of clean and backdoor images on AHs or MLPs in each model layer. The results are shown in Figure 8 (d)-1/2 in Appendix 8. We can also find that AHs in the last model layer have large MMD scores on BadNet and BadCLIP, and MLPs in the last five layers have large MMD scores on Blended and ISSBA. + +Explanation for finding 2. The potential reason lies in the visual patterns of their triggers. Specifically, local patch triggers are regional pixels and resemble high-level visual properties (e.g., "ear" and "eye"), which are easier to encode as high-level visual patterns in the last AHs, while global noise pixels are scattered and resemble low-level visual information (e.g., "texture" and "shape") encoded in the last several MLPs (Park & Kim, 2022). + +Finding 3: Not all AHs in the last layer are infected, and even some AHs could still maintain the original property + +specific roles (e.g., "color" and "location"). We further explore the characteristics of infected AHs and MLPs. Note that we only target AHs in the last layer on BadNet and BadCLIP, and MLPs on Blended and ISSBA. Firstly, we aim to visualize head-specific attention token maps toward the class text (i.e., an image of a [class name]) to examine the contribution of each head toward the class. Benefiting from representation decomposing, we can achieve this aim by directly calculating the cosine similarity between the decoupled representation of the $h$ -th AH on the $l$ -th layer $(C_h^l)$ and the text representation. The results are shown in Figure 3. We can see that although many AHs on BadNet and BadCLIP attend to the triggers, some AHs, e.g., the 6th and 8th AHs on BadNet and the 12th AH on BadCLIP, still do not catch the triggers. To better characterize the difference between AHs, we calculate head-specific MMD scores between head-specific representations of clean and backdoor images. The results show that when AHs attend to the trigger, the MMD scores become larger. Otherwise, the MMD scores are relatively low when they do not catch the trigger. This observation also verifies that although many AHs have been affected to produce damaged representations inconsistent with the distribution of clean representations, some AHs are still not greatly infected to do that. + +Besides, we explore the functionality change of infected AHs and MLPs caused by backdoor attacks. Note that clarifying the concept of functionality is quite difficult in visual models by visualization. Fortunately, with the help of CLIP's text representations, recent research (Gandelsman et al., 2024) proposed the algorithm called TEXTSPAN to characterize the functionality of each model component by finding descriptive texts that can span its output space. Based on this algorithm, we can find two types of descriptive texts for infected (clean) AHs and MLPs by using backdoor (clean) images. Then, we can compare the semantic differences between two types of descriptive texts on the same AHs or MLPs, thereby identifying whether and how their + +![](images/27654c977e3d3af96eb100e9c345051d0820ba96dc7fb952d15ce9fb6a51b5cf.jpg) + +![](images/172263fbc9aa37444d1f11a165b757c69ff1cc6414cf946ae3034c0a6e95b869.jpg) + +![](images/a9bb9abf7e1dd75c12d9758b4e5bd1ad831daa7deebe67b51de28511b94dfd21.jpg) + +![](images/95101acd2167e50b7bc049999f7d6315d6f424d3bc19e7494a43ad192ff96728.jpg) + +![](images/3944a3ffe9ec7d203059f8222588cab40c5e0ae0873a01a64d08b4878bdfe7b1.jpg) +Figure 5. Empirical density distributions of the cosine similarity between the representations of clean (Green) / backdoor (Red) images and head-specific prototypes. + +![](images/813ca4f03555b4a5acead95ae6988df2e0a379bf9d7165689e787298f9d73c19.jpg) + +![](images/1400d02ca30a3b652009091c0826c634d94ab862c39a2f3d040accff73a286dd.jpg) + +![](images/0fd826cd345f2e45bf25f253ac72004c85a462d4da37b709c474dd448bfb9846.jpg) + +functionality has changed. The results of AHs are shown in Figure 3. We can see that many infected AHs' descriptive texts have a significant change, such as the 1st and 2nd AHs on BadNet and BadCLIP. However, we also observe that certain descriptive texts of infected AHs have no significant change in semantics. For example, descriptive texts of the 4th AH on BadNet and BadCLIP are both about color, and descriptive texts of the 10th AH on BadNet and BadCLIP are both related to location. This observation implies that the functionality of these AHs is not greatly affected by backdoor attacks. As for the results of MLPs in Figure 4, we found descriptive texts of MLPs in the last five layers have a distinct semantic difference, while that of MLPs in other layers have negligible changes in semantics. + +Explanation for finding 3. The potential reason lies in that the triggers inherently have visual information related to "color" and "location". Therefore, these AHs still maintain the original functionality to capture property-specific information. On the other hand, the property-specific roles of these AHs are relatively clear but simple. Note that many AHs in ViTs generally have no clear property-specific roles (Gandelsman et al., 2024). This might be because these AHs commonly collaborate to characterize complex property-specific roles so that they are easier to be affected by backdoor attacks compared with the AHs with simple property-specific roles. + +# 4. Backdoor defense countermeasures + +Motivated by the above findings, in this section, we will design two different countermeasures against backdoor attacks on CLIP, i.e., (i) repairing representations of infected model components and (ii) detecting (filtering) backdoor + +samples. Note that we directly mean-ablate MLPs in the last five layers for global perturbation-based attacks due to the decentralization of infected MLPs, and mainly discuss the countermeasures against local patch-based attacks in the next. + +(i) Repairing representations of infected AHs. Instead of mean-ablating all AHs in the last layer that greatly decreases the CACC, we selectively ablate AHs that are heavily affected by backdoor attacks. Specifically, we first construct head-specific prototypes by averaging representations from a small proportion of clean validation data $\{\pmb{x}_i\}_{i=1}^{N_v}$ where $N_v$ is the number of validation data. To simplify the mathematical notations, we only consider AHs in the last layer and omit the symbol $L$ . Formally, the $h$ -th head prototype can be denoted by $\Psi_h = M(\{C_i^h\}_{i=1}^{N_v})$ where $M(\cdot)$ is the mean operator and $C_i^h$ is the decoupled representation of the $i$ -th sample on the $h$ -th AH. What's more, we denote $S_{i,h} = \phi(\Psi_h, C_i^h)$ by the cosine similarity between the $i$ -th sample's representation on the $h$ -th AH and the corresponding $h$ -th prototype. Intuitively, we consider the AHs with lower cosine similarity between their representations and the corresponding head prototypes to be heavily affected (the distribution difference is shown in Figure 5.). To this end, we propose the following AH selector for the $h$ -th AH of the image $\pmb{x}_i$ : $\Phi_{i,h} = 1$ if $S_{i,h} < \epsilon$ else returns zero, where $\epsilon$ is a similarity threshold. In this way, for each image, we detect many infected AHs in the last layer. Then, we can repair the representations of these selected AHs by replacing them with corresponding head-specific prototypes. The analysis of $\epsilon$ is shown in Figure 6 in the experiment. + +(ii) Detecting backdoor samples by inspecting infected AHs. After selecting much-infected AHs for each image, another alternative is identifying (and filtering) potential backdoor + +Table 1. ASR (↓%) and CACC (↑%) on ImageNet-1K. "Base-Decomp" indicates the original representation decomposing. "Decomp-Rep" denotes our method of repairing representations. + +
MethodsBadNetBlendedLabel ConsistentISSBABadCLIP
ASRCACCASRCACCASRCACCASRCACCASRCACC
No Defense86.0956.7299.5656.6299.3256.6870.1256.2299.7860.73
+ Base-Decomp88.5853.7197.7253.1687.6752.8773.0253.3299.5956.28
+Decomp-Rep21.4552.250.4745.1617.5051.426.3345.680.9456.08
CleanCLIP54.2355.3226.7354.5461.3454.4953.2155.3069.0355.92
+ Base-Decomp64.8450.3112.4551.4566.9149.6557.0151.7065.6951.23
+Decomp-Rep41.4949.299.5850.4327.6348.7848.1848.0337.0950.65
+ +Table 2. AUROC (↑) performance on ImageNet-1K, Caltech-101, and Oxford Pets. "Decomp-Det" denotes our method of detecting backdoor samples. The best result is highlighted in bold. + +
MethodsBadNetImageNet-1K Label ConsistentBadCLIPCaltech-101 BadNetOxford Pets BadNetAverage
STRIP0.7720.8030.7940.8680.8910.826
SCALE-UP0.7370.6900.6320.6980.7650.704
TeCo0.8270.7990.6370.6890.8330.757
Decomp-Det0.9200.9240.9900.9460.9400.944
+ +samples, i.e., backdoor sample detection (Gao et al., 2019; Guo et al., 2023). Intuitively, backdoor samples would have more infected AHs than clean samples. Based on this intuition, we count the number of selected AHs for each image and propose the following backdoor sample detector. + +$$ +\Omega_ {i, h} = \left\{ \begin{array}{l l} 1, & \text {i f} \sum_ {h = 1} ^ {H} \Phi_ {i, h} > \zeta , \\ 0, & \text {o t h e r w i s e .} \end{array} \right. \tag {5} +$$ + +where $\zeta$ is a threshold. The pseudo-code of our methods is shown in Appendix C. + +# 5. Experiment + +# 5.1. Experimental Setup + +Backdoor attacks on CLIP. We use five backdoor attacks: BadNet (Gu et al., 2017), Blended (Chen et al., 2017), Label Consistent (Turner et al., 2019), ISSBA (Li et al., 2021), and BadCLIP (Liang et al., 2023). Following the previous work (Liang et al., 2023; Bansal et al., 2023), we select 500K image-pairs from CC3M (Sharma et al., 2018) and poison 1,500 pairs of them by the strategies of five backdoor attacks. Due to the limited storage and computational resources, we use the open-sourced CLIP model as the pre-trained clean model and fine-tune it on the poisoned data to obtain the backdoored CLIP. The details of backdoor attacks are provided in Appendix D.1. We evaluate our methods on ImageNet-1K (Russakovsky et al., 2015), Caltech-101 (Fei-Fei et al., 2004), and Oxford Pets (Parkhi et al., 2012). More details of these datasets are provided in Appendix B.1. + +Comparing methods. For the task of repairing represent- + +tations, we use the original backdoored CLIP as the baseline and compare the defense performance of basic representation decomposing. Furthermore, our method can be used in the fine-tuned CLIP by CleanCLIP (Bansal et al., 2023). The details of CleanCLIP are provided in Appendix D.2. For the task of detecting backdoor samples, we compare three detection methods: STRIP (Gao et al., 2019), SCALE-UP (Guo et al., 2023), and TeCo (Liu et al., 2023b). Implementation details of these methods can be found in Appendix D.3. + +Evaluation metrics. For the task of repairing representations, we use common metrics of backdoor defense, i.e., attack success rate (ASR), and clean accuracy (CACC). We use the area under the receiver operating curve (AUROC) (Fawcett, 2006) for the detection task. Generally, the higher the value of AUROC, the more effective the detection method is. + +Implementation details. We follow Gandelsman et al. (2024) to decompose image representations and preserve them for further investigation. In the proposed method, the value of $\epsilon$ is set to 0.0025, 0.002, and 0.001 on ImageNet-1K, Caltech-101, and Oxford Pets, respectively. The value of $\zeta$ is set to 5. The proportion of clean validation data is set to 0.2. We use ViT-B/32 as the backbone. + +# 5.2. Experimental Results + +The experimental results of repairing representations and detecting backdoor samples are shown in Table 1 on ImageNet-1K, Table 4 on Caltech-101, and Oxford Pets. From these tables, we can conclude the following points. + +Table 3. Comparison of different strategies of abating fixed, random AHs, and reverse-ablation (denoted by "Decomp-Reverse"). "Base-Decomp" means using the original decomposed representation. "BadNet-C" ("BadNet-O") means BadNet on Caltech-101 (Oxford pets). + +
MethodsBadNetLabel ConsistentBadCLIPBadNet-CBadNet-O
ASRCACCASRCACCASRCACCASRCACCASRCACC
No Defense86.0956.7299.3256.6899.7860.7386.0492.6191.8077.46
+ Base-Decomp88.5853.7187.6752.8799.5956.2890.4590.5194.7876.80
+ Decomp-Rep21.4552.2517.5051.420.9456.084.6987.9534.8475.00
+ Fixed [1, 2, 3]86.5349.7287.7149.4299.1851.7882.7088.9394.3877.18
+ Fixed [7, 8, 9]88.6847.8688.7447.5158.1250.1886.8486.0792.0676.12
+ Fixed [10, 11, 12]88.8246.7288.2946.7299.5749.7890.9789.6496.2940.91
+ Random AHs72.8248.3077.7346.1682.3448.8670.1787.3483.2568.31
Original Clean-56.72-56.68-60.73-92.61-77.46
+ Decomp-Reverse47.1527.8539.7232.4280.5410.0732.1960.5118.4670.23
+ +Table 4. ASR ( $\downarrow\%$ ) and CACC ( $\uparrow\%$ ) comparison on Caltech-101 and Oxford Pets. "Base-Decomp" indicates using the original decomposed representation. + +
MethodsCaltech-101 (accordion)Oxford Pets (samoyed)
ASRCACCASRCACC
No Defense86.0492.6191.8077.46
+ Base-Decomp90.4590.5194.7876.80
+ Decomp-Rep4.6987.9534.8475.00
CleanCLIP31.4889.5570.6573.73
+ Base-Decomp40.7687.1473.0566.21
+ Decomp-Rep15.5186.9832.7666.51
+ +Basic representation decomposing has little defense effect. We can see that using the original representation decomposition can not significantly decrease the ASR of backdoor attacks, and even increase them in some cases (e.g., Bad-Net on ImageNet-1K). This observation implies backdoor attacks have little indirect effect on model components since representation decomposing only considers the direct effects of model components and neglects all indirect effects. Meanwhile, using representation decomposing decreases CACC slightly (i.e., CACC drops by $2\% \sim 3\%$ ), which implies that the indirect effects of decomposing have little effect on generalization. + +Decomp-Rep achieves strong defense performance. Based on the basic representation decomposing, Decomp-Rep further repairs representations of heavily infected attention heads (AHs), which greatly decreases the ASR of backdoor attacks and maintains the CACC. Specifically, Decomp-Rep reduces the ASR of BadCLIP, a state-of-the-art backdoor attack, to near zero while maintaining the CACC, which verifies the superiority of Decomp-Rep. Besides, we also show the performance of repairing representations on Caltech-101 and Oxford Pets as shown in Table 4. We can see that our method also achieves superior performance. This observation implies that our method is scalable to other datasets. + +Decomp-Rep can further improve the defense performance of CleanCLIP. When using the fine-tuned CLIP by Clean + +CLIP, Decomp-Rep can further reduce the ASR of backdoor attacks. This observation validates the scalability of Decomp-Rep to existing defense methods (Decomp-Rep is plug-and-play with these defense methods). + +Decomp-Det achieves superior detection performance. We can see that Decomp-Det achieves superior performance in all cases by a significant margin. Specifically, the average AUROC performance of our method exceeds STRIP, SCALE-UP, and TeCo by 0.118, 0.220, and 0.187, respectively, which validates the superiority of Decomp-Det. Specifically, we found that Decomp-Det can achieve better detection performance against powerful backdoor attacks, e.g., BadCLIP. + +# 5.3. Further analysis on repairing representations + +In this section, we further analyze the proposed representation repairing method by exploring the effects of ablating different AHs and poisoning clean representations of the affected representations of selected AHs. + +Repairing representations of fixed and random AHs. To further validate the effectiveness of selected AHs in Decomp-Rep, we also conduct experiments of mean-ablating different fixed AHs,i.e., [1, 2, 3], [7, 8, 9], and [10, 11, 12] indicating AHs in the corresponding location of the last model layer. The experimental results are shown in Table 3. From the table, we can see that these strategies of ablating fixed AHs have a limited ability to reduce the ASR in almost all cases compared with the cases of no defense and basic representation decomposition. This observation reveals that the distribution of infected AHs is quite different in backdoor images, so we can not simply specify fixed infected AHs for all backdoor images. This is also why we use the strategy in Decomp-Rep, which detects heavily infected AHs for each image. On the other hand, ablating more random AHs achieves a slightly better performance in ASR compared with the fixed strategies, but still fails to reduce the ASR effectively. + +Table 5. Ablation study on ImageNet-1K "w/o All AHs" means ablating all attention heads; "w/o All MLPs" means ablating all MLPs; "w Abandon" means directly replacing representations with zero values; "w Random Prototypes" means replacing representations with random values. + +
AblationBadNetBlendedLabel ConsistentISSBABadCLIP
ASRCACCASRCACCASRCACCASRCACCASRCACC
w/o All AHs1.212.1099.912.263.011.9197.552.110.012.45
w/o All MLPs88.8744.830.4144.5688.9844.351.9445.0599.5646.05
w Abandon44.4251.660.4843.2834.5750.642.5843.4663.1953.12
w Random Prototypes0.3912.870.010.180.026.940.010.101.3135.18
Decomp-Rep21.4552.250.7745.2517.5051.426.3345.6825.0853.72
+ +![](images/c6e6864f9b596abbc322e38cb56358e63d6a2762e1bba78ff2ca0f226fcf1ddc.jpg) +Figure 6. Parameter analysis on the value of $\epsilon$ . + +Reversely poisoning representations of the selected AHs into clean images. Besides, to further validate the effect of infected AHs, we design a reverse-engineering experiment denoted by "Decomp-Reverse" that uses the representations of selected affected AHs to replace the clean representations of the same AHs in clean images. The results are shown in Table 3. From the table, we can see that using the affected representations of the selected AHs significantly increases the ASR against various backdoor attacks while reducing the CACC. This observation indicates that the selected AHs indeed contain the representation information of triggers and will construct a connection between clean images and triggers, thereby greatly increasing the ASR. + +# 5.4. Parameter analysis + +Here, we evaluate the value of $\epsilon$ in Eq. (5). The results are shown in Figure 6. We can see that as the value of $\epsilon$ increases, the ASR of backdoor attacks decrease gradually. This is because more attention heads will be ablated as the value of $\epsilon$ increases. However, the CACC of backdoor attacks also has a large decrease because ablating more falsely selected AHs degrades the generalization of image representations. This observation indicates that we should select affected AHs for repairing as much as possible. Therefore, it is very crucial to select the appropriate value of $\epsilon$ . + +# 5.5. Ablation Study + +Here, we conduct the ablation study to investigate the significance of each part in our method. The results are shown in Table 5. "w/o All AHs" means ablating all attention heads. This ablation makes the ASR of BadNet, Label Consistent, + +and BadCLIP reach near zero but has little effect on the ASR of Blended and ISSBA, meanwhile greatly decreasing the CACC for all backdoor attacks. On the other hand, "w/o All MLPs" means ablating all MLPs, which makes the ASR of Blended and ISSBA reach near zero but has little effect on the ASR of BadNet, Label Consistent, and BadCLIP, meanwhile slightly decreasing the CACC for all backdoor attacks. These two cases validate the necessity of selectively mean-ablating AHs and MLPs. Moreover, we will conduct an ablation study on the strategy of repairing representations of infected AHs and MLPs. Specifically, "w Abandon" means directly replacing representations with zero values. This strategy has a positive effect on decreasing the ASR compared with the basic representation decomposing (meanwhile slightly decreasing the CACC), but is still degraded compared with our strategy of using head-specific prototypes. "w Random Prototypes" means replacing representations with random values followed by a standard normal distribution. This strategy greatly decreases both the ASR and CACC of all backdoor attacks, indicating that these random values destroy the representation information. Meanwhile, this observation also indicates that it is significant to use higher-quality representations to repair representations of backdoor images. Overall, our selective ablation of AHs is a significant strategy in Decomp-Rep, which can effectively eliminate infected AHs and have little effect on other AHs. + +# 6. Conclusion + +In this paper, we present a comprehensive empirical study of how backdoor attacks affect CLIP. Our empirical findings reveal the attack preference of backdoor attacks on model components, the difference in the locations of infected components, and the different effects of backdoor attacks on the functionality of infected components. Inspired by these findings, we propose to repair representations of infected components or filter backdoor samples. Experimental results validate the empirical findings and the effectiveness of our methods. We hope that our findings can motivate more researchers to design effective defense methods against backdoor attacks on CLIP. + +# Acknowledgment + +This research is supported by the National Research Foundation Singapore and DSO National Laboratories under the AI Singapore Programme (AISG Award No: AISG2-GC-2023-009 and AISG4-GC-2023-009-1B). Feng Liu is supported by the Australian Research Council (ARC) with grant number DE240101089, LP240100101, DP230101540 and the NSF&CSIRO Responsible AI program with grant number 2303037. + +# Impact Statement + +Our research contributes to AI security by investigating how backdoor attacks affect CLIP, which has a positive social impact. However, we acknowledge the possibility that tricky attackers could use our findings to design specialized methods to attack CLIP. Future work should explore the robustness of our method against adaptive attacks. + +# References + +Arbel, M., Korba, A., Salim, A., and Gretton, A. Maximum mean discrepancy gradient flow. In NeurIPS, volume 32, 2019. +Bai, J., Gao, K., Min, S., Xia, S.-T., Li, Z., and Liu, W. Badclip: Trigger-aware prompt learning for backdoor attacks on clip. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 24239-24250, 2024. +Bansal, H., Singhi, N., Yang, Y., Yin, F., Grover, A., and Chang, K.-W. Cleanclip: Mitigating data poisoning attacks in multimodal contrastive learning. In ICCV, pp. 112-123, 2023. +Carlini, N. and Terzis, A. Poisoning and backdooring contrastive learning. In ICLR, 2022. +Carlini, N., Jagielski, M., Choquette-Choo, C. A., Paleka, D., Pearce, W., Anderson, H., Terzis, A., Thomas, K., and Tramér, F. Poisoning web-scale training datasets is practical. arXiv preprint arXiv:2302.10149, 2023. +Chen, H., Yang, J., Vondrick, C., and Mao, C. Invite: Interpret and control vision-language models with text explanations. In ICLR, 2024. +Chen, W., Wu, B., and Wang, H. Effective backdoor defense by exploiting sensitivity of poisoned samples. In NeurIPS, pp. 9727-9737, 2022. +Chen, X., Liu, C., Li, B., Lu, K., and Song, D. Targeted backdoor attacks on deep learning systems using data poisoning. arXiv preprint arXiv:1712.05526, 2017. + +Chen, Y., Qi, F., Gao, H., Liu, Z., and Sun, M. Textual backdoor attacks can be more harmful via two simple tricks. arXiv preprint arXiv:2110.08247, 2021. +Doan, K., Lao, Y., and Li, P. Backdoor attack with imperceptible input and latent modification. In NeurIPS, pp. 18944-18957, 2021. +Doan, K. D., Lao, Y., Yang, P., and Li, P. Defending back-door attacks on vision transformer via patch processing. In AAAI, pp. 506-515, 2023. +Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020. +Elhage, N., Nanda, N., Olsson, C., Henighan, T., Joseph, N., Mann, B., Askell, A., Bai, Y., Chen, A., Conerly, T., DasSarma, N., Drain, D., Ganguli, D., Hatfield-Dodds, Z., Hernandez, D., Jones, A., Kernion, J., Lovitt, L., Ndousse, K., Amodei, D., Brown, T., Clark, J., Kaplan, J., McCandlish, S., and Olah, C. A mathematical framework for transformer circuits. Transformer Circuits Thread, 2021. https://transformercircuits.pub/2021/framework/index.html. +Fawcett, T. An introduction to roc analysis. PRL, 27(8): 861-874, 2006. +Fei-Fei, L., Fergus, R., and Perona, P. Learning generative visual models from few training examples: An incremental bayesian approach tested on 101 object categories. In CVPR Workshop, pp. 178-178, 2004. +Feng, S., Tao, G., Cheng, S., Shen, G., Xu, X., Liu, Y., Zhang, K., Ma, S., and Zhang, X. Detecting backdoors in pre-trained encoders. In CVPR, pp. 16352-16362, 2023. +Gandelsman, Y., Efros, A. A., and Steinhardt, J. Interpreting clip's image representation via text-based decomposition. In ICLR, 2024. +Gao, Y., Xu, C., Wang, D., Chen, S., Ranasinghe, D. C., and Nepal, S. Strip: A defence against trojan attacks on deep neural networks. In ACSAC, pp. 113-125, 2019. +Gao, Y., Li, Y., Gong, X., Xia, S.-T., and Wang, Q. Backdoor attack with sparse and invisible trigger. arXiv preprint arXiv:2306.06209, 2023. +Gu, J., Tresp, V., and Qin, Y. Are vision transformers robust to patch perturbations? In ECCV, pp. 404-421. Springer, 2022. +Gu, T., Dolan-Gavitt, B., and Garg, S. Badnets: Identifying vulnerabilities in the machine learning model supply chain. arXiv preprint arXiv:1708.06733, 2017. + +Guo, J., Li, Y., Chen, X., Guo, H., Sun, L., and Liu, C. Scale-up: An efficient black-box input-level backdoor detection via analyzing scaled prediction consistency. arXiv preprint arXiv:2302.03251, 2023. +Han, X., Wu, Y., Zhang, Q., Zhou, Y., Xu, Y., Qiu, H., Xu, G., and Zhang, T. Backdooring multimodal learning. In IEEE SP, pp. 3385-3403. IEEE, 2024. +He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In CVPR, pp. 770-778, 2016. +Hernandez, E., Schwettmann, S., Bau, D., Bagashvili, T., Torralba, A., and Andreas, J. Natural language descriptions of deep visual features. In ICLR, 2022. +Hu, L., Liao, J., Lyu, W., Fu, S., Huang, T., Yang, S., Hu, G., and Wang, D. C^2 attack: Towards representation backdoor on clip via concept confusion. arXiv preprint arXiv:2503.09095, 2025. +Huang, H., Erfani, S., Li, Y., Ma, X., and Bailey, J. Detecting backdoor samples in contrastive language image pretraining. arXiv preprint arXiv:2502.01385, 2025. +Huang, K., Li, Y., Wu, B., Qin, Z., and Ren, K. Backdoor defense via decoupling the training process. In *ICLR*, 2023. +Li, Y., Li, Y., Wu, B., Li, L., He, R., and Lyu, S. Invisible backdoor attack with sample-specific triggers. In ICCV, pp. 16463-16472, 2021. +Li, Y., Jiang, Y., Li, Z., and Xia, S.-T. Backdoor learning: A survey. IEEE TNNLS, 2022. +Liang, S., Zhu, M., Liu, A., Wu, B., Cao, X., and Chang, E.-C. Badclip: Dual-embedding guided backdoor attack on multimodal contrastive learning. arXiv preprint arXiv:2311.12075, 2023. +Liang, S., Liu, K., Gong, J., Liang, J., Xun, Y., Chang, E.-C., and Cao, X. Unlearning backdoor threats: Enhancing backdoor defense in multimodal contrastive learning via local token unlearning. arXiv preprint arXiv:2403.16257, 2024. +Liu, M., Sangiovanni-Vincentelli, A., and Yue, X. Beating backdoor attack at its own game. In ICCV, pp. 4620-4629, 2023a. +Liu, X., Li, M., Wang, H., Hu, S., Ye, D., Jin, H., Wu, L., and Xiao, C. Detecting backdoors during the inference stage based on corruption robustness consistency. In CVPR, pp. 16363-16372, 2023b. + +Liu, Y., Ma, X., Bailey, J., and Lu, F. Reflection backdoor: A natural backdoor attack on deep neural networks. In ECCV, pp. 182-199. Springer, 2020. +Materzyńska, J., Torralba, A., and Bau, D. Disentangling visual and written concepts in clip. In CVPR, pp. 16410-16419, 2022. +Min, R., Qin, Z., Shen, L., and Cheng, M. Towards stable backdoor purification through feature shift tuning. In NeurIPS, 2023. +Min, R., Qin, Z., Shen, L., and Cheng, M. Towards stable backdoor purification through feature shift tuning. NeurIPS, 36, 2024. +Mo, X., Zhang, Y., Zhang, L. Y., Luo, W., Sun, N., Hu, S., Gao, S., and Xiang, Y. Robust backdoor detection for deep learning via topological evolution dynamics. In IEEE SP, pp. 171-171. IEEE Computer Society, 2024. +Nguyen, A. and Tran, A. Wanet-imperceptible warping-based backdoor attack. arXiv preprint arXiv:2102.10369, 2021. +Niu, Y., He, S., Wei, Q., Liu, F., and Feng, L. Bdetclip: Multimodal prompting contrastive test-time backdoor detection. arXiv preprint arXiv:2405.15269, 2024. +Park, N. and Kim, S. How do vision transformers work? In ICLR, 2022. +Parkhi, O. M., Vedaldi, A., Zisserman, A., and Jawahar, C. Cats and dogs. In CVPR, pp. 3498-3505. IEEE, 2012. +Qi, X., Xie, T., Wang, J. T., Wu, T., Mahloujifar, S., and Mittal, P. Towards a proactive ml approach for detecting backdoor poison samples. In USENIX Security, pp. 1685-1702, 2023. +Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al. Learning transferable visual models from natural language supervision. In ICML, pp. 8748-8763, 2021. +Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S., Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein, M., et al. Imagenet large scale visual recognition challenge. IJCV, 115:211-252, 2015. +Sharma, P., Ding, N., Goodman, S., and Soricut, R. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In ACL, pp. 2556-2565, 2018. +Shi, Y., Du, M., Wu, X., Guan, Z., Sun, J., and Liu, N. Blackbox backdoor defense via zero-shot image purification. In NeurIPS, 2023. + +Singh, N. D., Croce, F., and Hein, M. Perturb and recover: Fine-tuning for effective backdoor removal from clip. arXiv preprint arXiv:2412.00727, 2024. +Souri, H., Fowl, L., Chellappa, R., Goldblum, M., and Goldstein, T. Sleeper agent: Scalable hidden trigger backdoors for neural networks trained from scratch. In NeurIPS, pp. 19165-19178, 2022. +Subramanya, A., Koohpayegani, S. A., Saha, A., Tejankar, A., and Piriavash, H. A closer look at robustness of vision transformers to backdoor attacks. In WACV, pp. 3874-3883, 2024. +Sur, I., Sikka, K., Walmer, M., Koneripalli, K., Roy, A., Lin, X., Divakaran, A., and Jha, S. Tijo: Trigger inversion with joint optimization for defending multimodal backdoored models. In ICCV, pp. 165-175, 2023. +Tao, G., Wang, Z., Feng, S., Shen, G., Ma, S., and Zhang, X. Distribution preserving backdoor attack in self-supervised learning. In 2024 IEEE Symposium on Security and Privacy (SP), pp. 2029-2047. IEEE, 2024. +Tran, B., Li, J., and Madry, A. Spectral signatures in backdoor attacks. In NeurIPS, 2018. +Turner, A., Tsipras, D., and Madry, A. Label-consistent backdoor attacks. arXiv preprint arXiv:1912.02771, 2019. +Walmer, M., Sikka, K., Sur, I., Shrivastava, A., and Jha, S. Dual-key multimodal backdoors for visual question answering. In CVPR, pp. 15375-15385, 2022. +Wang, H., Xiang, Z., Miller, D. J., and Kesidis, G. Mm-bd: Post-training detection of backdoor attacks with arbitrary backdoor pattern types using a maximum margin statistic. In IEEE SP, pp. 1994-2012. IEEE, 2024. +Wang, Z., Mei, K., Zhai, J., and Ma, S. *Unicorn: A unified backdoor trigger inversion framework.* In *ICLR*, 2023. +Wenger, E., Passananti, J., Bhagoji, A. N., Yao, Y., Zheng, H., and Zhao, B. Y. Backdoor attacks against deep learning systems in the physical world. In CVPR, pp. 6206-6215, 2021. +Wu, X., Zhu, F., Zhao, R., and Li, H. Cora: Adapting clip for open-vocabulary detection with region prompting and anchor pre-matching. In CVPR, pp. 7031-7040, 2023. +Xiang, Z., Miller, D., and Kesidis, G. Post-training detection of backdoor attacks for two-class and multi-attack scenarios. In ICLR, 2022. +Xu, H., Ghosh, G., Huang, P.-Y., Okhonko, D., Aghajanyan, A., Metze, F., Zettlemoyer, L., and Feichtenhofer, C. Videoclip: Contrastive pre-training for zero-shot videotext understanding. In EMNLP, pp. 6787-6800, 2021. + +Xu, L., Chen, Y., Cui, G., Gao, H., and Liu, Z. Exploring the universal vulnerability of prompt-based learning paradigm. arXiv preprint arXiv:2204.05239, 2022. +Xun, Y., Liang, S., Jia, X., Liu, X., and Cao, X. Ta-cleaner: A fine-grained text alignment backdoor defense strategy for multimodal contrastive learning. arXiv preprint arXiv:2409.17601, 2024. +Yang, W., Gao, J., and Mirzasoleiman, B. Better safe than sorry: Pre-training clip against targeted data poisoning and backdoor attacks. arXiv preprint arXiv:2310.05862, 2023a. +Yang, W., Gao, J., and Mirzasoleiman, B. Robust contrastive language-image pretraining against data poisoning and backdoor attacks. In NeurlPS, 2023b. +Yang, Z., He, X., Li, Z., Backes, M., Humbert, M., Berrang, P., and Zhang, Y. Data poisoning attacks against multimodal encoders. In ICML, pp. 39299-39313. PMLR, 2023c. +Yuan, Z., Zhou, P., Zou, K., and Cheng, Y. You are catching my attention: Are vision transformers bad learners under backdoor attacks? In CVPR, pp. 24605-24615, 2023. +Yuksekgonul, M., Wang, M., and Zou, J. Post-hoc concept bottleneck models. In ICLR, 2023. +Zeng, Y., Shi, Z., Jin, M., Kang, F., Lyu, L., Hsieh, C.-J., and Jia, R. Towards robustness certification against universal perturbations. In ICLR. ICLR, 2023. +Zhang, Y., Albarghouthi, A., and D'Antoni, L. Bagflip: A certified defense against data poisoning. In NeurIPS, pp. 31474-31483, 2022. +Zheng, M., Lou, Q., and Jiang, L. Trojan insertion in vision transformers. In CVPR, pp. 4025-4034, 2023. +Zhu, L., Ning, R., Li, J., Xin, C., and Wu, H. Seer: Backdoor detection for vision-language models through searching target text and image trigger jointly. In AAAI, pp. 7766-7774, 2024a. +Zhu, M., Wei, S., Zha, H., and Wu, B. Neural polarizer: A lightweight and effective backdoor defense via purifying poisoned features. In NeurIPS, volume 36, 2024b. +Zhu, Z., Zhang, M., Wei, S., Wu, B., and Wu, B. Vdc: Versatile data cleanser based on visual-linguistic inconsistency by multimodal large language models. In ICLR, 2024c. + +# A. Related Works + +In this section, we briefly review backdoor attacks and defenses on supervised learning and CLIP, and interpret works on CLIP's image representations. + +Backdoor attacks and defenses on supervised learning. Backdoor attacks are serious security threats to machine learning systems (Li et al., 2022; Carlini & Terzis, 2022; Xu et al., 2022; Chen et al., 2021; Tao et al., 2024). Early research on backdoor attacks focused on designing a variety of triggers that satisfy the practical application scenarios, mainly including invisible stealthy triggers (Chen et al., 2017; Turner et al., 2019; Li et al., 2021; Doan et al., 2021; Nguyen & Tran, 2021; Gao et al., 2023; Souri et al., 2022) and physical triggers (Chen et al., 2017; Wenger et al., 2021). To defend against these attacks, researchers proposed a series of defense methods at different stages of developing models, i.e., data cleaning in the pre-processing stage (Tran et al., 2018; Zeng et al., 2023; Liu et al., 2023a; Qi et al., 2023), robust anti-backdoor training (Chen et al., 2022; Zhang et al., 2022; Huang et al., 2023), mitigation in the post-training stage (Min et al., 2023; Wang et al., 2024; Zhu et al., 2024b; Min et al., 2024; Wang et al., 2023; Xiang et al., 2022), and test-time detection in the inference stage (Shi et al., 2023; Mo et al., 2024; Guo et al., 2023; Liu et al., 2023b; Feng et al., 2023). Recently, researchers have paid much attention to the backdoor security of vision transformers and proposed customized backdoor attack and defense methods based on the characteristics of vision transformers (Yuan et al., 2023; Doan et al., 2023; Subramanya et al., 2024; Zheng et al., 2023). + +Backdoor attacks and defenses on CLIP. As multimodal models achieve significant development, researchers have paid much attention to the backdoor security on multimodal models (Walmer et al., 2022; Han et al., 2024; Liang et al., 2024; Zhu et al., 2024a; Yang et al., 2023c; Zhu et al., 2024c; Xun et al., 2024; Huang et al., 2025; Bai et al., 2024; Hu et al., 2025; Singh et al., 2024; Yang et al., 2023a). Pioneer (Carlini & Terzis, 2022) disclosed that multimodal contrastive learning is susceptible to backdoor attacks. Furthermore, BadCLIP (Liang et al., 2023) designed a dual-embedding framework for backdoor attacks on CLIP by making visual trigger patterns approximate the textual target semantics in the embedding space. To defend against backdoor attacks, RoCLIP (Yang et al., 2023b) proposed robust multimodal contrastive learning during the pertaining stage by modifying images' captions. CleanCLIP (Bansal et al., 2023) aimed to fine-tune the backdoored CLIP by using an additional unimodal self-supervised loss. TIJO (Sur et al., 2023) focused on trigger inversion to reverse-engineer the triggers in both modalities. TA-cleaner (Xun et al., 2024) proposed to select a few samples for positive and negative subtext generation at each epoch, and align the subtexts to the images to strengthen the text self-supervision. + +Interpreting CLIP's image representations. Although CLIP's powerful visual representation ability has achieved impressive performance on many downstream tasks, there is still a limited understanding of what information is encoded in CLIP's representations. To better understand CLIP, there were a few works that attempt to interpret visual contents by text representations, such as providing text descriptions for image regions in which a neuron is active (Hernandez et al., 2022), projecting model features into a bank of text-based concepts (Yuksekgonul et al., 2023), and studying entanglement in CLIP between images of words and natural images (Materzyńska et al., 2022). Specifically, recent work (Gandelsman et al., 2024) had a further exploration of CLIP's image representations by decomposing them into text-explainable directions that are attributed to specific attention heads and image locations. Similarly, INVITE (Chen et al., 2024) presented a framework for interpreting ViT's latent tokens with text explanations. + +# B. Details of datasets + +# B.1. Evaluation Datasets + +In this paper, we evaluate attack success rates and clean accuracy on three downstream datasets: ImageNet-1K (Russakovsky et al., 2015), Caltech-101 (Fei-Fei et al., 2004), and Oxford Pets (Parkhi et al., 2012). The target classes on ImageNet-1K, Caltech-101, and Oxford Pets are "banana", "accordion", and "Samoyed" respectively. Besides, we select clean image-text pairs from CC3M (Sharma et al., 2018) to fine-tune the backdoored CLIP. Here, we will introduce the details of these datasets. + +- ImageNet-1K consists of 1,000 classes and over a million images, making it a challenging dataset for large-scale image classification tasks. +- Caltech-101 contains 101 object categories and 1 background category with 40 to 800 images per category, which are both commonly used for testing model performance on fine-grained classification and image recognition tasks. +- Oxford Pets is a 37-category pet dataset with roughly 200 images for each class created by the Visual Geometry Group + +
A droplet in motionA ball A bambooA low-resolution imageAn image of a Engineer
advanced artificial intelligenceAbandoned factory spaceA magnetAn image of aentre
advanced biotechnologyAbandoned spacesA magnoliaAn image of a face
advanced drone technologyA barbed wire designA marbled textureAn image of a family
advanced renewable energyA barcodeA marshAn image of a Farmer
advanced roboticsA basketA maskAn image of a Fashion Designer
advanced robotic technologyA beamA mazeAn image of a Film Director
advanced space explorationA beautiful photoA meadowAn image of a Financial Analyst
advanced transportationA beltA meandering riverAn image of a Firefighter
advanced transport systemA bicycleA megaphoneAn image of a Flight Attendant
Adventurous explorationsA bladeA meteorAn image of a Florist
AdvertisementA blade (of a fan or a saw)A microphoneAn image of a Gardener
A earringA blade (of grass or a knife)A mirrorAn image of a Graphic Designer
Aerial landscape photographyA blanketA modular structureAn image of a Gymnast
Aerial perspectiveA blurry imageAncient and weathered artifactAn image of a Hair Stylist
Aerial viewA boltAncient and weathered stone carvingAn image of a head
Aerial view of a bayA bonnetAncient and weathered stone structureAn image of a IT Specialist
Aerial view of a Bustlina metropolisA bookAncient castle wallsAn image of a Journalist
Aerial view of a cityscapeA bookmarkAncient historical siteAn image of a Judge
Aerial view of a coastal areaA bootAncient ruinsAn image of a king
Aerial view of a construction siteA bottleAncient temple ruinsAn image of a Landscaper
Aerial view of a coral reefA bowlAn equilateral hexagonAn image of a Lawyer
Aerial view of a countrysideA braceletAn equilateral pentagonAn image of a Librarian
Aerial view of a desert oasisA branchAn equilateral triangleAn image of a main course
Aerial view of a farmlandA breezeAngry facial expressionAn image of a Marine Biologist
Aerial view of a hamletA brickAn illustration of an animalAn image of a Mechanic
Aerial view of a harborA brushAn image capturing an interaction between subjectsAn image of a Musician
Aerial view of a inletAbstract acrylic painting
Aerial view of a marketplaceAbstract artwork with concentric circlesAn image of a AccountantAn image of Andorra
Aerial view of a mountain rangeAbstract artwork with cross-hatchingAn image of a Aerospace EngineerAn image of a Novelist
Aerial view of an agricultural fieldAbstract artwork with splatter paintAn image of a Animal TrainerAn image of a Nurse
Aerial view of an archaeological siteAbstract artwork with swirlsAn image of a ArboristAn image of a Swimmer
Aerial view of a natural landscapeAbstract compositionAn image of a ArchaeologistAn image of a Systems Analyst
Aerial view of an industrial areaAbstract expressionist artworkAn image of a ArchitectAn image of a Teacher
Aerial view of an islandAbstract formAn image of a Art HistorianAn image of a Veterinarian
Aerial view of an ocean coastlineAbstract geometric patternsAn image of a ArtistAn image of a Waiter/Waitress
Aerial view of an urban skylineabstract geometric shapesAn image of a AstronomerAn image of a Welder
Aerial view of a paradiseabstract graffitiAn image of a AthleteAn image of a Writer
Aerial view of a promenadeAbstract oil paintingAn image of a AttorneyAn image of a Zoologis
Aerial view of a river or streamAbstract patternsAn image of a Auto MechanicTranquil atmospheres
Aerial view of a serene countrysideAbstract reflectionsAn image of a ballet DancerTime-worn beauty
+ +Figure 7. Examples of used text descriptions. + +at Oxford. The images have large variations in scale, pose, and lighting. All images have an associated ground truth annotation of breed, head ROI, and pixel-level trimap segmentation. + +- CC3M1 is a dataset consisting of about 3.3M images annotated with captions. In contrast with the curated style of other image caption annotations, Conceptual Caption images and their raw descriptions are harvested from the web, and therefore represent a wider variety of styles. More precisely, the raw descriptions are harvested from the Alt-text HTML attribute associated with web images. + +# B.2. Text descriptions + +To characterize the functionality of model components, we employed TEXSPAN proposed by (Gandelsman et al., 2024). The algorithm needs a pool of candidate text descriptions. Specifically, they prompted ChatGPT (GPT-3.5) to produce image descriptions. The prompt was "Imagine you are trying to explain a photograph by providing a complete set of image characteristics. Provide generic image characteristics. Be as general as possible and give short descriptions presenting one characteristic at a time that can describe almost all the possible images of a wide range of categories. Try to cover as many categories as possible, and don't repeat yourself. Here are some possible phrases: "An image capturing an interaction between subjects", "Wildlife in their natural habitat", "A photo with a texture of mammals", "An image with cold green tones", "Warm indoor scene", "A photo that presents anger". Just give the short titles, don't explain why, and don't combine two different concepts (with "or" or "and"). Make each item in the list short but descriptive. Don't be too specific." This process resulted in 3498 sentences as shown in Figure 7. + +![](images/ec8b4106e2b5db254a01a42c0a65c89a7947080bd464f78b06540fcc99a56d98.jpg) +Figure 8. Mean-ablation on model components. Figures (a)-1/2, (b)-1/2, and (c)-1/2 show the CACC of forward, backward, and separate ablation on AHs/MLPs, respectively. Figures (d)-1/2 show the layer-wise MMD on AHs and MLPs, respectively. Dashed lines indicate the baseline CACC of backdoor attacks. Best viewed in color. + +# C. Pseudo-code of our proposed method + +Algorithm 1 Our methods of repairing representations or filtering backdoor samples +Input: a backdoored CLIP $\{\widetilde{\mathcal{V}} (\cdot),\widetilde{T} (\cdot)\}$ , similarity threshold $\epsilon$ , detection threshold $\zeta$ , test data $\mathcal{X}_{test}$ , validation data $\mathcal{X}_{val}$ . 1: Construct head-specific prototypes $\Phi_h$ on the validation data $\mathcal{X}_{val}$ . 2: Construct MLP-specific prototypes $\Phi_{m}$ on the validation data $\mathcal{X}_{val}$ . 3: for $x_{i}$ in $\mathcal{X}_{test}$ do 4: if Blended or ISSBA then 5: Replace the representations of the last five MLPs with MLP-specific prototypes; 6: else 7: Use the detector $\Psi$ in Eq. (5) to find infected attention heads; 8: Count the number of infected attention heads and use the detector $\omega$ . 9: Replace the representations of selected AHs with those of head-specific prototypes; 10: end if +11: end for +12: Calculate ASR, CACC, or AUROC; +13: Output the metrics. + +# D. Detailed settings + +# D.1. Detailed settings of backdoor attacks + +In the experiment, we use five backdoor attacks: BadNet (Gu et al., 2017), Blended (Chen et al., 2017), Label Consistent (Turner et al., 2019), ISSBA (Li et al., 2021), and BadCLIP (Liang et al., 2023). Here, we introduce these methods in detail. + +- BadNet2 is a seminal work on backdoor attacks in deep learning, generating poisoned examples by stamping a small patch randomly into images and altering their labels to the target class. We set the patch size to 16 pixels. +- Blended enhances the stealthiness of backdoor attacks from the perspective of the trigger. It implements an invisible backdoor attack by blending the trigger with the original images linearly, thus evading human detection. The blending ratio for the trigger is 0.2. +- Label Consistent enhances the stealthiness of backdoor attack from the perspective of the label. It employs generative + +models or adversarial perturbations to selectively poison images associated with the target class. + +- ISSBA3 introduces an invisible attack that creates sample-specific triggers by encoding an attacker-specified string into benign images using an encoder-decoder network. +- BadCLIP4 proposes a backdoor attack on CLIP, which optimizes visual trigger patterns in a dual-embedding guided framework to make the attack undetectable. For BadCLIP, we employ the same parameter settings specified in the original paper. + +For these backdoor attacks, we utilize the AdamW optimizer with an initial learning rate of 1e-5, applying cosine scheduling over a total of five epochs with a batch size of 128. + +# D.2. Detailed settings of CleanCLIP + +CleanCLIP5 (Bansal et al., 2023) defends against backdoor attacks in multimodal contrastive learning by optimizing the integration of multimodal contrastive and unimodal self-supervised losses using a limited amount of clean data. Note that the backbone of the visual encoder in CleanCLIP is ResNet-50. In this paper, we use the vision transformer (ViT-B/32) as the visual encoder. We adapted the parameters used in the original paper to our case. Specifically, we randomly selected 10,0000 image-text pairs from CC3M as the fine-tuning data. The learning rates were set to 5e-6 for BadNet, Blended, and BadCLIP, and 3e-6 for Blended and ISSBA on ImageNet-1K. The batch size was 64. The fine-tuning epoch was 10. Note that we did not blindly reduce attack success rates by adjusting the learning rates, but maintained clean accuracy of the fine-tuned model. + +# D.3. Detailed settings of detection methods + +In the experiment, we compare three backdoor detection methods: STRIP (Gao et al., 2019), SCALE-UP (Guo et al., 2023), and TeCo (Liu et al., 2023b). Here, we introduce these methods in detail. + +- STRIP6 is the first black-box TTSD method that overlays various image patterns and observes the randomness of the predicted classes of the perturbed input to identify poisoned samples. In our experiments, for each input image, we use 64 clean images from the test data for superimposition. +- SCALE-UP7 is also a method for black-box input-level backdoor detection that assesses the maliciousness of inputs by measuring the scaled prediction consistency (SPC) of labels under amplified conditions, offering effective defense in scenarios with limited data or no prior information about the attack. +- $\mathrm{TeCo}^8$ modifies input images with common corruptions and assesses their robustness through hard-label outputs, ultimately determining the presence of backdoor triggers based on a deviation measurement of the results. In our experiments, considering concerns about runtime, we selected "elastic_transform", "gaussian_noise", "shot_noise", "impulse_noise", "motion_blur", "snow", "frost", "fog", "brightness", "contrast", "pixelate", and "jpeg_compression" as methods for corrupting images. The maximum corruption severity was set to 6. + +# E. Details of TEXTSPAN + +The objective of TEXTSPAN (Gandelsman et al., 2024) is to find descriptive texts of a candidate text pool for the model component. To this end, TEXTSPAN employs a greedy algorithm to identify a set of $m$ descriptions for each head that can span its output space9. + +(1) It first constructs a matrix $C^{(l,h)}$ denoted by the head outputs for head $(l,h)$ , and a matrix $\mathcal{T}$ , which contains the representations of the candidate descriptions $\{t_i\}_{i=1}^M$ projected onto the span of $C$ . + +```txt +3https://github.com/yuezunli/ISSBA +4https://github.com/LiangSiyuan21/BadCLIP +5https://github.com/nishadsinghi/CleanCLIP +6https://github.com/garrisongys/STRIP +7https://github.com/JunfengGo/SCALE-UP +8https://github.com/CGCL-codes/TeCo +9https://github.com/yossigandelsman/clip_textSpan +``` + +(2) In each iteration, the algorithm calculates the dot product between each row of $\mathcal{T}$ and the head outputs $C$ , identifying the row with the highest variance, $\mathcal{T}[j^*]$ (the first "principal component"). +(3) It then removes the contribution of this component from all rows and repeats the process to discover the next components. This projection ensures that each new component contributes variance orthogonal to the previous ones. + +# F. Limitation + +We present two limitations of our investigation. First, the representation decomposing ignores the indirect effects of model components on the representation, e.g., information flow from early layers to deeper ones, which may loss some generalization information compared with the original representation. Second, we focus on qualitatively characterizing the change in the functionality of attention heads caused by backdoor attacks, which may require certain quantitative metrics. \ No newline at end of file diff --git a/acloserlookatbackdoorattacksonclip/images.zip b/acloserlookatbackdoorattacksonclip/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..81861ca9ba768805c0c21ebf8969b02141d45f22 --- /dev/null +++ b/acloserlookatbackdoorattacksonclip/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:774f93ea0388dc1c83de6b50ab27758c4f48d682d1a8c9263d227037059a0af4 +size 1223276 diff --git a/acloserlookatbackdoorattacksonclip/layout.json b/acloserlookatbackdoorattacksonclip/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5ecd946d67a53cc5f0b117b4397ddb9b3e253f05 --- /dev/null +++ b/acloserlookatbackdoorattacksonclip/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3e6b53ee01c0fdfe4213ba15c96756725b70c143d833c0927828a043e2eb5ca +size 544753 diff --git a/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/68af78e5-3774-4bc2-83f9-0e1ff6afd8eb_content_list.json b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/68af78e5-3774-4bc2-83f9-0e1ff6afd8eb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..76056ed238dc7bfeab573124ed9877e7c18584b7 --- /dev/null +++ b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/68af78e5-3774-4bc2-83f9-0e1ff6afd8eb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bb5a0900de071dc52ee6c6bc39ce0e35a039132687da70e035f78594c778d2d +size 134789 diff --git a/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/68af78e5-3774-4bc2-83f9-0e1ff6afd8eb_model.json b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/68af78e5-3774-4bc2-83f9-0e1ff6afd8eb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7b9c46634390caa9075a6c43869cd83203974464 --- /dev/null +++ b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/68af78e5-3774-4bc2-83f9-0e1ff6afd8eb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10e93138f522ea615a3d7948b4696abb2f4bfd81f384862044cdda76ce95c164 +size 161148 diff --git a/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/68af78e5-3774-4bc2-83f9-0e1ff6afd8eb_origin.pdf b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/68af78e5-3774-4bc2-83f9-0e1ff6afd8eb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..45d70d5b33972eebd1968b391a593ef4094eb47c --- /dev/null +++ b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/68af78e5-3774-4bc2-83f9-0e1ff6afd8eb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e81d32e8e32e37166fe428d578c94981041427f0305b5ab764a17a7a3ddc921f +size 483555 diff --git a/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/full.md b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..82e788ce1fde85a9cc87e75a0e8279704fdb4f46 --- /dev/null +++ b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/full.md @@ -0,0 +1,712 @@ +# A Closer Look at Generalized BH Algorithm for Out-of-Distribution Detection + +Xinsong Ma1 Jie Wu1 Weiwei Liu1 + +# Abstract + +Out-of-distribution (OOD) detection is a crucial task in reliable and safety-critical applications. Previous studies primarily focus on developing score functions while neglecting the design of decision rules based on these scores. A recent work (Ma et al., 2024) is the first to highlight this issue and proposes the generalized BH (g-BH) algorithm to address it. The g-BH algorithm relies on empirical p-values, with the calibrated set playing a central role in their computation. However, the impact of calibrated set on the performance of g-BH algorithm has not been thoroughly investigated. This paper aims to uncover the underlying mechanisms between them. Theoretically, we demonstrate that conditional expectation of true positive rate (TPR) on calibrated set for the g-BH algorithm follows a beta distribution, which depends on the prescribed level and size of calibrated set. This indicates that a small calibrated set tends to degrade the performance of g-BH algorithm. To address the limitation of g-BH algorithm on small calibrated set, we propose a novel ensemble g-BH (eg-BH) algorithm which integrates various empirical p-values for making decisions. Finally, extensive experimental results validate the effectiveness of our theoretical findings and demonstrate the superiority of our method over g-BH algorithm on small calibrated set. + +# 1. Introduction + +Out-of-Distribution (OOD) detection is a critical task in machine learning and computer vision (Hendrycks & Gimpel, 2017; Liu et al., 2020). It addresses the challenge of determining whether a given input sample belongs to the same + +$^{1}$ School of Computer Science, National Engineering Research Center for Multimedia Software, Institute of Artificial Intelligence and Hubei Key Laboratory of Multimedia and Network Communication Engineering, Wuhan University, Wuhan, China. Correspondence to: Weiwei Liu . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +distribution as the training data (Hendrycks et al., 2022; Djurisic et al., 2023). In real-world applications, models trained on in-distribution (ID) data from a specific domain often encounter OOD data from unseen distributions during deployment. This discrepancy between the training and deployment leads to poor model performance (Liang et al., 2018; Sastry & Oore, 2020; Kaur et al., 2022). The importance of OOD detection has grown with the increasing reliance on deep learning models in safety-critical applications, such as autonomous driving (Li et al., 2022) and medical diagnosis (Frolova et al., 2022). + +Numerous studies have proposed various methods to address the OOD detection problem (Liu et al., 2020; 2023; Regmi et al., 2024; Lu et al., 2024). These methods mainly focus on designing the score functions which enables to learn critical discriminative information in training data. A recent work (Ma et al., 2024) is the first to point out that existing OOD detection methods neglect the systematic study of the decision rule based on the score functions, and propose a novel generalized BH (g-BH) algorithm to tackle this problem. The g-BH algorithm establishes a connection between score functions and multiple hypothesis testing framework through the empirical p-values. The calibrated set is crucial for computing empirical p-values and thus has a profound impact on the detection performance of the g-BH algorithm. However, to the best of our knowledge, the impact of the calibrated set on the performance of the g-BH algorithm remains unexplored. This paper aims to address the above issue. + +Intuitively, a larger calibration set enhances the performance of the g-BH algorithm. Our experimental results in Figure 1 confirm this conjecture: as the size of calibrated set increases, both the TPR and F1-score monotonically increase. Theoretically, we demonstrate that the TPR expectation conditional on calibrated set for the g-BH algorithm follows a beta distribution, with its shape parameters determined by the prescribed significance level and the size of calibrated set. This shows that a smaller calibrated set tends to degrade the detection performance of the g-BH algorithm. To address the limitation of the g-BH algorithm on small calibrated set, we propose a novel ensemble g-BH (eg-BH) algorithm which integrates multiple empirical p-values for decision-making. Moreover, we extend the theoretical results on the g-BH algorithm from (Ma et al., 2024) and + +![](images/dfe4a3345f275d028726980c620d2063b89fcad8e391e66c206eaa9b1dd580e3.jpg) +(a) SVHN + +![](images/483d98362248834f09678a087d6616abe50fea16c715dbec7b148155885bb76c.jpg) +(b) Place365 +Figure 1. OOD detection performance of the g-BH algorithm with varying size of calibrated set. The score function is the Energy (Liu et al., 2020). The x-axis corresponds to the size of the calibrated set, and the y-axis represents the values of metrics. + +![](images/6fcb09c80146ed41eb93852b29d7076e74cd42ee3855a747a3a0cfe59c84c681.jpg) +(c) TinyImageNet + +demonstrate that the eg-BH algorithm controls the false discovery rate (FDR) for p-values without clear structural dependence. + +Finally, we conduct extensive experiments to verify the theoretical results on the conditional expectation of TPR and the effectiveness of the eg-BH algorithm. Experimental results demonstrate the superiority of our method over the g-BH algorithm on small calibrated set. + +We summarize our core contributions as follows: + +- We empirically find that a larger calibrated set improves the performance of the g-BH algorithm, whereas a smaller calibrated set adversely affects its performance. +- We theoretically demonstrate that the TPR expectation conditional on the calibrated set follows a beta distribution, with its shape parameters determined by the prescribed significance level and the size of the calibrated set, which supports our findings. +- To address the limitation of the g-BH algorithm on the small calibrated set, we propose a novel eg-BH algorithm that integrates multiple empirical p-values for decision-making. Besides, our theoretical results provide a statistical guarantee for the integrated p-values in our eg-BH algorithm. +- Extensive experimental results demonstrate the superiority of our method over the g-BH algorithm on small calibrated set. + +# 2. Background + +We denote by $\mathcal{X} \subseteq \mathbb{R}^d$ the feature space and $\mathcal{Y} = \{1,2,3,\ldots,K\}$ the label space with unknown joint distribution $\mathcal{P}$ , and $\mathcal{X}$ has marginal distribution $\mathcal{D}_x$ . + +During the prediction phase, it is typically assumed that the testing data are drawn from the same distribution $\mathcal{D}_x$ as the training data. However, in practical applications, test inputs + +may originate from unseen distributions, where the corresponding label space may be disjoint from $\mathcal{V}$ . These OOD samples should be identified and excluded from prediction. + +The objective of OOD detection is to identify OOD examples in the testing set. In prior work, the OOD detection task is formulated as a binary decision problem: + +$$ +\phi (x) = \left\{ \begin{array}{l l} I D, & \text {i f} s (x) \geq s ^ {*} \\ O O D, & \text {i f} s (x) < s ^ {*} \end{array} \right. \tag {1} +$$ + +where $s(\cdot)$ is the score function and the threshold $s^*$ is empirically selected so that the ture positive rate (TPR) on ID validation set is $95\%$ before testing (Sun et al., 2022; Wei et al., 2022). + +Prior work on OOD detection has primarily focused on designing powerful score functions to capture discriminative information in ID data (Hendrycks & Gimpel, 2017; Liu et al., 2020; Djurisic et al., 2023; Liu et al., 2023). However, Ma et al. (2024) highlight that these studies lack systematic research on the decision rule on the score functions. Moreover, the decision rule in Eq (1) is empirical and lacks theoretical guarantee for its outputs. Different from the previous studies, Ma et al. (2024) studies the OOD detection problem from the perspective of multiple hypothesis testing, and propose the g-BH algorithm to tackle it. + +# 3. Multiple Hypothesis Testing Framework for OOD Detection + +We first introduce the hypothesis testing framework for OOD detection in Ma et al. (2024). For mathematical convenience, we follow the notations of Ma et al. (2024). Given a testing set $\mathcal{T}^{test} = \{X_1^{test}, X_2^{test}, \ldots, X_n^{test}\}$ , For $i = 1, \dots, n$ , the OOD detection task is formulated as the following multiple hypothesis testing problem: + +$$ +\begin{array}{l} H _ {1; 0}: X _ {1} ^ {\text {t e s t}} \sim \mathcal {D} _ {x}, \quad H _ {1; 1}: X _ {1} ^ {\text {t e s t}} \sim \mathcal {D} _ {x} \\ \dots \dots \tag {2} \\ \end{array} +$$ + +$$ +H _ {n; 0}: X _ {n} ^ {\text {t e s t}} \sim \mathcal {D} _ {x}, \quad H _ {n; 1}: X _ {n} ^ {\text {t e s t}} \nsim \mathcal {D} _ {x} +$$ + +where $H_{i;0}$ and $H_{i;1}$ are called null hypothesis and alternative hypothesis, respectively. Then, if $H_{i;0}$ is rejected, we declare that $X_{i}^{test}$ is OOD. + +In statistics, the decision to accept or reject the null hypothesis is made based on the concept of the $p$ -value, which is generally defined as follows: + +Definition 3.1. [p-value (Casella & Berger, 2002)] Given a sample $\widetilde{X}^4$ . A statistic $p(\widetilde{X})$ is called p-value corresponding to the null hypothesis $H_0$ , if $p(\widetilde{X})$ satisfies + +$$ +\mathbb {P} [ p (\widetilde {X}) \leq t | H _ {0} ] \leq t \tag {3} +$$ + +for every $0 \leq t \leq 1$ . + +If the statistic $p(\widetilde{X})$ follows the uniform distribution on (0, 1) under the null hypothesis, it is a valid p-value. A small p-value typically provides strong evidence against the null hypothesis. It is noteworthy that the p-value has clear statistical interpretation. For example, if the p-value of a OOD testing example $X_{i}^{test}$ is 0.01, this implies that, for any subsequent testing example $X_{j}^{test}$ , the probability that $X_{j}^{test}$ is more similar to OOD data than $X_{i}^{test}$ is 0.01. In other words, it is highly unlikely to find an example less similar to the OOD data than $X_{i}^{test}$ . Hence, it provides strong evidence that $X_{i}^{test}$ is OOD. + +Remark 3.2. In statistics, the following terminology characterizes the distribution of null p-values: if $\mathcal{P}[p(\widetilde{X})\leq t|H_0] = t$ , the p-value $p(\widetilde{X})$ is called exact or uniform; if $\mathcal{P}[p(\widetilde{X})\leq t|H_0] < t$ , $p(\widetilde{X})$ is called conservative. Compared to an exact p-value, a conservative one tends to understate the evidence against the null Hypothesis. + +Based on the work (Benjamini & Hochberg, 1995), Ma et al. (2024) propose the g-BH algorithm to tackle the OOD detection problem. Define two function classes: + +$$ +\begin{array}{l} \mathcal {F} _ {1} = \{f (x): f _ {+} (0) = 0, f ^ {\prime} (x) > 0, \int_ {0} ^ {1} \frac {1}{f (x)} d x \leq 1 \} \\ \mathcal {F} _ {2} = \left\{f (x): f _ {+} (0) = 0, f ^ {\prime} (x) \geq 1 \right\}, \\ \end{array} +$$ + +where $f_{+}(0) = \lim_{x\to 0 + }f(x)$ for $x\in (0,1)$ . Based on $\mathcal{F}_1$ and $\mathcal{F}_2$ , the g-BH algorithm is defined as follows: + +Definition 3.3 (g-BH algorithm (Ma et al., 2024)). Given the p-values $p_1, p_2, \dots, p_n$ corresponding to the null hypotheses $H_{1;0}, H_{2;0}, \dots, H_{n;0}$ , let $p_{(i)}$ be the $i$ -th order statistics from the smallest to the largest. For a pre-specified level $\alpha \in (0,1)$ , define + +$$ +i _ {g - B H} ^ {*} = \max \{i \in [ n ]: f (p _ {(i)}) \leq \frac {i}{n} \alpha \}, \tag {4} +$$ + +where $f(\cdot)\in \mathcal{F}_1\cup \mathcal{F}_2$ . Then, the null hypothesis $H_{(i);0}$ is rejected if $i\leq i_{g - BH}^{*}$ + +Ma et al. (2024) demonstrate that if p-values are independent or positive regression dependence on subset (PRDS), the g-BH algorithm controls the FDR at prescribed level $\alpha$ . FDR is defined as + +$$ +\mathrm {F D R} = \mathbb {E} \left[ \frac {| \mathcal {R} \cap \mathcal {H} _ {0} |}{\max \{1 , | \mathcal {R} | \}} \right] +$$ + +where $\mathcal{R}$ is the set of indices of the rejected null hypotheses and $\mathcal{H}_0$ is the set of indices for the true null hypotheses. (Ma et al., 2024) demonstrates that the g-BH algorithm can control the FDR at a prescribed level if p-values are mutually independent or satisfy the positive regression dependence on subset (PRDS) condition (Benjamini & Yekutieli, 2001). + +# 4. Impact of Calibrated Set on Generalized BH Algorithm + +In most multiple hypothesis testing literature (Benjamini & Hochberg, 1995; Benjamini & Yekutieli, 2001; Blanchard & Roquain, 2008; Delattre & Roquain, 2015; Cao et al., 2022), the p-values or the distribution of the testing statistic are assumed to be known. Denote by $F(\cdot)$ the cumulative distribution function of $s(X)$ where $s(\cdot)$ is the score function and $X \sim \mathcal{D}_x$ . Then, for a given example $X^{test}$ , its p-value can be expressed as + +$$ +\begin{array}{l} p \left(X ^ {t e s t}\right) = \mathbb {P} _ {X \sim \mathcal {D} _ {x}} (s (X) \leq s \left(X ^ {t e s t}\right)) \\ = F \left(s \left(X ^ {t e s t}\right)\right). \tag {5} \\ \end{array} +$$ + +According to the Definition 2, under the $H_0$ ( $X^{test}$ is the ID data), we have + +$$ +\begin{array}{l} \mathbb {P} \left(F (s (X ^ {t e s t})) \leq x\right) = \mathbb {P} \left(s (X ^ {t e s t}) \leq F ^ {- 1} (x)\right) \\ = F (F ^ {- 1} (x)) = x, \\ \end{array} +$$ + +where $F^{-1}(\cdot)$ is the inverse function of $F(\cdot)$ . Therefore, the random variable $F(s(X^{test}))$ follows the uniform distribution on $(0, 1)$ , namely, $p(X^{test})$ is a valid p-value and is exact. Obviously, small score $s(X^{test})$ results in a small p-value, which aligns with the classical setting of OOD detection in Eq.(1) and the interpretation of the p-value. + +However, in the context of the OOD detection, we often have little prior information about underlying distribution $F(\cdot)$ . Hence, Ma et al. (2024) propose using the empirical p-values in the g-BH algorithm, which is a nonparametric estimation method for the p-value $p(X^{test})$ . Given a calibrated set $\mathcal{T}^{cal} = \{X_1^{cal}, X_2^{cal}, \ldots, X_m^{cal}\}$ consisting of the ID examples, for a testing example $X_i^{test}$ , the empirical p-value $p_i$ corresponding to null hypothesis $H_{i;0}$ is defined as + +$$ +p _ {i} = \hat {p} \left(X _ {i} ^ {\text {t e s t}}\right) = \frac {\sum_ {j = 1} ^ {m} \mathbb {1} \left(s \left(X _ {j} ^ {\text {c a l}}\right) \leq s \left(X _ {i} ^ {\text {t e s t}}\right)\right) + 1}{m + 1}, \tag {6} +$$ + +![](images/91c7f24a3fedc991b499c026dc60461f88a860c93b975bafb62e58df5d8ed68c.jpg) +(a) $\alpha = 0.05$ + +![](images/ba5f7b877004803829443f9c03b56cf740ddb607c54f1d00491e8b6d9d4dde0a.jpg) +(b) $\alpha = 0.08$ +Figure 2. Density distribution functions of the TPR conditional on calibrated set for the g-BH algorithm with varying level $\alpha$ and size $m$ of calibrated set. + +![](images/f8626e403e478ed2a5402d9987db72b1cedc2201cbfd8e6ff3a86c610f2e3956.jpg) +(c) $\alpha = 0.12$ + +where $s(\cdot)$ is a certain score function. According to Arlot et al. (2010), we can easily verify that empirical p-value in Eq. (6) satisfies the Definition 3.1. + +Note that the g-BH algorithm directly makes the decisions based on the empirical p-values. Therefore, the calibrated set plays a critical role in the OOD detection performance of g-BH algorithm. However, to the best of our knowledge, there is no literature that thoroughly investigates the influence of calibrated set on the performance of the g-BH algorithm. This paper aims to systematically study this important problem. + +In this paper, we focus on the situation where only ID data is available before testing. Thus, we first investigate how the size $m$ of calibrated set influences the conditional expectation of TPR on the calibrated set $\mathcal{T}^{cal}$ for the g-BH algorithm: $\mathbb{E}(\mathrm{TPR}|\mathcal{T}^{cal})$ . + +To derive the distribution characteristics of conditional expectation of TPR, we need the concept of empirical distribution function. Given the calibrated set $\mathcal{T}^{cal} = \{X_1^{cal}, X_2^{cal}, \ldots, X_m^{cal}\}$ , for any input $x$ , the empirical distribution $\hat{F}(\cdot)$ of score function $s(\cdot)$ on $\mathcal{T}^{cal}$ can be expressed as + +$$ +\begin{array}{l} \hat {F} (x) = \frac {1}{m} \sum_ {i = 1} ^ {n} \mathbb {1} \left(s \left(X _ {i} ^ {c a l}\right) \leq s (x)\right) \\ = \left\{ \begin{array}{l l} 0, & \text {i f} \quad s (x) < s (X _ {(1)} ^ {c a l}) \\ \frac {k}{m} & \text {i f} \quad s (X _ {(k)} ^ {c a l}) \leq s (x) < s (X _ {(k + 1)} ^ {c a l}) \\ 1, & \text {i f} \quad s (x) \geq s (X _ {(m)} ^ {c a l}), \end{array} \right. \\ \end{array} +$$ + +where $k = 1,2,\dots ,m$ and $X_{(k)}^{cal}$ is the $k$ -th order statistic of $X_{1}^{cal},X_{2}^{cal},\ldots ,X_{m}^{cal}$ from the smallest to the largest. Obviously, we have + +$$ +\hat {F} (X _ {(k)} ^ {c a l}) = \frac {k}{n}. +$$ + +In addition, we denote $[\cdot]$ the floor function. Then, we have the following theoretical result. + +Theorem 4.1. Given the calibrated set $\mathcal{T}^{cal} = \{X_1^{cal}, X_2^{cal}, \ldots, X_m^{cal}\}$ and the score function $s(\cdot)$ that is continuous. For a prescribed level $\alpha$ , the density function of $\mathbb{E}(\mathrm{TPR}|\mathcal{T}^{cal})$ for the $g$ -BH algorithm can be expressed as + +$$ +f _ {t p r} (x) = \left\{ \begin{array}{l l} m \binom {m - 1} {\beta - 1} x ^ {m - \beta} (1 - x) ^ {\beta - 1} & \text {i f} 0 < x < 1 \\ 0 & \text {o t h e r w i s e}, \end{array} \right. +$$ + +where + +$$ +\beta = [ f ^ {- 1} (\alpha) (m + 1) ] - 1 +$$ + +and $f\in \mathcal{F}_1\cup \mathcal{F}_2$ ,namely $\mathbb{E}(\mathrm{TPR}|\mathcal{T}^{cal})$ follows the beta distribution $\mathcal{B}e(m - \beta +1,\beta)$ + +The proof of the Theorem 4.1 is presented in Appendix A.1. Theorem 4.1 indicates that the pre-specified level $\alpha$ and the size of the calibrated set $m$ play pivotal roles in determining the distributional characteristics of the g-BH algorithm. We visualize the probability distribution of $\mathbb{E}(\mathrm{TPR}|\mathcal{T}^{cal})$ with different $\alpha$ and the size $m$ of calibrated set in Figure 2. From Figure 2, we find that if we choose a larger $\alpha$ , the g-BH algorithm tends to achieve smaller TPR with appreciable probability. For example, with the calibration examples $m = 200$ , we have $\mathbb{P}(\mathbb{E}(\mathrm{TPR}|\mathcal{T}^{cal}) \leq 0.9) = 0.14$ for $\alpha = 0.08$ and $\mathbb{P}(\mathbb{E}(\mathrm{TPR}|\mathcal{T}^{cal}) \leq 0.85) = 0.81$ for $\alpha = 0.12$ . The reason behind this phenomenon is that a larger $\alpha$ induces the g-BH algorithm to adopt more aggressive decision-making strategies. In other words, the g-BH algorithm tends to classify more testing examples as OOD. More importantly, a small calibrated set causes the g-BH algorithm to achieve poor detection performance in terms of TPR. In contrast, a large calibrated set easily ensures a high TPR with a high probability. For example, with $\alpha = 0.05$ , we obtain $\mathbb{P}(\mathbb{E}(\mathrm{TPR}|\mathcal{T}^{cal}) \leq 0.9) = 0.32$ for $m = 200$ , and $\mathbb{P}(\mathbb{E}(\mathrm{TPR}|\mathcal{T}^{cal}) \leq 0.9) < 0.01$ for $m = 500$ . Therefore, a large calibrated set significantly improves the performance of the g-BH algorithm. In Section 6, we also conduct extensive experiments on the real datasets to validate this conclusion. + +# 5. Ensemble Generalized BH Algorithm for Small Calibrated Set + +In Section 4, we demonstrate that a large calibrated set tends to improve the detection performance of the g-BH algorithm, but a small calibrated set easily leads to a poor results. In practice, we usually separate a portion of data from the training set to serve as the calibrated set. If the training set is small, a large calibrated set takes up more of the training data and further leads to the underfitting of neural networks. To address this problem, we propose the ensemble g-BH (eg-BH) algorithm to address this challenges faced by the g-BH algorithm. + +Our motivation arises from the practical significance of p-values. A small calibrated set leads to under-representative empirical p-values, which fail to capture the distributional characteristics of the ID data. To address this issue, a natural approach is to generate multiple empirical p-values using the entire training set, thereby fully utilizing the available information. We then integrate these empirical p-values to make decisions. + +For the given training data $\mathcal{T}$ , we first partition $\mathcal{T}$ into $\mathcal{T}_1, \mathcal{T}_2, \dots, \mathcal{T}_L$ . Denote $\mathcal{T}_i^{cal} = \mathcal{T}_i$ and $\mathcal{T}_{-i}^{train} = \mathcal{T} \setminus \mathcal{T}_i$ where “ $\setminus$ ” is the difference operation. Then, we train the score function $s(\cdot)$ based on $\mathcal{T}_{-i}^{train}$ . For simplicity, we denote $s_i(\cdot)$ the score trained on $\mathcal{T}_{-i}^{train}$ . Besides, denote by $|\mathcal{T}_i^{cal}|$ the size of $\mathcal{T}_i^{cal}$ . Hence, for a testing example $X^{test}$ , we enable to compute various empirical p-values using trained score function and calibrated set pairs $\{s_i(\cdot), \mathcal{T}_i^{cal}\}_{i=1}^L$ : + +$$ +\hat {p} _ {i} (X ^ {t e s t}) = \frac {| \{X ^ {c a l} \in \mathcal {T} _ {i} ^ {c a l} : s _ {i} (X ^ {c a l}) \leq s _ {i} (X ^ {t e s t}) \} | + 1}{| \mathcal {T} _ {i} ^ {c a l} | + 1} +$$ + +for $i = 1,2,\dots ,L$ . After computing the empirical p-values $\hat{p}_1(X^{test}),\hat{p}_2(X^{test}),\dots ,\hat{p}_L(X^{test})$ , the next problem is how to integrate these empirical p-values. A direct approach is to average them: + +$$ +\bar {p} (X ^ {t e s t}) = \frac {\hat {p} _ {1} (X ^ {t e s t}) + \hat {p} _ {2} (X ^ {t e s t}) + \cdots + \hat {p} _ {L} (X ^ {t e s t})}{L}. +$$ + +Unfortunately, $\bar{p}(X^{test})$ does not necessarily satisfy the definition of the p-value (Ruschendorf, 1982; Meng, 1994). + +To obtain a more general method of integrating the p-values, we first introduce a universal notion of average (Kolmogorov & Castelnuovo, 1930): given the p-values $\mathbf{p} = \{p_1,p_2,\dots ,p_L\}$ and weights $\mathbf{w} = \{w_{1},w_{2},\dots ,w_{L}\}$ where $w_{i} > 0$ and $\sum_{i = 1}^{L}w_{i} = 1$ , define + +$$ +\Omega (\mathbf {p}, \mathbf {w}) = g ^ {- 1} \left(w _ {1} g \left(p _ {1}\right) + w _ {2} g \left(p _ {2}\right) + \dots , w _ {L} g \left(p _ {L}\right)\right) +$$ + +where $g(\cdot)$ is a continuous and strictly monotonic function, and $g^{-1}(\cdot)$ is its inverse function. If $w_{i} = \frac{1}{L}$ , $\Omega (\cdot)$ is the + +# Algorithm 1 eg-BH algorithm + +1: Input: Training data $\mathcal{T}$ , testing set $\mathcal{T}^{test} = \{X_1^{test}, X_2^{test}, \ldots, X_n^{test}\}$ , prescribed level $\alpha \in (0, 1)$ . +2: partition $\mathcal{T}$ into $\mathcal{T}_1, \mathcal{T}_2, \dots, \mathcal{T}_L$ , and let $\mathcal{T}_i^{cal} = \mathcal{T}_i$ and $\mathcal{T}_{-i}^{train} = \mathcal{T} \backslash \mathcal{T}_i$ . + +3: for $j = 1$ to L do + +4: Train the score function $s(x)$ on $\mathcal{T}_{-j}^{train}$ , denote by $s_i(\cdot)$ the score trained on $\mathcal{T}_{-j}^{train}$ . + +5: end for +6: for $i = 1$ to $n$ do +7: for $j = 1$ to $L$ do +8: Compute the empirical p-values for testing example $X_{i}^{test}$ based on $s_j(\cdot)$ and $T_{j}^{cal}$ : + +$$ +\hat {p} _ {i, j} = \frac {| \{X \in \mathcal {T} _ {j} ^ {c a l} : s _ {j} (X) \leq s _ {j} (X _ {i} ^ {t e s t}) \} | + 1}{| \mathcal {T} _ {j} ^ {c a l} | + 1} +$$ + +# 9: end for + +10: Integrate the empirical p-values $\hat{p}_{i,1},\dots ,\hat{p}_{i,L}$ for $X_{i}^{test}$ : + +$$ +\bar {p} _ {i} = \left(\left(\kappa + 1\right) \sum_ {j = 1} ^ {L} w _ {j} \hat {p} _ {i, j} ^ {\kappa}\right) ^ {\frac {1}{\kappa}} \tag {7} +$$ + +# 11: end for + +12: Compute $i^{*} = \max \{i\in [n]:f(\bar{p}_{(i)})\leq \frac{i}{n}\alpha \}$ where $\bar{p}_{(i)}$ is the $i$ -th order statistic from the smallest to the largest for $\bar{p}_1,\cdot ,\bar{p}_n$ . + +13: Output: Declare that $X_{(i)}^{test}$ is OOD if $i \leq i^*$ , and the rests are ID. + +arithmetic mean when $g(x) = x$ ; $\Omega(\cdot)$ is the geometric mean when $g(x) = \log x$ ; $\Omega(\cdot)$ is the harmonic mean when $g(x) = \frac{1}{x}$ . For a random variable $X$ , its $\alpha$ -quantile is defined as + +$$ +Q (X, \alpha) = \sup _ {x \in \mathbb {R}} \{\mathbb {P} (X \leq x) < \alpha \}. +$$ + +Clearly, $Q(X,1)$ is the essential supremum of $X$ . In addition, denote by $\mathcal{P}$ the set of all p-values. Suppose that the function $h(\cdot):[0,1]^L\to [0,\infty)$ is continuous and increasing, we define + +$$ +Q ^ {*} (h, \mathbf {p}, \alpha) = \inf _ {p _ {i} \in \mathcal {P}} \left\{Q \left(h \left(p _ {1}, \dots , p _ {L}\right), \alpha\right) \right\} +$$ + +where $\mathbf{p} = \{p_1, \dots, p_L\}$ . The following theoretical results provide a concise method that integrates the multiple p-values. + +Theorem 5.1. Given the empirical $p$ -values $p_1, p_2, \dots, p_L$ and the function $g(x) = x^{\kappa}$ where $\kappa > 0$ , then + +$$ +\left(\left(\kappa + 1\right) \left(w _ {1} p _ {1} ^ {\kappa} + w _ {2} p _ {2} ^ {\kappa} + \dots + w _ {L} p _ {L} ^ {\kappa}\right)\right) ^ {\frac {1}{\kappa}} +$$ + +is a valid $p$ -value. Specifically, + +$$ +\frac {2 (p _ {1} + p _ {2} + \cdots + p _ {L})}{L} +$$ + +and + +$$ +\max \left\{p _ {1}, p _ {2}, \dots , p _ {L} \right\} +$$ + +are the valid $p$ -values. + +The proof of Theorem 5.1 is presented in Appendix A.3. According to Theorem 5.1, we can choose appropriate function $g(x) = x^{\kappa}$ to integrate various empirical p-values for decision-making. The following theorem provides an consideration for the choice of $\kappa$ in $g(x)$ . + +Theorem 5.2. Given the empirical $p$ -values $p_1, p_2, \dots, p_L$ and the function $g(x) = x^{\kappa}$ , denote $w^* = \max \{w_1, w_2, \dots, w_L\}$ . If $w^* \leq \min \left\{\frac{1}{2}, \frac{1}{1 + \kappa}, \frac{\kappa}{1 + \kappa}\right\}$ , then we have + +$$ +\sup _ {p _ {i} \in \mathcal {P}} \left\{\mathbb {P} \left(\tilde {h} (\mathbf {p}) \leq \alpha\right) \right\} = \alpha . +$$ + +where $\tilde{h} (\mathbf{p}) = ((\kappa +1)(w_1p_1^\kappa +w_2p_2^\kappa +\dots +w_Lp_L^\kappa))^{\frac{1}{\kappa}}$ + +The proof of Theorem 5.2 is presented in Appendix A.4. Theorem 5.2 indicates that if we choose $w^{*}$ such that $w^{*} \leq \min \left\{\frac{1}{2}, \frac{1}{1 + \kappa}, \frac{\kappa}{1 + \kappa}\right\}$ , the integrated p-value $\tilde{h}(\mathbf{p})$ can be exact, which benefits the improvement of power for the hypothesis testing algorithm. Based on the analysis above, we summarize our proposed method in Algorithm 1, called ensemble g-BH (eg-BH) algorithm. + +# 6. Experiments + +In this section, we aims to verify the effectiveness of Theorem 4.1 and the superiority of our proposed eg-BH algorithm over the g-BH algorithm. Our experimental framework is based on Ma et al. (2024) and use the same evaluation metrics. The experimental results show the superiority of the eg-BH algorithm over the g-BH algorithm on small calibrated set. + +# 6.1. Experimental Settings + +Scores. We choose two famous methods MSP(Hendrycks & Gimpel, 2017) and Energy(Liu et al., 2020) as the score functions in our method. + +**Benchmarks.** We use CIFAR-10 (Krizhevsky et al., 2009) as ID data, and use CIFAR-100, ImageNet (Krizhevsky et al., 2017), SVHN (Netzer et al., 2011), Fashion-MNIST (F-MNIST) (Xiao et al., 2017), Places365 (Zhou et al., 2018) and MNIST (Deng, 2012), as OOD data. + +Metrics. We use the same practical evaluation metrics as Ma et al. (2024), including TPR, FPR and F1-score. + +Model. The score functions in this paper are based on the ResNet18 and WideResNet, respectively. We mainly + +follow the experimental implementation in (Yang et al., 2022; Zhang et al., 2023a), and our codes are based on (Zhang et al., 2023a). More details are found in (Zhang et al., 2023a). + +# 6.2. Impact of Calibrated Set on Generalized BH Algorithm + +In this experiment, we aims to reveal how the calibrated set influences the detection performance of the g-BH algorithm. We first split the training data equally into two parts. One part is employed to train the neural networks for constructing the score function, and the other serves as the largest calibrated set $\mathcal{T}_M^{cal}$ . Then, from $\mathcal{T}_M^{cal}$ , we extract samples at various proportions $r$ to construct several relatively smaller calibrated sets, where $r = \{0.2, 0.3, \dots, 1.0\}$ . The experimental results of practical metrics based on the Energy (Liu et al., 2020) are presented in Tables 1 and 3. The results based on the MSP (Hendrycks & Gimpel, 2017) are presented in Tables 2 and 4. Because of the space limitation, all experimental results of using MNIST as OOD data are presented in Appendix B. + +From Table 1, we find that with the increase of size for the calibrated set, the evaluation metrics TPR and F1-score considerably increases, accompanied by a marginal rise in FPR. For example, we use the SVHN as the OOD data, and use the Energy as our score function based on ResNet18. When sampling ratio $r = 0.2$ , the F1-score, TPR and FPR of g-BH algorithm are $52.25\%$ , $35.41\%$ and $0.05\%$ , respectively. When $r = 0.8$ , the corresponding F1-score, TPR and FPR are $75.78\%$ , $61.51\%$ and $0.31\%$ , respectively, which leads to the direct improvements of $23.53\%$ and $26.10\%$ for F1-score and TPR, at a negligible cost of $0.26\%$ increase in FPR. Notably, as shown in Tables 2, 3 and 4, this trend is consistent for other socre function MSP, network architecture WideResNet and OOD data. Therefore, large calibrated set improves the performance of the g-BH algorithm without the dependence on the distribution assumptions of OOD data. The above analysis demonstrates the effectiveness of Theorem 4.1. + +# 6.3. Comparison between g-BH and eg-BH on Small Calibrated Set + +In this experiment, we aim to compare the detection performance between vanilla g-BH algorithm and our proposed eg-BH algorithm on the small calibrated set. We first randomly divide the training data into $L$ equal parts. For the g-BH algorithm, one of these parts is used as the calibrated set. Note that a larger $L$ implies a smaller calibrated set. For our proposed method, we directly apply the strategies in the algorithm 1. When $L = 5$ , the corresponding experimental results of practical metrics are presented in Tables 5 and 6. + +As tables 5 and 6 shown, we observe the FPR of our pro + +Table 1. Experimental results (%) of practical metrics on CIFAR-10 as ID data. Energy (Liu et al., 2020) is used as the score function based on the ResNet18. We compare the detection performance of g-BH algorithm with different sizes of calibrated set. + +
RatioCIFAR-100TinyImageNetSVHNPlace365F-MNIST
F1TPRFPRF1TPRFPRF1TPRFPRF1TPRFPRF1TPRFPR
0.263.6347.120.9833.0632.470.2952.2535.410.0551.8435.350.1962.9445.990.68
0.366.0649.911.2039.7634.580.3554.8137.800.0554.0137.530.2465.7447.830.97
0.467.8852.071.3543.3436.190.4058.0340.950.0756.0039.310.3068.1652.791.42
0.570.1954.921.5645.2740.630.5562.2745.310.0858.1141.480.3570.9554.981.46
0.671.9057.991.6153.8143.040.6765.6649.000.1059.6742.370.4472.7857.511.69
0.774.3560.542.3157.7546.940.8773.1858.050.2361.2744.920.4775.5859.252.15
0.876.1663.533.3062.0552.611.4175.7861.510.3166.1548.260.8776.5262.982.47
0.977.9064.943.9565.9153.631.4979.7182.345.4268.9256.141.1178.4367.614.79
179.2669.505.8770.5264.033.5184.0386.6811.6473.8471.765.3680.7470.686.51
+ +Table 2. Experimental results (%) of practical metrics on CIFAR-10 as ID data. MSP (Hendrycks & Gimpel, 2017) is used as the score function based on the ResNet18. We compare the detection performance of g-BH algorithm with different sizes of calibrated set. + +
RatioCIFAR-100TinyImageNetSVHNPlace365F-MNIST
F1TPRFPRF1TPRFPRF1TPRFPRF1TPRFPRF1TPRFPR
0.262.2745.620.9148.4932.470.2951.5534.760.0450.3133.810.1662.1245.360.68
0.364.8948.561.1150.0833.950.3355.6738.630.0653.4236.750.2364.8948.450.89
0.467.8852.071.3552.3836.190.4058.0340.950.0754.1937.510.2567.8451.931.17
0.570.1954.921.5653.8137.640.4561.2244.210.0857.0240.370.3370.2054.831.39
0.671.8157.001.7655.6439.530.5165.6649.000.1060.1643.680.4271.8156.891.56
0.774.3560.542.3158.7442.970.6767.7651.390.1262.7746.630.5374.3760.502.20
0.875.2662.032.8262.0546.940.8771.6756.100.1765.4149.920.7475.1961.762.51
0.978.4967.875.0665.4251.841.3375.7861.510.3168.8254.551.0976.9864.803.56
181.2877.6313.4069.6370.056.2379.7186.3411.6474.2670.235.1879.5870.256.30
+ +Table 3. Experimental results (%) of practical metrics on CIFAR-10 as ID data. Energy (Liu et al., 2020) is used as the score function based on the WideResNet. We compare the detection performance of g-BH algorithm with different sizes of calibrated set. + +
RatioCIFAR-100TinyImageNetSVHNPlace365F-MNIST
F1TPRFPRF1TPRFPRF1TPRFPRF1TPRFPRF1TPRFPR
0.263.5250.194.5346.4235.222.4938.0836.971.9748.7836.411.3264.3047.851.77
0.365.8450.885.9948.9236.493.2452.9539.862.4952.6437.581.7965.8951.212.25
0.467.2252.797.2450.1538.844.0856.7141.483.0554.8839.732.0467.1953.792.86
0.568.8556.178.0650.7940.164.9957.4643.153.4156.4940.892.6570.5355.843.59
0.670.2859.068.5553.8442.555.7159.2545.893.9758.3444.253.0273.4859.394.01
0.773.4361.729.0954.7544.636.3862.9447.744.3361.7548.843.4875.5962.414.64
0.874.5864.6613.2756.8848.187.4564.7750.914.8264.4853.793.9977.1164.295.29
0.977.5367.1814.6260.1366.0910.0465.9652.765.1266.5256.684.5179.4969.496.89
178.9778.7322.7961.5267.7512.8467.1856.575.7970.1671.418.7983.0982.2316.52
+ +Table 4. Experimental results (%) of practical metrics on CIFAR-10 as ID data. MSP (Hendrycks & Gimpel, 2017) is used as the score function based on the WideResNet. We compare the detection performance of g-BH algorithm with different sizes of calibrated set. + +
RatioCIFAR-100TinyImageNetSVHNPlace365F-MNIST
F1TPRFPRF1TPRFPRF1TPRFPRF1TPRFPRF1TPR
0.262.6548.105.4545.9534.112.8743.4536.492.1349.9535.131.5264.3048.301.93
0.363.9549.745.8247.2735.683.0653.1538.562.5152.3337.661.7265.8050.092.15
0.466.1952.696.5248.9937.843.3355.2440.852.7153.8639.341.8468.0452.882.55
0.567.6054.747.2149.9639.123.5056.9042.822.9655.3941.051.9769.7655.183.03
0.669.9158.438.7252.2142.063.8158.4544.693.1658.3444.622.2972.0158.313.64
0.770.6959.799.3753.0143.263.9960.2446.973.4460.3747.352.6174.0761.434.45
0.873.3164.8712.1155.2547.074.6661.4348.493.6064.4953.903.6375.5263.915.34
0.974.6667.9314.0359.2566.7011.6963.3351.204.0365.2355.373.9478.2768.947.21
176.7678.6626.3059.5663.5114.9565.5055.825.6168.1469.359.3781.2281.0418.51
+ +![](images/249577d59a26805b28d776242b4d53a9b4d0c8ec2f8a9e6f2f1e3829a254cdb9.jpg) +(a) CIFAR-100 + +![](images/1c8adff239ca41fba0795233286682b19a77c23880b3069898fb7167e3a8247e.jpg) + +![](images/65cc15a9e738e76182348db7b45e399cfc88f868be6a1faeed77fbcb39d16d7e.jpg) +(b) TinyImageNet + +![](images/366e961bd2cad8bde3ca0f9c0d9c2d75a96b39e0848e14cfb59bb0477a5f568a.jpg) + +![](images/32a91fc196130f4f6c2a8a188a346d1fa46b1f3af2b81b63dfee6d0c5bbd5dfb.jpg) +(c) Place365 + +![](images/5e1967be4924141d3436c522c3138cd4fce4ae6d5ad56a48d71094c6557fb652.jpg) +Figure 3. Comparison between g-BH algorithm and our eg-BH algorithm in terms of F1-score and TPR. The x-axis corresponds to the number $L$ in Algorithm 1, and the y-axis represents the value of metrics. + +![](images/d9bc6e0aadfd1e3d843f433ea42fc36e35dd482b76ffe814c465a47d1b4e154b.jpg) +(d) SVHN + +![](images/c7709bb1fa7646fbef30868f542e6ede0f2cc5cc2dc5e7a62d19df130c2e1784.jpg) + +Table 5. Experimental results (\%) of practical metrics on CIFAR-10 as ID data. The score function is Energy based on ResNet18. We compare the performance between g-BH and eg-BH based on the same score function. + +
Datag-BHTPReg-BHTPR
F1FPRFPRF1FPRFPR
CIFAR-10082.1688.5927.0591.1792.9125.80
TinyImageNet59.3453.5134.4573.2570.4330.02
SVHN75.1659.1329.0689.0079.4331.30
Place36556.0764.1633.0978.5584.7131.50
F-MNIST84.8987.9123.8288.1090.2624.05
MNIST79.0988.2314.8782.7789.9112.60
Average69.4573.5927.0683.8184.6125.88
+ +Table 6. Experimental results (\%) of practical metrics on CIFAR-10 as ID data. The score function is MSP based on ResNet18. We compare the performance between g-BH and eg-BH based on the same score function. + +
Datag-BHTPReg-BHTPR
F1FPRFPRF1FPRFPR
CIFAR-10080.7082.5325.6089.0987.2825.48
TinyImageNet73.2578.4333.0282.7888.0531.55
SVHN86.0087.434.3091.1792.154.06
Place36578.5583.9914.5086.0890.1713.09
F-MNIST85.2682.6321.7990.1189.2719.05
MNIST81.2685.3019.8786.7890.9216.70
average80.8483.3919.8587.6789.6418.32
+ +posed eg-BH algorithm achieves a certain degree of improvement compared with g-BH algorithm. More significantly, the TPR and F1-score are considerably improved. For example, when using Energy as score function and TinyImageNet + +as OOD data, compared to g-BH algorithm, our method reduce reduce the FPR from $34.45\%$ to $30.02\%$ , improve the TPR by $16.92\%$ and the F1-score by $20.91\%$ . Obviously, this improvement still exists for Different OOD data and score function MSP. The above analysis demonstrates the superiority of our method over the g-BH algorithm on small calibrated set. + +To assess the impact of $L$ on both the g-BH algorithm and eg-BH algorithm. we set $L = \{6,7,8,9,10\}$ and conduct the corresponding experiments using Energy as score function based on the ResNet18. The experimental results are presented in Figure 3. From Figure 3, we find that our proposed method outperforms the g-BH algorithm in terms of F1-score and TPR across different values of $L$ . Moreover, for larger value $L$ (i.e. smaller calibrated set), the performance gap between our method and g-BH algorithm becomes more pronounced, especially when $L = 9$ and $L = 10$ . This demonstrates the superiority of our proposed eg-BH algorithm over the g-BH algorithm on the smaller calibrated set. + +# 7. conclusion + +In this paper, we thoroughly analyze the g-BH algorithm and demonstrate that a large calibrated set improves the performance of the g-BH algorithm in terms of TPR, while a small calibrated set weakens its performance. To address this issue, we propose a novel eg-BH algorithm that integrates multiple p-values for decision-making. Extensive experiments demonstrate the validity of our theoretical results and + +the superiority of our method over the g-BH algorithm. + +# Acknowledgment + +This work is supported by the Key R&D Program of Hubei Province under Grant 2024BAB038, the National Key R&D Program of China under Grant 2023YFC3604702, the Fundamental Research Funds for the Central Universities under Grant 2042025kf0045. + +# Impact Statement + +To our best knowledge, this work has no negative social impact. This work mainly provides a solid theoretical support for the field of the OOD detection and improves the performance of existing methods obviously. Hence, our work may promote the development of the related applications. + +# References + +Arlot, S., Blanchard, G., and Roquain, E. Some nonasymptotic results on resampling in high dimension, i: Confidence regions. Annals of Statistics, 38(1):51-82, 2010. +Benjamini, Y. and Hochberg, Y. Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal statistical society: series B (Methodological), 57(1):289-300, 1995. +Benjamini, Y. and Yekutieli, D. The control of the false discovery rate in multiple testing under dependency. Annals of statistics, pp. 1165-1188, 2001. +Bernard, C., Jiang, X., and Wang, R. Risk aggregation with dependence uncertainty. *Insurance: Mathematics and Economics*, 54:93-108, 2014. +Blanchard, G. and Roquain, E. Two simple sufficient conditions for fdr control. Electronic Journal of Statistics, 2: 963-992, 2008. +Cao, H., Chen, J., and Zhang, X. Optimal false discovery rate control for large scale multiple testing with auxiliary information. Annals of statistics, 50(2):807, 2022. +Casella, G. and Berger, R. L. Statistical inference. Cengage Learning, 2002. +Chen, Y. and Liu, W. A theory of transfer-based black-box attacks: Explanation and implications. In NeurIPS, 2023. +Delattre, S. and Roquain, E. New procedures controlling the false discovery proportion via romano-wolf's heuristic. Annals of Statistics, 43(3):1141-1177, 2015. +Deng, L. The MNIST database of handwritten digit images for machine learning research [best of the web]. IEEE Signal Process. Mag., 29(6):141-142, 2012. + +Djurisic, A., Bozanic, N., Ashok, A., and Liu, R. Extremely simple activation shaping for out-of-distribution detection. In ICLR, 2023. +Frolova, D., Vasiluik, A., Belyaev, M., and Shirokikh, B. Solving sample-level out-of-distribution detection on 3d medical images. arXiv preprint arXiv:2212.06506, 2022. +Gong, X., Yuan, D., and Bao, W. Understanding partial multi-label learning via mutual information. In Ranzato, M., Beygelzimer, A., Dauphin, Y. N., Liang, P., and Vaughan, J. W. (eds.), NeurIPS, pp. 4147-4156, 2021. +Gong, X., Yuan, D., and Bao, W. Partial label learning via label influence function. In ICML, volume 162, pp. 7665-7678, 2022. +Gong, X., Yuan, D., and Bao, W. Discriminative metric learning for partial label learning. IEEE Transactions on Neural Networks and Learning Systems, 34(8):4428-4439, 2023a. +Gong, X., Yuan, D., Bao, W., and Luo, F. A unifying probabilistic framework for partially labeled data learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(7):8036-8048, 2023b. +Hendrycks, D. and Gimpel, K. A baseline for detecting misclassified and out-of-distribution examples in neural networks. In *ICLR*, 2017. +Hendrycks, D., Basart, S., Mazeika, M., Zou, A., Kwon, J., Mostajabi, M., Steinhardt, J., and Song, D. Scaling out-of-distribution detection for real-world settings. In ICML, volume 162, pp. 8759-8773, 2022. +Kaur, R., Jha, S., Roy, A., Park, S., Dobriban, E., Sokolsky, O., and Lee, I. idecode: In-distribution equivariance for conformal out-of-distribution detection. In AAAI, pp. 7104-7114, 2022. +Kolmogorov, A. N. and Castelnuovo, G. Sur la notion de la moyenne. G. Bardi, tip. della R. Accad. dei Lincei, 1930. +Krizhevsky, A., Hinton, G., et al. Learning multiple layers of features from tiny images. 2009. +Krizhevsky, A., Sutskever, I., and Hinton, G. E. Imagenet classification with deep convolutional neural networks. Commun. ACM, 60(6):84-90, 2017. +Li, K., Chen, K., Wang, H., Hong, L., Ye, C., Han, J., Chen, Y., Zhang, W., Xu, C., Yeung, D., Liang, X., Li, Z., and Xu, H. CODA: A real-world road corner case dataset for object detection in autonomous driving. In ECCV, volume 13698, pp. 406-423, 2022. + +Liang, S., Li, Y., and Srikant, R. Enhancing the reliability of out-of-distribution image detection in neural networks. In ICLR, 2018. +Liu, W., Shen, X., Du, B., Tsang, I. W., Zhang, W., and Lin, X. Hyperspectral imagery classification via stochastic hhsvms. IEEE Transactions on Image Processing, 28(2): 577-588, 2019. +Liu, W., Wang, X., Owens, J. D., and Li, Y. Energy-based out-of-distribution detection. In NeurIPS, 2020. +Liu, X., Lochman, Y., and Zach, C. GEN: pushing the limits of softmax-based out-of-distribution detection. In CVPR, pp. 23946-23955, 2023. +Lu, H., Gong, D., Wang, S., Xue, J., Yao, L., and Moore, K. Learning with mixture of prototypes for out-of-distribution detection. In ICLR, 2024. +Ma, X., Wang, Z., and Liu, W. On the tradeoff between robustness and fairness. In NeurIPS, 2022. +Ma, X., Zou, X., and Liu, W. A provable decision rule for out-of-distribution detection. In ICML, 2024. +Ma, X., Wu, J., and Liu, W. SAC-BL: A hypothesis testing framework for unsupervised visual anomaly detection and location. Neural Networks, 185:107147, 2025. +Meng, X.-L. Posterior predictive $p$ -values. The annals of statistics, 22(3):1142-1160, 1994. +Netzer, Y., Wang, T., Coates, A., Bissacco, A., Wu, B., and Ng, A. Y. Reading digits in natural images with unsupervised feature learning. 2011. +Regmi, S., Panthi, B., Dotel, S., Gyawali, P. K., Stoyanov, D., and Bhattarai, B. T2fnorm: Train-time feature normalization for OOD detection in image classification. In CVPR, pp. 153-162, 2024. +Ruschendorf, L. Random variables with maximum sums. Advances in Applied Probability, 14(3):623-632, 1982. +Sastry, C. S. and Oore, S. Detecting out-of-distribution examples with gram matrices. In ICML, volume 119, pp. 8491-8501, 2020. +Sun, Y., Ming, Y., Zhu, X., and Li, Y. Out-of-distribution detection with deep nearest neighbors. In ICML, volume 162, pp. 20827-20840, 2022. +Wang, B. and Wang, R. Joint mixability. Mathematics of Operations Research, 41(3):808-826, 2016. +Wei, H., Xie, R., Cheng, H., Feng, L., An, B., and Li, Y. Mitigating neural network overconfidence with logit normalization. In ICML, volume 162, pp. 23631-23644, 2022. + +Xiao, H., Rasul, K., and Vollgraf, R. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017. +Xu, J. and Liu, W. On robust multiclass learnability. In NeurIPS, 2022. +Yang, J., Wang, P., Zou, D., Zhou, Z., Ding, K., Peng, W., Wang, H., Chen, G., Li, B., Sun, Y., Du, X., Zhou, K., Zhang, W., Hendrycks, D., Li, Y., and Liu, Z. Openood: Benchmarking generalized out-of-distribution detection. In NeurIPS, 2022. +Yu, C., Ma, X., and Liu, W. Delving into noisy label detection with clean data. In ICML, volume 202, pp. 40290-40305, 2023. +Zhang, J., Yang, J., Wang, P., Wang, H., Lin, Y., Zhang, H., Sun, Y., Du, X., Zhou, K., Zhang, W., Li, Y., Liu, Z., Chen, Y., and Li, H. Openood v1.5: Enhanced benchmark for out-of-distribution detection. CoRR, abs/2306.09301, 2023a. +Zhang, S., Zhou, C., Zhang, P., Liu, Y., Li, Z., and Chen, H. Multiple hypothesis testing for anomaly detection in multi-type event sequences. In ICDM, pp. 808-817, 2023b. +Zhang, S., Zhou, C., Liu, Y., Zhang, P., Lin, X., and Pan, S. Conformal anomaly detection in event sequences. In ICML, 2025. +Zhou, B., Lapedriza, Å., Khosla, A., Oliva, A., and Torralba, A. Places: A 10 million image database for scene recognition. IEEE Trans. Pattern Anal. Mach. Intell., 40(6): 1452-1464, 2018. +Zou, X. and Liu, W. On the adversarial robustness of out-of-distribution generalization models. In NeurIPS, 2023a. +Zou, X. and Liu, W. Generalization bounds for adversarial contrastive learning. Journal of Machine Learning Research, 24:114:1-114:54, 2023b. + +# A. Proofs + +# A.1. Proof of Theorem 4.1 + +Proof. To obtain an explicit analytical solution, we assume that the testing data comes sequentially in a stream. Then, given a testing set $\mathcal{T}^{test} = \{X_1^{test}, X_2^{test}, \ldots, X_n^{test}\}$ consisting of ID data (TPR only focus on the detection performance of ID data), the expectation of TPR conditional on calibrated set $\mathcal{T}^{cal}$ for the g-BH algorithm can be expressed as + +$$ +\mathbb {E} (\operatorname {T P R} | \mathcal {T} ^ {c a l}) = \mathbb {E} \left(\frac {1}{n} \sum_ {i = 1} ^ {n} \mathbb {1} (f (p (X _ {i} ^ {t e s t})) > \alpha) | \mathcal {T} ^ {c a l}\right) +$$ + +Note that the ID data $X_{1}^{test}, X_{2}^{test}, \ldots, X_{n}^{test}$ are independent and identically distributed, we have + +$$ +\begin{array}{l} \mathbb {E} (\operatorname {T P R} | \mathcal {T} ^ {c a l}) = \mathbb {E} \left(\mathbb {1} (f (p \left(X _ {1} ^ {t e s t}\right)) > \alpha) | \mathcal {T} ^ {c a l}\right) \\ = \mathbb {P} (f (p \left(X _ {1} ^ {\text {t e s t}}\right)) > \alpha | \mathcal {T} ^ {\text {c a l}}). \\ \end{array} +$$ + +Note that the empirical p-value + +$$ +\hat {p} (X _ {1} ^ {t e s t}) = \frac {\sum_ {j = 1} ^ {m} \mathbb {1} (s (X _ {j} ^ {c a l}) \leq s (X _ {i} ^ {t e s t})) + 1}{m + 1}. +$$ + +Since $f'(\cdot) \in \mathcal{F}_1 \cup \mathcal{F}_2$ , $f'(\cdot) > 0$ and thus $f(\cdot)$ is increasing. Denote by $f^{-1}(\cdot)$ the inverse function of $f(\cdot)$ . Then, we obtain + +$$ +\begin{array}{l} \mathbb {E} (\operatorname {T P R} | \mathcal {T} ^ {c a l}) = \mathbb {P} (f (p (X _ {1} ^ {t e s t})) > \alpha | \mathcal {T} ^ {c a l}) \\ = \mathbb {P} \left(\frac {\sum_ {j = 1} ^ {m} \mathbb {1} (s (X _ {j} ^ {c a l}) \leq s (X _ {i} ^ {t e s t})) + 1}{m + 1} > f ^ {- 1} (\alpha) | \mathcal {T} ^ {c a l}\right) \\ = \mathbb {P} \left(\sum_ {j = 1} ^ {m} \mathbb {1} \left(s \left(X _ {j} ^ {\text {c a l}}\right) \leq s \left(X _ {i} ^ {\text {t e s t}}\right)\right) > f ^ {- 1} (\alpha) (m + 1) - 1 | \mathcal {T} ^ {\text {c a l}}\right) \\ = \mathbb {P} \left(\frac {\sum_ {j = 1} ^ {m} \mathbb {1} (s \left(X _ {j} ^ {c a l}\right) \leq s \left(X _ {i} ^ {t e s t}\right))}{m} > \frac {f ^ {- 1} (\alpha) (m + 1) - 1}{m} \mid \mathcal {T} ^ {c a l}\right) \\ = \mathbb {P} \left(\hat {F} (s (X _ {i} ^ {t e s t})) > \frac {f ^ {- 1} (\alpha) (m + 1) - 1}{m} | \mathcal {T} ^ {c a l}\right) \\ \end{array} +$$ + +Without loss of generality, we suppose that the random variable $s(X_1^{test})$ follows continuous distribution. Denote by $F(\cdot)$ the real cumulative distribution function of $s(X_1^{test})$ and by $\hat{F}^{-1}(\cdot)$ the inverse function of $\hat{F}(\cdot)$ . In addition, we denote $[\cdot]$ the floor function. Then, we get + +$$ +\begin{array}{l} \mathbb {E} (\mathrm {T P R} | \mathcal {T} ^ {c a l}) = 1 - \mathbb {P} \left(\hat {F} (s (X _ {i} ^ {t e s t})) \leq \frac {f ^ {- 1} (\alpha) (m + 1) - 1}{m} | \mathcal {T} ^ {c a l}\right) \\ = 1 - \mathbb {P} \left(\hat {F} (s (X _ {i} ^ {t e s t})) \leq \frac {[ f ^ {- 1} (\alpha) (m + 1) ] - 1}{m} | \mathcal {T} ^ {c a l}\right) \\ = 1 - \mathbb {P} \left(s \left(X _ {i} ^ {t e s t}\right) \leq \hat {F} ^ {- 1} \left(\frac {[ f ^ {- 1} (\alpha) (m + 1) ] - 1}{m}\right) \mid \mathcal {T} ^ {c a l}\right) \\ = 1 - F \left(\hat {F} ^ {- 1} \left(\frac {[ f ^ {- 1} (\alpha) (m + 1) ] - 1}{m}\right)\right). \\ \end{array} +$$ + +For simplicity, we denote $\beta = [f^{-1}(\alpha)(m + 1)] - 1$ . Note that $\hat{F}(X_{(\beta)}^{cal}) = \frac{\beta}{m}$ . Therefore, we have + +$$ +\mathbb {E} (\operatorname {T P R} | \mathcal {T} ^ {c a l}) = 1 - F (X _ {(\beta)} ^ {c a l}). +$$ + +According to Eq. (5), $\mathbb{E}(\mathrm{TPR}|\mathcal{T}^{cal}) = 1 - p(X_{(\beta)}^{cal})$ . + +To complete our proof, we need the following technical lemma. + +Lemma A.1. Suppose the continuous random variable $X$ have the cumulative distribution function $F(\cdot)$ . Then, the random variable $F(X)$ follows the uniform distribution on $(0, 1)$ . + +For the examples $X_{1}^{cal}, X_{2}^{cal}, \ldots, X_{m}^{cal}$ , we denote $p(X_{i}^{cal}) = F(X_{i}^{cal}), i = 1, 2, \dots, m$ and $p(X_{(\beta)}^{cal})$ is the $\beta$ -th order statistic from the smallest to the largest. By Lemma A.1, $p(X_{i}^{cal})$ follows the uniform distribution on $(0, 1)$ . Next, we aims to derive the probability density function of $p(X_{(\beta)}^{cal})$ . According to the Definition of $p(X_{i}^{cal}), p(X_{1}^{cal}), p(X_{2}^{cal}), \dots, p(X_{m}^{cal})$ are independent and identically distributed. Denote by $F_{p}(\cdot)$ the cumulative distribution function of $p(X_{i}^{cal})$ . For any $x$ in the support set of $F_{p}(\cdot)$ and a sufficiently small $\delta$ , we have + +$$ +\begin{array}{l} \mathbb {P} \left(x \leq p \left(X _ {(\beta)} ^ {c a l}\right) < x + \delta\right) = \mathbb {P} (\text {o n e o f t h e} p \left(X ^ {c a l}\right) ^ {\prime} s \in [ x, x + \delta) \text {a n d} \beta - 1 \text {o f t h e o t h e r s} < x) \\ = \sum_ {i = 1} ^ {n} \mathbb {P} \left(p \left(X _ {i} ^ {c a l}\right) \in [ x, x + \delta) \text {a n d e x a c t l y} \beta - 1 \text {o f t h e o t h e r s} < x\right) \\ = n \mathbb {P} \left(p \left(X _ {1} ^ {\text {c a l}}\right) \in [ x, x + \delta) \text {a n d} \beta - 1 \text {o f t h e o t h e r s} < x\right) \tag {8} \\ = n \mathbb {P} \left(p \left(X _ {1} ^ {\text {c a l}}\right) \in [ x, x + \delta)\right) \mathbb {P} (\beta - 1 \text {o f t h e o t h e r s} < x) \\ = n\mathbb{P}\left(p(X_{1}^{cal})\in [x,x + \delta)\right)\left(\binom {m - 1}{\beta - 1}\mathbb{P}(p(X_{1}^{cal}) < x)^{\beta -1}P(p(X_{1}^{cal}) > x)^{m - \beta}\right) \\ \end{array} +$$ + +Then, the probability density function of $p(X_{(\beta)}^{cal})$ is + +$$ +\begin{array}{l} f _ {\beta} (x) = \lim _ {\delta \rightarrow 0} \frac {\mathbb {P} \left(x \leq p \left(X _ {(\beta)} ^ {c a l}\right) < x + \delta\right)}{\delta} \\ = m \binom {m - 1} {\beta - 1} F ^ {\beta - 1} (x) (1 - F (x)) ^ {m - \beta} F ^ {\prime} (x) \\ = \left\{ \begin{array}{l l} m \binom {m - 1} {\beta - 1} x ^ {\beta - 1} (1 - x) ^ {m - \beta} & \text {i f} 0 < x < 1 \\ 0 & \text {o t h e r w i s e .} \end{array} \right. \\ \end{array} +$$ + +Therefore, the probability density function of $\mathbb{E}(\mathrm{TPR}|\mathcal{T}^{cal}) = 1 - F(X_{(\beta)}^{cal})$ can be expressed as + +$$ +\begin{array}{l} f _ {\mathbb {E} (\mathrm {T P R} | \mathcal {T} ^ {c a l})} (x) = f _ {\beta} (1 - x) \\ = \left\{ \begin{array}{l l} m \binom {m - 1} {\beta - 1} x ^ {m - \beta} (1 - x) ^ {\beta - 1} & \text {i f} 0 < x < 1 \\ 0 & \text {o t h e r w i s e .} \end{array} \right. \\ \end{array} +$$ + +The above result indicates that $\mathbb{E}(\mathrm{TPR}|\mathcal{T}^{cal})$ follows beta distribution with shape parameters $m - \beta + 1$ and $\beta$ , which completes the proof. + +# A.2. Technical Lemmas and Their Proofs + +Lemma A.2. Suppose that the function $g(\cdot)$ is continuous and monotonically increasing on [0, 1]. Then, for any $\alpha \in (0, 1)$ , we have + +$$ +\int_ {0} ^ {\alpha} g (x) d x \leq \alpha \int_ {0} ^ {1} g (x) d x. +$$ + +Proof. Since function $g(\cdot)$ is increasing, $g(x)$ is integrable, namely, $\int_0^1 g(x)dx < \infty$ . Note that + +$$ +\alpha \int_ {0} ^ {1} g (x) d x = \alpha \int_ {0} ^ {\alpha} g (x) d x + \alpha \int_ {\alpha} ^ {1} g (x) d x +$$ + +then, we have + +$$ +\begin{array}{l} \int_ {0} ^ {\alpha} g (x) d x - \alpha \int_ {0} ^ {1} g (x) d x = \int_ {0} ^ {\alpha} g (x) d x - \alpha \int_ {0} ^ {\alpha} g (x) d x - \alpha \int_ {\alpha} ^ {1} g (x) d x \\ = (1 - \alpha) \int_ {0} ^ {\alpha} g (x) d x - \alpha \int_ {\alpha} ^ {1} g (x) d x. \\ \end{array} +$$ + +By the first mean value theorem for integration, there exist $\xi_1 \in (0, \alpha)$ and $\xi_2 \in (\alpha, 1)$ such that + +$$ +\int_ {0} ^ {\alpha} g (x) d x = \alpha g (\xi_ {1}), \qquad \int_ {\alpha} ^ {1} g (x) d x = (1 - \alpha) g (\xi_ {2}). +$$ + +Obviously, $\xi_1 \leq \xi_2$ . Since $g(x)$ is increasing, then $g(\xi_1) \leq g(\xi_2)$ . Therefore, we have + +$$ +\int_ {0} ^ {\alpha} g (x) d x - \alpha \int_ {0} ^ {1} g (x) d x = \alpha (1 - \alpha) \left(g \left(\xi_ {1}\right) - g \left(\xi_ {2}\right)\right) \leq 0, +$$ + +namely, for any $\alpha \in (0,1)$ + +$$ +\int_ {0} ^ {\alpha} g (x) d x \leq \alpha \int_ {0} ^ {1} g (x) d x. +$$ + +![](images/69c0a6e420bef0bdfa1e6e9894b7a3a4adbe43f53b5e8c167fd881f6a2021135.jpg) + +Based on the lemma A.2, we have following lemma. + +Lemma A.3. Suppose that the function $g(\cdot)$ is continuous and monotonically increasing on $[0, 1]$ . Then, for any $\alpha \in (0, 1)$ , we have + +$$ +\mathbb {P} \left(\Omega (\mathbf {p}, \mathbf {w}) \leq g ^ {- 1} \left(\frac {1}{\alpha} \int_ {0} ^ {\alpha} g (x) d x\right)\right) \leq \alpha . +$$ + +Proof. Denote $Y_{i} = g(p_{i})$ where $p_i \in \mathcal{P}$ . Without loss of generality, we assume that the p-values $p_1, \dots, p_L$ are exact. Note that for any $t \in (0, 1)$ , we have + +$$ +\mathbb {P} \left(Y _ {i} \leq t\right) = \mathbb {P} \left(g \left(p _ {i}\right) \leq t\right) = \mathbb {P} \left(p _ {i} \leq g ^ {- 1} (t)\right) = g ^ {- 1} (t). +$$ + +Therefore, $g^{-1}(\cdot)$ is the cumulative distribution function of $Y_{i}$ . Based on the theoretical results in Bernard et al. (2014), we obtain + +$$ +Q ^ {*} (h, \mathbf {p}, \alpha) = \inf _ {p _ {i} \in \mathcal {P}} \left\{Q (\Omega (\mathbf {p}, \mathbf {w}), 1) \right\} +$$ + +where $h(p_1,\dots ,p_L) = \Omega (\mathbf{p},\mathbf{w})$ and + +$$ +\Omega (\mathbf {p}, \mathbf {w}) = g ^ {- 1} \left(w _ {1} g \left(p _ {1}\right) + w _ {2} g \left(p _ {2}\right) + \dots , w _ {L} g \left(p _ {L}\right)\right) +$$ + +Note that $Q((w_{1}g(p_{1}) + w_{2}g(p_{2}) + \dots, w_{L}g(p_{L})), 1)$ is the essential supremum of $w_{1}g(p_{1}) + w_{2}g(p_{2}) + \dots, w_{L}g(p_{L})$ , thus the following relations hold: + +$$ +Q \left(\left(w _ {1} g \left(p _ {1}\right) + w _ {2} g \left(p _ {2}\right) + \dots , w _ {L} g \left(p _ {L}\right)\right), 1\right) \geq \mathbb {E} \left(w _ {1} g \left(p _ {1}\right) + w _ {2} g \left(p _ {2}\right) + \dots , w _ {L} g \left(p _ {L}\right)\right). +$$ + +Since $g(p_{1}), g(p_{2}), \dots, g(p_{L})$ are identically distributed sharing the cumulative distribution function $g^{-1}(\cdot)$ , we have + +$$ +\begin{array}{l} \mathbb {E} \left(w _ {1} g \left(p _ {1}\right) + w _ {2} g \left(p _ {2}\right) + \dots , w _ {L} g \left(p _ {L}\right)\right) = w _ {1} \mathbb {E} \left(g \left(p _ {1}\right)\right) + w _ {2} \mathbb {E} \left(g \left(p _ {2}\right)\right) + \dots , w _ {L} \mathbb {E} \left(g \left(p _ {L}\right)\right) \\ = \left(w _ {1} + w _ {2} + \dots + w _ {L}\right) \mathbb {E} (g (p _ {1})) \\ = \mathbb {E} (g (p _ {1})) = \int_ {0} ^ {1} g (x) d x \\ \end{array} +$$ + +By Lemma A.2, we get + +$$ +Q \left(\left(w _ {1} g \left(p _ {1}\right) + w _ {2} g \left(p _ {2}\right) + \dots , w _ {L} g \left(p _ {L}\right)\right), 1\right) \geq \frac {1}{\alpha} \int_ {0} ^ {\alpha} g (x) d x +$$ + +Because $g(\cdot)$ is continuous and increasing, $g^{-1}(\cdot)$ is also continuous and increasing. Hence, for any $p_i \in \mathcal{P}$ we have + +$$ +Q \left( \right.g ^ {- 1} \left(\left(w _ {1} g \left(p _ {1}\right) + w _ {2} g \left(p _ {2}\right) + \dots , w _ {L} g \left(p _ {L}\right)\right), 1\right) \geq g ^ {- 1} \left(\frac {1}{\alpha} \int_ {0} ^ {\alpha} g (x) d x\right), +$$ + +namely, $g^{-1}\left(\frac{1}{\alpha}\int_{0}^{\alpha}g(x)dx\right)$ is the lower bound of $Q(g^{-1}((w_1g(p_1) + w_2g(p_2) + \dots ,w_Lg(p_L))),1)$ . Then, we get + +$$ +\begin{array}{l} Q ^ {*} (h, \mathbf {p}, \alpha) = \inf _ {p _ {i} \in \mathcal {P}} \left\{ \right.Q \left( \right.g ^ {- 1} \left(\left(w _ {1} g \left(p _ {1}\right) + w _ {2} g \left(p _ {2}\right) + \dots , w _ {L} g \left(p _ {L}\right)\right), 1\right)\left. \right\} \\ \geq g ^ {- 1} \left(\frac {1}{\alpha} \int_ {0} ^ {\alpha} g (x) d x\right). \\ \end{array} +$$ + +According to the definition of $\alpha$ -quantile, we obtain + +$$ +\mathbb {P} \left(\Omega (\mathbf {p}, \mathbf {w}) \leq g ^ {- 1} \left(\frac {1}{\alpha} \int_ {0} ^ {\alpha} g (x) d x\right)\right) \leq \mathbb {P} \left(\Omega (\mathbf {p}, \mathbf {w}) \leq Q (\Omega (\mathbf {p}, \mathbf {w}), \alpha)\right) \leq \alpha . +$$ + +Lemma A.3 provide a significant region for the level $\alpha$ . By Lemma A.3, we can choose appropriate function $g(\cdot)$ to integrate various p-values. + +# A.3. Proof of Theorem 5.1 + +Proof. When $g(x) = x^{\kappa}$ , $g^{-1}(x) = x^{\frac{1}{\kappa}}$ . According to the Theorem A.3, we have + +$$ +g ^ {- 1} \left(\frac {1}{\alpha} \int_ {0} ^ {\alpha} g (x) d x\right) = \left(\frac {1}{\kappa + 1} \alpha^ {\kappa}\right) ^ {\frac {1}{\kappa}} = (\kappa + 1) ^ {- \frac {1}{\kappa}} \alpha . +$$ + +and + +$$ +\begin{array}{l} \mathbb {P} \left(\Omega (\mathbf {p}, \mathbf {w}) \leq g ^ {- 1} \left(\frac {1}{\alpha} \int_ {0} ^ {\alpha} g (x) d x\right)\right) \\ = \mathbb {P} \left(\left(w _ {1} p _ {1} ^ {\kappa} + w _ {2} p _ {2} ^ {\kappa} + \dots + w _ {L} p _ {L} ^ {\kappa}\right) ^ {\frac {1}{\kappa}} \leq (\kappa + 1) ^ {- \frac {1}{\kappa}} \alpha\right) \\ = \mathbb {P} \left(\left(\kappa + 1\right) ^ {\frac {1}{\kappa}} \left(w _ {1} p _ {1} ^ {\kappa} + w _ {2} p _ {2} ^ {\kappa} + \dots + w _ {L} p _ {L} ^ {\kappa}\right) ^ {\frac {1}{\kappa}} \leq \alpha\right) \leq \alpha \\ \end{array} +$$ + +Therefore, + +$$ +(\kappa + 1) ^ {\frac {1}{\kappa}} \left(w _ {1} p _ {1} ^ {\kappa} + w _ {2} p _ {2} ^ {\kappa} + \dots + w _ {L} p _ {L} ^ {\kappa}\right) ^ {\frac {1}{\kappa}} +$$ + +is a valid p-value. Specifically, when $\kappa = 1$ and $w_{i} = \frac{1}{L}$ + +$$ +(\kappa + 1) ^ {\frac {1}{\kappa}} \left(w _ {1} p _ {1} ^ {\kappa} + w _ {2} p _ {2} ^ {\kappa} + \dots + w _ {L} p _ {L} ^ {\kappa}\right) ^ {\frac {1}{\kappa}} = \frac {2 \left(p _ {1} + p _ {2} + \cdots + p _ {L}\right)}{L}. +$$ + +Denote $w_{k^*} = \max \{p_1, p_2, \dots, p_L\}$ , Note that + +$$ +\left(\kappa + 1\right) ^ {\frac {1}{\kappa}} \left(w _ {k ^ {*}} p _ {k ^ {*}} ^ {\kappa}\right) ^ {\frac {1}{\kappa}} \leq \left(\kappa + 1\right) ^ {\frac {1}{\kappa}} \left(w _ {1} p _ {1} ^ {\kappa} + w _ {2} p _ {2} ^ {\kappa} + \dots + w _ {L} p _ {L} ^ {\kappa}\right) ^ {\frac {1}{\kappa}} \leq \left(\kappa + 1\right) ^ {\frac {1}{\kappa}} \left(p _ {k ^ {*}} ^ {\kappa}\right) ^ {\frac {1}{\kappa}} +$$ + +further, + +$$ +\lim _ {\kappa \rightarrow \infty} (\kappa + 1) ^ {\frac {1}{\kappa}} \left(w _ {k ^ {*}} p _ {k ^ {*}} ^ {\kappa}\right) ^ {\frac {1}{\kappa}} = \lim _ {\kappa \rightarrow \infty} (\kappa + 1) ^ {\frac {1}{\kappa}} \left(p _ {k ^ {*}} ^ {\kappa}\right) ^ {\frac {1}{\kappa}} = p _ {k ^ {*}} +$$ + +Hence, when $\kappa \to \infty$ , we have + +$$ +\lim _ {\kappa \to \infty} (\kappa + 1) ^ {\frac {1}{\kappa}} (w _ {1} p _ {1} ^ {\kappa} + w _ {2} p _ {2} ^ {\kappa} + \dots + w _ {L} p _ {L} ^ {\kappa}) ^ {\frac {1}{\kappa}} = \max \{p _ {1}, p _ {2}, \dots , p _ {L} \}. +$$ + +# A.4. Proof of Theorem 5.2 + +Proof. According to the proof of Theorem A.3, if $g(x) = x^{\kappa}$ , we have + +$$ +Q ^ {*} (h, \mathbf {p}, \alpha) = \inf _ {p _ {i} \in \mathcal {P}} \left\{Q (\Omega (\mathbf {p}, \mathbf {w}), 1) \right\} = \inf _ {p _ {i} \in \mathcal {P}} \left\{Q ((w _ {1} p _ {1} ^ {\kappa} + w _ {2} p _ {2} ^ {\kappa} + \dots + w _ {L} p _ {L} ^ {\kappa}) ^ {\frac {1}{\kappa}}, 1) \right\} +$$ + +Then, + +$$ +(Q ^ {*} (h, \mathbf {p}, \alpha)) ^ {\kappa} = \inf _ {p _ {i} \in \mathcal {P}} \left\{Q \left(\left(w _ {1} p _ {1} ^ {\kappa} + w _ {2} p _ {2} ^ {\kappa} + \dots + w _ {L} p _ {L} ^ {\kappa}\right), 1\right) \right\} \geq \frac {\alpha^ {\kappa}}{\kappa + 1}. +$$ + +Note that $\kappa > 0$ , the probably density function of $g(p_i)$ is monotone on its support set. By Wang & Wang (2016), + +$$ +\big (Q ^ {*} (h, \mathbf {p}, \alpha) \big) ^ {\kappa} = \inf _ {p _ {i} \in \mathcal {P}} \big \{Q ((w _ {1} p _ {1} ^ {\kappa} + w _ {2} p _ {2} ^ {\kappa} + \dots + w _ {L} p _ {L} ^ {\kappa}), 1) \big \} = \frac {\alpha^ {\kappa}}{\kappa + 1}. +$$ + +if and only if the "mean condition" is satisfied: + +$$ +w ^ {*} \alpha^ {\kappa} \leq \frac {\alpha^ {\kappa}}{\kappa + 1} \leq (w _ {1} + w _ {2} + \dots + w _ {L}) \alpha^ {\kappa} - w ^ {*} \alpha^ {\kappa} = (1 - w ^ {*}) \alpha^ {\kappa}. +$$ + +Equivalently, $w^{*}\leq \min \left\{\frac{1}{2},\frac{1}{1 + \kappa},\frac{\kappa}{\kappa + 1}\right\}$ . Further, we have + +$$ +Q ^ {*} (\tilde {h}, \mathbf {p}, \alpha) = \inf _ {p _ {i} \in \mathcal {P}} \left\{Q \left(\left(\kappa + 1\right) ^ {\frac {1}{\kappa}} \left(w _ {1} p _ {1} ^ {\kappa} + w _ {2} p _ {2} ^ {\kappa} + \dots + w _ {L} p _ {L} ^ {\kappa}\right) ^ {\frac {1}{\kappa}}, 1\right) \right\} = \alpha , \tag {9} +$$ + +where $\tilde{h} (\mathbf{p}) = (\kappa +1)^{\frac{1}{\kappa}}(w_1p_1^\kappa +w_2p_2^\kappa +\dots +w_Lp_L^\kappa)^{\frac{1}{\kappa}}$ . Next, based on the condition in Eq. (9), we aim to demonstrate + +$$ +\sup _ {p _ {i} \in \mathcal {P}} \left\{\mathbb {P} \left(\tilde {h} (\mathbf {p}) \leq \alpha\right) \right\} = \alpha . +$$ + +If $Q^{*}(\tilde{h}, \mathbf{p}, \alpha) = \alpha$ , for any $\alpha \in (0, 1)$ and arbitrary $\mathbf{p}$ -values $p_1, p_2, \dots, p_L$ where $p_i \in \mathcal{P}$ , we have $Q(\tilde{h}(\mathbf{p}), \alpha) \geq \alpha$ according to the definition of $Q^{*}(\tilde{h}, \mathbf{p}, \alpha)$ . By the definition of $\alpha$ -quantile, $\mathbb{P}(\tilde{h}(\mathbf{p}) < \alpha) \leq \alpha$ . It follows that + +$$ +\mathbb {P} \left(\tilde {h} (\mathbf {p}) \leq \alpha\right) \leq \mathbb {P} \left(\tilde {h} (\mathbf {p}) < \alpha + \delta\right) \leq \alpha + \delta , +$$ + +Since $\delta$ is arbitrary, we have + +$$ +\mathbb {P} \left(\tilde {h} (\mathbf {p}) \leq \alpha\right) \leq \alpha . +$$ + +On the other hand, according to the definition of infimum, for any $\delta \in (0,1)$ , there exist the p-values $p_1^*,\dots ,p_L^*\in \mathcal{P}$ such that $\alpha \leq Q(\tilde{h} (\mathbf{p}^{*}),\alpha) < \alpha +\delta$ , and thus $\mathbb{P}(\tilde{h} (\mathbf{p}^{*})\leq \alpha +\delta)\geq \alpha$ where $\mathbf{p}^{*} = \{p_{1}^{*},\dots ,p_{L}^{*}\}$ . Since $\delta$ is arbitrary, then we have + +$$ +\sup _ {p _ {i} \in \mathcal {P}} \left\{\mathbb {P} \left(\tilde {h} (\mathbf {p}) \leq \alpha\right) \right\} = \alpha . +$$ + +# B. Additional Experimental Results + +In this section, we present additional experimental results. The results on MNIST as OOD data are presented in Tables 7. Table 7 shows the same conclusions as those of tables in main text. + +Table 7. Experimental results (%) of practical metrics on CIFAR-10 as ID data. The MNIST is OOD data. Energy and MSP are used as the score functions. We compare the detection performance of g-BH algorithm with different sizes of calibrated set. + +
ScoreEnergyMSP
ResNet18WideResNetResNet18WideResNet
RatioF1TPRFPRF1TPRFPRF1TPRFPRF1TPRFPR
0.263.4847.944.9463.1645.871.9862.8748.255.2562.4646.452.29
0.365.1550.155.7865.0949.122.3564.2350.105.9064.9549.402.72
0.467.5752.956.9566.9753.993.0466.6753.696.3767.9553.133.25
0.569.5357.397.2770.1556.753.5966.6754.687.5969.7655.613.82
0.672.9459.828.5471.5959.444.2569.9158.599.0270.8857.204.19
0.773.8262.2910.1175.5363.176.1171.1960.7910.0072.9160.204.94
0.874.7565.8713.6877.4666.576.7971.8262.1911.0074.8363.376.00
0.975.5968.5715.3579.8569.448.2673.5266.5514.4978.1369.698.70
176.8175.4919.5481.7473.3910.7975.5981.5134.1479.1572.4710.65
\ No newline at end of file diff --git a/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/images.zip b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..59313015a397ed18c0dd840cc3ff0129a2c2dc3d --- /dev/null +++ b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2a508607bbec7e55ff5f851b1e2f7d5e5e70bfbbec4635390550e58084fa9ce +size 1212220 diff --git a/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/layout.json b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3323ff690ebc505ffac31f0f4337f963baa7b7d0 --- /dev/null +++ b/acloserlookatgeneralizedbhalgorithmforoutofdistributiondetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d35ff0c186ff21dab61d4009572adbdec1ee1de6eea82e33b44466171102b82 +size 812454 diff --git a/acloserlookatmultimodalrepresentationcollapse/3f84fba0-7d29-4c16-9b4d-dfab15cd5c01_content_list.json b/acloserlookatmultimodalrepresentationcollapse/3f84fba0-7d29-4c16-9b4d-dfab15cd5c01_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b715c8e0bf3fd4c1cb0e366435daa86806d6374b --- /dev/null +++ b/acloserlookatmultimodalrepresentationcollapse/3f84fba0-7d29-4c16-9b4d-dfab15cd5c01_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19e3b5a251b07ea4ffa68afa8a0dc557ac08c878fc414c0f51ee9825e4d2abbf +size 162229 diff --git a/acloserlookatmultimodalrepresentationcollapse/3f84fba0-7d29-4c16-9b4d-dfab15cd5c01_model.json b/acloserlookatmultimodalrepresentationcollapse/3f84fba0-7d29-4c16-9b4d-dfab15cd5c01_model.json new file mode 100644 index 0000000000000000000000000000000000000000..20e732cdd791428af9c4b11e7fb42b4c245659a9 --- /dev/null +++ b/acloserlookatmultimodalrepresentationcollapse/3f84fba0-7d29-4c16-9b4d-dfab15cd5c01_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7430e60b9816540f9e21a67aef3d1884a4c6e7424a29c04f4de1b8c56756fbe4 +size 188181 diff --git a/acloserlookatmultimodalrepresentationcollapse/3f84fba0-7d29-4c16-9b4d-dfab15cd5c01_origin.pdf b/acloserlookatmultimodalrepresentationcollapse/3f84fba0-7d29-4c16-9b4d-dfab15cd5c01_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4b7955c6bfa1ba7ed1f2fe6e8e8b120a00efc029 --- /dev/null +++ b/acloserlookatmultimodalrepresentationcollapse/3f84fba0-7d29-4c16-9b4d-dfab15cd5c01_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4cf43b499d049a6c28d2469e01001d220f8c766df5fe398c2a26b1620dc1d56 +size 1122082 diff --git a/acloserlookatmultimodalrepresentationcollapse/full.md b/acloserlookatmultimodalrepresentationcollapse/full.md new file mode 100644 index 0000000000000000000000000000000000000000..79d88546569c08d3786a52af408bb135aa8ec44c --- /dev/null +++ b/acloserlookatmultimodalrepresentationcollapse/full.md @@ -0,0 +1,686 @@ +# A Closer Look at Multimodal Representation Collapse + +Abhra Chaudhuri1 Anjan Dutta2 Tu Bui1 Serban Georgescu1 + +# Abstract + +We aim to develop a fundamental understanding of modality collapse, a recently observed empirical phenomenon wherein models trained for multimodal fusion tend to rely only on a subset of the modalities, ignoring the rest. We show that modality collapse happens when noisy features from one modality are entangled, via a shared set of neurons in the fusion head, with predictive features from another, effectively masking out positive contributions from the predictive features of the former modality and leading to its collapse. We further prove that cross-modal knowledge distillation implicitly disentangles such representations by freeing up rank bottlenecks in the student encoder, denoising the fusion-head outputs without negatively impacting the predictive features from either modality. Based on the above findings, we propose an algorithm that prevents modality collapse through explicit basis reallocation, with applications in dealing with missing modalities. Extensive experiments on multiple multimodal benchmarks validate our theoretical claims. Project page: https://abhrac.github.io/mmcollapse/. + +# 1. Introduction + +A number of recent works in the multimodal learning literature have observed that models that aim to learn a fusion of several modalities often end up relying only on a subset of them (Javaloy et al., 2022; Wu et al., 2024). This phenomenon, termed as modality collapse, has been empirically observed across a diverse range of fusion strategies (Javaloy et al., 2022; Ma et al., 2022; Zhang et al., 2022; Zhou et al., 2023; Wu et al., 2024), and has serious implications for the scenario when certain modalities can go missing at test time (You et al., 2020; Ma et al., 2022; Wu et al., 2024). If a + +$^{1}$ Fujitsu Research of Europe $^{2}$ University of Surrey. Correspondence to: Abhra Chaudhuri . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/7d3f1a274034f9ccb5d3aaa0618f04758eee67bfc4e35deab643b65a3183e087.jpg) +Figure 1. When noisy features of one modality exist in entanglement with predictive features of another in the fusion head (the probability of which increases with the number of modalities), it results in a sub-optimal solution wherein the predictive value of the former modality is diminished by the inevitable existence of noisy features. Freeing up rank bottlenecks allows for the denoising of such features along independent dimensions without affecting the latter modality, while simultaneously allowing the predictive features of the former modality to contribute to loss reduction. + +model is reliant only on a subset of modalities and if it is those that specifically go missing at test time, the model could end up completely non-functional. Although there have been several attempts at mitigating modality collapse based on a priori conjectures about what might be causing them, such as conflicting gradients (Javaloy et al., 2022) or interactions between data distributions and the fusion strategy (Ma et al., 2022), to the best of our knowledge, there have been no prior efforts towards developing a bottom-up understanding of the underlying learning-theoretic phenomena at play. + +We aim to bridge this gap by developing a mechanistic theory of multimodal feature encoding that is agnostic of the specific choice of fusion strategy (see Task Setup in Section 3). We start by showing that modality collapse arises as a result of an unintended entanglement among the noisy and the predictive features of different modalities through a shared set of polysemantic neurons (Elhage et al., 2022), which we observe, via Lemma 1, to increase quadratically + +![](images/c657e6fd236d4a5f915109d2d5605c48f82e0058b28e55dbdaf9fd5e753d61c9.jpg) +Figure 2. Polysemanticity with and without feature interference between noisy and predictive features. All horizontal axes correspond to the value of the weight of the polysematic neuron. For (b) and (c), the vertical axes correspond to the title of the columns. When the predictive features of modality 1 (M1) and the noisy features of modality 2 (M2) activate along the same region in the interpolation regime of the same neuron (a - top), it prevents the predictive features of M2 from contributing to loss minimization (c - top) because of the unintended inclusion of and the unwanted interference from the noisy features of M2 (b - top), leading to its collapse. However, when they are disentangled (here, by being mapped to disjoint sub-regimes in the weights-space around a switching threshold: a - bottom), they result in non-interfering activation patterns (b - bottom), and effectively, a feature-wise separable effect on the marginal loss (c - bottom). + +with the number of modalities. It implies that predictive features of some modalities cannot be learned without also including noisy features from the other modalities. The noisy features then effectively suppress the predictive value of the modality that they come from, leading to their observed collapse in the fused representation, a process we formalize in Theorem 1. + +As depicted in Figure 1, in the optimization landscape, collapse corresponds to a suboptimal solution such that any step around it along the dimension of entanglement (which is the only available dimension for optimization in the given state), would lead to a simultaneous denoising of one modality and the forgetting of predictive features from the other. If the latent factors underlying the modalities are sufficiently complementary, we show that cross-modal predictive-predictive feature entanglements are less likely to occur than predictive-noisy entanglements (Lemma 3) – so, we mainly focus on the latter in this work. + +We find that this cross-modal entanglement of features happens due to faulty neural capacity allocation (Scherlis et al., 2022) among modalities during the optimization of the fusion head (illustrated in Figure 2), which we observe, in Lemma 2, to be a result of the well-known low-rank simplicity bias of neural networks (Huh et al., 2023) limiting the rank of the gradient updates received at any given layer. + +Consequently, through Theorem 2, we arrive at the result that this gradient-rank bottleneck forces SGD to parameterize the fusion head neurons in a polysemantic manner. + +Interestingly, we observe in Theorem 3, that knowledge distillation into the modalities that collapse, from the ones that survive, implicitly averts cross-modal polysemantic entanglements. It does so by freeing up rank bottlenecks at the level of the student encoders. As a result, as again shown in Figure 1, the noisy features of the modalities that would otherwise collapse, are allocated dedicated dimensions in the latent space, which the fusion operator can then leverage to denoise the output representations. This allows for the complete incorporation of predictive features from all the modalities without any noisy interference, thereby preventing collapse. + +Under the condition of identifiability (Gulrajani & Hashimoto, 2022) of modality-specific causal factors up to equivariances of the underlying mechanisms (Ahuja et al., 2022), we propose an algorithm called Explicit Basis Reallocation (EBR), which automatically identifies cross-modal feature entanglements and learns independent denoising directions in the latent space to counteract their hindrance on empirical risk minimization. Consequently, the concrete feature-to-basis mapping across modalities obtained from EBR can be used to identify suitable substitution candidates + +for dealing with missing modalities at test-time. + +To summarize, we (i) provide a theoretical understanding of modality collapse based on polysemantic neurons in the fusion head leading to unwanted cross-modal entanglements, and the low-rank simplicity bias of neural networks; (ii) show that cross-modal knowledge distillation into the modalities undergoing collapse from the ones that survive has an implicit effect of averting modality collapse through disentanglement and denoising, based on which we propose Explicit Basis Reallocation (EBR) for a more systematic disentanglement and denoising of multimodal embeddings; (iii) extensive empirical validation of our theoretical results on multiple standard multimodal benchmarks, with EBR achieving state-of-the-art (SOTA) results in the application of dealing with missing modalities at test time, one of the most challenging tests of an algorithm's robustness to modality collapse. + +# 2. Related Works + +Modality Collapse: One of the earliest reports of modality collapse was in multimodal generative models (Shi et al., 2019; Sutter et al., 2021; Ma et al., 2020), for which Nazábal et al. (2020) hypothesized the phenomenon to be a result of disparities between gradients, which was also later confirmed by Javaloy et al. (2022). Parallely, Wang et al. (2020) showed modality collapse for multimodal classification problems, where they found unimodal models to often outperform multimodal ones. They conjectured that (i) increased capacity of multimodal models leads to overfitting - supported later in Wu et al. (2024); Zhou et al. (2023); and (ii) different modalities generalize at different rates - which also aligns with the findings by Nazábal et al. (2020); Javaloy et al. (2022). Going beyond the hypotheses and conjectures, we aim to develop a rigorous theoretical understanding of modality collapse from the perspective of polysemanticity (Scherlis et al., 2022; Huben et al., 2024; Lecomte et al., 2024) and low-rank simplicity bias (Huh et al., 2023). These theoretical tools have also so far been restricted primarily to unimodal cases, and to the best of our knowledge, we are the first to explore them for explaining failure modes in multimodal learning. Additionally, since our proposed remedies to modality collapse can be leveraged to deal with missing modalities at test time, we provide an extended literature review on this area in Appendix A. + +# 3. Collapse Mechanisms and Remedies + +Task Setup: We study the properties of representations of multimodal data learned by deep modality fusion algorithms. Specifically, based on recent literature (Wu et al., 2024; Zhang et al., 2022; Ma et al., 2022; 2021), we follow the generic setup where samples from a multimodal distribution + +$X = \{X_{1},X_{2},\dots,X_{m}\}, Y$ with $m$ modalities and labels $Y$ , first undergo an independent modality-wise encoding through a set of learnable functions $f_{1},f_{2},\ldots ,f_{m}$ , followed by a learnable modality fusion operator $\varphi :\mathcal{R}^{N}\to \mathcal{R}^{M}$ where $N = \dim (f_1) + \dim (f_2) + \ldots +\dim (f_m)$ , and $M$ is any arbitrary integer. Note that since $N$ is finite, $\varphi$ can be considered as a neural network of bounded width and arbitrary depth, as they are known to be universal approximators (Kidger & Lyons, 2020). The output from $\varphi$ is then fed into a classifier head $g:\mathcal{R}^M\rightarrow [0,1]^C$ , where $C$ is the number of classes in $Y$ , to produce the output label $\hat{\mathbf{y}}$ . Specifically, the neural representation of and the final prediction on a multimodal sample $\mathbf{x} = \{\mathbf{x}_1,\mathbf{x}_2,\dots,\mathbf{x}_m\} \in X$ is obtained as follows: + +$$ +\hat {\mathbf {y}} = g \left(\varphi \left(f _ {1} (\mathbf {x} _ {1}), f _ {2} (\mathbf {x} _ {2}),..., f _ {m} (\mathbf {x} _ {m}))\right), \right. +$$ + +where $\{\mathbf{x}_1,\mathbf{x}_2,\dots ,\mathbf{x}_m\}$ are the modality specific instantiations of the sample $\mathbf{x}$ . All proofs are provided in Appendix B. + +# 3.1. Polysemanticity and Cross-Modal Entanglements + +We begin by showing that as the number of modalities increase, the proportion of cross-modal polysemantic neurons, i.e., those that encode features from more than one modality (as opposed to monosemantic neurons which encode exactly one feature from one modality) also increases (Lemma 1). This makes it difficult for the fusion head to independently control the contribution from a given modality without potential destructive interference from others (Theorem 1). It is important to note that the results presented presuppose the occurrence of polysemanticity, i.e., the number of task-relevant features in $X$ is greater than the number of neurons in any layer, something that is most often known to hold in practice (Scherlis et al., 2022). + +Lemma 1 (Cross-Modal Polysemantic Collision). As the number of modalities increase, the fraction of polysemantic neurons encoding features from different modalities, for a given depth and width, increases quadratically in the number of modalities as follows: + +$$ +p (\mathbf {w} _ {p}) \geq m (m - 1) \frac {(\dim f _ {\min }) ^ {2}}{\left(\sum_ {i = 1} ^ {m} \dim f _ {i}\right) ^ {2}}, +$$ + +where $p(\mathbf{w}_p)$ is the probability of a neuron being polysemantic via superposition, and $f_{\min}$ is the modality-specific encoder with the smallest output dimensionality. + +Since we are interested in the fraction of neurons that are cross-modal polysemantic in the space of all polysemantic neurons, $p(\cdot)$ is defined over the space of polysemantic neurons only. Also, Lemma 1 deals specifically with 2-semantic neurons, i.e., those that simultaneously encode 2 + +features, which is the most likely form of polysemanticity in the combinatorial space of cross-modal polysemanticities for any value of $m$ . + +Definition 1 (Conjugate Features). A conjugate feature $\mathbf{z}$ is one that coexists, in a given modality, with another feature $\mathbf{z}^*$ such that at least one of them has some predictive value, but they can semantically cancel each other out when considered in conjunction, i.e., + +$$ +I (\mathbf {z}; \mathbf {y}) + I (\mathbf {z} ^ {*}; \mathbf {y}) = 0; I (\mathbf {z} \mathbf {z} ^ {*}; \mathbf {y}) = 0 +$$ + +In other words, $\mathbf{z}$ and $\mathbf{z}^*$ noisily interfere with each other. + +Theorem 1 (Interference). As the number of cross-modal polysemantic collisions increase, the fraction of predictive conjugate features contributing to the reduction of the task loss decreases, resulting in the following limit: + +$$ +\lim _ {p (\mathbf {w} _ {p}) \to 1} \sum_ {\forall \mathbf {z} _ {y} \in X} \frac {\partial}{\partial \mathbf {w} _ {p}} \mathcal {L} \left(\varphi (\mathbf {z} _ {y}), \mathbf {y}\right) = 0, +$$ + +where $\mathbf{z}_y$ denotes predictive conjugate features in $X$ . + +The modality facing the above marginal decrease in contribution to the loss reduction across its feature space, is the one that gets eliminated as part of the collapse. Next, we show how this polysemantic interference is a consequence of the low rank simplicity bias in neural networks. + +# 3.2. Rank Bottleneck + +We establish that with increasing number of iterations, gradient updates in SGD tend to get restricted to a low-rank manifold, the rank of which is proportional to the rank of the average gradient outer product or AGOP (Lemma 2). Consequently, in Theorem 2, we are able to derive an upper-bound of convergence for every weight subspace in a given layer, which gets tighter as the neurons in that layer get increasingly polysemantic (Definition 2). It thus follows that cross-modal polysemantic interference is a result of the low-rank simplicity bias. + +Lemma 2 (Gradient Rank). The rank of gradient updates across iterations of SGD at layer $l$ is a convergent sequence with the following limit: + +$$ +\lim _ {n \to \infty} \operatorname {r a n k} (\nabla_ {l} \mathcal {L} _ {n}) \propto \operatorname {r a n k} \left(\sum_ {\mathbf {x} \in X} \nabla \varphi_ {l} (\mathbf {x}) \nabla \varphi_ {l} (\mathbf {x}) ^ {T}\right), +$$ + +where $\varphi_{l}(\mathbf{x})$ and $\nabla_{l}\mathcal{L}_{n}$ are respectively the output and the gradient of the loss $\mathcal{L}$ at layer $l$ at the $n$ -th iteration of SGD, and $X$ is the set of all inputs to layer $l$ across the dataset. + +Theorem 2 (Polysemantic Bottleneck). Let $W$ be the weight matrix at a given layer of $\varphi$ , and $\mathbf{w} \leq W$ be any subspace in $W$ . When the reduction in conditional cross-entropy $H(\mathbf{x};\mathbf{y}|\mathbf{z})$ provided (amount of unique label information held) by each feature is the same, i.e., + +$I(\mathbf{x};\mathbf{y}|\mathbf{z}_1) = I(\mathbf{x};\mathbf{y}|\mathbf{z}_2) = \ldots = I(\mathbf{x};\mathbf{y}|\mathbf{z}_k)$ , at any iteration $n$ of SGD, the norm of the difference between $\mathbf{w}$ and the average gradient outer product (AGOP) of the complete weight matrix $W$ is bounded as follows: + +$$ +\left\| \mathbf {w} - \sum_ {x \in X} \nabla \varphi_ {W} (x) \nabla \varphi_ {W} (x) ^ {T} \right\| \leq \gamma (\mathbf {w}) ^ {- 1 / n}, +$$ + +where $\gamma (\mathbf{w})$ is the degree of polysemanticity of $\mathbf{w}$ + +Theorem 2 implies that since the AGOP is known to be the low-rank subspace that $W$ converges to under SGD (Radhakrishnan et al., 2024), the small distance (tighter bound) between the AGOP and subspaces $\mathbf{w}$ with higher $\gamma(\mathbf{w})$ implies that $W$ in fact converges to those subspaces $\mathbf{w}$ with higher degrees of polysemanticity $\gamma(\mathbf{w})$ . In other words, SGD is more likely to parameterize $W$ with the low-rank polysemantic neurons than with high-rank monosemantic ones. The implication of this is that, if we specifically consider the noisy-predictive type of cross-modal polysemantic neurons, they will be the first to get eliminated among all cross-modal polysemantic neurons due to the low-rank simplicity bias, as they either do not contribute to loss reduction, or do so negatively. Below we explore ways of breaking this implicit rank bottleneck to circumvent cross-modal polysemantic interference among noisy and predictive features. + +# 3.3. Knowledge Distillation Frees Up Rank Bottlenecks + +We propose a simple remedy to the cross-modal polysemantic interference that a multimodal fusion model might suffer from under the default training paradigm with SGD. Based on our result in Theorem 3, the solution is to replace the modality-specific encoder of the modality that gets eliminated under collapse, with one that is pretrained via cross-modal knowledge distillation. Specifically, knowledge distillation has to be performed from the modality that survives fusion, to the one that gets ignored under fusion. When more than one modality survives, we experimentally find that distilling in a sequence starting from the weakest and finishing with the strongest provides the best results (Appendix C.3). + +Theorem 3 (Dynamic Convergence Bound). When the inputs to $\varphi$ are dynamic (for instance, when the unimodal representations are aligned via cross-modal knowledge distillation) under some distance metric $d$ , then at any iteration $n$ of SGD, the norm of the difference between $\mathbf{w}$ and the AGOP of $W$ is bounded as follows for all modalities $i, j \in M$ and datapoints $\mathbf{x} \in X$ : + +$$ +\lim _ {d (\tilde {\mathbf {x}} _ {i}, \tilde {\mathbf {x}} _ {j}) \rightarrow \epsilon} \left\| \mathbf {w} - \sum_ {\mathbf {x} \in X} \nabla \varphi_ {W} (\mathbf {x}) \nabla \varphi_ {W} (\mathbf {x}) ^ {T} \right\| \leq \kappa^ {- 1 / n}, +$$ + +where $\tilde{\mathbf{x}}_i, \tilde{\mathbf{x}}_j = f_i(\mathbf{x}_i), f_j(\mathbf{x}_j)$ , $\kappa$ is a constant for a given depth proportional to the AGOP along the entire weight matrix $W$ at that depth, $\epsilon$ is the maximum permissible bound + +on the distance between any pair of modality-specific encodings, and both $W$ and $\mathbf{w}$ are functions of $\mathbf{x}_i$ and $\mathbf{x}_j$ , as they result from backpropagation on their predictions on $X$ . + +As per Theorem 3, as the representations from different modalities get closer to each other under the distance metric $d$ , which is what effectively happens during cross-modal knowledge distillation, the proportion of monosemantic neurons in $W$ increases. This results in the AGOP of $W$ diverging away from its polysemantic subspaces $\mathbf{w}$ . In other words, knowledge distillation implicitly disentangles the cross-modal interferences by freeing the rank bottleneck and encouraging necessary monosemanticity, allowing for independent, modality-wise denoising of features along novel dimensions. The intuition behind this observation is graphically illustrated in Figure 3. + +# 3.4. Explicit Basis Reallocation + +Although knowledge distillation facilitates independent denoising of modality-specific representations in the fusion head by freeing up rank bottlenecks, the processes of disentanglement and denoising are implicit and hence, slow. We leverage our learnings about the disentanglement and denoising dynamics of knowledge distillation and use them as a set of inductive biases to design an algorithm for Explicit Basis Reallocation, which addresses the problem in a significantly more controlled and efficient manner. + +All modifications for EBR are restricted at the level of the unimodal encoders, and we do not alter the fusion operator in any way, which makes it agnostic of the choice of the fusion operator. We introduce a simple encoder-decoder head $h_i \cdot h_i^{-1}$ on top of each modality specific encoder such that the unimodal encoding of each modality $i$ can be specified by the function $f_i = \bar{f}_i \cdot h_i \cdot h_i^{-1}$ . For notational convenience, let $g_i = \bar{f}_i \cdot h_i$ . We also introduce a modality-discriminator network $\psi$ that is trained on $g_i(\mathbf{x})$ to predict the modality labels. $h, h^{-1}$ and $\psi$ are simple two-layer MLPs, and hence add minimal parameter overhead. Jointly, we optimize the following two criteria: + +$$ +\mathcal {L} _ {\mathrm {m d}} = \sum_ {i = 1} ^ {m} \mathcal {L} _ {\mathrm {C E}} (\psi (g _ {i} (\mathbf {x})), m); \mathcal {L} _ {\mathrm {s e m}} = \mathcal {L} _ {\mathrm {C E}} (\hat {\mathbf {y}}, \mathbf {y}), +$$ + +where $\mathcal{L}_{\mathrm{md}}$ and $\mathcal{L}_{\mathrm{sem}}$ respectively stand for the modality discrimination loss and the semantic loss (of the final multimodal prediction) respectively. The modality-specific parameter sets are updated as follows in each iteration of SGD: + +$$ +\psi \leftarrow \psi - \nabla_ {\psi} \mathcal {L} _ {\mathrm {m d}} +$$ + +$$ +g _ {i} \leftarrow g _ {i} - \nabla_ {g _ {i}} \mathcal {L} _ {\text {s e m}} + \nabla_ {g _ {i}} \mathcal {L} _ {\text {m d}} +$$ + +$$ +h _ {i} ^ {- 1} \leftarrow h _ {i} ^ {- 1} - \nabla_ {h _ {i} ^ {- 1}} \mathcal {L} _ {\mathrm {s e m}} +$$ + +Theoretical Rationale: The maximization of $\mathcal{L}_{\mathrm{md}}$ by $g_{i}$ + +brings all the modalities within the $\epsilon$ -neighborhood under $d$ specified in Theorem 3, implementing an explicit disentanglement of noisy and predictive features. The adversarial updates to $\psi$ and $g_{i}$ are continued until the final multimodal prediction loss $\mathcal{L}_{\mathrm{CE}}(\hat{\mathbf{y}},\mathbf{y})$ decreases, so as to retain the underlying causal factors that are identifiable (Gulrajani & Hashimoto, 2022), alongside modality-specific, semantically relevant features (Chaudhuri et al., 2024) that arise out of equivariances shared by the underlying causal mechanisms (Ahuja et al., 2022). Projecting $g_{i}(\mathbf{x})$ back into the original dimensionality of $\bar{f}_i$ via $h_i^{-1}$ leads to a denoised representation that utilizes the compete output basis of $\bar{f}_i$ for representing the predictive features of modality $i$ , resulting in increased monosemanticity. + +# 4. Experiments + +Datasets and Implementation Details: We choose the MIMIC-IV (Johnson et al., 2023) and avMNIST (Vielzeuf et al., 2018) datasets for our experiments. For MIMIC-IV, we follow the same settings as (Wu et al., 2024) and that of (Wang et al., 2023; Ma et al., 2021) for avMNIST. We use Tian et al. (2020) as our cross-modal knowledge distillation (KD) algorithm of choice applied on top of MUSE (Wu et al., 2024), which also serves as our multimodal baseline for comparing EBR with SOTA. Due to space constraints, we report the results on MIMIC-IV in the main manuscript and defer those on avMNIST to Appendix C.2. + +# 4.1. Cross-Modal Polysemantic Interference + +Objective and Settings: We validate our theory on cross-modal polysemantic interference (Section 3.1) by studying the impact of the unimodal encoder corresponding to the modality that gets eliminated under fusion, on the minimization of the semantic loss. The results are depicted in Figure 4. The multimodal prefix is the modality-specific encoder of the modality that gets eliminated due to collapse. The red curve represents its semantic loss during multimodal training, computed via linear evaluation on its representation. The unimodal baseline is the same encoder, but is additionally optimized to retain unimodal semantic classification performance. Therefore, although both encoders have the same architecture and receive inputs from the same modality, the multimodal prefix only receives gradient updates through the fusion head, whereas the unimodal baseline also directly optimizes the semantic loss. + +Observations and Analyses: As predicted by Lemma 1, as the number of modalities increase, the number of polysemantic features in the downstream fusion head also increases. Now, since polysemantic features bottleneck the fusion head (Theorem 2) due to rank-constrained gradient updates (Lemma 2), backpropagated gradients through + +![](images/2a97828c85aea02326aa16c7c2217a0fb962efbf78cfe432ecf76e532bd3e27c.jpg) +(a) Cross-Modal Interference due to Rank Bottleneck + +![](images/42971d6c68b9110fd243f3f2fff36ebee73b323985aaba33ced95ab34a76eff2.jpg) +Figure 3. Illustration of modality collapse due to rank bottlenecks enforcing cross-modal polysemantic interference (a), and how freeing up such bottlenecks via basis reallocation can facilitate the elimination of noisy features (red) by encouraging monoseismicity (b). + +![](images/5b3692d74c277a39898681408d5e71db53ebac9476692a96856abe6707c09709.jpg) +(b) Rank Bottleneck Free-up via Basis Reallocation + +![](images/7f58a1ec4bba1322b18ad8e9800f591608d599732deb0d8bbac24d83117e1d6b.jpg) + +![](images/1732a7cd9d2f9e2f033d34505a3c9e489bfcde752435ff5b3ba699f4a16b0641.jpg) +Figure 4. MIMIC-IV: Semantic loss curve during training with increasing number of modalities. The multimodal prefix is the semantic loss (linear) evaluation on the modality-specific encoder corresponding to the modality that gets eliminated during multimodal training. The unimodal baseline is the same encoder, but is additionally optimized to minimize its unimodal semantic loss. + +![](images/f4b62c416554019c442c7c896bdb220ddec1e4db8c974c93a5fcd6ea7f478519.jpg) + +![](images/54e12b2ba8eb4ffb81693f92b75a3c40eb989f2eb49cca74331fd7f22e676acb.jpg) + +![](images/79ec6d11ffaedb12c2d83678bb75b264f852204173fa046cf252c1f99c349f13.jpg) + +the fusion head into the multimodal prefix also get rank-constrained, forcing it to allocate fractional capacities to features that would otherwise have been monosemantically represented. This makes the predictive features harder to decode, leading to the observed gap between the two curves. Since the unimodal model also directly minimizes its own semantic loss, it has a much lower possibility of cross-modal interference, allowing it to successfully perform the necessary capacity allocations, leading to lower loss values. As the number of modalities increase, the gap between the unimodal baseline and the multimodal prefix also increases, aligning with the conclusions of Lemma 1 and Theorem 1. + +# 4.2. Presence of Rank Bottlenecks + +Objective and Settings: We empirically validate our theory linking cross-modal polysemantic interference with the low-rank simplicity bias of neural networks (Section 3.2) by looking at the relationship between the rank of the multimodal representation and the amount of upweighting $(\beta)$ needed to force the multimodal model to incorporate the modality that it would otherwise eliminate under collapse. The results are visualized in Figure 5 (a) and (c). The default + +setting (w/o KD or w/o EBR) corresponds to the vanilla multimodal model, and the unimodal baseline refers to the rank of the representation learned by the unimodal encoder when trained in a standalone manner to minimize the semantic loss without any multimodal fusion. + +Observations and Analyses: As the value of $\beta$ (the strength of the modality that gets eliminated by default) is increased, the multimodal rank can be seen to decrease very fast in the default setting. It happens particularly rapidly around a critical point $(\beta = 4)$ , exhibiting a form of phase transition wherein the rank drops to values lower than the unimodal baseline. As the multimodal model is forced to incorporate more of the said modality, it is forced to select its (mostly noisy) features from the polysemantic subspaces that it has already learned (Lemma 2). So, by the virtue of being represented polysemantically, the rank of this feature subspace ends up being much lower than it otherwise would (as depicted by the unimodal baseline). However, this decay in rank is not observed as we free up rank bottlenecks through basis reallocation, via KD or EBR, implying that rank bottlenecks causing cross-modal polysemantic interference is precisely what is at the root of modality collapse. The rank + +![](images/1960d77bc5359d827cd520a8872b1130fd89cda6a74c90b8d81579717abf3bce.jpg) +Figure 5. MIMIC-IV: Multimodal rank and representation similarities of modalities with the multimodal representation, under implicit (KD) and explicit (EBR) basis reallocation mechanisms, across different strengths $\beta$ of the modality that gets eliminated under collapse. + +![](images/7354c8ee28066defc98517353ce6b0150a7046148db48ed1de51590db44c762c.jpg) + +![](images/17befdd284d61ba06328b68b1e3d8c5bd66acbd9b5bc1f538f0176cf49831fa2.jpg) + +![](images/09b5937291cb65eeff1573b88bdfc631fb647199bb0a30fb84381608f45b0f5e.jpg) + +![](images/d9638cabc6eff50cbea7bd519d9d06ca6c1a245f30b3b8cf79fdb6551c66b532.jpg) +Figure 6. MIMIC-IV: Semantic loss minimization comparison between vanilla multimodal learning and using implicit (KD) and explicit (EBR) basis reallocation. + +of the default multimodal representation being bounded above by that of the unimodal baseline beyond the phase transition around the critical point, is a consequence of the upper-bound presented in Theorem 2. + +# 4.3. Effectiveness of Basis Reallocation + +Next, we test the effectiveness of basis reallocation (both implicit, via KD, and explicit, via EBR) as a mechanism for freeing up rank bottlenecks to break cross-modal polysemantic interferences, and eventually averting modality collapse. We report our results in Figure 5, Figures 6 and 7, and Table 2, all of which unanimously and unambiguously show the effectiveness of basis reallocation towards preventing modality collapse, confirming the result in Theorem 3. + +Rank and Similarity with the Multimodal Representation: Figure 5 (a) and (c) provide the most direct evidence that basis reallocation frees up rank bottlenecks, as multimodal representation in both KD and EBR consistently + +![](images/aa65d31a088d3be8724990ba1216fcda0c2acc186fdcc01dc38a17c93639675a.jpg) +Figure 7. MIMIC-IV: With increasing noise rate, existing approaches suffer from modality collapse due to noisy cross-modal entanglements. With improved strategies of basis reallocation, implicit (KD) or explicit (EBR), robustness to noise and the consequent prevention of modality collapse can be ensured. + +have a higher rank, while EBR provides a stronger buffer relative to KD against the rank decay occurring around the critical point. Figure 5 (b) and (d) show the representation similarities between the multimodal representation and strongest (teacher) and the weakest (student) modalities. Both the strongest and the weakest modality representations can be seen to more consistently align with the multimodal representation when using EBR, while KD requires some upweighting (by increasing the value of $\beta$ ) to achieve this alignment. In either case, they indicate that basis reallocation makes the multimodal representation use information from all the modalities, instead of collapsing onto just a subset (strongest) of the modalities. + +Optimization Dynamics: In Figure 6, we visualize the dynamics of optimizing the semantic loss with or without the implicit (KD) and explicit basis reallocation (EBR) strategies. Generally, we observe that using basis reallocation + +
MethodMortalityReadmission
AUC-ROCAUC-PRCAUC-ROCAUC-PRC
CM-AE (ICML '11)0.7873 ± 0.400.3620 ± 0.220.6007 ± 0.310.3355 ± 0.25
SMIL (AAAI '21)0.7981 ± 0.110.3536 ± 0.120.6155 ± 0.090.3279 ± 0.15
MT (CVPR '22)0.8176 ± 0.100.3467 ± 0.060.6278 ± 0.090.2959 ± 0.05
Grape (NeurIPS '20)0.7657 ± 0.160.3733 ± 0.090.6335 ± 0.070.3120 ± 0.11
M3Care (SIGKDD '22)0.8265 ± 0.090.3830 ± 0.070.6020 ± 0.090.3870 ± 0.05
ShaSpec (CVPR '23)0.8100 ± 0.130.3630 ± 0.090.6216 ± 0.100.3549 ± 0.08
MUSE (ICLR'24)0.8236 ± 0.090.39.87 ± 0.050.6781 ± 0.050.4185 ± 0.07
EBR (Ours)0.8533 ± 0.090.4277 ± 0.020.7030 ± 0.050.4290 ± 0.02
+ +provides improved overall loss minimization as opposed to not using it (vanilla). Specifically, when using implicit (KD), SGD tends to first learn noisy, polysemantic neurons before freeing up rank bottlenecks to denoise them. This leads to multiple step-like structures in the loss trajectory, which could correspond to the saddle geometry of such landscapes. Such geometries are possibly smoothed out into more convex neighborhoods under EBR, providing faster convergence and a more consistent optimization dynamic. + +Denoising Effect of Basis Reallocation: Theorem 1 posits that cross-modal polysemantic entanglements can be harmful precisely due to the possibility of interference from noisy features. We do a set of experiments where we corrupt the weakest modality during training with additive random uniform noise over a range of noise rates (from $5 - 50\%$ ) and compare SOTA multimodal models with our proposed implicit (KD) and explicit basis reallocation (EBR) mechanisms. We report our findings in Figure 7. Unless explicitly taken care of, existing SOTA models perform notably poorly when the noise rate is increased. Since basis reallocation frees up rank bottlenecks, the novel dimensions can be utilized by SGD for denoising. EBR makes the denoising process explicit through the adversarial training of $\psi$ and $g_{i}$ to optimize $\mathcal{L}_{\mathrm{md}}$ , providing stronger robustness to noise. + +Table 1. MIMIC-IV: Comparison of average performance with standard deviation across multiple modality missingness rates. + +
MethodMortalityReadmission
AUC-ROCAUC-PRCAUC-ROCAUC-PRC
Grape (NeurIPS '20)0.88370.45840.70850.4551
+ KD0.90110.46200.72310.4610
+ EBR0.91020.47990.74880.4691
M3Care (SIGKDD '22)0.88960.46030.70670.4532
+ KD0.89500.47000.70800.4562
+ EBR0.89870.48500.72960.4832
MUSE (ICLR'24)0.92010.48830.73510.4985
+ KD0.93500.49930.74020.5066
+ EBR0.93800.50010.75970.5138
+ +Table 2. MIMIC-IV: Using knowledge-distilled / EBR backbones for the modality that would otherwise be eliminated by collapse. + +Independence from Fusion Strategies: Finally, to show + +that basis reallocation can be performed agnostic of the fusion strategy, we replace the unimodal encoders of a number of SOTA multimodal models with their knowledge distilled / EBR counterparts and report their performance in Table 2. Irrespective of the fusion strategy, it can be seen that an out-of-the-box improvement in test performance can be attained by these simple replacements, establishing the generic nature of our results. + +# 4.4. Fusion with Inference-Time Missing Modalities + +As discussed in Section 3.4, after reallocating bases to features via EBR, since the latent factors of $X$ are identifiable up to the equivariances shared by the underlying mechanisms, we leverage this property to substitute missing modalities at test-time with those that are available. Concretely, once training with EBR converges, we proceed as follows: (1) Rank modalities wrt their similarities (computed pairwise across all samples) with a reference modality (chosen as the strongest modality in our experiments) in terms of the latent encoding $g_{i}(\mathbf{x}_{i})$ ; (2) When a modality $i$ of a test sample $\mathbf{x}$ goes missing, choose its substitution candidate as the modality $j$ that is closest to it in the ranked list; (3) Compute the proxy unimodal encoding of $x_{i}$ as $h^{-1}(g_j(\mathbf{x}_j))$ . We validate the importance of ranking based on the EBR latents by benchmarking against other substitution strategies in Appendix C.4. + +To evaluate our approach, we adopt the experimental setup of MUSE (Wu et al., 2024), following which we mask out the modalities in the MIMIC-IV dataset with probabilities $\{0.1, 0.2, 0.3, 0.4, 0.7\}$ . We then take the average and standard deviation across these missingness rates and report the results in Table 1. It can be seen that close to $3\%$ improvements can be achieved in both Mortality and Readmission prediction AUC-ROC and AUC-PR metrics on top of SOTA, by simply replacing the unimodal encoders of the baseline MUSE with our proposed EBR variants and following the ranking and substitution strategy for dealing with missing modalities detailed above. + +# 5. Conclusion and Discussions + +We studied the phenomenon of modality collapse from the perspective of polysemanticity and low-rank simplicity bias. We established, both theoretically and empirically, that modality collapse happens due to low rank gradient updates forcing the fusion head neurons to polysemantically encode predictive features of one modality with noisy features from another, leading to the eventual collapse of the latter. This work attempts to reveal that multimodal learning may be plagued in ways that are rather unexpected, and consequently, unexplored, thereby leaving room for a number of improvements and future explorations. + +For instance, Theorems 2 and 3 are valid when the reduction in conditional cross-entropy provided (amount of unique label information held) by each feature is the same. It remains to be explored how these results can be extended to the case when such reductions are different across features. We conjecture that (and as also empirically evidenced) EBR turns the otherwise saddle landscape, that is obtained after the rank bottlenecks are freed up by knowledge distillation, into a convex one, enabling smoother and more predictable optimization. Developing an understanding of this could lead to deeper insights into the dynamics of the loss landscape geometry of modality collapse. + +# Acknowledgments + +We would like to thank the following individuals at Fujitsu Research of Europe for their independent inputs: Mohammed Amer (for discussions on observations of modality collapse in multimodal genomics), Shamik Bose (for inputs on polysemanticity and capacity in neural networks), and Nuria Garcia-Santa (for help with the MIMIC-IV dataset). We would also like to thank the anonymous reviewers for their thorough analysis and detailed feedback that helped clarify and improve various aspects of our work. + +# Impact Statement + +This paper advances the understanding of modality collapse in multimodal fusion, providing a theoretical foundation and experimental evidence to improve robustness in the presence of missing modalities. By systematically analyzing cross-modal interactions, we demonstrate that mitigating modality collapse enhances performance across diverse applications. In healthcare, our approach can be capable of reliable diagnosis even when hard / expensive to acquire modalities such as imaging or genomics might be missing. In autonomous perception, it could support safer decision-making despite sensor failures. By introducing a scalable and generalizable multimodal learning framework, this work lays the foundation for more robust and deployable AI systems in real-world settings, with the potential to positively impact + +society. To the best of our knowledge, we are not aware of any negative impacts of this work. + +# References + +Ahuja, K., Hartford, J., and Bengio, Y. Properties from mechanisms: an equivariance perspective on identifiable representation learning. In ICLR, 2022. +Arjovsky, M., Bottou, L., Gulrajani, I., and Lopez-Paz, D. Invariant risk minimization. ArXiv, abs/1907.02893, 2019. +Baldi, P. Autoencoders, unsupervised learning, and deep architectures. In Proceedings of ICML Workshop on Unsupervised and Transfer Learning, 2012. +Bishop, C. M. Training with noise is equivalent to tikhonov regularization. Neural Computation, 7(1):108-116, 1995. doi: 10.1162/neco.1995.7.1.108. +Chaudhuri, A., Mancini, M., Chen, Y., Akata, Z., and Dutta, A. Cross-modal fusion distillation for fine-grained sketch-based image retrieval. In BMVC, 2022. +Chaudhuri, A., Georgescu, S., and Dutta, A. Learning conditional invariances through non-commutativity. In ICLR, 2024. +Chen, J. and Zhang, A. Hgmf: Heterogeneous graph-based fusion for multimodal data with incompleteness. In ACM SIGKDD, 2020. +De Vaeux, R. D. and Ungar, L. H. Multicollinearity: A tale of two nonparametric regressions. In Selecting Models from Data, 1994. +Dou, Q., Liu, Q., Heng, P.-A., and Glocker, B. Unpaired multi-modal segmentation via knowledge distillation. IEEE Transactions on Medical Imaging, 2020. +Elhage, N., Hume, T., Olsson, C., Schiefer, N., Henighan, T., Kravec, S., Hatfield-Dodds, Z., Lasenby, R., Drain, D., Chen, C., Grosse, R., McCandlish, S., Kaplan, J., Amodei, D., Wattenberg, M., and Olah, C. Toy models of superposition. Transformer Circuits Thread, 2022. +Galanti, T., Siegel, Z. S., Gupte, A., and Poggio, T. A. SGD and weight decay secretly minimize the rank of your neural network. In NeurIPS 2024 Workshop on Mathematics of Modern Machine Learning, 2024. +Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. Generative adversarial networks. Commun. ACM, 2020. +Gulrajani, I. and Hashimoto, T. Identifiability conditions for domain adaptation. In ICML, 2022. + +Huben, R., Cunningham, H., Smith, L. R., Ewart, A., and Sharkey, L. Sparse autoencoders find highly interpretable features in language models. In ICLR, 2024. +Huh, M., Mobahi, H., Zhang, R., Cheung, B., Agrawal, P., and Isola, P. The low-rank simplicity bias in deep networks. Transactions on Machine Learning Research, 2023. +Jackson, Z., Souza, C., Flaks, J., Pan, Y., Nicola, H., and Thite, A. Free spoken digit dataset (fsdd). https://github.com/Jakobovski/free-spoken-digit-dataset, 2018. +Javaloy, A., Meghdadi, M., and Valera, I. Mitigating modality collapse in multimodal VAEs via impartial optimization. In ICML, 2022. +Johnson, A. E. W., Bulgarelli, L., Shen, L., Gayles, A., Shammout, A., Horng, S., Pollard, T. J., Moody, B., Gow, B., wei H. Lehman, L., Celi, L. A., and Mark, R. G. Mimic-iv, a freely accessible electronic health record dataset. Scientific Data, 2023. +Kidger, P. and Lyons, T. Universal Approximation with Deep Narrow Networks. In $COLT$ , 2020. +Kim, W., Son, B., and Kim, I. Vilt: Vision-and-language transformer without convolution or region supervision. In ICML, 2021. +Lecomte, V., Thaman, K., Schaeffer, R., Bashkansky, N., Chow, T., and Koyejo, S. What causes polysemanticity? an alternative origin story of mixed selectivity from incidental causes, 2024. URL https://arxiv.org/ abs/2312.03096. +Lecun, Y., Bottou, L., Bengio, Y., and Haffner, P. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. +Lee, K., Lee, S., Hahn, S., Hyun, H., Choi, E., Ahn, B., and Lee, J. Learning missing modal electronic health records with unified multi-modal data embedding and modality-aware attention. In Machine Learning for Healthcare Conference, 2023. +Ma, C., Tschiatschek, S., Hernández-Lobato, J. M., Turner, R. E., and Zhang, C. Vaem: a deep generative model for heterogeneous mixed type data. In NeurIPS, 2020. +Ma, M., Ren, J., Zhao, L., Tulyakov, S., Wu, C., and Peng, X. Smil: Multimodal learning with severely missing modality. In AAAI, 2021. +Ma, M., Ren, J., Zhao, L., Testuggine, D., and Peng, X. Are multimodal transformers robust to missing modality? In CVPR, 2022. + +Nagrani, A., Yang, S., Arnab, A., Jansen, A., Schmid, C., and Sun, C. Attention bottlenecks for multimodal fusion. In NeurIPS, 2021. +Nazábal, A., Olmos, P. M., Ghahramani, Z., and Valera, I. Handling incomplete heterogeneous data using vaes. Pattern Recognition, 107, 2020. +Ngiam, J., Khosla, A., Kim, M., Nam, J., Lee, H., and Ng, A. Multimodal deep learning. In ICML, 2011. +Parascandolo, G., Kilbertus, N., Rojas-Carulla, M., and Scholkopf, B. Learning independent causal mechanisms. In ICML, 2018. +Poklukar, P., Vasco, M., Yin, H., Melo, F. S., Paiva, A., and Kragic, D. Geometric multimodal contrastive representation learning. In ICML, 2022. +Radhakrishnan, A., Beaglehole, D., Pandit, P., and Belkin, M. Mechanism for feature learning in neural networks and backpropagation-free machine learning models. Science, 2024. +Ramachandram, D. and Taylor, G. W. Deep multimodal learning: A survey on recent advances and trends. IEEE Signal Processing Magazine, 2017. +Scherlis, A., Sachan, K., Jermyn, A. S., Benton, J., and Shlegeris, B. Polysemanticity and capacity in neural networks. ArXiv, abs/2210.01892, 2022. +Shen, Y. and Gao, M. Brain tumor segmentation on mri with missing modalities. In Information Processing in Medical Imaging. Springer International Publishing, 2019. +Shi, Y., N, S., Paige, B., and Torr, P. Variational mixture-of-experts autoencoders for multi-modal deep generative models. In NeurIPS, 2019. +Shi, Y., Paige, B., Torr, P., and N, S. Relating by contrasting: A data-efficient framework for multimodal generative models. In ICLR, 2021. +Sreelatha, S. V., Kappiyath, A., Chaudhuri, A., and Dutta, A. DenetDM: Debiasing by network depth modulation. In NeurIPS, 2024. +Sutter, T. M., Daunhawer, I., and Vogt, J. E. Generalized multimodal ELBO. In ICLR, 2021. +Tian, Y., Krishnan, D., and Isola, P. Contrastive representation distillation. In ICLR, 2020. +Tsai, Y.-H. H., Bai, S., Liang, P. P., Kolter, J. Z., Morency, L.-P., and Salakhutdinov, R. Multimodal transformer for unaligned multimodal language sequences. In Korhonen, A., Traum, D., and Marquez, L. (eds.), ACL, 2019. + +Vielzeuf, V., Lechery, A., Pateux, S., and Jurie, F. Centralnet: a multilayer approach for multimodal fusion. In ECCV Workshops, 2018. +Wang, H., Chen, Y., Ma, C., Avery, J., Hull, L., and Carneiro, G. Multi-modal learning with missing modality via shared-specific feature modelling. In CVPR, 2023. +Wang, W., Tran, D., and Feiszli, M. What makes training multi-modal classification networks hard? In CVPR, June 2020. +Wu, Z., Dadu, A., Tustison, N., Avants, B., Nalls, M., Sun, J., and Faghri, F. Multimodal patient representation learning with missing modalities and labels. In ICLR, 2024. +Xie, Q., Hovy, E. H., Luong, M.-T., and Le, Q. V. Self-training with noisy student improves imagenet classification. In CVPR, 2019. +Xue, Z. and Marculescu, R. Dynamic multimodal fusion. In Multi-Modal Learning and Applications Workshop (MULA), CVPR, 2023. +You, J., Ma, X., Ding, Y., Kochenderfer, M. J., and Leskovec, J. Handling missing data with graph representation learning. In NeurIPS, 2020. +Zhang, C., Chu, X., Ma, L., Zhu, Y., Wang, Y., Wang, J., and Zhao, J. M3care: Learning with missing modalities in multimodal healthcare data. In ACM SIGKDD, 2022. +Zhao, F., Zhang, C., and Geng, B. Deep multimodal data fusion. ACM Comput. Surv., 2024. +Zhou, Y., Wang, X., Chen, H., Duan, X., and Zhu, W. Intra- and inter-modal curriculum for multimodal learning. In ACM International Conference on Multimedia, 2023. + +# A. Extended Literature Review + +Missing Modalities: Existing SOTA multimodal fusion approaches do not account for the possibility of missing modalities (Ramachandram & Taylor, 2017; Nagrani et al., 2021; Shi et al., 2021; Chaudhuri et al., 2022; Zhao et al., 2024). Although this limitation was identified in works as early as Ngiam et al. (2011), the pattern of missingness, i.e., which modality(ies) could go missing, were assumed to be known at training time. Later, a number of graph-based techniques (You et al., 2020; Zhang et al., 2022; Wu et al., 2024), including ones that use heterogeneous graphs to model different missingness patterns (Chen & Zhang, 2020), alongside transformer-based (Tsai et al., 2019; Ma et al., 2022), and Bayesian meta-learning (Ma et al., 2021) based approaches attempted to operate without this assumption. Other approaches such as those that facilitate direct interaction among modality-specific raw inputs (Kim et al., 2021; Lee et al., 2023), and ones based on self-supervised domain adaptation (Shen & Gao, 2019), also provided promising results. + +Interestingly, it was observed by Ma et al. (2022) that multi-modal representations are strongly dependent on the fusion strategy, and that the optimal way of fusing modalities is dependent on the data, due to which, the authors recommended that fusion strategies should be distribution-specific. However, the limitations introduced by such dependencies was also accounted for in related multimodal learning literature to address the challenge of resource-efficient utilization of modalities, which was tackled through dynamic data-dependent fusion (Xue & Marculescu, 2023). Despite the existence of a number of bespoke techniques for dealing with missing modalities, SOTA approaches such as ShaSpec (Wang et al., 2023), in addition to such algorithms, were also benchmarked against baselines based on GANs (Goodfellow et al., 2020) and autoencoders (Baldi, 2012), which the authors found to be similarly competitive. Although there have been some works that explored the applicability of knowledge distillation to dealing with missing modalities, their purposes have been scoped to addressing issues such as compressing the extra parameter overhead due to multimodal fusion (Dou et al., 2020), or dynamically weighting data points within modalities and contributions from loss terms (Zhou et al., 2023). In this work, we use knowledge distillation as a tool to theoretically study the fundamental processes in optimization that govern modality collapse, and show that it can avoid collapse by implicitly freeing up rank bottlenecks that lead to cross-modal entanglements between noisy and predictive features. + +# B. Proofs + +Lemma 1 (Cross-Modal Polysemantic Collision). As the number of modalities increase, the fraction of polysemantic neurons encoding features from different modalities, for a given depth and width, increases quadratically in the number of modalities as follows: + +$$ +p \left(\mathbf {w} _ {p}\right) \geq m (m - 1) \frac {\left(\dim f _ {\min }\right) ^ {2}}{\left(\sum_ {i = 1} ^ {m} \dim f _ {i}\right) ^ {2}}, +$$ + +where $p(\mathbf{w}_p)$ is the probability of a neuron being polysemantic via superposition, and $f_{\mathrm{min}}$ is the modality-specific encoder with the smallest output dimensionality. + +Proof. The number of ways any two features can be selected by $\varphi$ from $X$ such that both belong to different modalities is $\geq \binom{m}{2} (\dim f_{\min})^2$ , since there are $\binom{m}{2}$ ways of choosing modality-pairs, and there are $\geq (\dim f_{\min})^2$ ways of choosing feature pairs in each such combination. Now, it is these pairs of features that lead to cross-modal polysemantic collisions (through neuron subspaces $\mathbf{w}_p$ ) during fusion in $\varphi$ . Let the ambient dimension of the input to $\varphi$ be $F_{\mathrm{dim}} = \sum_{i=1}^{m} \dim f_i$ . Then, for a given depth and width, the probability that a polysemantic weight subspace would represent features from two different modalities would be: + +$$ +p(\mathbf{w}_{p})\geq \binom {m}{2}\frac{(\dim f_{\min})^{2}}{\binom{F_{\dim}}{2}} = m(m - 1)\frac{(\dim f_{\min})^{2}}{\left(\sum_{i = 1}^{m}\dim f_{i}\right)^{2}} +$$ + +This completes the proof of the lemma. + +Lemma 3 (Entanglement by Feature Type). If the latent factors underlying the modalities are sufficiently complementary to + +each other in terms of predictivity of the label $\mathbf{y}$ , i.e., for any pair of modalities $i$ and $j$ , + +$$ +\sum_ {p} \sum_ {q} \mathbf {z} _ {i} ^ {p} \cdot \mathbf {z} _ {j} ^ {q} < K, +$$ + +where $p$ and $q$ are indices over the latent factors of modalities $i$ and $j$ respectively, and $K$ is a constant, then, the noisy features from one modality are more likely to be entangled with predictive features of another through polysemantic weights in the fusion head, i.e., for any pair of noisy $(\mathbf{z}_{\epsilon})$ and predictive $(\mathbf{z}_{y})$ features from the same modality, the following will hold: + +$$ +\begin{array}{r} \frac {\sum_ {\mathbf {w}} \mathbf {z} _ {y} \cdot \mathbf {w}}{\sum_ {\mathbf {w}} \mathbf {z} _ {\epsilon} \cdot \mathbf {w}} \leq 1, \end{array} +$$ + +where $\mathbf{w}$ denotes weight subspaces representing a different modality in $\varphi$ . + +Proof. Since noisy features are closer to random, they can get entangled with neurons representing predictive features from any modality if the corresponding neuron allows features up to $(1 - K)$ units of deviations, according to the Johnson-Lindenstrauss lemma (Elhage et al., 2022), i.e., satisfying the following: + +$$ +\mathbf {z} _ {\epsilon} \cdot \mathbf {w} \geq K; \mathbf {z} _ {y} \cdot \mathbf {w} < K +$$ + +It implies that the set of noisy features $\mathbf{z}_{\epsilon}$ would be more closely aligned with $\mathbf{w}$ than the set of predictive features $\mathbf{z}_y$ making the ratio of the sums over all $\mathbf{w} \in \varphi$ , of the latter to the former, $\leq 1$ . + +With the elimination of noisy features, such entanglements following from superposition become less likely among predictive features across modalities, since they would normally require dedicated dimensions with strong orthogonality, i.e., monosemantic neurons. This completes the proof of the lemma. + +Theorem 1 (Interference). As the number of cross-modal polysemantic collisions increase, the fraction of predictive conjugate features contributing to the reduction of the task loss decreases, resulting in the following limit: + +$$ +\lim _ {p (\mathbf {w} _ {p}) \to 1} \sum_ {\forall \mathbf {z} _ {y} \in X} \frac {\partial}{\partial \mathbf {w} _ {p}} \mathcal {L} \left(\varphi (\mathbf {z} _ {y}), \mathbf {y}\right) = 0, +$$ + +where $\mathbf{z}_y$ denotes predictive conjugate features in $X$ . + +Proof. Let $\mathbf{z}_{\epsilon}$ be the noisy conjugate of $\mathbf{z}_y$ . As the number of polysemantic collisions increase, so does the proportion of polysemantic neurons, i.e., $\lim_{p(\mathbf{w}_p)\to 1}p(\mathbf{w}_p)\rightarrow 1$ . Now, from Lemma 3, we know that as the noisy features are more likely to get into cross-modal polysemantic entanglements, which implies that they would exhibit a higher similarity (dot-product) with the polysemantic subspace $\mathbf{w}_p$ . Additionally, since $\mathbf{z}_y$ and $\mathbf{z}_{\epsilon}$ are conjugate to each other, $\mathbf{z}_y$ would exhibit a low similarity (dot-product) with $\mathbf{w}_p$ , activating in the opposite direction as that of $\mathbf{z}_{\epsilon}$ . Again, from Lemma 3, since $\mathbf{z}_{\epsilon}$ is entangled with $\mathbf{w}_p$ , when present in the input, it would always activate. Based on this, the conjugate activation equation (without the non-linearity) of $\mathbf{z}_y$ can be written as: + +$$ +\lim _ {p (\mathbf {w} _ {p}) \to 1} \varphi (\mathbf {z _ {y}}) = \varphi (\mathbf {z _ {y}}) + \varphi (\mathbf {z _ {\epsilon}}) = \underbrace {\mathbf {w} _ {p} \cdot \mathbf {z} _ {y}} _ {\text {l a r g e - v e}} + \underbrace {\mathbf {w} _ {p} \cdot \mathbf {z} _ {\epsilon}} _ {\text {l a r g e + v e}} = 0, +$$ + +meaning that the net activation of $\mathbf{z}_y$ along $\mathbf{w}_p$ is 0, which ultimately implies that: + +$$ +\lim _ {p (\mathbf {w} _ {p}) \to 1} \sum_ {\forall \mathbf {z} _ {y} \in X} \frac {\partial}{\partial \mathbf {w} _ {p}} \mathcal {L} (\varphi (\mathbf {z} _ {y}), \mathbf {y}) = 0 +$$ + +This completes the proof of the theorem. + +# B.1. Rank Bottleneck + +Definition 2 (Degree of Polysemanticity). We quantitatively define the degree of polysemanticity (Elhage et al., 2022; Scherlis et al., 2022), $\gamma$ , of a weight subspace, $\mathbf{w}$ , as the ratio of the number of features in the input distribution $X$ encoded in the subspace and the number of dimensions of the subspace, i.e., + +$$ +\gamma (\mathbf {w}) = \frac {| \mathbf {w} \cap X |}{\dim (\mathbf {w})}, +$$ + +where $|\mathbf{w}\cap X|$ is the number of features in $X$ that are encoded in $\mathbf{w}$ . + +Polysemantic neurons lie on a low-rank manifold that the weights of each layer converge to under SGD. So, since all optimization happens along this low-rank polysemantic manifold, it is not possible for $\varphi$ to avert the cancellation effect among conjugate features, of which the noisy counterparts may get encoded as part of a polysemantic neuron. + +Lemma 2 (Gradient Rank). The rank of gradient updates across iterations of SGD at layer $l$ is a convergent sequence with the following limit: + +$$ +\lim _ {n \to \infty} \operatorname {r a n k} (\nabla_ {l} \mathcal {L} _ {n}) \propto \operatorname {r a n k} \left(\sum_ {\mathbf {x} \in X} \nabla \varphi_ {l} (\mathbf {x}) \nabla \varphi_ {l} (\mathbf {x}) ^ {T}\right), +$$ + +where $\varphi_l(\mathbf{x})$ and $\nabla_{l}\mathcal{L}_{n}$ are respectively the output and the gradient of the loss $\mathcal{L}$ at layer $l$ at the $n$ -th iteration of SGD, and $X$ is the set of all inputs to layer $l$ across the dataset. + +Proof. Step 1: The rank of each layer decreases with every iteration of SGD (Galanti et al., 2024). Step 2: Every layer converges to a quantity proportional to the average gradient outer product (Radhakrishnan et al., 2024). $\square$ + +Theorem 4 (Depth-Rank Duality (Sreelatha et al., 2024)). Let $\mathcal{A} = [A_0, A_1, \dots, A_n]$ be the attribute subspace of $X$ with increasing ranks, i.e., $\mathrm{rank}(A_0) < \mathrm{rank}(A_1) < \dots < \mathrm{rank}(A_n)$ , such that every $A \in \mathcal{A}$ is maximally and equally informative of the label $Y$ , i.e., $I(A_0, Y) = I(A_1, Y) = \dots = I(A_n, Y)$ . Then, across the depth of the encoder $\phi$ , SGD yields a parameterization that optimizes the following objective: + +$$ +\underbrace{\min_{\phi,f}\mathcal{L}(f(\phi(X)),Y)}_{ERM} + \min_{\phi}\sum_{l}\left\| \phi [l](\tilde{X}) - \Omega^{d}\odot \mathcal{A}\right\|_{2}, +$$ + +where $\mathcal{L}(\cdot, \cdot)$ is the empirical risk, $f(\cdot)$ is a classifier head, $\phi[l](\cdot)$ is the output of the encoder $\phi$ (optimized end-to-end) at depth $l$ , $\| \cdot \|_2$ is the $l^2$ -norm, $\odot$ is the element-wise product, $\tilde{X}$ is the $l_2$ -normalized version of $X$ , $\Omega^d = [\mathbb{1}_{\pi_1(l)}; \mathbb{1}_{\pi_2(l)}; \dots; \mathbb{1}_{\pi_n(l)}]$ , $\mathbb{1}_\pi$ is a random binary function that outputs 1 with a probability $\pi$ , and $\pi_i(l)$ is the propagation probability of $A_i$ at depth $l$ bounded as: + +$$ +\pi_ {i} (l) = \mathcal {O} \left(\mathrm {r a n k} (\phi [ l ]) r _ {i} ^ {- d}\right), +$$ + +where $\mathrm{rank}(\phi [l])$ is the effective rank of the $\phi [l]$ representation space, and $r_i = \mathrm{rank}(A_i)$ . + +Theorem 2 (Polysemantic Bottleneck). Let $W$ be the weight matrix at a given layer of $\varphi$ , and $\mathbf{w} \leq W$ be any subspace in $W$ . When the reduction in conditional cross-entropy $H(\mathbf{x};\mathbf{y}|\mathbf{z})$ provided (amount of unique label information held) by each feature is the same, i.e., $I(\mathbf{x};\mathbf{y}|\mathbf{z}_1) = I(\mathbf{x};\mathbf{y}|\mathbf{z}_2) = \ldots = I(\mathbf{x};\mathbf{y}|\mathbf{z}_k)$ , at any iteration $n$ of SGD, the norm of the difference between $\mathbf{w}$ and the average gradient outer product (AGOP) of the complete weight matrix $W$ is bounded as follows: + +$$ +\left\| \mathbf {w} - \sum_ {x \in X} \nabla \varphi_ {W} (x) \nabla \varphi_ {W} (x) ^ {T} \right\| \leq \gamma (\mathbf {w}) ^ {- 1 / n}, +$$ + +where $\gamma (\mathbf{w})$ is the degree of polysemanticity of $\mathbf{w}$ + +Proof. We know that the weights of a neural network when optimized with SGD converge to a value proportional to the Averge Gradient Outer Product (AGOP), which essentially represents those sets of features which when minimally perturbed, produce a large change in the output (Radhakrishnan et al., 2024). + +Additionally, SGD with weight decay minimizes the ranks of the weight matrices (Galanti et al., 2024) and that this minimization is more pronounced as we go deeper into the neural network (Huh et al., 2023), as formalized in Theorem 4 by Sreelatha et al. (2024). + +In other words, the deeper we go into a network, the more likely it is for the representations to be of a lower rank (Huh et al., 2023; Sreelatha et al., 2024), and that this rank decreases with each successive iteration (Galanti et al., 2024). In other words, for each layer, there is a subspace of a specific rank that is updated through backpropagation, and according to Lemma 2, since the rank of such updates decreases with iterations, the lower the rank of this subspace, the greater its cumulative gradient across iterations, i.e., the more likely it is to be learned by gradient descent and the more likely it is that the weights of the particular layer would converge to this subspace. + +If two features equally minimize the empirical risk, and their joint encoding has no local improvement in the minimization of the marginal loss, extending the result by Galanti et al. (2024), SGD on the fusion operator would prioritize the encoding of the modality with the lower rank of the two as follows: + +$$ +\min _ {\bar {W} ^ {\varphi (l)}} \sum_ {m \in M} l \left\| \frac {W _ {m} ^ {\varphi (l)}}{\left\| W _ {m} ^ {\varphi (l)} \right\|} - \bar {W ^ {\varphi (l)}} \right\| \leq K \cdot (1 - 2 \mu \lambda) ^ {n l}, \tag {1} +$$ + +where $W_{m}^{\varphi(l)}$ is the subspace of the weight matrix at layer $l$ of the fusion operator $\varphi$ corresponding to the modality $m$ , $\mu$ is the learning rate, $n$ is the SGD iteration, and $\bar{W}^{\varphi(l)}$ is the target weight matrix that the fusion operator converges towards at layer $l$ such that: + +$$ +\mathrm {r a n k} (\bar {W} ^ {\varphi (d)}) = \sum_ {m \in M _ {c}} \mathrm {r a n k} (\bar {W} ^ {f _ {m} (o)}), +$$ + +where $\bar{W}_m^{f(o)}$ is the weight matrix at the output layer of the modality-specific encoder $f_{m}(o)$ of modality $m$ and $M_c$ is the set of modalities that survive collapse. Now, for polysemantic subspaces $\mathbf{w}$ , since the degree of polysemanticity $\gamma (\mathbf{w}) > 1$ , we can extend Equation (1) as: + +$$ +\min _ {\bar {W} ^ {\varphi (l)}} \sum_ {m \in M} d \left\| \frac {W _ {m} ^ {\varphi (l)}}{\left\| W _ {m} ^ {\varphi (l)} \right\|} - W ^ {\bar {\varphi} (l)} \right\| \leq K \cdot (1 - 2 \mu \lambda) ^ {n l} \leq \gamma (\mathbf {w}) ^ {- 1 / n} \tag {2} +$$ + +According to the condition $I(\mathbf{x}; \mathbf{y} | \mathbf{z}_1) = I(\mathbf{x}; \mathbf{y} | \mathbf{z}_2) = \ldots = I(\mathbf{x}; \mathbf{y} | \mathbf{z}_k)$ , since basins corresponding to multimodal combinations all lie at the same depth, their empirical risks are essentially the same, and so are the gradients from the ERM term. Now, as a result of modality collapse, we know that one of the basins is steeper than the rest, meaning it has a higher local gradient. Since the empirical risk is constant across all the basins / multimodal combinations, the steepness must come from the rank minimization term. Therefore, the combination with a steep entry must lead to a lower rank solution. + +As observed by (Javaloy et al., 2022), no local improvement in the minimization of the marginal loss may be due to conflicting gradients in the local parameterizations for the two modalities. Note that this does not imply that the two modalities are globally conflicting. It is only the local encodings of the two that somehow conflict with each other. Specifically, following from Equations (1) and (2) and Lemma 2, the norm of the difference between the polysemantic subspace $\mathbf{w}$ and the AGOP of the ambient weight matrix $W$ can be bound as: + +$$ +\left\| \mathbf {w} - \sum_ {x \in X} \nabla \varphi_ {W} (x) \nabla \varphi_ {W} (x) ^ {T} \right\| \leq K \cdot (1 - 2 \mu \lambda) ^ {n l} \tag {3} +$$ + +Therefore, for polysemantic bases, at any given iteration of SGD, the difference with the AGOP can be more tightly bound than for monosemantic bases. Formally, combining Equations (1) to (3), we have: + +$$ +\left\| \mathbf {w} - \sum_ {x \in X} \nabla \varphi_ {W} (x) \nabla \varphi_ {W} (x) ^ {T} \right\| \leq K \cdot (1 - 2 \mu \lambda) ^ {n l} \leq \gamma (\mathbf {w}) ^ {- 1 / n} \tag {4} +$$ + +In other words a basis formed with polysemantic neurons is more similar to the AGOP than one formed with monosemantic neurons, provided the conditional cross-entropy $H(\mathbf{x};\mathbf{y}|\mathbf{z})$ reduction provided (amount of unique label information held) by each feature is the same, i.e., $I(\mathbf{x};\mathbf{y}|\mathbf{z}_1) = I(\mathbf{x};\mathbf{y}|\mathbf{z}_2) = \ldots = I(\mathbf{x};\mathbf{y}|\mathbf{z}_k)$ . + +This completes the proof of the theorem. + +# B.2. Knowledge Distillation Frees Up Rank Bottlenecks + +As described earlier, the cause for collapse is cross-modal interference between noisy and predictive features. Here, we find that knowledge distillation implicitly remedies this problem. Knowledge distillation converges when the noisy and the predictive subspaces have been sufficiently disentangled to the point that the available rank can be assigned completely towards modeling the teacher modality, after effectively having discarded as many of the noisy features as possible. There is some empirical evidence on this from the self-distillation literature (Xie et al., 2019). With the disentangled and denoised representations obtained from knowledge distillation, the causal factors of the previously eliminated modalities can expand (inverse of collapse) the multimodal representation space, utilizing previously unused dimensions for encoding features that effectively reduce the loss. Previously, the effect of the semantically relevant features from the eliminated modalities would not be observable since the superposition with the noisy features would cancel out (when marginalized across all features) any conditional reduction in loss that the causal factors would have induced. + +Theorem 3 (Dynamic Convergence Bound). When the inputs to $\varphi$ are dynamic (for instance, when the unimodal representations are aligned via cross-modal knowledge distillation) under some distance metric $d$ , then at any iteration $n$ of SGD, the norm of the difference between $\mathbf{w}$ and the AGOP of $W$ is bounded as follows for all modalities $i$ , $j \in M$ and datapoints $\mathbf{x} \in X$ : + +$$ +\lim _ {d (\tilde {\mathbf {x}} _ {i}, \tilde {\mathbf {x}} _ {j}) \rightarrow \epsilon} \left\| \mathbf {w} - \sum_ {\mathbf {x} \in X} \nabla \varphi_ {W} (\mathbf {x}) \nabla \varphi_ {W} (\mathbf {x}) ^ {T} \right\| \leq \kappa^ {- 1 / n}, +$$ + +where $\tilde{\mathbf{x}}_i, \tilde{\mathbf{x}}_j = f_i(\mathbf{x}_i), f_j(\mathbf{x}_j)$ , $\kappa$ is a constant for a given depth proportional to the AGOP along the entire weight matrix $W$ at that depth, $\epsilon$ is the maximum permissible bound on the distance between any pair of modality-specific encodings, and both $W$ and $\mathbf{w}$ are functions of $\mathbf{x}_i$ and $\mathbf{x}_j$ , as they result from backpropagation on their predictions on $X$ . + +Proof. A weighted general case of the Depth-Rank Duality result by (Sreelatha et al., 2024) follows as a consequence of cross-modal interferences, which can be written as: + +$$ +\underbrace{\min_{\varphi,f}\mathcal{L}(\varphi(X),Y)}_{\text{ERM}} + \alpha \min_{\varphi}\sum_{l}\operatorname {rank}(\varphi), +$$ + +where $\alpha$ is a function measuring the compactness of the embedding space, in our case, through the pairwise distance between points, $d(\tilde{\mathbf{x}}_i,\tilde{\mathbf{x}}_j)$ , computed via a given iterate of $\varphi$ , i.e., + +$$ +\alpha = h _ {\varphi} \left(d \left(\tilde {\mathbf {x}} _ {i}, \tilde {\mathbf {x}} _ {j}\right)\right) +$$ + +When cross-modal polysemantic interference happens despite there being extra available dimensions in the ambient space, it indicates a faulty capacity allocation (Scherlis et al., 2022) of the corresponding neurons by SGD, which follows from the Johnson-Lindenstrauss lemma (Elhage et al., 2022). It happens because SGD, by default, performs the aforementioned implicit weighted rank-regularization aside from ERM, with the highest possible value of $\alpha$ such that it encourages the smallest possible rank for a target ERM solution. However, if it is known a priori that the pairwise distances $d(\tilde{\mathbf{x}}_i,\tilde{\mathbf{x}}_j)$ approach some constant neighborhood $\epsilon$ , we get: + +$$ +\alpha_ {1} > \alpha_ {2} > \dots > \alpha_ {n} = h _ {\varphi_ {n}} (\epsilon) = A, +$$ + +where $A$ is a constant. Following from this, under the given limit, the rank regularization term in the optimization objective of Depth-Rank Duality gets relaxed as: + +$$ +\lim _ {d (\tilde {\mathbf {x}} _ {i}, \tilde {\mathbf {x}} _ {j}) \rightarrow \epsilon} \alpha \min _ {\varphi} \sum_ {l} \operatorname {r a n k} (\varphi) = A \min _ {\varphi} \sum_ {l} \operatorname {r a n k} (\varphi), +$$ + +which ultimately implies that for any $\tilde{\varphi}$ inducing pairwise distances $d(\tilde{\mathbf{x}}_i,\tilde{\mathbf{x}}_j) > \epsilon$ will have $\mathrm{rank}(\tilde{\varphi}) < \mathrm{rank}(\varphi)$ . As representations from different modalities get closer to each other under the distance metric $d$ , which is what effectively happens during cross-modal knowledge distillation, the increase in rank encourages a consequent increase in the proportion + +of monosemantic neurons in $W$ . This results in the AGOP of $W$ diverging away from its polysemantic subspaces $\mathbf{w}_p$ , with the size of such polysemantic subspaces decreasing as follows: + +$$ +\left\| \tilde {\mathbf {w}} _ {p} - \sum_ {\mathbf {x} \in X} \nabla \tilde {\varphi} _ {W} (\mathbf {x}) \nabla \tilde {\varphi} _ {W} (\mathbf {x}) ^ {T} \right\| < \lim _ {d (\tilde {\mathbf {x}} _ {i}, \tilde {\mathbf {x}} _ {j}) \to \epsilon} \left\| \mathbf {w} _ {p} - \sum_ {\mathbf {x} \in X} \nabla \varphi_ {W} (\mathbf {x}) \nabla \varphi_ {W} (\mathbf {x}) ^ {T} \right\|, +$$ + +Given the above constraint on the size of polysemantic bases in $W$ as $d(\tilde{\mathbf{x}}_i,\tilde{\mathbf{x}}_j)\to \epsilon$ , the size of any feature subspace $\mathbf{w}$ i.e., the number of features that can be encoded by any $\mathbf{w}$ approaches some constant upper bound corresponding to $\epsilon$ : + +$$ +\lim _ {d (\tilde {\mathbf {x}} _ {i}, \tilde {\mathbf {x}} _ {j}) \to \epsilon} | \mathbf {w} \cap X | = | \mathbf {w} _ {\epsilon} \cap X | = k _ {\mathbf {w}}, +$$ + +where $|\mathbf{w}_{\epsilon}|$ is the size of the feature subspace in the neighborhood $\epsilon$ . Since both $|\mathbf{w}_{\epsilon}|$ and $|X|$ are constants, $k_{\mathbf{w}}$ is also a constant. It thus follows that, under a dynamic input space approaching a bounded neighborhood $\epsilon$ , the number of features encoded in any polysemantic subspace also gets bounded by $k_{\mathbf{w}}$ as $n \to \infty$ . So, the RHS in Theorem 2 can be rewritten as: + +$$ +\lim _ {n \to \infty} \gamma (\mathbf {w}) ^ {- 1 / n} = \left(\frac {| \mathbf {w} \cap X |}{\dim (\mathbf {w})}\right) ^ {- 1 / n} = \left(\frac {k _ {\mathbf {w}}}{\dim (\mathbf {w})}\right) ^ {- 1 / n} = \kappa^ {- 1 / n}, +$$ + +where $\kappa = k_{\mathbf{w}} / \dim (\mathbf{w})$ is a constant as both $k_{\mathbf{w}}$ and $\dim (\mathbf{w})$ are constants. Finally, following from the above, when $d(\tilde{\mathbf{x}}_i,\tilde{\mathbf{x}}_j)\to \epsilon$ , Equation (4) from the proof of Theorem 2 can be expressed in terms of $\kappa$ as: + +$$ +\lim _ {d (\tilde {\mathbf {x}} _ {i}, \tilde {\mathbf {x}} _ {j}) \rightarrow \epsilon} \left\| \mathbf {w} - \sum_ {x \in X} \nabla \varphi_ {W} (x) \nabla \varphi_ {W} (x) ^ {T} \right\| \leq K \cdot (1 - 2 \mu \lambda) ^ {n l} \leq \gamma (\mathbf {w}) ^ {- 1 / n} = \kappa^ {- 1 / n} +$$ + +This completes the proof of the theorem. + +# B.3. Additional Remarks + +Unequal conditional cross-entropy across features: According to the condition $I(\mathbf{x}; \mathbf{y} | \mathbf{z}_1) = I(\mathbf{x}; \mathbf{y} | \mathbf{z}_2) = \ldots = I(\mathbf{x}; \mathbf{y} | \mathbf{z}_k)$ , since basins corresponding to multimodal combinations all lie at the same depth, their empirical risks are essentially the same, and so are the gradients from the ERM term. Now, as a result of modality collapse, we know that one of the basins is steeper than the rest, meaning it has a higher local gradient. Since the empirical risk is constant across all the basins / multimodal combinations, the steepness must come from the rank minimization term in Theorem 4. Therefore, the combination with a steep entry must lead to a lower rank solution. When the equality is not met across all features, the low-rank / steepness condition is trivially satisfied by the existence of a lower-dimensional subspace of $\mathbf{z}_i$ s that has a lower conditional mutual information $I(\mathbf{x}; \mathbf{y} | \mathbf{z}_i)$ , and deriving the upper-bound on the rank in terms of the AGOP is no-longer necessary. The rank of the subspace comprising features with lower relative mutual information could act as a reasonable estimate of the rank of the final weights that SGD would converge to. By considering the condition with the equality, we analyze the boundary case that even when such a subspace with low conditional mutual information cannot be identified, it is possible to upper-bound the rank of the weight matrix. + +Identifying Latent Factors and Substitutability: If the latent factors are identifiable from the data up to some symmetry of the latent distribution (Gulrajani & Hashimoto, 2022), then the substitutability result also holds up to the actions of that symmetry group. In other words, substitutability is directly contingent on identifiability, i.e., the existence of symmetries in the latent distribution can affect the substitutability of latent factors among modalities. + +Segregating predictive and noisy features from the set of latent factors can be done by learning to discover independent causal mechanisms on the aggregate of all modalities (Parascandolo et al., 2018). The degree to which the latent factor representations of the individual modalities can be compressed, i.e., the value of $\epsilon$ in Theorem 3, depends on the size / rank of the invariant (Arjovsky et al., 2019) subspace. + +Intuition behind the Dynamic Convergence Bound: Every modality consists of both noisy and predictive features. If fusion collapses to a specific modality (target), it means that the modality contains more predictive information and less noise than the rest. Knowledge distillation to align the representations of the other modalities with the target would thus denoise the other modalities, allocating a larger fraction of the feature space of the modality-specific encodings of + +such modalities to predictive features. Since noisy features are closer to random, they can get entangled with predictive features from any modality if the corresponding neuron has a slight deviation from perfect orthogonality, according to the Johnson-Lindenstrauss lemma (Elhage et al., 2022). With the elimination of noisy features, such entanglements following from superposition become less likely among predictive features across modalities, since they would normally require dedicated dimensions with strong orthogonality, i.e., monosemantic neurons. Therefore, as the unimodal representations get closer to each other through the implicit denoising mechanism of knowledge distillation, SGD gets increasingly compelled to parameterize the fusion head in a monosemantic manner. + +In other words, knowledge distillation implicitly disentangles the cross-modal interferences by freeing rank bottlenecks and encouraging necessary monosemanticity, allowing for independent, modality-wise denoising of features along novel dimensions. + +When cross-modal polysemantic weight matrices are rank-bottlenecked, the only solution to minimize the loss further is to allocate the noisy features new, independent dimensions in the latent space. However, this causes an increase in representation rank. To counteract this, knowledge distillation frees up the rank bottlenecks by down-weighting the rank-regularization term. + +Distillation Denoising Conjecture: Knowledge distillation reduces the weight on the rank-regularization term, freeing up other dimensions for exploration, potentially containing higher rank solutions with more modalities. The rank deregularization happens due to knowledge distillation having to denoise the student modality in order to align its representation with that of the teacher (Bishop, 1995), as also indicated by our empirical observations in Section 4.3. Given this, we conjecture that knowledge distillation allows the representation of the noisy components of the teacher modality as a transformed version of the student noise, thereby eliminating the need for encoding noisy features from every modality in the neurons encoding the student modality. This can be formally stated as follows: + +$$ +\lim _ {f _ {s} (x _ {s}) \to f _ {t} (x _ {t})} f _ {t} (x _ {t} \hat {\eta}) = g (x _ {s} \hat {\eta}); \forall x _ {s} \in X _ {s}, x _ {t} \in X _ {t} +$$ + +where $X_{s}$ and $X_{t}$ are respectively the teacher and student modalities, $f_{s}$ and $f_{t}$ are respectively the teacher and student encoders, $\hat{\eta}$ represents the noisy components of a modality, and $g$ is the transformation function relating the student noise with the teacher noise embedding. + +Loss Landscape Geometry: Once the optimizer converges to the modality-collapsed solution, the value of the loss and the rank of the solution balance each other out. Now, to explore further, the optimizer has to move along a novel direction in the parameter space which leads to a reduction in loss but a simultaneous increase in rank. The reason behind this saddle-geometry is the presence of noisy features from one modality in entanglement with the predictive features from another, which results in an adversarial minimax game between the two. On either side of the saddle point along the unexplored dimensions are predictive features of the former modality which could potentially minimize the task loss, but is not taken into account due to rank regularization. Since, according to Theorem 3, subspaces in $\varphi$ get decreasingly polysemantic when $d(\tilde{\mathbf{x}}_i,\tilde{\mathbf{x}}_j)\to \epsilon$ , it implies that knowledge distillation down-weights this regularization by disentanglement and denoising of the bases of the modalities from which the noisy features originate. + +A Note on Figure 2: Under disentangled polysemanticity, although the noisy and predictive features may still be encoded via the same neuron, they map to different regions in the activation space of the neuron, leading to a feature-wise separable effect. For instance, the coefficients of the predictive features may have a relatively higher magnitude, implying that in order to activate the noisy component of the neuron, the degree of noise in the input would have to be much higher than its predictive counterpart. + +# C. Additional Experimental Settings and Results + +# C.1. Experimental Settings + +Dataset Details: MIMIC-IV contains information about 180,000 patients across their 431,000 admissions to the ICU. Following Wu et al. (2024), we use the clinical notes, lab values, demographics (age, gender, and ethnicity), diagnosis, procedure, and medications as the set of input modalities. The task is to perform Mortality (whether the patient will pass away in the 90 days after discharge) and Readmission (whether a patient will be readmitted within the next 15 days following discharge) prediction for a given patient. avMNIST comprises 1500 samples of images and audio, taken from MNIST (Lecun et al., 1998) and the Free Spoken Digits Dataset (Jackson et al., 2018), where the task is to predict the labels of the + +input digits from 0 to 9. We adopt the experimental setup of Wang et al. (2023) for avMNIST. + +Implementation Details: The two hidden layers of $\psi$ have output dimensionalities 512 and 256 respectively. The hidden layers of $h$ have output dimensionalities 1024 and 512 respectively, whereas that of $h^{-1}$ is 512 and 1024. The model was trained for 1200 epochs, with an initial learning rate of 0.01, decayed at a rate of 0.9 every 100 epochs. We interleave between the optimization of $\mathcal{L}_{\mathrm{md}}$ and $\mathcal{L}_{\mathrm{sem}}$ every 10 epochs. + +# C.2. Results on avMNIST + +Following on from Section 4, we list the empirical results on avMNIST as follows: + +- Presence of rank bottlenecks: Figure 10 (a) and (c) +- Effectiveness of basis reallocation: + +- Rank and Similarity with the Multimodal Representation: Figure 10 +- Optimization Dynamics: Figure 9 +- Denoising Effect of Basis Reallocation: Figure 8 +- Independence from Fusion Strategies: Table 4 + +- Fusion with Inference-time Missing Modalities: Table 3 + +The analytical conclusions for avMNIST are the same as what is discussed in Section 4, since the patterns of observations are highly consistent between avMNIST and MIMIC-IV. The only experiment not included for avMNIST is the one corresponding to Figure 4 for MIMIC-IV, since avMNIST has only two modalities, and hence, it is not possible to monitor the effect of increasing the number of modalities on the loss curves. + +![](images/f1ec8bee422daf7e623fa43bd6887cb132bdfeb0fb90bdf334720089037d460d.jpg) +Figure 8. avMNIST: With increasing noise rate, existing approaches suffer from modality collapse due to noisy cross-modal entanglements. With improved strategies of basis reallocation, implicit (KD) or explicit (EBR), robustness to noise and the consequent prevention of modality collapse can be ensured. + +# C.3. Sequence of Distillation + +The results of various strategies for sequencing the teacher modality for cross-modal knowledge distillation are reported in Table 5. Based on these observations, we choose weakest-to-strongest as the sequence to benchmark our KD based implicit basis reallocation mechanism. + +![](images/811465be1ce3b9697c84afc18d9c029dad0d3a347ac81e4855f1925fab7e773b.jpg) +Figure 9. avMNIST: Semantic loss minimization comparison between vanilla multimodal learning and using implicit (KD) and explicit (EBR) basis reallocation. + +![](images/c0029b3e2f3d6097886b0fe87ebeab0c76d678e15ccb380a7429dd156692fce5.jpg) +Figure 10. avMNIST: Multimodal rank and representation similarities of modalities with the multimodal representation, under implicit (KD) and explicit (EBR) reallocation mechanisms, across different strengths $\beta$ of the modality that gets eliminated under collapse. + +![](images/6a0ebfcba5ffc6d4acfb8731ddbf840e28adb31a9dc087f0ef6a4d6c40595796.jpg) + +![](images/f0474185a7ca4eae910a4353d6c7ce047fc9625948a142c6ab6b2000928d8494.jpg) + +![](images/c2ddb5cfe87cedeac2306c3f33342c9b233368123e6e090a6015af143a9881c0.jpg) + +
MethodAcc @ Audio Missingness Rate
95%90%85%80%
Autoencoder (ICMLW'12)89.7889.3389.7888.89
GAN (ACM Comm'20)89.1189.7891.1193.11
Full2miss (IPMI'19)90.0091.1192.2392.67
Grape (NeurIPS'20)89.6590.4291.1591.37
SMIL (AAAI'21)92.8993.1193.3394.44
ShaSpec (CVPR'23)93.3393.5693.7894.67
MUSE (ICLR'24)94.2194.3694.8294.93
EBR (Ours)95.3095.5795.8995.93
+ +Table 3. avMNIST: Comparison with SOTA on dealing with the missing audio modality across different missingness rates at test time, following the baseline setup of Wang et al. (2023). + +# C.4. Baselines for Substitutability + +We design the following baselines for comparison against our EBR-based modality substitution approach: zeros, random sampling, nearest-neighbor modality, train set average. Using four (two weak and two strong - diagnosis, lab values, clinical notes, and medication respectively) modalities from MIMIC IV, we report the average with standard deviation of the 15 possible missingness patterns on the AUC-ROC metric for Mortality prediction in Table 6. The target represents the model + +
MethodAcc @ Audio Missingness Rate
95%90%85%80%
SMIL (AAAI'21)92.8993.1193.3394.44
+ KD92.9593.9794.0694.70
+ EBR93.7794.0294.5194.96
ShaSpec (CVPR'23)93.3393.5693.7894.67
+ KD95.0295.1695.3095.45
+ EBR95.3095.5795.8995.93
MUSE (ICLR'24)94.2194.3694.8294.93
+ KD94.9895.0295.4095.55
+ EBR95.0295.2695.6195.70
+ +Table 4. avMNIST: Using knowledge-distilled / EBR backbones for the modality that would otherwise be eliminated. + +
MethodAUC-ROCAUC-PR
Strongest only0.91960.4875
Strongest-to-weakest0.86510.4130
Random0.90050.4685
Simultaneous0.91020.4786
Weakest-to-strongest0.93500.4993
+ +Table 5. MIMIC-IV: AUC-ROC and AUC-PR on Mortality Prediction for various sequences of knowledge distillation. + +
MethodAUC-ROCTarget
Zeros0.5110 ± 0.18
Random0.6139 ± 0.15
Rep-NN0.7150 ± 0.08
Late Fusion0.6990 ± 0.060.7844 ± 0.02
Avg w/o cls0.5312 ± 0.23
Avg w/ cls0.7396 ± 0.09
EBR (Ours)0.7829 ± 0.05
+ +Table 6. MIMIC-IV: Comparison of the substitutability performance of EBR with baselines. Experiments performed over a subset of 4 (2 strong and 2 weak) input modalities, based on which, the average of 15 possible missingness patterns with standard deviation are reported. + +trained on specifically on the subset of modalities that do not go missing, i.e., its performance would always be higher than any baseline since it does not have to deal with the distribution shift that comes from modalities going missing at test time. + +# C.5. Multicollinearity + +We expect to see increased levels of multicollinearity as the number of modalities increase, if the dimensionality of the representation space remains constant. As correctly conjectured by the reviewer, we would expect multicollinearity to be more pronounced in the deeper layers of the fusion head. The reason behind this is that although there may be dependencies among features across modalities, they may not be exactly linear. As they propagate deeper into the fusion head, it is more likely that those non-linear dependencies would be resolved and linearized in the final representation space prior to classification. Theoretically, the bound in Thm 2 is derived based on the AGOP, i.e., $\mathbf{x} \in X \nabla \varphi_W(\mathbf{x}) \nabla \varphi_W(\mathbf{x})^T$ , being a low rank subspace in W (corresponding to an independent set of features), as discussed in (Radhakrishnan et al., 2024), which is also required since one-to-one dimension-to-feature mappings needed to detect the presence of multicollinearity may exist in neural networks (De Vaeux & Ungar, 1994). This aligns with the condition for regression multicollinearity that $X^T X$ should be not a full rank matrix. + +To empirically confirm this, we calculate the variance inflation factor (VIF) with increasing modalities on our trained representation space. We report the average VIF across features in Table 7. With the increasing number of modalities, + +multicollinearity (VIF) increases in all cases. However, basis reallocation encourages cross-modal features to be encoded independently, with the explicit EBR being more efficient in controlling the level of multicollinearity relative to the implicit KD. + +
# Modalities2345
Vanilla1.152.683.514.70
w/ KD1.091.902.302.68
w/ EBR1.051.261.321.55
+ +# C.6. Statistical Comparisons + +In Table 8 we report the resulting p-values of performing the Wilcoxon rank test with Holm-Bonferroni correction (significance level $\alpha = 0.05$ ) on the Table 1 results between our proposed EBR and the other baseline methods. The null hypothesis that the proposed EBR and the other models follow the same distribution of AUC-ROC and AUC-PRCs with the chosen missingness rates, were rejected for the both Mortality and Readmission prediction tasks across all baselines, most often, with significantly low p-values, which in all cases, was lower than 0.01. It further provides evidence in support of the uniqueness of EBR in leveraging basis reallocation to free up rank bottlenecks as a novel mechanism to tackle missing modalities. + +Table 7. Average variance inflation factor (VIF) across features in the representation space with increasing number of modalities. + +
MethodMortalityReadmission
AUC-ROCAUC-PRCAUC-ROCAUC-PRC
CM-AE0.00900.00770.00650.0035
SMIL0.00660.00530.00420.0066
MT0.00830.00820.00770.0065
Grape0.00270.00570.00580.0042
M3-Care0.00790.00310.00690.0039
ShaSpec0.00850.00620.00490.0075
MUSE0.00880.00790.00860.0089
+ +Table 8. P-values of the Wilcoxon rank test with Holm-Bonferroni correction on the Table 1 results between EBR and other baselines. + +# C.7. Polysemanticity + +Considering the results in Figure 5 (a) and (c), Figure 7, and Section 4.3, since there is no external source of noise in the fusion head, and encouraging monoseismicity through basis reallocation has a denoising effect, the noise that leads to the observed collapse must come from some cross-modal polysemantic interference. + +To provide further evidence, we adapt the definition of polysemanticity based on neural capacity allocation from Scherlis et al. (2022) to measure cross-modal polysemanticity as the amount of uncertainty in the assignment of a neuron to a particular modality. We train a two-layer ReLU network on weights from unimodal models to classify which modality the input models are optimized on. Next, we apply this modality-classifier on the weights of our multimodal fusion head and record the average cross-entropy (CE) in its outputs. Higher values of cross-entropy indicate higher levels of cross-modal polysemanticity, since the probability masses are spread out across multiple modalities. In Table 9, we report the results on bi-modal training. The sharply lower relative CE for KD and EBR directly indicate the reduced cross-modal polysemantic interference under basis reallocation. + +# C.8. Comparison with Contrastive and Generative Models + +Cross-Modal Polysemantic Interference in multimodal contrastive learning: We choose GMC (Poklukar et al., 2022) as our candidate multimodal contrastive learning algorithm for analyzing cross-modal polysemantic interference in multimodal contrastive learning. We evaluate GMC by applying their proposed contrastive objective to our baseline representation + +
MethodCE
Vanilla5.66
KD2.09
EBR0.59
+ +Table 9. Empirically measuring cross-modal polysemantic interference as average cross-entropy (CE) in the modality classifier prediction. + +learning setting on MIMIC-IV and report the results in terms of the lowest achieved training semantic loss in Table 10. As we can see, trends similar to that of our original setting reported in the main manuscript, in the semantic loss gap between the Multimodal Prefix and the Unimodal Baseline, play out when we perform a contrastive objective based fusion as reported in Poklukar et al. (2022). It further supports the claims in Lemma 1 and Theorem 1 that as the number of modalities increase, the modality undergoing collapse contributes less and less to the downstream representation used to encode the semantics, irrespective of the fusion strategy. + +
Number of Modalities2345
Multimodal Prefix27.6852.9091.20167.30
Unimodal Baseline7.976.555.339.55
+ +Rank Bottlenecks in Generative and Contrastive Models: We choose MMVAE (Shi et al., 2019) as our candidate generative model for analyzing rank bottlenecks. Since the objective of generative modeling is somewhat different from the downstream application that we experimented with, to analyze MMVAE, we performed the experiment on their proposed MNIST-SVHN dataset, while for GMC (Poklukar et al., 2022), since it is for general representation learning, we applied their proposed contrastive objective to our baseline setting on MIMIC-IV. In Table 11, we report the results of our experiment, where the vanilla setting refers to the original model, without KD or EBR. + +Table 10. Lowest achieved training semantic loss with increasing number of modalities in the contrastive setting. + +
Methodβ
02468
MMVAE (Unimodal Baseline)198
MMVAE (Vanilla)47742139811096
MMVAE + KD482465390298270
MMVAE + EBR485477431405395
GMC (Unimodal Baseline)1255
GMC (Vanilla)187713301146930872
GMC + KD19051676153314271390
GMC + EBR19121825170916001588
+ +Table 11. Representation ranks with increasing $\beta$ in generative (MMVAE) and contrastive (GMC) models. + +We can see that in both the generative and contrastive settings, the ranks consistently drop as the strength of the modality undergoing collapse $\beta$ is increased. The drop is sharp around a critical point, where the rank goes below the unimodal baseline, depicting a form of phase transition, a phenomenon also observed in our original experiments (Section 4.2 Observations and Analyses). Finally, the dropping rank can be counteracted by implicit (KD), and even more effectively, by explicit basis reallocation (EBR), which results in a much more stable rank across the range of different values of $\beta$ . \ No newline at end of file diff --git a/acloserlookatmultimodalrepresentationcollapse/images.zip b/acloserlookatmultimodalrepresentationcollapse/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d44fa12d297c0e31047aafd8cdd73255e2c32ca7 --- /dev/null +++ b/acloserlookatmultimodalrepresentationcollapse/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e92ae71b560523da842cb4145d7b47cd7c952d4fbae5790e9b0427517de023e +size 1097906 diff --git a/acloserlookatmultimodalrepresentationcollapse/layout.json b/acloserlookatmultimodalrepresentationcollapse/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..394628b7b3e3127ebb573be03525d92106383180 --- /dev/null +++ b/acloserlookatmultimodalrepresentationcollapse/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17d467694b9347bb63acc1ce4f96f7a17bf227c2957fc988416cf14f8c12735e +size 851665 diff --git a/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/a20f4040-9bc5-4478-88d7-158e2817cf5e_content_list.json b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/a20f4040-9bc5-4478-88d7-158e2817cf5e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..15f3967b51f15dbe3ccc95e94913305af3717910 --- /dev/null +++ b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/a20f4040-9bc5-4478-88d7-158e2817cf5e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3242057de7ff95aff79eb7372b8dfbb73fd1d9dfe9e4484cffc6b9aded48db6b +size 147382 diff --git a/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/a20f4040-9bc5-4478-88d7-158e2817cf5e_model.json b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/a20f4040-9bc5-4478-88d7-158e2817cf5e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..da15503d3003443b8f490c39077084f2cd57c7fe --- /dev/null +++ b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/a20f4040-9bc5-4478-88d7-158e2817cf5e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56dfca34f435ea22fb0b824ee6c07a43afb2dbd7f780ccb8ce33e730556dd6f9 +size 160935 diff --git a/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/a20f4040-9bc5-4478-88d7-158e2817cf5e_origin.pdf b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/a20f4040-9bc5-4478-88d7-158e2817cf5e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..65b790c191f3d76a5e1d0139bf93934edc84138d --- /dev/null +++ b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/a20f4040-9bc5-4478-88d7-158e2817cf5e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:282394b3af11afdffdc74ebe13faadb25beae702733a7e9839b112e505fb081a +size 2923973 diff --git a/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/full.md b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f36edb4539c5d1419bfc72c2af1e2704156bb228 --- /dev/null +++ b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/full.md @@ -0,0 +1,435 @@ +# A Closer Look at Transformers for Time Series Forecasting: Understanding Why They Work and Where They Struggle + +Yu Chen $^{12}$ Nathalia Céspedes $^{12}$ Payam Barnaghi $^{12}$ + +# Abstract + +Time-series forecasting is crucial across various domains, including finance, healthcare, and energy. Transformer models, originally developed for natural language processing, have demonstrated significant potential in addressing challenges associated with time-series data. These models utilize different tokenization strategies, point-wise, patch-wise, and variate-wise, to represent time-series data, each resulting in different scope of attention maps. Despite the emergence of sophisticated architectures, simpler transformers consistently outperform their more complex counterparts in widely used benchmarks. This study examines why point-wise transformers are generally less effective, why intra- and inter-variate attention mechanisms yield similar outcomes, and which architectural components drive the success of simpler models. By analyzing mutual information and evaluating models on synthetic datasets, we demonstrate that intravariate dependencies are the primary contributors to prediction performance on benchmarks, while inter-variate dependencies have a minor impact. Additionally, techniques such as Z-score normalization and skip connections are also crucial. However, these results are largely influenced by the self-dependent and stationary nature of benchmark datasets. By validating our findings on real-world healthcare data, we provide insights for designing more effective transformers for practical applications. + +1Imperial College London, Department of Brain Sciences, London, W12 0NN, United Kingdom 2The UK Dementia Research Institute, Care Research and Technology Centre, United Kingdom. Correspondence to: Yu Chen , Payam Barnaghi . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +# 1. Introduction + +Time-series forecasting plays a crucial role in numerous critical applications, from finance and healthcare to energy and transportation. Accurate predictions of future values based on historical data are indispensable for informed decision-making and strategic planning across these domains. Building on their success in natural language processing, transformer models (Vaswani et al., 2017) have rapidly gained attention from researchers in time-series forecasting. Compared to RNN-based models (Hochreiter & Schmidhuber, 1996; Rangapuram et al., 2018; Salinas et al., 2020), transformers are capable of capturing long-range dependencies and efficiently processing large-scale datasets, making them a promising solution for addressing common challenges in time series data. + +Based on how tokens are represented in the attention mechanism, transformer-based models for time series can be categorized into three types: point-wise, patch-wise, and variate-wise (Wang et al., 2024b). In point-wise approaches, the embedding of each token is derived from the values of all variates at a specific time step. Patch-wise methods, on the other hand, represent small segments of the time series as tokens, with each token's embedding generated from a segment of a single variate over a fixed time window. variate-wise approaches take a more global perspective by treating the entire time series of a variate as a single token. A visualization of these three token types for time series data is shown in Figure 1. + +Recent research on transformers for time series forecasting has explored various tokenization strategies, with many models incorporating hybrid token scopes to enhance performance. However, point-wise transformers are generally less competitive than patch-wise and variate-wise ones. Interestingly, some transformers with simpler token scopes and attention mechanisms, such as iTransformer (Liu et al., 2023) and PatchTST (Nie et al., 2023), perform exceptionally well on standard time series forecasting benchmarks (Wang et al., 2024b). Notably, iTransformer is a variate-wise transformer with inter-variate attention, where attention is computed across different variates. In contrast, PatchTST is a patch-wise transformer with intra-variate attention, focusing on interactions between patches from the + +![](images/05d7ff911a23c0046ab530ced3612a2f32b384114f7776a14a5c969d9f94634b.jpg) +Figure 1: Demonstration of different token representations in time-series transformers. A point-wise token is formed by all variate values at one time step; a patch-wise token is formed by a segment or patch of a single variate in one time window; a variate-wise token is the entire time series of a single variate. + +![](images/208721108fd36dd299c8e7d1f50888c46a4282311f67d0fda44f7fc69ceb8927.jpg) + +![](images/e28a9963fb88d8563ea6a84ee42835307974df25e9e6d716dfc617a81a7f1a07.jpg) + +same variate. Despite these fundamental differences, both models often achieve similar performance in benchmark. + +This study seeks to address the following key questions: + +1. Why point-wise transformers generally less competitive in time series forecasting? +2. Why do transformers with intra-variate attention and those with inter-variate attention perform similarly? +3. Why do transformers with basic attention mechanisms excel in time series forecasting? +4. Which components in the basic transformer's architecture contribute most to the success in time series forecasting? + +To achieve this goal, we conducted a comprehensive analysis of selected representative transformers for time series forecasting (Table 1). To ensure a unified comparison across models with varying architectures and attention mechanisms, we introduce new metrics that estimate the mutual information within and between variates based on a model's input and output, capturing both intra-variate and inter-variate information flows in a model-agnostic manner. Beyond standard benchmark datasets from the literature, we also designed a set of synthetic datasets with controlled intra- and inter-variate dependencies to systematically assess transformer performance across different conditions. + +Our findings provide valuable insights for understanding how transformers work in time series forecasting: + +1. We demonstrate that transformers with superior performance excel at capturing intra-variate patterns, while inter-variate patterns play a much smaller role in model predictions, even in transformers equipped with inter-variate attention mechanisms. This can be attributed to the fact that, in the majority of time series forecasting benchmarks, each variate is largely self-dependent. These findings provide valuable insights into questions 1 and 2. +2. The basic transformer encoder is capable of capturing the intra-variate dependencies when using patch-wise and + +variate-wise tokens due to the self-attention mechanism. The skip-connection in encoder layers plays an crucial role for learning intra-variate patterns. A variate-independent decoder also helps the model to focus on the intra-variate dependencies. These findings address the question 3 and 4. + +3. A key factor that contributes to the success of models like iTransformer and PatchTST is not the model's architecture itself, but rather the use of Z-score normalization and denormalization for the model's input and output. This technique is particularly effective when the variates are stationary throughout the combined duration of the observation and prediction periods. However, it may degrade a model's forecasting performance when this assumption is violated. + +These findings also help explain certain phenomena observed in the literature. (Tan et al., 2024) found that pretrained large language models are not particularly useful for time series forecasting, as understanding a variate's broader context is not essential for capturing intra-variate patterns. However, this conclusion is based on commonly used benchmarks and may not hold for fundamentally different datasets, such as event time series. Additionally, (Zeng et al., 2023) suggested that linear models can outperform certain transformers on time series forecasting benchmarks, as point-wise transformers struggle to effectively capture intra-variate patterns. + +Moreover, the findings of this study offer complementary perspectives to several prior works. For instance, Zhao & Shen (2024) introduced a plugin method to identify and exploit locally stationary lead-lag relationships between variates to improve forecasting performance. Their work focuses on a specific type of inter-variate dependency and demonstrated modeling such relationships can be beneficial. Another relevant work, Reversible Instance Normalization (RevIN) (Kim et al., 2021), proposed a method similar to Z-score normalization to address distributional shifts in time series data. While we also examined Z-score normalization in this study, a key difference is that RevIN incorporates learnable parameters within its normalization process, whereas the Z-score normalization in our study is the standard, non-learnable version. Notably, we observed + +that Z-score normalization degraded model performance on synthetic datasets which are non-stationary with monotonic trends, an outcome that contrasts with observations in RevIN. + +# 2. Related work + +We selected a set of time series transformers in our analysis, which are representative of the different token scopes and attention mechanisms used for time series forecasting. These models are summarized in Table 1 and more details are provided below: + +1). Transformer (Vaswani et al., 2017) - The standard transformer architecture with point-wise tokens. +2.) Autoformer (Wu et al., 2021) – Autoformer introduces autocorrelation attention to capture long-range dependencies in time series. It decomposes the time series into trend and seasonal components using a moving average method, as in traditional time series models (Box et al., 2015). Additionally, a point-wise projection is added to each encoder layer to capture inter-variate dependencies. Since autocorrelation attention is computed over the entire time series, we consider Autoformer as a hybrid model that incorporates variate-wise and point-wise tokens. +3). FEDformer (Zhou et al., 2022) – FEDformer introduces frequency-enhanced attention to capture periodic patterns in time series data. Building on trend and seasonal decomposition, it adds frequency decomposition for seasonal components. The architecture of FEDformer closely resembles Autoformer, also incorporating a point-wise projection in its encoder layers. +4). Crossformer (Zhang & Yan, 2023) – Crossformer introduces a Two-Stage Attention mechanism to capture both intra- and inter-variate dependencies. It employs hierarchical patch-wise tokens for learning cross-time (intra-variate) and cross-dimension (inter-variate) attention efficiently. +5). PatchTST (Nie et al., 2023) - PatchTST uses a vanilla transformer encoder architecture but with patch-wise tokens. It segments the time series along the time axis into patches and applies attention to these patches for each variate. The model is incapable of capturing inter-variate patterns, as its decoder, a linear projection layer, is also variate-independent. +6). iTransformer (Liu et al., 2023) – iTransformer uses the same encoder architecture as the vanilla transformer but with variate-wise tokens. It treats the entire time series of a variate as a single token, thereby learning inter-variate attention through the multi-head self-attention mechanism. It's decoder is variate-independent linear projection, the same as PatchTST. + +7). TimeXer (Wang et al., 2024a) – TimeXer combines the ideas of PatchTST and iTransformer to enhance its ability of capturing both intra- and inter-variate dependencies. It learns intra-variate attention via patch-wise tokens and inter-variate attention through variate-wise tokens. The output of its encoder layers is a concatenation of the outputs from both attention mechanisms. It's decoder is the same as PatchTST and iTransformer. + +Some other point-wise approaches, such as Reformer (Kitaev et al., 2020), Pyraformer (Liu et al., 2022), and Informer (Zhou et al., 2021), were not included in our experiments. This is because they are generally perform worse and their architectures are less representative. Temporal Fusion Transformer (TFT) (Lim et al., 2021), however, is a hybrid model that incorporates variable selection and LSTM-based encoders prior to applying attention. As a result, its token representations are less explicit and not as directly comparable to the models we selected. Additionally, Tan et al. (2024) introduces PAttn, a patch-wise model similar to PatchTST in both token scope and architecture. Therefore, we consider PatchTST a representative model for PAttn. Furthermore, this study focuses on lightweight transformers for time series forecasting and does not include pretrained large language models. + +Traditional statistical models such as ARIMA (AutoRegressive Integrated Moving Average) (Box & Pierce, 1970), were not considered in this study as we are focusing on transformer-based models. However, such methods can be useful for analyzing the properties of single variates and provide certain interpretability to time series forecasting. + +Additionally, Qiu et al. (2024) introduced new benchmarks for time series forecasting, primarily focusing on intravariate perspectives, which differ significantly from the scope of the synthetic datasets in our study. + +# 3. Method + +Standard metrics for time series forecasting, such as mean squared error (MSE) and mean absolute error (MAE), are insufficient for evaluating a model's ability to learn intra- and inter-variate patterns. To overcome this limitation, we propose new metrics that estimate the mutual information (Cover, 1999) between a model's input and output, capturing intra- and inter-variate information flows in a model-agnostic way. These metrics facilitate comparisons across models with different architectures. + +Notations: Let $\mathbf{x} = \{\mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_M\}$ be a multivariate time series data sample, where $\mathbf{x}_i = \{x_{i,1}, x_{i,2}, \dots, x_{i,T}\}$ is the $i$ -th variate with $T$ time steps. The goal of time series forecasting is to predict the future values of each variate in $\mathbf{x}$ based on the historical values. We denote the predicted values as $\hat{\mathbf{x}}_i = \{\hat{x}_{i,T+1}, \hat{x}_{i,T+2}, \dots, \hat{x}_{i,T+k}\}$ . In addition, + +Table 1: Selected transformer-based models for time series forecasting in our analysis. Some models are hybrid that combines multiple token scopes in the model architecture. We consider Autoformer and FEDformer as hybrid with pointwise tokens because they both include point-wise projection in their encoders. Z-norm indicates whether the model uses Z-score normalization and denormalization for the input and output. + +
Point-wisePatch-wiseVariate-wiseInter-variate attentionZ-normVariate-independent decoder
Transformer (Vaswani et al., 2017)
Autoformer (Wu et al., 2021)
FEDformer (Zhou et al., 2022)
Crossformer (Zhang & Yan, 2023)
PatchTST (Nie et al., 2023)
iTransformer (Liu et al., 2023)
TimeXer (Wang et al., 2024a)
+ +$\mathbf{x}_{/i} = \{\mathbf{x}_j|\forall j\neq i\}$ represents the data sample excluding the $i$ -th variate. + +To quantify the dependency of the model's prediction for the $j$ -th variate $(\hat{\mathbf{x}}_j)$ on the $i$ -th variate $(\mathbf{x}_i)$ , we estimate the mutual information between them, conditioned on $\mathbf{x}_{/i}$ : + +$$ +I \left(\hat {\mathbf {x}} _ {j}; \mathbf {x} _ {i} \mid \mathbf {x} _ {/ i}\right) = H \left(\hat {\mathbf {x}} _ {j} \mid \mathbf {x} _ {/ i}\right) - H \left(\hat {\mathbf {x}} _ {j} \mid \mathbf {x} _ {i}, \mathbf {x} _ {/ i}\right) \tag {1} +$$ + +Since the model's output is deterministic given a complete input, the conditional entropy $H(\hat{\mathbf{x}}_j|\mathbf{x}_i,\mathbf{x}_{/i}) = 0$ . Hence: + +$$ +I \left(\hat {\mathbf {x}} _ {j}; \mathbf {x} _ {i} \mid \mathbf {x} _ {/ i}\right) = H \left(\hat {\mathbf {x}} _ {j} \mid \mathbf {x} _ {/ i}\right) \propto \sum_ {k = 1} ^ {K} \log \sigma_ {i j, k}, \tag {2} +$$ + +Here $k$ is the $k$ -th time step of $\hat{\mathbf{x}}_j$ and we assume $\hat{\mathbf{x}}_j|\mathbf{x}_{/i}\sim \mathcal{N}(\mu_{ij},\sigma_{ij}^2\mathbf{I})$ , $\mathbf{I}$ is the identity matrix. $\sigma_{ij}^{2}$ estimates the extent to which changes in the prediction of variate j are caused by changes in variate i. Mathematically, $\sigma_{ij}^{2}$ is the variance of the predictions of variate j conditioned on inputs x where all variates are held fixed except for variate i. It is straightforward to see that the mutual information $I(\hat{\mathbf{x}}_j;\mathbf{x}_i|\mathbf{x}_{/i})$ can be evaluated by the standard deviation of $\hat{\mathbf{x}}_j|\mathbf{x}_{/i}$ . Therefore, we define a mutual information score as below: + +$$ +\bar {\sigma} _ {i j} = \frac {1}{N} \sum_ {n = 1} ^ {N} \frac {1}{K} \sum_ {k = 1} ^ {K} \sigma_ {i j, k} ^ {(n)}, \quad \forall i, j \in \{1, 2, \dots , M \} \tag {3} +$$ + +Where $N$ is the number of samples, $K$ is the predicted sequence length. Unlike Pearson's correlation, it is more versatile as it captures both linear and non-linear relationships. + +To estimate this conditional variance, the variation of variate i is introduced through N different samples by augmenting original samples in the dataset. Specifically, each original sample is augmented into $\mathrm{N} = 5$ versions, differing only in the value of variate i: one instance is set to zero, one + +retains the original value, and the remaining instances are generated by adding Gaussian noise of varying strengths to the original value. + +When $j = i$ , we call $\bar{\sigma}_{ii}$ as the intra-variate mutual information score (Intra MI), and when $j \neq i$ , we call $\bar{\sigma}_{ij}$ as the inter-variate mutual information score (Inter MI). For a time series with more than two variates, we define two metrics for evaluating inter-variate mutual information across all variates: + +(i) Average Inter MI (Avg Inter MI): The average of all inter-variate mutual information scores. + +$$ +\frac {1}{M (M - 1)} \sum_ {i = 1} ^ {M} \sum_ {j = 1, j \neq i} ^ {M} \bar {\sigma} _ {i j} +$$ + +(ii) Maximum Inter MI (Max Inter MI): The maximum inter-variate mutual information score. + +$$ +\max _ {i, j} \bar {\sigma} _ {i j}, \quad \forall i, j \in \{1, 2, \dots , M \}, i \neq j +$$ + +We propose Max Inter MI as a measure of the mutual information captured by a model between the most strongly interacting variates. This metric helps assess whether a model is effectively learning inter-variate dependencies, particularly in cases where the number of variates is large and only a few exhibit strong interactions. For instance, in Figure 4, Crossformer achieves the highest Max Inter MI on the Traffic dataset (which has 862 variates), while its average Avg Inter MI remains lower than that of most other models. + +# 4. Experiments + +We conducted a series of experiments to analyze the behavior of selected transformers on both real-world and syn + +The experiments were implemented using the Time Series Library (Wang et al., 2024b). To ensure consistency, we employed a unified configuration across all prediction lengths within a given dataset for each model. As a result, the reported performance may differ from that presented in the original papers for these models. All the experimental results in this work are averaged over 3 runs with different random seeds. Standard deviation of the results are provided in the Appendix. Code are available here: https://github.com/yc14600/TimeSeries-Transformers-Analysis. + +![](images/531997536ed94170af020dda8eb9253bcf1358bdc6c357ce069fa589742cbfe0.jpg) +4.1. Datasets +(a) Independent variates. +Figure 2: Demonstration of synthetic datasets with independent and dependent variates. + +![](images/a224302f0bd6e10c060e4cf69ee4caa9879e4f1179bb73c2ed56e64e460b1c3d.jpg) +(b) Dependent variates. + +We included the following datasets in our experiments, as they are among the most commonly used benchmarks in the literature: Weather, Electricity, Traffic, and ETT (comprising four subsets). More details of these datasets are provided in Table 1 in the Appendix. + +Additionally, we designed a set of synthetic datasets with controlled intra- and inter-variate dependencies to evaluate the performance of different transformers under various conditions. Each synthetic dataset consists of two variates and is generated as hourly time series over a one-year period. Based on the relationship between the variates, we classify these datasets into two categories: independent and dependent (Figure 2). + +For the independent variates, we generated them independently with the following process: + +(1) We begin by generating a trend component characterized by a specified autocorrelation strength parameter $(\gamma \in [0,1])$ . Within the initial time window, the trend follows a linear pattern, either increasing or decreasing. A random noise $\epsilon$ sampled from a normal distribution was added to the trend component. The formulation is as below and the time lag was fixed at $k = 24$ in all synthetic datasets: + +$$ +\mathbf {a} _ {t + 1} = \gamma \sum_ {\tau = t - k} ^ {t} \omega_ {\tau} \mathbf {a} _ {\tau} + (1 - \gamma) \epsilon_ {a}, \tag {4} +$$ + +![](images/390234ef086f1321828787a7ca30a0d2e289e8570175a8c67079b457da8c6256.jpg) + +![](images/b054232cc053145e4750f87b2ae97283c2b8fd1d5b9b66dbfe5abbef328c0ddb.jpg) + +![](images/456d8e3f51d3c803ec10aaaf7ab97712f25b788e0101073c600e53bb0bd1ad48.jpg) +(a) $\gamma = 0.95$ $\alpha = 0$ +(c) $\gamma = 0.95$ $\alpha = 0.8$ + +![](images/dd93ab2a0d2911b80824029db3aae8e276015520dddfedc3badc02d81d900d84.jpg) +(b) $\gamma = 0.5$ , $\alpha = 0$ +(d) $\gamma = 0.5$ $\alpha = 0.8$ +Figure 3: Visualization of synthetic data with different configurations of $\gamma$ and $\alpha$ . Figures 3a and 3b show independent variates with high and low autocorrelation, while Figures 3c and 3d depict dependent variates with high and low autocorrelation. + +(2) Next, We generated two seasonal components for each variate, defined by specified amplitudes and frequencies. Each seasonal component was represented as a sine wave. The final time series was generated by adding the trend and seasonal components. + +For the dependent variates, we initially generated two independent variates using the above process. An additional step was then applied to introduce a specified dependency parameter $(\alpha \in [0,1])$ between the variates. This parameter controls the strength of the dependency: when $\alpha = 0$ , the variates were generated independently, with no dependency between them. + +$$ +\hat {\mathbf {b}} _ {t + 1} = \alpha \sum_ {\tau = t - k} ^ {t} \hat {\omega} _ {\tau} \mathbf {a} _ {\tau} + (1 - \alpha) \mathbf {b} _ {t + 1}. \tag {5} +$$ + +In our experiments, we selected $\gamma \in \{0.5, 0.95\}$ to represent low and high levels of autocorrelation, respectively, and $\alpha \in \{0, 0.2, 0.4, 0.8\}$ to capture varying degrees of dependency between variates. Figure 3 illustrates the synthetic signals generated with different levels of $\gamma$ and $\alpha$ . + +![](images/e56897d31a665001edb02d1b7c505108ff90f220f9d1dc218fef369c9c1d1ed1.jpg) + +![](images/eac2711df81e4b5837b7dcade85da5929ddfe5b1e55b255c1dd44eab983de908.jpg) + +![](images/4baa8c2a18d9204b100a150e5da25d9bacdfde34f77468edd85815c5c41ffd27.jpg) + +![](images/83b16ad544ba295246a4c0c8cbc748cee6aa789f984ce0380ac74892e9136e66.jpg) + +![](images/82d97a6e0afb787e22498f42371b70c8e5feef7c0fe3bb549916f6e5332998e7.jpg) + +![](images/fdb5fb01f18e91f7c35345759865f2a831607a0ed6c14670aa4cabe044b2d40a.jpg) + +![](images/ed30d43ecc126f0866a6f027694b106eac4dc4e34ba113754e993f8230333d85.jpg) + +![](images/0197676b333ab567b501fa5ecabed6c7c93556dfe42be1d663dd872dac181511.jpg) + +![](images/63c04d9bc7e5844b4bb8bd7cc641ca6b28f836293f3b3e06bb09c2575b916199.jpg) + +![](images/6401d3851b7e2ce3e5ace45e39fa3c0d07577378fb02a66aca0fe1e00c237dac.jpg) + +![](images/78340f0fac6804bc0f4a8ddfb953056a001ff499b3da97d36ee9ffd5efba00fe.jpg) + +![](images/7392c0afb0f9984225c990d9f1fda0be1c04ca9a104aa98c0836a1bc59735671.jpg) +Figure 4: Performance comparison of selected transformer-based models on commonly used benchmark datasets. + +![](images/b19b12a1a3873c6b82e638a9fef24de280663935a3268b669dbf9638964d1d41.jpg) + +![](images/f0d2edfb9f27703e0246ef4c68fdb29a2e61afe69e230d5859fff87ef946a45b.jpg) + +![](images/6c4e6f42e4fc0c9bb94841b0f5f6c6d387f8eb3d400ef0d056f6d4da4e6b054b.jpg) + +![](images/9dc93e575e863a7c5545798030b17d93dc272d453ac1d28fab047b45a59c5a14.jpg) + +![](images/3b62c582434cb63f092484eb29f25ac52a91f83cac0f5fa46293c48e412b905a.jpg) + +![](images/baf495e8b4b6cb33ee57047e4b776cfab14d0ec8e0872111de95d50c529c2623.jpg) + +![](images/2e3f2bf9d9f5b1f2be2d416e04ad075a70ac26ab8a113ab2cd54f3138894f2dd.jpg) + +![](images/9fbce7a155ea2a4da945a887061abad913629a6beb137020046b2b4a3c1bab75.jpg) + +![](images/28177a6af91ef61a360d687f9d16cb64c6409009cc5e53b9dcd882642b38e625.jpg) +Figure 5: Forecasting performance of selected transformer-based models on synthetic datasets with varying degrees of dependency between and within variates. + +# 4.2. Results + +In this section, we present and analyze the results of our experiments, organized around the research questions posed in this study. + +1. Why point-wise transformers are generally less competitive in time series forecasting? And why transform- + +ers with intra-variate attention and those with inter-variate attention often achieve similar performance? + +We begin by comparing the performance of selected transformer-based models on widely used benchmark datasets (Figure 4). The full results of all benchmarks datasets are provided in Figure 1 of the Appendix. These results indicate that transformers employing point-wise to + +Table 2: Correlation between MAE and mutual information scores across various datasets. Additionally, the table includes the average correlation between different variates within each dataset (denoted as Avg Var Corr). + +
ETTh1ETTh2ETTm1ETTm2WeatherTrafficElectricitySynthetic (γ = 0.95)Synthetic (γ = 0.5)
α = 0α = 0.2α = 0.4α = 0.8α = 0α = 0.2α = 0.4α = 0.8
Avg Var Corr0.2220.3250.2240.3240.2960.5640.4890.0170.0340.0610.0480.0160.0120.0190.031
MAE - Intra-0.875-0.935-0.794-0.781-0.715-0.87-0.739-0.742-0.515-0.60.0890.80.7920.7250.695
MAE - Avg Inter0.6160.7250.4770.6560.3760.2660.5960.6810.7280.7880.2920.4570.4570.540.12
MAE - Max Inter0.640.7840.5440.8020.320.110.3470.6810.7280.7880.2920.4570.4570.540.12
+ +kens are generally less effective at capturing patterns within a single variate, as evidenced by their lower Intra MI scores. In contrast, these models are more sensitive to inter-variate influences, leading to higher Avg Inter MI and Max Inter MI scores. However, despite these higher Inter MI scores, they do not significantly improve the forecasting performance. This suggests that the limited performance of point-wise transformers is primarily due to their inability to effectively capture intra-variate patterns. Additionally, these results indicate that the benchmark datasets are largely self-dependent, with variates showing minor inter-variate dependencies. + +To validate this hypothesis, we conducted experiments on synthetic datasets with varying levels of intra- and inter-variate dependencies. The results in Table 2 reveal a strong negative correlation between MAE and Intra MI scores on benchmark datasets, as well as on synthetic datasets with high autocorrelation $(\gamma = 0.95)$ and low inter-variate dependencies $(\alpha \leq 0.4)$ . In contrast, on synthetic datasets with low autocorrelation $(\gamma = 0.5)$ , the results show a positive correlation between MAE and Intra MI scores. MSE follows the same pattern as MAE, so it is omitted here for brevity. Accordingly, transformers that perform exceptionally well on benchmark datasets are less effective on synthetic datasets characterized by high inter-variate dependencies $(\alpha = 0.8)$ or low autocorrelation $(\gamma = 0.5)$ . As illustrated in Figure 5, Crossformer outperforms PatchTST, iTransformer, and TimeXer in these scenarios. These findings suggest that the performance of transformers in those benchmarks of time series forecasting is heavily influenced by the strength of intra-variate patterns. As a result, point-wise transformers are less competitive due to their limited ability to capture such patterns. + +We also observe that, despite having inter-variate attention mechanisms, iTransformer and TimeXer generally exhibit lower Inter MI scores compared to other models (Figure 4). This suggests that inter-variate patterns have a limited impact on forecasting benchmarks, offering insight into the second research question: Why do transformers with inter-variate attention often perform similarly to those with intra-variate attention? The reason is that both primarily focus on capturing intra-variate patterns. + +Furthermore, the average correlation between variates within each dataset (Avg Var Corr) is not a reliable indicator of the dependency strength between variates. This is evident in the synthetic datasets, where the correlation between variates remains close to zero and is unaffected by the dependency strength parameter $\alpha$ . This also explains why datasets with higher variate correlation do not necessarily exhibit stronger inter-variate dependencies. + +![](images/dc32b30a3529f117beec0b95b62ae632b07d310907f6d0e9a608ce6ee4287b3a.jpg) +Figure 6: Demonstration of iTransformer architecture. + +# 2. Why do transformers with basic attention mechanisms excel in time series forecasting? Which components in the basic transformer's architecture contribute most to the success in time series forecasting? + +Given the importance of intra-variate patterns in time series forecasting, we hypothesize that the key components of a transformer's architecture are those that most effectively enhance its ability to capture intra-variate dependencies. To validate this hypothesis, we conducted an ablation study on the iTransformer (Liu et al., 2023) model, which includes the vanilla transformer encoder and a variant-independent linear decoder (Figure 6). PatchTST (Nie et al., 2023) has a similar architecture to iTransformer, but its attention mechanism operates within each variate rather than across all variates, forcing it to focus entirely on capturing intra-variate patterns. In our experiments, we modified the model by removing the skip connections in the encoder layers and/or replacing the variate-independent decoder with a variate-dependent one. Specifically, for the benchmark + +Table 3: Ablation study on the iTransformer model architecture. "w/o SC" refers to the model without skip connections in the encoder layers, "VD-De" denotes the use of a variate-dependent decoder, "w/o SC & VD-De" indicates both modifications applied, and "Original" represents the unmodified iTransformer model. The results are averaged over different prediction length, best results are highlighted in red. + +
MetriciTransformerWeatherETTh1ETTh2ETTm1ETTm2ElectricityTrafficSynthetic (γ=0.95)Synthetic (γ=0.5)
α = 0α = 0.2α = 0.4α = 0.8α = 0α = 0.2α = 0.4α = 0.8
MAEw/o SC0.2950.4720.4200.4210.3400.3200.5910.4430.4360.4340.4550.7890.7890.7980.764
VD-De0.2820.4620.4170.4130.3380.2680.290.4190.4280.4300.4610.7880.7880.7950.761
w/o SC & VD-De0.2870.5020.4230.4240.3420.3630.6310.4190.4280.4300.4490.7880.7890.7990.763
Original0.2800.4520.4070.4120.3350.2660.2830.4180.4280.4300.4560.7890.7890.7970.765
MSEw/o SC0.2750.4930.3970.4260.2970.2291.0170.3150.2980.2970.3260.9690.9780.9950.918
VD-De0.2570.4730.3970.4110.2930.1730.4250.2760.2860.2910.3360.9690.9730.9870.912
w/o SC & VD-De0.2630.5360.4010.4290.2990.2831.1210.2750.2850.2900.3180.9690.9770.9950.916
Original0.260.460.3830.4090.2910.1750.4220.2740.2860.2900.3300.9700.9780.9930.921
+ +datasets, we added a 2D convolutional layer before the variate-independent linear projection in the decoder. While for the synthetic datasets, we added a flattened linear layer. These changes were introduced to enable interactions between variates in the decoder. + +The results in Table 3, show that removing skip connections notably degrades the model's performance across all benchmark datasets, with particularly significant degradation on Electricity (MAE increases from 0.266 to 0.320) and Traffic (MAE increases from 0.283 to 0.591). However, on the synthetic datasets, this degradation becomes negligible while the self-dependency becomes less (i.e. the autocorrelation $\gamma$ becomes lower, or the inter-variate dependency $\alpha$ becomes higher). This observation suggests that skip connections are crucial for capturing intravariate dependencies but may limit the model's ability to capture inter-variate patterns. On the other hand, replacing the variate-independent decoder with a variatedependent one has minor impact on performance for benchmark datasets. However, it improves performance on synthetic datasets with high inter-variate dependencies ( $\alpha = 0.8$ ) under low autocorrelation ( $\gamma = 0.5$ ). This indicates that the variate-dependent decoder enhances the model's capacity to capture inter-variate interactions, especially in scenarios with strong inter-variate dependencies. A more advanced decoder design could potentially further enhance performance on datasets with strong inter-variate dependencies, which we leave as a direction for future work. + +Additionally, we observed that applying Z-score normalization and denormalization to the model's input and output significantly improves performance on benchmark datasets. To evaluate this, we tested four models, Crossformer, PatchTST, iTransformer, and TimeXer, with and without Z-score normalization/denormalization across all datasets. Point-wise models were excluded from this test + +because the normalization is incompatible with their architecture, which will be applied along the time dimension instead of the variate dimension. As shown in Table 4, Z-score normalization has the opposite effect on synthetic datasets compared to benchmark datasets. This suggests that the benchmark datasets are largely stationary, making it unreliable to evaluate models solely based on their performance on these datasets. Such comparisons may not accurately reflect their ability to handle non-stationary data. Therefore, the use of such normalization techniques should be assessed on a case-by-case basis, depending on the specific characteristics of the dataset. + +# 5. Real-world Applications + +Our experiments revealed that the performance of transformers in time series forecasting benchmarks rely heavily on their ability to capture intra-variate patterns. We also found that current benchmark datasets are largely self-dependent and stationary, with minor inter-variate dependencies. As a result, models that excel on these datasets are less effective on synthetic datasets with strong inter-variate dependencies or low autocorrelation. + +In real-world applications, time series data often exhibit more complicated patterns with varying degrees of inter-variate dependencies and autocorrelation. To validate our findings, we examined two real-world healthcare datasets, MINDER and TIHM (Palermo et al., 2023), which contain location-activity data from PLwD (People Living with Dementia). Understanding and forecasting behavioral pattern changes in dementia patients is crucial. However, these datasets differ significantly from both benchmarking and synthetic datasets, creating challenges for state-of-the-art time series forecasting models. + +Table 5 shows the correlation between the forecasting metric MAE and mutual information scores on the MINDER + +Table 4: The effect of Z-normalization on the performance of various models across benchmark and synthetic datasets. Results are averaged over different prediction lengths, with the best results highlighted in red. The blue bold font in the "Z-Norm" column indicates the original model implementation. + +
MetricModelZ-NormWeatherETTh1ETTh2ETTm1ETTm2ElectricityTrafficSynthetic (γ = 0.95)Synthetic (γ = 0.5)
α = 0α = 0.2α = 0.4α = 0.8α = 0α = 0.2α = 0.4α = 0.8
MAECrossformerw/0.2710.4470.4240.4010.3300.2640.2880.4240.4330.4340.4520.7870.7880.7970.765
w/o0.3110.5360.9970.5460.8030.2830.2910.4190.4270.4270.4270.7790.7840.7910.749
PatchTSTw/0.2790.4470.4090.4020.3310.2970.3090.4220.4310.4330.4530.7900.7900.7970.772
w/o0.30.4830.5200.4340.4050.2990.3160.4170.4240.4250.4280.7830.7850.7910.756
iTransformerw/0.280.4520.4070.4120.3350.2660.2820.4180.4280.4300.4560.7890.7890.7970.765
w/o0.2990.4950.6680.4570.5730.2820.3150.4140.4230.4230.4290.7810.7840.7920.751
TimeXerw/0.2720.4480.4040.3980.3230.2690.2880.4210.4310.4330.4550.7880.7880.7960.764
w/o0.3110.4930.8910.4730.7150.2860.3260.4160.4250.4260.4290.7800.7830.7890.750
MSECrossformerw/0.2410.4560.4070.3940.2860.1710.4710.2810.2920.2960.3210.9660.9760.9920.922
w/o0.2560.5721.7420.5711.7150.1890.5660.2750.2850.2880.2880.9460.9610.9770.883
PatchTSTw/0.2560.4530.3860.3880.2860.2080.4820.2800.2910.2940.3220.9730.9810.9920.940
w/o0.2460.4890.6000.4230.3790.2040.5950.2730.2810.2840.2890.9530.9670.9780.899
iTransformerw/0.2600.4600.3830.4090.2910.1750.4220.2740.2860.2900.3300.9700.9780.9930.921
w/o0.2500.5080.8420.4500.6530.1820.5710.2680.2790.2820.2920.9500.9640.9780.888
TimeXerw/0.2420.4550.3790.3840.2760.1700.4700.2790.2910.2950.3270.9680.9750.9890.921
w/o0.2570.4961.5550.4671.1560.1870.6040.2720.2820.2850.2910.9480.9610.9720.885
+ +Table 5: Correlation between MAE and mutual information scores on real-world health care datasets. + +
Avg Var CorrMAE - IntraMAE - Avg InterMAE - Max Inter
MINDER0.185-0.3580.8820.873
TIHM0.321-0.703-0.11-0.05
+ +Table 6: Forecasting performance of iTransformer variants on TIHM and MINDER datasets. + +
MAEMSE
iTransformerOriginalVD-DeOriginalVD-De
TIHM0.6230.6100.8350.807
MINDER0.4190.4310.7210.726
+ +and TIHM datasets across all selected models. Despite the two datasets having similar variates, their properties differ significantly, likely because the data was collected from different participants. Based on these correlations, we hypothesized that models with a stronger capacity for capturing inter-variate dependencies would perform better on the TIHM dataset. The results in Table 6 support this hypothesis, showing that incorporating a variate-dependent decoder enhances the iTransformer model's performance on the THIM dataset but negatively impacts its performance on the MINDER dataset. These findings suggest that a single, universal model architecture may not be suitable for all datasets or applications, as different datasets exhibit distinct dependency structures and require tailored modeling + +approaches. + +Moreover, the results in Table 7 show that Z-normalization has opposing effects on MAE and MSE for the TIHM dataset, with MSE deteriorating while MAE improving. This effect likely arises because normalization alters the scale and distribution of the input data, which may disrupt the model's ability to capture larger errors while making it more effective in reducing absolute errors. These findings highlight the importance of carefully selecting evaluation metrics based on application requirements, as different metrics may prioritize different aspects of forecasting performance, leading to varying interpretations of model effectiveness. + +Table 7: Z-normalization shows opposing effects on MAE and MSE for TIHM dataset. + +
ModelCrossformerPatchTSTiTransformerTimeXer
Z-Normw/w/ow/w/ow/w/ow/w/o
TIHMMAE0.7390.7480.6120.6140.6220.6340.610.614
MSE1.0381.0110.8290.820.8350.8340.8170.8
+ +Future research should explore adaptive evaluation techniques and dynamic modeling of intra- and inter-variate dependencies. Expanding benchmarks with diverse, nonstationary datasets will further enhance model generalizability in real-world applications. + +# Acknowledgements + +This research is supported by the UK Dementia Research Institute [award number UK DRI-7002] through UK DRI Ltd, principally funded by the Medical Research Council (MRC), and the UKRI Engineering and Physical Sciences Research Council (EPSRC) PROTECT Project (grant number: EP/W031892/1). Infrastructure support for this research was provided by the NIHR Imperial Biomedical Research Centre (BRC) and the UKRI Medical Research Council (MRC). P.B. is also funded by the Great Ormond Street Hospital and the Royal Academy of Engineering (grant number: RCSRF2324-18-69). We would also like to thank our reviewers for their valuable comments and suggestions, which helped improve the quality and clarity of this manuscript. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are several potential societal benefits of our work and potential risks which are mitigated in our clinical study, none which we feel must be specifically highlighted here. + +# References + +Box, G. E. and Pierce, D. A. Distribution of residual autocorrelations in autoregressive-integrated moving average time series models. Journal of the American statistical Association, 65(332):1509-1526, 1970. +Box, G. E., Jenkins, G. M., Reinsel, G. C., and Ljung, G. M. Time series analysis: forecasting and control. John Wiley & Sons, 2015. +Cover, T. M. Elements of information theory. John Wiley & Sons, 1999. +Hochreiter, S. and Schmidhuber, J. LSTM can solve hard long time lag problems. Advances in neural information processing systems, 9, 1996. +Kim, T., Kim, J., Tae, Y., Park, C., Choi, J.-H., and Choo, J. Reversible instance normalization for accurate time-series forecasting against distribution shift. In International conference on learning representations, 2021. +Kitaev, N., Kaiser, L., and Levskaya, A. Reformer: The efficient transformer. In International Conference on Learning Representations, 2020. +Lim, B., Arik, S. Ö., Loeff, N., and Pfister, T. Temporal fusion transformers for interpretable multi-horizon time series forecasting. International Journal of Forecasting, 37(4):1748-1764, 2021. + +Liu, S., Yu, H., Liao, C., Li, J., Lin, W., Liu, A. X., and Dustdar, S. Pyraformer: Low-complexity pyramidal attention for long-range time series modeling and forecasting. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=0EXmFzUn5I. +Liu, Y., Hu, T., Zhang, H., Wu, H., Wang, S., Ma, L., and Long, M. Inverter transformers are effective for time series forecasting. arXiv preprint arXiv:2310.06625, 2023. +Nie, Y., Nguyen, N. H., Sinthong, P., and Kalagnanam, J. A time series is worth 64 words: Long-term forecasting with transformers. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=Jbdc0vT0col. +Palermo, F., Chen, Y., Capstick, A., Fletcher-Loyd, N., Walsh, C., Kouchaki, S., True, J., Balazikova, O., Soreq, E., Scott, G., et al. Tihm: An open dataset for remote healthcare monitoring in dementia. Scientific data, 10 (1):606, 2023. +Qiu, X., Hu, J., Zhou, L., Wu, X., Du, J., Zhang, B., Guo, C., Zhou, A., Jensen, C. S., Sheng, Z., et al. Tfb: Towards comprehensive and fair benchmarking of time series forecasting methods. arXiv preprint arXiv:2403.20150, 2024. +Rangapuram, S. S., Seeger, M. W., Gasthaus, J., Stella, L., Wang, Y., and Januschowski, T. Deep state space models for time series forecasting. Advances in neural information processing systems, 31, 2018. +Salinas, D., Flunkert, V., Gasthaus, J., and Januschowski, T. Deepar: Probabilistic forecasting with autoregressive recurrent networks. International journal of forecasting, 36(3):1181-1191, 2020. +Tan, M., Merrill, M. A., Gupta, V., Althoff, T., and Hartvigsen, T. Are language models actually useful for time series forecasting? In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L. u., and Polosukhin, I. Attention is all you need. In Guyon, I., Luxburg, U. V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017. URL https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf. + +Wang, S., Wu, H., Shi, X., Hu, T., Luo, H., Ma, L., Zhang, J. Y., and Zhou, J. Timemixer: Decomposable multiscale mixing for time series forecasting. arXiv preprint arXiv:2405.14616, 2024a. +Wang, Y., Wu, H., Dong, J., Liu, Y., Long, M., and Wang, J. Deep time series models: A comprehensive survey and benchmark. arXiv preprint arXiv:2407.13278, 2024b. +Wu, H., Xu, J., Wang, J., and Long, M. Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting. Advances in neural information processing systems, 34:22419-22430, 2021. +Zeng, A., Chen, M., Zhang, L., and Xu, Q. Are transformers effective for time series forecasting? In Proceedings of the AAAI conference on artificial intelligence, volume 37, pp. 11121-11128, 2023. +Zhang, Y. and Yan, J. Crossformer: Transformer utilizing cross-dimension dependency for multivariate time series forecasting. In The eleventh international conference on learning representations, 2023. +Zhao, L. and Shen, Y. Rethinking channel dependence for multivariate time series forecasting: Learning from leading indicators. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=JiTVtCUOpS. +Zhou, H., Zhang, S., Peng, J., Zhang, S., Li, J., Xiong, H., and Zhang, W. Informer: Beyond efficient transformer for long sequence time-series forecasting. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pp. 11106-11115, 2021. +Zhou, T., Ma, Z., Wen, Q., Wang, X., Sun, L., and Jin, R. Fedformer: Frequency enhanced decomposed transformer for long-term series forecasting. In International conference on machine learning, pp. 27268-27286. PMLR, 2022. + +# A. Appendix + +# A.1. Details of the datasets + +We provide key attributes of all datasets employed in this study in Table 1. The datasets include seven benchmark datasets (ETTh1, ETTh2, ETTm1, ETTm2, Weather, Traffic, and Electricity), eight synthetic dataset, and two real-world healthcare datasets (TIHM and MINDER). The benchmark datasets are publicly available on GitHub (https://github.com/thuml/ Time-Series-Library/tree/main). The healthcare dataset TIHM is available on Zenodo (https:// + +doi.org/10.5281/zenodo.7622128). The MIN-DER dataset is not publicly available due to privacy protocols and has a format and variates similar to those of the TIHM dataset. + +# A.1.1. REAL-WORLD HEALTHCARE DATASETS + +TIMH dataset The TIHM dataset consists of five interconnected tables, Activity, Sleep, Physiology, Labels, and Demographics, capturing various aspects of remote healthcare monitoring. Each table includes timestamps and participant UUIDs for cross-referencing and synchronization. The dataset includes 56 participants, all over 50 years old with a verified diagnosis of dementia or mild cognitive impairment, who provided informed consent. Each participant had a caregiver or study partner, and individuals with severe psychiatric conditions or terminal illnesses were excluded. The study recorded an average of 50 days of data per participant. + +For this study, we selected the participant with the longest recording, spanning three months from April 1, 2019, to June 30, 2019. We focused on the Activity table, which tracks in-home movement using motion and door sensors. Specifically, the dataset used in this study includes activity records from eight locations: back door, bathroom, bedroom, fridge door, front door, hallway, kitchen, and lounge. The data was aggregated on an hourly basis by summing the activity counts for each location. + +MINDER dataset The MINDER dataset, an ongoing project, collects in-home data from 117 participants over the age of 50, all with a clinical diagnosis of dementia or mild cognitive impairment (MCI). Each participant had received either past or ongoing psychiatric treatment. For this study, we selected the participant with the longest recording, spanning two years from December 1, 2022, to November 30, 2024. The MINDER dataset is similar in format to TIHM, and we also focused exclusively on the Activity table. Specifically, the dataset for this work includes activity records from eight locations: WC, bathroom, bedroom, hallway, front door, kitchen, and lounge. + +# A.2. Full results of all selected models on benchmark datasets and synthetic datasets + +Figure 1 shows evaluations of all selected models on all benchmark datasets using MAE, Intra MI, Avg Inter MI, and Max Inter MI scores. + +Table 2 shows evaluations of variants of iTransformer model on all benchmark datasets using MAE, Intra MI, Avg Inter MI, and Max Inter MI scores. Table 3 gives the same evaluation on synthetic datasets. Tables 4 to 7 provide MAE and MSE of selected models on benchmark and synthetic datasets for the Z-normalization ablation study. + +Table 1: Key attributes of the datasets: Dim represents the number of variates, Dataset Size indicates the total time points across (Train, Validation, Test) splits, Prediction Length specifies the number of future time points to predict (with four settings per dataset), and Frequency denotes the sampling interval of the time points. + +
DatasetDimPrediction LengthDataset SizeFrequencyInformation
ETTh1, ETTh27{96, 192, 336, 720}(8545, 2881, 2881)HourlyElectricity
ETTm1, ETTm27{96, 192, 336, 720}(34465, 11521, 11521)15 minElectricity
Weather21{96, 192, 336, 720}(36792, 5271, 10540)10 minWeather
Traffic862{96, 192, 336, 720}(12185, 1757, 3509)HourlyTransportation
ECL321{96, 192, 336, 720}(18317, 2633, 5261)HourlyElectricity
Synthetic (8 subsets)2{96, 192, 336, 720}(6132, 876, 1752)HourlySynthetic
TIHM8{48, 96, 192}(1496, 427, 213)HourlyHealthcare
MINDER8{48, 96, 192}(12281, 3508, 1754)HourlyHealthcare
+ +Table 2: Results of variants of iTransformer model on benchmark datasets. "w/o SC" refers to the model without skip connections in the encoder layers, "VD-De" denotes the use of a variate-dependent decoder, "w/o SC & VD-De" indicates both modifications applied, and "Original" represents the unmodified Transformer model. + +
DatasetPred lengthMAEMSE
w/o SCVD-Dew/o SC & VD-DeOriginalw/o SCVD-Dew/o SC & VD-DeOriginal
Weather960.235 ± 0.0010.218 ± 0.00.226 ± 0.0020.214 ± 0.0010.193 ± 0.0010.174 ± 0.00.181 ± 0.0010.175 ± 0.001
1920.277 ± 0.0010.259 ± 0.0010.265 ± 0.0030.257 ± 0.0010.245 ± 0.0010.222 ± 0.0010.229 ± 0.0030.224 ± 0.001
3360.311 ± 0.0010.3 ± 0.0010.303 ± 0.00.299 ± 0.0010.294 ± 0.0010.278 ± 0.0010.283 ± 0.0010.281 ± 0.001
7200.357 ± 0.0010.351 ± 0.0020.352 ± 0.0010.35 ± 0.00.369 ± 0.0010.355 ± 0.0010.358 ± 0.0020.36 ± 0.001
ETTh1960.433 ± 0.00.427 ± 0.0040.467 ± 0.0150.409 ± 0.00.429 ± 0.0010.412 ± 0.0060.478 ± 0.0250.394 ± 0.001
1920.461 ± 0.0010.453 ± 0.0020.493 ± 0.0140.44 ± 0.0010.481 ± 0.0020.461 ± 0.0030.528 ± 0.0270.447 ± 0.001
3360.482 ± 0.0010.471 ± 0.0030.513 ± 0.0090.464 ± 0.0010.524 ± 0.0010.5 ± 0.0030.565 ± 0.0140.49 ± 0.001
7200.51 ± 0.0020.499 ± 0.0020.536 ± 0.0020.497 ± 0.0010.539 ± 0.0050.52 ± 0.0040.575 ± 0.0050.511 ± 0.002
ETTh2960.366 ± 0.0010.361 ± 0.0030.371 ± 0.0020.35 ± 0.0010.317 ± 0.0010.312 ± 0.0050.321 ± 0.0030.3 ± 0.001
1920.412 ± 0.0010.410 ± 0.0020.416 ± 0.0020.399 ± 0.00.397 ± 0.0010.396 ± 0.0030.401 ± 0.0030.379 ± 0.0
3360.445 ± 0.0020.444 ± 0.0030.447 ± 0.0020.433 ± 0.0010.437 ± 0.0030.441 ± 0.0060.44 ± 0.0040.423 ± 0.002
7200.455 ± 0.0010.452 ± 0.0020.457 ± 0.0020.447 ± 0.0010.438 ± 0.0010.437 ± 0.0040.441 ± 0.0040.43 ± 0.003
ETTm1960.392 ± 0.0060.379 ± 0.0010.391 ± 0.0020.378 ± 0.0010.37 ± 0.0080.345 ± 0.0010.365 ± 0.0040.345 ± 0.003
1920.406 ± 0.0090.397 ± 0.0010.409 ± 0.0030.395 ± 0.00.402 ± 0.0120.384 ± 0.0010.402 ± 0.0050.383 ± 0.001
3360.426 ± 0.0040.42 ± 0.00.43 ± 0.0010.418 ± 0.00.434 ± 0.0050.424 ± 0.00.439 ± 0.0040.418 ± 0.002
7200.46 ± 0.0050.457 ± 0.0010.467 ± 0.0030.457 ± 0.0020.497 ± 0.0070.492 ± 0.0040.509 ± 0.0060.49 ± 0.003
ETTm2960.279 ± 0.0020.275 ± 0.00.282 ± 0.0010.271 ± 0.00.193 ± 0.0010.188 ± 0.0010.196 ± 0.0020.185 ± 0.001
1920.317 ± 0.0020.315 ± 0.0010.318 ± 0.0010.311 ± 0.0010.256 ± 0.0010.253 ± 0.0020.258 ± 0.0010.25 ± 0.001
3360.356 ± 0.0030.353 ± 0.0020.356 ± 0.0010.352 ± 0.0010.32 ± 0.0050.316 ± 0.0020.321 ± 0.0020.316 ± 0.001
7200.410 ± 0.0010.408 ± 0.0020.41 ± 0.0020.406 ± 0.0010.418 ± 0.0010.415 ± 0.0030.42 ± 0.0020.412 ± 0.002
Electricity960.287 ± 0.0040.240 ± 0.00.35 ± 0.00.24 ± 0.00.189 ± 0.0050.144 ± 0.00.269 ± 0.00.148 ± 0.0
1920.306 ± 0.0040.259 ± 0.00.454 ± 0.0010.256 ± 0.00.211 ± 0.0050.165 ± 0.00.271 ± 0.0010.165 ± 0.0
3360.325 ± 0.0030.274 ± 0.0030.362 ± 0.0010.27 ± 0.0010.232 ± 0.0040.177 ± 0.0020.280 ± 0.0010.178 ± 0.001
7200.360 ± 0.0060.3 ± 0.0010.384 ± 0.0020.299 ± 0.0010.283 ± 0.010.206 ± 0.0010.311 ± 0.0020.21 ± 0.001
Traffic960.663 ± 0.0050.276 ± 0.0010.799 ± 0.0050.268 ± 0.01.123 ± 0.0160.396 ± 0.0011.406 ± 0.0020.392 ± 0.001
1920.559 ± 0.0040.284 ± 0.0010.567 ± 0.0060.278 ± 0.0010.945 ± 0.0080.415 ± 0.0021.016 ± 0.0040.413 ± 0.002
3360.572 ± 0.0060.291 ± 0.0020.581 ± 0.0030.284 ± 0.01.004 ± 0.010.427 ± 0.0011.029 ± 0.0010.426 ± 0.0
7200.569 ± 0.0080.307 ± 0.0010.571 ± 0.0040.3 ± 0.0010.996 ± 0.0070.461 ± 0.0011.03 ± 0.0010.458 ± 0.001
+ +![](images/d4b1faa9daba90f48da8fbb81f694fceae3529e60765c0ac6a9e934d0bb46a06.jpg) + +![](images/46c4eb72def09fe0ef65496b989c3112c04e031b23dee18798391097faa20b00.jpg) + +![](images/c55176c60ad1824c4b5a23faed948fd7ba8738b83573f5b239ce302ce1e6c6b4.jpg) + +![](images/75e9d1c1db927c413af35c4d94b4ec760354c9ae3457de53fe6af48a298085a3.jpg) + +![](images/04856a548cb17e1d36b211badf3c13ae1f21c2120dbbce4c6c7350c44116d61f.jpg) + +![](images/1da8a560d361e950f9b9ff5557c2c4ff0643fe784579f34a413932f0304fbe51.jpg) + +![](images/79219be5ec65af9781776f665612f7e3ab22ed65977e857c1743acb55cc27652.jpg) + +![](images/c27c7f97e1c349507841aacb0ec11964e8a79006c479251b133c063b74a8539d.jpg) + +![](images/17b1ea4724e2d73e4b4bdd672edec0310e6ef3f099fda638ff6991520906ad0f.jpg) + +![](images/94bf4abe27d2ab3bd80bbd60177cf0c683b2170a3fce20efcfdff84fbcfe6419.jpg) + +![](images/54246e8f557e5add1ca0a441ba802a63137835b9138ad2c52098986f709ff357.jpg) + +![](images/8f12957ef5f0d30890483fb2b73c9a3d9d1e13da15f3f0710df60f6a99648bb4.jpg) + +![](images/919b4d2820a11be524bbe76b4af7623eed5be3c82de6cef47138f6f954011805.jpg) + +![](images/d2b49e67a11a22e54a188863fab027d4fc29ac6d3bf263e004547931a0b0b966.jpg) + +![](images/616c01207ab5404616bac1d82bcf8266b0cfda863ed75da1c240973a0cb57e8b.jpg) + +![](images/202d6389d001892b39dc30dbd9ef94e30b576bcf2ee4c89a20b3e20481a952f1.jpg) + +![](images/c9fa31914f086ce4eb76086be3051d0179c9f7bae27cf0b0cd38f1c378fca4d2.jpg) + +![](images/c087c4f5b2ceeeac9dfb7a870c78c368b8b8b56ce58ab422046dcd18b51ddd98.jpg) + +![](images/5748515dfcf80b4014f3da039b4c707d9a8ec5d35fd4250fc4a4d980bacd2c17.jpg) + +![](images/8b8f99e430cf58f2a151368e3fad94d0feb1e613ff268c522925f888db774fd1.jpg) + +![](images/a44b7fe81163311bc4f4367b3b897ba53fd999addf42e60f68ba2ff618d41c76.jpg) + +![](images/34724101e1965b114ed9919adf366022bf22caa737bd2893531b52dce595a21f.jpg) + +![](images/96f9b6114e10d97f7bf2c362bfd4dfa071e80a8fa12a0690fe8acfd02da140c5.jpg) + +![](images/b6e2dddc23ee1c55312fd1cf96d1995b06270b2e1c45af54422dcce68a38ab2a.jpg) + +![](images/eba7fe5a00da58cde8e5a17d93663c51a65e2dde1ca31ce9b3fa5bbbd1789230.jpg) + +![](images/609c2419b0fc07edc933543950c5f063f429e7fad94645fc6f13f8c8101543c2.jpg) + +![](images/f83a3e2242c2ca6d3821ec1bf05b4eeff3c67c59028980cbdcf1a6fd7d1c84b7.jpg) + +![](images/5b3bfbf9509f48eb560f651a27db72e30f35a721f22987a956c4b8e02d049f96.jpg) + +![](images/ff69c3f7d497cd9260c60aace4296de5aafd77c12eab3cd098d0cb977fd227f7.jpg) +Figure 1: Performance comparison of selected transformer-based models on commonly used benchmark datasets. + +Table 3: Results of variants of iTransformer model on synthetic datasets. "w/o SC" refers to the model without skip connections in the encoder layers, "VD-De" denotes the use of a variate-dependent decoder, "w/o SC & VD-De" indicates both modifications applied, and "Original" represents the unmodified Transformer model. + +
DatasetPred lengthMAEMSE
w/o SCVD-Dew/o SC & VD-DeOriginalw/o SCVD-Dew/o SC & VD-DeOriginal
Synthetic γ = 0.95 α = 0960.509 ± 0.0710.422 ± 0.00.42 ± 0.00.42 ± 0.00.426 ± 0.120.28 ± 0.00.278 ± 0.00.277 ± 0.0
1920.421 ± 0.0010.419 ± 0.00.419 ± 0.00.418 ± 0.00.279 ± 0.0010.277 ± 0.00.275 ± 0.00.275 ± 0.0
3360.420 ± 0.00.418 ± 0.00.418 ± 0.00.417 ± 0.00.277 ± 0.00.274 ± 0.00.274 ± 0.00.273 ± 0.001
7200.421 ± 0.00.418 ± 0.00.419 ± 0.00.418 ± 0.00.277 ± 0.00.273 ± 0.00.273 ± 0.00.272 ± 0.001
Synthetic γ = 0.95 α = 0.2960.452 ± 0.0020.43 ± 0.0040.429 ± 0.00.43 ± 0.00.322 ± 0.0040.289 ± 0.00.287 ± 0.00.288 ± 0.0
1920.431 ± 0.00.426 ± 0.00.426 ± 0.00.426 ± 0.00.289 ± 0.00.283 ± 0.00.283 ± 0.00.283 ± 0.001
3360.43 ± 0.00.426 ± 0.00.426 ± 0.00.426 ± 0.0010.29 ± 0.00.284 ± 0.00.284 ± 0.00.284 ± 0.001
7200.432 ± 0.00.428 ± 0.00.429 ± 0.00.429 ± 0.00.292 ± 0.00.287 ± 0.00.287 ± 0.00.287 ± 0.0
Synthetic γ = 0.95 α = 0.4960.436 ± 0.0010.432 ± 0.0010.431 ± 0.00.43 ± 0.00.299 ± 0.0010.292 ± 0.0010.29 ± 0.00.29 ± 0.001
1920.435 ± 0.00.432 ± 0.00.429 ± 0.00.43 ± 0.0010.296 ± 0.00.292 ± 0.00.289 ± 0.00.29 ± 0.001
3360.432 ± 0.00.427 ± 0.00.428 ± 0.00.428 ± 0.0010.295 ± 0.00.287 ± 0.00.289 ± 0.00.289 ± 0.001
7200.435 ± 0.0010.429 ± 0.00.432 ± 0.00.43 ± 0.00.299 ± 0.0010.29 ± 0.00.293 ± 0.00.292 ± 0.0
Synthetic γ = 0.95 α = 0.8960.444 ± 0.0010.447 ± 0.0020.435 ± 0.00.448 ± 0.0010.308 ± 0.0010.312 ± 0.0030.297 ± 0.00.317 ± 0.002
1920.451 ± 0.00.456 ± 0.0020.445 ± 0.00.452 ± 0.0010.322 ± 0.0010.33 ± 0.0030.314 ± 0.00.325 ± 0.002
3360.454 ± 0.0010.462 ± 0.0050.45 ± 0.0010.455 ± 0.0030.326 ± 0.0010.337 ± 0.0080.319 ± 0.0010.328 ± 0.004
7200.469 ± 0.0010.48 ± 0.0020.466 ± 0.0010.469 ± 0.0020.348 ± 0.0010.366 ± 0.0040.343 ± 0.0010.348 ± 0.003
Synthetic γ = 0.5 α = 0960.791 ± 0.00.789 ± 0.0010.79 ± 0.00.792 ± 0.00.975 ± 0.00.972 ± 0.0010.973 ± 0.00.977 ± 0.0
1920.79 ± 0.0010.79 ± 0.00.79 ± 0.00.79 ± 0.00.973 ± 0.00.974 ± 0.0010.973 ± 0.00.973 ± 0.0
3360.788 ± 0.0010.788 ± 0.0010.788 ± 0.00.788 ± 0.00.968 ± 0.00.968 ± 0.0010.968 ± 0.00.967 ± 0.0
7200.786 ± 0.00.784 ± 0.0010.785 ± 0.00.786 ± 0.0010.963 ± 0.0010.96 ± 0.0010.961 ± 0.00.964 ± 0.001
Synthetic γ = 0.5 α = 0.2960.786 ± 0.00.786 ± 0.00.787 ± 0.00.787 ± 0.00.975 ± 0.00.972 ± 0.0010.975 ± 0.00.976 ± 0.0
1920.788 ± 0.00.787 ± 0.00.788 ± 0.00.788 ± 0.00.977 ± 0.00.971 ± 0.00.977 ± 0.00.977 ± 0.0
3360.789 ± 0.00.788 ± 0.00.789 ± 0.00.789 ± 0.0010.977 ± 0.00.972 ± 0.0010.977 ± 0.00.977 ± 0.001
7200.791 ± 0.0010.791 ± 0.0010.791 ± 0.00.791 ± 0.00.981 ± 0.0020.979 ± 0.0020.981 ± 0.00.981 ± 0.0
Synthetic γ = 0.5 α = 0.4960.802 ± 0.00.798 ± 0.0010.802 ± 0.00.8 ± 0.01.003 ± 0.0010.994 ± 0.0031.004 ± 0.00.999 ± 0.001
1920.799 ± 0.00.794 ± 0.00.799 ± 0.00.798 ± 0.00.999 ± 0.0010.986 ± 0.0010.998 ± 0.00.996 ± 0.0
3360.798 ± 0.00.795 ± 0.0010.798 ± 0.00.797 ± 0.00.994 ± 0.00.986 ± 0.0020.994 ± 0.00.993 ± 0.0
7200.795 ± 0.0010.794 ± 0.0010.795 ± 0.00.795 ± 0.00.986 ± 0.0010.984 ± 0.0010.985 ± 0.00.985 ± 0.0
Synthetic γ = 0.5 α = 0.8960.761 ± 0.00.757 ± 0.0010.76 ± 0.0010.761 ± 0.00.91 ± 0.0010.9 ± 0.0010.908 ± 0.0030.911 ± 0.001
1920.758 ± 0.00.755 ± 0.0010.757 ± 0.0010.759 ± 0.0010.905 ± 0.0010.898 ± 0.0010.904 ± 0.0020.907 ± 0.0
3360.765 ± 0.0010.762 ± 0.0010.763 ± 0.0010.766 ± 0.0010.921 ± 0.0030.915 ± 0.0020.918 ± 0.0020.925 ± 0.004
7200.771 ± 0.0010.771 ± 0.0030.771 ± 0.0010.772 ± 0.0010.936 ± 0.0030.935 ± 0.0070.936 ± 0.0020.939 ± 0.002
+ +Table 4: The effect of Z-normalization on MAE of various models across benchmark datasets. + +
MetricModelZ-NormPred lengthWeatherETTh1ETTh2ETTm1ETTm2ElectricityTraffic
MAECrossformerw/960.201 ± 0.0020.403 ± 0.0020.361 ± 0.0030.357 ± 0.0010.256 ± 0.00.232 ± 0.0020.262 ± 0.006
1920.247 ± 0.0010.432 ± 0.0030.409 ± 0.0040.385 ± 0.0010.308 ± 0.0030.251 ± 0.00.273 ± 0.003
3360.292 ± 0.0010.45 ± 0.0030.459 ± 0.0110.410 ± 0.0030.349 ± 0.0030.269 ± 0.0020.294 ± 0.003
7200.345 ± 0.0020.502 ± 0.0070.467 ± 0.0020.452 ± 0.0010.408 ± 0.0010.303 ± 0.0050.321 ± 0.009
w/o960.226 ± 0.010.423 ± 0.0120.592 ± 0.0480.409 ± 0.0240.392 ± 0.030.248 ± 0.0010.27 ± 0.008
1920.277 ± 0.0070.459 ± 0.0220.897 ± 0.2030.505 ± 0.0460.575 ± 0.0240.269 ± 0.0110.284 ± 0.004
3360.328 ± 0.0060.568 ± 0.0471.04 ± 0.1140.609 ± 0.0250.766 ± 0.2260.289 ± 0.0070.299 ± 0.005
7200.412 ± 0.0130.695 ± 0.0061.458 ± 0.2160.66 ± 0.0481.481 ± 0.0650.327 ± 0.0030.311 ± 0.01
PatchTSTw/960.215 ± 0.0010.399 ± 0.00.345 ± 0.0040.368 ± 0.0070.261 ± 0.0010.276 ± 0.0010.298 ± 0.0
1920.257 ± 0.00.431 ± 0.0010.399 ± 0.0020.387 ± 0.0040.307 ± 0.0030.283 ± 0.00.303 ± 0.001
3360.297 ± 0.00.460 ± 0.0040.438 ± 0.0040.409 ± 0.0010.349 ± 0.0010.298 ± 0.0010.308 ± 0.001
7200.346 ± 0.00.5 ± 0.0020.456 ± 0.0030.443 ± 0.0010.405 ± 0.0040.331 ± 0.00.326 ± 0.001
w/o960.234 ± 0.0020.417 ± 0.0030.392 ± 0.0340.399 ± 0.0040.305 ± 0.0050.28 ± 0.0010.306 ± 0.001
1920.273 ± 0.0030.451 ± 0.0120.472 ± 0.0120.417 ± 0.0040.391 ± 0.0560.286 ± 0.0010.308 ± 0.0
3360.316 ± 0.0090.498 ± 0.0090.52 ± 0.0190.443 ± 0.0070.424 ± 0.0120.3 ± 0.0010.315 ± 0.001
7200.378 ± 0.0130.569 ± 0.0150.698 ± 0.0320.478 ± 0.0030.5 ± 0.0080.332 ± 0.0010.334 ± 0.001
iTransformerw960.214 ± 0.0010.409 ± 0.00.35 ± 0.0010.378 ± 0.0010.271 ± 0.00.24 ± 0.00.268 ± 0.0
1920.257 ± 0010.440 ± 0.0010.399 ± 0.00.395 ± 0.00.311 ± 0.0010.256 ± 0.00.278 ± 0.001
3360.299 ± 0.0010.464 ± 0.0010.433 ± 0.0010.418 ± 0.00.352 ± 0.0010.27 ± 0.0010.284 ± 0.0
7200.35 ± 0.00.497 ± 0.0010.447 ± 0.0010.457 ± 0.0020.406 ± 0.0010.299 ± 0.0010.3 ± 0.001
w/o960.226 ± 0.0010.433 ± 0.0020.492 ± 0.0220.409 ± 0.0040.331 ± 0.0110.252 ± 0.0010.306 ± 0.002
1920.279 ± 0.010.469 ± 0.0010.664 ± 0.0360.437 ± 0.0040.461 ± 0.0310.266 ± 0.0010.305 ± 0.004
3360.32 ± 0.0020.512 ± 0.0040.713 ± 0.0390.471 ± 0.0070.613 ± 0.0560.288 ± 0.00.315 ± 0.008
7200.37 ± 0.0040.565 ± 0.0030.801 ± 0.0270.509 ± 0.0090.886 ± 0.0410.322 ± 0.0060.334 ± 0.005
TimeXerw/960.206 ± 0.00.404 ± 0.0010.34 ± 0.0020.36 ± 0.0020.255 ± 0.0010.243 ± 0.0020.274 ± 0.001
1920.249 ± 0.0010.439 ± 0.0020.394 ± 0.0060.385 ± 0.0010.301 ± 0.00.256 ± 0.0010.283 ± 0.0
3360.291 ± 0.0010.462 ± 0.010.433 ± 0.0050.407 ± 0.00.34 ± 0.0030.274 ± 0.0020.289 ± 0.001
7200.343 ± 0.0010.487 ± 0.0180.447 ± 0.0030.441 ± 0.0010.397 ± 0.0020.303 ± 0.0050.308 ± 0.001
w/o960.232 ± 0.0020.438 ± 0.0050.756 ± 0.0780.420 ± 0.0030.412 ± 0.0130.252 ± 0.0020.32 ± 0.003
1920.277 ± 0.0020.479 ± 0.0190.864 ± 0.0270.445 ± 0.0090.548 ± 0.0660.27 ± 0.0030.321 ± 0.003
3360.334 ± 0.0070.489 ± 0.0090.906 ± 0.0160.499 ± 0.0110.683 ± 0.0820.293 ± 0.0010.322 ± 0.002
7200.399 ± 0.0020.569 ± 0.0071.036 ± 0.0540.528 ± 0.0121.219 ± 0.0670.33 ± 0.0040.343 ± 0.004
+ +Table 5: The effect of Z-normalization on MSE of various models across benchmark datasets. + +
MetricModelZ-NormPred lengthWeatherETTh1ETTh2ETTm1ETTm2ElectricityTraffic
MSECrossformerw/960.154 ± 0.0030.391 ± 0.0020.315 ± 0.0060.317 ± 0.0010.171 ± 0.0010.137 ± 0.0020.421 ± 0.004
1920.203 ± 0.0010.44 ± 0.0010.396 ± 0.0060.367 ± 0.00.248 ± 0.0020.158 ± 0.0010.44 ± 0.006
3360.265 ± 0.0020.472 ± 0.0020.456 ± 0.0140.410 ± 0.0060.312 ± 0.0050.175 ± 0.0020.477 ± 0.007
7200.343 ± 0.0030.519 ± 0.0090.46 ± 0.0030.482 ± 0.0050.413 ± 0.0020.214 ± 0.0060.546 ± 0.011
w/o960.151 ± 0.0050.398 ± 0.0090.715 ± 0.1320.373 ± 0.0250.328 ± 0.0630.147 ± 0.0010.522 ± 0.021
1920.203 ± 0.0020.454 ± 0.021.435 ± 0.4140.486 ± 0.0630.655 ± 0.0710.169 ± 0.0070.55 ± 0.009
3360.262 ± 0.0050.621 ± 0.0771.82 ± 0.3440.677 ± 0.0451.203 ± 0.6650.197 ± 0.0090.588 ± 0.027
7200.407 ± 0.0270.815 ± 0.0232.996 ± 0.7580.747 ± 0.0864.675 ± 0.4970.241 ± 0.0030.604 ± 0.007
PatchTSTw/960.173 ± 0.0010.380 ± 0.0010.292 ± 0.0050.329 ± 0.0120.178 ± 0.0010.184 ± 0.00.459 ± 0.001
1920.221 ± 0.0010.431 ± 0.0020.382 ± 0.0070.366 ± 0.0050.246 ± 0.0020.191 ± 0.00.468 ± 0.001
3360.276 ± 0.00.482 ± 0.0130.428 ± 0.0050.397 ± 0.0010.311 ± 0.0010.207 ± 0.00.483 ± 0.001
7200.353 ± 0.00.519 ± 0.0020.442 ± 0.0060.457 ± 0.0010.41 ± 0.0070.249 ± 0.0010.517 ± 0.002
w/o960.169 ± 0.0010.396 ± 0.0040.364 ± 0.0520.369 ± 0.0020.215 ± 0.010.184 ± 0.0010.569 ± 0.001
1920.21 ± 0.0010.446 ± 0.010.488 ± 0.0160.399 ± 0.0050.344 ± 0.0720.19 ± 0.0010.581 ± 0.0
3360.262 ± 0.0050.51 ± 0.0040.574 ± 0.0450.435 ± 0.0090.412 ± 0.0230.203 ± 0.0010.597 ± 0.001
7200.342 ± 0.010.6 ± 0.0230.972 ± 0.1040.489 ± 0.0040.545 ± 0.0210.241 ± 0.0010.632 ± 0.001
iTransformerw/960.175 ± 0.0010.394 ± 0.0010.3 ± 0.0010.345 ± 0.0030.185 ± 0.0010.148 ± 0.00.43 ± 0.003
1920.224 ± 0.0010.447 ± 0.0010.379 ± 0.00.383 ± 0.0010.25 ± 0.0010.165 ± 0.00.452 ± 0.003
3360.281 ± 0.0010.490 ± 0.0010.423 ± 0.0020.418 ± 0.0020.316 ± 0.0010.178 ± 0.0010.473 ± 0.001
7200.36 ± 0.0010.511 ± 0.0020.43 ± 0.0030.49 ± 0.0030.412 ± 0.0020.21 ± 0.0010.523 ± 0.005
w/o960.166 ± 0.0010.418 ± 0.0010.497 ± 0.0280.374 ± 0.0050.241 ± 0.0110.153 ± 0.00.54 ± 0.002
1920.217 ± 0.0060.476 ± 0.0020.806 ± 0.0450.420 ± 0.0050.401 ± 0.0410.169 ± 0.0010.553 ± 0.006
3360.274 ± 0.0040.542 ± 0.0110.939 ± 0.0780.469 ± 0.0090.695 ± 0.1270.185 ± 0.0010.58 ± 0.016
7200.344 ± 0.0050.596 ± 0.0031.124 ± 0.0610.537 ± 0.011.273 ± 0.1250.221 ± 0.0060.612 ± 0.004
TimeXerw/960.158 ± 0.00.385 ± 0.0020.288 ± 0.0030.324 ± 0.0030.17 ± 0.00.141 ± 0.0010.43 ± 0.003
1920.206 ± 0.0010.435 ± 0.0030.373 ± 0.0110.364 ± 0.0010.239 ± 0.0010.158 ± 0.00.452 ± 0.003
3360.263 ± 0.0010.492 ± 0.0130.421 ± 0.0050.396 ± 0.0010.299 ± 0.0030.176 ± 0.0020.473 ± 0.001
7200.342 ± 0.0010.506 ± 0.030.433 ± 0.0030.453 ± 0.0020.397 ± 0.0030.207 ± 0.0070.523 ± 0.005
w/o960.163 ± 0.0020.41 ± 0.0041.132 ± 0.1520.390 ± 0.0060.370 ± 0.0270.15 ± 0.0010.573 ± 0.003
1920.211 ± 0.0010.473 ± 0.0191.559 ± 0.0890.425 ± 0.0150.639 ± 0.1410.17 ± 0.0020.595 ± 0.006
3360.274 ± 0.0040.504 ± 0.0091.618 ± 0.0840.502 ± 0.0140.999 ± 0.2130.194 ± 0.0020.604 ± 0.004
7200.379 ± 0.0060.598 ± 0.0141.912 ± 0.140.551 ± 0.0182.616 ± 0.2080.235 ± 0.0040.643 ± 0.006
+ +Table 6: The effect of Z-normalization on MAE of various models across synthetic datasets. + +
MetricModelZ-NormPred lengthSynthetic (γ = 0.95)Synthetic (γ = 0.5)
α = 0α = 0.2α = 0.4α = 0.8α = 0α = 0.2α = 0.4α = 0.8
MAECrossformerw/960.424 ± 0.00.434 ± 0.00.434 ± 0.00.436 ± 0.00.789 ± 0.00.787 ± 0.00.801 ± 0.00.762 ± 0.001
1920.423 ± 0.00.431 ± 0.00.433 ± 0.00.449 ± 0.00.789 ± 0.00.788 ± 0.00.798 ± 0.00.759 ± 0.0
3360.423 ± 0.00.431 ± 0.00.432 ± 0.00.451 ± 0.0010.786 ± 0.00.789 ± 0.00.797 ± 0.00.767 ± 0.002
7200.425 ± 0.00.435 ± 0.00.435 ± 0.00.472 ± 0.0040.783 ± 0.00.79 ± 0.00.794 ± 0.00.772 ± 0.001
w/o960.419 ± 0.00.427 ± 0.00.427 ± 0.00.421 ± 0.00.782 ± 0.00.784 ± 0.00.794 ± 0.00.748 ± 0.001
1920.418 ± 0.00.426 ± 0.00.427 ± 0.00.427 ± 0.00.781 ± 0.00.783 ± 0.00.792 ± 0.00.752 ± 0.0
3360.418 ± 0.0010.426 ± 0.00.426 ± 0.0010.428 ± 0.00.778 ± 0.00.782 ± 0.00.791 ± 0.00.749 ± 0.0
7200.42 ± 0.00.428 ± 0.00.429 ± 0.00.433 ± 0.00.774 ± 0.00.785 ± 0.00.787 ± 0.00.747 ± 0.0
PatchTSTw/960.424 ± 0.00.433 ± 0.00.433 ± 0.00.438 ± 0.00.794 ± 0.00.789 ± 0.00.8 ± 0.00.769 ± 0.001
1920.422 ± 0.00.43 ± 0.00.433 ± 0.00.452 ± 0.00.793 ± 0.00.791 ± 0.00.797 ± 0.00.763 ± 0.0
3360.421 ± 0.00.43 ± 0.00.431 ± 0.00.452 ± 0.00.789 ± 0.00.79 ± 0.00.797 ± 0.00.775 ± 0.006
7200.421 ± 0.00.432 ± 0.00.434 ± 0.00.47 ± 0.00.786 ± 0.0010.791 ± 0.00.794 ± 0.00.782 ± 0.008
w/o960.418 ± 0.00.425 ± 0.00.424 ± 0.00.422 ± 0.00.787 ± 0.00.787 ± 0.00.794 ± 0.00.757 ± 0.001
1920.416 ± 0.00.424 ± 0.00.425 ± 0.00.426 ± 0.00.784 ± 0.00.785 ± 0.00.793 ± 0.00.756 ± 0.0
3360.416 ± 0.00.424 ± 0.00.424 ± 0.00.429 ± 0.00.782 ± 0.0010.783 ± 0.00.791 ± 0.00.756 ± 0.0
7200.416 ± 0.00.425 ± 0.00.427 ± 0.00.434 ± 0.00.777 ± 0.00.786 ± 0.00.788 ± 0.00.753 ± 0.001
iTransformerw960.42 ± 0.00.43 ± 0.00.43 ± 0.00.448 ± 0.0010.792 ± 0.00.787 ± 0.00.8 ± 0.00.761 ± 0.0
1920.418 ± 0.00.426 ± 0.00.43 ± 0.0010.452 ± 0.0010.79 ± 0.00.788 ± 0.00.798 ± 0.00.759 ± 0.0
3360.417 ± 0.0010.426 ± 0.0010.428 ± 0.0010.455 ± 0.0030.788 ± 0.00.789 ± 0.00.797 ± 0.00.766 ± 0.001
7200.418 ± 0.00.429 ± 0.00.43 ± 0.00.469 ± 0.0020.786 ± 0.0010.791 ± 0.00.795 ± 0.00.772 ± 0.001
w/o960.415 ± 0.00.425 ± 0.00.423 ± 0.00.429 ± 0.0040.785 ± 0.00.785 ± 0.00.794 ± 0.00.752 ± 0.0
1920.413 ± 0.00.422 ± 0.00.424 ± 0.00.432 ± 0.0010.783 ± 0.00.783 ± 0.00.793 ± 0.00.752 ± 0.0
3360.413 ± 0.0010.422 ± 0.0010.422 ± 0.00.429 ± 0.0010.781 ± 0.00.782 ± 0.00.791 ± 0.00.75 ± 0.001
7200.413 ± 0.00.423 ± 0.00.424 ± 0.00.427 ± 0.00.776 ± 0.00.786 ± 0.00.788 ± 0.00.749 ± 0.0
TimeXerw/960.423 ± 0.00.433 ± 0.00.433 ± 0.00.442 ± 0.0010.79 ± 0.00.786 ± 0.00.798 ± 0.00.76 ± 0.001
1920.421 ± 0.00.43 ± 0.00.434 ± 0.00.452 ± 0.00.79 ± 0.00.788 ± 0.00.796 ± 0.00.759 ± 0.002
3360.42 ± 0.00.43 ± 0.00.432 ± 0.00.455 ± 0.00.788 ± 0.00.788 ± 0.00.795 ± 0.00.766 ± 0.001
7200.42 ± 0.00.432 ± 0.00.435 ± 0.00.471 ± 0.0020.785 ± 0.00.79 ± 0.00.793 ± 0.00.773 ± 0.0
w/o960.417 ± 0.00.426 ± 0.00.425 ± 0.00.425 ± 0.0010.783 ± 0.00.784 ± 0.00.792 ± 0.00.748 ± 0.0
1920.415 ± 0.00.424 ± 0.00.426 ± 0.00.428 ± 0.00.782 ± 0.00.782 ± 0.00.791 ± 0.00.751 ± 0.001
3360.415 ± 0.00.424 ± 0.00.424 ± 0.00.43 ± 0.00.78 ± 0.00.781 ± 0.00.789 ± 0.00.75 ± 0.0
7200.416 ± 0.00.424 ± 0.00.427 ± 0.00.434 ± 0.00.776 ± 0.00.785 ± 0.00.786 ± 0.00.749 ± 0.0
+ +Table 7: The effect of Z-normalization on MSE of various models across synthetic datasets. + +
MetricModelZ-NormPred lengthSynthetic (γ = 0.95)Synthetic (γ = 0.5)
α = 0α = 0.2α = 0.4α = 0.8α = 0α = 0.2α = 0.4α = 0.8
MSECrossformerw/960.283 ± 0.00.293 ± 0.00.296 ± 0.00.297 ± 0.00.972 ± 0.00.974 ± 0.01.0 ± 0.00.912 ± 0.002
1920.281 ± 0.00.29 ± 0.00.295 ± 0.00.316 ± 0.0010.97 ± 0.00.975 ± 0.00.995 ± 0.00.907 ± 0.001
3360.28 ± 0.0010.291 ± 0.00.295 ± 0.00.319 ± 0.0010.964 ± 0.00.975 ± 0.00.991 ± 0.00.928 ± 0.006
7200.281 ± 0.0010.295 ± 0.00.299 ± 0.00.351 ± 0.0050.957 ± 0.0010.978 ± 0.00.983 ± 0.0010.941 ± 0.003
w/o960.276 ± 0.00.284 ± 0.00.288 ± 0.00.279 ± 0.00.953 ± 0.00.965 ± 0.00.984 ± 0.00.878 ± 0.002
1920.274 ± 0.00.284 ± 0.00.288 ± 0.00.287 ± 0.00.949 ± 0.00.96 ± 0.00.982 ± 0.00.889 ± 0.0
3360.274 ± 0.0010.284 ± 0.0010.287 ± 0.0010.289 ± 0.0010.945 ± 0.00.957 ± 0.00.977 ± 0.00.883 ± 0.001
7200.275 ± 0.00.287 ± 0.00.29 ± 0.00.297 ± 0.00.937 ± 0.00.963 ± 0.00.966 ± 0.0010.881 ± 0.0
PatchTSTw/960.283 ± 0.00.292 ± 0.00.293 ± 0.00.3 ± 0.00.982 ± 0.00.981 ± 0.00.999 ± 0.00.929 ± 0.002
1920.281 ± 0.00.289 ± 0.00.294 ± 0.00.32 ± 0.0010.977 ± 0.00.983 ± 0.00.995 ± 0.00.918 ± 0.001
3360.279 ± 0.00.29 ± 0.00.293 ± 0.00.32 ± 0.00.97 ± 0.0010.98 ± 0.0010.99 ± 0.0010.948 ± 0.016
7200.276 ± 0.00.292 ± 0.00.297 ± 0.00.347 ± 0.0010.963 ± 0.0010.981 ± 0.0010.982 ± 0.0010.966 ± 0.021
w/o960.275 ± 0.00.281 ± 0.00.282 ± 0.00.28 ± 0.00.962 ± 0.00.972 ± 0.00.984 ± 0.00.9 ± 0.001
1920.273 ± 0.00.281 ± 0.00.284 ± 0.00.287 ± 0.00.955 ± 0.00.967 ± 0.00.983 ± 0.00.899 ± 0.001
3360.273 ± 0.00.281 ± 0.00.283 ± 0.00.29 ± 0.00.951 ± 0.0020.962 ± 0.0010.977 ± 0.0010.9 ± 0.001
7200.271 ± 0.00.282 ± 0.00.286 ± 0.00.297 ± 0.00.944 ± 0.0010.967 ± 0.0010.967 ± 0.0010.897 ± 0.002
iTransformerw/960.277 ± 0.00.288 ± 0.00.29 ± 0.00.317 ± 0.0020.977 ± 0.00.976 ± 0.00.999 ± 0.0010.911 ± 0.001
1920.275 ± 0.00.283 ± 0.0010.29 ± 0.0010.325 ± 0.0020.973 ± 0.00.977 ± 0.00.996 ± 0.00.907 ± 0.0
3360.273 ± 0.0010.284 ± 0.0010.289 ± 0.0010.328 ± 0.0040.967 ± 0.00.977 ± 0.0010.993 ± 0.00.925 ± 0.004
7200.272 ± 0.00.287 ± 0.00.292 ± 0.00.348 ± 0.0030.964 ± 0.0010.981 ± 0.00.985 ± 0.00.939 ± 0.002
w/o960.275 ± 0.00.281 ± 0.00.281 ± 0.00.291 ± 0.0060.958 ± 0.00.967 ± 0.00.983 ± 0.00.89 ± 0.001
1920.273 ± 0.00.278 ± 0.00.283 ± 0.0010.295 ± 0.0010.952 ± 0.00.962 ± 0.00.983 ± 0.00.889 ± 0.001
3360.273 ± 0.00.279 ± 0.0010.282 ± 0.0010.292 ± 0.0010.949 ± 0.00.96 ± 0.0010.978 ± 0.00.886 ± 0.001
7200.271 ± 0.00.279 ± 0.00.283 ± 0.00.29 ± 0.00.942 ± 0.00.966 ± 0.00.968 ± 0.00.886 ± 0.0
TimeXerw/960.282 ± 0.00.293 ± 0.00.294 ± 0.00.307 ± 0.0010.973 ± 0.00.974 ± 0.00.996 ± 0.0010.908 ± 0.002
1920.28 ± 0.00.289 ± 0.00.295 ± 0.00.323 ± 0.0010.972 ± 0.00.976 ± 0.00.991 ± 0.0010.907 ± 0.005
3360.278 ± 0.00.29 ± 0.00.294 ± 0.00.327 ± 0.00.966 ± 0.00.974 ± 0.00.988 ± 0.0010.926 ± 0.004
7200.276 ± 0.00.292 ± 0.00.297 ± 0.0010.35 ± 0.0030.961 ± 0.00.977 ± 0.00.982 ± 0.0010.941 ± 0.001
w/o960.275 ± 0.00.282 ± 0.00.284 ± 0.00.285 ± 0.0020.954 ± 0.00.965 ± 0.00.978 ± 0.00.88 ± 0.0
1920.273 ± 0.00.281 ± 0.00.285 ± 0.00.289 ± 0.00.951 ± 0.00.96 ± 0.00.978 ± 0.00.887 ± 0.004
3360.273 ± 0.00.282 ± 0.00.284 ± 0.00.292 ± 0.00.948 ± 0.00.956 ± 0.00.972 ± 0.00.885 ± 0.0
7200.271 ± 0.00.281 ± 0.00.286 ± 0.00.297 ± 0.00.941 ± 0.00.963 ± 0.00.961 ± 0.00.887 ± 0.0
\ No newline at end of file diff --git a/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/images.zip b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..89a147cf38dd3926f8f01cb0820feab673223207 --- /dev/null +++ b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da170945ea131a22814b6f9af5f167dd47f43075fb605255deb8f7e095414361 +size 2988248 diff --git a/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/layout.json b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8240eb2953cfbd6ab9f9148eb5b4ad325e5206b2 --- /dev/null +++ b/acloserlookattransformersfortimeseriesforecastingunderstandingwhytheyworkandwheretheystruggle/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5108d731196b3e15ddc0808c5702e225a107023644c676fab0b6ad46c5900112 +size 527307 diff --git a/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/07b62110-1606-4230-92b9-ae4e6bc4b8d7_content_list.json b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/07b62110-1606-4230-92b9-ae4e6bc4b8d7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..570c1c17bbd68c4bc136df73e8101e3f9640df64 --- /dev/null +++ b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/07b62110-1606-4230-92b9-ae4e6bc4b8d7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a632bb760fa466b90aedbb7a89e5167fa69752fc5b7686032f0f55285079c38f +size 171246 diff --git a/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/07b62110-1606-4230-92b9-ae4e6bc4b8d7_model.json b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/07b62110-1606-4230-92b9-ae4e6bc4b8d7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7a45e94e034e2446b0cad6dcff8aafb155e08b73 --- /dev/null +++ b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/07b62110-1606-4230-92b9-ae4e6bc4b8d7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dcbc21207833a3d76d6213397cf3638ea1506a18abf94c313984822bd0b8a44 +size 205205 diff --git a/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/07b62110-1606-4230-92b9-ae4e6bc4b8d7_origin.pdf b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/07b62110-1606-4230-92b9-ae4e6bc4b8d7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5d129aac7005018b3f08ff8ee9b995ba7978ee94 --- /dev/null +++ b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/07b62110-1606-4230-92b9-ae4e6bc4b8d7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c254a7174854ad7feae53b2314ad483ce2229602f20764553d1e01a96507cf65 +size 5782903 diff --git a/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/full.md b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..31e3450d6065c07676022ece2761260202b52cf7 --- /dev/null +++ b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/full.md @@ -0,0 +1,793 @@ +# A Cognac Shot To Forget Bad Memories: Corrective Unlearning for Graph Neural Networks + +Varshita Kolipaka $^{*1}$ Akshit Sinha $^{*1}$ Debangan Mishra $^{1}$ Sumit Kumar $^{1}$ Arvindh Arun $^{†12}$ Shashwat Goel $^{†134}$ Ponnurangam Kumaraguru $^{1}$ + +cognac-gnn-unlearning.github.io + +corrective-unlearning-for-gnns + +# Abstract + +Graph Neural Networks (GNNs) are increasingly being used for a variety of ML applications on graph data. Because graph data does not follow the independently and identically distributed (i.i.d.) assumption, adversarial manipulations or incorrect data can propagate to other data points through message passing, which deteriorates the model's performance. To allow model developers to remove the adverse effects of manipulated entities from a trained GNN, we study the recently formulated problem of Corrective Unlearning. We find that current graph unlearning methods fail to unlearn the effect of manipulations even when the whole manipulated set is known. We introduce a new graph unlearning method, Cognac, which can unlearn the effect of the manipulation set even when only $5\%$ of it is identified. It recovers most of the performance of a strong oracle with fully corrected training data, even beating retraining from scratch without the deletion set, and is 8x more efficient while also scaling to large datasets. We hope our work assists GNN developers in mitigating harmful effects caused by issues in real-world data, post-training. + +# 1. Introduction + +Graph Neural Networks (GNNs) are seeing widespread adoption across diverse domains, from recommender systems to drug discovery (Wu et al., 2022; Zhang et al., 2022). Recently, GNNs have been scaled to large training sets for + +*Equal contribution † Equal advising. ¹IIT Hyderabad ²Institute for AI, University of Stuttgart ³ELLIS Institute Tübingen ⁴Max Planck Institute for Intelligent Systems. Correspondence to: Varshita Kolipaka , Akshit Sinha . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +various graph foundation models (Mao et al., 2024; Arun et al., 2025). However, in these large-scale settings, it is prohibitively expensive to verify the integrity of every sample in the training data that can potentially affect desiderata like fairness (Konstantinov & Lampert, 2022), robustness (Paleka & Sanyal, 2023; Gunnemann, 2022), and accuracy (Sanyal et al., 2021). + +Making the training process robust to minority populations (Gunnemann, 2022; Jin et al., 2020) is challenging and can adversely affect fairness and accuracy (Sanyal et al., 2022). Consequently, model developers may want post-hoc ways to remove the adverse impact of manipulated training data if they observe problematic model behavior on specific distributions of test-time inputs. Such an approach follows the recent trend of using post-training interventions to ensure models behave in intended ways (Ouyang et al., 2022). Recently, Goel et al. (2024) formulated corrective unlearning as the challenge of removing adverse effects of manipulated data with access to only a representative subset for unlearning while being agnostic to the type of manipulations. We study this problem in the context of GNNs, which face unique challenges due to the graph structure. The traditional assumption of independent and identically distributed (i.i.d.) samples does not hold for GNNs, as they use a message-passing mechanism that aggregates information from neighbors. This process makes GNNs vulnerable to adversarial perturbations, where modifying even a few nodes can propagate changes across large portions of the graph and result in widespread changes in model predictions (Bojchevski & Gunnemann, 2019b; Zügner et al., 2018). Consequently, for GNNs to effectively unlearn, they must remove the influence of manipulated entities on their neighbors. + +Corrective Unlearning is an emerging paradigm that focuses on removing the influence of arbitrary training data manipulations on a trained model, using only a representative subset of the manipulated data (Goel et al., 2024). In this work, we focus on the use of GNNs in node classification tasks, studying unlearning for targeted binary class confusion attacks (Lingam et al., 2024) on both edges and nodes. For edge unlearning, we evaluate the unlearning of spurious + +![](images/202032d1a00ddcefa9f44826f2406fad54806686db329bcd29b33e501fd79e5b.jpg) +Figure 1. Illustration of our method Cognac. Initially (Left), the model is trained on manipulated data (Devils), out of which only a subset is identified for deletion (Dark-red-devils). Our method alternates between two steps. (1) Identifying neighbors by the deletion set, which can include both nodes from the remaining data (light red) and unidentified manipulated nodes (Purple), and pushes their representation away from the deletion set and toward other nodes in the neighborhood. (2) We then perform ascent on the deletion set labels and descent on the remaining data with separate optimizer instances. This cleanly separates the embeddings of the affected classes (Right), recovering the accuracy on the affected distribution, and maintaining it on the remaining distribution. + +edges that change the graph topology in a way that violates the homophily assumption that most GNNs rely on. For node unlearning, we utilize a label flip attack (Lingam et al., 2024) which is used as a classical graph adversarial attack, similar to the Interclass Confusion attack (Goel et al., 2022). + +First, we evaluate whether existing GNN unlearning methods are effective in removing the impact of manipulated entities. Our findings reveal that these methods consistently fail, even when provided with a complete set of manipulated entities. We then propose our method, Cognac, which unlearns by alternating between two components, as illustrated in Figure 1. The first component Contrastive unlearning on Graph Neighborhoods (CoGN), finds affected neighbors of the known deletion set, updating the GNN weights using a contrastive loss that pushes representations of the affected neighbors away from the deletion entities while staying close to other neighbors. The second component, AsCent DesCent de coupled $(AC\frac{1}{2} DC)$ applies the classic i.i.d. unlearning method of gradient ascent on the deletion set and gradient descent on the retain set. + +Our proposed method shows promise for corrective unlearning: we not only outperform retraining from scratch, the previously assumed gold standard for this task, but also recover most of the performance of an oracle (a model trained on the complete and correct data) while discovering as few as $5\%$ of the manipulated entities. + +# 2. Corrective Unlearning for Graph Neural Networks + +We now formulate the Corrective Unlearning problem for graph-structured, non-i.i.d. data. We consider a graph $\mathcal{G} = (\mathcal{V},\mathcal{E})$ , where $\mathcal{V}$ and $\mathcal{E}$ represent the constituent set of nodes and edges respectively. For each node $\mathcal{V}_i\in \mathcal{V}$ , there is a corresponding feature vector $\mathcal{X}_i$ and label $\mathcal{Y}_i$ , with $\mathcal{V} = (\mathcal{X},\mathcal{Y})$ . Consistent with prior work in unlearning on graphs (Wu et al., 2023a; Li et al., 2024c), we focus on semi-supervised node classification using GNNs. GNNs use the message-passing mechanism, where each node aggregates features from its immediate neighbors. The effect of this aggregation process propagates through multiple successive layers, effectively expanding the receptive field of each node with network depth. This architecture inherently exploits the principle of homophily, a common property in many real-world graphs where nodes with similar features or labels are more likely to be connected than not. + +While assuming homophily is extremely useful for learning representations from graph data, annotation mistakes or adversarial manipulations that create dissimilar neighborhoods or connect otherwise dissimilar nodes can easily harm the learned representations (Zügner & Gunnemann, 2019). This motivates our study of post-hoc correction strategies like unlearning for GNNs. Following Goel et al. (2024), we adopt an adversarial formulation that subsumes correcting more benign mistakes. + +Adversary's Perspective. The adversary aims to reduce model accuracy on a target distribution by manipulating parts of the clean training data $\mathcal{G}$ . This can be done in the following ways: (1) adding spurious edges $\hat{\mathcal{E}}$ , resulting in $\mathcal{E}' = \mathcal{E} \cup \hat{\mathcal{E}}$ ; or (2) manipulating node information, $\mathcal{V}' = f_m(\mathcal{V})$ , where $f_m$ manipulates a subset of nodes by changing their features or labels. We define $S_m$ as the set of manipulated entities, which can be either the manipulated subset of nodes or the added spurious edges $\hat{\mathcal{E}}$ . The final manipulated graph is denoted as $\mathcal{G}' = (\mathcal{V}', \mathcal{E}')$ . + +Unlearner's Perspective. After training, model developers may observe that desired properties like fairness and robustness are compromised in the trained model $\mathcal{M}$ , which can be modeled as lower accuracy on some data distributions. The objective, then, is to remove the influence of the manipulated training data $S_{m}$ on the affected distribution while maintaining performance on the remaining entities. By utilizing data monitoring strategies on a subset of the training data or using incorrect data detection techniques like (Northcutt et al., 2021), it may be possible to identify a part of the manipulated entities $S_{f} \subseteq S_{m}$ . For unlearning to be feasible, $S_{f}$ must be a representative subset of $S_{m}$ . We only assume the type of affected entity (edges or nodes) is known to the model developer, but do not assume any knowledge about the nature of manipulation. An unlearning method $U(\mathcal{M}, S_{f}, \mathcal{G}')$ is then used to mitigate the adverse effects of $S_{m}$ , ideally by improving the accuracy on unseen samples from the affected distribution. An effective unlearning method should remove the impact of certain training data samples without degrading performance on the rest of the data or incurring the cost of retraining from scratch. Moreover, while Retrain was previously considered a gold standard in privacy-oriented unlearning and graph unlearning, Goel et al. (2024) showed that when the whole manipulated set is not known, retraining on the remaining data can reinforce the manipulation, implying it's not a gold standard for corrective unlearning. + +Metrics. To evaluate the performance of unlearning methods, we use the metrics proposed by Goel et al. (2024): + +1. Acc $_{\text{aff}}$ : It measures the clean-label accuracy of test set samples from the affected distribution. This metric captures the method's ability to correct the influence of the manipulated entities on unseen data through unlearning. As the affected distribution differs for each manipulation, we specify it when describing each evaluation. +2. Accrem: It is defined as the accuracy of the remaining entities. This metric measures whether the unlearning maintains model performance on clean entities. + +The metrics $\mathrm{Acc}_{\mathrm{aff}}$ and $\mathrm{Acc}_{\mathrm{rem}}$ were termed "Corrected Accuracy" (Acccorr) and "Retain Accuracy" (Accretain) respectively by Goel et al. (2024). We chose alternative names + +to explicitly state which data distribution accuracy is measured. In Section 4, we further specify what the “affected distribution” and “remaining entities” are for the different evaluation types we study. + +Goal. An ideal corrective unlearning method should have high $\mathrm{Acc}_{\mathrm{aff}}$ even when a small fraction of manipulated set $(S_{m})$ is identified for deletion $(S_{f})$ without big drops in $\mathrm{Acc}_{\mathrm{rem}}$ , all while being computationally efficient. + +# 3. Our Method: Cognac + +Our proposed unlearning method, Cognac, requires access to the underlying graph $\mathcal{G}'$ , the known set of entities to be deleted $S_f$ , and the original model $\mathcal{M}$ . We define $\mathcal{V}_f$ as the set of nodes whose influence is to be removed. For node unlearning, $\mathcal{V}_f = S_f$ ; for edge unlearning, $\mathcal{V}_f$ is the set of vertices connected to the edge set to be deleted. Manipulated data has two main adverse effects on the trained GNN: 1) Message passing can propagate the influence of the manipulated entities $S_m$ on their neighborhood, and 2) The layers learn transformations to fit potentially wrong labels in $S_m$ . Mitigating the effects of attacks first requires analysis of the impact of such attacks. The most general form of attack is Interclass Confusion (Goel et al., 2022), which we show entangles the representations of two classes, below. + +Theorem 3.1. Let $G = (V, E, X)$ be a graph with node set $V$ , edge set $E$ , and features $X$ . Let $C_1, C_2 \subset V$ be two distinct classes with ground-truth labels $y_i \in \{C_1, C_2\}$ . Suppose an Interclass Confusion (IC) attack is applied. + +Let $\phi_M(C_1),\phi_M(C_2)\in \mathbb{R}^d$ denote the mean embeddings of $C_1$ and $C_2$ , and $\mathcal{D}(\phi_M(C_1),\phi_M(C_2))$ be the Wasserstein-2 distance between their embedding distributions. + +Then, there exists a degradation term $\Delta > 0$ such that: + +$$ +\begin{array}{l} \mathbb {E} \left[ \mathcal {D} \left(\phi_ {M} \left(C _ {1}\right), \phi_ {M} \left(C _ {2}\right)\right) \right] \\ \leq \mathbb {E} \left[ \mathcal {D} \left(\phi_ {M _ {\text {c l e a n}}} \left(C _ {1}\right), \phi_ {M _ {\text {c l e a n}}} \left(C _ {2}\right)\right) \right] - \Delta \\ \end{array} +$$ + +Complete list of assumptions and attack details in Appendix A.3. We tackle these two problems using separate components - CoGN and $\mathrm{AC}\%$ DC. + +# 3.1. Removing Effects on Neighbors with CoGN + +The first question we address is: How can we remove the influence of manipulated entities on their neighboring nodes? First, this requires us to identify the nodes affected by the manipulations $(\mathcal{V}_{\mathrm{aff}})$ and then mitigate the influence on their representations. Identifying affected nodes is challenging, as the impact of message passing from manipulated entities $S_{m}$ depends on the interference from messages of other neighboring nodes. Therefore, we use an empirical estimation to identify the affected nodes from each entity in the + +deletion set. On these nodes, we then perform contrastive unlearning, simultaneously pushing the representations of the affected nodes away from nodes in $\mathcal{V}_f$ while keeping them close to other nodes in their neighborhood. We call this component Contrastive unlearning on Graph Neighborhoods (CoGN), formalized below. + +# 3.1.1. AFFECTED NODE IDENTIFICATION + +To first identify the affected samples, $\mathcal{V}_{\mathrm{aff}}$ , we first observe that any manipulated node $s \in V_f$ can only affect the representation of any other node $v \in \mathcal{V}' \backslash V_f$ in $\mathcal{G}'$ only if $s$ is part of the receptive field of $v$ , a widely known result for GNNS. Formally, + +Lemma 3.2. Let $G = (V, E)$ be an undirected graph, and let $\mathcal{N}(v)$ denote the 1-hop neighborhood of node $v$ . For a node $s \in V$ , let $\mathcal{N}^n(s)$ denote the $n$ -hop neighborhood of $s$ , defined recursively as: + +$$ +\mathcal {N} ^ {n} (s) = \left\{ \begin{array}{l l} \{s \} & i f n = 0, \\ \bigcup_ {v \in \mathcal {N} ^ {n - 1} (s)} \mathcal {N} (v) & i f n > 0. \end{array} \right. +$$ + +In an $n$ -layer GNN, the representation $z_{s}$ of node $s$ can affect the representations $z_{v}$ of nodes $v$ only if $v \in \mathcal{N}^{n}(s)$ . For any $v \notin \mathcal{N}^{n}(s)$ , $z_{v}$ is independent of message passing effects of $z_{s}$ . + +The proof is provided in Appendix A.1. The main takeaway is that manipulations only propagate within an $n$ -hop neighborhood of poisoned nodes. This locality drastically reduces the search space for identifying affected nodes. + +The second observation is that not all nodes in the $n$ -hop neighborhood of the manipulated nodes may be affected enough by the attack, as some nodes are more robust to the perturbations than others (Gosch et al., 2023; Arun et al., 2023). To find the most affected nodes, we employ a cheap and simple heuristic. We invert the features of $v \in V_f$ and select neighboring nodes where final output logits are changed the most. Formally, the inversion is performed by the transformation $\vec{1} - \mathcal{X}_v, \forall v \in \mathcal{V}_f$ , leading to a new feature matrix $\chi'$ , where $\mathcal{X}_v$ represents a one-hot-encoding vector. We then compute the difference in the original output logits $\mathcal{M}(\chi)$ , and those obtained by on the new feature matrix, $\mathcal{M}(\chi')$ given by: $\Delta \chi = |\mathcal{M}(\chi') - \mathcal{M}(\chi)|$ . The top $k\%$ nodes with the most change, $\Delta \chi$ , are selected as the affected set of entities $\mathcal{V}_{\mathrm{aff}}$ . A conceptual example illustrating the workings of Affected Node Identification is presented in Figure 2. Appendix E.2 varies our design choices, confirming that we retain the same performance as using the entire $n$ -hop neighborhood while being more efficient (Figure 9). Our method works robustly even if the original GNN was under-trained (Figure 8). Further, in Table 7 we also ablate the heuristic for identifying affected nodes against Cognac using MEGU's sampling technique. We observe that our heuristic delivers over $25\%$ higher and is $8\mathrm{x}$ faster. + +![](images/a5b56584469adbe7bbff90e88912b4a03fae518cf0b4e7b7e215a9fca21ed405.jpg) +Figure 2. A toy example detailing Affected Node Identification. (1) We first invert the features of the known manipulated node. (2) We perform two forward passes through the GNN, one with the original feature vector and one with the inverted feature vector. (3) We compute the difference in output logits from both cases and take the top 2 nodes with the largest logit change, which in this case are nodes E and B. + +# 3.1.2. CONTRASTIVE UNLEARNING + +To remove the influence of the deletion set $\mathcal{V}_f$ on the affected nodes $\mathcal{V}_{\mathrm{aff}}$ identified in the previous step, we must ensure that our model maps the hidden representations of nodes in $\mathcal{V}_{\mathrm{aff}}$ far away from that of nodes in $\mathcal{V}_f$ (Goel et al., 2024). However, satisfying this property alone will lead to unrestricted separation and damage the quality of learned representations. To achieve this balance and restore homophily (Ma et al., 2022), we constrain $\mathcal{V}_{\mathrm{aff}}$ to stay close to its unaffected neighbors $\mathcal{N}_{\mathcal{V}_{\mathrm{aff}}} \backslash \mathcal{V}_f = \mathcal{V}_{pos}$ , ensuring alignment with the local structure while distancing from $\mathcal{V}_f$ . Formally, we can state this as the following optimization problem over the parameters of a GNN, which is necessary for corrective unlearning, + +$$ +\begin{array}{l} \max _ {\theta} \left(\mathbb {E} _ {v \in \mathcal {V} _ {\text {a f f}}, p \in \mathcal {V} _ {p o s}} \left[ \mathbf {z} _ {v} ^ {\top} \mathbf {z} _ {p} \right] - \mathbb {E} _ {v \in \mathcal {V} _ {\text {a f f}}, n \in \mathcal {V} _ {f}} \left[ \mathbf {z} _ {v} ^ {\top} \mathbf {z} _ {n} \right]\right) \\ = \max _ {\theta} \left(\mathbb {E} _ {v \in \mathcal {V} _ {\text {a f f}}, p \in \mathcal {V} _ {p o s}, n \in \mathcal {V} _ {f}} \left[ \mathbf {z} _ {v} ^ {\top} \mathbf {z} _ {p} - \mathbf {z} _ {v} ^ {\top} \mathbf {z} _ {n} \right]\right) \tag {1} \\ \end{array} +$$ + +Equation 1 offers a direct way to enforce separation between positive and negative pairs, but it has notable shortcomings. In particular, it does not sufficiently penalize small margins, as it only considers the raw similarity difference without emphasizing cases where $z_v^T z_p$ and $z_v^T z_n$ are nearly equal. This can lead to weak separation and reduced robustness, especially when positive and negative embeddings are closely aligned. Additionally, the lack of non-linear scaling creates an uneven optimization landscape, increasing the risk of convergence issues. To overcome these limitations, we use a log-based loss function that applies non-linear sigmoid terms, providing stronger penalization for small margins and a probabilistic similarity interpretation (Hamilton et al., 2017). This enhances the separation between positive and negative pairs while ensuring smoother gradients for more stable optimization (Lee et al., 2024). Formally, + +$$ +\mathcal {L} _ {v, p, n} = - \log \left(\sigma \left(z _ {v} ^ {T} z _ {p}\right)\right) - \log \left(\sigma \left(- z _ {v} ^ {T} z _ {n}\right)\right) \tag {2} +$$ + +Under assumptions of differentiability, convexity, and bounded gradients, we can guarantee that optimizing this function achieves a better separation between the positive and negative dot products equivalent to Equation 1. + +Theorem 3.3. Let $\theta \in \mathbb{R}^d$ parameterize a GNN generating embeddings $z_v, z_p, z_n \in \mathbb{R}^k$ for triplets $(v, p, n)$ . Let $\mathcal{L}(\theta) = -\mathbb{E}\left[\log \sigma(z_v^\top z_p) + \log \sigma(-z_v^\top z_n)\right]$ and $S(\theta) = \mathbb{E}\left[z_v^\top z_p - z_v^\top z_n\right]$ . + +Then under the assumptions stated above, gradient descent on $\mathcal{L}(\theta)$ with step size $\eta \leq \frac{1}{L}$ (where $L$ is the Lipschitz constant of $\nabla_{\theta}\mathcal{L}$ ) guarantees: + +$$ +S \left(\theta_ {t + 1}\right) \geq S \left(\theta_ {t}\right) \quad \forall t \geq 0, +$$ + +and at convergence, $S(\theta^{*}) > S(\theta_{0})$ + +The proof is presented in Appendix A.2. We also empirically validate this theorem for non-linear GNNs, with Figure 3 showing on the Cora dataset that the separation between the positive dot product and negative dot product monotonically increases as the loss converges. + +# 3.2. Unlearning Old Labels with AC $\xi$ DC + +Next, we ask: Can we undo the effect of the task loss $\mathcal{L}_{\mathrm{task}}$ explicitly learning to fit the node representations of $S_{m}$ to potentially wrong labels? We do this by performing gradient ascent on $S_{f}$ , which non-directionally maximizes the training loss with respect to the old labels. Ascent alone aggressively leads to arbitrary forgetting of useful information, so we counterbalance it by alternating with steps that minimize the task loss on the remaining data. More precisely, we perform gradient ascent on $\nu_{f}$ and gradient descent on $\nu_{r}$ , iteratively on the original GNN $\mathcal{M}$ . + +$$ +\mathcal {L} _ {a} = - \mathcal {L} _ {\text {t a s k}} \left(\mathcal {V} _ {f}\right), \mathcal {L} _ {d} = \mathcal {L} _ {\text {t a s k}} \left(\mathcal {V} _ {r}\right) \tag {3} +$$ + +While variants of ascent on $S_f$ and descent on remaining data have been studied for image classification (Kurmanji et al., 2023) and language models (Yao et al., 2024), we find a specific optimization strategy useful to achieve corrective unlearning on graphs. The challenge arises when $S_f \subset S_m$ , as the remaining data could still contain manipulated entities, which we aim to avoid reinforcing. However, in realistic scenarios, the manipulated entities $S_m$ typically are a small fraction of the training data, allowing us to mitigate their impact through ascent on the representative subset $S_f$ . + +This requires a careful balance between ascent and descent, which we can achieve by using two different optimizers and starting learning rates for these steps. This insight is similar to prior work in Generative Adversarial Networks (GANs) (Heusel et al., 2017). The starting learning rates for both ascent and descent are hyperparameters to be tuned, and usually, we find that a lower learning rate for ascent + +![](images/bba4fa5d5e5ee5c1774a7b937dfa609f28400621840246e16cfd6ff68ba7c064.jpg) +Figure 3. Empirical convergence of CoGN. The average positive and negative dot products across samples increase and decrease, respectively, over epochs, resulting in overall convergence. + +leads to better results. Thus, we call this component Ascent Descent de coupled. Convergence of this formulation has been shown in previous works (Kurmanji et al., 2023). We show the empirical convergence of $\mathrm{AC}_4^{\angle}$ DC in Figure 7 present in Appendix E.1. + +For our final method Cognac, we alternate steps of CoGN, which fixes representations of affected neighborhood nodes, and $AC \nsubseteq DC$ , which unlearns potentially wrong labels introduced by $S_{m}$ . We also perform ablations in Section 5 (Table 3), showing that the individual components CoGN and $AC \nsubseteq DC$ alone perform notably worse than our final method, suggesting the necessity of both components. + +# 4. Experimental Setup + +# 4.1. Benchmarking Details + +We now describe design choices made for benchmarking, first specifying the datasets and architectures, and then outlining how to ensure a fair comparison between methods. + +Models and Datasets. We report results using the Graph Convolutional Network (GCN) (Kipf & Welling, 2017) architecture and evaluate the methods on ten benchmark datasets used in prior literature: Cora, PubMed, DBLP, Coauthor CS, Coauthor Physics, Amazon Photos (Photos), Amazon Computers (Computers), CiteSeer (Cheng et al., 2023; Li et al., 2024c), and additionally CoraFull (Bojchevski & Gunnemann, 2018) and OGB-arXiv (Wang et al., 2020). In Appendix D.1, we provide additional results on Graph Attention Network (GAT) (Velicković et al., 2018). For each dataset, we extract the largest connected subgraph for our experiments. Dataset details, including the number of classes, nodes, edges, and entities manipulated, are provided in Table 1 and Appendix B. + +Hyperparameter Tuning. Ensuring a fair comparison of unlearning methods can be tricky, as there are multiple desiderata: unlearning, maintaining utility, and computa + +Table 1. Dataset statistics. In our evaluations, we include citation networks, co-author networks, and co-purchase networks. The number of nodes and edges reported here refers to the entire dataset. From this, we use a 60/20/20 split for train/validation/test. The manipulation statistics are presented in Table 4. + +
DATASETCLASSESNODESEDGES
CORAFULL7018,800125,370
CORA72,48510,138
CITESEER62,1207,358
DBLP416,191103,826
PUBMED319,71788,648
OGB-ARXIV40169,3431,166,243
CS1518,333163,788
PHYSICS534,493495,924
PHOTOS87,487238,086
COMPUTERS1013,381491,556
+ +tional efficiency, and hyperparameter tuning of the methods can particularly affect results on GNNs. We describe our efforts towards this in Appendix sections F.1 and F.2. + +# 4.2. Evaluations + +Given a fixed budget of samples to manipulate, ideal corrective unlearning evaluations should maximize the deterioration of model performance on the affected distribution, creating a wide gap between clean and poisoned model performance to measure the progress of the unlearning method. We thus evaluate unlearning in the context of attacks that are not constrained by stealthiness. Lingam et al. (2024) show that binary label flip manipulation attacks, where a fraction of labels are swapped between two chosen classes, are stronger than multi-class manipulations, theoretically and empirically, on GNNs. Building on this, we use two targeted attacks to evaluate corrective unlearning on graph data. Additionally, for completeness we also present results on a Feature Poisoning Attack, analogous to patch-based backdoor attacks in image poisoning (Gu et al., 2017), in Appendix D.3. + +Spurious Edge Addition. Prior GNN unlearning works (Wu et al., 2023a; Li et al., 2024c) have evaluated adversarial edge attacks, but in an untargeted setting, making their evaluations weak. We, instead, simulate targeted adversarial edge insertions between nodes of two classes, violating homophily assumptions and entangling their representations. This models attacks like fake social connections (Bojchevski & Gunnemann, 2019a) or knowledge graph manipulations (Xi et al., 2023; Zhang et al., 2019; Zhao et al., 2024). Unlearning aims to recover accuracy on the targeted classes $\mathrm{Acc}_{\mathrm{aff}}$ while preserving performance on others $\mathrm{Acc}_{\mathrm{rem}}$ . + +Label Manipulation. We implement the Interclass Confusion (IC) Test (Goel et al., 2022), by systematically swap + +ping labels between two targeted classes to entangle their representations. Once again, the unlearning goal is to improve $\mathrm{Acc}_{\mathrm{aff}}$ on the two targeted classes, while preserving performance, $\mathrm{Acc}_{\mathrm{rem}}$ , on the remaining classes. + +# 4.3. Baselines + +We evaluate four popular graph unlearning methods and adapt one popular i.i.d. unlearning method for graphs. For reference, we also report results for the Original model, Retrain, which trains a new model without $S_f$ , and Finetune, which continues training the poisoned model on data without $S_f$ for additional epochs. Following Goel et al. (2024), we find that retraining from scratch is not the gold standard in corrective unlearning. Thus, we introduce Oracle, trained on the whole training set without manipulations, indicating an upper bound on what can be achieved. The Oracle has correct labels for the unlearning entities, information that the unlearning methods cannot access. + +Existing Unlearning Methods. We choose five methods as baselines where unlearning incorrect data explicitly motivates the technique. (1) GNNDelete (Cheng et al., 2023) adds a deletion operator after each GNN layer and trains them using a loss function to randomize the prediction probabilities of deleted edges while preserving their local neighborhood representation, keeping the original GNN weights unchanged. (2) GIF (Wu et al., 2023a) draws from a closed-form solution for linear GNNs to measure the structural influence of deleted entities on their neighbors. Then, they provide estimated GNN parameter changes for unlearning using the inverse Hessian of the loss function. (3) MEGU (Li et al., 2024c) finds the highly influenced neighborhood (HIN) of the unlearning entities and removes their influence over the HIN while maintaining predictive performance and forgetting the deletion set using a combination of losses. (4) UtU (Tan et al., 2024) proposes zero-cost edge-unlearning by removing the edges to be deleted during inference for blocking message propagation from nodes linked to these edges. Finally, we include a popular unlearning method studied in i.i.d. classification settings. (5) SCRUB (Kurmanji et al., 2023) employs a teacher-student framework with alternate steps of distillation away from the forget set and towards the retain set. For edge unlearning, we use SCRUB by taking the nodes connected to spuriously added edges as the forget set and the rest as the retain set. + +# 5. Results & Discussion + +We now report our main results comparing our method to existing methods across the manipulation types and datasets. Detailed method ablations and analyses of what can be achieved in this setting are reported in Appendix E.4. We also present consistent results on the GAT architecture in Appendix D.1. We show the robustness of Cognac to large + +Figure 4. Corrective Unlearning Results. We report the accuracy on the affected classes $\mathrm{Acc}_{\mathrm{aff}}$ across different fractions of the manipulation set known for deletion $(S_f / S_m)$ . Baseline methods perform poorly, except for GNNDelete, which achieves reasonable unlearning performance in some settings. $\mathrm{AC}_f^{\prime}$ DC and Finetune, despite not being graph-specific, perform much better. Cognac, which adds graph awareness to $\mathrm{AC}_f^{\prime}$ DC, archives SOTA across datasets and corrective fractions, unlearning the effect of the manipulation with just $5\%$ of the manipulation set known. +![](images/922733ccce1494b7c7dd20d53c16e97350f419ecfdb0d722f8d7059dbb5c6791.jpg) +Fraction Identified For Deletion $\left(\frac{S_f}{S_m}\right)$ + +![](images/3c6ad2efd1785ef1b9493067f77a91f24ae8109be0832f8c1efeb6579ff2f6ba.jpg) + +$S_{f}$ sizes, showing strong performance even with $38.96\%$ of total training nodes in $S_{f}$ for the PubMed dataset. + +Table 2. Accuracy averaged across $S_f / S_m$ on remaining distribution relative to the Original model. We find prior methods, especially GNNDelete, lead to large drops in $\mathrm{Acc}_{\mathrm{rem}}$ , while our methods Cognac and $\mathrm{AC}_4^{\angle}$ DC minimize the loss in $\mathrm{Acc}_{\mathrm{rem}}$ . + +
METHODCSCORA
EDGELABELEDGELABEL
ORIGINAL90.689.661.261.4
ORACLE-0.1+0.5-0.7-3.0
RETRAIN-1.4-0.1-2.4-5.7
Cognac-1.4-0.4-4.5-2.9
ACtDC-0.7-0.8-2.2-0.8
GNNDELETE-6.0-1.9-10.9-8.4
GIF-1.6-0.9-4.2-0.6
MEGU-0.5-2.8+0.0-6.5
UTU+0.0+0.0+0.0+0.0
SCRUB-0.9-0.7+0.0-4.8
+ +Figure 4 shows unlearning performance on the test set for manipulated classes $(\mathrm{Acc}_{\mathrm{aff}})$ upon varying the fraction of the manipulation set known for unlearning $(S_f / S_m)$ . Table 2 accompanies this, showing side-effects on utility. + +1. Existing unlearning methods perform poorly even when $|S_f| = |S_m|$ . Observing the rightmost points in Fig- + +ure 4, we can see across manipulation types and datasets that existing methods fail to improve $\mathrm{Acc}_{\mathrm{aff}}$ even when the whole manipulation set is known. UtU fails to unlearn the effects of either of the attacks, as simply unlinking on the forward pass does not sufficiently counteract the influence on neighbors and weights. Both SCRUB and MEGU use a KL Divergence Loss term to keep predictions on the remaining data close to the original model, which could be detrimental when done on unidentified manipulation set entities and other affected neighbors. Even though MEGU and GIF were evaluated on removing adversarial edges and GNNDelete also mentioned incorrect data as one of its key applications, they failed to recover performance when presented with targeted data manipulation. Interestingly, despite extensive hyperparameter searches, they are beaten by methods with no special graph components: the best baselines are $\mathrm{AC}_2^{\angle}$ DC and naive finetuning (Finetune) on the retain set: both achieve a performance similar to retraining in some of the evaluations. + +2. Corrective unlearning methods must perform better than Retrain. While both $\mathrm{AC}_4^{\prime}$ DC and Finetune match Retrain, all of them still fall far behind the Oracle model's performance in most evaluations, and are not consistent enough. This scope for improvement motivates the design of our method which performs well across attacks, datasets, and fractions identified for deletion. + +3. Cognac beats Retrain, and can sometimes match the Oracle's performance. We observe that Cognac consistently achieves state-of-the-art performance across all datasets and manipulations, convincingly and consistently beating existing graph methods, and often exceeds Retrain. Notably, Cognac occasionally even surpasses Oracle, our introduced gold standard, on multiple datasets and identified fractions - despite having access to less data (and unknown manipulated samples) than Oracle. In Table 3, we show how both components of Cognac complement each other. CoGN alone does not improve $\mathrm{Acc}_{\mathrm{aff}}$ over the original model, showing that while it effectively moves affected nodes, it lacks signals from labels. Conversely, $\mathrm{AC}_{\xi}^{\prime}\mathrm{DC}$ alone achieves better performance than CoGN, but is still far from matching the Oracle. $\mathrm{AC}_{\xi}^{\prime}\mathrm{DC}$ weakens incorrect learning signals and preserves task-relevant representations, while CoGN steers affected nodes away from manipulated ones. This highlights the effectiveness of our contrastive approach in achieving robust unlearning. + +4. Cognac performs strongly even with only $5\%$ of $\mathbf{S}_{\mathbf{m}}$ known. Cognac effectively recovers most of the accuracy on the affected distribution even when only $5\%$ of the manipulated set is known. Notably, it outperforms Retrain in realistic scenarios where $S_{m}$ is only partially known. We attribute this to Affected Neighborhood Identification, which leverages graph structure to infer manipulated nodes and edges beyond those explicitly identified. Additionally, CoGN plays a crucial role by pushing influenced neighbors away from the deletion set and aligning them with their unaffected neighbors, thereby correcting representations even for unknown manipulated samples. +5. Cognac scales well to significantly larger datasets. We evaluate Cognac on OGB-Arxiv, a significantly larger dataset than our other benchmarks with 170,000 nodes and over 1M edges, and observe that it continues to achieve strong performance. Despite the increased scale, Cognac maintains a substantial lead over Retrain across different fractions of $S_{m}$ (Figure 5 (a)), while the baseline methods + +Table 3. Ablating both components of Cognac across datasets. CoGN alone does not improve $\mathrm{Acc}_{\mathrm{aff}}$ over the original model. Conversely, $\mathrm{AC}_{\frac{1}{2}}\mathrm{DC}$ alone achieves better performance than CoGN, but is still far from matching the Oracle. These results show how both components are integral to Cognac's success. + +
METHODCSCORA
AccaffAccremAccaffAccrem
ORIGINAL44.389.851.460.6
ORACLE90.190.071.160.7
CoGN47.289.842.160.5
AC&DC67.286.659.961.3
Cognac79.382.375.556.6
+ +![](images/a0ae175f18007eabe68779aa9ef11d6b591cc490f6883b507303ce391906626f.jpg) +Figure 5. (a) Results on a larger dataset, OGB-Arxiv, and (b) Visualization of hidden layer embeddings after unlearning on CS dataset for node unlearning. (a) On the OGB-Arxiv dataset, Cognac outperforms retraining from scratch by more than $10\%$ , while most baselines fail to achieve any performance gains beyond the Original model. (b) The affected distribution embeddings (highlighted by red and blue) are fully entangled in the original trained model, while after unlearning with Cognac the embeddings are well separated and clustered, matching Oracle. + +![](images/a3060bf421eae29011bd12dee2f44d48d352fac7a9965bfdddc46f98b4f539c9.jpg) +Figure (b) + +![](images/9f32cb6f2fc48fff1b65e344266a857a50a75b098464cb41d37d2a66de63c1fa.jpg) + +fail to improve $\mathrm{Acc}_{\mathrm{aff}}$ over the original model. Even as dataset size grows, Cognac effectively retains its advantage, demonstrating its scalability and robustness. + +Overall, our work makes progress on the problem of corrective unlearning in graph neural networks with remarkably minimal training signal: we achieve strong unlearning with the knowledge of as little as (5%) of the manipulation set $S_{m}$ . The visualization of the hidden GNN layer embeddings after unlearning (Figure 5 (b)) shows that Cognac, like the Oracle model, achieves clear clustering of the manipulated class data points, validating our theoretical results shown in Section 3.1. + +# 6. Related Work + +Graph-based attacks, such as Sybil (Douceur, 2002) and link spam farms (Wu & Davison, 2005), have long affected the integrity of social networks and search engines. Recent works reveal that even state-of-the-art GNN architectures are vulnerable to simple attacks on the trained models, which either manipulate existing edges and nodes or inject new adversarial nodes (Sun et al., 2019; Dai et al., 2018; Zügner & Gunnemann, 2019; Geisler et al., 2024). Parallelly, works have characterized the influence of specific nodes and edges that can guide such attacks (Chen et al., 2023). One strategy to mitigate the influence of such attacks is robust pretraining, such as using adversarial training (Yuan et al., 2024; Zhang et al., 2023). Post-hoc interventions like unlearning act as a complementary layer of defense, helping model developers when attacks slip through and affect a trained model. + +Removing the impact of manipulated entities begins with their identification (Brodley & Friedl, 1999), for which multiple strategies exist like data attribution (Ilyas et al., + +2022), adversarial detection, and automated or human-in-the-loop anomaly detection (Northcutt et al., 2021). While approaches like model debiasing and concept erasure (Fan et al., 2024; Belrose et al., 2023) can remove effects of identified manipulations post-training, they require knowledge of the manipulation. In contrast, unlearning methods are particularly valuable in adversarial settings where corruption effects may be deliberately obfuscated and impact multiple model behaviors simultaneously (Paleka & Sanyal, 2023). + +Recently, machine unlearning has received newfound attention beyond privacy applications (Pawelczyk et al., 2024; Schoepf et al., 2024; Li et al., 2024a;b). Goel et al. (2024) demonstrated the distinction between the Corrective and Privacy-oriented unlearning settings for i.i.d. classification tasks, emphasizing challenges when not all manipulated data is identified for unlearning. + +Exact Unlearning arose in privacy applications, offering guaranteed removal of data influence through selective retraining (Chen et al., 2022b;a; Bourtoule et al., 2021). While perfect guarantees are valuable for privacy, the exponential cost of sequential deletions (Warnecke et al., 2023) becomes impractical as unlearning expands to broader challenges like model correction and debiasing (Pawelczyk et al., 2024; Schoepf et al., 2024; Li et al., 2024a). This has driven the development of Inexact Unlearning methods that balance effectiveness with scalability, using either theoretical bounds for simple models (Chien et al., 2022; Wu et al., 2023b) or empirical validation for deep networks (Wu et al., 2023a; Cheng et al., 2023; Li et al., 2024c). The recent formalization of Corrective Unlearning (Goel et al., 2024) opened a crucial new direction: removing corruption effects with only partial identification of manipulated data. We tackle this challenge in graphs, where the non-i.i.d. nature of data (Said et al., 2023) results in the graph elements exerting a strong influence on other elements in their neighborhood. + +# 7. Limitations and Conclusion + +Our work addresses corrective unlearning for GNNs, focusing on removing the effects of manipulated training data when only a fraction is identified. As our method relies on the homophily assumption and is evaluated primarily on homophilic datasets like previous works (Li et al., 2024c), it is left for future works to expand this to heterophilic datasets. While our method does not guarantee successful unlearning against arbitrary real-world attacks, our experiments suffice to show that existing unlearning methods struggle even with complete knowledge of manipulations, which is an unrealistic scenario. + +Cognac pushes the frontiers of unlearning by consistently beating retraining-from-scratch, and nearly matching the performance of a strong oracle on unlearning class con + +fusion manipulations with access to as little as $5\%$ of the manipulated data. We hope this sparks interesting future work on developing stronger evaluations and theoretical understanding for graph corrective unlearning in the GNN Robustness and Machine Unlearning community. + +# Acknowledgements + +Varshita Kolipaka is grateful to be funded by IHUB-Data. Arvindh Arun was funded by the CHIPS Joint Undertaking (JU) under grant agreement No. 101140087 (SMARTY), and by the German Federal Ministry of Education and Research (BMBF) under the sub-project with the funding number 16MEE0444, and acknowledges support from the International Max Planck Research School for Intelligent Systems (IMPRS-IS) and the European Laboratory for Learning and Intelligent Systems (ELLIS) PhD programs. + +The authors extend their appreciation to the members of the Precog research group, Shashwat Singh, Karuna Chandra, Pratyaksh Gautam, Prashant Kodali, and Makarand Tapaswi for helpful discussions and feedback. + +# Impact Statement + +The increasing adoption of Graph Neural Networks (GNNs) in real-world applications raises concerns about fairness and safety, particularly in settings where biased data propagates through message passing or incorrect information influences high-stakes decisions. From a fairness perspective, Cognac can be potentially used to mitigate the impact of biased social connections in recommender systems and hiring networks, where unfair edges or annotations may reinforce discriminatory patterns. From a safety standpoint, GNNs are increasingly used in drug discovery and biomedical applications, where incorrect relationships between molecular compounds or erroneous biological interactions could lead to misleading predictions. Corrective unlearning can help remove the influence of faulty training data or adversarially inserted edges, improving the reliability of GNN-based scientific models without compromising efficiency. + +# References + +Akiba, T., Sano, S., Yanase, T., Ohta, T., and Koyama, M. Optuna: A next-generation hyperparameter optimization framework. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, pp. 2623-2631, 2019. +Arun, A., Aanegola, A., Agrawal, A., Narayanam, R., and Kumaraguru, P. CAFIN: Centrality Aware Fairness inducing IN-processing for unsupervised representation learning on graphs. In Proceedings of the 26th European Conference on Artificial Intelligence, 2023. doi: + +10.3233/faia230259. URL http://dx.doi.org/10.3233/FAIA230259. +Arun, A., Kumar, S., Nayyeri, M., Xiong, B., Kumaraguru, P., Vergari, A., and Staab, S. Semma: A semantic aware knowledge graph foundation model, 2025. URL https://arxiv.org/abs/2505.20422. +Belrose, N., Schneider-Joseph, D., Ravfogel, S., Cotterell, R., Raff, E., and Biderman, S. LEACE: Perfect linear concept erasure in closed form. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=awIpKpwTwF. +Bojchevski, A. and Gunnemann, S. Deep gaussian embedding of graphs: Unsupervised inductive learning via ranking. In International Conference on Learning Representations, 2018. +Bojchevski, A. and Gunnemann, S. Adversarial attacks on node embeddings via graph poisoning. In International Conference on Machine Learning, pp. 695-704. PMLR, 2019a. +Bojchevski, A. and Gunnemann, S. Certifiable robustness to graph perturbations. Advances in Neural Information Processing Systems, 32, 2019b. +Bourtoule, L., Chandrasekaran, V., Choquette-Choo, C. A., Jia, H., Travers, A., Zhang, B., Lie, D., and Papernot, N. Machine unlearning. In IEEE S&P, 2021. +Brodley, C. E. and Friedl, M. A. Identifying mislabeled training data. Journal of artificial intelligence research, 11:131-167, 1999. +Chen, C., Sun, F., Zhang, M., and Ding, B. Recommendation unlearning. In Proceedings of the ACM Web Conference 2022, pp. 2768-2777, 2022a. +Chen, M., Zhang, Z., Wang, T., Backes, M., Humbert, M., and Zhang, Y. Graph unlearning. In Proceedings of the 2022 ACM SIGSAC conference on computer and communications security, pp. 499-513, 2022b. +Chen, Z., Li, P., Liu, H., and Hong, P. Characterizing the influence of graph elements. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=51GxyzOKOp. +Cheng, J., Dasoulas, G., He, H., Agarwal, C., and Zitnik, M. GNNDelete: A general unlearning strategy for graph neural networks. In International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=X9yCkmT5Qrl. + +Chien, E., Pan, C., and Milenkovic, O. Efficient model updates for approximate unlearning of graph-structured data. In The Eleventh International Conference on Learning Representations, 2022. +Dai, H., Li, H., Tian, T., Huang, X., Wang, L., Zhu, J., and Song, L. Adversarial attack on graph structured data. In Dy, J. and Krause, A. (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 1115-1124. PMLR, 10-15 Jul 2018. +Douceur, J. R. The sybil attack. In International workshop on peer-to-peer systems, pp. 251-260. Springer, 2002. +Fan, S., Wang, X., Mo, Y., Shi, C., and Tang, J. Debiasing graph neural networks via learning disentangled causal substructure. In Proceedings of the 36th International Conference on Neural Information Processing Systems, NIPS '22, Red Hook, NY, USA, 2024. Curran Associates Inc. ISBN 9781713871088. +Geisler, S., Schmidt, T., Širin, H., Zügner, D., Bojchevski, A., and Gunnemann, S. Robustness of graph neural networks at scale. In Proceedings of the 35th International Conference on Neural Information Processing Systems, NIPS '21, Red Hook, NY, USA, 2024. Curran Associates Inc. ISBN 9781713845393. +Goel, S., Prabhu, A., Sanyal, A., Lim, S.-N., Torr, P., and Kumaraguru, P. Towards adversarial evaluations for inexact machine unlearning. arXiv preprint arXiv:2201.06640, 2022. +Goel, S., Prabhu, A., Torr, P., Kumaraguru, P., and Sanyal, A. Corrective machine unlearning. Transactions on Machine Learning Research, 2024. ISSN 2835-8856. URL https://openreview.net/forum?id=v8enu4jP9B. +Gosch, L., Sturm, D., Geisler, S., and Gunnemann, S. Revisiting robustness in graph machine learning. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=h1o7Ry9Zctm. +Gu, T., Dolan-Gavitt, B., and Garg, S. Badnets: Identifying vulnerabilities in the machine learning model supply chain. arXiv preprint arXiv:1708.06733, 2017. +Gunnemann, S. Graph neural networks: Adversarial robustness. Graph neural networks: foundations, frontiers, and applications, pp. 149-176, 2022. +Hamilton, W., Ying, Z., and Leskovec, J. Inductive representation learning on large graphs. Advances in neural information processing systems, 30, 2017. + +Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., and Hochreiter, S. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in neural information processing systems, 30, 2017. +Ilyas, A., Park, S. M., Engstrom, L., Leclerc, G., and Madry, A. Datamodels: Understanding predictions with data and data with predictions. In Chaudhuri, K., Jegelka, S., Song, L., Szepesvari, C., Niu, G., and Sabato, S. (eds.), Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pp. 9525-9587. PMLR, 17-23 Jul 2022. URL https://proceedings.mlrpress/v162/ilyas22a.html. +Jin, W., Ma, Y., Liu, X., Tang, X., Wang, S., and Tang, J. Graph structure learning for robust graph neural networks. In Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining, pp. 66-74, 2020. +Kipf, T. N. and Welling, M. Semi-supervised classification with graph convolutional networks, 2017. +Konstantinov, N. H. and Lampert, C. Fairness-aware pac learning from corrupted data. JMLR, 2022. +Kurmanji, M., Triantafillou, P., and Triantafillou, E. Towards unbounded machine unlearning. NeurIPS, 2023. +Lee, C., Chang, J., and Sohn, J.-y. Analysis of using sigmoid loss for contrastive learning. In Dasgupta, S., Mandt, S., and Li, Y. (eds.), Proceedings of The 27th International Conference on Artificial Intelligence and Statistics, volume 238 of Proceedings of Machine Learning Research, pp. 1747-1755. PMLR, 02-04 May 2024. URL https://proceedings.mlr.press/v238/lee24a.html. +Li, N., Pan, A., Gopal, A., Yue, S., Berrios, D., Gatti, A., Li, J. D., Dombrowski, A.-K., Goel, S., Mukobi, G., et al. The wmdp benchmark: Measuring and reducing malicious use with unlearning. In International Conference on Machine Learning, pp. 28525-28550. PMLR, 2024a. +Li, W., Li, J., de Witt, C. S., Prabhu, A., and Sanyal, A. Delta-influence: Unlearning poisons via influence functions, 2024b. URL https://arxiv.org/abs/2411.13731. +Li, X., Zhao, Y., Wu, Z., Zhang, W., Li, R.-H., and Wang, G. Towards effective and general graph unlearning via mutual evolution. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 13682-13690, 2024c. + +Lingam, V., Akhondzadeh, M. S., and Bojchevski, A. Rethinking label poisoning for GNNs: Pitfalls and attacks. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=J7ioefqDPw. +Ma, Y., Liu, X., Shah, N., and Tang, J. Is homophily a necessity for graph neural networks? In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=ucASPPD9GKN. +Maini, P., Feng, Z., Schwarzschild, A., Lipton, Z. C., and Kolter, J. Z. TOFU: A task of fictitious unlearning for LLMs. In First Conference on Language Modeling, 2024. URL https://openreview.net/forum?id=B41hNBoWLo. +Mao, H., Chen, Z., Tang, W., Zhao, J., Ma, Y., Zhao, T., Shah, N., Galkin, M., and Tang, J. Position: Graph foundation models are already here. In *Forty-first International Conference on Machine Learning*, 2024. +Northcutt, C. G., Athalye, A., and Mueller, J. Pervasive label errors in test sets destabilize machine learning benchmarks. In NeurIPS, 2021. +Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., et al. Training language models to follow instructions with human feedback. Advances in neural information processing systems, 35:27730-27744, 2022. +Paleka, D. and Sanyal, A. A law of adversarial risk, interpolation, and label noise. In ICLR, 2023. +Pawelczyk, M., Di, J. Z., Lu, Y., Kamath, G., Sekhari, A., and Neel, S. Machine unlearning fails to remove data poisoning attacks. arXiv preprint arXiv:2406.17216, 2024. +Said, A., Derr, T., Shabbir, M., Abbas, W., and Koutsoukos, X. A survey of graph unlearning. arXiv preprint arXiv:2310.02164, 2023. +Sanyal, A., Dokania, P. K., Kanade, V., and Torr, P. How benign is benign overfitting? In ICLR, 2021. +Sanyal, A., Hu, Y., and Yang, F. How unfair is private learning? In Uncertainty in Artificial Intelligence, 2022. +Schoepf, S., Foster, J., and Brintrup, A. Potion: Towards poison unlearning. Journal of Data-centric Machine Learning Research, 2024. URL https://openreview.net/forum?id=4eSiRnWWaF. +Sun, Y., Wang, S., Tang, X., Hsieh, T.-Y., and Honavar, V. Node injection attacks on graphs via reinforcement learning. arXiv preprint arXiv:1909.06543, 2019. + +Tan, J., Sun, F., Qiu, R., Su, D., and Shen, H. Unlink to unlearn: Simplifying edge unlearning in gnns. In Companion Proceedings of the ACM on Web Conference 2024, pp. 489-492, 2024. +Veličković, P., Cucurull, G., Casanova, A., Romero, A., Lio, P., and Bengio, Y. Graph attention networks. In International Conference on Learning Representations, 2018. +Wang, K., Shen, Z., Huang, C., Wu, C.-H., Dong, Y., and Kanakia, A. Microsoft academic graph: When experts are not enough. *Quantitative Science Studies*, 1(1):396-413, 2020. +Warnecke, A., Pirch, L., Wressnegger, C., and Rieck, K. Machine unlearning of features and labels. In Proc. of the 30th Network and Distributed System Security (NDSS), 2023. +Wu, B. and Davison, B. D. Identifying link farm spam pages. In *Special Interest Tracks and Posters of the 14th International Conference on World Wide Web*, WWW '05, pp. 820-829, New York, NY, USA, 2005. Association for Computing Machinery. ISBN 1595930515. doi: 10.1145/1062745.1062762. URL https://doi.org/10.1145/1062745.1062762. +Wu, J., Yang, Y., Qian, Y., Sui, Y., Wang, X., and He, X. +Gif: A general graph unlearning strategy via influence function. In Proceedings of the ACM Web Conference 2023, pp. 651-661, 2023a. +Wu, K., Shen, J., Ning, Y., Wang, T., and Wang, W. H. Certified edge unlearning for graph neural networks. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 2606-2617, 2023b. +Wu, S., Sun, F., Zhang, W., Xie, X., and Cui, B. Graph neural networks in recommender systems: A survey. ACM Comput. Surv., 55(5), December 2022. ISSN 0360-0300. doi: 10.1145/3535101. URL https://doi.org/10.1145/3535101. +Xi, Z., Du, T., Li, C., Pang, R., Ji, S., Luo, X., Xiao, X., Ma, F., and Wang, T. On the security risks of knowledge graph reasoning. In Proceedings of the 32nd USENIX Conference on Security Symposium, SEC '23, USA, 2023. USENIX Association. ISBN 978-1-939133-37-3. +Yao, Y., Xu, X., and Liu, Y. Large language model unlearning. Advances in Neural Information Processing Systems, 37:105425-105475, 2024. +Yuan, X., Zhang, C., Tian, Y., Ye, Y., and Zhang, C. Mitigating emergent robustness degradation while scaling + +graph learning. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=Koh0i2u8qX. +Zhang, C., Tian, Y., Ju, M., Liu, Z., Ye, Y., Chawla, N., and Zhang, C. Chasing all-round graph representation robustness: Model, training, and optimization. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=7jk5gWjC18M. +Zhang, H., Zheng, T., Gao, J., Miao, C., Su, L., Li, Y., and Ren, K. Data poisoning attack against knowledge graph embedding. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, pp. 4853-4859. International Joint Conferences on Artificial Intelligence Organization, 7 2019. doi: 10.24963/ijcai.2019/674. URL https://doi.org/10.24963/ijcai.2019/674. +Zhang, Z., Chen, L., Zhong, F., Wang, D., Jiang, J., Zhang, S., Jiang, H., Zheng, M., and Li, X. Graph neural network approaches for drug-target interactions. Current Opinion in Structural Biology, 73:102327, 2022. ISSN 0959-440X. doi: https://doi.org/10.1016/j.sbi.2021.102327. URL https://www.sciencedirect.com/science/article/pii/S0959440X2100169X. +Zhao, T., Chen, J., Ru, Y., Lin, Q., Geng, Y., and Liu, J. Untargeted adversarial attack on knowledge graph embeddings. In Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval, pp. 1701-1711, 2024. +Zügner, D. and Gunnemann, S. Adversarial attacks on graph neural networks via meta learning. In International Conference on Learning Representations (ICLR), 2019. +Züigner, D., Akbarnejad, A., and Gunnemann, S. Adversarial attacks on neural networks for graph data. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD '18, pp. 2847-2856, New York, NY, USA, 2018. Association for Computing Machinery. ISBN 9781450355520. doi: 10.1145/3219819.3220078. URL https://doi.org/10.1145/3219819.3220078. + +# Appendix + +# A. Proof of Theoretical Results + +A.1. Proof of Receptive Field Theorem 14 +A.2. Proof of Convergence Theorem 14 +A.3. Proof of IC Attack Theorem 16 + +B. Data Manipulation Statistics 17 + +C. Formal Description of Cognac 19 + +# D. Results Showing The Breadth of Applicability + +D.1. Results on GAT 18 +D.2. Performance on large $S_{f}$ 20 +D.3. Results on a trigger poisoning attack 20 + +# E. Convergence and Ablations + +E.1. Convergence Analysis 20 +E.2. Analysis of Affected Neighbors Method 21 +E.3. Comparing our sampling method to MEGU's 21 +E.4. Analysis of Accaff Reduction 22 + +# F. Detailed Experimental Setup + +F.1. Hyperparameter Tuning 23 +F.2.Unlearning Times 24 + +# A. Proof of Theoretical Results + +# A.1. Proof of Lemma 3.2 + +Lemma. Let $G = (V, E)$ be an undirected graph, and let $\mathcal{N}(v)$ denote the 1-hop neighborhood of node $v$ . For a node $s \in V$ , let $\mathcal{N}^n(s)$ denote the $n$ -hop neighborhood of $s$ , defined recursively as: + +$$ +\mathcal {N} ^ {n} (s) = \left\{ \begin{array}{l l} \{s \} & i f n = 0, \\ \bigcup_ {v \in \mathcal {N} ^ {n - 1} (s)} \mathcal {N} (v) & i f n > 0 \end{array} \right. +$$ + +In an $n$ -layer GNN, the representation $z_{s}$ of node $s$ can affect the representations $z_{v}$ of nodes $v$ only if $v \in \mathcal{N}^{n}(s)$ . For any $v \notin \mathcal{N}^{n}(s)$ , $z_{v}$ is independent of $z_{s}$ . + +Proof. We prove the claim by induction on the number of layers $l$ in the GNN. + +# Base Case $(l = 0)$ : + +At layer $l = 0$ , the representation of a node $v$ , $h_v^{(0)}$ , is initialized based only on the node's features. Thus, $z_s = h_s^{(0)}$ can only affect $h_s^{(0)}$ itself, and no other node $v \neq s$ is affected. + +# Inductive Hypothesis: + +Assume that at layer $l$ , the representation $z_{s} = h_{s}^{(l)}$ affects only the representations $h_v^{(l)}$ of nodes $v \in \mathcal{N}^l (s)$ , the $l$ -hop neighborhood of $s$ . + +# Inductive Step: + +At layer $l + 1$ , the representation $h_v^{(l + 1)}$ of a node $v$ is computed as: + +$$ +h _ {v} ^ {(l + 1)} = \phi \left(h _ {v} ^ {(l)}, \psi \left(\left\{h _ {u} ^ {(l)}: u \in \mathcal {N} (v) \right\}\right)\right) +$$ + +By the inductive hypothesis, $h_u^{(l)}$ depends only on nodes in $\mathcal{N}^l(u)$ . Therefore, $h_v^{(l+1)}$ depends on nodes in: + +$$ +\bigcup_ {u \in \mathcal {N} (v)} \mathcal {N} ^ {l} (u) +$$ + +Since $\mathcal{N}^{l + 1}(v) = \bigcup_{u\in \mathcal{N}(v)}\mathcal{N}^l (u),h_v^{(l + 1)}$ depends only on nodes in $\mathcal{N}^{l + 1}(v)$ . + +For $v$ to be influenced by $z_{s}$ , there must exist a path of length at most $l + 1$ from $s$ to $v$ , i.e., $v \in \mathcal{N}^{l + 1}(s)$ . + +# Conclusion: + +By induction, after $n$ layers, $z_{s}$ can only affect nodes in $\mathcal{N}^n (s)$ . For any $v\notin \mathcal{N}^n (s)$ , the representation $z_{v}$ is independent of $z_{s}$ . + +# A.2. Proof of Theorem 3.3 + +Theorem. Let $\theta \in \mathbb{R}^d$ parameterize a GNN generating embeddings $z_v, z_p, z_n \in \mathbb{R}^k$ for triplets $(v, p, n)$ . Let $\mathcal{L}(\theta) = -\mathbb{E}\left[\log \sigma(z_v^\top z_p) + \log \sigma(-z_v^\top z_n)\right]$ and $S(\theta) = \mathbb{E}\left[z_v^\top z_p - z_v^\top z_n\right]$ . + +Then under the assumptions stated below, gradient descent on $\mathcal{L}(\theta)$ with step size $\eta \leq \frac{1}{L}$ (where $L$ is the Lipschitz constant of $\nabla_{\theta}\mathcal{L}$ ) guarantees: + +$$ +S \left(\theta_ {t + 1}\right) \geq S \left(\theta_ {t}\right) \quad \forall t \geq 0, +$$ + +and at convergence, $S(\theta^{*}) > S(\theta_{0})$ + +Assumption A.1 (Differentiability). $z_v^\top z_p$ and $z_v^\top z_n$ are differentiable in $\theta$ . + +Assumption A.2 (Convexity). $\mathcal{L}(\theta)$ is convex in $\theta$ . + +Assumption A.3 (Bounded Gradients). $\| \nabla_{\theta}(z_v^\top z_p)\| \leq G$ and $\| \nabla_{\theta}(z_v^\top z_n)\| \leq G$ for some $G > 0$ . + +Proof. Let $a = z_v^\top z_p$ and $b = z_v^\top z_n$ . Then: + +$$ +\mathcal {L} (\theta) = - \mathbb {E} [ \log \sigma (a) + \log \sigma (- b) ] +$$ + +Under Assumption 1 and using $\frac{d}{dx} (\log \sigma(x)) = 1 - \sigma(x)$ and $\frac{d}{dx} (\log \sigma(-x)) = -\sigma(x)$ , we compute: + +$$ +\nabla_ {\theta} \mathcal {L} = - \mathbb {E} \left[ \underbrace {(1 - \sigma (a))} _ {\text {P o s i t i v e}} \nabla_ {\theta} a - \underbrace {\sigma (b)} _ {\text {P o s i t i v e}} \nabla_ {\theta} b \right] +$$ + +The gradient of $S(\theta)$ is: + +$$ +\nabla_ {\theta} S = \mathbb {E} \left[ \nabla_ {\theta} a - \nabla_ {\theta} b \right] +$$ + +The gradient of $\mathcal{L}$ can be rewritten as: + +$$ +\nabla_ {\theta} \mathcal {L} = - \mathbb {E} [ \sigma (- a) \nabla_ {\theta} a - \sigma (b) \nabla_ {\theta} b ] +$$ + +Both $\sigma(-a)$ and $\sigma(b)$ are positive for all finite $a, b$ . Thus, $\nabla_{\theta} \mathcal{L}$ is a negatively weighted combination of $\nabla_{\theta} a$ and $\nabla_{\theta} b$ , while $\nabla_{\theta} S$ is their unweighted difference. + +Next, we show the monotonic improvement of $S(\theta)$ . Consider a gradient descent update: + +$$ +\theta_ {t + 1} = \theta_ {t} - \eta \nabla_ {\theta} \mathcal {L} +$$ + +The change in $S(\theta)$ is: + +$$ +\Delta S = S \left(\theta_ {t + 1}\right) - S \left(\theta_ {t}\right) +$$ + +To simplify the analysis, we'll use a first-order approximation. Specifically, for small updates, we approximate: + +$$ +S (\theta_ {t + 1}) \approx S (\theta_ {t}) + \langle \nabla_ {\theta} S, \theta_ {t + 1} - \theta_ {t} \rangle , +$$ + +where $\langle \cdot ,\cdot \rangle$ denotes the inner product. Substituting $\theta_{t + 1} = \theta_t - \eta \nabla_\theta \mathcal{L}(\theta_t)$ , we get: + +$$ +\Delta S \approx - \eta \langle \nabla_ {\theta} S, \nabla_ {\theta} \mathcal {L} \rangle +$$ + +Substituting $\nabla_{\theta}S$ and $\nabla_{\theta}\mathcal{L}$ + +$$ +\langle \nabla_ {\theta} S, \nabla_ {\theta} \mathcal {L} \rangle = \mathbb {E} [ (\nabla_ {\theta} a - \nabla_ {\theta} b) ^ {\top} ((1 - \sigma (a)) \nabla_ {\theta} a - \sigma (b) \nabla_ {\theta} b) ] +$$ + +$$ +\Delta S \approx \eta \mathbb {E} [ \sigma (- a) \| \nabla_ {\theta} a \| ^ {2} + \sigma (b) \| \nabla_ {\theta} b \| ^ {2} - \sigma (- a) \nabla_ {\theta} b ^ {\top} \nabla_ {\theta} a - \sigma (b) \nabla_ {\theta} a ^ {\top} \nabla_ {\theta} b ] +$$ + +But since the dot product is commutative for real-valued column vectors, i.e., $\nabla_{\theta}b^{\top}\nabla_{\theta}a = \nabla_{\theta}a^{\top}\nabla_{\theta}b$ + +$$ +\Delta S \approx \eta \mathbb {E} [ \sigma (- a) \| \nabla_ {\theta} a \| ^ {2} + \sigma (b) \| \nabla_ {\theta} b \| ^ {2} - (\sigma (- a) + \sigma (b)) (\nabla_ {\theta} a ^ {\top} \nabla_ {\theta} b) ] +$$ + +This expression contains both positive and negative terms. However, we now use the fact that the sigmoid function $\sigma(x)$ satisfies $0 < \sigma(x) < 1$ for all real values of $x$ , which means: + +$$ +((1 - \sigma (a)) = \sigma (- a) > 0) f o r (a \in \mathbb {R}) a n d (\sigma (b) > 0) f o r (b \in \mathbb {R}) +$$ + +Thus, both terms $\sigma(-a)\|\nabla_{\theta}a\|^2$ and $\sigma(b)\|\nabla_{\theta}b\|^2$ are positive. On the other hand, the cross-product terms $\nabla_{\theta}a^\top \nabla_{\theta}b$ might be negative, but their magnitude is bounded by the gradients $\|\nabla_{\theta}a\|$ and $\|\nabla_{\theta}b\|$ , which are constrained by the assumption of bounded gradients (Assumption 3). Under this assumption, the gradients $\|\nabla_{\theta}a\|$ and $\|\nabla_{\theta}b\|$ are bounded by $G$ , i.e., $\|\nabla_{\theta}a\| \leq G$ and $\|\nabla_{\theta}b\| \leq G$ . Therefore, the cross-product terms are also bounded: + +$$ +| \nabla_ {\theta} a ^ {\top} \nabla_ {\theta} b | \leq G ^ {2} +$$ + +Now we can write the change in $S(\theta)$ as: + +$$ +\Delta S \approx \eta \mathbb {E} \left[ \sigma (- a) \| \nabla_ {\theta} a \| ^ {2} + \sigma (b) \| \nabla_ {\theta} b \| ^ {2} - 2 G ^ {2} \right] +$$ + +For sufficiently small $\eta$ , the positive terms $\sigma(-a)\|\nabla_{\theta}a\|^2$ and $\sigma(b)\|\nabla_{\theta}b\|^2$ will dominate the cross-product terms, ensuring that $\Delta S \geq 0$ . + +$$ +\Delta S \geq \eta \mathbb {E} \left[ \sigma (- a) \| \nabla_ {\theta} a \| ^ {2} + \sigma (b) \| \nabla_ {\theta} b \| ^ {2} - 2 G ^ {2} \right] +$$ + +For sufficiently small $\eta$ , $\Delta S \geq 0$ . Thus, $S(\theta_{t+1}) \geq S(\theta_t)$ . + +By convexity (Assumption 2), gradient descent converges to a global minimum $\theta^{*}$ where $\nabla_{\theta}\mathcal{L}(\theta^{*}) = 0$ . At $\theta^{*}$ : + +$$ +\mathbb {E} \left[ \sigma (- a) \nabla_ {\theta} a \right] = \mathbb {E} \left[ \sigma (b) \nabla_ {\theta} b \right] +$$ + +This equality holds only if $\sigma(-a) \to 0$ and $\sigma(b) \to 0$ , which occurs when $a \to \infty$ and $b \to -\infty$ . Thus: + +$$ +S (\theta^ {*}) = \mathbb {E} \left[ z _ {v} ^ {\top} z _ {p} - z _ {v} ^ {\top} z _ {n} \right] \geq S (\theta_ {0}) +$$ + +Strict inequality $S(\theta^{*}) > S(\theta_{0})$ follows from the monotonic improvement at each step. + +# A.3. Proof of Theorem 3.1 + +Theorem. Let $G = (V, E, X)$ be a graph with node set $V$ , edge set $E$ , and features $X$ . Let $C_1, C_2 \subset V$ be two distinct classes with ground-truth labels $y_i \in \{C_1, C_2\}$ . Suppose an Interclass Confusion (IC) attack is applied as follows: + +1. Select subsets $S'C_1 \subset C_1$ and $S'C_2 \subset C_2$ , each of size $\frac{n}{2}$ , forming $S' = S'C_1 \cup S'C_2$ . +2. Swap labels of $\alpha =$ fraction of $S^{\prime}$ creating a confused set $S_{f}$ +3. Train a GNN model $M$ on $(S\setminus S^{\prime})\cup S_{f}$ + +Let $\phi_M(C_1),\phi_M(C_2)\in \mathbb{R}^d$ denote the mean embeddings of $C_1$ and $C_2$ , and $\mathcal{D}(\phi_M(C_1),\phi_M(C_2))$ be the Wasserstein-2 distance between their embedding distributions. Assume: + +Assumption A.1 (Homophily preserving GNNs). The GNN uses $L$ -layers of homophily-preserving message passing (e.g., mean aggregation). + +Assumption A.2 (Homophily). The graph exhibits $\eta$ -homophily, where intra-class edge density dominates inter-class. + +Assumption A.3 (Cross-Entropy Loss). The loss function $\mathcal{L}$ includes cross-entropy and graph smoothness regularization. + +Then, there exists a degradation term $\Delta > 0$ such that: + +$$ +\mathbb {E} \left[ \mathcal {D} \left(\phi_ {M} \left(C _ {1}\right), \phi_ {M} \left(C _ {2}\right)\right) \right] \leq \mathbb {E} \left[ \mathcal {D} \left(\phi_ {M _ {\text {c l e a n}}} \left(C _ {1}\right), \phi_ {M _ {\text {c l e a n}}} \left(C _ {2}\right)\right) \right] - \Delta , +$$ + +where $\Delta \propto \alpha \cdot \eta \cdot \left(1 - \frac{1}{L}\right)$ . + +# Proof. Step 1: Embedding Process Formalization + +The GNN computes node embeddings via $L$ -layer message passing. For node $v$ , the embedding $\phi^{(l)}(v)$ at layer $l$ is: + +$$ +\phi^ {(l)} (v) = \sigma \left(\mathbf {W} ^ {(l)} \cdot \operatorname {A G G} \left(\{\phi^ {(l - 1)} (u) \mid u \in \mathcal {N} (v) \}\right)\right), +$$ + +where AGG is a mean aggregator, $\mathbf{W}^{(l)}$ are learnable weights, and $\sigma$ is a nonlinearity. The final embedding $\phi_M(v) = \phi^{(L)}(v)$ . + +# Step 2: Loss Function and Label Noise + +The training loss $\mathcal{L} = \mathcal{L}_{\mathrm{CE}} + \lambda \mathcal{L}_{\mathrm{reg}}$ where: + +- $\mathcal{L}_{\mathrm{CE}} = -\frac{1}{|S|}\sum_{v\in S}y_v\log \hat{y}_v$ (cross-entropy) +- $\mathcal{L}_{\mathrm{reg}} = \frac{1}{|E|}\sum_{(u,v)\in E}\|\phi_M(u) - \phi_M(v)\|^2$ (smoothness regularization) + +For $S_f$ , labels $y_v$ are swapped between $C_1$ and $C_2$ . Let $\mathcal{E}_{\mathrm{noise}} = \{v \in S_f \mid y_v \text{ is incorrect}\}$ . The corrupted $\mathcal{L}_{\mathrm{CE}}$ forces conflicting gradients for $v \in \mathcal{E}_{\mathrm{noise}}$ , pulling $\phi_M(v)$ toward the wrong class centroid. + +# Step 3: Bias in Mean Embeddings + +Let $\mu_{C_1},\mu_{C_2}$ be the mean embeddings of $C_1,C_2$ under $M_{\mathrm{clean}}$ . After IC attack, for $v\in \mathcal{E}_{\mathrm{noise}}$ : + +$$ +\mathbb {E} \left[ \phi_ {M} (v) \right] = \alpha \mu_ {C _ {2}} + (1 - \alpha) \mu_ {C _ {1}} \quad (\text {i f} v \in C _ {1}) +$$ + +By linearity of expectation, the perturbed mean for $C_1$ becomes: + +$$ +\mu_ {C _ {1}} ^ {\prime} = \mu_ {C _ {1}} - \alpha \left(\mu_ {C _ {1}} - \mu_ {C _ {2}}\right) +$$ + +Similarly, $\mu_{C_2}' = \mu_{C_2} + \alpha (\mu_{C_1} - \mu_{C_2})$ . Thus, the distance between means reduces by $2\alpha \| \mu_{C_1} - \mu_{C_2}\|$ . + +# Step 4: Message-Passing Amplification + +Under $\eta$ -homophily (where $\eta$ is the 'extent' of homophily), neighbors of $v \in \mathcal{E}_{\mathrm{noise}}$ are likely in $C_1$ . The smoothness term $\mathcal{L}_{\mathrm{reg}}$ propagates the corrupted embedding of $v$ to its neighbors, perturbing their embeddings. After $L$ layers, the influence of $\mathcal{E}_{\mathrm{noise}}$ spreads to $\sim \eta^L |V|$ nodes. This amplifies the mean embedding shift by a factor $\eta \left(1 - \frac{1}{L}\right)$ . + +# Step 5: Wasserstein Distance Bound + +The Wasserstein-2 distance between $\phi_M(C_1)$ and $\phi_M(C_2)$ is dominated by the mean shift and covariance distortion. Using the Fréchet inequality: + +$$ +\mathcal {D} ^ {2} \leq \left\| \mu_ {C _ {1}} ^ {\prime} - \mu_ {C _ {2}} ^ {\prime} \right\| ^ {2} + \operatorname {T r} \left(\Sigma_ {C _ {1}} + \Sigma_ {C _ {2}} - 2 \left(\Sigma_ {C _ {1}} \Sigma_ {C _ {2}}\right) ^ {1 / 2}\right) +$$ + +From Steps 3 and 4, $\| \mu_{C_1}' - \mu_{C_2}'\|^2 = (1 - 2\alpha \eta (1 - \frac{1}{L}))\| \mu_{C_1} - \mu_{C_2}\|^2$ . Thus, + +$$ +\mathbb {E} \left[ \mathcal {D} \left(\phi_ {M} \left(C _ {1}\right), \phi_ {M} \left(C _ {2}\right)\right) \right] \leq \mathbb {E} \left[ \mathcal {D} \left(\phi_ {M _ {\text {c l e a n}}} \left(C _ {1}\right), \phi_ {M _ {\text {c l e a n}}} \left(C _ {2}\right)\right) \right] - \Delta , +$$ + +where $\Delta = \alpha \eta \left(1 - \frac{1}{L}\right)\| \mu_{C_1} - \mu_{C_2}\|^2$ + +# Conclusion + +The IC attack reduces the separability of $C_1$ and $C_2$ in the embedding space by biasing their mean embeddings toward each other and amplifying this bias via graph convolutions. The degradation $\Delta$ scales with $\alpha$ , $\eta$ , and the depth $L$ , confirming representation entanglement. + +# B. Data Manipulation Statistics + +Table 4 presents the manipulation statistics for all datasets used in our study. We introduce a significant variation in the degree of manipulation to achieve two key objectives: (1) in some datasets, a lower percentage of manipulated nodes or edges is sufficient to induce noticeable performance degradation, while others require more extensive modifications, and (2) we aim to evaluate unlearning performance across a broad spectrum of manipulation scales. For instance, PubMed undergoes the highest level of manipulation, with nearly $39\%$ of training nodes affected and $33.84\%$ additional edges introduced, whereas datasets like CS and CoraFull experience minimal modifications. Additionally, for OGB-Arxiv, a significantly larger dataset, only $3.14\%$ of training nodes are manipulated. This diverse manipulation strategy ensures a rigorous and comprehensive evaluation of unlearning effectiveness across different graph structures. + +# C. Formal Description of Cognac + +In this section, we outline the procedure of our proposed unlearning method, Cognac, designed to effectively remove the influence of manipulated data from GNNs. First, the algorithm identifies the nodes affected by the manipulation, as well as + +Table 4. Dataset manipulation statistics. Statistics of manipulations across datasets. The percentage of nodes and edges added are relative to the existing number of training nodes and the number of edges in the graph, respectively. + +
DATASETTRAINING NODESNODES MANIPULATED (%)EDGES ADDED (%)
CORAFULL11,2801.451.20
CORA1,49114.8817.26
CITESEER1,27214.7820.38
DBLP9,71410.505.78
PUBMED11,83038.9633.84
OGB-ARXIV90,9413.14-
CS10,9992.251.83
PHYSICS20,6958.175.04
PHOTOS4,49211.405.04
COMPUTERS8,0283.140.814
+ +![](images/540bea116f688135e00e59bc8f678c2bf053ecc573689ab3be0821352ad950b8.jpg) +Figure 6. Node Unlearning results for Cora with GAT backbone. Comparison of Acc $_{\text{aff}}$ for the unlearning methods on GAT trained on Cora for different values of $(S_f / S_m)$ . We see that Cognac outperforms all baselines. + +their corresponding positive and negative samples, and then alternates between applying CoGN and $\mathrm{AC}_{\xi}^{\angle}$ DC to unlearn their influence. The key steps include identifying the affected nodes, performing contrastive learning to re-optimize the embeddings, and minimizing classification loss on the unaffected nodes while maximizing it on the discovered manipulated set $(S_{f})$ . The complete algorithm is detailed in Algorithm 1. + +# D. Results Showing The Breadth of Applicability of Cognac + +# D.1. Results on GAT + +To provide a comprehensive comparison between Cognac and other methods, we provide results on commonly used GNN backbone architectures - GCN and GAT. + +Graph Convolutional Network (GCN) is a method for semi-supervised classification of graph-structured data. It employs an efficient layer-wise propagation rule derived from a first-order approximation of spectral convolutions on graphs. + +Graph Attention Network (GAT) employs computationally efficient masked self-attention layers that assign varying importance to neighborhood nodes without needing the complete graph structure upfront, thereby overcoming many theoretical limitations of earlier spectral-based methods. + +Figure 6 shows that Cognac also performs competitively with a GAT backbone. When $5\%$ of $S_{m}$ is known, SCRUB performs similarly to Cognac, within the standard deviation. For higher fractions, we achieve greater $\mathrm{Acc}_{\mathrm{aff}}$ than the benchmark graph unlearning methods with large margins, often beating the performance of retraining the GNN from scratch. These results indicate that benchmark graph unlearning methods used for comparison cannot recover from the impact of the label flip poison. In contrast, our method is much closer to Oracle's performance. + +Algorithm 1 COGNAC +Require: GNN M, Graph $G = (V,E,X)$ ,Deletion set $S_{f}$ ,Hyperparameters $\Theta$ +Ensure:Unlearned GNN $M^{*}$ +1: $S\gets$ IDENTIFYAFFECTEDNODES $(M,X,S_f,E,\Theta)$ +2: $P\gets$ SAMPLEPOSITIVES $(S,E,S_f)$ +3: $N\gets$ SAMPLENEGATIVES $(S,S_f)$ +4: // Overall unlearning process +5: for outer_epoch $= 1$ to $\Theta_{\mathrm{total\_epo}}$ chs do +6: //Contrastive unlearning phase +7: for epoch $= 1$ to $\Theta_{\mathrm{contrast\_epo}}$ chs do +8: $Z\gets M(X)$ +9: $\mathcal{L}_c\gets \sum_{v\in S}(-\log (\sigma (Z_v^T Z_P)) - \log (\sigma (-Z_v^T Z_N)))$ +10: $M\gets$ OPTIMIZE(M, $\mathcal{L}_c$ +11: end for +12: // Gradient ascent on $S_{f}$ , and gradient descent on $V\setminus S_{f}$ +13: for epoch $= 1$ to $\Theta_{\mathrm{ascent\_descent\_epo}}$ chs do +14: $\mathcal{L}_a\gets -CROSSENTROPY(M(X)_{S_f},Y_{S_f})$ +15: $M\gets$ OPTIMIZE(M, $\mathcal{L}_a$ +16: $\mathcal{L}_d\gets$ CROSSENTROPY $(M(X)V\backslash S_f,Y_V\backslash S_f)$ +17: $M\gets$ OPTIMIZE(M, $\mathcal{L}_d$ +18: end for +19: end for +20: return $M$ +21: +22: function IdentifyAffectedNodes $(M,X,S_f,E,\Theta)$ +23: $X^{\prime}\gets$ INVERTFEATURES $(X,S_f,E)$ +24: $\Delta \gets |M(X^{\prime}) - M(X)|$ +25: return TOPK( $\Delta ,\Theta_k)$ +26: end function + +# D.2. Additional Experiments on Large $S_{f}$ + +To stress-test Cognac's performance - as methods could potentially degrade as the size of $S_{f}$ grows - we conduct an experiment where we choose a significant fraction of the training nodes of the Amazon, DBLP, and Physics datasets, to be attacked (by the binary label flip attack) and marked for deletion. The method performs competitively even at this large deletion size. Table 5 demonstrates these results. + +Table 5. Evaluation on larger sizes of $S_f$ . Cognac performs well across datasets (Amazon, DBLP, Physics), even when a significant fraction of the total training nodes are present in $S_f$ . + +
METHODAMAZON (25%)DBLP (29.4%)PHYSICS (14.8%)
AccremAccaffAccremAccaffAccremAccaff
ORACLE92.995.672.986.095.295.1
ORIGINAL92.549.074.957.958.995.4
Cognac92.483.782.381.790.795.0
GNNDELETE27.749.745.049.61.437.3
SCRUB92.372.677.582.177.994.9
+ +# D.3. Results on a trigger poisoning attack + +We expand the analysis to a wider range of attack scenarios, now covering all major poisoning types (label, graph structure, and feature). Our feature attack injects trigger a pattern into the feature vectors of select nodes, and assigning a fixed spurious label, and reduces accuracy on the target distribution. Despite not being the strongest possible attack, our implementation provides sufficient signal for evaluation - most unlearning methods struggle, while Cognac matches and even outperforms retraining performance. Complete results are provided in Table 6. + +The attacker selects a subset of victim nodes $S_{p} \subset V$ . For each node $v \in S_{p}$ , its original feature vector $x_{v}$ is modified to $x_{v}'$ by setting specific trigger feature indices $j \in I_{t}$ to 1 (i.e., $x_{v,j}' = 1 \forall j \in I_{t}$ , while other features $x_{v,j}$ for $j \notin I_{t}$ remain unchanged). Subsequently, all nodes $v \in S_{p}$ are assigned a fixed target label $y_{target}$ . The choice of victim nodes here is random within the victim class, and the number is chosen to maintain stealth while maximising Attack Success Rate (the percentage of manipulated nodes in the test set that are successfully classified as the target class). + +This use of a localized feature pattern as a trigger is analogous to patch-based backdoor attacks in image poisoning, such as those introduced by BadNets (Gu et al., 2017). + +Table 6. Results for unlearning the trigger-based feature manipulation. Cognac performs strongly across datasets, maintaining a high Accaff and Accrem. Retrain fails to recover accuracy on the victim class for the Cora dataset, while SCRUB fails to do so for both Cora and CS. GNNDelete and MEGU, the graph unlearning baselines, fail to remove the poison. + +
METHODPHOTOSCORACS
AccremAccaffAccremAccaffAccremAccaff
ORIGINAL95.0 ± 0.033.9 ± 0.067.4 ± 0.025.6 ± 0.089.3 ± 0.00.0 ± 0.0
RETRAIN94.1 ± 0.592.0 ± 1.768.3 ± 0.446.9 ± 6.893.0 ± 0.292.8 ± 2.3
GNNDELETE17.8 ± 0.00.0 ± 0.065.7 ± 0.240.8 ± 9.168.0 ± 0.00.0 ± 0.0
MEGU81.5 ± 8.717.5 ± 23.161.5 ± 0.31.0 ± 1.088.7 ± 0.10.0 ± 0.0
SCRUB93.8 ± 0.092.7 ± 0.068.0 ± 0.064.1 ± 0.092.7 ± 0.172.1 ± 21.8
Cognac94.6 ± 0.091.1 ± 0.067.3 ± 0.078.2 ± 0.093.3 ± 0.093.6 ± 0.6
+ +# E. Convergence and Ablations of Cognac + +# E.1. Convergence + +We now discuss the convergence properties of Cognac. Plots in Figure 7 describe the losses of each of the components of our method (contrastive, ascent, descent) after the last epoch of every step, the meaning of which should be clear from Algorithm 1: Line 4 (which we denote as num_steps). The loss plots are constructed over the best hyperparameters, and + +![](images/7c882d2b81b77f2da57ac13a1bd81925242748aa365ca60bfe0fc81b53ff730f.jpg) +Figure 7. Convergence of the losses across unlearning steps. The ascent loss on $S_{m}$ continually increases as expected, the descent loss on $S \setminus S_{m}$ converges, and the contrastive loss exhibits a low plateau after an initial overshoot, implying it may have learned discriminative features. + +![](images/c7c7e75e9f37af47c5b5d51024ba3c634df2e662dc3a85e6fe045f487e4c6a6e.jpg) + +![](images/c63f5e6a6f68ddc074e54d8ad50fb220b37fa7de3d26264ca163db1b2501b871.jpg) + +we would likely not see such convergence trends with sub-optimal hyperparameters, which may provide insights to improve performance when it's used in other settings as well. + +# E.2. Analysis of method used to find affected neighbors + +Our strategy to find affected neighbors is likely not perfect for finding the most affected nodes, and more sophisticated influence functions, such as the one presented in (Chen et al., 2023), could be used to potentially improve performance. Still, we note that it achieves a $5\%$ higher $\mathrm{Acc}_{\mathrm{aff}}$ than while choosing random $k\%$ nodes in the $n$ -hop neighborhood (where $n$ is the number of layers of message passing) while being cheap to compute: we only require a single forward pass over the model with the inverted features. Interestingly, Figure 8 also shows that even if the GNN is not well-trained, if we choose the top $k\%$ affected nodes, the unlearning performance does not change much, while still being noticeably better than when we use a random $k\%$ of the neighbors. + +Figure 9 (left) shows that there are no noticeable changes in taking a smaller or larger $k\%$ . However, removing this step entirely ( $k = 0\%$ ) results in worse performance, suggesting that performing contrastive unlearning on even a small $k\%$ is significant. Additionally, by keeping this percentage small, we ensure computational efficiency without diminishing performance (Figure 9 (right)), which is essential for unlearning methods. + +# E.3. Comparing our sampling method to MEGU's + +Below, we compare the performance of Cognac while using our sampling method (described in Section 3.1.1) against its performance when using MEGU's sampling method. + +Table 7. Evaluating Cognac with a different strategy to identify affected nodes on Cora. We find that our strategy outperforms the MEGU's, while also being $8\mathrm{x}$ faster. Both variants are hyperparameter-tuned for 100 runs. + +
METHODAccremAccaffSAMPLING TIME (3160 NODES)
ORIGINAL61.4 ± 0.0040.0 ± 0.00-
ORACLE58.4 ± 0.0069.2 ± 0.00-
Cognac (MEGU's)54.8 ± 0.0048.7 ± 0.000.432 s
Cognac (OURS)56.6 ± 0.0075.5 ± 0.040.054 s
+ +![](images/55261f53e389080b0dfe50fd0a8cd03a8c400ebcac529a4d647f78fc5bf2607e.jpg) +Figure 8. Effect of how well-trained the GNN is on top- $k\%$ affected neighbor identification. Here $k = 4$ . The x-axis represents the epoch at which we used GNN representations to identify the most affected neighbors for Cognac. The y-axis reports the unlearning performance after contrastive unlearning on these identified nodes using the final model. The red line contains performance after picking a random subset from the $n$ -hop neighborhood. Affected neighborhood identification using top- $k\%$ logit change is more effective even with an extremely undertrained GNN. + +# E.4. Why does $\mathrm{Acc}_{\mathrm{aff}}$ sometimes reduce as identified manipulated entities increase? + +We find an interesting trend that sometimes, as more of the manipulation set $(S_{m})$ is known and used as the deletion set $(S_{f})$ (going left to right in Figure 4), Acc $_{\mathrm{aff}}$ reduces. This can seem counterintuitive, as one would expect the accuracy of affected classes to improve as more samples are used for unlearning. We hypothesize that unlearning a larger fraction of the manipulation set reduces Acc $_{\mathrm{aff}}$ due to two factors that adversely affect the neighborhoods of the nodes removed, which typically have other nodes of the affected classes due to homophily. First, in the case of label manipulation, when we model it as node unlearning for consistency with prior work, we lose correct information about the graph structure. Second, when modifying the graph structure, i.e., removing some edges or nodes, changes the feature distribution of their neighboring nodes after the message passes, making it out of distribution for the learned GNN layers. The same rationale is why the test nodes are kept in the graph structure (without optimizing the task loss for them) during training (Kipf & Welling, 2017). We investigate this by adding an ablation where, in the unlearning of the label manipulation, instead of unlearning the whole node, we keep the structure, i.e., the node and connected edges, but unlearn the features and labels. + +As observed in Table 8, retaining the node structure leads to large improvements in $\mathrm{Acc}_{\mathrm{aff}}$ when the deletion set is larger (the full set of manipulated entities), while not benefiting much when the deletion set is smaller. In the full manipulation set deletion setting, Cognac even slightly outperforms Oracle. This highlights how, unlike conventional node unlearning in graphs, removing the nodes is not always the best way to unlearn manipulations. They can simply be moved from the train set to the test set to still partake in message passing, so the task loss is not optimized over wrong labels. + +![](images/978f54ca7c44c017e7df5086d10987cf90c7974cb5a6e88e37c8732eb97cd64a.jpg) +Figure 9. Effect of $k$ on unlearning $(\mathrm{Acc}_{\mathrm{aff}})$ , utility $(\mathrm{Acc}_{\mathrm{rem}})$ and efficiency when identifying top- $k\%$ affected nodes for contrastive unlearning. (Left) Cognac effectiveness sharply improves beyond $k = 0\%$ , suggesting that performing contrastive unlearning on even a small percentage of nodes ( $k$ ) significantly enhances the algorithm's effectiveness. However, using higher values of $k$ yields similar performance with the added downside of increasing computational time (Right). + +![](images/9054c388ed1d2159b02d31f8721ef11276123800ce388facfdc18c41da493b35.jpg) + +Table 8. Ablating node unlearning performance on label manipulation with and without unlinking. We report the accuracy on the affected classes $\mathrm{Acc}_{\mathrm{aff}}$ for unlearning the label manipulation on Cora, both when the full and a subset $(25\%)$ of the manipulated set is used for deletion. We find that not removing the structural information leads to a significant improvement in $\mathrm{Acc}_{\mathrm{aff}}$ , especially when more entities are deleted. This illustrates that the unlearning methods can achieve improved performance when precise information about the manipulated data is available. + +
Method0.251.00
LinkedUnlinkedLinkedUnlinked
Oracle73.0±0.073.0±0.073.0±0.073.0±0.0
Original42.0±0.042.0±0.042.0±0.042.0±0.0
Cognac64.8±0.967.8±3.277.2±1.069.3±1.3
GNNDelete35.2±2.550.2±1.921.9±4.530.2±5.3
MEGU40.8±1.633.4±0.441.2±1.532.1±1.3
SCRUB45.7±0.060.7±0.041.1±0.029.0±0.0
ACDC61.7±0.058.8±0.063.7±0.054.3±0.0
+ +# F. Detailed report of the experimental setup + +# F.1. Hyperparameter Tuning + +We perform extensive hyperparameter tuning for all unlearning methods using Optuna (Akiba et al., 2019) with a TPESampler (Tree-structured Parzen Estimator) Algorithm. We ensure the hyperparameter ranges searched include any values specified by the methods. The optimization target is an average of $\mathrm{Acc}_{\mathrm{aff}}$ and $\mathrm{Acc}_{\mathrm{rem}}$ , computed on the validation set. We report averaged results across five seeds. Method-specific hyperparameter ranges and scatter plots across hyperparameters for each method are provided in Appendix F.1. + +We perform hyperparameter tuning for each combination of attack, dataset, unlearning method, and the identified fraction of deletion set $(S_f)$ . The optimization target is an average of $\mathrm{Acc}_{\mathrm{aff}}$ and $\mathrm{Acc}_{\mathrm{rem}}$ , computed on the validation set. For each setting, we run 100 trials with hyperparameters selected using the TPESampler (Tree-structured Parzen Estimator) algorithm. In Figures 10, 11 and 12, we report $\mathrm{Acc}_{\mathrm{aff}}$ and $\mathrm{Acc}_{\mathrm{rem}}$ scores for each hyperparameter tuning trial. Across hyperparameter runs, existing graph-based unlearning methods, barring MEGU, vary drastically across different sets of hyperparameters. On the other hand, our proposed method Cognac and its ablations show consistently high scores across hyperparameters, showcasing Cognac's robustness to hyperparameter tuning. + +![](images/aaee501d51d9cda703a454e8c8dd9b8c4bb11fa97860ecd483bdd23efd9f237b.jpg) + +![](images/b47de572d0aad2effa2da46b22cd5757a5268eed9fab9b3701c2fff6e04e78f8.jpg) + +![](images/6f1b4bbfe61cd8677bc660927346afa9122f88609b51145a100fe3f1fe5f31c9.jpg) + +![](images/a554a49e6c1de0b64e4f0b9e6a8cfd540c3e478a344953a72c3d3a3a21a93442.jpg) +Figure 10. Hyperparameter runs for $S_f = 1.0$ on Amazon. Scores of various hyperparameter trial runs. The best hyperparameters are selected according to the run achieving the best value for the average of $\mathrm{Acc}_{\mathrm{rem}}$ and $\mathrm{Acc}_{\mathrm{aff}}$ . + +![](images/c3f92dd1b33e8a7a542007abc36c9cb313b4aaf6724e740d61cf1e5b61d60a9a.jpg) + +![](images/d450567b8bc22dbdebb6255f36a429060c55180f47020a84f01dfd647cef0993.jpg) + +# F.2. Unlearning Times + +To ensure the practicality of inexact unlearning methods, they must achieve greater efficiency than retraining from scratch. As illustrated in Figure 13, Cognac demonstrates competitive efficiency compared to alternative methods, offering substantial speedups over retraining from scratch. + +Measuring Unlearning Time. To simplify comparisons to just two axes, $\mathrm{Acc}_{\mathrm{aff}}$ , and $\mathrm{Acc}_{\mathrm{rem}}$ , we fix a maximum cutoff of time an unlearning method can take, as motivated by Maini et al. (2024). We chose this cutoff as $25\%$ of the original model training time. We pick the best model checkpoint during training for each method, which could be achieved earlier than this. Average run times for each method reported in Figure 13 under Appendix F.2 show that Cognac's efficiency is comparable to or better than baselines. All experiments were run on a machine with Intel Xeon CPUs and two dedicated RTX 5000 GPUs. + +![](images/f7f01e320abb9449752fee8175b8e6b86aeeb558a46c8c07b418934d90796756.jpg) + +![](images/3e59682f606d87b656ffb9fe11031e9fbbe4b29db1ba174cfb65dd58300fea34.jpg) + +![](images/26db566c01c8a776f1324b5e8be0375a341f01ea66625554fcceb8d3e270d7e7.jpg) + +![](images/f5938e568885260cefb33ba4d0596ecd020faae949ee41de13499a6d47642c73.jpg) +Figure 11. Hyperparameter runs for $S_f = 1.0$ on CS. Scores of various hyperparameter trial runs. The best hyperparameters are selected according to the run achieving the best value for the average of $\mathrm{Acc}_{\mathrm{rem}}$ and $\mathrm{Acc}_{\mathrm{aff}}$ . + +![](images/8e49ad6a53db0627182e8cb6fde54ff3cdc9da021c95cd395696fe10567f1fac.jpg) + +![](images/26bb551160b4fa78898573c5b7e1c596715993ab4f9149da38c6e57be89b3a11.jpg) + +![](images/609d7e396441142a399212e21d37728c2730f5415a325d6387cab76fa3b9ccea.jpg) + +![](images/33bb47d9a153bc4ddb375302de7750da1bd1fd2d9e66c8238a5fa6f70f47133e.jpg) + +![](images/2a5d9f692e2252ec0309525bd19d6bafd9a023e19900e32706acc53e2b8dabab.jpg) + +![](images/7a5435ae559d19929e70fb3cfb4a316eeeb2f6296d691e6fe0eea6a1e010e24b.jpg) +Figure 12. Hyperparameter runs for $S_f = 1.0$ on Cora. Scores of various hyperparameter trial runs. The best hyperparameters are selected according to the run achieving the best value for the average of Accrem and Accaff. + +![](images/1f89ed196b8018532680e5cfed81bcc5143e459078cd1e47ed02c7d2695e6a84.jpg) + +![](images/2b4b50854a2cb7ae88084bb66d7eea4e4e6d76751d4b5aec6b71004f7faf94f7.jpg) + +![](images/5046a0b7406fbe3871e89f6adf484950967774689c7fd47000f0240bcd5e994f.jpg) +Figure 13. Time taken to unlearn. We report the time taken by each unlearning method for all datasets, in the setting where all manipulated samples are known for deletion. Cognac provides significant speedups over Retrain and has performance similar to other unlearning methods. + +![](images/7423eaeb93f5a454175981168b8421cf91a886e2780f3753fd68e8d340217e6f.jpg) + +![](images/562a7b10a16b75e34ff382837fcf68a577e4b0f3a412d9fff78754f62fa00d6c.jpg) \ No newline at end of file diff --git a/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/images.zip b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e5565cacdfe089972a5484a09c88fd2208cfba45 --- /dev/null +++ b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80c43e61c4c76ad97f24f21fb5c647368a5d1bffbc1ac88078cf33c65de3673e +size 1153473 diff --git a/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/layout.json b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3e588a806e3a151dcbc25c63f2a679394e5f536c --- /dev/null +++ b/acognacshottoforgetbadmemoriescorrectiveunlearningforgraphneuralnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ac7cbdc750813dc13b581312e5700e3cbf77b17d8cbeb3324bf3e8ec17eee3b +size 1097468 diff --git a/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/2939d18d-8be6-4e1a-8529-9893b92b287d_content_list.json b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/2939d18d-8be6-4e1a-8529-9893b92b287d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..eb7c27645e166fc82ea6af6b326f147feb0dd545 --- /dev/null +++ b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/2939d18d-8be6-4e1a-8529-9893b92b287d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6c0450b0561cb83a2e5ac347df5f5ce5622e6c01d8a2ca9e5eeb9bd856414ac +size 385100 diff --git a/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/2939d18d-8be6-4e1a-8529-9893b92b287d_model.json b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/2939d18d-8be6-4e1a-8529-9893b92b287d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..54b5e68a3c6fd08508036b66e8b1f7770c927675 --- /dev/null +++ b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/2939d18d-8be6-4e1a-8529-9893b92b287d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1eca8fe92d65817b4ef0af1e7a0f59cfa183ae9849eeb912b1f06eab5a6001f +size 434421 diff --git a/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/2939d18d-8be6-4e1a-8529-9893b92b287d_origin.pdf b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/2939d18d-8be6-4e1a-8529-9893b92b287d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..da68af0fa1a57356007617fcc1ab91bbc60c59b0 --- /dev/null +++ b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/2939d18d-8be6-4e1a-8529-9893b92b287d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b4654cf14733aa06a584ce18d3aab5156caee86184fd60706c785ec30c383af +size 649495 diff --git a/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/full.md b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8c030cf67bb64ccc56e760f1c40e99bc447b8868 --- /dev/null +++ b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/full.md @@ -0,0 +1,2246 @@ +# A Comprehensive Framework for Analyzing the Convergence of Adam: Bridging the Gap with SGD + +Ruinan Jin $^{1}$ Xiao Li $^{2}$ Yaoliang Yu $^{3,4}$ Baoxiang Wang $^{2,4}$ + +# Abstract + +Adaptive moment estimation (Adam) is a cornerstone optimization algorithm in deep learning, widely recognized for its flexibility with adaptive learning rates and efficiency in handling large-scale data. However, despite its practical success, the theoretical understanding of Adam's convergence has been constrained by stringent assumptions, such as almost surely bounded stochastic gradients or uniformly bounded gradients, which are more restrictive than those typically required for analyzing stochastic gradient descent (SGD). + +In this paper, we introduce a novel and comprehensive framework for analyzing the convergence properties of Adam. This framework offers a versatile approach to establishing Adam's convergence. Specifically, we prove that Adam achieves asymptotic (last iterate sense) convergence in both the almost sure sense and the $L_{1}$ sense under the relaxed assumptions typically used for SGD, namely $L$ -smoothness and the ABC inequality. Meanwhile, under the same assumptions, we show that Adam attains non-asymptotic sample complexity bounds similar to those of SGD. + +# 1. Introduction + +Adaptive Moment Estimation (Adam) is one of the most widely used optimization algorithms in deep learning due to its adaptive learning rate properties and efficiency in handling large-scale data (Kingma & Ba, 2014). Despite its + +1Centre for Artificial Intelligence and Robotics, Hong Kong Institute of Science and Innovation, Chinese Academy of Sciences, New Territories, Hong Kong, China. Most of the work of Ruinan Jin was completed during he was with the Vector Institute, Toronto, Canada, and The Chinese University of Hong Kong, Shenzhen, China. 2The Chinese University of Hong Kong, Shenzhen, China 3University of Waterloo, Waterloo, Canada 4Vector Institute, Toronto, Canada. Correspondence to: Xiao Li . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +widespread use, the theoretical understanding of Adam's convergence is not as advanced as its practical success. Previous studies have often imposed stringent assumptions on the loss function and stochastic gradients, such as uniformly bounded loss functions and almost surely bounded gradients (Reddi et al., 2018; Zou & Shen, 2019), which are more restrictive than those required for analyzing classical stochastic gradient descent (SGD). + +In this paper, we introduce a novel and comprehensive framework for analyzing the convergence properties of Adam. Our framework unifies various aspects of convergence analysis, including non-asymptotic (average iterate sense) sample complexity, asymptotic (last iterate sense) almost sure convergence, and asymptotic $L_{1}$ convergence. Crucially, we demonstrate that under this framework, Adam can achieve convergence under the same assumptions typically used for SGD—namely, the $L$ -smooth condition and the ABC inequality ( $L_{2}$ sense) (Khaled & Richtárik, 2023; Bottou, 2010; Ghadimi & Lan, 2013). + +Several recent works have attempted to relax the stringent conditions required for Adam's convergence, each focusing on different aspects of the stochastic gradient assumptions and convergence guarantees. However, limitations still exist in terms of assumptions and the types of convergence results obtained. Table 1 provides the references and a summary of the works and compares the assumptions on stochastic gradients, the resulting complexities, and the convergence properties achieved. + +Our approach builds upon these prior works and seeks to offer a more comprehensive and general framework for analysis. In contrast to these previous works, we study Adam under the ABC inequality, which is more general and less restrictive compared to the assumptions made in the previous studies. Our analysis successfully establishes non-asymptotic sample complexity and achieves asymptotic almost sure convergence and $L_{1}$ convergence under conditions that align with those required for SGD. This makes our framework theoretically sound and versatile for analyzing multiple convergence properties of Adam. Our framework might also be of independent interest in analyzing different variants of Adam. In summary, our work presents a novel and general theoretical framework for Adam, unifying vari- + +ous convergence properties. This framework demonstrates that Adam's convergence guarantees can be aligned with those of SGD, which justifies the applicability of Adam across a wide range of machine learning problems. + +# 1.1. Related Works + +In recent years, the convergence properties of Adam have been extensively studied, with various works focusing on different assumptions about stochastic gradients and the types of convergence guarantees provided. In the following discussion, we categorize and review key contributions based on the different types of stochastic gradient assumptions they employ, as summarized in Table 1. + +Bounded Variance and Coordinate Affine Noise Variance: Wang et al. (2024a) considered Adam's convergence under the assumption of bounded variance or coordinate affine noise variance. The coordinate affine noise variance condition (Eq. (10)) is particularly stringent as it requires that each component of the stochastic gradient satisfies an affine noise variance inequality, which is stronger than the traditional affine noise variance condition (Eq. (9)) applied to the entire gradient. Under these assumptions, Wang et al. successfully achieved a complexity free of $\mathcal{O}(1 / \mu)$ . However, their work did not focus on analyzing almost sure convergence or $L_{1}$ convergence, as the primary emphasis was on the sample complexity of the algorithm's behavior. + +Exponential-Tailed Affine Variance Noise Condition Hong & Lin (2024) explored the assumption of affine variance noise with an exponential tail distribution (Eq. (11)), which closely approximates the almost-sure form of affine variance noise. The exponential-tailed affine variance noise condition is stronger than the traditional affine variance noise assumption, which is based on the second moment of the stochastic gradient. Under these assumptions, they successfully derived a complexity that eliminates $\mathcal{O}(1 / \mu)$ . However, their work did not focus on analyzing almost sure convergence or $L_{1}$ convergence, as their primary emphasis was on the sample complexity of the algorithm's performance. + +Almost Surely Bounded Stochastic Gradients: Several works, including He et al. (2023) and Xiao et al. (2024), have explored Adam's convergence under the assumption that the stochastic gradients are almost surely bounded. This is a particularly strong assumption, as it implies several other commonly made assumptions about stochastic gradients, such as bounded variance, affine noise variance, coordinate affine noise variance, and sub-Gaussian properties. The assumption is often impractical in non-convex settings where gradients can become unbounded. Moreover, studies in + +Wang et al. (2023) have highlighted that this assumption is unrealistic in many common machine learning frameworks, failing to hold even for simple quadratic functions, let alone for deep neural networks. While these works achieved almost sure convergence and, in some cases, $L_{1}$ convergence, the complexity result they obtained includes $\mathcal{O}(1 / \mu)$ . + +$L_{2}$ Bounded Stochastic Gradients: Zou et al. (2019) analyzed Adam under the assumption of $L_{2}$ bounded stochastic gradients. Although this condition is milder than the almost surely bounded gradients assumption, it is still stronger than the traditional affine noise variance condition and the ABC inequality. In the standard analytical framework, this assumption can at best be weakened to the coordinate affine noise variance condition, which remains more restrictive than the assumptions typically considered for SGD. At the same time, this work focused on complexity analysis without addressing asymptotic convergence. + +Randomly Reshuffled Stochastic Gradients: In other works, such as those by Zhang et al. (2022) and Wang et al. (2024b), the authors considered the case where the stochastic gradients are randomly reshuffled. Randomly reshuffled stochastic gradients represent a special case where the gradients are typically assumed to satisfy certain inequalities almost surely. This reliance on almost sure properties forms a much stronger and more restrictive analytical framework compared to those based on traditional affine noise variance conditions or the ABC inequality. Meanwhile, they did not focus on analyzing the asymptotic convergence property. + +# 2. Preliminaries + +In this section, we introduce the necessary preliminaries and establish the foundational framework for our convergence analysis of Adam. We begin by recalling the Adam optimization algorithm. We then state the assumptions that will be used throughout our analysis. These assumptions are standard in stochastic optimization and are crucial for deriving our main results. By laying out these assumptions explicitly, we also facilitate a clear comparison with the conditions used in previous works, highlighting the less restrictive nature of our approach. + +# 2.1. Adam + +Adam is an extension of SGD that computes adaptive learning rates for each parameter by utilizing estimates of the first and second moments of the gradients. + +It combines the advantages of two other extensions of SGD: AdaGrad, which works well with sparse gradients, and RM-SProp, which works well in online and non-stationary settings. + +Table 1. Comparison of Assumptions and Convergence Results. $(\diamondsuit)$ The smoothing term $\mu$ is often set to small values like $10^{-8}$ in practice. It is difficult and relevant to avoid the $\mathcal{O}(\mathrm{poly}(\frac{1}{\mu}))$ dependence (Wang et al., 2024a), which our analysis achieves. $(\spadesuit)$ The work focuses on learning rates and hyperparameters dependent on the total number of epochs $T$ , leading to results without a $\mathcal{O}(\ln T)$ term. As our asymptotic analysis uses $T$ -independent parameters, terms regarding $\mathcal{O}(\ln T)$ inevitably appear, though our method can be easily extended to $T$ -dependent settings. $(\diamondsuit\diamondsuit)$ These works have weakened the classical $L$ -smooth condition, which is different from the focus of this paper. + +
ReferenceAssumptions on Stochastic GradientSample ComplexityA.S. ConvergenceL1 Convergence
(Wang et al., 2024a)♣Bounded Variance (or Coordinate Affine Noise Variance)O(1/√T)NoNo
(Hong & Lin, 2024)Exponential-tailed Affine Variance NoiseO(lnT/√T)NoNo
(He et al., 2023)◇Almost Surely Bounded Stochastic GradientO(poly(1/μ)·lnT/√T)YesYes
(Zou et al., 2019)L2 Bounded Stochastic GradientO(lnT/√T)NoNo
(Zhang et al., 2022)Randomly Reshuffled Stochastic GradientO(lnT/√T)NoNo
(Li et al., 2024)◇◇Almost Surely Bounded Stochastic Gradient or Sub-Gaussian VarianceO(poly(1/μ)·lnT/√T)NoNo
(Wang et al., 2024b)◇◇Randomly Reshuffled Stochastic GradientO(lnT/√T)NoNo
(Xiao et al., 2024)◇◇Almost Surely Bounded Stochastic GradientNo ResultYesNo
Our WorkABC InequalityO(lnT/√T)YesYes
+ +# Algorithm 1 Adam + +Input: Stochastic oracle $\mathcal{O}$ , initial learning rate $\eta_1 \geq 0$ , initial iterate $w_1 \in \mathbb{R}^d$ , initial exponential moving averages $m_0 = 0$ , $v_0 = v \cdot \mathbf{1}^\top$ with $v > 0$ , hyperparameters $\beta_1 \in [0,1)$ , $\beta_{2,1} \in (0,1]$ , smoothing term $\mu > 0$ , number of epochs $T$ + +Output: Final iterate $w_{T}$ + +$t = 1$ to $T$ Generate learning rate $\eta_t$ ; Generate conditioner parameter $\beta_{2,t}$ ; Sample a random data point $z_t$ and compute the stochastic gradient $g_t = \mathcal{O}_f(w_t, z_t)$ ; Update the estimate: $v_t = \beta_{2,t} v_{t-1} + (1 - \beta_{2,t}) g_t^{\circ 2}$ ; Update the estimate: $m_t = \beta_1 m_{t-1} + (1 - \beta_1) g_t$ ; Compute the adaptive learning rate: $\eta_{v_t} = \eta_t \cdot \frac{1}{\sqrt{v_t} + \mu}$ ; Update the iterate: $w_{t+1} = w_t - \eta_{v_t} \circ m_t$ ; + +In Adam, the random variables $\{z_{t}\}_{t\geq 1}$ are mutually independent. The stochastic gradient at epoch $t$ is denoted by $g_{t}$ . The quantities $m_{t}$ and $v_{t}$ represent the exponential moving averages of the first and second moments of the gradients, respectively. The hyperparameters $\beta_{1}$ and $\beta_{2,t}$ control the exponential decay rates for the moment estimates. A small smoothing term $\mu$ is introduced to prevent division by zero, and $\eta_{v_t}$ represents the adaptive learning rate for each parameter. + +Notations: The Hadamard product (element-wise multiplication) is represented by $\beta \circ \gamma$ , and the element-wise square root of a vector $\gamma \in \mathbb{R}^d$ is written as $\sqrt{\gamma}$ . Operations such as $\beta + v_0, \frac{1}{\beta}$ , and $\beta^{\circ 2}$ are performed element-wise. Additionally, for a vector with subscripts, such as $\beta_t$ , we use $\beta_{t,i}$ to denote its $i$ -th coordinate. However, for a scalar with subscripts, such as $\Phi_t$ , the double subscript $\Phi_{t,i}$ carries a specific meaning, which will be explicitly defined when it + +appears. + +When analyzing Adam, $\nabla f(w_{t})$ refers to the true gradient of the loss function at epoch $t$ . We define $\mathcal{F}_t = \sigma (g_1,\dots ,g_t)$ as the $\sigma$ -algebra generated by the stochastic gradients up to epoch $t$ , with $\mathcal{F}_0 = \{\Omega ,\emptyset \}$ and $\mathcal{F}_{\infty} = \sigma \left(\bigcup_{t\geq 1}\mathcal{F}_{t}\right)$ . Throughout this paper, unless explicitly stated otherwise, the norm $\| \cdot \|$ denotes the Euclidean norm. + +# 2.2. Assumptions + +To establish our convergence results, we make the following standard assumptions. The assumption regarding smoothness is the classical $L$ -smooth assumption. The assumption about stochastic gradient are less restrictive than those imposed in some prior works, as highlighted in Table 1. + +Assumption 2.1. (Bounded from Below Loss Function) Let $f: \mathbb{R}^d \to \mathbb{R}$ be a loss function defined on $\mathbb{R}^d$ . We assume that there exists a constant $f^* \in \mathbb{R}$ such that for all $w \in \mathbb{R}^d$ , the following inequality holds: $f(w) \geq f^*$ . + +This assumption ensures that the loss function $f$ is bounded from below, preventing it from decreasing indefinitely during the optimization process. + +Assumption 2.2. (L-Smoothness) Let $f: \mathbb{R}^d \to \mathbb{R}$ be a differentiable loss function. We assume that the gradient $\nabla f$ is Lipschitz continuous. That is, there exists a constant $L_f \geq 0$ such that for all $w, w' \in \mathbb{R}^d$ , the following inequality holds: $\| \nabla f(w) - \nabla f(w') \| \leq L_f \| w - w' \|$ . The constant $L_f$ is known as the Lipschitz constant of the gradient. + +Assumption 2.3. (ABC Inequality) We assume that the stochastic gradient $g_{t}$ is an unbiased estimate of the true gradient, i.e., $\mathbb{E}[g_t\mid \mathcal{F}_{t - 1}] = \nabla f(w_t)$ , and there exist constants $A,B,C\geq 0$ such that for all epochs $t$ , we have: + +$$ +\mathbb {E} [ \| g _ {t} \| ^ {2} \mid \mathcal {F} _ {t - 1} ] \leq A (f (w _ {t}) - f ^ {*}) + B \| \nabla f (w _ {t}) \| ^ {2} + C. +$$ + +The ABC inequality provides a bound on the second moment of the stochastic gradients, which is crucial for analyzing the convergence of stochastic optimization algorithms. Notice identity $\mathbb{E}\left[\| g_t - \nabla f(w_t)\|^2\mid \mathcal{F}_{t - 1}\right] = \mathbb{E}\left[\| g_t\|^2\mid \mathcal{F}_{t - 1}\right] - \| \nabla f(w_t)\|^2$ . We can conclude that the above ABC inequality has the following equivalent form based on the variance of the stochastic gradients, i.e., there exist constants $A\geq 0$ , $B\geq 0$ , and $C\geq 0$ such that: $\mathbb{E}\left[\| g_t - \nabla f(w_t)\|^2\mid \mathcal{F}_{t - 1}\right]\leq A(f(w_t) - f^*) + B\| \nabla f(w_t)\|^2 + C$ . + +# 2.3. Comparison with Prior Works on Stochastic Gradient Assumptions + +Due to space limitations in the main text, these comparisons have been moved to Appendix A. + +Next, we introduce a property. We know that when the loss function is $L$ -smooth, the true gradient of the loss function can be controlled by the loss function value $f(w_{t}) - f^{*}$ (as shown in Lemma C.2). Therefore, we can simplify the ABC inequality as follows. + +Property 1. Under Assumptions 2.2 and 2.3, for all epochs $t$ , we have: $\mathbb{E}[\| g_t\|^2 \mid \mathcal{F}_{t-1}] \leq (A + 2L_fB)(f(w_t) - f^*) + C$ . + +This property demonstrates that the variance of the stochastic gradients can be bounded by the function value difference, which is a key component in our convergence analysis. + +# 2.4. Hyperparameter Settings + +In this paper, to keep the proofs concise, we focus on a specific set of representative parameter configurations, defined as follows: + +$$ +\beta_ {2, t} := \left\{ \begin{array}{l l} 1 - \alpha_ {0}, & \text {i f} t = 1, \\ 1 - \frac {1}{t ^ {\gamma}}, & \text {i f} t \geq 2, \end{array} \right. \quad \beta_ {1} \in [ 0, 1), \quad \eta_ {t} = \frac {1}{t ^ {\frac {1}{2} + \delta}}, +$$ + +where $\alpha_0\in [0,1),\gamma \in [1,2\delta +1]$ , and $\delta \in \left[0,\frac{1}{2}\right)$ + +It is essential to impose certain constraints on Adam's parameters, particularly on $\beta_{2,t}$ , to ensure the algorithm converges. Early studies (Reddi et al., 2018) have shown that without proper restrictions on $\beta_{2,t}$ , counterexamples exist where the algorithm fails to converge. Furthermore, for the gradient norm to converge to zero, it is necessary that $\beta_{2,t}$ approaches 1, as noted in earlier works (Zou et al., 2019; He et al., 2023). + +Some studies on complexity allow $\beta_{2,t}$ to be constant. However, these studies typically focus on the algorithm's complexity over a finite number of epochs $T$ . In such cases, the constant value of $1 - \beta_{2,t}$ is inversely related to $T$ , effectively causing $\beta_{2,t}$ to approach 1 as $T$ increases. This is another + +means of ensuring that $\beta_{2,t}$ asymptotically approaches 1, which is crucial for convergence. + +The hyperparameter settings adopted in this paper are representative and have been considered in previous studies (Zou et al., 2019; He et al., 2023). Our configuration includes settings that can achieve near-optimal complexity of $\mathcal{O}(\ln T / \sqrt{T})$ . The logarithmic factor $\ln T$ arises because $\beta_{2,t}$ is chosen independent of the total number of epochs $T$ , which is an unavoidable consequence with this class of parameters. + +Our choice of hyperparameters simplifies the analysis while capturing the essential behavior of the Adam. Although the proof techniques can be extended to a broader range of parameter settings, this paper focuses primarily on the assumptions related to the convergence of the algorithm rather than an exhaustive exploration of hyperparameter configurations. + +# 3. Theoretical Results + +In this section, we establish both non-asymptotic and asymptotic convergence guarantees for Adam within our smooth non-convex framework, as defined by Assumptions 2.1-2.3. For the non-asymptotic analysis, we derive a sample complexity bound that is independent of $\mathcal{O}(1 / \mu)$ , providing an explicit bound on the number of epochs required to achieve a specified accuracy. In the asymptotic analysis, we consider two forms of convergence: almost sure convergence and convergence in the $L_{1}$ norm. The almost sure convergence result demonstrates that, the gradient norm of almost every trajectory converges to zero. Meanwhile, the $L_{1}$ convergence result reveals that the convergence across different trajectories is uniform with respect to the $L_{1}$ norm of the gradient, where the $L_{1}$ norm is taken in the sense of the underlying random variable, meaning the expectation of the gradient norm. + +# 3.1. Non-Asymptotic Sample Complexity + +Theorem 3.1 (Non-Asymptotic Sample Complexity). Consider the Adam algorithm as specified in Algorithm 2.1, and assume that Assumptions 2.1-2.3 are satisfied. Then, for any initial point, any $T \geq 1$ , and any $s \in (0,1)$ , the following bound holds with probability at least $1 - s$ : + +$$ +\frac {1}{T} \sum_ {t = 1} ^ {T} \| \nabla f (w _ {t}) \| ^ {2} \leq \left\{ \begin{array}{l l} \mathcal {O} \Big (\frac {1}{s ^ {2}} \frac {1}{T ^ {\frac {1}{2} - \delta}} \Big), & i f \delta \in (0, 1 / 2) \\ \mathcal {O} \Big (\frac {1}{s ^ {2}} \frac {\ln T}{\sqrt {T}} \Big), & i f \gamma > 1, \delta = 0 \\ \mathcal {O} \Big (\frac {1}{s ^ {2}} \frac {\ln^ {2} T}{\sqrt {T}} \Big), & i f \gamma = 1, \delta = 0. \end{array} \right. +$$ + +The constant implied by the $\mathcal{O}$ notation depends on the initial point, the constants in Assumptions 2.1-2.3 (excluding $1 / \mu$ ), and the parameters $\delta$ and $\alpha_0$ . + +This theorem provides a non-asymptotic rate of convergence for the square of the gradient norm, highlighting how the choice of hyperparameters affects the convergence rate. + +# 3.2. Asymptotic Convergence + +We now present our main asymptotic convergence results, demonstrating that the gradients of the Adam converge to zero both almost surely and in the $L_{1}$ sense under appropriate conditions. + +Theorem 3.2 (Asymptotic Almost Sure Convergence). Under Assumptions 2.1-2.3, consider the Adam with hyperparameters specified in Subsection 2.4 with $\gamma > 1$ and $\delta > 0$ . Then, the gradients of the Adam converge to zero almost surely, i.e., $\lim_{t \to \infty} \| \nabla f(w_t) \| = 0$ a.s. + +This theorem shows that the gradients evaluated at the iterates converge to zero almost surely, indicating that the algorithm approaches a critical point of the loss function along almost every trajectory. + +Remark 1. (Almost sure vs $L_{1}$ convergence) As stated in the introduction, it is important to note that the almost sure convergence does not imply $L_{1}$ convergence. To illustrate this concept, let us consider a sequence of random variables $\{\zeta_n\}_{n \geq 1}$ , where $\mathbb{P}(\zeta_n = 0) = 1 - 1/n^2$ and $\mathbb{P}(\zeta_n = n^2) = 1/n^2$ . According to the Borel-Cantelli lemma, it follows that $\lim_{n \to +\infty} \zeta_n = 0$ almost surely. However, it can be shown that $\mathbb{E}[|\zeta_n|] = 1$ for all $n > 0$ by simple calculations. + +Theorem 3.3 (Asymptotic $L_{1}$ -Convergence). Under Assumptions 2.1-2.3, consider the Adam with hyperparameters specified in Subsection 2.4 with $\gamma > 1$ and $\delta > 0$ . Then, the gradients of the Adam converge to zero in the $L_{1}$ sense, i.e., $\lim_{t \to \infty} \mathbb{E}[\|\nabla f(w_t)\|] = 0$ . + +This result establishes convergence in the mean sense, showing that the expected gradient norm approaches zero as the number of epochs increases. It indicates that the convergence of gradient norms across different trajectories is uniform in the $L_{1}$ norm of the random variables. + +In previous works (He et al., 2023; Xiao et al., 2024), the assumption that the stochastic gradients are uniformly bounded, i.e., $\| g_t\| \leq M$ a.s. $(\forall t\geq 1)$ , or that the gradients themselves are uniformly bounded, i.e., $\| \nabla f(w_{t})\| \leq M(\forall t\geq 1)$ , allows almost sure convergence to directly imply $L_{1}$ convergence via the Lebesgue's Dominated Convergence theorem. However, in our framework, which deals with potentially unbounded stochastic gradients or gradients, proving $L_{1}$ convergence is much more challenging. We will elaborate on this in the next section. + +# 4. Framework for Analyzing Adam + +In this section, we present the analytical framework that underpins our convergence analysis for the Adam. Our + +approach is built upon the insights provided by existing methods, while introducing new techniques to address the limitations of previous analyses and provide a more comprehensive understanding of Adam's behavior under weaker assumptions. Our core innovations are detailed in Section 4.3.1, Section 4.4, and Section 4.5. + +# 4.1. Key Properties of Adaptive Learning Rates + +We begin by characterizing the fundamental properties of the adaptive learning rate sequence $\eta_{v_t}$ in Section 2.4. These properties are critical as they directly influence the behavior of the algorithm and are foundational to our subsequent analysis. By understanding how these properties interact with the algorithm's dynamics, we obtain more insights on the conditions under which Adam converges. + +Property 2. Each element $\eta_{v_t,i}$ of the sequence $\{\eta_{v_t}\}_{t\geq 1} = \{[\eta_{v_t,1},\eta_{v_t,2},\dots ,\eta_{v_t,d}]^\top \} _t\geq 1$ is monotonically decreasing with respect to $t$ . + +This property ensures that the learning rate becomes progressively smaller as the algorithm progresses, which is a crucial factor in the stability and convergence of Adam. + +Property 3. Each element $\eta_{v_t,i}$ of the sequence $\{\eta_{v_t}\}_{t\geq 1} = \{[\eta_{v_t,1},\eta_{v_t,2},\dots ,\eta_{v_t,d}]^\top \} _t\geq 1$ satisfies the inequality $t^{\gamma}v_{t,i}\geq \alpha_{1}S_{t,i}$ , where we define $\alpha_{1}\coloneqq \min \{1 - \alpha_{0},\alpha_{0}\}$ , $S_{t,i}\coloneqq v + \sum_{k = 1}^{t}g_{k,i}^{2}$ for all $t\geq 1$ , and $S_{0,i}\coloneqq v$ . + +This property highlights the relationship between the accumulated gradient information $S_{t,i}$ and the adaptive learning rate, ensuring that the latter appropriately scales with the former as epochs proceed. + +Remark 4.1. For the purpose of simplifying the proofs of subsequent theorems, we define two auxiliary parameters: $\Sigma_{v_t} \coloneqq \sum_{i=1}^d v_{t,i}$ and $S_t \coloneqq \sum_{i=1}^d S_{t,i}$ . Additionally, for convenience in the subsequent proofs, we define a new initial parameter based on $S_{0,i}$ as $\eta_{v_0,i} = S_{0,i} / \alpha_1 = v / \alpha_1$ . + +These definitions of auxiliary parameters help streamline the analysis, making the mathematical expressions more manageable and the proofs more concise. + +With the key properties of the adaptive learning rates established, we now turn our attention to analyzing the momentum term, which plays a crucial role in the Adam. + +# 4.2. Handling the Momentum Term + +To effectively analyze the momentum term in the Adam, we adopt a classical method introduced by Liu et al. (2020). The momentum term introduces additional complexity in the analysis due to its recursive nature, which can complicate the convergence proofs. To address this, we construct an auxiliary variable $u_{t}$ that simplifies the analysis by decoupling the momentum term from the update process. This + +auxiliary variable is defined as follows: + +$$ +\begin{array}{l} u _ {t} := \frac {w _ {t} - \beta_ {1} w _ {t - 1}}{1 - \beta_ {1}} = w _ {t} + \frac {\beta_ {1}}{1 - \beta_ {1}} (w _ {t} - w _ {t - 1}) \\ = w _ {t} - \frac {\beta_ {1}}{1 - \beta_ {1}} \eta_ {v _ {t - 1}} \circ m _ {t - 1}. \tag {1} \\ \end{array} +$$ + +The introduction of $u_{t}$ allows us to handle the momentum term more effectively by transforming the recursive nature of the updates into a more tractable form. Specifically, we can express the relationship between successive epochs of $u_{t}$ as follows: + +$$ +\begin{array}{l} u _ {t + 1} - u _ {t} = - \eta_ {v _ {t}} \circ g _ {t} \\ + \frac {\beta_ {1}}{1 - \beta_ {1}} \left(\underbrace {\eta_ {v _ {t - 1}} - \eta_ {v _ {t}}} _ {\Delta_ {t}}\right) \circ m _ {t - 1}. \tag {2} \\ \end{array} +$$ + +This recursive relation is instrumental in breaking down the complex dependencies introduced by the momentum term, which will facilitate the convergence analysis. + +Then we establish two key properties that connect the original variable $w_{t}$ and the auxiliary variable $u_{t}$ . These properties are crucial for bounding the changes in the momentum term and connecting the function values at different points in the epoch process. + +Property 4. For any epoch $t$ , the following inequality holds: + +$$ +m _ {t, i} ^ {2} - m _ {t - 1, i} ^ {2} \leq - (1 - \beta_ {1}) m _ {t - 1, i} ^ {2} + (1 - \beta_ {1}) g _ {t, i} ^ {2}. +$$ + +This property establishes a bound on the change in the momentum term, which is critical for ensuring that the momentum does not increase indefinitely during the optimization process. Controlling the momentum in this manner is an important step in proving the convergence. + +Property 5. For any epoch $t$ , the following inequality holds: + +$$ +f (w _ {t}) \leq (L _ {f} + 1) f (u _ {t}) + \frac {(L _ {f} + 1) \beta_ {1} ^ {2}}{2 (1 - \beta_ {1}) ^ {2}} \left\| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \right\| ^ {2}. +$$ + +This property connects the function values at $w_{t}$ and $u_{t}$ , which provides a foundation for analyzing the convergence of $f(w_{t})$ . By establishing this relationship, we can relate the behavior of the original variable $w_{t}$ to the more manageable auxiliary variable $u_{t}$ , thereby simplifying the overall convergence analysis. + +# 4.3. Establishing the Approximate Descent Inequality + +In the convergence analysis of stochastic gradient descent (SGD), a fundamental tool is the approximate descent inequality, which quantifies the expected decrease in the objective function at each epoch. Specifically, for SGD, the approximate descent inequality is given by: + +$$ +f (w _ {t + 1}) - f (w _ {t}) \leq \underbrace {- \eta_ {t} \| \nabla f (w _ {t}) \| ^ {2}} _ {\text {D e s c e n t T e r m}} + \underbrace {\frac {\eta_ {t} ^ {2} L}{2} \| g _ {t} \| ^ {2}} _ {\text {Q u a d r a t i c E r r o r}} +$$ + +$$ ++ \underbrace {\eta_ {t} \nabla f \left(w _ {t}\right) ^ {\top} \left(\nabla f \left(w _ {t}\right) - g _ {t}\right)} _ {\text {M a r t i n g a l e D i f f e r e n c e T e r m}}, \tag {3} +$$ + +where $\eta_t$ is the learning rate, $L$ is the Lipschitz constant, and $g_t$ is the stochastic gradient. + +Motivated by the success of this approach in analyzing SGD, we aim to establish a similar approximate descent inequality for the Adam. The goal is to develop a descent inequality that captures the adaptive nature of Adam's learning rates while maintaining the essential structure seen in the analysis of SGD. + +To this end, we present the following key result, which forms the cornerstone of our convergence analysis for Adam. + +Lemma 4.1 (Approximate Descent Inequality). Consider the sequences $\{w_t\}_{t \geq 1}, \{v_t\}_{t \geq 1}$ , and $\{u_t\}_{t \geq 1}$ generated by Algorithm 2.1 and Eq. (2). Under Assumptions 2.1-2.3, the following sufficient decrease inequality holds: + +$$ +\begin{array}{l} \Pi_ {\Delta , t} \hat {f} (u _ {t + 1}) - \Pi_ {\Delta , t - 1} \hat {f} (u _ {t}) \\ \leq - \frac {1}{2} \Pi_ {\Delta , t} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + C _ {2} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} \\ + \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | \\ + \left(L _ {f} + 1\right) \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + \Pi_ {\Delta , t} M _ {t}. \tag {4} \\ \end{array} +$$ + +Here, + +$$ +\hat {f} (u _ {t}) := f (u _ {t}) - f ^ {*} + C \sum_ {i = 1} ^ {d} \eta_ {v _ {t - 1}, i}, +$$ + +$$ +\zeta_ {i} (t) := \eta_ {v _ {t - 1}, i} (\nabla_ {i} f (w _ {t})) ^ {2}, +$$ + +$$ +\Pi_ {\Delta , t} := \prod_ {k = 1} ^ {t} \left(1 + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k}\right) ^ {- 1} (t \geq 1), +$$ + +$$ +\Pi_ {\Delta , 0} := 1, +$$ + +$$ +\overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k} := \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \sum_ {t = k} ^ {+ \infty} \left(\sqrt {\beta_ {1}}\right) ^ {t - k} \Delta_ {t, i} \Bigg | \mathcal {F} _ {k - 1} \right], +$$ + +where, $\Delta_{t,i}$ denotes the $i$ -th component of $\Delta_t$ (defined in + +$$ +\text {E q .} 2). M _ {t} := M _ {t, 1} + M _ {t, 2} + M _ {t, 3}. \tag {5} +$$ + +Constants $C_2, D_1$ is defined in Eq. (26) and Lemma E.2; $M_{t,1}$ is defined in Eq. (20); $M_{t,2}$ and $M_{t,3}$ are defined in Eq. (21). + +This lemma introduces $\Pi_{\Delta ,t - 1}\hat{f} (u_t)$ as a new Lyapunov function for Adam, which plays a crucial role in our analysis. In Eq. (4), the term $-\frac{1}{2}\Pi_{\Delta ,t}\sum_{i = 1}^{d}\zeta_i(t)$ can be interpreted as the descent term, representing the expected decrease in the Lyapunov function. We collectively refer to the 2nd, + +3rd, and 4th terms on the right side of the inequality as the quadratic error terms. According to subsequent results (Lemma D.2), we can show that the expectation of the summation from 1 to $T$ over $t$ of these terms is of the same order as $\mathcal{O}\left(\sum_{t=1}^{T}\sum_{i=1}^{d}\mathbb{E}\left[\eta_{v_t,i}^2g_{t,i}^2\right]\right)$ . The 5th term, $\Pi_{\Delta,t}M_t$ , is a martingale difference sequence with respect to the filtration $\{\mathcal{F}_t\}_{t\geq 1}$ , which, due to its zero expectation, can be considered to have no overall impact on the algorithm's epoch process. + +This structure closely resembles the approximate descent inequality commonly used in the analysis of SGD. For comparison, the approximate descent inequality for SGD is given by Eq. (3). + +We now proceed to provide the main idea of proving Lemma 4.1 and highlight the key steps and challenges involved in establishing this result for Adam. + +To begin with, we calculate the difference in the loss function values between two consecutive auxiliary variables $\{u_t\}_{t \geq 1}$ that we introduced. We obtain the following expression (informal): + +$$ +\begin{array}{l} f (u _ {t + 1}) - f (u _ {t}) \\ \leq - \underbrace {\sum_ {i = 1} ^ {d} \mathbb {E} \left[ \eta_ {v _ {t} , i} \nabla_ {i} f (w _ {t}) g _ {t , i} | \mathcal {F} _ {t - 1} \right]} _ {\text {T e r m} _ {t, 1}} + \underbrace {\mathcal {O} \left(\sum_ {i = 1} ^ {d} \eta_ {v _ {t} , i} ^ {2} g _ {t , i} ^ {2}\right)} _ {\text {T e r m} _ {t, 2}} \\ + \underbrace {\sum_ {i = 1} ^ {d} \mathbb {E} \left[ \eta_ {v _ {t} , i} \nabla_ {i} f (w _ {t}) g _ {t , i} \mid \mathscr {F} _ {t - 1} \right] - \sum_ {i = 1} ^ {d} \eta_ {v _ {t} , i} \nabla_ {i} f (w _ {t}) g _ {t , i}} _ {\text {T e r m} t, 3} \\ + R _ {t}. \tag {6} \\ \end{array} +$$ + +It can be observed that the above equation is simply a second-order Taylor expansion of $f(u_{t + 1}) - f(u_t)$ (since an L-smooth function is almost everywhere twice differentiable). $Term_{t,1}$ represents the first-order term, which in general serves as the descent term. $Term_{t,2}$ is the quadratic error, and $Term_{t,3}$ is a martingale difference sequence. The remaining term $R_{t}$ is negligible and can be ignored. In the informal explanation provided in the sketch, these were collectively referred to as remainder terms. For the exact formulation, refer to the detailed proof in Appendix D.3.2. + +While handling the quadratic error term $Term_{t,2}$ is relatively straightforward using standard scaling techniques, addressing the first-order term $Term_{t,1}$ is more challenging due to the adaptive nature of Adam's learning rates. Specifically, $\eta_{v_t,i}$ and $g_{t,i}$ are both $\mathcal{F}_t$ -measurable, which necessitates the introduction of an auxiliary random variable $\tilde{\eta}_{v_t,i}$ which is $\mathcal{F}_{t - 1}$ -measurable to facilitate the extraction of the learning rate from the conditional expectation. In this paper, we choose the auxiliary random variable $\eta_{v_{t - 1},i}$ to approximate $\eta_{v_t,i}$ . There are also other forms of this approximation, as + +discussed by (Wang et al., 2023; 2024a). This allows us to rewrite the first-order term as: + +$$ +\begin{array}{l} - \operatorname {T e r m} _ {t, 1} = - \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) g _ {t, i} \mid \mathscr {F} _ {t - 1} \right] \\ = - \underbrace {\sum_ {i = 1} ^ {d} \mathbb {E} \left[ \eta_ {v _ {t - 1} , i} \nabla_ {i} f (w _ {t}) g _ {t , i} | \mathcal {F} _ {t - 1} \right]} _ {\text {D e s c e n t - T e r m} _ {t}} \\ + \underbrace {\sum_ {i = 1} ^ {d} \mathbb {E} \left[ (\eta_ {v _ {t - 1} , i} - \eta_ {v _ {t} , i}) \nabla_ {i} f (w _ {t}) g _ {t , i} | \mathcal {F} _ {t - 1} \right]} _ {T e r m _ {t, 4}}. \\ \end{array} +$$ + +The presence of $Term_{t,4}$ introduces an additional layer of complexity in the analysis, as it reflects the difference between successive adaptive learning rates. Addressing this extra error term is crucial for establishing robust convergence guarantees under the ABC inequality or affine noise variance conditions. Existing approaches to handling such terms, which often rely on the cancellation of errors through preceding descent terms, fall short in this context. This necessitates a more innovative strategy, which we present in the following section. + +# 4.3.1. ADDRESSING THE EXTRA ERROR TERM: OUR INNOVATIVE APPROACH + +The term $Term_{t,4}$ , introduced by the difference between $\eta_{v_{t-1},i}$ and $\eta_{v_t,i}$ , presents a significant challenge in the convergence analysis of Adam under the ABC inequality or affine noise variance conditions. In existing methods, it is common to attempt to cancel out such error terms by leveraging the preceding descent term Descent-Term $t$ . However, this approach might not work within the ABC framework. Recent works such as Wang et al. (2023; 2024a) have shown that, under existing techniques, the best one can achieve is a weakened form of the stochastic gradient assumption, namely the coordinate affine noise variance condition. To overcome these limitations, we introduce a novel approach to handle $Term_{t,4}$ . We scale it as follows: + +$$ +\begin{array}{l} \operatorname {T e r m} _ {t, 4} \leq \frac {1}{2} \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \eta_ {v _ {t - 1}, i} \nabla_ {i} f (w _ {t}) g _ {t, i} \mid \mathscr {F} _ {t - 1} \right] \\ + C _ {1} f (u _ {t}) \cdot \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \Delta_ {t, i} \mid \mathcal {F} _ {t - 1} \right] + \tilde {R} _ {t} \\ + C \sum_ {i = 1} ^ {d} \Delta_ {t, i} + \underbrace {C \sum_ {i = 1} ^ {d} \left(\mathbb {E} [ \Delta_ {t , i} \mid \mathcal {F} _ {t - 1} ] - \Delta_ {t , i}\right)} _ {T e r m _ {5}}, \\ \end{array} +$$ + +where $\Delta_{t,i} \coloneqq \eta_{v_{t-1},i} - \eta_{v_t,i}$ , $C_1 \coloneqq \frac{A + 2L_fB}{2}(L_f + 1)$ , and $\tilde{R}_t$ represents a negligible remainder term, primarily stemming from the difference between $f(w_t)$ and $f(u_t)$ . The + +critical term in this inequality is $C_1f(u_t)\sum_{i = 1}^d\mathbb{E}[\Delta_{t,i}\mid \mathcal{F}_{t - 1}]$ , which cannot be effectively canceled out using existing methods. + +To handle this issue, we assign $\overline{\Delta}_t\coloneqq \sum_{i = 1}^d\mathbb{E}[\Delta_{t,i}\mid$ $\mathcal{F}_{t - 1}]$ , and move the term $C_1\overline{\Delta}_t f(u_t)$ to the left-hand side of inequality 6 and combine it with the existing $f(u_{t})$ term. This leads to a new epoch inequality of the form: + +$$ +\begin{array}{l} f \left(u _ {t + 1}\right) - \left(1 + C _ {1} \bar {\Delta} _ {t}\right) f \left(u _ {t}\right) \\ \leq - \frac {1}{2} \text {D e s c e n t - T e r m} _ {t} + M - \text {T e r m} _ {t} + \text {T e r m} _ {t, 2} \\ + R - T e r m _ {t}. \tag {7} \\ \end{array} +$$ + +In the inequality $M-Term_{t} = Term_{t,3} + Term_{t,5}$ is a martingale difference sequence and $R-Term_{t}$ is the (neglectable) remainder term by combining all other terms from the inequalities. To express this inequality in a form resembling a Lyapunov function, we introduce an auxiliary product variable: $\Pi_{\Delta,t} \coloneqq \prod_{k=1}^{t}(1 + C_{1}\overline{\Delta}_{k})^{-1} \quad (\forall t \geq 2)$ , $\Pi_{\Delta,1} \coloneqq 1$ (Informal). Note that $\Pi_{\Delta,t}$ here is merely a simplified version of the actual $\Pi_{\Delta,t}$ used in the formal lemma; it is not the version we employ in practice. Multiplying both sides of the inequality by $\Pi_{\Delta,t}$ , we obtain the following reformulated inequality: + +$$ +\begin{array}{l} \Pi_ {\Delta , t} f (u _ {t + 1}) - \Pi_ {\Delta , t - 1} f (u _ {t}) \\ \leq - \frac {1}{2} \Pi_ {\Delta , t} \cdot D e s c e n t - T e r m _ {t} + \Pi_ {\Delta , t} \cdot M - T e r m _ {t} \\ + \Pi_ {\Delta , t} \cdot \operatorname {T e r m} _ {t, 2} + \Pi_ {\Delta , t + 1} \cdot R - \operatorname {T e r m} _ {t}. \tag {8} \\ \end{array} +$$ + +This reformulation introduces $\Pi_{\Delta, t}$ as a scaling factor, which, along with the original Lyapunov function, captures the impact of $Term_{t,4}$ . The resulting inequality closely parallels the approximate descent inequality for SGD, with additional terms accounting for Adam's adaptive nature. + +The handling of $Term_{t,4}$ in our analysis framework is a significant advancement over existing methods. It allows us to establish stronger convergence guarantees under more general conditions. + +# 4.4. Deriving Sample Complexity and Almost Sure Convergence + +After establishing the Approximate Descent Inequality, the next step is to derive the sample complexity and almost sure convergence results for Adam. The methodology for obtaining these results largely mirrors the approaches traditionally used in the analysis of SGD. Specifically, the inequality provides a foundation for bounding the expected decrease in the loss function, which can then be used to establish both sample complexity and almost sure convergence. + +However, a key difference in our analysis lies in the introduction of the term $\Pi_{\Delta ,t}$ within the Approximate Descent + +Inequality. This term introduces a new layer of complexity not present in the standard SGD analysis. In particular, we are required to bound the $p$ -th moment of the reciprocal of this term, i.e., $\mathbb{E}[\Pi_{\Delta ,t}^{-p}]$ , $(p \geq 1)$ . Due to the unique structure of $\Pi_{\Delta ,t + 1}$ , determining a bound for this $p$ -th moment is a non-trivial task. + +To address this challenge, we leverage tools from discrete martingale theory, particularly the Burkholder's inequality. It allows us to establish a recursive relationship between the $p$ -th moment $\mathbb{E}[\Pi_{\Delta ,t}^{-p}]$ and the $p / 2$ -th moment $\mathbb{E}[\Pi_{\Delta ,t}^{-p / 2}]$ . This recursive structure is crucial as it enables us to iteratively bound the higher moments of $\Pi_{\Delta ,t}^{-1}$ . + +Once the recursive relationship is established, we apply fundamental theorems from measure theory, such as the Lebesgue's Monotone Convergence theorem or the Lebesgue's Dominated Convergence theorem, to obtain the final bound on the $p$ -th moment. The detailed process for bounding $\mathbb{E}[\Pi_{\Delta ,t}^{-p}]$ can be found in Lemma C.3, Lemma C.5 and Lemma D.1. + +# 4.5. Establishing Asymptotic $L_{1}$ Convergence + +Since we have already proved almost sure convergence in Theorem 3.2, it is natural to attempt to prove $L_{1}$ convergence via the Lebesgue's Dominated Convergence theorem. To achieve this, we need to find a function $h$ that is $\mathcal{F}_{\infty}$ -measurable and satisfies $\mathbb{E}|h| < +\infty$ , and such that for all $t \geq 1$ , we have $\|\nabla f(w_t)\| \leq |h|$ . Since for all $t$ we naturally have $\|\nabla f(w_t)\| \leq \sup_{k \geq 1} \|\nabla f(w_k)\|$ , we only need to prove that $\mathbb{E}[\sup_{k \geq 1} \|\nabla f(w_k)\|] < +\infty$ . + +This task presents a significant challenge because, within our analytical framework, we cannot assume that the gradients are uniformly bounded, which means we cannot directly apply the Lebesgue's Dominated Convergence theorem. Instead, we need to utilize advanced techniques from discrete martingale theory, specifically the first hitting time decomposition method, to obtain a bound on this maximal expectation. The detailed process can be found in Appendix D.3.13. + +# 5. Conclusion + +We have introduced a novel and comprehensive framework for analyzing the convergence properties of Adam. Our frame starts with weak assumptions such as the ABC inequality. By identifying the key properties of the learning rate, handling the momentum term, and establishing the approximate descent inequality, the frame concludes the sample complexity, almost surely convergence, and asymptotic $L_{1}$ convergence results of Adam. Our techniques overcome existing limitations, aligning Adam's convergence guarantees with those of SGD, thereby justifying Adam's broad applicability in machine learning. + +# Acknowledgements + +We thank the anonymous reviewers for their helpful feedback and suggestions. Xiao Li is supported in part by the National Natural Science Foundation of China (NSFC) under grant 12201534 and in part by the Shenzhen Science and Technology Program under grant RCYX20221008093033010. Baoxiang Wang is partially supported by the National Natural Science Foundation of China (72394361, 62106213) and an extended support project from the Shenzhen Science and Technology Program. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none of which we feel must be specifically highlighted here. + +# References + +Bottou, L. Large-scale machine learning with stochastic gradient descent. In Proceedings of COMPSTAT'2010: 19th International Conference on Computational Statistics Paris France, August 22-27, 2010 Keynote, Invited and Contributed Papers, pp. 177-186. Springer, 2010. +Bottou, L., Curtis, F. E., and Nocedal, J. Optimization methods for large-scale machine learning. SIAM review, 60(2):223-311, 2018. +Ghadimi, S. and Lan, G. Stochastic first-and zeroth-order methods for nonconvex stochastic programming. SIAM Journal on Optimization, 23(4):2341-2368, 2013. +Guo, Z., Xu, Y., Yin, W., Jin, R., and Yang, T. A novel convergence analysis for algorithms of the Adam family and beyond. arXiv preprint arXiv:2104.14840, 2021. +He, M., Liang, Y., Liu, J., and Xu, D. Convergence of Adam for non-convex objectives: Relaxed hyperparameters and non-ergodic case. arXiv preprint arXiv:2307.11782, 2023. +Hong, Y. and Lin, J. On convergence of adam for stochastic optimization under relaxed assumptions. arXiv preprint arXiv:2402.03982, 2024. +Huang, F., Li, J., and Huang, H. Super-adam: faster and universal framework of adaptive gradients. Advances in Neural Information Processing Systems, 34:9074-9085, 2021. +Khaled, A. and Richtárik, P. Better theory for SGD in the nonconvex world. Trans. Mach. Learn. Res., 2023, 2023. + +KHOSHNEVISAN, D. Stochastic integration and stochastic partial differential equations: A tutorial. 2006. +Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. +Li, H., Rakhlin, A., and Jadbabaie, A. Convergence of Adam under relaxed assumptions. Advances in Neural Information Processing Systems, 36, 2024. +Liu, Y., Gao, Y., and Yin, W. An improved analysis of stochastic gradient descent with momentum. Advances in Neural Information Processing Systems, 33:18261-18271, 2020. +Nguyen, L., Nguyen, P. H., Dijk, M., Richtárik, P., Scheinberg, K., and Takác, M. SGD and hogwild! Convergence without the bounded gradients assumption. In International Conference on Machine Learning, pp. 3750-3758. PMLR, 2018. +Reddi, S. J., Kale, S., and Kumar, S. On the convergence of Adam and beyond. In International Conference on Learning Representations (ICLR), 2018. +Wang, B., Zhang, H., Ma, Z., and Chen, W. Convergence of AdaGrad for non-convex objectives: Simple proofs and relaxed assumptions. In The Thirty Sixth Annual Conference on Learning Theory, pp. 161-190. PMLR, 2023. +Wang, B., Fu, J., Zhang, H., Zheng, N., and Chen, W. Closing the gap between the upper bound and lower bound of Adam's iteration complexity. Advances in Neural Information Processing Systems, 36, 2024a. +Wang, B., Zhang, Y., Zhang, H., Meng, Q., Sun, R., Ma, Z.-M., Liu, T.-Y., Luo, Z.-Q., and Chen, W. Provable adaptivity of Adam under non-uniform smoothness. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 2960-2969, 2024b. +Xiao, N., Hu, X., Liu, X., and Toh, K.-C. Adam-family methods for nonsmooth optimization with convergence guarantees. Journal of Machine Learning Research, 25 (48):1-53, 2024. +Zhang, Y., Chen, C., Shi, N., Sun, R., and Luo, Z.-Q. Adam can converge without any modification on update rules. Advances in Neural Information Processing Systems, 35: 28386-28399, 2022. +Zou, D. and Shen, L. Improved convergence analysis of stochastic optimization algorithms for nonconvex optimization. In Advances in Neural Information Processing Systems (NeurIPS), 2019. + +Zou, F., Shen, L., Jie, Z., Zhang, W., and Liu, W. A sufficient condition for convergences of Adam and RMSprop. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11127-11135, 2019. + +# Contents + +# 1. Introduction 1 + +1.1 Related Works 2 + +# 2.Preliminaries 3 + +2.1 Adam 3 +2.2 Assumptions 3 +2.3 Comparison with Prior Works on Stochastic Gradient Assumptions 4 +2.4 Hyperparameter Settings 4 + +# 3. Theoretical Results 4 + +3.1 Non-Asymptotic Sample Complexity 4 +3.2 Asymptotic Convergence 4 + +# 4. Framework for Analyzing Adam 5 + +4.1 Key Properties of Adaptive Learning Rates 5 +4.2 Handling the Momentum Term 5 +4.3 Establishing the Approximate Descent Inequality 6 +4.3.1 Addressing the Extra Error Term: Our Innovative Approach 7 +4.4 Deriving Sample Complexity and Almost Sure Convergence 8 +4.5 Establishing Asymptotic L1 Convergence 8 + +# 5. Conclusion 8 + +# Impact Statement 9 + +# A. Comparison with Prior Works on Stochastic Gradient Assumptions 12 + +# B. Proofs of the Properties of Adaptive Learning Rates and Momentum Term 13 + +B.1 Proof of Property 2 13 +B.2 Proof of Property 3 13 +B.3 Proof of Property 4 13 +B.4 Proof of Property 5 14 + +# C. Lemmas in Probability Theory and Real Analysis 14 + +C.1 Proofs of These Lemmas 15 +C.1.1 Proof of Lemma C.1 15 +C.1.2 Proof of Lemma C.2 15 +C.1.3 Proof of Lemma C.3 16 +C.1.4 Proof of Lemma C.4 17 +C.1.5 Proof of Lemma C.5 18 + +# D. Supporting Lemmas 20 + +D.1 Dependency Graph of Lemmas and Theorems 20 + +D.2 Statements of the Lemmas 21 +D.3 Proofs of the Lemmas and the Theorems 23 + +D.3.1 Proof of Lemma D.1 23 +D.3.2 Proofs of Lemma 4.1 24 +D.3.3 Proof of Lemma D.3 27 +D.3.4 Proof of Lemma D.4 28 +D.3.5 Proof of Lemma D.5 29 +D.3.6 Proof of Lemma D.7 29 +D.3.7 Proof of Lemma D.8 31 +D.3.8 Proof of Lemma D.9 31 +D.3.9 Proof of Lemma D.10 33 +D.3.10 Proof of Theorem 3.1 34 +D.3.11 Proof of Lemma D.6 35 +D.3.12 Proof of Theorem 3.2 35 +D.3.13 Proof of Theorem 3.3 38 + +E.The Proof of Lemma D.2 41 + +E.1 Auxiliary Lemmas for Proving Lemma D.2 41 +E.2 Proof of Lemma D.2 48 + +# A. Comparison with Prior Works on Stochastic Gradient Assumptions + +Our assumption on the stochastic gradient (Assumption 2.3) is relatively mild compared to those in prior works. Here, we focus on comparing with the traditional affine noise variance condition, coordinate affine noise variance assumption, and the almost surely bounded stochastic gradient assumption. + +Traditional Affine Noise Variance Condition The traditional affine noise variance condition (Affine noise variance) (e.g., Bottou et al., 2018; Nguyen et al., 2018)) assumes that there exist constants $B \geq 0$ and $C \geq 0$ such that: + +$$ +\mathbb {E} \left[ \left\| g _ {t} \right\| ^ {2} \mid \mathcal {F} _ {t - 1} \right] \leq B \| \nabla f (w _ {t}) \| ^ {2} + C. \tag {9} +$$ + +This condition bounds the expected squared norm of the stochastic gradient by a linear function of the squared norm of the true gradient plus a constant. It is stronger than our ABC inequality because it does not include the term involving the function value difference $f(w_{t}) - f^{*}$ . + +Some works adopt the following form of affine variance noise: + +$$ +\mathbb {E} \left[ \| g _ {t} - \nabla f (w _ {t}) \| ^ {2} \mid \mathcal {F} _ {t - 1} \right] \leq B \| \nabla f (w _ {t}) \| ^ {2} + C. +$$ + +It is important to note that, due to the identity + +$$ +\mathbb {E} \left[ \left\| g _ {t} - \nabla f (w _ {t}) \right\| ^ {2} \mid \mathcal {F} _ {t - 1} \right] = \mathbb {E} \left[ \left\| g _ {t} \right\| ^ {2} \mid \mathcal {F} _ {t - 1} \right] - \left\| \nabla f (w _ {t}) \right\| ^ {2}, +$$ + +it is straightforward to see that these two forms are equivalent. + +Even under this condition, current methods for analyzing Adam encounter significant difficulties. We will explain these challenges in the proof sketch of Lemma 4.1. Besides, both (Huang et al., 2021) and (Guo et al., 2021) provided convergence bounds under traditional affine noise variance condition. However, they relied on the assumption for step-size where $C_l \leq \left\| \frac{1}{\sqrt{v_t + \mu}} \right\|_{\infty} \leq C_u \forall t \in [T]$ . + +Coordinate Affine Noise Variance Assumption Wang et al. (2024a) introduce the coordinate affine noise variance assumption, which requires that each component of the stochastic gradient satisfies an affine noise variance inequality. Specifically, for each coordinate $i$ , there exist constants $B, C \geq 0$ such that: + +$$ +\mathbb {E} \left[ g _ {t, i} ^ {2} \mid \mathcal {F} _ {t - 1} \right] \leq B \| \nabla_ {i} f (w _ {t}) \| ^ {2} + C, \tag {10} +$$ + +where $g_{t,i}$ and $\nabla_i f(w_t)$ are the $i$ -th components of $g_t$ and $\nabla f(w_t)$ , respectively. + +This assumption is stronger than the traditional affine noise variance condition because it imposes the inequality on each coordinate individually, rather than on the overall gradient. + +Exponential-tailed Affine Variance Noise Condition Certain works, such as (Hong & Lin, 2024), examine the assumption of affine variance noise with an exponential tail distribution, i.e., + +$$ +\mathbb {E} \left[ \exp \left\{\frac {\| g _ {t} - \nabla f (w _ {t}) \| ^ {2}}{B \| \nabla f (w _ {t}) \| ^ {2} + C} \right\} \mid \mathcal {F} _ {t - 1} \right] \leq e. \tag {11} +$$ + +This assumption is close to the almost sure form of affine variance noise, specifically $\| g_t\|^2 \leq B\|\nabla f(w_t)\|^2 + C$ a.s. It is important to emphasize that this assumption (exponential-tailed affine variance noise condition) is stronger than the traditional affine variance noise assumption based on the second moment of the stochastic gradient. Furthermore, the methods developed under this stronger assumption are not applicable to affine variance noise models that rely on the second moment. + +Almost Surely Bounded Stochastic Gradient Assumption Some prior works, such as (He et al., 2023; Xiao et al., 2024), assume that the stochastic gradients are almost surely bounded. That is, there exists a constant $M \geq 0$ such that for all epochs $t$ : $\| g_t\| \leq M$ almost surely. This is a strong assumption, as it requires that the stochastic gradient norm is uniformly bounded almost surely at all epochs. In practice, especially in non-convex optimization problems, this assumption + +is often violated (see Wang et al. 2023). For instance, when optimizing deep neural networks, gradient norms can become unbounded due to the complexity and non-linearity of the models. Moreover, this assumption implies that the true gradient is also bounded by $M$ , because $\| \nabla f(w_t)\|^2 \leq \mathbb{E}[\| g_t\|^2 \mid \mathcal{F}_{t-1}] \leq M^2$ . Our assumption is clearly weaker than the almost surely bounded stochastic gradient assumption, as we only require a bound on the expected squared norm of the stochastic gradient, which can depend on the current function value and gradient norm, rather than a uniform almost sure bound. + +Moreover, assuming almost surely bounded stochastic gradients is hard to satisfy in practice and may not reflect realistic scenarios. As discussed in (Wang et al., 2023; Khaled & Richtárik, 2023), such assumptions can be unrealistic and limit the applicability of theoretical results. + +# B. Proofs of the Properties of Adaptive Learning Rates and Momentum Term + +# B.1. Proof of Property 2 + +Proof. Due to Algorithm 2.1, we observe that + +$$ +v _ {t + 1} = \beta_ {2, t + 1} v _ {t} + (1 - \beta_ {2, t + 1}) g _ {t + 1} ^ {\circ 2} = \left(1 - \frac {1}{(t + 1) ^ {\gamma}}\right) v _ {t} + \frac {1}{(t + 1) ^ {\gamma}} g _ {t + 1} ^ {\circ 2}, (\forall t \geq 1). +$$ + +which means + +$$ +(t + 1) ^ {\gamma} v _ {t + 1, i} = \left((t + 1) ^ {\gamma} - 1\right) v _ {t, i} + g _ {t + 1, i} ^ {2} \geq t ^ {\gamma} v _ {t, i}. \tag {12} +$$ + +This implies that $t^\gamma v_{t,i}$ is monotonically non-decreasing. Subsequently, we have + +$$ +\eta_ {v _ {t}, i} = \frac {\eta_ {t}}{\sqrt {v _ {t , i}} + \mu} = \frac {\sqrt {t ^ {\gamma}} \eta_ {t}}{\sqrt {t ^ {\gamma} v _ {t , i}} + \sqrt {t ^ {\gamma}} \mu} = \frac {\frac {1}{t ^ {\delta - \frac {\gamma - 1}{2}}}}{\sqrt {t ^ {\gamma} v _ {t , i}} + \sqrt {t ^ {\gamma}} \mu}. +$$ + +Because the numerator is monotonically decreasing and greater than 0, while the denominator is monotonically nonincreasing and greater than 0, we deduce the monotonic non-increasing property of $\eta_{v_t}$ . + +# B.2. Proof of Property 3 + +Proof. For $v_{1,i}$ , we derive the following estimate + +$$ +v _ {1, i} = \beta_ {2, 1} v _ {0, i} + (1 - \beta_ {2, 1}) g _ {1, i} ^ {2} = (1 - \alpha_ {0}) v + \alpha_ {0} g _ {1, i} ^ {2}. +$$ + +It is immediate to find that $\alpha_{1}S_{1,i}\leq v_{1,i}\leq S_{1,i}$ . For $\forall k\geq 2$ , by Eq. (12), we have $k^{\gamma}v_{k,i}\geq (k - 1)^{\gamma}v_{k - 1,i} + g_{k,i}^{2}$ . Then, by summing up the above iterative equations, we obtain $\forall t\geq 2$ + +$$ +t ^ {\gamma} v _ {t, i} \geq v _ {1, i} + \sum_ {k = 2} ^ {t} g _ {k, i} ^ {2}. +$$ + +Combining the estimate for $v_{1,i}$ , we have $\forall t \geq 2$ : + +$$ +t ^ {\gamma} v _ {t, i} \geq (1 - \alpha_ {0}) v + \alpha_ {0} g _ {1, i} ^ {2} + \sum_ {k = 2} ^ {t} g _ {k, i} ^ {2}. +$$ + +Then $t^\gamma v_{t,i} \geq \alpha_1 S_{t,i}$ , which completes the proof. + +# B.3. Proof of Property 4 + +Proof. According to Algorithm 2.1, we have the following iterative equations + +$$ +m _ {t, i} = \beta_ {1} m _ {t - 1, i} + (1 - \beta_ {1}) g _ {t, i}. +$$ + +We take the square of the 2-norm on both sides, which yields + +$$ +m _ {t, i} ^ {2} = (\beta_ {1} m _ {t - 1, i} + (1 - \beta_ {1}) g _ {t, i}) ^ {2} +$$ + +$$ +\begin{array}{l} = \beta_ {1} ^ {2} m _ {t - 1, i} ^ {2} + 2 \beta_ {1} (1 - \beta_ {1}) m _ {t - 1, i} g _ {t, i} + (1 - \beta_ {1}) ^ {2} g _ {t, i} ^ {2} \\ \stackrel {(a)} {\leq} \beta_ {1} m _ {t - 1, i} ^ {2} + (1 - \beta_ {1}) g _ {t, i} ^ {2}. \\ \end{array} +$$ + +In step (a), we used the AM-GM inequality, i.e., + +$$ +2 \beta_ {1} (1 - \beta_ {1}) m _ {t - 1, i} g _ {t, i} \leq \beta_ {1} (1 - \beta_ {1}) m _ {t - 1, i} ^ {2} + \beta_ {1} (1 - \beta_ {1}) g _ {t, i} ^ {2}, +$$ + +that is, + +$$ +m _ {t, i} ^ {2} - m _ {t - 1, i} ^ {2} \leq - (1 - \beta_ {1}) m _ {t - 1, i} ^ {2} + (1 - \beta_ {1}) g _ {t, i} ^ {2}, +$$ + +which completes the proof. + +# B.4. Proof of Property 5 + +Proof. Due to + +$$ +\begin{array}{l} | f (w _ {t}) - f (u _ {t}) | = \left| \nabla f (u _ {t}) ^ {\top} (w _ {t} - u _ {t}) + \frac {L _ {f}}{2} \| w _ {t} - u _ {t} \| ^ {2} \right| \leq \| \nabla f (u _ {t}) \| \| w _ {t} - u _ {t} \| + \frac {L _ {f}}{2} \| w _ {t} - u _ {t} \| ^ {2} \\ \leq \frac {1}{2} \| \nabla f (u _ {t}) \| ^ {2} + \frac {L _ {f} + 1}{2} \| w _ {t} - u _ {t} \| ^ {2} \\ = L f (u _ {t}) + \frac {(L _ {f} + 1) \beta_ {1} ^ {2}}{2 (1 - \beta_ {1}) ^ {2}} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2}, \\ \end{array} +$$ + +we have + +$$ +f (w _ {t}) \leq f (u _ {t}) + | f (w _ {t}) - f (u _ {t}) | \leq (L _ {f} + 1) f (u _ {t}) + \frac {(L _ {f} + 1) \beta_ {1} ^ {2}}{2 (1 - \beta_ {1}) ^ {2}} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2}. +$$ + +# C. Lemmas in Probability Theory and Real Analysis + +Lemma C.1. If $0 < \mu < 1$ and $0 < \sigma < 1$ ( $\sigma < \mu$ ) are two constants, then for any positive sequence $\{\psi_n\}$ , there is + +$$ +\sum_ {i = 1} ^ {n} \mu^ {n - i} \psi_ {i} < \sum_ {k = 1} ^ {n} \mu^ {n - k} \sum_ {i = 1} ^ {k} \sigma^ {k - i} \psi_ {i} \leq 1 / \left(1 - \omega_ {0}\right) \sum_ {i = 1} ^ {n} \mu^ {n - i} \psi_ {i}, +$$ + +where $\omega_0\coloneqq \sigma /\mu$ + +Lemma C.2. Suppose that $f(x)$ is differentiable and lower bounded, i.e. $f^{*} = \inf_{x\in \mathbb{R}^{d}}f(x) > - \infty$ , and $\nabla f(x)$ is Lipschitz continuous with parameter $\mathcal{L} > 0$ , then $\forall x\in \mathbb{R}^d$ , we have + +$$ +\left\| \nabla f (x) \right\| ^ {2} \leq 2 \mathcal {L} \big (f (x) - f ^ {*} \big). +$$ + +Lemma C.3. Let $\{(X_n, \mathcal{F}_n)\}_{n \geq 1}$ be a non-negative adapted process such that $\sum_{n=1}^{+\infty} X_n = M < +\infty$ almost surely, where $M$ is a finite constant. Define the partial sum of conditional expectations as $\Lambda_T := \sum_{n=1}^{T} \mathbb{E}[X_n \mid \mathcal{F}_{n-1}]$ . Then the following properties hold. + +(i) The sequence $\{\Lambda_T\}_{T\geq 1}$ converges almost surely, i.e., $\Lambda_T\xrightarrow{a.s.}\Lambda$ where $\Lambda \coloneqq \sum_{n = 1}^{+\infty}\mathbb{E}[X_n\mid \mathcal{F}_{n - 1}]$ . +(ii) For any $p \geq 1$ , the sequence $\{\Lambda_T\}_{T \geq 1}$ converges in $L_p$ , i.e., $\lim_{T \to \infty} \mathbb{E}[|\Lambda_T - \Lambda|^p] = 0$ . Meanwhile, the $p$ -th moment of the limit $\Lambda$ is bounded by a constant $C_\Lambda(p) > 0$ , where $C_\Lambda(p) = o((2M)^p p^{\sqrt{p}})$ . + +Lemma C.4. Let $l \in (0,1)$ . Then, for sufficiently large $n \in N_{+}$ , we have + +$$ +\sum_ {k = 0} ^ {\infty} l ^ {k} k ^ {\sqrt {n}} \sim \frac {\Gamma (\sqrt {n} + 1)}{(\ln \frac {1}{l}) ^ {\sqrt {n} + 1}}, \quad n \to \infty . +$$ + +Lemma C.5. Let $\{(X_n, \mathcal{F}_n)\}_{n \geq 1}$ be a non-negative adapted process such that $\sum_{n=1}^{+\infty} X_n = M < +\infty$ almost surely, where $M$ is a finite constant. For any $k > 1$ , define the partial sum of conditional expectations as $\Lambda_{k,T} := \sum_{n=k}^{T} \mathbb{E}[X_n \mid \mathcal{F}_{n-k}]$ . Then the following properties hold. + +(i) The sequence $\{\Lambda_{k,T}\}_{T\geq 1}$ converges almost surely, i.e., $\Lambda_{k,T} \xrightarrow{a.s.} \Lambda^{(k)}$ , where $\Lambda := \sum_{n=k}^{+\infty} \mathbb{E}[X_n \mid \mathcal{F}_{n-k}]$ . +(ii) For any $p \geq 1$ , the sequence $\{\Lambda_{k,T}\}_{T \geq 1}$ converges in $L_p$ , i.e., $\lim_{T \to \infty} \mathbb{E}\left[|\Lambda_{k,T} - \Lambda^{(k)}|^p\right] = 0$ . Meanwhile, the $p$ -th moment of the limit $\Lambda^{(k)}$ is bounded by a constant $C_{\Lambda^{(k)}}(p) > 0$ , where $C_{\Lambda}(p) = o((2M)^p (kp)\sqrt{p})$ . +(iii) For any $0 < l < 1$ , the arbitrary $p$ -th moment of the random variable $e^{\Lambda(l)}$ exists, where + +$$ +\Lambda (l) = \sum_ {k = 1} ^ {+ \infty} \mathbb {E} \left[ \left(\sum_ {t = k} ^ {+ \infty} l ^ {t - k} X _ {t}\right) \Big | \mathcal {F} _ {k - 1} \right]. +$$ + +The upper bound of this $p$ -th moment depends only on $p, l,$ and $M$ . We denote this upper bound by $C_{e^{\Lambda (l)}}(p,M)$ . + +# C.1. Proofs of These Lemmas + +# C.1.1. PROOF OF LEMMA C.1 + +Proof. The proof of this lemma is through identities. We assume $\mu >\sigma$ (the case $\mu < \sigma$ is the similar), and let $\omega_0 = \log_\mu \sigma >1$ . Then we derive + +$$ +\sum_ {k = 1} ^ {n} \mu^ {n - k} \sum_ {i = 1} ^ {k} \sigma^ {k - i} \psi_ {i} = \sum_ {k = 1} ^ {n} \sum_ {i = 1} ^ {k} \mu^ {n - k} \sigma^ {k - i} \psi_ {i} = \sum_ {i = 1} ^ {n} \sum_ {k = i} ^ {n} \mu^ {n - k} \sigma^ {k - i} \psi_ {i} = \sum_ {i = 1} ^ {n} \left(\sum_ {k = i} ^ {n} \left(\frac {\sigma}{\mu}\right) ^ {k - i}\right) \mu^ {n - i} \psi_ {i}, +$$ + +where $\omega_0 = \sigma /\mu$ . Then combining $1 < \sum_{k = i}^{n}\left(\frac{\sigma}{\mu}\right)^{k - i} < \frac{1}{1 - \omega_0}$ we get the result. + +# C.1.2. PROOF OF LEMMA C.2 + +Proof. For $\forall x\in \mathbb{R}^d$ , define the function + +$$ +g (t) = f \left(x + t \frac {x ^ {\prime} - x}{\| x ^ {\prime} - x \|}\right), +$$ + +where $x'$ is a constant point such that $x' - x$ is parallel to $\nabla f(x)$ . By taking the derivative, we obtain + +$$ +g ^ {\prime} (t) = \nabla_ {x + t \frac {x ^ {\prime} - x}{\| x ^ {\prime} - x \|}} f \left(x + t \frac {x ^ {\prime} - x}{\| x ^ {\prime} - x \|}\right) ^ {\top} \frac {x ^ {\prime} - x}{\| x ^ {\prime} - x \|}. \tag {13} +$$ + +Through the Lipschitz condition of $\nabla f(x)$ , we get $\forall t_1, t_2$ + +$$ +\begin{array}{l} \left|g^{\prime}(t_{1}) - g^{\prime}(t_{2})\right| = \bigg|\bigg(\nabla_{x + t\frac{x^{\prime} - x}{\|x^{\prime} - x\|}}f\bigg(x + t_{1}\frac{x^{\prime} - x}{\|x^{\prime} - x\|}\bigg) - \nabla_{x + t\frac{x^{\prime} - x}{\|x^{\prime} - x\|}}f\bigg(x + t_{2}\frac{x^{\prime} - x}{\|x^{\prime} - x\|}\bigg)\bigg)^{\top}\frac{x^{\prime} - x}{\|x^{\prime} - x\|} \\ \leq \left\| \nabla_ {x + t \frac {{x ^ {\prime}} - x}{\| x ^ {\prime} - x \|}} f \left(x + t _ {1} \frac {{x ^ {\prime}} - x}{\| x ^ {\prime} - x \|}\right) - \nabla_ {x + t \frac {{x ^ {\prime}} - x}{\| x ^ {\prime} - x \|}} f \left(x + t _ {2} \frac {{x ^ {\prime}} - x}{\| x ^ {\prime} - x \|}\right) \right\| \left\| \frac {{x ^ {\prime}} - x}{\| x ^ {\prime} - x \|} \right\| \leq \mathcal {L} | t _ {1} - t _ {2} |. \\ \end{array} +$$ + +This indicates that $g'(t)$ satisfies the Lipschitz condition as well. Then $\inf_{t \in \mathbb{R}} g(t) \geq \inf_{x \in \mathbb{R}^d} f(x) > -\infty$ . Let $g^* = \inf_{x \in \mathbb{R}} g(x)$ . Subsequently, $\forall t_0 \in \mathbb{R}$ , + +$$ +g (0) - g ^ {*} \geq g (0) - g \left(t _ {0}\right). \tag {14} +$$ + +By using the Newton-Leibniz's formula, + +$$ +g (0) - g (t _ {0}) = \int_ {t _ {0}} ^ {0} g ^ {\prime} (\alpha) d \alpha = \int_ {t _ {0}} ^ {0} \left(g ^ {\prime} (\alpha) - g ^ {\prime} (0)\right) d \alpha + \int_ {t _ {0}} ^ {0} g ^ {\prime} (0) d \alpha . +$$ + +Through the Lipschitz condition of $g^{\prime}$ , we get that + +$$ +g (0) - g (t _ {0}) \geq \int_ {t _ {0}} ^ {0} - \mathcal {L} | \alpha - 0 | d \alpha + \int_ {t _ {0}} ^ {0} g ^ {\prime} (0) d \alpha = \frac {1}{2 \mathcal {L}} \left(g ^ {\prime} (0)\right) ^ {2}. +$$ + +Then we take a special value of $t_0$ . Let $t_0 = -g'(0) / \mathcal{L}$ . We obtain + +$$ +\begin{array}{l} g (0) - g \left(t _ {0}\right) \geq - \int_ {t _ {0}} ^ {0} \mathcal {L} | \alpha | d \alpha + \int_ {t _ {0}} ^ {0} g (0) d t = - \frac {\mathcal {L}}{2} \left(0 - t _ {0}\right) ^ {2} + g ^ {\prime} (0) (- t _ {0}) \tag {15} \\ = - \frac {1}{2 \mathcal {L}} \left(g ^ {\prime} (0)\right) ^ {2} + \frac {1}{\mathcal {L}} \left(g ^ {\prime} (0)\right) ^ {2} = \frac {1}{2 \mathcal {L}} \left(g ^ {\prime} (0)\right) ^ {2}. \\ \end{array} +$$ + +Substituting Eq. (15) into Eq. (14), we have + +$$ +g (0) - g ^ {*} \geq \frac {1}{2 \mathcal {L}} \left(g ^ {\prime} (0)\right) ^ {2}. +$$ + +Due to $g^{*}\geq f^{*}$ and $\left(g^{\prime}(0)\right)^{2} = \| \nabla f(x)\|^{2}$ , it follows that + +$$ +\left\| \nabla f (x) \right\| ^ {2} \leq 2 \mathcal {L} \big (f (x) - f ^ {*} \big). +$$ + +# C.1.3. PROOF OF LEMMA C.3 + +Proof. (i) Consider the non-negative adapted process $\{X_n, \mathcal{F}_n\}_{n \geq 1}$ and define the partial sum of conditional expectations as $\Lambda_T := \sum_{n=1}^{T} \mathbb{E}[X_n \mid \mathcal{F}_{n-1}]$ . + +First, we compute the expectation of $\Lambda_T$ + +$$ +\mathbb {E} [ \Lambda_ {T} ] = \mathbb {E} \left[ \sum_ {n = 1} ^ {T} \mathbb {E} [ X _ {n} \mid \mathcal {F} _ {n - 1} ] \right] = \sum_ {n = 1} ^ {T} \mathbb {E} [ X _ {n} ] \leq M. +$$ + +Since $X_{n}$ are non-negative, we know that $\Lambda_T$ is a non-decreasing sequence. Because $\mathbb{E}(\Lambda_T) (\forall T \geq 1)$ is also bounded by $M$ , we apply the Lebesgue's Monotone Convergence theorem. Thus, $\Lambda_T$ converges almost surely to a limit $\Lambda$ : + +$$ +\Lambda := \lim _ {T \to \infty} \Lambda_ {T} = \sum_ {n = 1} ^ {\infty} \mathbb {E} \left[ X _ {n} \mid \mathcal {F} _ {n - 1} \right] \quad \text {a . s .} +$$ + +This concludes that the sequence of conditional expectation sums converges almost surely. + +(ii) We begin by normalizing $X_{n}$ by considering the expression $Y_{n} = \frac{X_{n}}{2M}$ . According to the Lebesgue's Monotone Convergence theorem, we only need to prove that + +$$ +\forall p \geq 1, \mathbb {E} \left[ \sum_ {n = 1} ^ {\infty} \mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - 1} ] \right] ^ {p} := M (p) < + \infty . +$$ + +Next, we proceed with the calculation, and we obtain that $\forall p \geq 2$ , there is (Strictly speaking, we should first consider a finite $N$ and compute $\sum_{n=1}^{N}$ , and only then take the limit as $N \to +\infty$ , applying the Lebesgue's monotone convergence theorem to obtain the result for $\sum_{n=1}^{\infty}$ . However, for the sake of simplicity in the proof, we have directly computed $\sum_{n=1}^{\infty}$ ). + +$$ +\begin{array}{l} M (p) = \mathbb {E} \left[ \sum_ {n = 1} ^ {\infty} \mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - 1} ] \right] ^ {p} = \mathbb {E} \left[ \sum_ {n = 1} ^ {\infty} Y _ {n} + \sum_ {n = 1} ^ {\infty} (\mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - 1} ] - Y _ {n}) \right] ^ {p} \\ \stackrel {(a)} {\leq} \mathbb {E} \left[ \frac {1}{2} + \sum_ {n = 1} ^ {\infty} \left(\mathbb {E} \left[ Y _ {n} \mid \mathcal {F} _ {n - 1} \right] - Y _ {n}\right) \right] ^ {p} \stackrel {(b)} {\leq} 2 ^ {p - 1} \left(\frac {1}{2 ^ {p}} + \mathbb {E} \left[ \sum_ {n = 1} ^ {\infty} \left(\mathbb {E} \left[ Y _ {n} \mid \mathcal {F} _ {n - 1} \right] - Y _ {n}\right) \right] ^ {p}\right) \\ \stackrel {(c)} {\leq} \frac {1}{2} + 2 ^ {p - 1} C _ {p} \mathbb {E} \left[ \sum_ {n = 1} ^ {\infty} | \mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - 1} ] - Y _ {n} | ^ {2} \right] ^ {p / 2} \stackrel {(d)} {\leq} \frac {1}{2} + 2 ^ {p - 1} C _ {p} \mathbb {E} \left[ \sum_ {n = 1} ^ {\infty} | \mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - 1} ] - Y _ {n} | \right] ^ {p / 2} \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {(f)} {\leq} \frac {1}{2} + 2 ^ {p - 2} C _ {p} + 2 ^ {\frac {3}{2} p - 2} C _ {p} \mathbb {E} \left[ \sum_ {n = 1} ^ {\infty} \mathbb {E} \left[ Y _ {n} \mid \mathcal {F} _ {n - 1} \right] \right] ^ {p / 2} \\ = \frac {1}{2} + 2 ^ {p - 2} C _ {p} + 2 ^ {\frac {3}{2} p - 2} C _ {p} M (p / 2). \tag {16} \\ \end{array} +$$ + +In the above derivation, Inequality (a) requires noting that $\sum_{n=1}^{+\infty} Y_n = \frac{1}{2}$ . Inequality (b) uses the AM-GM inequality, specifically, + +$$ +\left(\frac {a + b}{2}\right) ^ {p} \leq \frac {a ^ {p} + b ^ {p}}{2}. +$$ + +Inequality $(c)$ involves using Burkholder's inequality, where $C_p$ is a constant depending only on $p$ , and its order with respect to $p$ is $\mathcal{O}(p)$ (see Theorem 5.27 in KHOSHNEVISAN (2006)). Inequality $(d)$ requires noting that + +$$ +| \mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - 1} ] - Y _ {n} | ^ {2} \leq | \mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - 1} ] - Y _ {n} |. +$$ + +By repeatedly using Equation (16) and using the fact that $C_p = \mathcal{O}(p)$ , we obtain the following estimate + +$$ +M (p) = o (p ^ {\sqrt {p}}), +$$ + +that is, + +$$ +\mathbb {E} \left[ \Lambda^ {p} \right] = o ((2 M) ^ {p} \cdot p ^ {\sqrt {p}}). +$$ + +# C.1.4. PROOF OF LEMMA C.4 + +Proof. Consider the function + +$$ +f (x) = l ^ {x} x ^ {\sqrt {n}}, +$$ + +with its derivative + +$$ +f ^ {\prime} (x) = l ^ {x} x ^ {\sqrt {n} - 1} (\ln l \cdot x + \sqrt {n}). +$$ + +We observe that $f$ is decreasing for $x > \frac{\sqrt{n}}{\ln\frac{1}{l}}$ . Therefore, we have the following estimate + +$$ +0\leq \sum_{0\leq k\leq \frac{\sqrt{n}}{\ln\frac{1}{l}} +1}l^{k}k^{\sqrt{n}}\leq \left(\frac{\sqrt{n}}{\ln\frac{1}{l}} +1\right)^{\sqrt{n}}\sum_{k = 0}^{\infty}l^{k} = \frac{1}{1 - l}\left(\frac{\sqrt{n}}{\ln\frac{1}{l}} +1\right)^{\sqrt{n}} = O\left(\frac{\sqrt{n}}{\ln\frac{1}{l}}\right)^{\sqrt{n}}. +$$ + +On the other hand, we can bound the remainder as follows: + +$$ +\begin{array}{l} \sum_ {k > \frac {\sqrt {n}}{\ln \frac {1}{l}} + 1} l ^ {k} k ^ {\sqrt {n}} \geq \sum_ {k > \frac {\sqrt {n}}{\ln \frac {1}{l}} + 1} \int_ {k} ^ {k + 1} l ^ {x} x ^ {\sqrt {n}} \mathrm {d} x \\ = \sum_ {k = 0} ^ {\infty} \int_ {k} ^ {k + 1} l ^ {x} x ^ {\sqrt {n}} \mathrm {d} x - \sum_ {0 \leq k \leq \frac {\sqrt {n}}{\ln \frac {1}{l}} + 1} \int_ {k} ^ {k + 1} l ^ {x} x ^ {\sqrt {n}} \mathrm {d} x \\ \geq \int_ {0} ^ {\infty} l ^ {x} x ^ {\sqrt {n}} d x - \left(\frac {\sqrt {n}}{\ln \frac {1}{l}} + 2\right) ^ {\sqrt {n}} \sum_ {k = 0} ^ {\infty} \int_ {k} ^ {k + 1} l ^ {x} d x \\ = \frac {\Gamma (\sqrt {n} + 1)}{(\ln \frac {1}{l}) ^ {\sqrt {n} + 1}} + O \left(\frac {\sqrt {n}}{\ln \frac {1}{l}}\right) ^ {\sqrt {n}}. \\ \end{array} +$$ + +$$ +c _ {p} \mathbb {E} [ (S (M)) ^ {p} ] \leq \mathbb {E} [ (M ^ {*}) ^ {p} ] \leq C _ {p} \mathbb {E} [ (S (M)) ^ {p} ], +$$ + +Similarly, we have the upper bound + +$$ +\begin{array}{l} \sum_ {k > \frac {\sqrt {n}}{\ln \frac {1}{l}} + 1} l ^ {k} k ^ {\sqrt {n}} \leq \sum_ {k > \frac {\sqrt {n}}{\ln \frac {1}{l}} + 1} \int_ {k - 1} ^ {k} l ^ {x} x ^ {\sqrt {n}} \mathrm {d} x \\ = \sum_ {k = 1} ^ {\infty} \int_ {k - 1} ^ {k} l ^ {x} x ^ {\sqrt {n}} \mathrm {d} x - \sum_ {1 \leq k \leq \frac {\sqrt {n}}{\ln \frac {1}{l}} + 1} \int_ {k - 1} ^ {k} l ^ {x} x ^ {\sqrt {n}} \mathrm {d} x \\ \leq \int_ {0} ^ {\infty} l ^ {x} x ^ {\sqrt {n}} \mathrm {d} x = \frac {\Gamma (\sqrt {n} + 1)}{(\ln \frac {1}{l}) ^ {\sqrt {n} + 1}}. \\ \end{array} +$$ + +Combining the estimates above, we have + +$$ +\sum_ {k = 0} ^ {\infty} l ^ {k} k ^ {\sqrt {n}} \sim \frac {\Gamma (\sqrt {n} + 1)}{(\ln \frac {1}{l}) ^ {\sqrt {n} + 1}}, \quad n \to \infty . +$$ + +# C.1.5. PROOF OF LEMMA C.5 + +Proof. (i) Consider the non-negative adapted process $\{X_n, \mathcal{F}_n\}_{n \geq 1}$ and define the partial sum of conditional expectations as $\Lambda_{k,T} := \sum_{n=k}^{T} \mathbb{E}[X_n \mid \mathcal{F}_{n-k}]$ . + +First, we compute the expectation of $\Lambda_{k,T}$ + +$$ +\mathbb {E} \left[ \Lambda_ {k, T} \right] = \mathbb {E} \left[ \sum_ {n = k} ^ {T} \mathbb {E} \left[ X _ {n} \mid \mathcal {F} _ {n - k} \right] \right] = \sum_ {n = k} ^ {T} \mathbb {E} \left[ X _ {n} \right] < \sum_ {n = 1} ^ {T} \mathbb {E} \left[ X _ {n} \right] \leq M. +$$ + +Since $X_{n}$ are non-negative, we know that $\Lambda_{k,T}$ is a non-decreasing sequence, and considering that $\mathbb{E}(\Lambda_{k,T})$ ( $\forall T\geq 1$ ) is also bounded by $M$ , we apply the Lebesgue's Monotone Convergence theorem. Thus, $\Lambda_{k,T}$ converges almost surely to a limit $\Lambda^{(k)}$ + +$$ +\Lambda^ {(k)} := \lim _ {T \rightarrow \infty} \Lambda_ {k, T} = \sum_ {n = k} ^ {\infty} \mathbb {E} \left[ X _ {n} \mid \mathscr {F} _ {n - k} \right] \quad \text {a . s .} +$$ + +This concludes that the sequence of conditional expectation sums converges almost surely. + +(ii) We begin by normalizing $X_{n}$ by considering the expression $Y_{n} = \frac{X_{n}}{2M}$ . According to the Lebesgue's Monotone Convergence theorem, we only need to prove that + +$$ +\forall p \geq 1, \mathbb {E} \left[ \sum_ {n = k} ^ {\infty} \mathbb {E} \left[ Y _ {n} \mid \mathcal {F} _ {n - k} \right] \right] ^ {p} := M _ {k} (p) < + \infty . +$$ + +Next, we proceed with the calculation, and we obtain $\forall p\geq 2$ , there is: + +$$ +\begin{array}{l} M (p) = \mathbb {E} \left[ \sum_ {i = 0} ^ {k - 1} \sum_ {n = k, n \bmod k = i} ^ {\infty} \mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - k} ] \right] ^ {p} = \mathbb {E} \left[ \sum_ {n = k} ^ {\infty} Y _ {n} + \sum_ {i = 0} ^ {k - 1} \sum_ {n = k, n \bmod k = i} ^ {\infty} \left(\mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - k} ] - Y _ {n}\right) \right] ^ {p} \\ \stackrel {(a)} {\leq} \mathbb {E} \left[ \frac {1}{2} + \sum_ {i = 0} ^ {k - 1} \sum_ {n = k, n \bmod k = i} ^ {\infty} \left(\mathbb {E} \left[ Y _ {n} \mid \mathcal {F} _ {n - k} \right] - Y _ {n}\right) \right] ^ {p} \stackrel {(b)} {\leq} 2 ^ {p - 1} \left(\frac {1}{2 ^ {p}} + \mathbb {E} \left[ \sum_ {n = 1} ^ {\infty} \left(\mathbb {E} \left[ Y _ {n} \mid \mathcal {F} _ {n - 1} \right] - Y _ {n}\right) \right] ^ {p}\right) \\ \stackrel {(c)} {\leq} \frac {1}{2} + 2 ^ {p - 1} k ^ {p - 1} C _ {p} \sum_ {i = 0} ^ {k - 1} \mathbb {E} \left[ \sum_ {n = k, n \bmod k = i} ^ {\infty} \left(\mathbb {E} \left[ Y _ {n} \mid \mathcal {F} _ {n - k} \right] - Y _ {n}\right) \right] ^ {p} \\ \stackrel {(d)} {\leq} \frac {1}{2} + 2 ^ {p - 1} k ^ {p - 1} C _ {p} \sum_ {i = 0} ^ {k - 1} \mathbb {E} \left[ \sum_ {n = k, n \bmod k = i} ^ {\infty} (\mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - k} ] - Y _ {n}) ^ {2} \right] ^ {p / 2} \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {(e)} {\leq} \frac {1}{2} + 2 ^ {p - 1} k ^ {p - 1} C _ {p} \sum_ {i = 0} ^ {k - 1} \mathbb {E} \left[ \sum_ {n = k, n \bmod k = i} ^ {\infty} | \mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - k} ] - Y _ {n} | \right] ^ {p / 2} \\ \stackrel {(f)} {\leq} \frac {1}{2} + 2 ^ {p - 1} k ^ {p - 1} C _ {p} \mathbb {E} \left[ \sum_ {n = k} ^ {\infty} | \mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - k} ] - Y _ {n} | \right] ^ {p / 2} \\ \leq \frac {1}{2} + 2 ^ {p - 2} k ^ {p - 1} C _ {p} + 2 ^ {\frac {3}{2} p - 2} k ^ {p - 1} C _ {p} \mathbb {E} \left[ \sum_ {n = 1} ^ {\infty} \mathbb {E} \left[ Y _ {n} \mid \mathcal {F} _ {n - 1} \right] \right] ^ {p / 2} \\ = \frac {1}{2} + 2 ^ {p - 2} k ^ {p - 1} C _ {p} + 2 ^ {\frac {3}{2} p - 2} k ^ {p - 1} C _ {p} M (p / 2). \tag {17} \\ \end{array} +$$ + +In the above derivation, Inequality (a) is by noting that $\sum_{n=1}^{+\infty} Y_n = \frac{1}{2}$ . Inequality (b) uses the AM-GM inequality, specifically, + +$$ +\left(\frac {a + b}{2}\right) ^ {p} \leq \frac {a ^ {p} + b ^ {p}}{2}. +$$ + +Inequality $(c)$ involves using the AM-GM inequality for $k$ variables, specifically, + +$$ +\left(\frac {a _ {1} + a _ {2} + \ldots + a _ {k}}{k}\right) ^ {p} \leq \left(\frac {a _ {1} ^ {p} + a _ {2} ^ {p} + \ldots + a _ {k} ^ {p}}{k}\right). +$$ + +Inequality $(e)$ involves using Burkholder's inequality, where $C_p$ is a constant depending only on $p$ , and its order with respect to $p$ is $\mathcal{O}(p)$ . Inequality $(d)$ is by noting that + +$$ +| \mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - k} ] - Y _ {n} | ^ {2} \leq | \mathbb {E} [ Y _ {n} | \mathcal {F} _ {n - k} ] - Y _ {n} |. +$$ + +By repeatedly using Equation (17) and using the fact that $C_p = \mathcal{O}(p)$ , we obtain the following estimate + +$$ +M (p) = o ((k p) ^ {\sqrt {p}}), +$$ + +that is, + +$$ +\mathbb {E} \left[ \left(\Lambda^ {(k)}\right) ^ {p} \right] = o \left(\left(2 M\right) ^ {p} \cdot (k p) ^ {\sqrt {p}}\right). +$$ + +(iii) For any $0 < l < 1$ , we obtain: + +$$ +\begin{array}{l} \Lambda (l) = \sum_ {k = 1} ^ {+ \infty} \mathbb {E} \left[ \left(\sum_ {t = k} ^ {+ \infty} l ^ {t - k} X _ {t}\right) \Bigg | \mathcal {F} _ {k - 1} \right] = \sum_ {k = 1} ^ {+ \infty} \mathbb {E} \left[ \left(\sum_ {t = 0} ^ {+ \infty} l ^ {t} X _ {k + t}\right) \Bigg | \mathcal {F} _ {k - 1} \right] \\ = \sum_ {t = 0} ^ {+ \infty} \sum_ {k = 1} ^ {+ \infty} \mathbb {E} \left[ l ^ {t} X _ {k + t} \Bigg | \mathcal {F} _ {k - 1} \right] = \sum_ {t = 0} ^ {+ \infty} l ^ {t} \Lambda^ {(t)}. \\ \end{array} +$$ + +Next, we apply Hölder's inequality, we obtain $\forall n \geq 2$ + +$$ +\Lambda (l) ^ {n} = \left(\sum_ {t = 0} ^ {+ \infty} l ^ {t} \Lambda^ {(t)}\right) ^ {n} \leq \left(\frac {1}{1 - l}\right) ^ {n - 1} \sum_ {t = 0} ^ {+ \infty} l ^ {t} (\Lambda^ {(t)}) ^ {n}. +$$ + +Then we have: + +$$ +\begin{array}{l} \mathbb {E} [ e ^ {p \Lambda (l)} ] = \sum_ {n = 0} ^ {+ \infty} \frac {p ^ {n} \mathbb {E} [ \Lambda (l) ^ {n} ]}{n !} \leq \sum_ {n = 0} ^ {+ \infty} \left(\frac {p}{1 - l}\right) ^ {n} \frac {\sum_ {t = 0} ^ {+ \infty} l ^ {t} (\Lambda^ {(t)}) ^ {n}}{n !} = \sum_ {n = 0} ^ {+ \infty} \sum_ {t = 0} ^ {+ \infty} l ^ {t} (\Lambda^ {(t)}) ^ {n} \left(\frac {p}{1 - l}\right) ^ {n} \frac {1}{n !} \\ \stackrel {(i i i)} {=} \mathcal {O} \left(\sum_ {n = 0} ^ {+ \infty} \sum_ {t = 0} ^ {+ \infty} l ^ {t} (2 M) ^ {n} \cdot (t p) ^ {\sqrt {n}} \left(\frac {p}{1 - l}\right) ^ {n} \frac {1}{n !}\right) \\ = \mathcal {O} \left(\sum_ {n = 0} ^ {+ \infty} \left(\sum_ {t = 0} ^ {+ \infty} l ^ {t} t ^ {\sqrt {n}}\right) \left(\frac {p}{1 - l}\right) ^ {n} \frac {(2 M) ^ {n} \cdot (p) ^ {\sqrt {n}}}{n !}\right) \\ \end{array} +$$ + +$$ +\stackrel {\text {L e m m a}} {=} ^ {\text {C . 4}} \mathcal {O} \left(\sum_ {n = 0} ^ {+ \infty} \Gamma (\sqrt {n} + 1) \frac {1}{\left(\ln \frac {1}{l}\right) ^ {\sqrt {n} + 1}} \left(\frac {p}{1 - l}\right) ^ {n} \frac {(2 M) ^ {n} \cdot (p) ^ {\sqrt {n}}}{n !}\right). +$$ + +By substituting the factorial in the denominator with Stirling's approximation, it is evident that the series inside the $\mathcal{O}$ notation converges and depends only on $p$ , $l$ and $M$ . The lemma follows. + +# D. Supporting Lemmas + +This section introduces key lemmas that are essential for the proofs. We start with a diagram illustrating their relationships with the theorems. Rigorous proofs for all lemmas and theorems follow in the subsequent subsections. Due to its isolated, lengthy proof, Lemma D.2 is addressed separately at the end of the paper (see Section E for details). + +# D.1. Dependency Graph of Lemmas and Theorems + +Due to the large number of lemmas, we have combined these lemmas with those in the main text and theorems to create a lemma-theorem dependency graph. We refer the audience to this graph for a whole picture of our proofs, while the reader may also find the lemmas needed for a specific statement. + +![](images/8aed845cd0702793aef51e35871642d4e58a1a8dabd29a936eb230864a7adc65.jpg) + +# D.2. Statements of the Lemmas + +Lemma D.1. For $\Pi_{\Delta, T}$ defined in Equation (5), for any $T \geq 0$ and any $p \geq 1$ , the $p$ -th moment of its reciprocal is bounded, i.e., + +$$ +\mathbb {E} \left[ \Pi_ {\Delta , T} ^ {- p} \right] < C _ {v, d, p} < + \infty , +$$ + +where $C_{v,d,p}$ is a constant that depends only on $v, d,$ and $p$ . + +Moreover, we have that $\Pi_{\Delta,\infty}^{-1} := \lim_{t\to +\infty}\Pi_{\Delta,t}^{-1} < +\infty$ a.s., and for any $p\geq 1$ , the $p$ -th moment of $\Pi_{\Delta,\infty}^{-1}$ exists, with + +$$ +\mathbb {E} \left[ \Pi_ {\Delta , \infty} ^ {- p} \right] \leq C _ {v, d, p} < + \infty . +$$ + +Lemma D.2. Consider the Adam algorithm in Algorithm 2.1 and suppose that Assumption 2.1 - 2.3 hold. Then for any initial point, and $T \geq 1$ , the following results hold + +$$ +\mathbb {E} \left[ \Pi_ {\Delta , T} \left(f \left(w _ {T}\right) - f ^ {*}\right) \right] = \mathcal {O} \left(\sum_ {t = 1} ^ {T} \mathbb {E} \left\| \eta_ {v _ {t}} \circ g _ {t} \right\| ^ {2}\right) + \mathcal {O} (1), +$$ + +$$ +\sum_ {t = 1} ^ {T} \mathbb {E} \left[ \Pi_ {\Delta , t} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) \right] = \mathcal {O} \left(\sum_ {t = 1} ^ {T} \mathbb {E} \| \eta_ {v _ {t}} \circ g _ {t} \| ^ {2}\right) + \mathcal {O} (1), +$$ + +$$ +\sum_ {t = 1} ^ {T} \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \Pi_ {\Delta , t} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} \right] = \mathcal {O} \left(\sum_ {t = 1} ^ {T} \mathbb {E} \left\| \eta_ {v _ {t}} \circ g _ {t} \right\| ^ {2}\right) + \mathcal {O} (1). +$$ + +The specific form of the constants hidden behind the $\mathcal{O}()$ notation can be found in Equation (55) and Equation (56). All constants depend on the initial point and the constants in our required assumptions (excluding $1 / \mu$ ). + +Lemma D.3. Consider the Adam algorithm defined in Algorithm 2.1 and suppose that Assumption 2.1-2.3 hold. Then for any initial point and $\forall \phi >0$ , we have for any $T\geq 1$ , the following inequality holds + +$$ +\frac {\Pi_ {\Delta , T} \sqrt {S _ {T}}}{(T + 1) ^ {\phi}} \leq \sqrt {d v} + \sum_ {t = 1} ^ {T} \Pi_ {\Delta , t} \Lambda_ {\phi , t}, \tag {18} +$$ + +where + +$$ +\Lambda_ {\phi , t} := \frac {\| g _ {t} \| ^ {2}}{(t + 1) ^ {\phi} \sqrt {S _ {t - 1}}}, +$$ + +and $S_T$ is defined in Remark 4.1. + +Lemma D.4. Consider the Adam algorithm defined in Algorithm 2.1 and suppose that Assumptions 2.1 - 2.3 hold. Then for any initial point and for all $T \geq 1$ , there exists a random variable $\zeta$ such that the following results hold + +(a) $0 \leq \zeta < +\infty$ almost surely, and $\mathbb{E}(\zeta)$ is uniformly bounded above by a constant $C_{\zeta}$ , which depends on the initial point and the constants in the required assumptions (excluding $1 / \mu$ ). The explicit form of this upper bound is provided in Equation (29). +(b) $\sqrt{S_T} \leq (T + 1)^4 \Pi_{\Delta, \infty}^{-1} \zeta$ , and $\ln \left(\frac{S_T}{v}\right) \leq \ln (T + 1) \zeta'$ , where $\zeta' \leq 4\left(1 + \frac{1}{2} \ln \left(\max \left\{e, \Pi_{\Delta, \infty}^{-1} \zeta\right\}\right)\right)$ . + +Lemma D.5. Consider the Adam algorithm defined in Algorithm 2.1 and suppose that Assumption 2.1 - 2.3 hold. Then for any initial point and $T \geq 1$ , the following results hold + +$$ +\sum_ {t = 1} ^ {T} \mathbb {E} \left[ \Pi_ {\Delta , t} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) \right] \leq \left\{ \begin{array}{l l} C _ {4, \delta}, & i f \delta \in (0, 1 / 2), \\ C _ {5} + C _ {6} \mathbb {E} \left[ \ln (S _ {T}) \right], & i f \delta = 0, \end{array} \right. +$$ + +where $C_5$ and $C_6$ are constants that depend on the initial point and the constants in our required assumptions (excluding $1 / \mu$ ), and $C_{4,\delta}$ is a constant that depends on the initial point, $\delta$ , and the constants in our required assumptions (excluding $1 / \mu$ ). + +Lemma D.6 (Subsequence Convergence). Under Assumptions 2.1 - 2.3, consider the Adam algorithm (Algorithm 2.1) with hyperparameters as specified in Subsection 2.4, where $\delta >0$ . Then, there exists a subsequence $\{w_{c_t}\}_{t\geq 1}$ such that its gradients converge to zero almost surely, i.e., $\lim_{t\to \infty}\| \nabla f(w_{c_t})\| = 0$ a.s. + +Lemma D.7. Consider the Adam algorithm defined in Algorithm 2.1 and assume that Assumptions 2.1 - 2.3 hold. Then, for any initial point and for all $T \geq 1$ , the following results hold + +- When $\delta = 0$ , we have + +$$ +\sup _ {t \geq 1} \frac {\Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*})}{\ln^ {2} (t + 1)} < + \infty a. s., \sup _ {T \geq 1} \mathbb {E} \left[ \frac {\Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*})}{\ln^ {2} (t + 1)} \right] < M _ {0} < + \infty . +$$ + +- When $\delta > 0$ , we have + +$$ +\sup _ {t \geq 1} \Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*}) < + \infty a. s., \sup _ {T \geq 1} \mathbb {E} \left[ \Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*}) \right] < M _ {\delta} < + \infty . +$$ + +In the above equations, $M_0$ and $M_{\delta}$ are two constants that depend on the initial point and the constants in our assumptions (excluding $1 / \mu$ ). + +Lemma D.8. Consider the Adam algorithm defined in Algorithm 2.1 and suppose that Assumption 2.1 - 2.3 hold. Then for any initial point, for all $T \geq 1$ , $i \in [1, d]$ , there is + +$$ +\mathbb {E} (S _ {T} ^ {3 / 4}) = \left\{ \begin{array}{l l} \mathcal {O} (T ^ {3 / 4}), & i f \delta \in (0, 1 / 2), \\ \mathcal {O} (T ^ {3 / 4} \ln^ {3 / 2} T), & i f \delta = 0, \end{array} \right. +$$ + +where constants hidden in $\mathcal{O}()$ depend on the initial point and the constants in our required assumptions (excluding $1 / \mu$ ). + +Lemma D.9. Under Assumptions 2.1 - 2.3, consider the Adam algorithm (Algorithm 2.1) with the hyperparameters specified in Subsection 2.4. Then, for any $t \geq 1$ , the following inequality holds + +$$ +\sup _ {t \geq 1} \mathbb {E} [ \Pi_ {\Delta , t} \Sigma_ {v _ {t}} ] < \left\{ \begin{array}{l l} \mathbb {E} [ \Pi_ {\Delta , 2} \Sigma_ {v _ {1}} ] + (A + 2 L _ {f} B) M _ {\delta} + C, & i f \delta \in (0, 1 / 2), \\ \mathbb {E} [ \Pi_ {\Delta , 2} \Sigma_ {v _ {1}} ] + (A + 2 L _ {f} B) M _ {0} \ln^ {2} t + C, & i f \delta = 0. \end{array} \right. +$$ + +Furthermore, if $\lambda > 1$ , then + +$$ +\sup _ {t \geq 1} \mathbb {E} [ \Pi_ {\Delta , t} \Sigma_ {v _ {t}} ] < \left\{ \begin{array}{l l} \big ((A + 2 L _ {f} B) M _ {\delta} + C \big) \sum_ {t = 1} ^ {+ \infty} \frac {1}{(t + 1) ^ {\lambda}}, & i f \delta \in (0, 1 / 2) \\ \big ((A + 2 L _ {f} B) M _ {0} + C \big) \sum_ {t = 1} ^ {+ \infty} \frac {\ln^ {2} t}{(t + 1) ^ {\lambda}}, & i f \delta = 0 \end{array} \right. < + \infty . +$$ + +Additionally, + +$$ +\sup _ {t \geq 1} \Sigma_ {v _ {t}} < + \infty \quad a. s. +$$ + +Lemma D.10. Under Assumption 2.1 - 2.3, consider the Adam algorithm (Algorithm 2.1) with hyperparameters in Subsection 2.4 with $\gamma > 1$ , $\delta > 0$ . Then for any initial point, the following results hold + +$$ +\sum_ {t = 1} ^ {+ \infty} \eta_ {t} \| \nabla f (w _ {t}) \| ^ {2} < + \infty a. s., \sum_ {t = 1} ^ {+ \infty} \eta_ {t} \| \nabla f (u _ {t}) \| ^ {2} < + \infty a. s., a n d \sum_ {t = 1} ^ {+ \infty} \| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2} < + \infty a. s. +$$ + +# D.3. Proofs of the Lemmas and the Theorems + +# D.3.1. PROOF OF LEMMA D.1 + +Proof. Consider the case where $T$ is finite. For any $T \in (0, +\infty)$ , the exponential-logarithmic transformation can be applied to $\Pi_{\Delta, T}^{-p}$ , resulting in + +$$ +\begin{array}{l} \Pi_ {\Delta , T} ^ {- p} = \exp \left\{p \sum_ {k = 1} ^ {T} \ln \left(1 + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \overline {{\Delta}} _ {\sqrt {\beta_ {1}, k}}\right) \right\} \\ \stackrel {\ln (1 + x) < x \forall x > - 1} {\leq} \exp \left\{p \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \sum_ {k = 1} ^ {T} \overline {{\Delta}} _ {\sqrt {\beta_ {1}, k}} \right\} \\ = \exp \left\{p \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \sum_ {k = 1} ^ {T} \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \sum_ {t = k} ^ {+ \infty} \left(\sqrt {\beta_ {1}}\right) ^ {t - k} \Delta_ {t, i} \mid \mathcal {F} _ {k - 1} \right] \right\} \\ = \exp \left\{p \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \sum_ {k = 1} ^ {T} \mathbb {E} \left[ \sum_ {t = k} ^ {+ \infty} \left(\sqrt {\beta_ {1}}\right) ^ {t - k} \left(\sum_ {i = 1} ^ {d} \Delta_ {t, i}\right) \Bigg | \mathcal {F} _ {k - 1} \right] \right\} \\ \leq \exp \left\{p \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \sum_ {k = 1} ^ {+ \infty} \mathbb {E} \left[ \sum_ {t = k} ^ {+ \infty} (\sqrt {\beta_ {1}}) ^ {t - k} \left(\sum_ {i = 1} ^ {d} \Delta_ {t, i}\right) \Bigg | \mathcal {F} _ {k - 1} \right] \right\} \\ \end{array} +$$ + +It can be readily verified that $\sum_{i=1}^{d} \Delta_{t,i}$ in the inequality above satisfies all the properties of $X_t$ outlined in Lemma C.5. Consequently, by Lemma C.5, we deduce that for any $0 < T < +\infty$ and any $p \geq 1$ , the $p$ -th moment of its reciprocal is bounded, i.e., + +$$ +\mathbb {E} \left[ \Pi_ {\Delta , T} ^ {- p} \right] < C _ {v, d, p} < + \infty , +$$ + +where $C_{v,d,p}$ is a constant depending only on $v, d,$ and $p$ . Letting $T \to +\infty$ and applying the Lebesgue's Monotone Convergence Theorem, we obtain + +$$ +\mathbb {E} \left[ \Pi_ {\Delta , \infty} ^ {- p} \right] \leq C _ {v, d, p} < + \infty . +$$ + +# D.3.2. PROOFS OF LEMMA 4.1 + +Proof. By the $L$ -smoothness in Assumption 2.2, we have: + +$$ +f (u _ {t + 1}) - f (u _ {t}) \leq \nabla f (u _ {t}) ^ {\top} (u _ {t + 1} - u _ {t}) + \frac {L _ {f}}{2} \| u _ {t + 1} - u _ {t} \| ^ {2}. +$$ + +Then, by substituting the iterative formula for $u_{t}$ from Equation (2) into the above inequality, we obtain + +$$ +\begin{array}{l} f (u _ {t + 1}) - f (u _ {t}) \leq - \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} \nabla_ {i} f (u _ {t}) g _ {t, i} + \frac {\beta_ {1}}{1 - \beta_ {1}} \sum_ {i = 1} ^ {d} \Delta_ {t, i} \nabla_ {i} f (u _ {t}) m _ {t - 1, i} + L _ {f} \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} \\ + L _ {f} \left(\frac {\beta_ {1}}{1 - \beta_ {1}}\right) ^ {2} \sum_ {i = 1} ^ {d} \Delta_ {t, i} ^ {2} m _ {t - 1, i} ^ {2} \\ \stackrel {(a)} {=} \underbrace {- \sum_ {i = 1} ^ {d} \eta_ {v _ {t} , i} \nabla_ {i} f (w _ {t}) g _ {t , i}} _ {\Theta_ {t, 1}} + \underbrace {\sum_ {i = 1} ^ {d} (\eta_ {v _ {t} , i} (\nabla_ {i} f (w _ {t}) - \nabla_ {i} f (u _ {t})) g _ {t , i})} _ {\Theta_ {t, 2}} \\ + \frac {\beta_ {1}}{1 - \beta_ {1}} \underbrace {\sum_ {i = 1} ^ {d} \Delta_ {t , i} \nabla_ {i} f (u _ {t}) m _ {t - 1 , i}} _ {\Theta_ {t, 3}} + L _ {f} \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} \\ + L _ {f} \left(\frac {\beta_ {1}}{1 - \beta_ {1}}\right) ^ {2} \underbrace {\sum_ {i = 1} ^ {d} \Delta_ {t , i} ^ {2} m _ {t - 1 , i} ^ {2}} _ {\Theta_ {t, 4}}. \tag {19} \\ \end{array} +$$ + +Step (a) employs the identity $\nabla_i f(u_t) = \nabla_i f(w_t) + \nabla_i f(u_t) - \nabla_i f(w_t)$ . Next, we handle $\Theta_{t,1}$ , $\Theta_{t,2}$ , $\Theta_{t,3}$ and $\Theta_{t,4}$ separately. First, for $\Theta_{t,1}$ , we use the following identity. + +$$ +\begin{array}{l} \Theta_ {t, 1} = - \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) g _ {t, i} = - \sum_ {i = 1} ^ {d} \eta_ {v _ {t - 1}, i} \nabla_ {i} f (w _ {t}) g _ {t, i} + \sum_ {i = 1} ^ {d} \Delta_ {t, i} \nabla_ {i} f (w _ {t}) g _ {t, i} \\ = - \sum_ {i = 1} ^ {d} \underbrace {\eta_ {v _ {t - 1} , i} \left(\nabla_ {i} f \left(w _ {t}\right)\right) ^ {2}} _ {\zeta_ {i} (t)} + \underbrace {\sum_ {i = 1} ^ {d} \Delta_ {t , i} \nabla_ {i} f \left(w _ {t}\right) g _ {t , i}} _ {\Theta_ {t, 1, 1}} + \underbrace {\sum_ {i = 1} ^ {d} \eta_ {v _ {t - 1} , i} \nabla_ {i} f \left(w _ {t}\right) \left(\nabla_ {i} f \left(w _ {t}\right) - g _ {t , i}\right)} _ {M _ {t, 1}}, \tag {20} \\ \end{array} +$$ + +where $\Delta_{t,i}$ in the above equality represents the $i$ -th component of the vector $\Delta_t$ , which is defined in Equation (2). In this way, we decompose $\Theta_1$ into a descent term $-\sum_{i=1}^{d} \zeta_i(t)$ , an error term $\Theta_{t,1,1}$ , and a martingale difference term $M_{t,1}$ . We will further scale and control the error term $\Theta_{t,1,1}$ . Specifically, we have + +$$ +\Theta_ {t, 1, 1} = \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \Delta_ {t, i} \nabla_ {i} f (w _ {t}) g _ {t, i} \mid \mathcal {F} _ {t - 1} \right] +$$ + +$$ +\begin{array}{l} + \underbrace {\sum_ {i = 1} ^ {d} \left(\Delta_ {t , i} \nabla_ {i} f (w _ {t}) g _ {t , i} - \mathbb {E} \left[ \Delta_ {t , i} \nabla_ {i} f (w _ {t}) g _ {t , i} \mid \mathcal {F} _ {t - 1} \right]\right)} _ {M _ {t, 2}} \\ \stackrel {(a)} {< } \sum_ {i = 1} ^ {d} \sqrt {\eta_ {v _ {t - 1} , i}} \nabla_ {i} f (w _ {t}) \mathbb {E} \left[ \sqrt {\Delta_ {t , i}} g _ {t, i} \mid \mathcal {F} _ {t - 1} \right] + M _ {t, 2} \\ \stackrel {(b)} {\leq} \frac {1}{2} \sum_ {i = 1} ^ {d} \eta_ {v _ {t - 1}, i} (\nabla_ {i} f (w _ {t})) ^ {2} + \frac {1}{2} \sum_ {i = 1} ^ {d} \mathbb {E} ^ {2} \left[ \sqrt {\Delta_ {t , i}} g _ {t, i} \mid \mathcal {F} _ {t - 1} \right] + M _ {t, 2} \\ \stackrel {(c)} {\leq} \frac {1}{2} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + \frac {1}{2} \sum_ {i = 1} ^ {d} \mathbb {E} [ g _ {t, i} ^ {2} \mid \mathcal {F} _ {t - 1} ] \cdot \mathbb {E} [ \Delta_ {t, i} \mid \mathcal {F} _ {t - 1} ] + M _ {t, 2} \\ \leq \frac {1}{2} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + \frac {1}{2} \sum_ {i = 1} ^ {d} \mathbb {E} [ g _ {t, i} ^ {2} \mid \mathcal {F} _ {t - 1} ] \cdot \mathbb {E} [ \Delta_ {t, i} \mid \mathcal {F} _ {t - 1} ] + M _ {t, 2} \\ \leq \frac {1}{2} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + \frac {1}{2} \left(\sum_ {i = 1} ^ {d} \mathbb {E} \left[ g _ {t, i} ^ {2} \mid \mathcal {F} _ {t - 1} \right]\right) \cdot \left(\sum_ {i = 1} ^ {d} \mathbb {E} \left[ \Delta_ {t, i} \mid \mathcal {F} _ {t - 1} \right]\right) + M _ {t, 2} \\ \stackrel {(d)} {\leq} \frac {1}{2} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + \frac {1}{2} \left((A + 2 L _ {f} B) f (w _ {t}) + C\right) \cdot \left(\sum_ {i = 1} ^ {d} \mathbb {E} [ \Delta_ {t, i} \mid \mathcal {F} _ {t - 1} ]\right) + M _ {t, 2} \\ = \frac {1}{2} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + \frac {1}{2} (A + 2 L _ {f} B) f (w _ {t}) \cdot \left(\sum_ {i = 1} ^ {d} \mathbb {E} [ \Delta_ {t, i} \mid \mathcal {F} _ {t - 1} ]\right) \\ + C \left(\sum_ {i = 1} ^ {d} \mathbb {E} \left[ \Delta_ {t, i} \mid \mathcal {F} _ {t - 1} \right]\right) + M _ {t, 2} \\ = \frac {1}{2} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + \frac {1}{2} (A + 2 L _ {f} B) f (w _ {t}) \cdot \left(\underbrace {\sum_ {i = 1} ^ {d} \mathbb {E} [ \Delta_ {t , i} \mid \mathcal {F} _ {t - 1} ]} _ {\overline {{\Delta}} _ {t}}\right) + C \sum_ {i = 1} ^ {d} \Delta_ {t, i} \\ + \underbrace {C \left(\sum_ {i = 1} ^ {d} \left(\mathbb {E} \left[ \Delta_ {t , i} \mid \mathcal {F} _ {t - 1} \right] - \Delta_ {t , i}\right)\right)} _ {M _ {t, 3}} + M _ {t, 2}. \tag {21} \\ \end{array} +$$ + +In the above derivation, in step (a), we utilized the property of conditional expectation, which states that for random variables $X \in \mathcal{F}_{n-1}$ and $Y \in \mathcal{F}_n$ , we have $\mathbb{E}[XY|\mathcal{F}_{n-1}] = X\mathbb{E}[Y|\mathcal{F}_{n-1}]$ . Additionally, note that $\Delta_{t,i} = \sqrt{\Delta_{t,i}}\sqrt{\Delta_{t,i}} < \sqrt{\eta_{v_{t-1}}}\sqrt{\Delta_{t,i}}$ (due to Property 2, we know $\Delta_{t,i} \geq 0$ , so taking the square root is well-defined). In step (b), we employed the AM-GM inequality, which states $ab \leq \frac{a^2 + b^2}{2}$ . In step (c), we used the Cauchy-Schwarz inequality for conditional expectations, namely $\mathbb{E}[XY|\mathcal{F}_{n-1}] \leq \sqrt{\mathbb{E}[X^2|\mathcal{F}_{n-1}]\mathbb{E}[Y^2|\mathcal{F}_{n-1}]}$ . For step (d), we used Property 1. Specifically, we have + +$$ +\sum_ {i = 1} ^ {d} \mathbb {E} [ g _ {t, i} ^ {2} | \mathcal {F} _ {t - 1} ] = \mathbb {E} [ \| g _ {t} \| ^ {2} | \mathcal {F} _ {t - 1} ] \leq (A + 2 L _ {f} B) f (w _ {t}) + C. +$$ + +Substituting the estimate of $\Theta_{t,1,1}$ into Equation (21), we obtain + +$$ +\Theta_ {t, 1} = - \frac {1}{2} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + \frac {A + 2 L _ {f} B}{2} \overline {{\Delta}} _ {t} \cdot f (w _ {t}) + C \sum_ {i = 1} ^ {d} \Delta_ {t, i} + \underbrace {M _ {t , 1} + M _ {t , 2} + M _ {t , 3}} _ {M _ {t}}. +$$ + +Then, we use Property 5 to replace $f(w_{t})$ with $f(u_{t})$ to obtain + +$$ +\begin{array}{l} \Theta_ {t, 1} = - \frac {1}{2} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + \frac {(A + 2 L _ {f} B) (L _ {f} + 1)}{2} \bar {\Delta} _ {t} \cdot f (u _ {t}) + C \sum_ {i = 1} ^ {d} \Delta_ {t, i} \\ + \frac {\left(L _ {f} + 1\right) \beta_ {1} ^ {2}}{2 \left(1 - \beta_ {1}\right) ^ {2}} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} + M _ {t}. \tag {22} \\ \end{array} +$$ + +Next, we handle the term $\Theta_{t,2}$ through the following derivation. + +$$ +\begin{array}{l} \Theta_ {t, 2} = \frac {1}{2} \sum_ {i = 1} ^ {d} (\eta_ {v _ {t}, i} (\nabla_ {i} f (w _ {t}) - \nabla_ {i} f (u _ {t})) g _ {t, i}) \\ \leq \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + \frac {1}{2} \sum_ {i = 1} ^ {d} (\nabla_ {i} f (w _ {t}) - \nabla_ {i} f (u _ {t})) ^ {2} \\ = \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + \frac {1}{2} \| \nabla f (w _ {t}) - \nabla f (u _ {t}) \| ^ {2} \\ \leq \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + \frac {L _ {f} ^ {2}}{2} \| w _ {t} - u _ {t} \| ^ {2} \\ = \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + \frac {\beta_ {1} ^ {2} L _ {f} ^ {2}}{2 (1 - \beta_ {1}) ^ {2}} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2}. \tag {23} \\ \end{array} +$$ + +Next, we handle the term $\Theta_{t,3}$ . We have + +$$ +\Theta_ {t, 3} = \sum_ {i = 1} ^ {d} \Delta_ {t, i} \nabla_ {i} f (u _ {t}) m _ {t - 1, i} \leq \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} |. \tag {24} +$$ + +For $\Theta_{t,4}$ , because $\Delta_{t,i} \leq \eta_{v_{t-1},i}$ , we obtain that + +$$ +\Theta_ {t, 4} = \sum_ {i = 1} ^ {d} \Delta_ {t, i} ^ {2} m _ {t - 1, i} ^ {2} < \sum_ {i = 1} ^ {d} \eta_ {v _ {t - 1}, i} ^ {2} m _ {t - 1, i} ^ {2} = \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2}. \tag {25} +$$ + +Finally, substituting the estimates of $\Theta_{t,1}$ from Equation (22), $\Theta_{t,2}$ from Equation (23), $\Theta_{t,3}$ from Equation (24), and $\Theta_{t,4}$ from Equation (25) back into Equation (19), we obtain + +$$ +\begin{array}{l} \left(\underbrace {f \left(u _ {t + 1}\right) - f ^ {*} + C \sum_ {i = 1} ^ {d} \eta_ {v _ {t} , i}} _ {\hat {f} (u _ {t + 1})}\right) - \left(\underbrace {f \left(u _ {t}\right) - f ^ {*} + C \sum_ {i = 1} ^ {d} \eta_ {v _ {t - 1} , i}} _ {\hat {f} (u _ {t})}\right) \leq - \frac {1}{2} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + C _ {1} \overline {{\Delta}} _ {t} \cdot f (u _ {t}) \\ + C _ {2} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} + \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | + (L _ {f} + 1) \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + M _ {t}, \\ \end{array} +$$ + +where + +$$ +C _ {1} := \frac {(A + 2 L _ {f} B) (L _ {f} + 1)}{2}, \quad C _ {2} := \frac {\beta_ {1} ^ {2} L _ {f} ^ {2}}{2 \left(1 - \beta_ {1}\right) ^ {2}} + L _ {f} \left(\frac {\beta_ {1}}{1 - \beta_ {1}}\right) ^ {2}. \tag {26} +$$ + +To the second term on the right side of the above inequality, we apply the inequality $\mathbb{S}[f(u_t) < f(u_t) - f^* + C\sum_{i=1}^{d}\eta_{v_{t-1},i} = \hat{f}(u_t)$ and then move the expanded term to the left side of the inequality. This obtains + +$$ +\hat {f} (u _ {t + 1}) - (1 + C _ {1} \overline {{\Delta}} _ {t}) \hat {f} (u _ {t}) \leq - \frac {1}{2} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + C _ {1} \overline {{\Delta}} _ {t} \cdot f (u _ {t}) +$$ + +$$ +\begin{array}{l} + C _ {2} \left\| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \right\| ^ {2} + \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | \\ + \left(L _ {f} + 1\right) \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + M _ {t}. \\ \end{array} +$$ + +Next, we define + +$$ +\overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k} := \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \sum_ {t = k} ^ {+ \infty} (\sqrt {\beta_ {1}}) ^ {t - k} \Delta_ {t, i} \Bigg | \mathcal {F} _ {k - 1} \right]. +$$ + +Observe that + +$$ +1 + C _ {1} \bar {\Delta} _ {t} \leq 1 + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \bar {\Delta} _ {\sqrt {\beta_ {1}}, t}, +$$ + +where $D_{1}$ is defined in Lemma E.2. Thus, we have + +$$ +\begin{array}{l} \hat {f} (u _ {t + 1}) - \left(1 + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, t}\right) \hat {f} (u _ {t}) \leq - \frac {1}{2} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + C _ {1} \overline {{\Delta}} _ {t} \cdot f (u _ {t}) \\ + C _ {2} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} + \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | \\ + (L _ {f} + 1) \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + M _ {t}. \\ \end{array} +$$ + +Next, we construct an auxiliary variable + +$$ +\Pi_ {\Delta , t} := \prod_ {k = 1} ^ {t} \left(1 + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k}\right) ^ {- 1} (t \geq 1), \Pi_ {\Delta , 0} := 1. +$$ + +Multiplying both sides of the above inequality by $\Pi_{\Delta ,t}$ , we obtain + +$$ +\begin{array}{l} \Pi_ {\Delta , t} \hat {f} (u _ {t + 1}) - \Pi_ {\Delta , t - 1} \hat {f} (u _ {t}) \leq - \frac {1}{2} \Pi_ {\Delta , t} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + C _ {2} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} + \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | \\ + \left(L _ {f} + 1\right) \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + \Pi_ {\Delta , t} M _ {t}. \\ \end{array} +$$ + +With the inequality, we complete the proof. + +# D.3.3. PROOF OF LEMMA D.3 + +Proof. For any $\phi \in \mathbb{R}$ , we consider $\frac{\sqrt{S_T}}{(T + 1)^\phi}$ . We have + +$$ +\begin{array}{l} \frac {\sqrt {S _ {T}}}{(T + 1) ^ {\phi}} = \frac {S _ {T}}{(T + 1) ^ {\phi} \sqrt {S _ {T}}} = \frac {S _ {0} + \sum_ {t = 1} ^ {T} \| g _ {t} \| ^ {2}}{(T + 1) ^ {\phi} \sqrt {S _ {T}}} = \frac {S _ {0}}{(T + 1) ^ {\phi} \sqrt {S _ {T}}} + \sum_ {t = 1} ^ {T} \frac {\| g _ {t} \| ^ {2}}{(T + 1) ^ {\phi} \sqrt {S _ {T}}} \\ \leq \frac {S _ {0}}{(T + 1) ^ {\phi} \sqrt {S _ {T}}} + \sum_ {t = 1} ^ {T} \frac {\| g _ {t} \| ^ {2}}{(T + 1) ^ {\phi} \sqrt {S _ {T}}} \leq \sqrt {S _ {0}} + \sum_ {t = 1} ^ {T} \frac {\| g _ {t} \| ^ {2}}{(t + 1) ^ {\phi} \sqrt {S _ {t - 1}}} \\ = \sqrt {d v} + \sum_ {t = 1} ^ {T} \frac {\| g _ {t} \| ^ {2}}{(t + 1) ^ {\phi} \sqrt {S _ {t - 1}}}. \\ \end{array} +$$ + +By multiplying both sides of the above inequality by $\Pi_{\Delta, T}$ and noting the monotonicity of $\{\Pi_{\Delta, t}\}_{t \geq 1}$ as well as the fact that $\Pi_{\Delta, T} \leq 1$ for all $T \geq 1$ , the lemma follows. + +# D.3.4. PROOF OF LEMMA D.4 + +Proof. We take $\phi = 4$ in Lemma D.3 and bound the expectation of the partial sum $\sum_{t=1}^{T} \Lambda_{4,t}$ . We have + +$$ +\begin{array}{l} \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \Pi_ {\Delta , t} \Lambda_ {4, t} \right] = \sum_ {t = 1} ^ {T} \mathbb {E} [ \Pi_ {\Delta , t} \Lambda_ {4, t} ] = \sum_ {t = 1} ^ {T} \mathbb {E} \left[ \frac {\Pi_ {\Delta , t} \| g _ {t} \| ^ {2}}{(t + 1) ^ {4} \sqrt {S _ {t - 1}}} \right] = \sum_ {t = 1} ^ {T} \mathbb {E} \left[ \frac {\Pi_ {\Delta , t} \mathbb {E} [ \| g _ {t} \| ^ {2} | \mathcal {F} _ {t - 1} ]}{(t + 1) ^ {4} \sqrt {S _ {t - 1}}} \right] \\ \stackrel {\text {P r o p e r t y}} {\leq} \sum_ {t = 1} ^ {T} \mathbb {E} \left[ \frac {(A + 2 L _ {f} B) \Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*}) + C}{(t + 1) ^ {4} \sqrt {S _ {t - 1}}} \right] \\ \leq C _ {3} \sum_ {t = 1} ^ {T} \frac {1}{(t + 1) ^ {4}} \mathbb {E} \left[ \Pi_ {\Delta , t} \left(f \left(w _ {t}\right) - f ^ {*}\right) \right] + C _ {4} \sum_ {t = 1} ^ {T} \frac {1}{(t + 1) ^ {4}}, \tag {27} \\ \end{array} +$$ + +where + +$$ +C _ {3} := \frac {A + 2 L _ {f} B}{\sqrt {S _ {0}}}, C _ {4} := \frac {C}{\sqrt {S _ {0}}}. +$$ + +Based on the results in Lemma D.2, we can compute: + +$$ +\mathbb {E} \left[ \Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*}) \right] = \mathcal {O} \left(\sum_ {k = 1} ^ {t} \mathbb {E} \| \eta_ {v _ {k}} \circ g _ {k} \| ^ {2}\right) + \mathcal {O} (1) = \mathcal {O} (t). +$$ + +Substitute the above result into Equation (27), and combine $\forall p\geq 2$ + +$$ +\sum_ {t = 1} ^ {T} \frac {1}{(t + 1) ^ {p}} \leq \sum_ {t = 1} ^ {T} \frac {1}{(t + 1) ^ {2}} \leq \sum_ {t = 1} ^ {+ \infty} \frac {1}{t ^ {2}} = \frac {\pi^ {2}}{6}. +$$ + +We get + +$$ +\mathbb {E} \left[ \sum_ {t = 1} ^ {T} \Pi_ {\Delta , t} \Lambda_ {4, t} \right] = \mathcal {O} (1). +$$ + +It can be observed that the right-hand side of the above inequality is independent of $T$ . Thus, according to the Lebesgue's Monotone Convergence theorem, we have + +$$ +\sum_ {t = 1} ^ {T} \Pi_ {\Delta , t} \Lambda_ {4, t} \to \sum_ {t = 1} ^ {+ \infty} \Pi_ {\Delta , t} \Lambda_ {4, t} \quad \text {a . s .}, +$$ + +and + +$$ +\mathbb {E} \left[ \sum_ {t = 1} ^ {+ \infty} \Pi_ {\Delta , t} \Lambda_ {4, t} \right] = \lim _ {T \to \infty} \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \Pi_ {\Delta , t} \Lambda_ {4, t} \right] = \lim _ {T \to \infty} \sum_ {t = 1} ^ {T} \mathbb {E} [ \Pi_ {\Delta , t} \Lambda_ {4, t} ] = \mathcal {O} (1). +$$ + +By setting + +$$ +\zeta := \sqrt {d v} + \sum_ {t = 1} ^ {+ \infty} \Pi_ {\Delta , t} \Lambda_ {4, t}, +$$ + +and combining Lemma D.3, we have + +$$ +\sqrt {S _ {T}} \leq \Pi_ {\Delta , T} ^ {- 1} (T + 1) ^ {4} \zeta < \Pi_ {\Delta , \infty} ^ {- 1} (T + 1) ^ {4} \zeta . \tag {28} +$$ + +Meanwhile, + +$$ +\mathbb {E} [ \zeta ] = \sqrt {d v} + \mathbb {E} \left[ \sum_ {t = 1} ^ {+ \infty} \Lambda_ {4, t} \right] = \mathcal {O} (1). \tag {29} +$$ + +Then through Equation (28), we have + +$$ +\frac {1}{2} \ln \left(\frac {S _ {T}}{v}\right) \leq 4 \ln (T + 1) + \ln \left(\Pi_ {\Delta , \infty} ^ {- 1} \zeta\right) +$$ + +$$ +\begin{array}{l} \leq 4 \ln (T + 1) + \ln \left(\max \left\{e, \Pi_ {\Delta , \infty} ^ {- 1} \zeta \right\}\right) \\ \leq 4 \ln (T + 1) \left(1 + \frac {\ln \left(\max \left\{e , \Pi_ {\Delta , \infty} ^ {- 1} \zeta \right\}\right)}{4 \ln (T + 1)}\right) \\ \stackrel {\ln (T + 1) \geq 1 / 2} {\leq} 4 \ln (T + 1) \left(1 + \frac {1}{2} \ln \left(\max \left\{e, \Pi_ {\Delta , \infty} ^ {- 1} \zeta \right\}\right)\right). \\ \end{array} +$$ + +The lemma follows + +![](images/545bc74e9f1c05f2abcb911109559524b57674015571f0b0b662fc4c385fcbe3.jpg) + +# D.3.5. PROOF OF LEMMA D.5 + +Proof. According to the second conclusion of Lemma D.2, we have + +$$ +\sum_ {t = 1} ^ {T} \mathbb {E} \left[ \Pi_ {\Delta , t} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) \right] = \mathcal {O} \left(\sum_ {t = 1} ^ {T} \mathbb {E} \| \eta_ {v _ {t}} \circ g _ {t} \| ^ {2}\right) + \mathcal {O} (1). +$$ + +To prove the conclusion of this lemma, we only need to bound $\sum_{t=1}^{T} \mathbb{E}\left\|\eta_{v_t} \circ g_t\right\|^2$ . Specifically, + +$$ +\mathbb {E} \left\| \eta_ {v _ {t}} \circ g _ {t} \right\| ^ {2} = \mathbb {E} \left[ \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} \right] = \mathbb {E} \left[ \sum_ {i = 1} ^ {d} \frac {\eta_ {t} ^ {2} g _ {t , i} ^ {2}}{(\sqrt {v _ {t , i}} + \mu) ^ {2}} \right] \leq \mathbb {E} \left[ \sum_ {i = 1} ^ {d} \frac {1}{t ^ {2 \delta}} \frac {g _ {t , i} ^ {2}}{t v _ {t , i}} \right] +$$ + +$$ +\leq^ {3} \frac {(t + 1) ^ {2 \delta}}{t ^ {2 \delta}} \mathbb {E} \left[ \sum_ {i = 1} ^ {d} \frac {1}{\alpha_ {1} (t + 1) ^ {2 \delta}} \frac {g _ {t , i} ^ {2}}{S _ {t , i}} \right] \tag {30} +$$ + +$$ +\stackrel {(a)} {\leq} \frac {2 ^ {2 \delta}}{\alpha_ {1}} \zeta^ {\frac {\delta}{2}} \Pi_ {\Delta , \infty} ^ {- \frac {\delta}{2}} \sum_ {i = 1} ^ {d} \frac {g _ {t , i} ^ {2}}{S _ {t , i} ^ {1 + \frac {\delta}{4}}}. \tag {31} +$$ + +In step $(a)$ of the above derivation, we apply Lemma D.4 to $(t + 1)^{2\delta}$ . Specifically, according to Lemma D.4, we have + +$$ +\sqrt {S _ {t}} \leq \Pi_ {\Delta , \infty} ^ {- 1} (t + 1) ^ {4} \zeta . +$$ + +Next, with the estimate for $\mathbb{E}\left\| \eta_{v_t} \circ g_t \right\|^2$ , we can estimate $\sum_{t=1}^{T} \mathbb{E}\left\| \eta_{v_t} \circ g_t \right\|^2$ . To achieve this, note that + +$$ +\begin{array}{l} \sum_ {t = 1} ^ {T} \mathbb {E} \| \eta_ {v _ {t}} \circ g _ {t} \| ^ {2} = \mathbb {E} \left[ \frac {2 ^ {2 \delta}}{\alpha_ {1}} \zeta^ {\frac {\delta}{2}} \Pi_ {\Delta , \infty} ^ {- \frac {\delta}{2}} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {T} \frac {g _ {t , i} ^ {2}}{S _ {t , i} ^ {1 + \frac {\delta}{4}}} \right] \leq \mathbb {E} \left[ \frac {2 ^ {2 \delta}}{\alpha_ {1}} \zeta^ {\frac {\delta}{2}} \Pi_ {\Delta , \infty} ^ {- \frac {\delta}{2}} \sum_ {i = 1} ^ {d} \int_ {S _ {0, i}} ^ {S _ {T, i}} \frac {1}{x ^ {1 + \frac {\delta}{4}}} d x \right] \\ \leq \left\{ \begin{array}{l l} \frac {2 ^ {2 \delta}}{\alpha_ {1}} \mathbb {E} \left[ \zeta^ {\frac {\delta}{4}} \Pi_ {\Delta , \infty} ^ {- \frac {\delta}{2}} \right], & \text {i f} \delta \in (0, 1 / 2) \\ \frac {2 ^ {2 \delta}}{\alpha_ {1}} \mathbb {E} \left[ \ln \left(\frac {S _ {T}}{d v}\right) \right], & \text {i f} \delta = 0 \end{array} \right. \\ \stackrel {(b)} {\leq} \left\{ \begin{array}{l l} \mathcal {O} (1), & \text {i f} \delta \in (0, 1 / 2) \\ \frac {d 2 ^ {2 \delta}}{\alpha_ {1}} \mathbb {E} \left[ \ln \left(\frac {S _ {T}}{d v}\right) \right], & \text {i f} \delta = 0 \end{array} . \right. \tag {32} \\ \end{array} +$$ + +In step (b), we used the following inequality, i.e. the Hölder's inequality, to obtain the $\mathcal{O}(1)$ result + +$$ +\mathbb {E} \left[ \zeta^ {\frac {\delta}{4}} \Pi_ {\Delta , \infty} ^ {- \frac {\delta}{2}} \right] \leq \mathbb {E} ^ {\delta / 4} [ \zeta ] \cdot \mathbb {E} ^ {\frac {4 - \delta}{4}} \left[ \Pi_ {\Delta , \infty} ^ {- \frac {2 \delta}{4 - \delta}} \right] \overset {\text {L e m m a D . 1 a n d D . 4}} {\leq} C _ {\zeta} ^ {\delta / 4}. C _ {v, d, \frac {2 \delta}{4 - \delta}} ^ {\frac {4 - \delta}{4}} = \mathcal {O} (1). +$$ + +This completes the proof. + +![](images/fe22f93ed460aa3ac082bae7bd1a7bdfb8114d50ed8ca6431f2715795e244fc2.jpg) + +# D.3.6. PROOF OF LEMMA D.7 + +Proof. We only present the case where $\delta = 0$ . The case where $\delta > 0$ can be treated using exactly the same approach. Recall the approximate descent inequality (Lemma 4.1) + +$$ +\Pi_ {\Delta , t} \hat {f} (u _ {t + 1}) - \Pi_ {\Delta , t - 1} \hat {f} (u _ {t}) \leq - \frac {1}{2} \Pi_ {\Delta , t} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + C _ {2} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} + \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | +$$ + +$$ ++ (L _ {f} + 1) \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + \Pi_ {\Delta , t} M _ {t}. +$$ + +We divide both sides of the above inequality by $\ln^2 (t + 1)$ . Noticing that $\ln^2 (t + 1) < \ln^2 (t + 2)$ , we obtain + +$$ +\begin{array}{l} \frac {\Pi_ {\Delta , t} \hat {f} \left(u _ {t + 1}\right)}{\ln^ {2} (t + 2)} - \frac {\Pi_ {\Delta , t - 1} \hat {f} \left(u _ {t}\right)}{\ln^ {2} (t + 1)} \leq C _ {2} \frac {\left\| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \right\| ^ {2}}{\ln^ {2} (t + 1)} + \sum_ {i = 1} ^ {d} \frac {\Delta_ {t , i} \left| \nabla_ {i} f \left(u _ {t}\right) m _ {t - 1 , i} \right|}{\ln^ {2} (t + 1)} (33) \\ + \left(L _ {f} + 1\right) \sum_ {i = 1} ^ {d} \frac {\eta_ {v _ {t} , i} ^ {2} g _ {t , i} ^ {2}}{\ln^ {2} (t + 1)} + \Pi_ {\Delta , t} \frac {M _ {t}}{\ln^ {2} (t + 1)}. (34) \\ \end{array} +$$ + +Assign + +$$ +\Omega_ {t} := C _ {2} \frac {\| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2}}{\ln^ {t + 1}} + \sum_ {i = 1} ^ {d} \frac {\Delta_ {t , i} | \nabla_ {i} f (u _ {t}) m _ {t - 1 , i} |}{\ln^ {2} (t + 1)} + (L _ {f} + 1) \sum_ {i = 1} ^ {d} \frac {\eta_ {v _ {t} , i} ^ {2} g _ {t , i} ^ {2}}{\ln^ {2} (t + 1)}. +$$ + +For the term $\sum_{t=1}^{+\infty} \mathbb{E}[\Omega_t]$ , we can estimate it as + +$$ +\begin{array}{l} \sum_ {t = 1} ^ {+ \infty} \mathbb {E} [ \Omega_ {t} ] := C _ {2} \sum_ {t = 1} ^ {+ \infty} \frac {\mathbb {E} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2}}{\ln^ {t + 1}} + \sum_ {t = 1} ^ {+ \infty} \sum_ {i = 1} ^ {d} \frac {\mathbb {E} [ \Delta_ {t , i} | \nabla_ {i} f (u _ {t}) m _ {t - 1 , i} | ]}{\ln^ {2} (t + 1)} \\ + (L _ {f} + 1) \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {+ \infty} \frac {\mathbb {E} [ \eta_ {v _ {t} , i} ^ {2} g _ {t , i} ^ {2} ]}{\ln^ {2} (t + 1)} \\ \stackrel {(a)} {\leq} \mathcal {O} (1) + \sum_ {i = 1} ^ {d} \mathcal {O} \left(\sum_ {t = 1} ^ {+ \infty} \mathbb {E} \left[ \frac {\mathbb {E} [ \eta_ {v _ {t} , i} ^ {2} g _ {t , i} ^ {2} ]}{\ln^ {2} (t + 1)} \right]\right) \\ \stackrel {(b)} {\leq} \mathcal {O} (1) + \sum_ {i = 1} ^ {d} \mathcal {O} \left(\sum_ {t = 1, S _ {t, i} > 2 v} ^ {+ \infty} \mathbb {E} \left[ \zeta^ {\prime 2} \frac {\mathbb {E} [ \eta_ {v _ {t} , i} ^ {2} g _ {t , i} ^ {2} ]}{\ln^ {2} (S _ {t , i} / v)} \right]\right). \\ \end{array} +$$ + +In step $(a)$ , we use Property 4 and Lemma D.2. In step $(b)$ , we use the last result from Lemma D.4, which states + +$$ +\ln \left(\frac {S _ {t , i}}{v}\right) \leq \ln \left(\frac {S _ {t}}{v}\right) \leq \zeta^ {\prime} \ln (T + 1). +$$ + +Then, using the series-integral inequality, we bound $\sum_{t=1}^{+\infty} \mathbb{E}[\Omega_t]$ and obtain + +$$ +\begin{array}{l} \sum_ {t = 1} ^ {+ \infty} \mathbb {E} [ \Omega_ {t} ] \leq \mathcal {O} (1) + \mathcal {O} \left(\sum_ {i = 1} ^ {d} \mathbb {E} \left[ \sum_ {t = 1, S _ {t, i} > 2 v} ^ {+ \infty} \frac {\left(\zeta^ {\prime 2}\right) \frac {g _ {t , i} ^ {2}}{v}}{\ln^ {2} \left(\frac {S _ {t , i}}{v}\right) \frac {S _ {t , i}}{v}} \right]\right) \\ < \mathcal {O} (1) + \mathcal {O} \left(\sum_ {i = 1} ^ {d} \mathbb {E} \left[ \int_ {2} ^ {+ \infty} \frac {\zeta^ {\prime 2}}{x \ln^ {2} x} \mathrm {d} x \right]\right) \\ = \mathcal {O} (1) + \mathcal {O} (\mathbb {E} [ \zeta^ {\prime 2} ]). \\ \end{array} +$$ + +Next, we use the explicit expression for $\zeta^{\prime}$ given in Lemma D.4 to bound $\mathbb{E}[\zeta^{\prime 2}]$ . We have: + +$$ +\mathbb {E} [ \zeta^ {\prime 2} ] = \mathbb {E} \left[ 1 6 \left(1 + \frac {1}{2} \ln \left(\max \left\{e, \Pi_ {\Delta , \infty} ^ {- 1} \zeta \right\}\right)\right) \right] < + \infty . +$$ + +As a result, we have + +$$ +\sum_ {t = 1} ^ {+ \infty} \mathbb {E} \left[ \Omega_ {t} \right] < + \infty . \tag {35} +$$ + +According to the Lebesgue's Monotone Convergence theorem, we know that the above result implies + +$$ +\sum_ {t = 1} ^ {+ \infty} \mathbb {E} \left[ \Omega_ {t} \mid \mathcal {F} _ {t - 1} \right] < + \infty \text {a . s .} \tag {36} +$$ + +Next, we take the conditional expectation with respect to $\mathcal{F}_{t - 1}$ on both sides of Equation (33), which obtains + +$$ +\mathbb {E} \left[ \frac {\Pi_ {\Delta , t + 1} \hat {f} (u _ {t + 1})}{\ln^ {2} (t + 2)} \mid \mathcal {F} _ {t - 1} \right] \leq \frac {\Pi_ {\Delta , t} \hat {f} (u _ {t})}{\ln^ {2} (t + 1)} + \mathbb {E} [ \Omega_ {t} | \mathcal {F} _ {t - 1} ] + 0. \tag {37} +$$ + +Based on the result from Equation (36) and the Supermartingale Convergence theorem, we deduce that $\frac{\Pi_{\Delta,t}\hat{f}(u_t)}{\ln^2(t + 1)}$ converges almost surely. Then, according to Property 5, we bound $f(w_{t}) - f^{*}$ using $\hat{f} (u_t)$ . This concludes our first result. Next, we take the expectation on both sides of Equation (33), which yields + +$$ +\mathbb {E} \left[ \frac {\Pi_ {\Delta , t + 1} \hat {f} \left(u _ {t + 1}\right)}{\ln^ {2} (t + 2)} \right] \leq \mathbb {E} \left[ \frac {\Pi_ {\Delta , t} \hat {f} \left(u _ {t}\right)}{\ln^ {2} (t + 1)} \right] + \mathbb {E} [ \Omega_ {t} ] + 0. \tag {38} +$$ + +Based on the convergence result of the expectation summation in Equation (35) and a summation formula for a recursive sequence, we conclude our second result. Thus, the analysis for the case $\delta = 0$ has been completed. The case $\delta > 0$ could be analyzed using the same method, which concludes the lemma. + +# D.3.7. PROOF OF LEMMA D.8 + +Proof. Since the case of $\delta > 0$ is relatively straightforward, we first analyze the scenario where $\delta > 0$ . According to the second conclusion for $\delta > 0$ in Lemma D.7, we obtain + +$$ +\mathbb {E} [ S _ {T} ^ {3 / 4} ] = \mathbb {E} [ \Pi_ {\Delta , T} ^ {- 3 / 4} \Pi_ {\Delta , T} ^ {3 / 4} S _ {T} ^ {3 / 4} ] \overset {H o l d e r s i s e n i q u a l i t y} {\leq} \mathbb {E} ^ {1 / 4} [ \Pi_ {\Delta , T} ^ {- 3} ] \mathbb {E} ^ {3 / 4} [ \Pi_ {\Delta , T} S _ {T} ]. +$$ + +Then according to Lemma D.1, we have $\mathbb{E}[\Pi_{\Delta ,T}^{-3}] \leq C_{v,d,3}$ . For the other term, $\mathbb{E}[\Pi_{\Delta ,T}S_T]$ , we can handle the term as follows. + +$$ +\begin{array}{l} \mathbb {E} \left[ \Pi_ {\Delta , T} S _ {T} \right] \leq S _ {0} + \mathbb {E} \left[ \Pi_ {\Delta , T} \sum_ {t = 1} ^ {T} \| g _ {t} \| ^ {2} \right] \leq d v + \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \Pi_ {\Delta , T} \| g _ {t} \| ^ {2} \right] \\ = d v + \sum_ {t = 1} ^ {T} \mathbb {E} \left[ \Pi_ {\Delta , T} \mathbb {E} [ \| g _ {t} \| ^ {2} | \mathcal {F} _ {t - 1} ] \right] \\ \stackrel {\text {P r o p e r t y 1}} {\leq} d v + \sum_ {t = 1} ^ {T} \mathbb {E} \left[ \Pi_ {\Delta , T} ((A + 2 L _ {f} B) (f (w _ {t}) - f ^ {*}) + C) \right] \\ \stackrel {\text {L e m m a D . 7}} {\leq} d v + ((A + 2 L _ {f} B) M _ {\delta} + C) T. \\ \end{array} +$$ + +This implies + +$$ +\mathbb {E} [ \sqrt {S _ {T}} ] \leq C _ {v, d, 3} ^ {1 / 4} (d v + ((A + 2 L _ {f} B) M _ {\delta} + C) T ^ {3 / 4} = \mathcal {O} (T ^ {3 / 4}). +$$ + +For the case where $\delta = 0$ , we use the same approach as in the case of $\delta > 0$ and apply the corresponding conclusion for $\delta = 0$ from Lemma D.7. Thus, we obtain + +$$ +\mathbb {E} [ S _ {T} ^ {3 / 4} ] = \mathcal {O} (T ^ {3 / 4} \ln^ {3 / 2} T). +$$ + +# D.3.8. PROOF OF LEMMA D.9 + +Proof. We discuss two cases based on the value of $\lambda$ . In the first case, when $\lambda = 1$ , we have + +$$ +v _ {t + 1} = \left(1 - \frac {1}{t + 1}\right) v _ {t} + \frac {1}{t + 1} g _ {t} ^ {\circ 2} (\forall t \geq 1), +$$ + +that is + +$$ +(t + 1) v _ {t + 1} = t v _ {t} + g _ {t} ^ {\circ 2}. +$$ + +Summing over all the coordinates, we obtain + +$$ +(t + 1) \Sigma_ {v _ {t + 1}} = t \Sigma_ {v _ {t}} + \| g _ {t} \| ^ {2}. \tag {39} +$$ + +Multiplying both sides of the above equation by $\Pi_{\Delta ,t}$ , and noting that $\Pi_{\Delta ,t}\geq \Pi_{\Delta ,t + 1}$ , we have + +$$ +(t + 1) \Pi_ {\Delta , t + 1} \Sigma_ {v _ {t + 1}} = t \Pi_ {\Delta , t} \Sigma_ {v _ {t}} + \Pi_ {\Delta , t} \| g _ {t} \| ^ {2}. +$$ + +Taking the expectation on both sides, we obtain + +$$ +\begin{array}{l} (t + 1) \mathbb {E} \left[ \Pi_ {\Delta , t + 1} \Sigma_ {v _ {t + 1}} \right] \leq t \mathbb {E} \left[ \Pi_ {\Delta , t} \Sigma_ {v _ {t}} \right] + \mathbb {E} \left[ \Pi_ {\Delta , t} \| g _ {t} \| ^ {2} \right] \\ = t \mathbb {E} \left[ \Pi_ {\Delta , t} \Sigma_ {v _ {t}} \right] + \mathbb {E} \left[ \Pi_ {\Delta , t} \mathbb {E} \left[ \| g _ {t} \| ^ {2} \mid \mathcal {F} _ {t - 1} \right] \right] \\ \begin{array}{l} \text {P r o p e r t y} ^ {1} \\ \leq t \mathbb {E} [ \Pi_ {\Delta , t} \Sigma_ {v _ {t}} ] + (A + 2 L _ {f} B) \mathbb {E} [ \Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*}) ] + C \end{array} \\ \leq t \mathbb {E} [ \Pi_ {\Delta , t} \Sigma_ {v _ {t}} ] + (A + 2 L _ {f} B) \left(\sup _ {t \geq 1} \mathbb {E} [ \Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*}) ]\right) + C \\ \stackrel {\text {L e m m a D . 7}} {\leq} \left\{ \begin{array}{l l} t \mathbb {E} [ \Pi_ {\Delta , t} \Sigma_ {v _ {t}} ] + (A + 2 L _ {f} B) M _ {\delta} + C, & \text {i f} \delta \in (0, 1 / 2) \\ t \mathbb {E} [ \Pi_ {\Delta , t} \Sigma_ {v _ {t}} ] + (A + 2 L _ {f} B) M _ {0} \ln^ {2} t + C, & \text {i f} \delta = 0 \end{array} \right.. \\ \end{array} +$$ + +By iterating the above inequality, we finally have + +$$ +(t + 1) \mathbb {E} [ \Pi_ {\Delta , t + 1} \Sigma_ {v _ {t + 1}} ] \leq \left\{ \begin{array}{l l} \mathbb {E} [ \Pi_ {\Delta , 2} \Sigma_ {v _ {1}} ] + \big ((A + 2 L _ {f} B) M _ {\delta} + C \big) t, & \text {i f} \delta \in (0, 1 / 2) \\ \mathbb {E} [ \Pi_ {\Delta , 2} \Sigma_ {v _ {1}} ] + \big ((A + 2 L _ {f} B) M _ {0} \ln^ {2} t + C \big) t, & \text {i f} \delta = 0 \end{array} \right.. +$$ + +This implies that for any $t \geq 1$ , + +$$ +\mathbb {E} [ \Pi_ {\Delta , t + 1} \Sigma_ {v _ {t + 1}} ] \leq \left\{ \begin{array}{l l} \mathbb {E} [ \Pi_ {\Delta , 2} \Sigma_ {v _ {1}} ] + (A + 2 L _ {f} B) M _ {\delta} + C, & \text {i f} \delta \in (0, 1 / 2) \\ \mathbb {E} [ \Pi_ {\Delta , 2} \Sigma_ {v _ {1}} ] + (A + 2 L _ {f} B) M _ {0} \ln^ {2} t + C, & \text {i f} \delta = 0 \end{array} \right., +$$ + +that is + +$$ +\sup _ {t \geq 1} \mathbb {E} [ \Pi_ {\Delta , t} \Sigma_ {v _ {t}} ] < \left\{ \begin{array}{l l} \mathbb {E} [ \Pi_ {\Delta , 2} \Sigma_ {v _ {1}} ] + (A + 2 L _ {f} B) M _ {\delta} + C, & \text {i f} \delta \in (0, 1 / 2) \\ \mathbb {E} [ \Pi_ {\Delta , 2} \Sigma_ {v _ {1}} ] + (A + 2 L _ {f} B) M _ {0} \ln^ {2} t + C, & \text {i f} \delta = 0 \end{array} \right.. +$$ + +Next, we discuss the scenario when $\lambda > 1$ . In this case, we have the following inequality. + +$$ +\Sigma_ {v _ {t + 1}} \leq \Sigma_ {v _ {t}} + \frac {1}{(t + 1) ^ {\lambda}} \| g _ {t} \| ^ {2}. +$$ + +We multiply both sides of the above inequality by $\Pi_{\Delta ,t}$ and, noting its monotonicity, we have + +$$ +\Pi_ {\Delta , t + 1} \Sigma_ {v _ {t + 1}} \leq \Pi_ {\Delta , t} \Sigma_ {v _ {t}} + \frac {\Pi_ {\Delta , t}}{(t + 1) ^ {\lambda}} \| g _ {t} \| ^ {2}. \tag {40} +$$ + +Taking the conditional expectation with respect to $\mathcal{F}_{t - 1}$ on both sides of the inequality, we have + +$$ +\mathbb {E} \bigl [ \Pi_ {\Delta , t + 1} \Sigma_ {v _ {t + 1}} | \mathcal {F} _ {t - 1} \bigr ] \leq \Pi_ {\Delta , t} \Sigma_ {v _ {t}} + \frac {\Pi_ {\Delta , t}}{(t + 1) ^ {\lambda}} \mathbb {E} \bigl [ \Pi_ {\Delta , t} \| g _ {t} \| ^ {2} | \mathcal {F} _ {t - 1} \bigr ]. +$$ + +According to Property 1 and Lemma D.7, we obtain + +$$ +\sum_ {t = 1} ^ {+ \infty} \frac {\Pi_ {\Delta , t}}{(t + 1) ^ {\lambda}} \mathbb {E} [ \Pi_ {\Delta , t} \| g _ {t} \| ^ {2} | \mathscr {F} _ {t - 1} ] +$$ + +$$ +\begin{array}{l} \leq \left\{ \begin{array}{l l} \big ((A + 2 L _ {f} B) \sup _ {t \geq 1} \big (\Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*}) \big) + C \big) \cdot \sum_ {t = 1} ^ {+ \infty} \frac {1}{(t + 1) ^ {\lambda}}, & \text {i f} \delta \in (0, 1 / 2) \\ \Big ((A + 2 L _ {f} B) \sup _ {t \geq 1} \left(\frac {\Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*})}{\ln^ {2} t}\right) + C \Big) \cdot \sum_ {t = 1} ^ {+ \infty} \frac {\ln^ {2} t}{(t + 1) ^ {\lambda}}, & \text {i f} \delta = 0 \end{array} \right. \\ < + \infty a. s. \\ \end{array} +$$ + +By the Supermartingale Convergence theorem, we obtain that $\Pi_{\Delta,t}\Sigma_{v_t}$ converges almost surely, which implies that $\sup_{t\geq 1}\Pi_{\Delta,t}\Sigma_{v_t} < +\infty$ a.s. According to Lemma D.1, where $\sup_{t\geq 1}\Pi_{\Delta,t}^{-1} < +\infty$ a.s., we can immediately deduce that $\sup_{t\geq 1}\Sigma_{v_t} < +\infty$ a.s. Next, we prove that the expected supremum is finite. Taking the expectation on both sides of Equation (40), we obtain + +$$ +\mathbb {E} \left[ \Pi_ {\Delta , t + 1} \Sigma_ {v _ {t + 1}} \right] \leq \mathbb {E} \left[ \Pi_ {\Delta , t} \Sigma_ {v _ {t}} \right] + \frac {1}{(t + 1) ^ {\lambda}} \mathbb {E} [ \Pi_ {\Delta , t} \| g _ {t} \| ^ {2} ]. +$$ + +By summing the above recursive inequalities and using the results from Property 1 and Lemma D.7, we can easily prove that + +$$ +\sup_{t\geq 1}\mathbb{E}[\Pi_{\Delta ,t}\Sigma_{v_{t}}] < \left\{ \begin{array}{l}\bigl((A + 2L_{f}B)M_{\delta} + C\bigr)\sum_{t = 1}^{+\infty}\frac{1}{(t + 1)^{\lambda}},\quad \text{if $\delta \in (0,1 / 2)$}\\ \bigl((A + 2L_{f}B)M_{0} + C\bigr)\sum_{t = 1}^{+\infty}\frac{\ln^{2}t}{(t + 1)^{\lambda}},\quad \text{if $\delta = 0$} \end{array} \right. < + \infty . +$$ + +With this inequality we complete the proof. + +# D.3.9. PROOF OF LEMMA D.10 + +Proof. According to the result from Lemma D.5, it is straightforward to see that when $\delta > 0$ , + +$$ +\begin{array}{l} \sum_ {t = 2} ^ {T} \mathbb {E} \left[ \Pi_ {\Delta , t} \frac {\eta_ {t - 1} \| \nabla f (w _ {t}) \| ^ {2}}{\sqrt {\Sigma_ {v _ {t - 1}} + \mu}} \right] \leq \sum_ {t = 2} ^ {T} \mathbb {E} \left[ \Pi_ {\Delta , t} \frac {\eta_ {t - 1}}{\sqrt {\Sigma_ {v _ {t - 1}} + \mu}} \sum_ {i = 1} ^ {d} (\nabla_ {i} f (w _ {t})) ^ {2} \right] \\ \leq \sum_ {t = 1} ^ {T} \mathbb {E} \left[ \Pi_ {\Delta , t} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) \right] \\ < C _ {4, \delta} < + \infty . \\ \end{array} +$$ + +Next, we apply the Lebesgue's Monotone Convergence theorem + +$$ +\sum_ {t = 2} ^ {+ \infty} \Pi_ {\Delta , t} \frac {\eta_ {t - 1} \| \nabla f (w _ {t}) \| ^ {2}}{\sqrt {\Sigma_ {v _ {t - 1}} + \mu}} < + \infty \text {a . s .} +$$ + +Then, by combining the almost surely boundedness of $\sup_{t\geq 1}\Pi_{\Delta ,t}^{-1}$ and $\sup_{t\geq 1}\Sigma_{v_t}$ from Lemma D.1 and Lemma D.9, it follows + +$$ +\begin{array}{l} \sum_ {t = 1} ^ {+ \infty} \eta_ {t} \| \nabla f (w _ {t}) \| ^ {2} \leq \| \nabla f (w _ {1}) \| ^ {2} + \sum_ {t = 2} ^ {+ \infty} \eta_ {t - 1} \| \nabla f (w _ {t}) \| ^ {2} \\ < \| \nabla f (w _ {1}) \| ^ {2} + \left(\sup _ {t \geq 1} \Pi_ {\Delta , t + 1} ^ {- 3 / 2}\right) \cdot \left(\sqrt {\sup _ {t \geq 1} \Pi_ {\Delta , t} \Sigma_ {v _ {t}}} + \mu\right) \cdot \sum_ {t = 2} ^ {+ \infty} \Pi_ {\Delta , t} \frac {\eta_ {t - 1} \| \nabla f (w _ {t}) \| ^ {2}}{\sqrt {\Sigma_ {v _ {t - 1}}} + \mu} \\ < + \infty a. s. \\ \end{array} +$$ + +According to the L-smoothness assumption (Assumption 2.2), it is immediate that + +$$ +\left| \left\| \nabla f (w _ {t}) \right\| - \left\| \nabla f (u _ {t}) \right\| \right| \leq L _ {f} \left\| w _ {t} - u _ {t} \right\| = \frac {L _ {f} \beta_ {1}}{1 - \beta_ {1}} \left\| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \right\|, +$$ + +that is, + +$$ +\begin{array}{l} \left\| \nabla f (u _ {t}) \right\| ^ {2} \leq \left(\left\| \nabla f (w _ {t}) \right\| + \frac {L _ {f} \beta_ {1}}{1 - \beta_ {1}} \left\| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \right\|\right) ^ {2} \\ \leq 2 \| \nabla f (w _ {t}) \| ^ {2} + \frac {2 L _ {f} ^ {2} \beta_ {1} ^ {2}}{(1 - \beta_ {1}) ^ {2}} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2}. \\ \end{array} +$$ + +This implies + +$$ +\sum_ {t = 1} ^ {+ \infty} \eta_ {t} \| \nabla f (u _ {t}) \| ^ {2} \leq 2 \sum_ {t = 1} ^ {+ \infty} \eta_ {t} \| \nabla f (w _ {t}) \| ^ {2} + \frac {2 L _ {f} ^ {2} \beta_ {1} ^ {2}}{(1 - \beta_ {1}) ^ {2}} \sum_ {t = 1} ^ {+ \infty} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2}. +$$ + +According to Property 5, for any $\delta >0$ + +$$ +\begin{array}{l} \left(\frac {L _ {f} \beta_ {1}}{1 - \beta_ {1}}\right) ^ {2} \sum_ {t = 1} ^ {T} \mathbb {E} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} \leq \mathcal {O} \left(\sum_ {t = 1} ^ {T} \mathbb {E} \| \eta_ {v _ {t}} \circ g _ {t} \| ^ {2}\right) + \mathcal {O} (1) \\ \begin{array}{c} \text {E q . (3 2)} \\ \leq \mathcal {O} (1). \end{array} \\ \end{array} +$$ + +Applying the Lebesgue's Monotone Convergence theorem, we obtain + +$$ +\left(\frac {L _ {f} \beta_ {1}}{1 - \beta_ {1}}\right) ^ {2} \sum_ {t = 1} ^ {T} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} < + \infty \text {a . s .}, \tag {41} +$$ + +that is + +$$ +\sum_ {t = 1} ^ {+ \infty} \eta_ {t} \| \nabla f (u _ {t}) \| ^ {2} \leq 2 \sum_ {t = 1} ^ {+ \infty} \eta_ {t} \| \nabla f (w _ {t}) \| ^ {2} + \frac {2 L _ {f} ^ {2} \beta_ {1} ^ {2}}{(1 - \beta_ {1}) ^ {2}} \sum_ {t = 1} ^ {+ \infty} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} < + \infty \mathrm {a . s .}. +$$ + +![](images/d0e77e3e755102a5760e77ca2e6a1c8afe9854346d262b306a6af55523643e99.jpg) + +# D.3.10. PROOF OF THEOREM 3.1 + +Proof. According to Lemma D.5, we have: + +$$ +\sum_{t = 1}^{T}\mathbb{E}\left[ \Pi_{\Delta ,t}\sum_{i = 1}^{d}\zeta_{i}(t)\right]\leq \left\{ \begin{array}{ll}C_{4,\delta}, & \text{if}\delta \in (0,1 / 2)\\ C_{5} + C_{6}\mathbb{E}\left[\ln (S_{T})\right], & \text{if}\delta = 0 \end{array} \right.. +$$ + +According to the monotonicity of $\eta_{v_t,i}$ in Property 2 and the monotonicity of $\Pi_{\Delta ,t}$ itself, we obtain the following inequality. + +$$ +\sum_{t = 1}^{T}\mathbb{E}\left[\Pi_{\Delta ,T}\frac{\|\nabla f(w_{t})\|^{2}}{T^{\frac{1}{2} + \delta}(\sqrt{v_{T}} + \mu)}\right]\leq \sum_{t = 1}^{T}\mathbb{E}\left[\Pi_{\Delta ,T}\sum_{i = 1}^{d}\zeta_{i}(t)\right]\\ \leq \left\{ \begin{array}{ll}C_{4,\delta}, & \text{if}\delta \in (0,1 / 2)\\ C_{5} + C_{6}\mathbb{E}\left[\ln (S_{T})\right], & \text{if}\delta = 0 \end{array} \right.. +$$ + +For the leftmost part of the above inequality, we apply the Cauchy-Schwarz inequality and obtain + +$$ +\mathbb {E} \left[ \Pi_ {\Delta , T} ^ {- 1} T ^ {\frac {1}{2} + \delta} (\sqrt {v _ {T}} + \mu) \right] \left(\sum_ {t = 1} ^ {T} \mathbb {E} \left[ \Pi_ {\Delta , T} \frac {\| \nabla f (w _ {t}) \| ^ {2}}{T ^ {\frac {1}{2} + \delta} (\sqrt {v _ {T}} + \mu)} \right]\right) \geq \mathbb {E} \left[ \sqrt {\sum_ {t = 1} ^ {T} \| \nabla f (w _ {t}) \| ^ {2}} \right], +$$ + +which means + +$$ +\mathbb {E} \left[ \sqrt {\sum_ {t = 1} ^ {T} \| \nabla f (w _ {t}) \| ^ {2}} \right] \leq \left\{ \begin{array}{l l} C _ {4, \delta} \mathbb {E} \left[ \Pi_ {\Delta , T} ^ {- 1} T ^ {\frac {1}{2} + \delta} (\sqrt {v _ {T}} + \mu) \right], & \text {i f} \delta \in (0, 1 / 2) \\ C _ {5} \mathbb {E} \left[ \Pi_ {\Delta , T} ^ {- 1} T ^ {\frac {1}{2} + \delta} (\sqrt {v _ {T}} + \mu) \right] + C _ {6} \mathbb {E} \left[ \Pi_ {\Delta , T} ^ {- 1} T ^ {\frac {1}{2} + \delta} (\sqrt {v _ {T}} + \mu) \right] \mathbb {E} \left[ \ln (S _ {T}) \right], & \text {i f} \delta = 0 \end{array} \right.. +$$ + +Combining the results from Lemma D.8, Lemma D.9 and Lemma D.1, we obtain + +$$ +\begin{array}{l} \mathbb {E} \left[ \Pi_ {\Delta , T} ^ {- 1} T ^ {\frac {1}{2} + \delta} (\sqrt {v _ {T}} + \mu) \right] \leq 2 T ^ {\frac {1}{2} + \delta} \sqrt {\mathbb {E} [ \Pi_ {\Delta , T} ^ {- 3} ]} \sqrt {\mathbb {E} [ \Pi_ {\Delta , T} (v _ {T} + \mu^ {2}) ]} \\ \begin{array}{r l} & {\leq \left\{ \begin{array}{l l} C _ {v, d, 3} ^ {1 / 2} \mathcal {O} (T ^ {\frac {1}{2} + \delta}), & \mathrm {i f} \gamma > 1 \\ C _ {v, d, 3} ^ {1 / 2} \mathcal {O} (T ^ {\frac {1}{2} + \delta}), & \mathrm {i f} \gamma = 1, \delta \in (0, 1 ] \\ C _ {v, d, 3} ^ {1 / 2} \mathcal {O} (\sqrt {T} \ln T), & \mathrm {i f} \gamma = 1, \delta = 0. \end{array} \right.} \end{array} \\ \end{array} +$$ + +and + +$$ +\mathbb {E} [ \ln (S _ {T}) ] = \frac {4}{3} \mathbb {E} [ \ln (S _ {T} ^ {3 / 4}) ] \leq \frac {4}{3} \ln (\mathbb {E} [ S _ {T} ^ {3 / 4} ]) = \left\{ \begin{array}{l l} \mathcal {O} (\ln T), & \text {i f} \delta \in (0, 1 / 2) \\ \mathcal {O} (\ln T) + \mathcal {O} (\ln \ln T), & \text {i f} \delta = 0 \end{array} \right.. +$$ + +Combining the two estimates above, we finally obtain + +$$ +\mathbb {E} \left[ \sqrt {\sum_ {t = 1} ^ {T} \| \nabla f (w _ {t}) \| ^ {2}} \right] \leq \left\{ \begin{array}{l l} \mathcal {O} \left(T ^ {\frac {1}{2} + \delta}\right), & \text {i f} \delta \in (0, 1 / 2) \\ \mathcal {O} (\sqrt {T} \ln T), & \text {i f} \gamma > 1, \delta = 0 \\ \mathcal {O} (\sqrt {T} \ln^ {2} T), & \text {i f} \gamma = 1, \delta = 0. \end{array} \right. \tag {42} +$$ + +This implies that for any $s \in (0,1)$ , the inequality + +$$ +\frac {1}{T} \sum_ {t = 1} ^ {T} \| \nabla f (w _ {t}) \| ^ {2} \leq \left\{ \begin{array}{l l} \mathcal {O} \Big (\frac {1}{s ^ {2}} \frac {1}{T ^ {\frac {1}{2} - \delta}} \Big), & \text {i f} \delta \in (0, 1 / 2) \\ \mathcal {O} \Big (\frac {1}{s ^ {2}} \frac {\ln T}{\sqrt {T}} \Big), & \text {i f} \gamma > 1, \delta = 0 \\ \mathcal {O} \Big (\frac {1}{s ^ {2}} \frac {\ln^ {2} T}{\sqrt {T}} \Big), & \text {i f} \gamma = 1, \delta = 0 \end{array} \right. +$$ + +![](images/a67f6eb3e4415096472db8ee4ef9974e576a2af9d79986133abe5e33759ef096.jpg) + +holds with probability at least $1 - s$ . + +# D.3.11. PROOF OF LEMMA D.6 + +Proof. From Eq. (42), we have $\forall t_0 \geq 0$ , + +$$ +\lim _ {T \rightarrow + \infty} \mathbb {E} \left[ \inf _ {t _ {0} < t \leq T} \| \nabla f (w _ {t}) \| \right] \leq \lim _ {T \rightarrow + \infty} \frac {1}{T - t _ {0} + 1} \mathbb {E} \left[ \sqrt {\sum_ {t = t _ {0}} ^ {T} \| \nabla f (w _ {t}) \| ^ {2}} \right] = 0. +$$ + +Since, for a fixed $t_0$ , the sequence $\{\inf_{t_0 < t \leq T} \| f(w_t) \| \}_{T > t_0}$ is monotonically decreasing and non-negative, by the Lebesgue's Monotone Convergence theorem, we readily obtain: + +$$ +\mathbb {E} \left[ \inf _ {t > t _ {0}} \| \nabla f (w _ {t}) \| \right] = \mathbb {E} \left[ \lim _ {T \to + \infty} \inf _ {t _ {0} < t \leq T} \| \nabla f (w _ {t}) \| \right] = \lim _ {T \to + \infty} \mathbb {E} \left[ \inf _ {t _ {0} < t \leq T} \| \nabla f (w _ {t}) \| \right] = 0 +$$ + +The second equality follows from the Lebesgue's Monotone Convergence theorem, which allows the interchange of the limit and expectation. Since $\inf_{t > t_0} \| \nabla f(w_t) \| \geq 0$ , we can directly deduce that $\inf_{t > t_0} \| \nabla f(w_t) \| = 0$ a.s., from the fact that $\mathbb{E} \left[ \inf_{t > t_0} \| \nabla f(w_t) \| \right] = 0$ . Furthermore, given the arbitrariness of $t_0$ , we can obtain that there exists a subsequence $\{w_{c_t}\}_{t \geq 1}$ of $\{w_t\}_{t \geq 1}$ such that + +$$ +\lim _ {t \rightarrow + \infty} \| \nabla f (w _ {c _ {t}}) \| = 0 \quad \text {a . s .} +$$ + +This completes the proof. + +![](images/558376575856de3819c9491efb6d766de1d4f9933f83c7dc5c69dfa0860b7a00.jpg) + +# D.3.12. PROOF OF THEOREM 3.2 + +Proof. According to Lemma D.10, we have + +$$ +\left\| \nabla f \left(w _ {t}\right)\right\| - \left\| \nabla f \left(u _ {t}\right)\right\| \mid \leq L _ {f} \| w _ {t} - u _ {t} \| = \frac {L _ {f} \beta_ {1}}{1 - \beta_ {1}} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| \rightarrow 0 a. s. +$$ + +This implies that we only need to prove $\lim_{t\to +\infty}\| \nabla f(u_t)\| = 0$ a.s. To achieve this objective, we proceed as follows. + +For any $l > 0$ , we construct the following stopping time sequence $\{\tau_{l,n}\}_{n\geq 1}$ : + +$$ +\tau_ {l, 1} := \min \{t \geq 1: \| \nabla f (u _ {t}) \| > l \}, \quad \tau_ {l, 2} := \min \{t > \tau_ {l, 1}: \| \nabla f (u _ {t}) \| \leq l \}, +$$ + +…, + +$$ +\tau_ {l, 2 k - 1} := \min \left\{t > \tau_ {l, 2 k - 2}: \| \nabla f (u _ {t}) \| > l \right\}, \quad \tau_ {l, 2 k} := \min \left\{t > \tau_ {l, 2 k - 1}: \| \nabla f (u _ {t}) \| \leq l \right\}. +$$ + +According to the subsequence convergence result in Lemma D.6, we know that when $\tau_{2k - 1} < +\infty$ ( $\forall k \geq 1$ ), it must hold that $\tau_{2k} < +\infty$ a.s. We now discuss two cases. + +1. When there exists some $k_{0} \geq 1$ such that $\tau_{2k_{0}-1} = +\infty$ , this implies that eventually $\{\|\nabla f(u_{t})\|_{t \geq 1}\}$ will remain below $l$ , i.e., + +$$ +\lim _ {t \rightarrow + \infty} \left\| \nabla f \left(u _ {t}\right)\right\| < l. \tag {43} +$$ + +2. Next, we focus on the second case, where for all $\tau_{2k-1}$ , we have $\tau_{2k-1} < +\infty$ . In this situation, we examine the behavior of $\sup_{\tau_{2k-1} \leq t < \tau_{2k}} \|\nabla f(u_t)\|$ . We have + +$$ +\begin{array}{l} \sup _ {\tau_ {2 k - 1} \leq t < \tau_ {2 k}} \| \nabla f (u _ {t}) \| \leq l + \sup _ {\tau_ {2 k - 1} \leq t < \tau_ {2 k}} \| \nabla f (u _ {t}) \| - \| \nabla f (u _ {\tau_ {2 k - 1} - 1}) \| \\ \leq l + \left(\sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k} - 1} \left| \| \nabla f (u _ {t}) \| - \| \nabla f (u _ {t - 1}) \| \right|\right) \\ \stackrel {{1 - \text {s m o o t h}}} {{\leq}} l + \left(L _ {f} \sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k} - 1} \| u _ {t} - u _ {t - 1} \|\right) \\ \overset {\text {E q .} (2)} {\leq} l + L _ {f} \underbrace {\left(\sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k} - 1} \| \eta_ {v _ {t}} \circ g _ {t} \|\right)} _ {\Upsilon_ {k, 1}} \\ + \frac {\beta_ {1} L _ {f} ^ {2}}{1 - \beta_ {1}} \underbrace {\left(\sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k} - 1} \| \Delta_ {t} \circ m _ {t - 1} \|\right)} _ {\Upsilon_ {k, 2}}. \\ \end{array} +$$ + +Our next goal is to prove separately that $\lim \sup_{k\to +\infty}\Upsilon_{k,1} = 0$ a.s. and $\lim \sup_{k\to +\infty}\Upsilon_{k,2} = 0$ a.s. For $\Upsilon_{k,1}$ , we have + +$$ +\begin{array}{l} \Upsilon_ {k, 1} = \left(\sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k} - 1} \| \eta_ {v _ {t}} \circ g _ {t} \|\right) = \left(\sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k} - 1} \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} | g _ {t, i} |\right) \\ = \left(\sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k} - 1} \sum_ {i = 1} ^ {d} \frac {\eta_ {t} \left| g _ {t , i} \right|}{\sqrt {v _ {t}} + \mu}\right) \leq \left(\sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k} - 1} \sum_ {i = 1} ^ {d} \frac {\eta_ {t} \left| g _ {t , i} \right|}{\mu}\right) \\ = \frac {1}{\mu} \left(\sum_ {t = \tau_ {2 k - 1}} ^ {\tau_ {2 k} - 1} \sum_ {i = 1} ^ {d} \eta_ {t} \mathbb {E} [ | g _ {t, i} | | \mathcal {F} _ {t - 1} ]\right) \\ + \frac {1}{\mu} \left(\sum_ {t = \tau_ {2 k - 1}} ^ {\tau_ {2 k} - 1} \sum_ {i = 1} ^ {d} \eta_ {t} \left(| g _ {t, i} | - \mathbb {E} \left[ | g _ {t, i} | | \mathcal {F} _ {t - 1} \right]\right)\right) \\ = \frac {1}{\mu} \underbrace {\left(\sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k} - 1} \eta_ {t} \mathbb {E} [ | g _ {t} | | \mathcal {F} _ {t - 1} ]\right)} _ {\Upsilon_ {k, 1, 1}} + \frac {1}{\mu} \underbrace {\left(\sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k} - 1} \sum_ {i = 1} ^ {d} \eta_ {t} (| g _ {t , i} | - \mathbb {E} [ | g _ {t , i} | | \mathcal {F} _ {t - 1} ])\right)} _ {\Upsilon_ {k, 1, 2}}. \\ \end{array} +$$ + +For $\Upsilon_{k,1,1}$ , we have + +$$ +\Upsilon_ {k, 1, 1} \stackrel {\text {P r o p e r t y}} {\leq} \left(\sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k} - 1} \eta_ {t} \big ((A + 2 L _ {f} B) (f (w _ {t}) - f ^ {*}) + C \big)\right) +$$ + +$$ +\begin{array}{l} \leq \bigl((A + 2L_{f}B)\sup_{t\geq 1}(f(w_{t}) - f^{*}) + C\bigr)\cdot \left(\sum_{t = r_{2k - 1} - 1}^{\tau_{2k} - 1}\eta_{t}\right) \\ = \left((A + 2 L _ {f} B) \sup _ {t \geq 1} (f (w _ {t}) - f ^ {*}) + C\right) \cdot \left(\eta_ {\tau_ {2 k - 1}} + \left(\sum_ {t = \tau_ {2 k - 1} - 1} ^ {\tau_ {2 k}} \eta_ {t}\right)\right) \\ \stackrel {(a)} {\leq} \frac {1}{l ^ {2}} \big ((A + 2 L _ {f} B) \sup _ {t \geq 1} (f (w _ {t}) - f ^ {*}) + C \big) \cdot \left(\eta_ {\tau_ {2 k - 1}} + \left(\sum_ {t = \tau_ {2 k - 1}} ^ {\tau_ {2 k} - 1} \eta_ {t} \| \nabla f (u _ {t}) \| ^ {2}\right)\right). \\ \end{array} +$$ + +In step $(a)$ , this is due to the fact that, over the interval $[\tau_{2k-1}, \tau_{2k})$ , we always have $\|\nabla f(u_t)\|^2 > l^2$ . Based on Lemma D.10, we know that + +$$ +\sum_ {t = 1} ^ {+ \infty} \eta_ {t} \| \nabla f (u _ {t}) \| ^ {2} < + \infty \quad \text {a . s .} +$$ + +By applying the Cauchy's convergence principle, we can prove that + +$$ +\lim _ {k \rightarrow + \infty} \sum_ {t = \tau_ {2 k - 1}} ^ {\tau_ {2 k} - 1} \eta_ {t} \| \nabla f (u _ {t}) \| ^ {2} = 0 \quad \text {a . s .} +$$ + +On the other hand, it is evident that $\lim_{k\to +\infty}\eta_{\tau_2k - 1} = 0$ . Meanwhile, based on Lemma D.7 and Lemma D.1, we have + +$$ +\sup _ {t \geq 1} (f (w _ {t}) - f ^ {*}) \leq \left(\sup _ {t \geq 1} \Pi_ {\Delta , t} ^ {- 1}\right) \cdot \left(\sup _ {t \geq 1} \left(\Pi_ {\Delta , t + 1} (f (w _ {t}) - f ^ {*})\right)\right) < + \infty \quad \text {a . s .} +$$ + +Therefore, + +$$ +\limsup_{k\to +\infty}\Upsilon_{k,1,1} = \lim_{k\to +\infty}\Upsilon_{k,1,1} = 0. +$$ + +For $\Upsilon_{k,1,2}$ , we consider the following martingale difference sequence + +$$ +\overline {{X}} _ {T} := \sum_ {t = 1} ^ {T} \sum_ {i = 1} ^ {d} \eta_ {t} \left(\left| g _ {t, i} \right| - \mathbb {E} \left[ \left| g _ {t, i} \right| \mid \mathcal {F} _ {t - 1} \right]\right). +$$ + +We can compute + +$$ +\begin{array}{l} \sum_ {t = 1} ^ {+ \infty} \mathbb {E} \left[ \left(\sum_ {i = 1} ^ {d} \eta_ {t} \left(\left| g _ {t, i} \right| - \mathbb {E} \left[ \left| g _ {t, i} \right| \mid \mathcal {F} _ {t - 1} \right]\right)\right) ^ {2} \Bigg | \mathcal {F} _ {t - 1} \right] \leq d \sum_ {t = 1} ^ {+ \infty} \eta_ {t} ^ {2} \sum_ {i = 1} ^ {d} \mathbb {E} [ \left(\left| g _ {t, i} \right| - \mathbb {E} \left[ \left| g _ {t, i} \right| \mid \mathcal {F} _ {t - 1} \right]\right) ^ {2} ] \\ \leq d \sum_ {t = 1} ^ {+ \infty} \eta_ {t} ^ {2} \sum_ {i = 1} ^ {d} \mathbb {E} [ \| g _ {t} \| ^ {2} \mid \mathscr {F} _ {t - 1} ] \\ \stackrel {\text {P r o p e r t y}} {\leq} ^ {1} d \sum_ {t = 1} ^ {+ \infty} \eta_ {t} ^ {2} \sum_ {i = 1} ^ {d} \left(\left(A + 2 L _ {f} B\right) \sup _ {t \geq 1} \left(f \left(w _ {t}\right) - f ^ {*}\right) + C\right) \\ \leq d \sum_ {i = 1} ^ {d} \left((A + 2 L _ {f} B) \left(\sup _ {t \geq 1} \Pi_ {\Delta , t}\right) \left(\sup _ {t \geq 1} (f (w _ {t}) - f ^ {*}) + C\right)\right) \cdot \sum_ {t = 1} ^ {+ \infty} \eta_ {t} ^ {2} \\ \begin{array}{l} \text {L e m m a D . 1 a n d D . 7} \\ < + \infty \text {a . s .} \end{array} \\ \end{array} +$$ + +By the Martingale Convergence theorem, we obtain + +$$ +\lim _ {T \rightarrow + \infty} \bar {X} _ {T} = \sum_ {t = 1} ^ {+ \infty} \sum_ {i = 1} ^ {d} \eta_ {t} \left(\left| g _ {t, i} \right| - \mathbb {E} \left[\left| g _ {t, i} \right| \mid \mathscr {F} _ {t - 1} \right]\right) < + \infty \text {a . s .} +$$ + +Using the Cauchy's Convergence principle, we prove that + +$$ +\limsup_{k\to +\infty}\Upsilon_{k,1,2} = \lim_{k\to +\infty}\sum_{t = \tau_{2k - 1} - 1}^{\tau_{2k} - 1}\sum_{i = 1}^{d}\eta_{t}(|g_{t,i}| - \mathbb{E}[|g_{t,i}||\mathcal{F}_{t - 1}]) = 0\quad \text{a.s.} +$$ + +Combining the above two limit proofs for $\Upsilon_{t,1,1}$ and $\Upsilon_{t,1,2}$ , we conclude that + +$$ +\limsup_{k\to +\infty}\Upsilon_{t,1} = 0\quad \text{a.s.} +$$ + +Similarly, it can be shown that $\lim_{k\to +\infty}\Upsilon_{k,2} = 0$ a.s. Combining the limit results for $\Upsilon_{k,1}$ and $\Upsilon_{k,2}$ , we conclude that + +$$ +\limsup_{k\to +\infty}\sup_{\tau_{2k - 1}\leq t < \tau_{2k}}\| \nabla f(u_{t})\| \leq l + 0 = l. +$$ + +Moreover, combining $\sup_{\tau_{2k} \leq t < \tau_{2k + 1}} \| \nabla f(u_t) \| < l$ , we can deduce that + +$$ +\limsup_{t\to +\infty}\| \nabla f(u_{t})\| \leq l\quad \text{a.s.} +$$ + +Then, due to the arbitrariness of $l$ , we conclude that + +$$ +\limsup_{t\to +\infty}\| \nabla f(u_{t})\| = 0\quad \text{a.s.} +$$ + +This implies that + +$$ +\lim _ {t \rightarrow + \infty} \| \nabla f (u _ {t}) \| = 0 \quad \text {a . s .} +$$ + +# D.3.13. PROOF OF THEOREM 3.3 + +Proof. Since we have already proved the almost sure convergence in Theorem 3.2, it is natural to attempt to prove $L_{1}$ convergence via the Lebesgue's Dominated Convergence theorem. To achieve this, we need to find a function $h$ that is $\mathcal{F}_{\infty}$ -measurable and satisfies $\mathbb{E}|h| < +\infty$ , and such that for all $t \geq 1$ , we have $\|\nabla f(w_t)\| \leq |h|$ . Since for all $t$ , we naturally have $\|\nabla f(w_t)\| \leq \sup_{k \geq 1} \|\nabla f(w_k)\|$ , we only need to prove that $\mathbb{E}[\sup_{k \geq 1} \|\nabla f(w_k)\|] < +\infty$ . We proceed to achieve this goal in the rest of the proof. + +Recall the Approximate Descent Inequality (Lemma 4.1). We have + +$$ +\begin{array}{l} \Pi_ {\Delta , t} \hat {f} (u _ {t + 1}) - \Pi_ {\Delta , t - 1} \hat {f} (u _ {t}) \leq - \frac {1}{2} \Pi_ {\Delta , t} \sum_ {i = 1} ^ {d} \zeta_ {i} (t) + C _ {2} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} + \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | \\ + \left(L _ {f} + 1\right) \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + \Pi_ {\Delta , t} M _ {t}. \tag {44} \\ \end{array} +$$ + +For any $\lambda > 0$ , define the stopping time $\tau_{\lambda}$ as the first time the sequence $\{\Pi_{\Delta, t} \hat{f}(u_t)\}_{t \geq 1}$ exceeds $\lambda$ , i.e., + +$$ +\tau_ {\lambda} := \min \left\{t \geq 2: \Pi_ {\Delta , t} \hat {f} \left(u _ {t}\right) > \lambda \right\}. +$$ + +It can be rigorously verified that $\tau_{\lambda}$ is a stopping time with respect to the filtration $\{\mathcal{F}_t\}_{t\geq 1}$ , and satisfies a special property $[\tau_{\lambda} = n]\in \mathcal{F}_{n - 1}$ for all $n\geq 1$ . This implies that the preceding time $\tau_{\lambda} - 1$ is also a stopping time. Next, for any deterministic time $T\geq 3$ , we define $\tau_{\lambda ,T}\coloneqq \tau_{\lambda}\wedge T$ . We then sum the indices of Equation (44) from 1 to $\tau_{\lambda ,T} - 1$ . Specifically, we have + +$$ +\begin{array}{l} \Pi_ {\Delta , \tau_ {\lambda , T} - 1} \hat {f} (u _ {\tau_ {\lambda , T}}) \leq \Pi_ {\Delta , 0} \hat {f} (u _ {1}) + C _ {2} \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} + \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | \\ + \left(L _ {f} + 1\right) \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} + \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \Pi_ {\Delta , t} M _ {t}. \\ \end{array} +$$ + +Taking the expectation on both sides, we obtain + +$$ +\begin{array}{l} \mathbb {E} \left[ \Pi_ {\Delta , \tau_ {\lambda , T} - 1} \hat {f} (u _ {\tau_ {\lambda , T}}) \right] \leq \mathbb {E} \left[ \Pi_ {\Delta , 0} \hat {f} (u _ {1}) \right] + C _ {2} \mathbb {E} \left[ \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} \right] \\ + \mathbb {E} \left[ \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | \right] + (L _ {f} + 1) \mathbb {E} \left[ \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} \right] \\ + \mathbb {E} \left[ \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \Pi_ {\Delta , t} M _ {t} \right]. \\ \end{array} +$$ + +Since $\{\Pi_{\Delta ,t}M_t,\mathcal{F}_t\}_{t\geq 1}$ is a martingale difference sequence and $\tau_{\lambda ,T}\leq T < + \infty$ , by Doob's Stopped theorem, we know that + +$$ +\mathbb {E} \left[ \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \Pi_ {\Delta , t} M _ {t} \right] = 0. +$$ + +This implies + +$$ +\begin{array}{l} \mathbb {E} \left[ \Pi_ {\Delta , \tau_ {\lambda , T} - 1} \hat {f} \left(u _ {\tau_ {\lambda , T}}\right) \right] \leq \mathbb {E} \left[ \Pi_ {\Delta , 0} \hat {f} \left(u _ {1}\right) \right] + C _ {2} \mathbb {E} \left[ \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} \right] \\ + \mathbb {E} \left[ \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | \right] + (L _ {f} + 1) \mathbb {E} \left[ \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} \right]. \\ \end{array} +$$ + +Using Property 5 and Lemma D.2, we obtain + +$$ +\begin{array}{l} C _ {2} \mathbb {E} \left[ \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} \right] + \mathbb {E} \left[ \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | \right] \\ + (L _ {f} + 1) \mathbb {E} \left[ \sum_ {t = 1} ^ {\tau_ {\lambda , T} - 1} \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} \right] \\ \leq C _ {2} \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} \right] + \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | \right] \\ + (L _ {f} + 1) \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} \right] \\ = \mathcal {O} \left(\sum_ {t = 1} ^ {T} \mathbb {E} \left[ \| \eta_ {v _ {t}} \circ g _ {t} \| ^ {2} \right]\right) + \mathcal {O} (1) \\ \stackrel {\text {E q .} (3 2)} {=} \mathcal {O} (1). \\ \end{array} +$$ + +This means + +$$ +\mathbb {E} \left[ \Pi_ {\Delta , \tau_ {\lambda , T} - 1} \hat {f} (u _ {\tau_ {\lambda , T}}) \right] \leq \overline {{M}} < + \infty , +$$ + +where + +$$ +\begin{array}{l} \overline {{M}} := C _ {2} \mathbb {E} \left[ \sum_ {t = 1} ^ {+ \infty} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} \right] + \mathbb {E} \left[ \sum_ {t = 1} ^ {+ \infty} \sum_ {i = 1} ^ {d} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} | \right] \\ + \left(L _ {f} + 1\right) \mathbb {E} \left[ \sum_ {t = 1} ^ {+ \infty} \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} ^ {2} g _ {t, i} ^ {2} \right]. \\ \end{array} +$$ + +Meanwhile, we observe the following event decomposition + +$$ +\left[ \sup _ {2 \leq t < T} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t}) > \lambda \right] = \bigcup_ {k = 2} ^ {T - 1} [ \tau_ {\lambda} = k ] = \bigcup_ {k = 2} ^ {T - 1} [ \tau_ {\lambda , T} = k ]. +$$ + +Moreover, since for any $j \neq k$ , we have $[\tau_{\lambda, T} = j] \cap [\tau_{\lambda, T} = k] = \emptyset$ , it follows that + +$$ +\begin{array}{l} \mathbb {P} \left[ \sup _ {2 \leq t < T} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t}) > \lambda \right] = \sum_ {k = 2} ^ {T - 1} \mathbb {P} [ \tau_ {\lambda , T} = k ] \stackrel {\text {M a r k o v ' s i n e q u a l i t y}} {\leq} \frac {1}{\lambda} \sum_ {k = 2} ^ {T - 1} \mathbb {E} \left[ \Pi_ {\Delta , k} \hat {f} (u _ {k}) \mathbb {I} _ {[ \tau_ {\lambda , T} = k ]} \right] \\ < \frac {1}{\lambda} \mathbb {E} \left[ \Pi_ {\Delta , \tau_ {\lambda , T} - 1} \hat {f} \left(u _ {\tau_ {\lambda , T}}\right) \right] \leq \frac {\bar {M}}{\lambda}. \tag {45} \\ \end{array} +$$ + +Next, for any $K \geq 1$ , we compute $\mathbb{E}\left[\left(\sup_{2 \leq t < T} \Pi_{\Delta, t - 1} \hat{f}(u_t)\right)^{3/4} \wedge K\right]$ . We have + +$$ +\begin{array}{l} \mathbb {E} \left[ \left(\sup _ {2 \leq t < T} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t})\right) ^ {3 / 4} \wedge K \right] = - \int_ {0} ^ {+ \infty} x d \left(\mathbb {P} \left[ \left(\sup _ {2 \leq t < T} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t})\right) ^ {3 / 4} \wedge K > x \right]\right) \\ = - \int_ {0} ^ {+ \infty} \left(\int_ {0} ^ {x} 1 \mathrm {d} \lambda\right) \mathrm {d} \left(\mathbb {P} \left[ \left(\sup _ {2 \leq t < T} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t})\right) ^ {3 / 4} \wedge K > x \right]\right) \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {F u b i n i \text {s t h e o r e m}} {=} - \int_ {0} ^ {+ \infty} \left( \right.\int_ {\lambda} ^ {+ \infty} 1 d \left( \right.\mathbb {P} \left[ \right.\left.\left(\sup _ {2 \leq t < T} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t})\right) ^ {3 / 4} \wedge K > x \right]\left. \right)\left. \right) d \lambda \\ = \int_ {0} ^ {+ \infty} \mathbb {P} \left[ \left(\sup _ {2 \leq t < T} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t})\right) ^ {3 / 4} \wedge K > \lambda \right] d \lambda \\ \leq 1 + \int_ {1} ^ {+ \infty} \mathbb {P} \left[ \left(\sup _ {2 \leq t < T} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t})\right) ^ {3 / 4} \wedge K > \lambda \right] d \lambda \\ = 1 + \int_ {1} ^ {+ \infty} \mathbb {P} \left[ \left. \sup _ {2 \leq t < T} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t})\right) \wedge K ^ {4 / 3} > \lambda^ {4 / 3} \right] d \lambda \\ < 1 + \int_ {1} ^ {+ \infty} \mathbb {P} \left[ \left(\sup _ {2 \leq t < T} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t})\right) > \lambda^ {4 / 3} \right] d \lambda \\ \end{array} +$$ + +$$ +\begin{array}{l} < ^ {\text {E q .} (4 5)} 1 + \int_ {1} ^ {+ \infty} \frac {\bar {M}}{\lambda^ {4 / 3}} d \lambda \\ = 1 + 3 \bar {M}. \\ \end{array} +$$ + +Next, we take $K \to +\infty$ and apply the Lebesgue's Monotone Convergence theorem, which yield + +$$ +\mathbb {E} \left[ \left(\sup _ {2 \leq t < T} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t})\right) ^ {3 / 4} \right] \leq 1 + 3 \overline {{M}}. +$$ + +By taking $T \to +\infty$ and applying the Lebesgue's Monotone Convergence theorem once again, we obtain + +$$ +\mathbb {E} \left[ \left(\sup _ {t \geq 2} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t})\right) ^ {3 / 4} \right] \leq 1 + 3 \overline {{M}}. +$$ + +Note that for any finite $t$ , we have $\Pi_{\Delta, t+1} \geq \Pi_{\Delta, \infty}$ (where $\Pi_{\Delta, \infty}$ is defined in Lemma D.1). Thus, we have + +$$ +\mathbb {E} \left[ \Pi_ {\Delta , \infty} ^ {3 / 4} \left(\sup _ {t \geq 2} \hat {f} (u _ {t})\right) ^ {3 / 4} \right] \leq \mathbb {E} \left[ \left(\sup _ {t \geq 2} \Pi_ {\Delta , t - 1} \hat {f} (u _ {t})\right) ^ {3 / 4} \right] \leq 1 + 3 \overline {{M}}. +$$ + +Next, by applying Hölder's inequality, we obtain + +$$ +\mathbb {E} \left[ \left(\sup _ {t \geq 2} \hat {f} (u _ {t})\right) ^ {1 / 2} \right] \leq \mathbb {E} ^ {1 / 3} \left[ \Pi_ {\Delta , \infty} ^ {- 3 / 2} \right] \mathbb {E} ^ {2 / 3} \left[ \Pi_ {\Delta , \infty} ^ {3 / 4} \left(\sup _ {t \geq 2} \hat {f} (u _ {t})\right) ^ {3 / 4} \right] \stackrel {{\text {L e m m a}}} {{\leq}} C _ {v, d, 3 / 2} ^ {1 / 3} (1 + 3 \overline {{M}}) ^ {2 / 3}. +$$ + +Then, according to Property 5, we can bound $f(w_{t}) - f^{*}$ using $\hat{f}(u_{t})$ , i.e., + +$$ +\begin{array}{l} f \left(w _ {t}\right) - f ^ {*} \leq \left(L _ {f} + 1\right) \left(f \left(u _ {t}\right) - f ^ {*}\right) + \frac {\left(L _ {f} + 1\right) \beta_ {1} ^ {2}}{2 \left(1 - \beta_ {1}\right) ^ {2}} \left\| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \right\| ^ {2} + L _ {f} f ^ {*} \\ \leq \left(L _ {f} + 1\right) \hat {f} \left(u _ {t}\right) + \frac {\left(L _ {f} + 1\right) \beta_ {1} ^ {2}}{2 \alpha_ {1} \left(1 - \beta_ {1}\right) ^ {2}} + L _ {f} f ^ {*}. \\ \end{array} +$$ + +That means + +$$ +\mathbb {E} \left[ \left(\sup _ {t \geq 2} \left(f (w _ {t}) - f ^ {*}\right)\right) ^ {1 / 2} \right] \leq \sqrt {L _ {f} + 1} C _ {v, d, 3 / 2} ^ {1 / 3} (1 + 3 \overline {{M}}) ^ {2 / 3} + \sqrt {\frac {(L _ {f} + 1) \beta_ {1} ^ {2}}{2 \alpha_ {1} (1 - \beta_ {1}) ^ {2}} + L _ {f} | f ^ {*} |}. +$$ + +Finally, according to Lemma C.2, we obtain + +$$ +\begin{array}{l} \mathbb {E} \left[ \sup _ {t \geq 2} \| \nabla f (w _ {t}) \| \right] \leq \sqrt {2 L _ {f}} \mathbb {E} \left[ \left(\sup _ {t \geq 2} (f (w _ {t}) - f ^ {*})\right) ^ {1 / 2} \right] \\ < \sqrt {2 L _ {f}} \left(\sqrt {L _ {f} + 1} C _ {v, d, 3 / 2} ^ {1 / 3} (1 + 3 \overline {{M}}) ^ {2 / 3} + \sqrt {\frac {(L _ {f} + 1) \beta_ {1} ^ {2}}{2 \alpha_ {1} (1 - \beta_ {1}) ^ {2}} + L _ {f} | f ^ {*} |}\right). \\ \end{array} +$$ + +Adding the first term concludes + +$$ +\begin{array}{l} \mathbb {E} \left[ \sup _ {t \geq 1} \| \nabla f (w _ {t}) \| \right] < \| \nabla f (w _ {1}) \| + \sqrt {2 L _ {f}} \left(\sqrt {L _ {f} + 1} C _ {v, d, 3 / 2} ^ {1 / 3} (1 + 3 \overline {{M}}) ^ {2 / 3} + \sqrt {\frac {(L _ {f} + 1) \beta_ {1} ^ {2}}{2 \alpha_ {1} (1 - \beta_ {1}) ^ {2}} + L _ {f} | f ^ {*} |}\right) \\ < + \infty . \\ \end{array} +$$ + +By combining the almost sure convergence result from Theorem 3.2 with the Lebesgue's Dominated Convergence theorem, we obtain the $L_{1}$ convergence result, namely + +$$ +\lim _ {t \to + \infty} \mathbb {E} [ \| \nabla f (w _ {t}) \| ] = 0. +$$ + +# E. The Proof of Lemma D.2 + +# E.1. Auxiliary Lemmas for Proving Lemma D.2 + +Lemma E.1. For any epoch step $t \geq 1$ , the following inequality holds + +$$ +\left\| m _ {t} \right\| ^ {2} \leq \left(1 - \beta_ {1}\right) \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \left\| g _ {k} \right\| ^ {2}, a n d \left\| \eta_ {v _ {t}} \circ m _ {t} \right\| ^ {2} \leq \left(1 - \beta_ {1}\right) \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \left\| \eta_ {v _ {t}} \circ g _ {k} \right\| ^ {2}. +$$ + +Proof. Due to Property 4, we have + +$$ +\left\| m _ {t} \right\| ^ {2} \leq \beta_ {1} \left\| m _ {t - 1} \right\| ^ {2} + (1 - \beta_ {1}) \left\| g _ {t} \right\| ^ {2}. +$$ + +We multiply $1 / \beta_1^t$ on the both sides of above inequality and obtain + +$$ +\beta_ {1} ^ {- t} \| m _ {t} \| ^ {2} \leq \beta_ {1} ^ {- (t - 1)} \| m _ {t - 1} \| ^ {2} + \beta_ {1} ^ {- t} (1 - \beta_ {1}) \| g _ {t} \| ^ {2}, +$$ + +Iterating the above inequality, we acquire + +$$ +\beta_ {1} ^ {- t} \| m _ {t} \| ^ {2} \leq \| m _ {0} \| ^ {2} + (1 - \beta_ {1}) \sum_ {k = 1} ^ {t} \beta_ {1} ^ {- k} \| g _ {k} \| ^ {2}, +$$ + +that is + +$$ +\left\| m _ {t} \right\| ^ {2} \leq \beta_ {1} ^ {t} \left\| m _ {0} \right\| ^ {2} + (1 - \beta_ {1}) \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \left\| g _ {k} \right\| ^ {2} +$$ + +$$ += (1 - \beta_ {1}) \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \| g _ {k} \| ^ {2}. +$$ + +Similarly, applying the same approach and noting the monotonicity of $\eta_{v_t,i}$ , we obtain + +$$ +\| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2} \leq (1 - \beta_ {1}) \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \| \eta_ {v _ {t}} \circ g _ {k} \| ^ {2}. +$$ + +Lemma E.2. For any $t \geq 1$ and any positive, monotonically decreasing, adapted process $\{Z(t), \mathcal{F}_{t-1}\}$ with $Z(t) \leq 1$ , the following inequality holds + +$$ +\begin{array}{l} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \Delta_ {t, i} Z (t) | \nabla_ {i} f (w _ {t}) m _ {t, i} | \leq \frac {(1 - \beta_ {1}) (1 - \sqrt {\beta_ {1}})}{8} \sum_ {i = 1} ^ {d} \sum_ {k = 1} ^ {n} \eta_ {v _ {k - 1}, i} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} (\nabla_ {i} f (w _ {k})) ^ {2} \\ + D _ {1} \sum_ {k = 1} ^ {n} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} \overline {{\Delta}} _ {\beta_ {1}, k} (f (w _ {k}) - f ^ {*}) \\ + D _ {2} \sum_ {k = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - k} Z (k) \left\| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \right\| ^ {2} \\ + D _ {3} \sum_ {k = 1} ^ {n} Z (k) \left(\sqrt {\beta_ {1}}\right) ^ {n - k} \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k} \\ + \sum_ {k = 1} ^ {n} N _ {n, k}, \\ \end{array} +$$ + +where + +$$ +\overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k} := \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \sum_ {t = k} ^ {+ \infty} (\sqrt {\beta_ {1}}) ^ {t - k} \Delta_ {t, i} \Bigg | \mathcal {F} _ {k - 1} \right], +$$ + +$$ +N _ {n, k} := \sum_ {i = 1} ^ {d} \left(\Delta_ {\sqrt {\beta_ {1}}, k, i} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k, i} | - \mathbb {E} \left[ \Delta_ {\sqrt {\beta_ {1}}, k, i} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k, i} | \mid \mathcal {F} _ {k - 1} \right]\right) +$$ + +$$ +D _ {1} := \frac {2}{1 - \sqrt {\beta_ {1}}} (A + 2 L _ {f} B) (L _ {f} + 1), D _ {2} := \frac {L _ {f}}{1 - \sqrt {\beta_ {1}}}, D _ {3} := \frac {2}{1 - \sqrt {\beta_ {1}}} ((A + 2 L _ {f} B) | f ^ {*} | + C). \tag {46} +$$ + +Proof. Note that + +$$ +\begin{array}{l} | \nabla_ {i} f (w _ {t}) m _ {t, i} | = | \nabla_ {i} f (w _ {t}) (\beta_ {1} m _ {t - 1, i} + (1 - \beta_ {1}) g _ {t, i}) | \leq \beta_ {1} | \nabla_ {i} f (w _ {t}) m _ {t - 1, i} | + (1 - \beta_ {1}) | \nabla_ {i} f (w _ {t}) g _ {t, i} | \\ \leq \beta_ {1} | \nabla_ {i} f (w _ {t - 1}) m _ {t - 1, i} | + \beta_ {1} | (\nabla_ {i} f (w _ {t}) - \nabla_ {i} f (w _ {t - 1})) m _ {t - 1, i} | + (1 - \beta_ {1}) | \nabla_ {i} f (w _ {t}) g _ {t, i} | \\ \mathrm {L} - \mathrm {s m o o t h} \\ \leq \beta_ {1} | \nabla_ {i} f (w _ {t - 1}) m _ {t - 1, i} | + (1 - \beta_ {1}) | \nabla_ {i} f (w _ {t}) g _ {t, i} | + L _ {f} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| | m _ {t - 1, i} |. \\ \end{array} +$$ + +By iterating the above recursive inequality, we obtain + +$$ +| \nabla_ {i} f (w _ {t}) m _ {t, i} | \leq (1 - \beta_ {1}) \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} | \nabla_ {i} f (w _ {k}) g _ {k, i} | + L _ {f} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| | m _ {k - 1, i} |. +$$ + +Then we get that + +$$ +\begin{array}{l} \Delta_ {t, i} Z (t) | \nabla_ {i} f (w _ {t}) m _ {t, i} | \leq (1 - \beta_ {1}) \Delta_ {t, i} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k, i} | \\ + L _ {f} \Delta_ {t, i} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| | m _ {k - 1, i} |. \\ \end{array} +$$ + +Next, we proceed with the calculation. + +$$ +\begin{array}{l} \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \Delta_ {t, i} Z (t) | \nabla_ {i} f (w _ {t}) m _ {t, i} | \leq (1 - \beta_ {1}) \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \Delta_ {t, i} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k, i} | \\ + L _ {f} \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \Delta_ {t, i} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| | m _ {k - 1, i} | \\ = (1 - \beta_ {1}) \sum_ {t = 1} ^ {n} \sum_ {k = 1} ^ {t} (\sqrt {\beta_ {1}}) ^ {n - t} \Delta_ {t, i} \beta_ {1} ^ {t - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k, i} | \\ + L _ {f} \sum_ {t = 1} ^ {n} \sum_ {k = 1} ^ {t} (\sqrt {\beta_ {1}}) ^ {n - t} \Delta_ {t, i} \beta_ {1} ^ {t - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| | m _ {k - 1, i} | \\ = (1 - \beta_ {1}) \sum_ {k = 1} ^ {n} \sum_ {t = k} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \Delta_ {t, i} \beta_ {1} ^ {t - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k, i} | \\ + L _ {f} \sum_ {k = 1} ^ {n} \sum_ {t = k} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \Delta_ {t, i} \beta_ {1} ^ {t - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| | m _ {k - 1, i} \\ = \left(1 - \beta_ {1}\right) \sum_ {k = 1} ^ {n} \left(\sum_ {t = k} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {t - k} \Delta_ {t, i}\right) \left(\sqrt {\beta_ {1}}\right) ^ {n - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k, i} | \\ + L _ {f} \sum_ {k = 1} ^ {n} \left(\sum_ {t = k} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {t - k} \Delta_ {t, i}\right) \left(\sqrt {\beta_ {1}}\right) ^ {n - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| | m _ {k - 1, i} | \\ < (1 - \beta_ {1}) \sum_ {k = 1} ^ {n} \left(\underbrace {\sum_ {t = k} ^ {+ \infty} (\sqrt {\beta_ {1}}) ^ {t - k} \Delta_ {t , i}} _ {\Delta_ {\sqrt {\beta_ {1}}, k, i}}\right) (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k, i} | \\ + \frac {L _ {f}}{1 - (\sqrt {\beta_ {1}})} \sum_ {k = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| | \eta_ {v _ {k - 1}, i} m _ {k - 1, i} | \\ = (1 - \beta_ {1}) \underbrace {\sum_ {k = 1} ^ {n} \Delta_ {\sqrt {\beta_ {1}} , k , i} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k , i} |} _ {\Psi_ {n, i}} \\ + \frac {L _ {f}}{1 - \left(\sqrt {\beta_ {1}}\right)} \sum_ {k = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| \left| \eta_ {v _ {k - 1}, i} m _ {k - 1, i} \right|. \tag {47} \\ \end{array} +$$ + +Next, we estimate $\Psi_{n,i}$ and obtain + +$$ +\begin{array}{l} \Psi_ {n, i} = \sum_ {k = 1} ^ {n} \mathbb {E} \left[ \Delta_ {\sqrt {\beta_ {1}}, k, i} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k, i} | | \mathcal {F} _ {k - 1} \right] \\ + \sum_ {k = 1} ^ {n} \underbrace {\left(\Delta_ {\sqrt {\beta_ {1} , k} , i} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k , i} | - \mathbb {E} \left[ \Delta_ {\sqrt {\beta_ {1}}, k , i} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) | \nabla_ {i} f (w _ {k}) g _ {k , i} | | \mathcal {F} _ {k - 1} \right]\right)} _ {N _ {n, k, i}} \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {A M - G M} {\leq} \frac {1 - \sqrt {\beta_ {1}}}{8} \sum_ {k = 1} ^ {n} \eta_ {v _ {k - 1}, i} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) (\nabla_ {i} f (w _ {k})) ^ {2} \\ + \frac {2}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} \mathbb {E} ^ {2} \left[ \sqrt {\Delta_ {\sqrt {\beta_ {1} , k , i}}} \left(\sqrt {\beta_ {1}}\right) ^ {\frac {n - k}{2}} \sqrt {Z (k)} g _ {k, i} ^ {2} | \mathcal {F} _ {k - 1} \right] + \sum_ {k = 1} ^ {n} N _ {n, k, i} \\ \end{array} +$$ + +$$ +\begin{array}{l} \leq \frac {1 - \sqrt {\beta_ {1}}}{8} \sum_ {k = 1} ^ {n} \eta_ {v _ {k - 1}, i} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} (\nabla_ {i} f (w _ {k})) ^ {2} \\ + \frac {2}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} Z (k) \left(\sqrt {\beta_ {1}}\right) ^ {n - k} \mathbb {E} \left[ \Delta_ {\sqrt {\beta_ {1}}, k, i} \mid \mathcal {F} _ {k - 1} \right] \mathbb {E} \left[ g _ {k, i} ^ {2} \mid \mathcal {F} _ {k - 1} \right] + \sum_ {k = 1} ^ {n} N _ {n, k, i}. \tag {48} \\ \end{array} +$$ + +Summing Equation (47) over the coordinate components $i$ , we obtain + +$$ +\begin{array}{l} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \Delta_ {t, i} Z (t) | \nabla_ {i} f (w _ {t}) m _ {t, i} | \leq (1 - \beta_ {1}) \sum_ {i = 1} ^ {d} \Psi_ {n, i} + L _ {f} \sqrt {d} \sum_ {k = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| ^ {2} \\ \stackrel {\text {E q .} (4 8)} {\leq} \frac {(1 - \beta_ {1}) (1 - \sqrt {\beta_ {1}})}{8} \sum_ {i = 1} ^ {d} \sum_ {k = 1} ^ {n} \eta_ {v _ {k - 1}, i} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} (\nabla_ {i} f (w _ {k})) ^ {2} \\ + \frac {2}{1 - \sqrt {\beta_ {1}}} \sum_ {i = 1} ^ {d} \sum_ {k = 1} ^ {n} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} \mathbb {E} [ \Delta_ {\sqrt {\beta_ {1}}, k, i} | \mathcal {F} _ {k - 1} ] \mathbb {E} [ g _ {k, i} ^ {2} | \mathcal {F} _ {k - 1} ] \\ + \frac {L _ {f}}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| ^ {2} + \underbrace {\sum_ {i = 1} ^ {d} \sum_ {k = 1} ^ {n} N _ {n , k , i}} _ {\sum_ {k = 1} ^ {n} N _ {n, k}} \\ \leq \frac {(1 - \beta_ {1}) (1 - \sqrt {\beta_ {1}})}{8} \sum_ {i = 1} ^ {d} \sum_ {k = 1} ^ {n} \eta_ {v _ {k - 1}, i} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} (\nabla_ {i} f (w _ {k})) ^ {2} \\ + \frac {2}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} \left(\underbrace {\sum_ {i = 1} ^ {d} \mathbb {E} [ \Delta_ {\sqrt {\beta_ {1} , k} , i} | \mathcal {F} _ {k - 1} ]} _ {\overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k}}\right) \mathbb {E} \left[ \| g _ {k} \| ^ {2} | \mathcal {F} _ {k - 1} \right] \\ + \frac {L _ {f}}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| ^ {2} \\ + \sum_ {k = 1} ^ {n} N _ {n, k}. \tag {49} \\ \end{array} +$$ + +Noting that + +$$ +\mathbb {E} \left[ \| g _ {k} \| ^ {2} | \mathcal {F} _ {k - 1} \right] \overset {\text {P r o p e r t y}} {\leq} (A + 2 L _ {f} B) (f (w _ {k}) - f ^ {*}) + C. +$$ + +Using the above inequality to estimate the first term on the right-hand side of Equation (49) yields + +$$ +\begin{array}{l} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \Delta_ {t, i} Z (t) | \nabla_ {i} f (w _ {t}) m _ {t, i} | \leq \frac {1 - \beta_ {1}}{8} \sum_ {i = 1} ^ {d} \sum_ {k = 1} ^ {n} \eta_ {v _ {k - 1}, i} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} (\nabla_ {i} f (w _ {k})) ^ {2} \\ + D _ {1} \sum_ {k = 1} ^ {n} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} \overline {{\Delta}} _ {\beta_ {1}, k} (f (w _ {k}) - f ^ {*}) \\ + D _ {2} \sum_ {k = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| ^ {2} \\ + D _ {3} \sum_ {k = 1} ^ {n} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k} \\ + \sum_ {k = 1} ^ {n} N _ {n, k}, \\ \end{array} +$$ + +where + +$$ +D _ {1} := \frac {2}{1 - \sqrt {\beta_ {1}}} (A + 2 L _ {f} B) (L _ {f} + 1), D _ {2} := \frac {L _ {f}}{1 - \sqrt {\beta_ {1}}}, D _ {3} := \frac {2}{1 - \sqrt {\beta_ {1}}} ((A + 2 L _ {f} B) | f ^ {*} | + C). +$$ + +Lemma E.3. For any $t \geq 1$ , $\varphi > 0$ and any positive, monotonically decreasing, adapted process $\{Z(t), \mathcal{F}_{t-1}\}$ with $Z(t) \leq 1$ , $Z(t-1) - Z(t) \leq \varphi \overline{\Delta}_{\sqrt{\beta_1}, t} Z(t) (\forall t \geq 1)$ , the following inequality holds. + +$$ +\begin{array}{l} - \sum_ {t = 1} ^ {n} \sqrt {\beta_ {1}} ^ {n - t} \sum_ {i = 1} ^ {d} Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) m _ {t, i} \leq - \frac {3 (1 - \beta_ {1})}{8} \sum_ {i = 1} ^ {d} \sum_ {k = 1} ^ {n} \eta_ {v _ {k - 1}, i} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} (\nabla_ {i} f (w _ {k})) ^ {2} \\ + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \sum_ {k = 1} ^ {n} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} \overline {{\Delta}} _ {\beta_ {1}, k} (f (w _ {k}) - f ^ {*}) \\ + \frac {D _ {2} + F _ {1}}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - k} \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| ^ {2} \\ + \frac {D _ {3}}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k} \\ + \frac {1}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} N _ {n, k} \\ + \sum_ {t = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} M _ {k, 1, i} ^ {\prime}, \tag {50} \\ \end{array} +$$ + +where + +$$ +M _ {k, 1, i} ^ {\prime} := \left(1 - \beta_ {1}\right) Z (k) \eta_ {v _ {k - 1}, i} \nabla_ {i} f \left(w _ {k}\right) \left(\nabla_ {i} f \left(w _ {k}\right) - g _ {k, i}\right), +$$ + +and $N_{n,k}$ is defined in Lemma E.2. + +Proof. According to the update rule of the Adam algorithm (Equation (2.1)), we derive the following recursive formula + +$$ +\begin{array}{l} - Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) m _ {t, i} = - \beta_ {1} Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) m _ {t - 1, i} + Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) \left(\beta_ {1} m _ {t - 1, i} - m _ {t, i}\right) \\ = - \beta_ {1} Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) m _ {t - 1, i} - (1 - \beta_ {1}) Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) g _ {t, i} \\ = - \beta_ {1} \left(\eta_ {v _ {t}, i} Z (t) - \eta_ {v _ {t - 1}, i} Z (t - 1)\right) f (w _ {t}) m _ {t - 1, i} \\ - \beta_ {1} Z (t - 1) \eta_ {v _ {t - 1}, i} \nabla_ {i} f (w _ {t}) m _ {t - 1, i} - (1 - \beta_ {1}) Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) g _ {t, i} \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {(a)} {\leq} - \beta_ {1} \left(\eta_ {v _ {t}, i} - \eta_ {v _ {t - 1}, i}\right) Z (t) \nabla_ {i} f \left(w _ {t}\right) m _ {t - 1, i} \\ + (Z (t - 1) - Z (t)) \eta_ {v _ {t - 1}, i} | \nabla_ {i} f (w _ {t}) m _ {t - 1, i} | \\ - \beta_ {1} Z (t - 1) \eta_ {v _ {t - 1}, i} \nabla_ {i} f (w _ {t - 1}) m _ {t - 1, i} - (1 - \beta_ {1}) Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) g _ {t, i} \\ + \beta_ {1} Z (t - 1) \eta_ {v _ {t - 1}, i} | \nabla_ {i} f (w _ {t}) - \nabla_ {i} f (w _ {t - 1}) | m _ {t - 1, i} \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {(b)} {\leq} \underbrace {\beta_ {1} \Delta_ {t , i} Z (t) \nabla_ {i} f (w _ {t}) m _ {t - 1 , i} + (1 - \beta_ {i}) \Delta_ {t , i} Z (t) \nabla_ {i} f (w _ {t}) g _ {t , i}} _ {= \Delta_ {t, i} Z (t) \nabla_ {i} f (w _ {t}) m _ {t, i}} \\ + \varphi Z (t) \bar {\Delta} _ {\sqrt {\beta_ {1}}, t} \eta_ {v _ {t - 1}, i} | \nabla_ {i} f (w _ {t}) m _ {t - 1, i} | \\ - \beta_ {1} Z (t - 1) \eta_ {v _ {t - 1}, i} \nabla_ {i} f (w _ {t - 1}) m _ {t - 1, i} - (1 - \beta_ {1}) Z (t) \eta_ {v _ {t - 1}, i} \nabla_ {i} f (w _ {t}) g _ {t, i} \\ + L _ {f} \left\| \eta_ {v t - 1} \circ m _ {t - 1} \right\| \left\| \eta_ {v t - 1, i} m _ {t - 1, i} \right\| \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {(c)} {\leq} \Delta_ {t, i} Z (t) | \nabla_ {i} f (w _ {t}) m _ {t, i} | \\ + \frac {1}{2 L _ {f}} Z (t) \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, t} \left(\nabla_ {i} f \left(w _ {t}\right)\right) ^ {2} + \frac {\varphi^ {2} L _ {f}}{2 \sqrt {v}} \eta_ {v _ {t - 1}, i} ^ {2} m _ {t - 1, i} ^ {2} \\ - \beta_ {1} Z (t - 1) \eta_ {v _ {t - 1}, i} \nabla_ {i} f (w _ {t - 1}) m _ {t - 1, i} - (1 - \beta_ {1}) Z (t) \eta_ {v _ {t - 1}, i} (\nabla_ {i} f (w _ {t})) ^ {2} \\ \end{array} +$$ + +$$ +\begin{array}{l} + L _ {f} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| | \eta_ {v _ {t - 1}, i} m _ {t - 1, i} | \\ + \underbrace {(1 - \beta_ {1}) Z (t) \eta_ {v _ {t - 1} , i} \nabla_ {i} f (w _ {t}) (\nabla_ {i} f (w _ {t}) - g _ {t , i})} _ {M _ {t, 1, i} ^ {\prime}}. \\ \end{array} +$$ + +In step $(a)$ , we apply the following substitution + +$$ +\eta_ {v _ {t}, i} Z (t) - \eta_ {v _ {t - 1}, i} Z (t - 1) = (\eta_ {v _ {t}, i} - \eta_ {v _ {t - 1}, i}) Z (t) - \eta_ {v _ {t - 1}, i} (Z (t) - Z (t - 1)). +$$ + +In step $(b)$ , we first apply a transformation to the fourth term from the previous step, denoted by + +$$ +- (1 - \beta_ {1}) Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) g _ {t, i} = - (1 - \beta_ {1}) Z (t) \eta_ {v _ {t - 1}, i} \nabla_ {i} f (w _ {t}) g _ {t, i} + (1 - \beta_ {1}) \Delta_ {t, i} Z (t) \nabla_ {i} f (w _ {t}) g _ {t, i}. +$$ + +Next, we combine the second term of this transformation with the first term from the prior step of Step $(b)$ in order to obtain + +$$ +\beta_ {1} \Delta_ {t, i} Z (t) \nabla_ {i} f (w _ {t}) m _ {t, i}. +$$ + +We then use the inequality $Z(t - 1) - Z(t) \leq \varphi \overline{\Delta}_{\sqrt{\beta_1}, t} Z(t)$ . + +Finally, in step $(c)$ , we begin by applying an absolute value bound to the first term from the previous step: + +$$ +\beta_ {1} \Delta_ {t, i} Z (t) \nabla_ {i} f (w _ {t}) m _ {t, i} \leq \beta_ {1} \Delta_ {t, i} Z (t) | \nabla_ {i} f (w _ {t}) m _ {t, i} |. +$$ + +Next, for the second term in the previous step, we use the following application of the AM-GM inequality + +$$ +\varphi Z (t) \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, t} \eta_ {v _ {t - 1}, i} | \nabla_ {i} f (w _ {t}) m _ {t - 1, i} | \leq \frac {1}{2 L _ {f}} Z (t) \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, t} (\nabla_ {i} f (w _ {t})) ^ {2} + \frac {\varphi^ {2} L _ {f}}{2 \sqrt {v}} \eta_ {v _ {t - 1}, i} ^ {2} m _ {t - 1, i} ^ {2}. +$$ + +Summing both sides of the above inequality over the coordinate components $i$ and applying the arithmetic mean inequality, we obtain + +$$ +\begin{array}{l} - \sum_ {i = 1} ^ {d} Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) m _ {t, i} \leq \beta_ {1} \sum_ {i = 1} ^ {d} - Z (t - 1) \eta_ {v _ {t - 1}, i} \nabla_ {i} f (w _ {t - 1}) m _ {t - 1, i} + \frac {1}{2 L _ {f}} Z (t) \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, t} \| \nabla f (w _ {t}) \| ^ {2} \\ + \sum_ {i = 1} ^ {d} \Delta_ {t, i} Z (t) | \nabla_ {i} f (w _ {t}) m _ {t, i} | + F _ {1} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} + \sum_ {i = 1} ^ {d} M _ {t, 1, i} ^ {\prime} \\ - \left(1 - \beta_ {1}\right) \sum_ {i = 1} ^ {d} Z (t) \eta_ {v _ {t - 1}, i} \left(\nabla_ {i} f \left(w _ {t}\right)\right) ^ {2} \\ \stackrel {\text {L e m m a C . 2}} {\leq} \beta_ {1} \sum_ {i = 1} ^ {d} - Z (t - 1) \eta_ {v _ {t - 1}, i} \nabla_ {i} f (w _ {t - 1}) m _ {t - 1, i} + Z (t) \bar {\Delta} _ {\sqrt {\beta_ {1}}, t} \left(f (w _ {t}) - f ^ {*}\right) \\ + \sum_ {i = 1} ^ {d} \Delta_ {t, i} Z (t) | \nabla_ {i} f (w _ {t}) m _ {t, i} | + F _ {1} \| \eta_ {v _ {t - 1}} \circ m _ {t - 1} \| ^ {2} + \sum_ {i = 1} ^ {d} M _ {t, 1, i} ^ {\prime} \\ - \left(1 - \beta_ {1}\right) \sum_ {i = 1} ^ {d} Z (t) \eta_ {v _ {t - 1}, i} \left(\nabla_ {i} f (w _ {t})\right) ^ {2}, \\ \end{array} +$$ + +where + +$$ +F _ {1} := \sqrt {d} L _ {f} + \frac {k ^ {2} L _ {f}}{2 \sqrt {v}}. +$$ + +By iterating the above inequality, we obtain + +$$ +- \sum_ {i = 1} ^ {d} Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) m _ {t, i} \leq \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \sum_ {i = 1} ^ {d} \Delta_ {k, i} Z (k) | \nabla_ {i} f (w _ {k}) m _ {k, i} | + \sum_ {i = 1} ^ {d} Z (t) \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, t} (f (w _ {t}) - f ^ {*}) +$$ + +$$ +\begin{array}{l} + F _ {1} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| ^ {2} + \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} M _ {k, 1, i} ^ {\prime} \\ - \left(1 - \beta_ {1}\right) \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} Z (k) \eta_ {v _ {k - 1}, i} \left(\nabla_ {i} f (w _ {k})\right) ^ {2}. \\ \end{array} +$$ + +We further obtain + +$$ +\begin{array}{l} - \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \sum_ {i = 1} ^ {d} Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) m _ {t, i} \leq \sum_ {t = 1} ^ {n} \sqrt {\beta_ {1}} ^ {n - t} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \sum_ {i = 1} ^ {d} \Delta_ {k, i} Z (k) | \nabla_ {i} f (w _ {k}) m _ {k, i} | \\ + F _ {1} \sum_ {t = 1} ^ {n} \sqrt {\beta_ {1}} ^ {n - t} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| ^ {2} \\ + \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} M _ {k, 1, i} ^ {\prime} \\ + \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \sum_ {i = 1} ^ {d} Z (t) \Delta_ {\sqrt {\beta_ {1}}, t} (f (w _ {t}) - f ^ {*}) \\ - \left(1 - \beta_ {1}\right) \sum_ {t = 1} ^ {n} \sqrt {\beta_ {1}} ^ {n - t} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} Z (k) \eta_ {v _ {k - 1}, i} \left(\nabla_ {i} f \left(w _ {k}\right)\right) ^ {2} \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {\text {L e m m a C . 1}} {\leq} \underbrace {\frac {1}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - k} \Delta_ {k , i} Z (k) | \nabla_ {i} f (w _ {k}) m _ {k , i} |} _ {\Phi_ {n, 1}} \\ + \frac {F _ {1}}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - k} \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| ^ {2} \\ + \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} M _ {k, 1, i} ^ {\prime} \\ + \sum_ {t = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \sum_ {i = 1} ^ {d} Z (t) \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, t} \left(f \left(w _ {t}\right) - f ^ {*}\right) \\ - \left(1 - \beta_ {1}\right) \sum_ {k = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - k} Z (k) \eta_ {v _ {k - 1}, i} \left(\nabla_ {i} f \left(w _ {k}\right)\right) ^ {2}. \tag {51} \\ \end{array} +$$ + +Now, we focus on estimating the term $\Phi_{n,1}$ . By applying Lemma E.2, we obtain + +$$ +\begin{array}{l} \frac {1}{1 - \sqrt {\beta_ {1}}} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \Delta_ {t, i} Z (t) | \nabla_ {i} f (w _ {t}) m _ {t, i} | \leq \frac {1 - \beta_ {1}}{8} \sum_ {i = 1} ^ {d} \sum_ {k = 1} ^ {n} \eta_ {v _ {k - 1}, i} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} (\nabla_ {i} f (w _ {k})) ^ {2} \\ + \frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} \overline {{\Delta}} _ {\beta_ {1}, k} (f (w _ {k}) - f ^ {*}) \\ + \frac {D _ {2}}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - k} Z (k) \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| ^ {2} \\ + \frac {D _ {3}}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k} \\ + \frac {1}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} N _ {n, k}, \\ \end{array} +$$ + +where $D_{1}$ , $D_{2}$ , $D_{3}$ , $\overline{\Delta}_{\sqrt{\beta_{1}},k}$ are defined in Equation (46). Substituting the above estimate for $\Phi_{n,1}$ back into Equation (51), we obtain + +$$ +\begin{array}{l} - \sum_ {t = 1} ^ {n} \sqrt {\beta_ {1}} ^ {n - t} \sum_ {i = 1} ^ {d} Z (t) \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) m _ {t, i} \leq - \frac {3 (1 - \beta_ {1})}{8} \sum_ {i = 1} ^ {d} \sum_ {k = 1} ^ {n} \eta_ {v _ {k - 1}, i} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} (\nabla_ {i} f (w _ {k})) ^ {2} \\ + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \sum_ {k = 1} ^ {n} Z (k) (\sqrt {\beta_ {1}}) ^ {n - k} \overline {{\Delta}} _ {\beta_ {1}, k} (f (w _ {k}) - f ^ {*}) \\ + \frac {D _ {2} + F _ {1}}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - k} \| \eta_ {v _ {k - 1}} \circ m _ {k - 1} \| ^ {2} \\ + \frac {D _ {3}}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} Z (k) \left(\sqrt {\beta_ {1}}\right) ^ {n - k} \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k} \\ + \frac {1}{1 - \sqrt {\beta_ {1}}} \sum_ {k = 1} ^ {n} N _ {n, k} \\ + \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} M _ {k, 1, i} ^ {\prime}. \\ \end{array} +$$ + +# E.2. Proof of Lemma D.2 + +Proof. First, we compute $f(w_{t + 1}) - f(w_t)$ . Based on the $L$ -smoothness condition, we make the following estimate + +$$ +\begin{array}{l} f (w _ {t + 1}) - f (w _ {t}) \leq \nabla f (w _ {t}) ^ {\top} (w _ {t + 1} - w _ {t}) + \frac {L _ {f}}{2} \| w _ {t + 1} - w _ {t} \| ^ {2} \\ = - \sum_ {i = 1} ^ {d} \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) m _ {t, i} + \frac {L _ {f}}{2} \| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2}. \tag {52} \\ \end{array} +$$ + +Next, we construct $\Pi_{\Delta ,t}$ , which is defined as follows + +$$ +\Pi_ {\Delta , t} := \prod_ {k = 1} ^ {t} \left(1 + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k}\right) ^ {- 1} (t \geq 1), \Pi_ {\Delta , 0} := 1, +$$ + +where $D_{1},\overline{\Delta}_{\sqrt{\beta_{1},k}}$ are defined in Equation (46). Note that the $\Pi_{\Delta ,t}$ here is a specific $Z(t)$ used in Lemma E.2 and Lemma E.3 with $\varphi = \frac{D_1}{1 - \sqrt{\beta_1}} +1$ . We can subsequently apply the results from Lemma E.2 and Lemma E.3. We multiply both sides of Equation (52) by this specific $\Pi_{\Delta ,t}$ and, noting its monotonically decreasing property, we obtain + +$$ +\Pi_ {\Delta , t + 1} (f (w _ {t + 1}) - f ^ {*}) - \Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*}) \leq - \sum_ {i = 1} ^ {d} \Pi_ {\Delta , t} \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) m _ {t, i} + \frac {L _ {f}}{2} \| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2}. +$$ + +Next, we compute + +$$ +\sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \left(\Pi_ {\Delta , t + 1} (f (w _ {t + 1}) - f ^ {*}) - \Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*})\right). +$$ + +We have + +$$ +\begin{array}{l} \sum_ {t = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \left(\Pi_ {\Delta , t + 1} \left(f \left(w _ {t + 1}\right) - f ^ {*}\right) - \Pi_ {\Delta , t} \left(f \left(w _ {t}\right) - f ^ {*}\right)\right) \\ \leq - \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \sum_ {i = 1} ^ {d} \Pi_ {\Delta , t} \eta_ {v _ {t}, i} \nabla_ {i} f (w _ {t}) m _ {t, i} + \frac {L _ {f}}{2} \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \sum_ {i = 1} ^ {d} \| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2} \\ \stackrel {\text {L e m m a E . 3}} {\leq} - \frac {3 (1 - \beta_ {1})}{8} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {n} \eta_ {v _ {t - 1}, i} \Pi_ {\Delta , t} (\sqrt {\beta_ {1}}) ^ {n - t} (\nabla_ {i} f (w _ {t})) ^ {2} \\ \end{array} +$$ + +$$ +\begin{array}{l} + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \sum_ {t = 1} ^ {n} \Pi_ {\Delta , t} (\sqrt {\beta_ {1}}) ^ {n - t} \overline {{\Delta}} _ {\beta_ {1}, t} (f (w _ {t}) - f ^ {*}) \\ + \left(\frac {D _ {2} + F _ {1}}{\sqrt {\beta_ {1}} (1 - \sqrt {\beta_ {1}})} + \frac {L _ {f}}{2}\right) \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2} \\ + \frac {D _ {3}}{1 - \sqrt {\beta_ {1}}} \sum_ {t = 1} ^ {n} \Pi_ {\Delta , t} (\sqrt {\beta_ {1}}) ^ {n - t} \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k} + \frac {1}{1 - \sqrt {\beta_ {1}}} \sum_ {t = 1} ^ {n} N _ {n, t} \\ + \sum_ {t = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} M _ {k, 1, i} ^ {\prime}. \tag {53} \\ \end{array} +$$ + +We then observe that the left side of the above inequality can be rewritten as + +$$ +\begin{array}{l} \sum_ {t = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \left(\Pi_ {\Delta , t + 1} \left(f \left(w _ {t + 1}\right) - f ^ {*}\right) - \Pi_ {\Delta , t} \left(f \left(w _ {t}\right) - f ^ {*}\right)\right) \\ = \sum_ {t = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \Pi_ {\Delta , t + 1} \left(f \left(w _ {t + 1}\right) - f ^ {*}\right) - \sum_ {t = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \Pi_ {\Delta , t} \left(f \left(w _ {t}\right) - f ^ {*}\right) \\ = \sum_ {t = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {(n + 1) - (t + 1)} \Pi_ {\Delta , t + 1} \left(f \left(w _ {t + 1}\right) - f ^ {*}\right) - \sum_ {t = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \Pi_ {\Delta , t} \left(f \left(w _ {t}\right) - f ^ {*}\right) \\ = \sum_ {t = 2} ^ {n + 1} \left(\sqrt {\beta_ {1}}\right) ^ {(n + 1) - t} \Pi_ {\Delta , t} \left(f \left(w _ {t}\right) - f ^ {*}\right) - \sum_ {t = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \Pi_ {\Delta , t} \left(f \left(w _ {t}\right) - f ^ {*}\right) \\ = - \left(\sqrt {\beta_ {1}}\right) ^ {n} \left(f \left(w _ {1}\right) - f ^ {*}\right) \\ + \underbrace {\sum_ {t = 1} ^ {n + 1} (\sqrt {\beta_ {1}}) ^ {(n + 1) - t} \Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*})} _ {F _ {n + 1}} - \underbrace {\sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*})} _ {F _ {n} ^ {\prime}}. \\ \end{array} +$$ + +Substituting the above transformation back to Equation (53), we obtain + +$$ +\begin{array}{l} F _ {n + 1} - \left(F _ {n} ^ {\prime} + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \sum_ {t = 1} ^ {n} \Pi_ {\Delta , t} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \overline {{\Delta}} _ {\beta_ {1}, t} (f (w _ {t}) - f ^ {*})\right) \\ \leq (\sqrt {\beta_ {1}}) ^ {n} (f (w _ {1}) - f ^ {*}) - \frac {3 (1 - \beta_ {1})}{8} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {n} \eta_ {v _ {t - 1}, i} \Pi_ {\Delta , t} (\sqrt {\beta_ {1}}) ^ {n - t} (\nabla_ {i} f (w _ {t})) ^ {2} \\ + \left(\frac {D _ {2} + F _ {1}}{\sqrt {\beta_ {1}} (1 - \sqrt {\beta_ {1}})} + \frac {L _ {f}}{2}\right) \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2} \\ + \frac {D _ {3}}{1 - \sqrt {\beta_ {1}}} \sum_ {t = 1} ^ {n} \Pi_ {\Delta , t} (\sqrt {\beta_ {1}}) ^ {n - t} \bar {\Delta} _ {\sqrt {\beta_ {1}}, k} + \frac {1}{1 - \sqrt {\beta_ {1}}} \sum_ {t = 1} ^ {n} N _ {n, t} \\ + \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} M _ {k, 1, i} ^ {\prime}. \\ \end{array} +$$ + +Observe that + +$$ +\begin{array}{l} F _ {n} ^ {\prime} + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \sum_ {t = 1} ^ {n} \Pi_ {\Delta , t} (\sqrt {\beta_ {1}}) ^ {n - t} \overline {{\Delta}} _ {\beta_ {1}, t} (f (w _ {t}) - f ^ {*}) \\ = \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \left(1 + \left(\frac {D _ {1}}{1 - \sqrt {\beta_ {1}}} + 1\right) \overline {{\Delta}} _ {\beta_ {1}, t}\right) \Pi_ {\Delta , t} (f (w _ {t}) - f ^ {*}) \\ \end{array} +$$ + +$$ += \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \Pi_ {\Delta , t - 1} (f (w _ {t}) - f ^ {*}) = F _ {n}. +$$ + +We get + +$$ +\begin{array}{l} F _ {n + 1} - F _ {n} \\ \leq \left(\sqrt {\beta_ {1}}\right) ^ {n} \left(f \left(w _ {1}\right) - f ^ {*}\right) - \frac {3 \left(1 - \beta_ {1}\right)}{8} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {n} \eta_ {v _ {t - 1}, i} \Pi_ {\Delta , t} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \left(\nabla_ {i} f \left(w _ {t}\right)\right) ^ {2} \\ + \left(\frac {D _ {2} + F _ {1}}{\sqrt {\beta_ {1}} (1 - \sqrt {\beta_ {1}})} + \frac {L _ {f}}{2}\right) \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2} \\ + \frac {D _ {3}}{1 - \sqrt {\beta_ {1}}} \sum_ {t = 1} ^ {n} \Pi_ {\Delta , t} (\sqrt {\beta_ {1}}) ^ {n - t} \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k} + \frac {1}{1 - \sqrt {\beta_ {1}}} \sum_ {t = 1} ^ {n} N _ {n, t} \\ + \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} M _ {k, 1, i} ^ {\prime}. \\ \end{array} +$$ + +Next, we take the expectation on both sides of the above inequality and note that $\mathbb{E}[N_{n,t}] = \mathbb{E}[M_{k,1,i}^{\prime}] = 0$ . We then obtain + +$$ +\begin{array}{l} \mathbb {E} \left[ F _ {n + 1} \right] - \mathbb {E} \left[ F _ {n} \right] \\ \leq (\sqrt {\beta_ {1}}) ^ {n} (f (w _ {1}) - f ^ {*}) - \frac {3 (1 - \beta_ {1})}{8} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \mathbb {E} \left[ \eta_ {v _ {t - 1}, i} \Pi_ {\Delta , t} (\nabla_ {i} f (w _ {t})) ^ {2} \right] \\ + \left(\frac {D _ {2} + F _ {1}}{\sqrt {\beta_ {1}} (1 - \sqrt {\beta_ {1}})} + \frac {L _ {f}}{2}\right) \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \mathbb {E} \left[ \| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2} \right] \\ + \frac {D _ {3}}{1 - \sqrt {\beta_ {1}}} \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \mathbb {E} \left[ \overline {{\Delta}} _ {\sqrt {\beta_ {1}}, k} \right] + 0 + 0. \\ \end{array} +$$ + +Summing both sides of the above inequality over the index $n$ from 1 to $T$ , we obtain + +$$ +\begin{array}{l} \mathbb {E} \left[ F _ {T + 1} \right] - \mathbb {E} \left[ F _ {1} \right] \\ \leq \frac {1}{1 - \sqrt {\beta_ {1}}} (f (w _ {1}) - f ^ {*}) - \frac {3 (1 - \beta_ {1})}{8} \sum_ {n = 1} ^ {T} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \mathbb {E} \left[ \eta_ {v _ {t - 1}, i} \Pi_ {\Delta , t} (\nabla_ {i} f (w _ {t})) ^ {2} \right] \\ + \left(\frac {D _ {2} + F _ {1}}{\sqrt {\beta_ {1}} (1 - \sqrt {\beta_ {1}})} + \frac {L _ {f}}{2}\right) \sum_ {n = 1} ^ {T} \sum_ {t = 1} ^ {n} (\sqrt {\beta_ {1}}) ^ {n - t} \mathbb {E} \left[ \| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2} \right] \\ + \frac {D _ {3}}{1 - \sqrt {\beta_ {1}}} \sum_ {n = 1} ^ {T} \sum_ {t = 1} ^ {n} \left(\sqrt {\beta_ {1}}\right) ^ {n - t} \mathbb {E} \left[ \bar {\Delta} _ {\sqrt {\beta_ {1}}, k} \right] \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {\text {L e m m a C . 1}} {\leq} \frac {1}{1 - \sqrt {\beta_ {1}}} (f (w _ {1}) - f ^ {*}) - \frac {3 (1 - \beta_ {1})}{8} \sum_ {n = 1} ^ {T} \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \eta_ {v _ {n - 1}, i} \Pi_ {\Delta , n} (\nabla_ {i} f (w _ {n})) ^ {2} \right] \\ + \frac {1}{1 - \sqrt {\beta_ {1}}} \left(\frac {D _ {2} + F _ {1}}{\sqrt {\beta_ {1}} (1 - \sqrt {\beta_ {1}})} + \frac {L _ {f}}{2}\right) \sum_ {n = 1} ^ {T} \mathbb {E} \left[ \| \eta_ {v _ {n}} \circ m _ {n} \| ^ {2} \right] + \frac {D _ {3}}{\sqrt {v} (1 - \sqrt {\beta_ {1}}) ^ {2}}. \\ \end{array} +$$ + +To maintain consistency with the notation in the subsequent proofs, we replace the index $n$ with $t$ in the summation $\sum_{n=1}^{T}$ on the right side of the above inequality as follows. + +$$ +\begin{array}{l} \mathbb {E} \left[ F _ {T + 1} \right] - \mathbb {E} \left[ F _ {1} \right] \\ \stackrel {\text {L e m m a}} {\leq} \frac {1}{1 - \sqrt {\beta_ {1}}} (f (w _ {1}) - f ^ {*}) - \frac {3 (1 - \beta_ {1})}{8} \sum_ {t = 1} ^ {T} \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \eta_ {v _ {t - 1}, i} \Pi_ {\Delta , t} (\nabla_ {i} f (w _ {t})) ^ {2} \right] \\ \end{array} +$$ + +$$ ++ \frac {1}{1 - \sqrt {\beta_ {1}}} \left(\frac {D _ {2} + F _ {1}}{\sqrt {\beta_ {1}} (1 - \sqrt {\beta_ {1}})} + \frac {L _ {f}}{2}\right) \sum_ {t = 1} ^ {T} \mathbb {E} \left[ \| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2} \right] + \frac {D _ {3}}{\sqrt {v} (1 - \sqrt {\beta_ {1}}) ^ {2}}. \tag {54} +$$ + +Using Lemma E.1, we can transform the third term on the right side of the above inequality as follows + +$$ +\sum_ {t = 1} ^ {T} \mathbb {E} \left[ \| \eta_ {v _ {t}} \circ m _ {t} \| ^ {2} \right] \leq (1 - \beta_ {1}) \sum_ {t = 1} ^ {T} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \mathbb {E} \left\| \eta_ {v _ {t}} \circ g _ {k} \right\| ^ {2} \overset {\mathrm {L e m m a}} {\leq} \sum_ {t = 1} ^ {T} \mathbb {E} \left\| \eta_ {v _ {t}} \circ g _ {t} \right\| ^ {2}. +$$ + +Substituting this back into Equation (54) and rearranging the terms, we obtain the following two inequalities. + +$$ +\begin{array}{l} \mathbb {E} \left[ \Pi_ {\Delta , t} \left(f \left(w _ {t}\right) - f ^ {*}\right) \right] \leq \mathbb {E} \left[ F _ {1} \right] + \frac {1}{1 - \sqrt {\beta_ {1}}} \left(f \left(w _ {1}\right) - f ^ {*}\right) + \frac {D _ {3}}{\sqrt {v} \left(1 - \sqrt {\beta_ {1}}\right) ^ {2}} \\ + \frac {1}{1 - \sqrt {\beta_ {1}}} \left(\frac {D _ {2} + F _ {1}}{\sqrt {\beta_ {1}} \left(1 - \sqrt {\beta_ {1}}\right)} + \frac {L _ {f}}{2}\right) \sum_ {t = 1} ^ {T} \mathbb {E} \| \eta_ {v _ {t}} \circ g _ {t} \| ^ {2}, \tag {55} \\ \end{array} +$$ + +and + +$$ +\begin{array}{l} \sum_ {t = 1} ^ {T} \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \eta_ {v _ {t - 1}, i} \Pi_ {\Delta , t} (\nabla_ {i} f (w _ {t})) ^ {2} \right] \leq \frac {8}{3 (1 - \beta_ {1})} \mathbb {E} [ F _ {1} ] + \frac {8}{3 (1 - \beta_ {1})} \frac {1}{1 - \sqrt {\beta_ {1}}} (f (w _ {1}) - f ^ {*}) \\ + \frac {D _ {3}}{\sqrt {v} (1 - \sqrt {\beta_ {1}}) ^ {2}} + \frac {8}{(1 - \sqrt {\beta_ {1}}) 3 (1 - \beta_ {1})} \left(\frac {D _ {2} + F _ {1}}{\sqrt {\beta_ {1}} (1 - \sqrt {\beta_ {1}})} + \frac {L _ {f}}{2}\right) \sum_ {t = 1} ^ {T} \mathbb {E} \| \eta_ {v _ {t}} \circ g _ {t} \| ^ {2}. \tag {56} \\ \end{array} +$$ + +Next, we proceed to estimate + +$$ +\sum_ {t = 1} ^ {T} \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \Pi_ {\Delta , t} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} \right]. +$$ + +We have + +$$ +\sum_ {t = 1} ^ {T} \sum_ {i = 1} ^ {d} \mathbb {E} \left[ \Pi_ {\Delta , t} \Delta_ {t, i} | \nabla_ {i} f (u _ {t}) m _ {t - 1, i} \right] +$$ + +$$ +\begin{array}{l} \underset {\leq} {C a u c h y - S c h w a r z \text {i n e q u a l i t y}} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {T} \sqrt {\mathbb {E} \left[ \Delta_ {t , i} ^ {2} \Pi_ {\Delta , t} (\nabla_ {i} f (u _ {t})) ^ {2} \right]} \cdot \sqrt {\mathbb {E} \left[ \Pi_ {\Delta , t} m _ {t - 1 , i} \right]} \\ \leq \frac {1}{\sqrt {v}} \sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {T} \sqrt {\mathbb {E} \left[ \eta_ {v _ {t - 1} , i} \Pi_ {\Delta , t} (\nabla_ {i} f (u _ {t})) ^ {2} \right]} \cdot \sqrt {\mathbb {E} \left[ \Pi_ {\Delta , t} m _ {t - 1 , i} ^ {2} \right]} \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {\text {C a u c h y - S c h w a r z i n e q u a l i t y}} {\leq} \frac {1}{\sqrt {v}} \sum_ {i = 1} ^ {d} \sqrt {\sum_ {t = 1} ^ {T} \mathbb {E} \left[ \eta_ {v _ {t - 1} , i} \Pi_ {\Delta , t} (\nabla_ {i} f (u _ {t})) ^ {2} \right]} \cdot \sqrt {\sum_ {t = 1} ^ {T} \mathbb {E} \left[ \Pi_ {\Delta , t} m _ {t - 1 , i} ^ {2} \right]} \\ \stackrel {\text {C a u c h y - S c h w a r z i n e q u a l i t y}} {\leq} \frac {1}{\sqrt {v}} \sqrt {\sum_ {i = 1} ^ {d} \sum_ {t = 1} ^ {T} \mathbb {E} \left[ \eta_ {v _ {t - 1} , i} \Pi_ {\Delta , t} (\nabla_ {i} f (u _ {t})) ^ {2} \right]} \cdot \sqrt {\sum_ {t = 1} ^ {T} \mathbb {E} \left[ \Pi_ {\Delta , t} \| m _ {t - 1} \| ^ {2} \right]} \\ \stackrel {\text {L e m m a E . 1}} {\leq} \frac {\sqrt {1 - \beta_ {1}}}{\sqrt {v}} \sum_ {i = 1} ^ {d} \sqrt {\sum_ {t = 1} ^ {T} \mathbb {E} \left[ \eta_ {v _ {t - 1} , i} \Pi_ {\Delta , t} (\nabla_ {i} f (u _ {t})) ^ {2} \right]} \cdot \sqrt {\sum_ {t = 1} ^ {T} \sum_ {k = 1} ^ {t} \beta_ {1} ^ {t - k} \mathbb {E} [ \Pi_ {\Delta , t} \| g _ {k} \| ^ {2} ]} \\ \stackrel {(a)} {\leq} \mathcal {O} \left(\sum_ {t = 1} ^ {T} \mathbb {E} \left[ \left\| \eta_ {v _ {t}} \circ g _ {t} \right\| ^ {2} \right]\right) + \mathcal {O} (1). \\ \end{array} +$$ + +In the final step $(a)$ , we first apply Property 1 to bound $\mathbb{E}[\Pi_{\Delta,t}\|g_t\|^2]$ for all $t \leq T$ , by $\mathbb{E}[\Pi_{\Delta,t}(f(w_t) - f^*)]$ for $t \leq T$ . Then, using Equation (55), we further bound $\mathbb{E}[\Pi_{\Delta,t}(f(w_t) - f^*)]$ as $\mathcal{O}\left(\sum_{t=1}^{T} \|\eta_{v_t} \circ g_t\|^2\right)$ . Finally, we apply Equation (56) to the previous summation. This completes the proof. \ No newline at end of file diff --git a/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/images.zip b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c515372badf51ee939fe061200d92bb2244119ac --- /dev/null +++ b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e96ebdcd918eb1f3df3bdf72cf91610aabec28af72d588432c3b0ece13b4254a +size 4268117 diff --git a/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/layout.json b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4dd47593830926c9c3e654143b420e6649d125af --- /dev/null +++ b/acomprehensiveframeworkforanalyzingtheconvergenceofadambridgingthegapwithsgd/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0c920ee51f07c4e3f9e70757f1bcfd0dab08c80b4ead1a03d63ca3c47228e1e +size 1993289 diff --git a/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/d152c6ce-f1fb-4888-b961-46e2318e7a39_content_list.json b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/d152c6ce-f1fb-4888-b961-46e2318e7a39_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4c7d33286cfed7b6aeef02db33cc5c228ffa9fac --- /dev/null +++ b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/d152c6ce-f1fb-4888-b961-46e2318e7a39_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fa7378809d7b50d81e4a2237a8511d4265fd4095d5d26377eac3f3e2a0dad18 +size 198097 diff --git a/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/d152c6ce-f1fb-4888-b961-46e2318e7a39_model.json b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/d152c6ce-f1fb-4888-b961-46e2318e7a39_model.json new file mode 100644 index 0000000000000000000000000000000000000000..35bb722f3d8b755cde68cbfb5b8cd6eb55c4c8fd --- /dev/null +++ b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/d152c6ce-f1fb-4888-b961-46e2318e7a39_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ceaf2b9ad859e07a9994139946f29a1808412e4a619fc567dadf6dff9fe3ce6 +size 229029 diff --git a/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/d152c6ce-f1fb-4888-b961-46e2318e7a39_origin.pdf b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/d152c6ce-f1fb-4888-b961-46e2318e7a39_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..622cb3f548453b8007bd167bc783885911fc4f2a --- /dev/null +++ b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/d152c6ce-f1fb-4888-b961-46e2318e7a39_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17e88f52db198ec80ef483a88be3d604feb92e3740d9579e46ffae67ac2fc9c7 +size 429195 diff --git a/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/full.md b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4d5c2de0afe87f074e8430be9bc790264c6ebc09 --- /dev/null +++ b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/full.md @@ -0,0 +1,1038 @@ +# A Computationally Efficient Algorithm for Infinite-Horizon Average-Reward Linear MDPs + +Kihyuk Hong1 Ambuj Tewari1 + +# Abstract + +We study reinforcement learning in infinite-horizon average-reward settings with linear MDPs. Previous work addresses this problem by approximating the average-reward setting by discounted setting and employing a value iteration-based algorithm that uses clipping to constrain the span of the value function for improved statistical efficiency. However, the clipping procedure requires computing the minimum of the value function over the entire state space, which is prohibitive since the state space in linear MDP setting can be large or even infinite. In this paper, we introduce a value iteration method with efficient clipping operation that only requires computing the minimum of value functions over the set of states visited by the algorithm. Our algorithm enjoys the same regret bound as the previous work while being computationally efficient, with computational complexity that is independent of the size of the state space. + +# 1. Introduction + +Reinforcement learning (RL) aims to learn optimal actions for an agent by interacting with the environment. Among the various RL settings, the infinite-horizon setting is particularly well-suited for applications where optimizing long-term performance is the primary objective. Examples include production system management (Yang et al., 2021; Gosavi, 2004), inventory management (Gijsbrechts et al., 2022; Giannoccaro & Pontrandolfo, 2002) and network routing (Mammeri, 2019), where interactions between the agent and the environment continue indefinitely, and the natural goal is to optimize long-term rewards. + +In the infinite-horizon framework, there are two widely-used + +definitions of long-term rewards. The first is the infinite-horizon discounted setting, where the objective is to maximize the discounted cumulative sum of rewards, with exponentially decaying weight assigned to future rewards. The second is the infinite-horizon average-reward setting, where the objective is to maximize the undiscounted long-term average of rewards, assigning uniform weight to future and present rewards. Learning in the average-reward setting is more challenging because its Bellman operator is not a contraction, and the widely used value iteration algorithm may fail when the transition probability model used for value iteration is not well-behaved. This complicates algorithm design, especially when the underlying transition probability model is unknown and must be estimated. + +Seminal work by Auer et al. (2008) introduces a value iteration based algorithm for the infinite-horizon average-reward setting in the tabular case, where the state space and the action space are finite. To address sensitivity of the value iteration algorithm to the transition probability model, they maintain a confidence set that captures the true, well-behaved transition probability model. Their algorithm employs an extended value iteration approach, which optimally selects the transition probability model from the confidence set at each iteration. This extended value iteration method has since been extensively used in the tabular setting (Bartlett & Tewari, 2009; Fruit et al., 2018; Zhang & Ji, 2019). Beyond the tabular case, the method has also been adapted to the linear mixture MDP setting (Modi et al., 2020; Ayoub et al., 2020), where the transition probability model has a low-dimensional structure (Ayoub et al., 2020; Wu et al., 2022; Chae et al., 2025). + +To our knowledge, the extended value iteration method is limited to tabular and linear mixture MDPs, as it relies on sample-efficient transition probability estimation, which is infeasible for settings like linear MDPs with large state spaces (Jin et al., 2020). In response to these limitations, researchers have explored alternative approaches for such settings. For example, Wei et al. (2021) propose a reduction to the finite-horizon episodic setting by dividing the time steps into episodes of a fixed length. This approach achieves a regret bound of $\widetilde{\mathcal{O}}(T^{3/4})$ , which is suboptimal, where $T$ denotes the number of time steps. They also introduce a + +policy-based algorithm that alternates between policy evaluation and policy improvement steps to directly optimize the policy. This approach achieves an order-optimal regret bound of $\widetilde{\mathcal{O}} (\sqrt{T})$ , but it requires a strong ergodicity assumption on the transition probability model for sample-efficient policy evaluation. Lastly, they propose another approach that achieves an order-optimal regret bound by directly solving the Bellman optimality equation as a fixed point problem, bypassing the need for value iteration. However, the fixed point problem is computationally intractable. + +Another line of work on infinite-horizon average-reward RL uses a reduction to the discounted setting to leverage value iteration-based algorithms. To our knowledge, Wei et al. (2020) were the first to introduce such a method. They propose a Q-learning-based algorithm for the tabular setting that solves the discounted setting problem as a surrogate for the average-reward problem, achieving a regret bound of $\widetilde{\mathcal{O}}(T^{2/3})$ . More recently, Hong et al. (2025) propose a value iteration based algorithm that clips the value function to constrain its span for statistical efficiency, achieving an order-optimal regret bound of $\widetilde{\mathcal{O}}(\sqrt{T})$ . Their algorithm runs value iteration to generate a sequence of value functions to plan for the remaining time steps, and takes actions greedy with respect to the value functions until a certain information criterion of the collected trajectories doubles. Although the algorithm runs in polynomial time with respect to problem parameters, its computational complexity depends on the size of the state space. The dependency is undesirable in the linear MDP setting where the state space can be arbitrarily large. An open question arising from this line of work is: + +Does there exist an algorithm for infinite-horizon average-reward linear MDPs with computational complexity polynomial in the problem parameters, yet independent of the size of the state space? + +In this paper, we answer the question in the affirmative by proposing an algorithm based on the following novel techniques. + +Efficient Clipping We develop an efficient value function clipping strategy that requires the minimum of the value function to be evaluated only over the set of states visited by the algorithm, rather than the entire state space. + +Deviation-Controlled Value Iteration We introduce a novel value iteration scheme that controls the deviation between sequences of value functions generated by value iterations with different clipping thresholds. + +# 1.1. Related Work + +Table 1 compares our work with previous approaches for infinite-horizon average-reward linear MDPs. FOPO solves + +the Bellman optimality equation directly as a fixed-point problem, which is computationally intractable, with brute-force solution requiring computational complexity that scales with $T^d$ , where $d$ is the dimension of the feature representation. OLSVI.FH reduces the problem to the finite-horizon episodic setting. This approach is computationally efficient, but has suboptimal regret bound. LOOP generalizes FOPO to the general function approximation setting, but inherits the computational complexity that scales with $T^d$ for solving a fixed-point problem. MDP-EXP2 directly optimizes for the policy by alternating between policy evaluation and policy improvement. This approach is computationally efficient and achieves an order-optimal regret bound, but requires a strong assumption that all policies induce Markov chains that have uniformly bounded mixing time. $\gamma$ -LSCVI-UCB reduces the average-reward problem to the discounted problem and achieves an order-optimal regret bound. However, its computational complexity scales with the size of the state space $S$ . Our work is the first computationally efficient algorithm to achieve $\widetilde{\mathcal{O}}(\sqrt{T})$ regret without making strong assumptions. + +Approximation by discounted setting The method of approximating the average-reward setting by the discounted setting has been used in various settings. It is used in the problem of finding a nearly optimal policy given access to a simulator in the tabular setting by Jin & Sidford (2021); Wang et al. (2022); Zurek & Chen (2023); Wang et al. (2023). It is also used in the online RL setting with tabular MDPs: Wei et al. (2020) propose a Q-learning based algorithm, but has $\widetilde{\mathcal{O}}(T^{2/3})$ regret. Zhang & Xie (2023) improve the regret to $\widetilde{\mathcal{O}}(\sqrt{T})$ by making use of an estimate for the span of optimal bias function. The reduction is also used in the linear mixture MDP setting by Chae et al. (2025). + +Span-constraining methods Learning in the infinite-horizon average-reward setting requires an assumption that ensures the agent can recover from a bad state, leading to a bounded span of the optimal value function. For statistical efficiency, previous work makes use of this fact by constraining the span of the value function estimates. Bartlett & Tewari (2009) modify the extended value iteration algorithm by Auer et al. (2008) to constrain the confidence set on the model so that the spans of the models in the set are bounded. Fruit et al. (2018) propose a computationally efficient version of the algorithm proposed by Bartlett & Tewari (2009). Zhang & Ji (2019) improve the algorithm proposed by Bartlett & Tewari (2009) by constructing tighter confidence sets using a method for directly estimating the bias function. Zhang & Xie (2023) study a Q-learning-based algorithm that projects the value function to a function class of span-constrained functions. Hong et al. (2025) and Chae et al. (2025) propose a value iteration-based algorithm and clips the value function to constrain its span. + +Table 1. Comparison of algorithms for infinite-horizon average-reward linear MDP + +
AlgorithmRegret O(·)AssumptionComputation poly(·)
FOPO (Wei et al., 2021)sp(v*)√d3TBellman optimality equationTd,A,d
OLSVI.FH (Wei et al., 2021)√sp(v*)(dT)3/4Bellman optimality equationT,A,d
LOOP (He et al., 2024)√sp(v*)3d3TBellman optimality equationTd,A,d
MDP-EXP2 (Wei et al., 2021)d√t3mixTUniform MixingT,A,d
γ-LSCVI-UCB (Hong et al., 2025)sp(v*)√d3TBellman optimality equationT,S,A,d
γ-DC-LSCVI-UCB (Ours)sp(v*)√d3TBellman optimality equationT,A,d
Lower Bound (Wu et al., 2022)Ω(d√sp(v*)T)
+ +# 2. Preliminaries + +Notations Let $\| \pmb {x}\| _A = \sqrt{x^T A x}$ for $\pmb {x}\in \mathbb{R}^d$ and a positive semi-definite matrix $A\in \mathbb{R}^{d\times d}$ . Let $a\vee b = \max \{a,b\}$ and $a\wedge b = \min \{a,b\}$ . Let $\Delta (\mathcal{X})$ be the set of probability measures on $\mathcal{X}$ . Let $[n] = \{1,\dots ,n\}$ and $[m:n] = \{m,m + 1,\ldots ,n\}$ . Let $\mathrm{sp}(v) = \max_{s,s'}|v(s) - v(s')|$ . Let CLIP(x;L,U) = (xV L)∧U. + +# 2.1. Infinite-Horizon Average-Reward RL + +In this section, we formulate the infinite-horizon average-reward RL setting. We pose the RL problem as a Markov decision process (MDP) $\mathcal{M} = (\mathcal{S},\mathcal{A},P,r)$ where $\mathcal{S}$ is the state space, $\mathcal{A}$ is the action space, $P:S\times \mathcal{A}\to \Delta (\mathcal{S})$ is the probability transition kernel and $r:S\times \mathcal{A}\rightarrow \mathbb{R}$ is the reward function. We assume that rewards are bounded in [0, 1], a standard and mild assumption that can be enforced by rescaling. We assume $\mathcal{S}$ is a measurable space with possibly infinite number of elements and $\mathcal{A}$ is a finite set. The deterministic reward function $r$ is known to the learner while the probability transition kernel $P$ is unknown to the learner. + +The interaction protocol between the learner and the MDP is as follows. The environment first reveals the starting state $s_1 \in S$ to the learner. Then, at each time step $t = 1,2,\ldots$ , the learner chooses an action $a_t \in \mathcal{A}$ and receives the reward $r(s_t,a_t)$ . The environment transitions to the next state $s_{t+1}$ sampled from $P(\cdot | s_t, a_t)$ . + +In the infinite-horizon average-reward setting, the performance of a policy is evaluated using the long-term average reward. Consider a stationary policy $\pi : S \to \Delta(\mathcal{A})$ where $\pi(a|s)$ denotes the probability of choosing action $a$ in state $s$ . The average reward of policy $\pi$ starting from an initial state $s$ is defined as + +$$ +J ^ {\pi} (s) := \operatorname * {l i m i n f} _ {T \to \infty} \frac {1}{T} \mathbb {E} ^ {\pi} \left[ \sum_ {t = 1} ^ {T} r (s _ {t}, a _ {t}) \Big | s _ {1} = s \right] +$$ + +where the expectation $\mathbb{E}^{\pi}[\cdot ]$ is taken over the probability distribution on the trajectory $(s_1,a_1,s_2,a_2,\ldots)$ induced by + +the interaction between $P$ and $\pi$ . + +The performance of an algorithm interacting with the environment over $T$ steps is evaluated through its regret relative to the best stationary policy $\pi^*$ that maximizes $J^{\pi}(s_1)$ . Writing $J^{*}(s_{1})\coloneqq J^{\pi^{*}}(s_{1})$ , the regret after $T$ steps is defined as + +$$ +R _ {T} := \sum_ {t = 1} ^ {T} (J ^ {*} (s _ {1}) - r (s _ {t}, a _ {t})). +$$ + +The interaction protocol for the infinite-horizon setting, unlike the interaction protocol for the finite-horizon episodic setting, the state is never reset. Consequently, if the agent enters a bad state with low future reward and recovering from the bad state and reaching a good state is impossible, then the agent becomes trapped in the bad state and suffers regret linear in the number of remaining time steps. As discussed by Bartlett & Tewari (2009), an additional assumption on the structure of the MDP is required to avoid the pathological case. At the very least, we want the gain $J^{*}(s)$ to be constant: $J^{*}(s) = J^{*}$ for all $s \in S$ . This implies no matter what the current state is, following the optimal policy $\pi^{*}$ attains the optimal long-term average reward $J^{*}$ , precluding the case of getting trapped in a bad state. We follow Wei et al. (2021) and make the following structural assumption on the MDP. + +Assumption A (Bellman optimality equation). There exist $J^{*}\in \mathbb{R}$ and functions $v^{*}:S\to \mathbb{R}$ and $q^{*}:S\times \mathcal{A}\rightarrow \mathbb{R}$ such that for all $(s,a)\in S\times \mathcal{A}$ , we have + +$$ +J ^ {*} + q ^ {*} (s, a) = r (s, a) + \left[ P v ^ {*} \right] (s, a) +$$ + +$$ +v ^ {*} (s) = \max _ {a \in \mathcal {A}} q ^ {*} (s, a). +$$ + +As shown by Wei et al. (2021), a tuple $(J^{*},q^{*},v^{*})$ that satisfies the equations in the assumption above has the following properties. The policy $\pi^*$ that deterministically selects an action from $\operatorname{argmax}_a q^* (s,a)$ at each state $s\in S$ is an optimal policy. Moreover, such $\pi^*$ always gives an optimal average reward $J^{\pi^{*}}(s) = J^{*}$ for all initial states $s\in S$ . Since the optimal average reward is independent of the ini + +tial state, we can simply write the regret as + +$$ +R _ {T} = \sum_ {t = 1} ^ {T} (J ^ {*} - r (s _ {t}, a _ {t})). +$$ + +The functions $v^{*}(s)$ and $q^{*}(s,a)$ have the interpretation of the relative advantage of starting with $s$ and $(s,a)$ , respectively, and are called bias functions. A pair of functions $(v^{*},q^{*})$ that satisfies the Bellman optimality equation is $v^{*}(s) = \lim_{N\to \infty}\mathbb{E}^{\pi^{*}}[\sum_{t = 1}^{N}r(s_{t},a_{t}) - J^{*}|s_{1} = s]$ and $q^{*}(s,a) = \lim_{N\to \infty}\mathbb{E}^{\pi^{*}}[\sum_{t = 1}^{N}r(s_{t},a_{t}) - J^{*}|s_{1} = s,a_{1} = a]$ . + +Remark 2.1. The Bellman optimality equation assumption is weaker than the weakly communicating assumption, which states that the state space can be partitioned into a set of transient states, which the agent never revisits once it leaves, and a set of recurrent states, where the agent can reach any state from any other under some policy. In turn, the weakly communicating assumption is weaker than the ergodic assumption, which requires that for every policy, the induced Markov chain is irreducible and aperiodic. + +The span of the bias, $\mathfrak{sp}(v^{*}) = \max_{s,s^{\prime}\in S}v^{*}(s) - v^{*}(s^{\prime})$ , quantifies the worst-case difference in value between any two states. Intuitively, entering a suboptimal state incurs regret that scales with $\mathfrak{sp}(v^{*})$ , suggesting that problems with large $\mathfrak{sp}(v^{*})$ are more challenging to learn. Following previous work (Bartlett & Tewari, 2009; Wei et al., 2020), we assume $\mathfrak{sp}(v^{*})$ is known to the learner. This assumption can be relaxed by instead assuming access to an upper bound on $\mathfrak{sp}(v^{*})$ , but in this case, the regret of our proposed algorithm will scale with the upper bound. + +Remark 2.2. Whether sample-efficient learning is possible without knowing the span in advance has been an open question for a long time, and many existing works rely on this assumption. A recent result by Boone & Zhang (2024) shows for the first time that it can be avoided in the tabular setting. However, extending their technique to the linear MDP setting remains a significant challenge and likely require a major breakthrough. We leave this to future work. + +# 2.2. Infinite-Horizon Discounted Setting + +The key algorithm design employed in this paper is to approximate the infinite-horizon average-reward setting by the infinite-horizon discounted setting with a discounting factor $\gamma \in [0,1)$ chosen by the learner. Under the discounted setting, the performance measure is the discounted sum of rewards $\sum_{t=1}^{\infty} \gamma^{t-1} r(s_t, a_t)$ . When normalized by a factor $(1 - \gamma)$ , the resulting normalized discounted sum is a weighted average of the reward sequence $r(s_1, a_1), r(s_2, a_2), \ldots$ . The decay rate of the weight sequence is governed by the discounting factor $\gamma$ . As $\gamma$ approaches 1, the decay becomes slower and the normalized + +discounted sum should approach average of the reward sequence. To make this intuition precise, we first define value functions for a policy $\pi$ under the discounted setting by + +$$ +V _ {\gamma} ^ {\pi} (s) = \mathbb {E} ^ {\pi} \left[ \sum_ {t = 1} ^ {\infty} \gamma^ {t - 1} r (s _ {t}, a _ {t}) | s _ {1} = s \right] +$$ + +$$ +Q _ {\gamma} ^ {\pi} (s, a) = \mathbb {E} ^ {\pi} \left[ \sum_ {t = 1} ^ {\infty} \gamma^ {t - 1} r (s _ {t}, a _ {t}) | s _ {1} = s, a _ {1} = a \right]. +$$ + +We write the optimal value functions under the discounted setting as + +$$ +V _ {\gamma} ^ {*} (s) = \max _ {\pi} V ^ {\pi} (s), \quad Q _ {\gamma} ^ {*} (s, a) = \max _ {\pi} Q _ {\gamma} ^ {\pi} (s, a). +$$ + +Previous informal discussion suggests that the normalized value function $(1 - \gamma)V_{\gamma}^{*}(s)$ to be close to the gain under the average-reward setting $J^{*}$ . The following lemma makes the relation between the infinite-horizon average-reward setting and the discounted setting formal. + +Lemma 2.3 (Lemma 2 in Wei et al. (2020)). For any $\gamma \in [0,1)$ , the optimal value function $V^{*}$ for the infinite-horizon discounted setting with discounting factor $\gamma$ satisfies + +(i) $sp(V_{\gamma}^{*}) \leq 2sp(v^{*})$ and +(ii) $|(1 - \gamma)V_{\gamma}^{*}(s) - J^{*}| \leq (1 - \gamma)sp(v^{*})$ for all $s \in S$ . + +The lemma above suggests that the difference between the optimal average reward $J^{*}$ and the optimal discounted cumulative reward normalized by the factor $(1 - \gamma)$ is small as long as $\gamma$ is close to 1. Hence, we can expect the policy optimal under the discounted setting will be nearly optimal for the average-reward setting, provided $\gamma$ is sufficiently close to 1. + +# 2.3. Linear MDPs + +The linear MDP setting is a widely-studied setting in RL theory literature that allows sample efficient learning in large state space by assuming a low-dimensional feature representation of the state-action pair. This representation allows for generalization to unseen states, yielding sample complexity that is independent of the size of the state space. The linear MDP model imposes the following structural assumptions on the MDP: + +Assumption B (Linear MDP (Jin et al., 2020)). We assume that the transition and the reward functions can be expressed as a linear function of a known $d$ -dimensional feature map $\varphi : \mathcal{S} \times \mathcal{A} \to \mathbb{R}^d$ such that for any $(s, a) \in \mathcal{S} \times \mathcal{A}$ , we have + +$$ +r (s, a) = \left\langle \boldsymbol {\varphi} (s, a), \boldsymbol {\theta} \right\rangle , \quad P \left(s ^ {\prime} | s, a\right) = \left\langle \boldsymbol {\varphi} (s, a), \boldsymbol {\mu} \left(s ^ {\prime}\right) \right\rangle +$$ + +where $\pmb{\mu}(s') = (\mu_1(s'), \dots, \mu_d(s'))$ for $s' \in S$ is a vector of $d$ unknown measures on $S$ and $\pmb{\theta} \in \mathbb{R}^d$ is a known parameter for the reward function. + +we further assume, without loss of generality, the following boundedness conditions: + +$$ +\begin{array}{l} \left\| \varphi (s, a) \right\| _ {2} \leq 1 \text {f o r a l l} (s, a) \in \mathcal {S} \times \mathcal {A}, \tag {1} \\ \left\| \boldsymbol {\theta} \right\| _ {2} \leq \sqrt {d}, \quad \left\| \boldsymbol {\mu} (S) \right\| _ {2} \leq \sqrt {d}. \\ \end{array} +$$ + +Such a boundedness assumption is commonly made, without loss of generality (Wei et al., 2021), when studying the linear MDP setting. + +Remark 2.4. Wei et al. (2021) show that the boundedness assumption can be made without loss of generality with the following reasoning. Given a parameterization $\theta$ and $\varphi$ for the reward function, we can rescale $\theta$ and $\varphi$ such that $\| \varphi (\cdot ,\cdot)\| _2\leq 1$ . Then, they show there exists an invertible transformation $A:\mathbb{R}^d\to \mathbb{R}^d$ such that the minimum volume enclosing ellipsoid (MVEE) of $A\Phi \cup (-A\Phi)$ is a unit ball. A transformed feature mapping $\varphi '(s,a) = A\varphi (s,a)$ and a transformed parameter $\theta^{\prime} = A^{-1}\theta$ leads to the same reward function with $\| \theta^{\prime}\|_{2}\leq 1$ , as desired. As discussed by Wei et al. (2021), this transformation depends only on the feature mapping $\varphi$ , not on the parameter $\theta$ , and can thus be applied during the feature design stage As shown in Theorem 8 of Hazan & Karnin (2016), computing such a transformation takes time $\mathcal{O}((\sqrt{SA} +d)S^3 A^3)$ . + +As discussed by Jin et al. (2020), although the transition model $P$ is linear in the $d$ -dimensional feature mapping $\varphi, P$ still has $|\mathcal{S}|$ degrees of freedom as the measure $\pmb{\mu}$ is unknown, making the estimation of the model $P$ difficult. For sample efficient learning, we rely on the fact that $[PV](s,a)$ is linear in $\varphi(s,a)$ for any function $V: \mathcal{S} \to \mathbb{R}$ so that $[PV](s,a) = \langle \varphi(s,a), \pmb{w}^*(V) \rangle$ where $\pmb{w}^*(V) \coloneqq \int_{s' \in \mathcal{S}} V(s') \pmb{\mu}(ds')$ . Indeed, + +$$ +\begin{array}{l} [ P V ] (s, a) := \int_ {s ^ {\prime} \in \mathcal {S}} V \left(s ^ {\prime}\right) P \left(d s ^ {\prime} \mid s, a\right) \\ = \int_ {s ^ {\prime} \in \mathcal {S}} V (s ^ {\prime}) \langle \varphi (s, a), \boldsymbol {\mu} (d s ^ {\prime}) \rangle \\ = \left\langle \boldsymbol {\varphi} (s, a), \int_ {s ^ {\prime} \in \mathcal {S}} V \left(s ^ {\prime}\right) \boldsymbol {\mu} \left(d s ^ {\prime}\right) \right\rangle . \\ \end{array} +$$ + +Exploiting the linearity, we can estimate $\pmb{w}^{*}(V)$ given a trajectory data $(s_{1},a_{1},\dots ,s_{t - 1},a_{t - 1},s_{t})$ via linear regression as follows: + +$$ +\widehat {\boldsymbol {w}} _ {t} (V) := \Lambda_ {t} ^ {- 1} \sum_ {\tau = 1} ^ {t - 1} V \left(s _ {\tau + 1}\right) \cdot \boldsymbol {\varphi} \left(s _ {\tau}, a _ {\tau}\right) +$$ + +where $\Lambda_{t} = \lambda I + \sum_{\tau = 1}^{t - 1}\varphi (s_{t},a_{t})\varphi (s_{t},a_{t})^{\top}$ . With such a regression coefficient, we estimate $[PV](s,a)$ by + +$$ +[ \widehat {P} _ {t} V ] (s, a) := \langle \boldsymbol {\varphi} (s, a), \widehat {\boldsymbol {w}} _ {t} (V - V (s _ {1})) \rangle + V (s _ {1}). +$$ + +We estimate $[PV](s, a)$ by estimating $[P(V - V(s_1))](s, a)$ and then adding back $V(s_1)$ . This allows bounding the norm of the regression coefficient $\| \widehat{\boldsymbol{w}}_t(V - V(s_1))\|_2$ by a bound that scales with the span of $V$ instead of the magnitude of $V$ , which is required for getting a sharp regret bound. A similar technique is used by Hong et al. (2025). + +# Algorithm 1 $\gamma$ -LSCVI-UCB (Hong et al., 2025) + +Input: Discounting factor $\gamma \in [0,1)$ , regularization constant $\lambda > 0$ , span $H > 0$ , bonus factor $\beta > 0$ . + +Initialize: $k \gets 1, t_k \gets 1, \Lambda_1 \gets \lambda I, Q_t^1(\cdot, \cdot) \gets \frac{1}{1 - \gamma}$ for $t \in [T]$ . + +1:Receive state $s_1$ + +2: for time step $t = 1,\dots ,T$ do + +3: Take action $a_{t} = \operatorname{argmax}_{a} Q_{t}^{t}(s_{t}, a)$ . + +4: Receive reward $r(s_{t},a_{t})$ ; Receive next state $s_{t + 1}$ . + +5: $\Lambda_{t}\gets \Lambda_{t - 1} + \varphi (s_{t},a_{t})\varphi (s_{t},a_{t})^{\top}.$ + +6: if $2\operatorname{det}(\Lambda_{t_k}) < \operatorname{det}(\Lambda_t)$ then + +7: $k\gets k + 1,t_k\gets t + 1.$ + +8: $V_{T + 1}^{t + 1}(\cdot)\gets \frac{1}{1 - \gamma}.$ + +9: for $u = T, T - 1, \ldots, t_k$ do + +0: $Q_{u}^{t + 1}(\cdot ,\cdot)\gets \left(r(\cdot ,\cdot) + \gamma ([\widehat{P}_{t_{k}}V_{u + 1}^{t + 1}](\cdot ,\cdot)\right.$ + +$$ +\left. + \beta \| \varphi (\cdot , \cdot) \| _ {\Lambda_ {t _ {k}} ^ {- 1}}\right) \wedge \frac {1}{1 - \gamma}. +$$ + +11: $\widetilde{V}_u^{t + 1}(\cdot)\gets \max_aQ_u^{t + 1}(\cdot ,a).$ + +12: $V_{u}^{t + 1}(\cdot)\gets \mathrm{CLIP}(\tilde{V}_{u}^{t + 1}(\cdot);$ + +$$ +\min _ {s ^ {\prime} \in \mathcal {S}} \widetilde {V} _ {u} ^ {t + 1} (s ^ {\prime}), \min _ {s ^ {\prime} \in \mathcal {S}} \widetilde {V} _ {u} ^ {t + 1} (s ^ {\prime}) + H). +$$ + +13: end for + +14: else +15: $Q_{u}^{t + 1} \gets Q_{u}^{t}, V_{u}^{t + 1} \gets V_{u}^{t}$ for all $u \in [t + 1 : T]$ . +16: end if +17: end for + +# 2.4. Previous Work + +In this section, we review the closely related work of Hong et al. (2025) to highlight the contributions of our paper. They propose an algorithm, $\gamma$ -LSCVI-UCB (Algorithm 1), which is an optimistic value iteration based algorithm for infinite-horizon average-reward linear MDPs. At time step $t$ , a sequence of value functions $Q_{T}^{t}, Q_{T - 1}^{t}, \ldots, Q_{t}^{t}$ is computed by running value iterations (Line 8-13) to plan for the best action at time $t$ , considering the number of time steps remaining. In the next time step $t + 1$ , instead of running value iteration again to incorporate new transition data observed at time step $t$ , the algorithm reuses the value function $Q_{t + 1}^{t}$ generated previously. Value iteration is only rerun when the determinant of the covariance matrix $\Lambda_{t} = \lambda I + \sum_{\tau = 1}^{t} \varphi(s_{t}, a_{t}) \varphi(s_{t}, a_{t})^{\top}$ doubles (Line 6). + +Clipped Value Iteration A key ingredient of the algorithm is the value clipping step, which constrains the span of the value function estimate to improve statistical efficiency. The optimal value function $V_{\gamma}^{*}$ under the discounted setting has a span bounded by $2 \cdot \mathrm{sp}(v^{*})$ (Lemma 2.3), which implies the range $V_{\gamma}^{*}$ is contained in the interval $[\min_{s \in S} V_{\gamma}^{*}(s), \min_{s \in S} V_{\gamma}^{*}(s) + 2 \cdot \mathrm{sp}(v^{*})]$ . Building on this fact, the algorithm clips the optimistic value function estimate $\widetilde{V}$ to the interval $[\min_{s \in S} \widetilde{V}(s), \min_{s \in S} \widetilde{V}(s) + H]$ to constrain its span (Line 7). We refer to the lower bound + +of this interval of the clipping operation as clipping threshold. The clipping ensures that the concentration bound for the estimate $[\widehat{P} V](\cdot, \cdot)$ scales with $\mathfrak{sp}(v^*)$ , rather than $\frac{1}{1 - \gamma}$ which is crucial for obtaining a tight regret bound. + +Key Step of Regret Analysis In their regret analysis, one of the terms in the regret decomposition is + +$$ +\sum_ {t = 1} ^ {T} V _ {t + 1} ^ {t} (s _ {t + 1}) - \widetilde {V} _ {t + 1} ^ {t + 1} (s _ {t + 1}). +$$ + +This term can be bounded using the fact that $V_{t+1}^{t+1}(s_{t+1}) \leq \widetilde{V}_{t+1}^{t+1}(s_{t+1})$ , and that $V_{t+1}^t(s_{t+1}) = V_{t+1}^{t+1}(s_{t+1})$ whenever the same sequence of value functions is used for the time steps $t$ and $t+1$ . Since the sequence of value functions is only updated when the covariance matrix $\Lambda_t$ doubles, which can be shown to happen only $\mathcal{O}(d\log T)$ times, we can get a tight regret bound. + +Computational Complexity However, their clipping step (Line 7) requires taking the minimum of the value function estimate $\widetilde{V}(\cdot)$ over the entire state space $S$ , leading to computational complexity linear in the size of the state space, which can be prohibitive when the state space is large or infinite. The main contribution of our paper addresses this issue by designing an algorithm that only takes the minimum over the states that have been visited by the learner, removing the dependency of the size of the state space on the computational complexity. As discussed in the next section, additional algorithmic trick is required for controlling the deviation of sequences of value functions generated under different clipping thresholds. + +# 3. Algorithm Design and Analysis + +In this section, we present our algorithm, discounted Deviation Controlled Least Squares Clipped Value Iteration with Upper Confidence Bound ( $\gamma$ -DC-LSCVI-UCB, Algorithm 2), which improves computational complexity of the previous algorithm. The part of the proposed algorithm that enables computational efficiency is highlighted in red. + +# 3.1. Computationally Efficient Clipping + +The algorithm design is centered around bounding the term + +$$ +\sum_ {t = 1} ^ {T - 1} V _ {t + 1} ^ {t} (s _ {t + 1}) - \widetilde {V} _ {t + 1} ^ {t + 1} (s _ {t + 1}), +$$ + +where $\{\widetilde{V}_u^t\}_{u\in [t:T]}$ is the sequence of value functions generated at time step $t$ and $\{V_u^t\}_{u\in [t:T]}$ is the sequence of clipped value functions generated at time step $t$ . Note that the clipped value function $V_{t + 1}^{t}$ in the summation is generated at time step $t$ , prior to observing the next state $s_{t + 1}$ . + +With unlimited compute power, the $\gamma$ -LSCVI-UCB algorithm by previous work uses $\min_{s \in S} \widetilde{V}_{t+1}^t(s)$ as the clipping threshold, which allows bounding $V_{t+1}^t$ evaluated at $s_{t+1}$ by + +$$ +\begin{array}{l} V _ {t + 1} ^ {t} \left(s _ {t + 1}\right) \\ = \operatorname {C L I P} \left(\widetilde {V} _ {t + 1} ^ {t} \left(s _ {t + 1}\right); \min _ {s \in \mathcal {S}} \widetilde {V} _ {t + 1} ^ {t} (s), \min _ {s \in \mathcal {S}} \widetilde {V} _ {t + 1} ^ {t} (s) + H\right) \\ \leq \widetilde {V} _ {t + 1} ^ {t} \left(s _ {t + 1}\right) \\ \end{array} +$$ + +where the inequality only holds because $\min_{s\in S}\widetilde{V}_{t + 1}^t (s)\leq$ $\widetilde{V}_{t + 1}^t (s_{t + 1})$ . The algorithm $\gamma$ -LSCVI-UCB also reuses the sequence of value functions most of the time steps, such that $\widetilde{V}_{t + 1}^t (s_{t + 1}) = \widetilde{V}_{t + 1}^{t + 1}(s_{t + 1})$ , allowing the bound $V_{t + 1}^t (s_{t + 1}) - \widetilde{V}_{t + 1}^{t + 1}(s_{t + 1})\leq 0.$ + +For computational efficiency, suppose we use $m_t$ as the clipping threshold instead of $\min_{s \in S} \widetilde{V}_{t+1}^t(s)$ , where $m_t$ is computed using states $s_1, \ldots, s_t$ only. Then, the bound $V_{t+1}^t(s_{t+1}) \leq \widetilde{V}_{t+1}^t(s_{t+1})$ may no longer hold because + +$$ +V _ {t + 1} ^ {t} (s _ {t + 1}) = \operatorname {C L I P} \big (\widetilde {V} _ {t + 1} ^ {t} (s _ {t + 1}); m _ {t}, m _ {t} + H \big) \geq m _ {t} +$$ + +and we may have $m_t > \widetilde{V}_{t+1}^t(s_{t+1})$ since we cannot look ahead $s_{t+1}$ when choosing the clipping threshold $m_t$ . We can instead get a bound with an error term: + +$$ +\begin{array}{l} V _ {t + 1} ^ {t} \left(s _ {t + 1}\right) = \operatorname {C L I P} \left(\widetilde {V} _ {t + 1} ^ {t} \left(s _ {t + 1}\right); m _ {t}, m _ {t} + H\right) \\ \leq \widetilde {V} _ {t + 1} ^ {t} (s _ {t + 1}) + \max \{m _ {t} - \widetilde {V} _ {t + 1} ^ {t} (s _ {t + 1}), 0 \}. \\ \end{array} +$$ + +One key idea of handling the sum of the error terms is to choose $m_{t + 1} = \widetilde{V}_{t + 1}^{t}(s_{t + 1})\wedge m_{t}$ (Line 15), leading to + +$$ +V _ {t + 1} ^ {t} (s _ {t + 1}) \leq \widetilde {V} _ {t + 1} ^ {t} (s _ {t + 1}) + \Delta_ {t} +$$ + +where $\Delta_t = m_t - m_{t+1}$ . Then the sum of the errors $\Delta_t$ can then be bounded using a telescoping sum. + +The clipping threshold $m_{t + 1} = \widetilde{V}_{t + 1}^{t}(s_{t + 1})\wedge m_{t}$ may change every time step. Hence, after advancing to the next time step $t + 1$ and computing the new threshold $m_{t + 1}$ , the algorithm computes $Q_{t + 1}^{t + 1}$ afresh, which involves generating a sequence of value functions $V_{T}^{t + 1},\ldots ,V_{t + 1}^{t + 1}$ by running clipped value iteration with the new threshold $m_{t + 1}$ . Therefore, unlike previous work that ensures $\widetilde{V}_{t + 1}^{t}(s_{t + 1}) = \widetilde{V}_{t + 1}^{t + 1}(s_{t + 1})$ by reusing the sequence of value functions, we need to control the difference between $\widetilde{V}_{t + 1}^{t}(s_{t + 1})$ and $\widetilde{V}_{t + 1}^{t + 1}(s_{t + 1})$ to be able to bound + +$$ +V _ {t + 1} ^ {t} (s _ {t + 1}) \leq \widetilde {V} _ {t + 1} ^ {t} (s _ {t + 1}) + \Delta_ {t} \approx \widetilde {V} _ {t + 1} ^ {t + 1} (s _ {t + 1}) + \Delta_ {t}. +$$ + +The next section discusses the algorithm design for ensuring $\widetilde{V}_{t + 1}^{t}\approx \widetilde{V}_{t + 1}^{t + 1}$ + +Algorithm 2 $\gamma$ -DC-LSCVI-UCB + +Input: Discounting factor $\gamma \in [0,1)$ , regularization constant $\lambda > 0$ , span $H > 0$ , bonus factor $\beta > 0$ . + +Initialize: $\Lambda_1\gets \lambda I,m_{-1}\gets \infty ,m_0\gets \infty ,m_1\gets \frac{1}{1 - \gamma},$ $\widetilde{Q}_u^0 (\cdot ,\cdot)\gets \frac{1}{1 - \gamma},\widetilde{Q}_u^{-1}(\cdot ,\cdot)\gets \frac{1}{1 - \gamma}.$ + +$$ +\left. \left. + \beta \| \varphi (\cdot , \cdot) \| _ {\Lambda_ {t} ^ {- 1}}\right)\right) \wedge \frac {1}{1 - \gamma}. +$$ + +$$ +\vee \left(\tilde {Q} _ {u} ^ {t - 2} (\cdot , \cdot) - m _ {t - 2} + m _ {t}\right). +$$ + +1:Receive state $s_1$ +2: for $t = 1, \dots, T$ do +3: $V_{T + 1}^{t}(\cdot)\gets \frac{1}{1 - \gamma}.$ +4: for $u = T, T - 1, \ldots, t$ do +5: $\widetilde{Q}_u^t (\cdot ,\cdot)\gets (r(\cdot ,\cdot) + \gamma ([\widehat{P}_tV_{u + 1}^t ](\cdot ,\cdot)$ +6: $U_{u}^{t}(\cdot ,\cdot)\gets \widetilde{Q}_{u}^{t - 1}(\cdot ,\cdot)\wedge \widetilde{Q}_{u}^{t - 2}(\cdot ,\cdot).$ +7: $L_{u}^{t}(\cdot ,\cdot)\gets (\tilde{Q}_{u}^{t - 1}(\cdot ,\cdot) - m_{t - 1} + m_{t})$ +8: $Q_{u}^{t}(\cdot ,\cdot)\gets \mathrm{CLIP}(\tilde{Q}_{u}^{t}(\cdot ,\cdot);L_{u}^{t}(\cdot ,\cdot),U_{u}^{t}(\cdot ,\cdot)).$ +9: $\tilde{V}_u^t (\cdot)\gets \max_aQ_u^t (\cdot ,a).$ +10: $V_{u}^{t}(\cdot)\gets \mathrm{CLIP}(\tilde{V}_{u}^{t}(\cdot);m_{t},m_{t} + H).$ +11: end for +12: Take action $a_{t}\gets \mathrm{argmax}_{a\in \mathcal{A}}Q_{t}^{t}(s_{t},a)$ +13: Receive reward $r(s_{t},a_{t})$ .Receive next state $s_{t + 1}$ +14: $\Lambda_{t + 1}\gets \Lambda_t + \varphi (s_t,a_t)\varphi (s_t,a_t)^\top .$ +15: $m_{t + 1}\gets \tilde{V}_{t + 1}^{t}(s_{t + 1})\wedge m_{t}.$ +16: end for + +# 3.2. Deviation-Controlled Value Iteration + +Previous discussion suggests we need to bound the difference between sequences of value functions $\{\widetilde{V}_u^t\}_{u\in [T]}$ and $\{\widetilde{V}_u^{t + 1}\}_{u\in [T]}$ generated by value iterations using different clipping thresholds $m_{t}$ and $m_{t + 1}$ . We would expect that the difference between sequences of value functions to be bounded by the difference in clipping thresholds $m_t - m_{t + 1}$ . Surprisingly, a naive adaptation of the previous work $\gamma$ LSCVI-UCB, fails to control the difference. To see this, consider the following clipped value iteration procedure that generates a sequence of value functions $\{\widetilde{V}_u^t\}_{u}$ at time step $t$ using the clipping threshold $m_t$ . + +$$ +V _ {T + 1} ^ {t} (\cdot) \leftarrow \frac {1}{1 - \gamma}. +$$ + +for $u = T, T - 1, \ldots, t$ do + +$$ +\begin{array}{l} Q _ {u} ^ {t} (\cdot , \cdot) \leftarrow \left(r (\cdot , \cdot) + \gamma \left(\left[ \hat {P} _ {t} V _ {u + 1} ^ {t} \right] (\cdot , \cdot) \right. \right. \\ \left. + \beta \| \varphi (\cdot , \cdot) \| _ {\Lambda_ {t} ^ {- 1}})\right) \wedge \frac {1}{1 - \gamma}. \\ \end{array} +$$ + +$$ +\begin{array}{l} \tilde {V} _ {u} ^ {t} (\cdot) \leftarrow \max _ {a} Q _ {u} ^ {t} (\cdot , a). \\ V _ {u} ^ {t} (\cdot) \leftarrow \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (\cdot); m _ {t}, m _ {t} + H\right). \\ \end{array} +$$ + +end for + +We argue that controlling the difference $\| \widetilde{V}_{u + 1}^t -\widetilde{V}_{u + 1}^{t + 1}\|_{\infty}\leq$ $\Delta$ for $\Delta = m_t - m_{t + 1}$ at value iteration index $u + 1$ does not necessarily control the difference $\| \widetilde{V}_u^t -\widetilde{V}_u^{t + 1}\|_{\infty}$ at the next value iteration. To see this, suppose $\| \widetilde{V}_{u + 1}^t -\widetilde{V}_{u + 1}^{t + 1}\|_{\infty}\leq \Delta$ + +Then, by value iteration, we have + +$$ +\| \widetilde {V} _ {u} ^ {t} - \widetilde {V} _ {u} ^ {t + 1} \| _ {\infty} \leq \| Q _ {u} ^ {t} - Q _ {u} ^ {t + 1} \| _ {\infty} \approx \| \widehat {P} _ {t} (V _ {u + 1} ^ {t} - V _ {u + 1} ^ {t + 1}) \| _ {\infty}. +$$ + +It is natural to expect that $\| V_{u + 1}^t - V_{u + 1}^{t + 1} \|_\infty \leq \Delta$ would imply $\| \widehat{P}_t(V_{u + 1}^t - V_{u + 1}^{t + 1}) \|_\infty \leq \Delta$ . This is true when $[\widehat{P}_tV](s, a)$ is an expectation of $V(\cdot)$ with respect to an empirical probability distribution $\widehat{P}_t(\cdot | \cdot, \cdot)$ , which is the case for the tabular setting (see Appendix B.1 for more discussion). However, in the linear MDP setting, and more generally in general value function approximation setting, $[\widehat{P}_tV](s, a)$ is defined through a regression: $[\widehat{P}_tV](s, a) = \langle \varphi(s, a), \widehat{\boldsymbol{w}}_t(V_{u + 1}^t - V_{u + 1}^{t + 1}) \rangle$ , which can be arbitrarily larger than $\Delta$ as shown in the next lemma. + +Lemma 3.1. There exist $\phi_1, \ldots, \phi_n \in \mathbb{R}^d$ with $\| \phi_i \| \leq 1$ for $i = 1, \ldots, n$ , and $y_1, \ldots, y_n \in \mathbb{R}$ with $|y_i| \leq \Delta$ , $i = 1, \ldots, n$ for any $\Delta > 0$ , such that + +$$ +| \langle \boldsymbol {w} _ {n}, \phi \rangle | \geq \frac {1}{2} \Delta \sqrt {n} +$$ + +for some $\phi \in \mathbb{R}^d$ where $\pmb{w}_n$ is the regression coefficient $\pmb{w}_n = \Lambda_n^{-1}\sum_{i = 1}^{n}y_i\phi_i$ where $\Lambda_{n} = \sum_{i = 1}^{n}\phi_{i}\phi_{i}^{\top} + \lambda I.$ + +To address this issue, we propose a novel value iteration procedure that explicitly controls the deviation of a sequence of value functions from its previous sequences. The key idea is to clip the value function $\widetilde{Q}_u^t$ so that its values do not deviate too much from value functions $\widetilde{Q}_u^{t - 1}$ and $\widetilde{Q}_u^{t - 2}$ from previously generated sequences of value functions (Line 6-8). With this scheme, we can bound the difference between $\widetilde{V}_u^t$ and $\widetilde{V}_u^{t + 1}$ as follows. + +Lemma 3.2. When running $\gamma$ -DC-LSCVI-UCB (Algorithm 2), we have + +$$ +\left| \widetilde {V} _ {u} ^ {t + 1} (s) - \widetilde {V} _ {u} ^ {t} (s) \right| \leq m _ {t - 1} - m _ {t + 1} +$$ + +for all $t\in [T]$ $u\in [t:T]$ and for all $s\in S$ + +The lemma above says that the sequence of value functions $\{\widetilde{V}_u^{t + 1}\}_{u\in [t + 1:T]}$ generated at time step $t + 1$ deviates from the chain of value functions $\{\widetilde{V}_u^t\}_{u\in [t:T]}$ by at most $m_{t - 1} - m_{t + 1}$ . This deviation control enables bounding the term $\sum_{t = 1}^{T - 1}V_{t + 1}^t (s_{t + 1}) - \widetilde{V}_{t + 1}^{t + 1}(s_{t + 1})$ , which we demonstrate in the next section. + +# 3.3. Regret Analysis + +In this section, we outline a regret analysis for our algorithm. Central to the regret analysis is the following concentration bound for the estimate $\widetilde{P_t} V$ . + +Lemma 3.3. With probability at least $1 - \delta$ , there exists an absolute constant $c_{\beta}$ such that for $\beta = c_{\beta} \cdot Hd\sqrt{\log(dT / \delta)}$ , + +$$ +\left| \left[ \widehat {P} _ {t} V _ {u} ^ {t} \right] (s, a) - \left[ P V _ {u} ^ {t} \right] (s, a) \right| \leq \beta \| \varphi (s, a) \| _ {\Lambda_ {t} ^ {- 1}} +$$ + +for all $t\in [T]$ $u\in [t:T]$ and $(s,a)\in S\times \mathcal{A}$ + +A proof for the lemma above first finds a concentration bound for $\widehat{P}_tV$ for a fixed value function $V:\mathcal{S}\to \mathbb{R}$ using a concentration bound for vector-valued self-normalized processes. Then, an $\epsilon$ -net covering argument is used to get a uniform bound on the function class that captures all value functions $V_{u}^{t}$ encountered by the algorithm. For this to work, we require the function class to have low covering number. We can show that the log covering number of the function class that captures functions $\widetilde{Q}_u^t$ can be bounded by $\tilde{\mathcal{O}} (d^2)$ , which amounts to covering the $d\times d$ matrices $\Lambda_t$ . Since $Q_{u}^{t}$ is a function of 5 functions in this function class, the log covering number of the function class that captures $Q_{u}^{t}$ is bounded by $\widetilde{\mathcal{O}} (d^2)$ . With the concentration inequality, and the fact that the algorithm uses $\beta \| \varphi (s,a)\|_{\Lambda_t^{-1}}$ as the bonus term, we get the following results. + +Lemma 3.4 (Optimism). With probability at least $1 - \delta$ , for all $t \in [T]$ and $u \in [t : T]$ and $s \in S$ , we have + +$$ +V _ {u} ^ {t} (s) \geq V ^ {*} (s), +$$ + +as long as the input argument $H$ is chosen such that $H \geq 2 \cdot sp(v^{*})$ . + +Lemma 3.5. With probability at least $1 - \delta$ , we have for all $t \in [4:T]$ and $u \in [t:T]$ that + +$$ +\begin{array}{l} Q _ {u} ^ {t} (s, a) \leq r (s, a) + \gamma \left[ P V _ {u + 1} ^ {t} \right] (s, a) \\ + 2 \beta \| \varphi (s, a) \| _ {\Lambda_ {t} ^ {- 1}} + 2 \left(m _ {t - 3} - m _ {t}\right) \\ \end{array} +$$ + +for all $(s,a)\in S\times \mathcal{A}$ + +Using the lemma above, the regret can be bounded by + +$$ +\begin{array}{l} R _ {T} = \sum_ {t = 1} ^ {T} \left(J ^ {*} - r \left(s _ {t}, a _ {t}\right)\right) \\ \leq \sum_ {t = 4} ^ {T} (J ^ {*} - Q _ {t} ^ {t} (s _ {t}, a _ {t}) + \gamma [ P V _ {t + 1} ^ {t} ] (s _ {t}, a _ {t}) \\ + 2 \beta \| \varphi (s _ {t}, a _ {t}) \| _ {\Lambda_ {t} ^ {- 1}} + 2 (m _ {t - 3} - m _ {t})) + \mathcal {O} (1) \\ \end{array} +$$ + +which can be decomposed into + +$$ +\begin{array}{l} = \underbrace {\sum_ {t = 4} ^ {T} (J ^ {*} - (1 - \gamma) V _ {t + 1} ^ {t} (s _ {t + 1}))} _ {(a)} \\ + \underbrace {\sum_ {t = 4} ^ {T} \left(V _ {t + 1} ^ {t} \left(s _ {t + 1}\right) - \widetilde {V} _ {t} ^ {t} \left(s _ {t}\right)\right)} _ {(b)} \\ + \gamma \underbrace {\sum_ {t = 4} ^ {T} ([ P V _ {t + 1} ^ {t} ] (s _ {t} , a _ {t}) - V _ {t + 1} ^ {t} (s _ {t + 1}))} _ {(c)} \\ + 2 \underbrace {\beta \sum_ {t = 4} ^ {T} \| \boldsymbol {\varphi} (s _ {t} , a _ {t}) \| _ {\Lambda_ {t} ^ {- 1}}} _ {(d)} + \mathcal {O} (\frac {1}{1 - \gamma}). \\ \end{array} +$$ + +where we use $Q_{t}^{t}(s_{t},a_{t}) = \widetilde{V}_{t}^{t}(s_{t})$ by the choice of $a_{t}$ by the algorithm. Each term can be bounded as follows. + +Bounding (a) By the optimism result (Lemma 3.4), we have $V_{u}^{t}(s) \geq V^{*}(s)$ for all $t \in [T]$ and $u \in [t : T]$ with high probability. It follows that + +$$ +\begin{array}{l} J ^ {*} - (1 - \gamma) V _ {t + 1} ^ {t} \left(s _ {t + 1}\right) \leq J ^ {*} - (1 - \gamma) V ^ {*} \left(s _ {t + 1}\right) \\ \leq (1 - \gamma) \operatorname {s p} \left(v ^ {*}\right) \\ \end{array} +$$ + +where the last inequality is by the bound on the error of approximating the average-reward setting by the discounted setting provided in Lemma 2.3. Hence, the term $(a)$ can be bounded by $T(1 - \gamma)\mathrm{sp}(v^{*})$ . + +Bounding (b) Using Lemma 3.2 that controls the difference between $\widetilde{V}_u^{t + 1}$ and $\widetilde{V}_u^t$ , we have + +$$ +\begin{array}{l} V _ {t + 1} ^ {t} \left(s _ {t + 1}\right) = \operatorname {C L I P} \left(\widetilde {V} _ {t + 1} ^ {t} \left(s _ {t + 1}\right); m _ {t}, m _ {t} + H\right) \\ \leq \operatorname {C L I P} \left(\widetilde {V} _ {t + 1} ^ {t} \left(s _ {t + 1}\right); m _ {t + 1}, m _ {t + 1} + H\right) + m _ {t} - m _ {t + 1} \\ \leq \widetilde {V} _ {t + 1} ^ {t} \left(s _ {t + 1}\right) + m _ {t} - m _ {t + 1} \\ \leq \widetilde {V} _ {t + 1} ^ {t + 1} \left(s _ {t + 1}\right) + 2 m _ {t - 1} - 2 m _ {t + 1} \\ \end{array} +$$ + +where the second inequality holds because $\widetilde{V}_{t + 1}^{t}(s_{t + 1})\geq$ $m_{t + 1}$ by Line 15. Hence, term (b) can be bounded by $\mathcal{O}\left(\frac{1}{1 - \gamma}\right)$ using telescoping sums of $\widetilde{V}_{t + 1}^{t + 1}(s_{t + 1}) - \widetilde{V}_t^t (s_t)$ and $2m_{t - 1} - 2m_{t + 1}$ , and the fact that $V_{u}^{t}\leq \frac{1}{1 - \gamma}$ and $m_{t}\leq \frac{1}{1 - \gamma}$ for all $t\in [T]$ and $u\in [t:T]$ . + +Bounding (c) Since $V_{u}^{t}$ is $\mathcal{F}_t$ -measurable where $\mathcal{F}_t$ is history up to time step $t$ , we have $\mathbb{E}[V_{t + 1}^t (s_{t + 1})|\mathcal{F}_t] = [PV_{t + 1}^t ](s_t,a_t)$ , making the summation $(c)$ a summation of a martingale difference sequence. Since $\mathrm{sp}(V_{t + 1}^t)\leq H$ for all $t\in [T]$ , the summation can be bounded by $\widetilde{\mathcal{O}} (\mathrm{sp}(v^{*})\sqrt{T})$ using Azuma-Hoeffding inequality. + +Bounding (d) The sum of the bonus terms can be bounded by $\widetilde{\mathcal{O}} (\beta \sqrt{dT})$ using a standard analysis from literature on linear MDP. + +Combining the bounds, and choosing $H = 2\cdot \mathfrak{sp}(v^{*})$ and $\beta = \widetilde{\mathcal{O}} (\mathfrak{sp}(v^{*})d)$ specified in Lemma 3.3, we get + +$$ +\begin{array}{l} R _ {T} \leq \widetilde {\mathcal {O}} (T (1 - \gamma) \mathrm {s p} (v ^ {*}) + \frac {1}{1 - \gamma} + \mathrm {s p} (v ^ {*}) \sqrt {T} \\ + \operatorname {s p} \left(v ^ {*}\right) \sqrt {d ^ {3} T}). \\ \end{array} +$$ + +Choosing $\gamma = 1 - \sqrt{1 / T}$ , we get $R_{T} \leq \widetilde{\mathcal{O}}(\mathrm{sp}(v^{*})\sqrt{d^{3}T})$ , leading to our main result (see Appendix C for a more detailed analysis): + +Theorem 3.6. Under Assumptions $A$ and $B$ , running Algorithm 2 with inputs $\gamma = 1 - \sqrt{1 / T}$ , $\lambda = 1$ , $H = 2 \cdot sp(v^{*})$ and $\beta = 2c_{\beta} \cdot sp(v^{*})d\sqrt{\log(dT / \delta)}$ guarantees with probability at least $1 - \delta$ , + +$$ +R _ {T} \leq \mathcal {O} (s p (v ^ {*}) \sqrt {d ^ {3} T \log (d T / \delta) \log T}). +$$ + +where $c_{\beta}$ is defined in Lemma 3.3. + +The regret bound for our algorithm $\gamma$ -DC-LSCVI-UCB matches the regret bound of the previous algorithm $\gamma$ -LSCVI-UCB. + +Remark 3.7. Both algorithms $\gamma$ -DC-LSCVI-UCB and $\gamma$ -LSCVI-UCB require the knowledge of the time horizon $T$ to tune the discount factor $\gamma$ in order to achieve a $T$ -step regret bound of $\widetilde{\mathcal{O}}(\sqrt{T})$ . This limitation can be addressed using the standard doubling trick, which allows us to obtain a regret bound of $\widetilde{\mathcal{O}}(\sqrt{T})$ for any horizon $T$ . The doubling trick is a standard technique in online learning to convert an algorithm with $\mathcal{O}(\sqrt{T})$ regret guarantee for a fixed known $T$ to an anytime algorithm that does not take $T$ as an input and guarantee $T$ -step regret of $\mathcal{O}(\sqrt{T})$ for any $T$ . The idea is to run the algorithm in phases, where each phase lasts twice as long as the previous one. At the beginning of each phase, the algorithm is restarted with parameters tuned for that phase length. + +# 3.4. Computational Complexity + +Our algorithm $\gamma$ -LSCVI-UCB+ runs up to $T$ steps of value iteration every time step, resulting in $\mathcal{O}(T^2)$ value iteration steps. This can be seen by the nested loop structure of the algorithm, where the outer loop is indexed by $t$ for the time step and the inner loop is indexed by $u$ for the value iteration step. The computational bottleneck of the algorithm is computing $\widetilde{Q}_u^t(s,a)$ for all $a \in \mathcal{A}$ and all $s \in \{s_1,\ldots,s_{t-1}\}$ , which involves computing the regression coefficient $\widehat{\boldsymbol{w}}_t(V_{u+1}^t)$ . Computing the regression coefficient takes $\mathcal{O}(T+d^2)$ operations. + +In total, the computational complexity of our algorithm is $\mathcal{O}(T^3 d^2 A)$ , which is polynomial in the problem parameters $T$ , $d$ , $A$ and is independent of the size of the state space. Although our algorithm enjoys a polynomial-time computational complexity, it is super linear in $T$ , just as the OLSVI.FH algorithm (Wei et al., 2021) and the previous work $\gamma$ -LSCVI-UCB (Hong et al., 2025). We leave further improving the computational complexity to be linear in $T$ as future work. + +# 4. Conclusion + +We propose an algorithm for infinite-horizon average-reward RL with linear MDPs that achieves a regret bound of $\tilde{\mathcal{O}} (\mathrm{sp}(v^{*})\sqrt{d^{3}T})$ and is computationally efficient. Our algorithm uses a combination of techniques such as approximation by discounted setting, value function clipping for constraining its span, and deviation-controlled value iteration. An interesting future directions include improving the regret bound by a factor of $\sqrt{d}$ using variance-aware regression method, extending the techniques to the general function approximation setting, and learning a stationary policy for memory efficiency. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# References + +Abbasi-Yadkori, Y., Pál, D., and Szepesvári, C. Improved algorithms for linear stochastic bandits. Advances in neural information processing systems, 24, 2011. +Auer, P., Jaksch, T., and Ortner, R. Near-optimal regret bounds for reinforcement learning. Advances in neural information processing systems, 21, 2008. +Ayoub, A., Jia, Z., Szepesvari, C., Wang, M., and Yang, L. Model-based reinforcement learning with value-targeted regression. In International Conference on Machine Learning, pp. 463-474. PMLR, 2020. +Bartlett, P. and Tewari, A. Regal: a regularization based algorithm for reinforcement learning in weakly communicating mdps. In Uncertainty in Artificial Intelligence: Proceedings of the 25th Conference, pp. 35-42. AUAI Press, 2009. +Boone, V. and Zhang, Z. Achieving tractable minimax optimal regret in average reward mdps. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. +Chae, W., Hong, K., Zhang, Y., Tewari, A., and Lee, D. Learning infinite-horizon average-reward linear mixture mdps of bounded span, 2025. +Fruit, R., Pirotta, M., Lazaric, A., and Ortner, R. Efficient bias-span-constrained exploration-exploitation in reinforcement learning. In International Conference on Machine Learning, pp. 1578-1586. PMLR, 2018. +Giannoccaro, I. and Pontrandolfo, P. Inventory management in supply chains: a reinforcement learning approach. International Journal of Production Economics, 78(2): 153-161, 2002. +Gijsbrechts, J., Boute, R. N., Van Mieghem, J. A., and Zhang, D. J. Can deep reinforcement learning improve inventory management? performance on lost sales, dual-sourcing, and multi-echelon problems. Manufacturing & Service Operations Management, 24(3):1349-1368, 2022. +Gosavi, A. Reinforcement learning for long-run average cost. European journal of operational research, 155(3): 654-674, 2004. + +Hazan, E. and Karnin, Z. Volumetric spanners: an efficient exploration basis for learning. The Journal of Machine Learning Research, 17(1):4062-4095, 2016. +He, J., Zhong, H., and Yang, Z. Sample-efficient learning of infinite-horizon average-reward mdps with general function approximation. In The Twelfth International Conference on Learning Representations, 2024. +Hong, K., Chae, W., Zhang, Y., Lee, D., and Tewari, A. Reinforcement learning for infinite-horizon average-reward linear mdps via approximation by discounted-reward mdps. In International Conference on Artificial Intelligence and Statistics, 2025. +Jin, C., Yang, Z., Wang, Z., and Jordan, M. I. Provably efficient reinforcement learning with linear function approximation. In Conference on learning theory, pp. 2137-2143. PMLR, 2020. +Jin, Y. and Sidford, A. Towards tight bounds on the sample complexity of average-reward mdps. In International Conference on Machine Learning, pp. 5055-5064. PMLR, 2021. +Mammeri, Z. Reinforcement learning based routing in networks: Review and classification of approaches. *IEEE Access*, 7:55916-55950, 2019. +Modi, A., Jiang, N., Tewari, A., and Singh, S. Sample complexity of reinforcement learning using linearly combined model ensembles. In International Conference on Artificial Intelligence and Statistics, pp. 2010-2020. PMLR, 2020. +Wang, J., Wang, M., and Yang, L. F. Near sample-optimal reduction-based policy learning for average reward mdp. arXiv preprint arXiv:2212.00603, 2022. +Wang, S., Blanchet, J., and Glynn, P. Optimal sample complexity for average reward markov decision processes. arXiv preprint arXiv:2310.08833, 2023. +Wei, C.-Y., Jahromi, M. J., Luo, H., Sharma, H., and Jain, R. Model-free reinforcement learning in infinite-horizon average-reward markov decision processes. In International conference on machine learning, pp. 10170-10180. PMLR, 2020. +Wei, C.-Y., Jahromi, M. J., Luo, H., and Jain, R. Learning infinite-horizon average-reward mdps with linear function approximation. In International Conference on Artificial Intelligence and Statistics, pp. 3007-3015. PMLR, 2021. +Wu, Y., Zhou, D., and Gu, Q. Nearly minimax optimal regret for learning infinite-horizon average-reward mdps with linear function approximation. In International Conference on Artificial Intelligence and Statistics, pp. 3883-3913. PMLR, 2022. + +Yang, H., Li, W., and Wang, B. Joint optimization of preventive maintenance and production scheduling for multi-state production systems based on reinforcement learning. Reliability Engineering & System Safety, 214:107713, 2021. +Zhang, Z. and Ji, X. Regret minimization for reinforcement learning by evaluating the optimal bias function. Advances in Neural Information Processing Systems, 32, 2019. +Zhang, Z. and Xie, Q. Sharper model-free reinforcement learning for average-reward markov decision processes. In The Thirty Sixth Annual Conference on Learning Theory, pp. 5476-5477. PMLR, 2023. +Zurek, M. and Chen, Y. Span-based optimal sample complexity for average reward mdps. arXiv preprint arXiv:2311.13469, 2023. + +# A. Concentration Inequalities + +Lemma A.1 (Concentration of vector-valued self-normalized processes (Abbasi-Yadkori et al., 2011)). Let $\{\varepsilon_t\}_{t=1}^{\infty}$ be a real-valued stochastic process with corresponding filtration $\{\mathcal{F}_t\}_{t=0}^{\infty}$ . Let $\varepsilon_t|\mathcal{F}_{t-1}$ be zero-mean and $\sigma$ -subgaussian. Let $\{\phi_t\}_{t=0}^{\infty}$ be an $\mathbb{R}^d$ -valued stochastic process where $\phi_t \in \mathcal{F}_{t-1}$ . Assume $\Lambda_0$ is a $d \times d$ positive definite matrix, and let $\Lambda_t = \Lambda_0 + \sum_{s=1}^{t} \phi_s \phi_s^T$ . Then for any $\delta > 0$ , with probability at least $1 - \delta$ , we have for all $t \geq 0$ that + +$$ +\left\| \sum_ {s = 1} ^ {t} \phi_ {s} \varepsilon_ {s} \right\| _ {\Lambda_ {t} ^ {- 1}} ^ {2} \leq 2 \sigma^ {2} \log \left(\frac {\operatorname* {d e t} (\Lambda_ {t}) ^ {1 / 2} \operatorname* {d e t} (\Lambda_ {0}) ^ {- 1 / 2}}{\delta}\right). +$$ + +Lemma A.2. Let $\pmb{w}$ be a ridge regression coefficient obtained by regressing $y\in [0,B]$ on $\pmb {x}\in \mathbb{R}^d$ using the dataset $\{(x_{i},y_{i})\}_{i = 1}^{n}$ so that $\pmb {w} = \Lambda^{-1}\sum_{i = 1}^{n}\pmb{x}_{i}y_{i}$ where $\Lambda = \sum_{i = 1}^{n}\pmb {x}\pmb{x}^{T} + \lambda I$ . Then, + +$$ +\| \boldsymbol {w} \| _ {2} \leq B \sqrt {d n / \lambda}. +$$ + +Lemma A.3. Let $V: \mathcal{S} \to [-B, B]$ be a bounded function. Then, $\pmb{w}^{*}(V) = \int_{\mathcal{S}} V(s') d\pmb{\mu}(s')$ which satisfies $[PV](s, a) = \langle \varphi(s, a), \pmb{w}^{*}(V) \rangle$ for all $(s, a) \in \mathcal{S} \times \mathcal{A}$ , satisfies + +$$ +\| \boldsymbol {w} ^ {*} (V) \| _ {2} \leq B \sqrt {d}. +$$ + +Proof. + +$$ +\| \boldsymbol {w} ^ {*} (V) \| _ {2} = \left\| \int_ {\mathcal {S}} V (s ^ {\prime}) d \boldsymbol {\mu} (s ^ {\prime}) \right\| _ {2} \leq B \left\| \int_ {\mathcal {S}} d \boldsymbol {\mu} (s ^ {\prime}) \right\| _ {2} \leq B \sqrt {d} +$$ + +where the first inequality holds since $\pmb{\mu}$ is a vector of positive measures and $V(s^{\prime})\geq 0$ . The last inequality is by the boundedness assumption (1) on $\pmb {\mu}(\mathcal{S})$ + +Lemma A.4 (Adaptation of Lemma D.4 in Jin et al. (2020)). Let $\{x_{t}\}_{t = 1}^{\infty}$ be a stochastic process on state space $S$ with corresponding filtration $\{\mathcal{F}_t\}_{t = 0}^\infty$ . Let $\{\phi_t\}_{t = 0}^\infty$ be a $\mathbb{R}^d$ -valued stochastic process where $\phi_t \in \mathcal{F}_{t - 1}$ , and $\| \phi_t\| _2\leq 1$ . Let $\Lambda_{n} = \lambda I + \sum_{t = 1}^{n}\phi_{t}\phi_{t}^{T}$ . Then for any $\delta >0$ and any given function class $\mathcal{V}$ , with probability at least $1 - \delta$ , for all $n\geq 0$ and any $V\in \mathcal{V}$ satisfying $sp(V)\leq H$ , we have + +$$ +\left\| \sum_ {t = 1} ^ {n} \phi_ {t} (V (x _ {t}) - \mathbb {E} [ V (x _ {t}) | \mathcal {F} _ {t - 1} ]) \right\| _ {\Lambda_ {n} ^ {- 1}} ^ {2} \leq 4 H ^ {2} \left[ \frac {d}{2} \log \left(\frac {n + \lambda}{\lambda}\right) + \log \frac {\mathcal {N} _ {\varepsilon}}{\delta} \right] + \frac {8 n ^ {2} \varepsilon^ {2}}{\lambda} +$$ + +where $\mathcal{N}_{\varepsilon}$ is the $\varepsilon$ -covering number of $\mathcal{V}$ with respect to the distance $dist(V, V') = \sup_x |V(x) - V'(x)|$ . + +Lemma A.5 (Adaptation of Lemma B.3 in Jin et al. (2020)). Under the linear MDP setting in Theorem 3.6 for the $\gamma$ -LSCVI-UCB algorithm with clipping oracle (Algorithm 1), let $c_{\beta}$ be the constant in the definition of $\beta = c_{\beta}Hd\sqrt{\log(dT / \delta)}$ . There exists an absolute constant $C$ that is independent of $c_{\beta}$ such that for any fixed $\delta \in (0,1)$ , the event $\mathcal{E}$ defined by + +$$ +\begin{array}{l} \forall u \in [ T ], t \in [ T ]: \\ \left\| \sum_ {\tau = 1} ^ {t - 1} \varphi (s _ {\tau}, a _ {\tau}) \left[ V _ {u} ^ {t} (s _ {\tau + 1}) - \left[ P V _ {u} ^ {t} \right] (s _ {\tau}, a _ {\tau}) \right] \right\| _ {\Lambda_ {t} ^ {- 1}} \leq C \cdot H d \sqrt {\log ((c _ {\beta} + 1) d T / \delta)} \\ \end{array} +$$ + +satisfies $P(\mathcal{E})\geq 1 - \delta$ + +Proof. By Lemma A.2, we have $\| \pmb{w}_t\|_2 \leq H\sqrt{dt / \lambda}$ for all $t = 1,\dots,T$ . Hence, by combining Lemma D.3 and Lemma A.4, for any $\varepsilon > 0$ and any fixed pair $(u,t) \in [T] \times [T]$ , we have with probability at least $1 - \delta / T^2$ that + +$$ +\begin{array}{l} \left\| \sum_ {\tau = 1} ^ {t - 1} \varphi (s _ {\tau}, a _ {\tau}) \left[ V _ {u} ^ {t} (s _ {\tau + 1}) - \left[ P V _ {u} ^ {t} \right] (s _ {\tau}, a _ {\tau}) \right] \right\| _ {\Lambda_ {t} ^ {- 1}} ^ {2} \\ \leq 4 H ^ {2} \left[ \frac {2}{d} \log \left(\frac {t + \lambda}{\lambda}\right) + d \log \left(1 + \frac {4 H \sqrt {d t}}{\varepsilon \sqrt {\lambda}}\right) + d ^ {2} \log \left(1 + \frac {8 d ^ {1 / 2} \beta^ {2}}{\varepsilon^ {2} \lambda}\right) + \log \left(\frac {T ^ {2}}{\delta}\right) \right] + \frac {8 t ^ {2} \varepsilon^ {2}}{\lambda}. \\ \end{array} +$$ + +Using a union bound over $(u,t)\in [T]\times [T]$ and choosing $\varepsilon = Hd / t$ and $\lambda = 1$ , there exists an absolute constant $C > 0$ independent of $c_{\beta}$ such that, with probability at least $1 - \delta$ , + +$$ +\left\| \sum_ {\tau = 1} ^ {t - 1} \varphi (s _ {\tau}, a _ {\tau}) [ V _ {u} ^ {t} (s _ {\tau + 1}) - [ P V _ {u} ^ {t} ] (s _ {\tau}, a _ {\tau}) ] \right\| _ {\Lambda_ {t} ^ {- 1}} ^ {2} \leq C ^ {2} \cdot d ^ {2} H ^ {2} \log ((c _ {\beta} + 1) d T / \delta), +$$ + +which concludes the proof. + +# A.1. Proof of Lemma 3.3 + +Proof of Lemma 3.3. We prove under the event $\mathcal{E}$ defined in Lemma A.5. Recall the definition + +$$ +[ \widehat {P} _ {t} V _ {u} ^ {t} ] (s, a) = \langle \boldsymbol {\varphi} (s, a), \widehat {\boldsymbol {w}} _ {t} (V _ {u} ^ {t} - V _ {u} ^ {t} (s _ {1})) \rangle + V _ {u} ^ {t} (s _ {1}) +$$ + +where $\hat{\pmb{w}}_t(V_u^t - V_u^t(s_1)) = \Lambda_t^{-1} \sum_{\tau=1}^{t-1} (V_u^t(s_{\tau+1}) - V_u^t(s_1)) \cdot \pmb{\varphi}(s_{\tau}, a_{\tau})$ . For convenience, we introduce the notation $\bar{V}_u^k(s) = V_u^k(s) - V_u^k(s_1)$ and $\pmb{w}_u^t = \hat{\pmb{w}}_t(\bar{V}_u^t)$ . With these notations, we have + +$$ +[ \widehat {P _ {t}} V _ {u} ^ {t} ] (s, a) = \langle \boldsymbol {\varphi} (s, a), \boldsymbol {w} _ {u} ^ {t} \rangle + V _ {u} ^ {t} (s _ {1}), \quad \boldsymbol {w} _ {u} ^ {t} = \Lambda_ {t} ^ {- 1} \sum_ {\tau = 1} ^ {t - 1} \boldsymbol {\varphi} (s _ {\tau}, a _ {\tau}) \bar {V} _ {u} ^ {k} (s _ {\tau + 1}). +$$ + +We can decompose $\langle \pmb {\varphi}(s,a),\pmb{w}_{u}^{t}\rangle$ as + +$$ +\langle \pmb {\varphi} (s, a), \pmb {w} _ {u} ^ {t} \rangle = \underbrace {\langle \pmb {\varphi} (s , a) , \Lambda_ {t} ^ {- 1} \sum_ {\tau = 1} ^ {t - 1} \pmb {\varphi} (s _ {\tau} , a _ {\tau}) [ P \bar {V} _ {u} ^ {t} ] (s _ {\tau} , a _ {\tau}) \rangle} _ {(a)} + \underbrace {\langle \pmb {\varphi} (s , a) , \Lambda_ {t} ^ {- 1} \sum_ {\tau = 1} ^ {t - 1} \pmb {\varphi} (s _ {\tau} , a _ {\tau}) (\bar {V} _ {u} ^ {t} (s _ {\tau + 1}) - [ P \bar {V} _ {u} ^ {t} ] (s _ {\tau} , a _ {\tau}))} _ {(b)}. +$$ + +Since $\bar{V}_u^t (s)\in [-H,H]$ for all $s\in S$ , it follows by Lemma A.3 that $\| \pmb {w}^{*}(\bar{V}_{u}^{t})\|_{2}\leq H\sqrt{d}$ . Hence, the first term $(a)$ in the display above can be bounded as + +$$ +\begin{array}{l} \langle \varphi (s, a), \Lambda_ {t} ^ {- 1} \sum_ {\tau = 1} ^ {t - 1} \varphi \left(s _ {\tau}, a _ {\tau}\right) [ P \bar {V} _ {u} ^ {t} ] \left(s _ {\tau}, a _ {\tau}\right) \rangle = \langle \varphi (s, a), \Lambda_ {t} ^ {- 1} \sum_ {\tau = 1} ^ {t - 1} \varphi \left(s _ {\tau}, a _ {\tau}\right) \varphi \left(s _ {\tau}, a _ {\tau}\right) ^ {T} \boldsymbol {w} ^ {*} (\bar {V} _ {u} ^ {t}) \rangle \\ = \left\langle \varphi (s, a), \boldsymbol {w} ^ {*} (\bar {V} _ {u} ^ {t}) \right\rangle - \lambda \left\langle \varphi (s, a), \Lambda_ {t} ^ {- 1} \boldsymbol {w} ^ {*} (\bar {V} _ {u} ^ {t}) \right\rangle \\ \leq \langle \varphi (s, a), w ^ {*} (\bar {V} _ {u} ^ {t}) \rangle + \lambda \| \varphi (s, a) \| _ {\Lambda_ {t} ^ {- 1}} \| w ^ {*} (\bar {V} _ {u} ^ {t}) \| _ {\Lambda_ {t} ^ {- 1}} \\ \leq \langle \boldsymbol {\varphi} (s, a), \boldsymbol {w} ^ {*} (\bar {V} _ {u} ^ {t}) \rangle + H \sqrt {\lambda d} \| \boldsymbol {\varphi} (s, a) \| _ {\Lambda_ {t} ^ {- 1}} \\ \end{array} +$$ + +where the first inequality is by Cauchy-Schwartz and the second inequality is by Lemma A.3. Under the event $\mathcal{E}$ defined in Lemma A.5, the second term $(b)$ can be bounded by + +$$ +\begin{array}{l} \langle \varphi (s, a), \Lambda_ {t} ^ {- 1} \sum_ {\tau = 1} ^ {t - 1} \varphi (s _ {\tau}, a _ {\tau}) (\bar {V} _ {u} ^ {t} (s _ {\tau + 1}) - [ P \bar {V} _ {u} ^ {t} ] (s _ {\tau}, a _ {\tau})) \\ \leq \| \varphi (s, a) \| _ {\Lambda_ {t} ^ {- 1}} \left\| \sum_ {\tau = 1} ^ {t - 1} \varphi \left(s _ {\tau}, a _ {\tau}\right) \left(V _ {u} ^ {t} \left(s _ {\tau + 1}\right) - \left[ P V _ {u} ^ {t} \right] \left(s _ {\tau}, a _ {\tau}\right)\right) \right\| _ {\Lambda_ {t} ^ {- 1}} \\ \leq C \cdot H d \sqrt {\log \left(\left(c _ {\beta} + 1\right) d T / \delta\right)} \cdot \| \varphi (s, a) \| _ {\Lambda_ {t} ^ {- 1}}. \\ \end{array} +$$ + +Combining the two bounds and rearranging, we get + +$$ +\langle \phi , \boldsymbol {w} _ {u} ^ {t} - \boldsymbol {w} ^ {*} (\bar {V} _ {u} ^ {t}) \rangle \leq C \cdot H d \sqrt {\left(\log \left(c _ {\beta} + 1\right) d T / \delta\right)} \cdot \| \phi \| _ {\Lambda_ {t} ^ {- 1}} +$$ + +for some absolute constant $C$ independent of $c_{\beta}$ . Lower bound of $\langle \phi, \pmb{w}_u^t - \pmb{w}^*(\bar{V}_u^t) \rangle$ can be shown similarly, establishing + +$$ +| \langle \boldsymbol {\phi}, \boldsymbol {w} _ {u} ^ {t} - \boldsymbol {w} ^ {*} (\bar {V} _ {u} ^ {t}) \rangle | \leq C \cdot H d \sqrt {\log ((c _ {\beta} + 1) d T / \delta)} \cdot \| \boldsymbol {\phi} \| _ {\Lambda_ {t} ^ {- 1}}. +$$ + +Hence, + +$$ +\begin{array}{l} \left. \right.\left|\left[ \widehat {P} _ {t} V _ {u} ^ {t} \right] (s, a) - \left[ P V _ {u} ^ {t} \right] (s, a) \right| = \left|\left\langle \varphi (s, a), \widehat {\boldsymbol {w}} _ {t} \left(V _ {u} ^ {t} - V _ {u} ^ {t} (s _ {1})\right)\right\rangle + V _ {u} ^ {t} (s _ {1}) - \left\langle \varphi (s, a), \boldsymbol {w} ^ {*} \left(V _ {u} ^ {t}\right)\right\rangle\right. \\ = | \langle \boldsymbol {\varphi} (s, a), \boldsymbol {w} _ {u} ^ {t} - \boldsymbol {w} ^ {*} (\bar {V} _ {u} ^ {t}) \rangle | \\ \leq C \cdot H d \sqrt {\log ((c _ {\beta} + 1) d T / \delta)} \cdot \| \phi \| _ {\Lambda_ {t} ^ {- 1}} \\ \end{array} +$$ + +where the last equality uses the fact that $\pmb{w}^{*}(V) = \int_{\mathcal{S}} V(s') \pmb{\mu}(s')$ is linear. It remains to show that there exists a choice of absolute constant $c_{\beta}$ such that + +$$ +C \sqrt {\log (c _ {\beta} + 1) + \log (d T / \delta)} \leq c _ {\beta} \sqrt {\log (d T / \delta)}. +$$ + +Noting that $\log (dT / \delta)\geq \log 2$ , this can be done by choosing an absolute constant $c_{\beta}$ that satisfies $C\sqrt{\log 2 + \log(c_{\beta} + 1)}\leq c_{\beta}\sqrt{\log 2}$ . + +Lemma A.6. The clipping operation $\mathrm{CLIP}(x;L,U)$ has the following properties: + +(i) $\operatorname{CLIP}(x;L,U) = \operatorname{CLIP}(x - c;L - c,U - c) + c.$ +(ii) $\operatorname{CLIP}(x;L,U)\leq \operatorname{CLIP}(y;L,U)$ if $x\leq y$ +(iii) $\operatorname{CLIP}(x; L, U) \leq x$ if and only if $x \geq L$ . +(iv) $\operatorname{CLIP}(x; L, U) \geq \operatorname{CLIP}(x; L', U')$ if $L \geq L'$ and $U \geq U'$ . + +Proof. The proofs are straight from the definition. + +# B. Deviation-Controlled Value Iteration + +# B.1. Positive Result for Tabular MDPs + +In this section, we show that the scheme used in the algorithm $\gamma$ -LSCVI-UCB+ for controlling the deviation between chains of value functions with different clipping thresholds is not necessary in the tabular setting. + +To reuse the notations developed for the linear setting, we treat the tabular setting with the size of the state space $S$ and the size of the action space $A$ as the $SA$ -dimensional linear MDP setting where each pair $(s,a)\in S\times A$ is mapped to a one-hot encoded vector $\varphi (s,a) = e_{(s,a)}\in \mathbb{R}^{SA}$ where the entry associated to $(s,a)$ is equal to 1 and all other entries 0. We show that under the tabular setting, Algorithm 3 that removes the step for clipping $Q_{u}^{t}$ from $\gamma$ -LSCVI-UCB+ successfully controls the deviation of a chain of value functions from its previous chain. Note that the algorithm uses the doubling-trick that updates the covariance matrix used for regression only when its determinant doubles. The trick is used to facilitate the analysis of the difference $Q_{u}^{t}(s,a) - Q_{u}^{t + 1}(s,a)$ shown in the proof of the lemma below. + +We use $\lambda = 0$ and treat $\Lambda_t^{-1}$ as the pseudoinverse of $\Lambda$ , and set $\| \varphi(s, a) \|_{\Lambda_t^{-1}} = \frac{1}{1 - \gamma}$ when $\| \varphi(s, a) \|_{\Lambda_t^{-1}} = 0$ , that is, when the direction $\varphi(s, a)$ is never explored. Then, as shown in the following lemma, the deviation between chains of value iterations is controlled even without the extra scheme used for the linear MDP setting. + +Lemma B.1. When running $\gamma$ -LSCVI-UCB+ algorithm without deviation control under the tabular setting, for all $t \in [T]$ , $u \in [t : T]$ , we have + +$$ +\left| \tilde {V} _ {u} ^ {t + 1} (s) - \tilde {V} _ {u} ^ {t} (s) \right| \leq m _ {t} - m _ {t + 1} +$$ + +$$ +\left| V _ {u} ^ {t + 1} (s) - V _ {u} ^ {t} (s) \right| \leq m _ {t} - m _ {t + 1} +$$ + +for all $s\in S$ + +Proof. We introduce the notation $N_{t}(s,a) = \sum_{\tau=1}^{t-1}\mathbb{I}\{s_{\tau} = s, a_{\tau} = a\}$ and $N_{t}(s,a,s') = \sum_{\tau=1}^{t-1}\mathbb{I}\{s_{\tau} = s, a_{\tau} = a, s_{\tau+1} = s'\}$ , which is the visitation counts up to (excluding) time step $t$ of the state-action pair $(s,a)$ and state-action-state triplet $(s,a,s')$ , respectively. Note that in the tabular setting, we have $[\widehat{P}_{t}V](s,a) =$ + +Algorithm 3 $\gamma$ -LSCVI-UCB+ without Deviation Control +Input: Discounting factor $\gamma \in [0,1)$ , regularization constant $\lambda > 0$ , span $H > 0$ , bonus factor $\beta > 0$ . +Initialize: $k \gets 1, t_k \gets 1, \Lambda_1 \gets \lambda I, m_1 \gets \frac{1}{1 - \gamma}$ . +1: Receive state $s_1$ . +2: for $t = 1, \ldots, T$ do +3: $V_{T + 1}^t(\cdot) \gets \frac{1}{1 - \gamma}$ . +4: for $u = T, T - 1, \ldots, t$ do +5: $Q_u^t(\cdot, \cdot) \gets (r(\cdot, \cdot) + \gamma([\widehat{P}_{t_k} V_{u + 1}^t](\cdot, \cdot) + \beta \| \varphi(\cdot, \cdot) \|_{\Lambda_{t_k}^{-1}})) \wedge \frac{1}{1 - \gamma}$ . +6: $\widetilde{V}_u^t(\cdot) \gets \max_a Q_u^t(\cdot, a)$ . +7: $V_u^t(\cdot) \gets \mathrm{CLIP}(\widetilde{V}_u^t(\cdot); m_t, m_t + H)$ . +8: end for +9: Take action $a_t \gets \operatorname{argmax}_{a \in A} Q_t^t(st, a)$ . Receive reward $r(st, a_t)$ . Receive next state $s_{t+1}$ . +10: $\Lambda_{t+1} \gets \Lambda_t + \varphi(st, a_t) \varphi(st, a_t)^\top$ . +11: $m_{t+1} \gets \widetilde{V}_{t+1}^t(st+1) \wedge m_t$ . +12: if $2 \det(\Lambda_{t_k}) < \det(\Lambda_{t+1})$ then +13: $k \gets k + 1, t_k \gets t + 1$ . +14: end if +15: end for + +$\sum_{s':N_t(s,a,s') > 0}(N_t(s,a,s') / N_t(s,a))V(s')$ , which is the expectation of $V$ with respect to the empirical transition probability kernel $\widehat{P}_t$ : $\widehat{P}_t(s'|s,a) = N_t(s,a,s') / N_t(s,a)$ . Hence, $\widehat{P}_t$ is linear such that $[\widehat{P}_tV_1](s,a) - [\widehat{P}_tV_2](s,a) = [\widehat{P}_t(V_1 - V_2)](s,a)$ , and it satisfies $[\widehat{P}_t\Delta](s,a) \leq \| \Delta \|_{\infty}$ for any function $\Delta : S \to \mathbb{R}$ . We exploit these facts to prove the lemma. + +We show by induction on $u = T + 1, \ldots, 1$ . Fix $t$ such that both $t$ and $t + 1$ are in the same episode $k$ . For the base case $u = T + 1$ , we have $V_{T + 1}^{t + 1}(s) = V_{T + 1}^{t}(s) = \frac{1}{1 - \gamma}$ for all $s \in S$ , and trivially, we have $|V_{T + 1}^{t + 1}(s) - V_{T + 1}^{t}(s)| \leq m_t - m_{t + 1}$ . Now, suppose $|V_{u + 1}^{t + 1}(s) - V_{u + 1}^{t}(s)| \leq m_t - m_{t + 1}$ for all $s \in S$ for some $u \in [T]$ . Then, + +$$ +\left| Q _ {u} ^ {t} (s, a) - Q _ {u} ^ {t + 1} (s, a) \right| \leq \gamma \left(\left[ \widehat {P} _ {t _ {k}} V _ {u + 1} ^ {t} \right] (s, a) - \left[ \widehat {P} _ {t _ {k}} V _ {u + 1} ^ {t + 1} \right] (s, a)\right) \leq m _ {t} - m _ {t + 1} +$$ + +where the first inequality is by the fact that $(\cdot \wedge \frac{1}{1 - \gamma})$ is a contraction and the second inequality is by the previous discussion on $\widehat{P}_{t_k}$ being a expectation with respect to a proper probability kernel in the tabular setting. Since $\max_{a} Q(\cdot, a)$ is a contraction, it follows that $|\widetilde{V}_u^t(s) - \widetilde{V}_u^{t+1}(s)| \leq m_t - m_{t+1}$ . Hence, using the fact that $m_t \geq m_{t+1}$ , we have + +$$ +\begin{array}{l} V _ {u} ^ {t} (s) - V _ {u} ^ {t + 1} (s) = \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s); m _ {t}, m _ {t} + H\right) - \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t + 1} (s); m _ {t + 1}, m _ {t + 1} + H\right) \\ \leq \mathrm {C L I P} (\widetilde {V} _ {u} ^ {t + 1} (s) + m _ {t} - m _ {t + 1}; m _ {t}, m _ {t} + H) - \mathrm {C L I P} (\widetilde {V} _ {u} ^ {t + 1} (s); m _ {t + 1}, m _ {t + 1} + H) \\ = \mathrm {C L I P} (\widetilde {V} _ {u} ^ {t + 1} (s); m _ {t + 1}, m _ {t + 1} + H) + m _ {t} - m _ {t + 1} - \mathrm {C L I P} (\widetilde {V} _ {u} ^ {t + 1} (s); m _ {t + 1}, m _ {t + 1} + H) \\ = m _ {t} - m _ {t + 1} \\ \end{array} +$$ + +where the second equality uses the property (i) of the clipping operation. Similarly, we have + +$$ +\begin{array}{l} V _ {u} ^ {t} (s) - V _ {u} ^ {t + 1} (s) = \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s); m _ {t}, m _ {t} + H\right) - \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t + 1} (s); m _ {t + 1}, m _ {t + 1} + H\right) \\ \geq \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s); m _ {t}, m _ {t} + H\right) - \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t + 1} (s); m _ {t}, m _ {t} + H\right) \\ \geq \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s); m _ {t}, m _ {t} + H\right) - \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s) - m _ {t} + m _ {t + 1}; m _ {t}, m _ {t} + H\right) \\ = \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s); m _ {t}, m _ {t} + H\right) - \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s); m _ {t + 1}, m _ {t + 1} + H\right) - m _ {t} + m _ {t + 1} \\ \geq - m _ {t} + m _ {t + 1} \\ \end{array} +$$ + +where the second equality uses the property (i) of the clipping operation. The two inequalities establish $|V_u^t(s) - V_u^{r+1}(s)| \leq m_t - m_{t+1}$ as desired. By induction, the proof is complete. + +# B.2. Negative Result for Linear MDPs + +Proof of Lemma 3.1. For convenience, let $n = 2m$ . If $n$ is odd, we can take $\phi_n = \mathbf{0}$ and similar argument holds. Take $\phi_1, \ldots, \phi_m = (\eta, 1/2, 0, \ldots, 0)$ and $\phi_{m+1}, \ldots, \phi_{2m} = (\eta, -1/2, 0, \ldots, 0)$ where $\eta > 0$ is to be chosen later. Take $y_1 = \cdots = y_{2m} = \Delta$ and $\lambda = 1$ . Then, $\Lambda_n = \mathrm{diag}(\eta^2 n, n/4, 0, \ldots, 0) + I$ and $\sum_{i=1}^{n} y_i \phi_i = (\eta \Delta n, 0, \ldots, 0)$ . Hence, $\boldsymbol{w}_n = (\frac{\eta \Delta n}{\eta^2 n+1}, 0, \ldots, 0)$ . It follows that, choosing $\phi = (1, 0, \ldots, 0)$ , we get + +$$ +| \langle \pmb {w} _ {n}, \phi \rangle | = \frac {\eta \Delta n}{\eta^ {2} n + 1}. +$$ + +Choosing $\eta = 1 / \sqrt{n}$ , we get $|\langle \pmb{w}_n, \phi \rangle| = \frac{1}{2} \Delta \sqrt{n}$ , which completes the proof. + +# B.3. Deviation-Controlled Value Iteration for Linear MDPs + +Lemma B.2. For all $t\in [T]$ $u\in [t:T]$ , we have + +$$ +\left| \widetilde {V} _ {u} ^ {t + 1} (s) - \widetilde {V} _ {u} ^ {t} (s) \right| \leq m _ {t - 1} - m _ {t + 1} +$$ + +$$ +\left| V _ {u} ^ {t + 1} (s) - V _ {u} ^ {t} (s) \right| \leq m _ {t - 1} - m _ {t + 1} +$$ + +for all $s\in S$ + +Proof. We first show that $\widetilde{V}_u^{t + 1}(s) - \widetilde{V}_u^t (s)\geq -m_{t - 1} + m_{t + 1}$ and $V_{u}^{t + 1}(s) - V_{u}^{t}(s)\geq -m_{t - 1} + m_{t + 1}$ . By definitions of $Q_{u}^{t + 1}$ and $Q_{u}^{t}$ , we have + +$$ +\begin{array}{l} Q _ {u} ^ {t + 1} (s, a) = \operatorname {C L I P} \left(\widetilde {Q} _ {u} ^ {t + 1} (s, a); L _ {u} ^ {t + 1} (s, a), U _ {u} ^ {t + 1} (s, a)\right) \\ \geq L _ {u} ^ {t + 1} (s, a) \\ = \left(\widetilde {Q} _ {u} ^ {t} (s, a) - m _ {t} + m _ {t + 1}\right) \vee \left(\widetilde {Q} _ {u} ^ {t - 1} (s, a) - m _ {t - 1} + m _ {t + 1}\right) \\ \geq \widetilde {Q} _ {u} ^ {t - 1} (s, a) - m _ {t - 1} + m _ {t + 1}, \\ \end{array} +$$ + +and + +$$ +\begin{array}{l} Q _ {u} ^ {t} (s, a) = \operatorname {C L I P} \left(\widetilde {Q} _ {u} ^ {t} (s, a); L _ {u} ^ {t} (s, a), U _ {u} ^ {t} (s, a)\right) \\ \leq U _ {u} ^ {t} (s, a) \\ = \widetilde {Q} _ {u} ^ {t - 1} (s, a) \wedge \widetilde {Q} _ {u} ^ {t - 2} (s, a) \\ \leq \widetilde {Q} _ {u} ^ {t - 1} (s, a). \\ \end{array} +$$ + +Chaining the two inequalities, we get $Q_{u}^{t + 1}(s,a)\geq Q_{u}^{t}(s,a) - m_{t - 1} + m_{t + 1}$ . It follows that + +$$ +\begin{array}{l} \widetilde {V} _ {u} ^ {t + 1} (s) = \max _ {a} Q _ {u} ^ {t + 1} (s, a) \\ \geq \max _ {a} Q _ {u} ^ {t} (s, a) - m _ {t - 1} + m _ {t + 1} \\ = \tilde {V} _ {u} ^ {t} (s) - m _ {t - 1} + m _ {t + 1}, \\ \end{array} +$$ + +which shows the first claim. Hence, + +$$ +\begin{array}{l} V _ {u} ^ {t + 1} (s) = \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t + 1} (s); m _ {t + 1}, m _ {t + 1} + H\right) \\ \geq \operatorname {C L I P} \left(\tilde {V} _ {u} ^ {t} (s) - m _ {t - 1} + m _ {t + 1}; m _ {t + 1}, m _ {t + 1} + H\right) \\ = \operatorname {C L I P} \left(\tilde {V} _ {u} ^ {t} (s); m _ {t - 1}, m _ {t - 1} + H\right) - m _ {t - 1} + m _ {t + 1} \\ \geq \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s); m _ {t}, m _ {t} + H) - m _ {t - 1} + m _ {t + 1} \right. \\ = V _ {u} ^ {t} (s) - m _ {t - 1} + m _ {t + 1}, \\ \end{array} +$$ + +where the second equality is by Property (i) of the clipping operation and the second inequality is by Property (iv) of the clipping operation and the fact that $m_{t-1} \geq m_t$ . This shows the second claim. + +Now, we show that $\widetilde{V}_u^{t + 1}(s) - \widetilde{V}_u^t (s)\leq m_{t - 1} - m_{t + 1}$ and $V_{u}^{t + 1}(s) - V_{u}^{t}(s)\leq m_{t - 1} - m_{t + 1}$ . By definitions of $Q_{u}^{t + 1}$ and $Q_{u}^{t}$ , we have + +$$ +\begin{array}{l} Q _ {u} ^ {t + 1} (s, a) = \operatorname {C L I P} \left(\widetilde {Q} _ {u} ^ {t + 1} (s, a); L _ {u} ^ {t + 1} (s, a), U _ {u} ^ {t + 1} (s, a)\right) \\ \leq U _ {u} ^ {t + 1} (s, a) \\ = \widetilde {Q} _ {u} ^ {t} (s, a) \wedge \widetilde {Q} _ {u} ^ {t - 1} (s, a) \\ \leq \widetilde {Q} _ {u} ^ {t - 1} (s, a), \\ \end{array} +$$ + +and + +$$ +\begin{array}{l} Q _ {u} ^ {t} (s, a) = \operatorname {C L I P} \left(\widetilde {Q} _ {u} ^ {t} (s, a); L _ {u} ^ {t} (s, a), U _ {u} ^ {t} (s, a)\right) \\ \geq L _ {u} ^ {t} (s, a) \\ = \left(\bar {Q} _ {u} ^ {t - 1} (s, a) - m _ {t} + m _ {t + 1}\right) \vee \left(\bar {Q} _ {u} ^ {t - 2} (s, a) - m _ {t - 1} + m _ {t + 1}\right) \\ \geq \bar {Q} _ {u} ^ {t - 1} (s, a) - m _ {t} + m _ {t + 1} \\ \geq \widetilde {Q} _ {u} ^ {t - 1} (s, a) - m _ {t - 1} + m _ {t + 1}. \\ \end{array} +$$ + +Chaining the two inequalities, we get $Q_{u}^{t + 1}(s,a) \leq Q_{u}^{t}(s,a) + m_{t - 1} - m_{t + 1}$ , and it follows that + +$$ +\begin{array}{l} \widetilde {V} _ {u} ^ {t + 1} = \max _ {a} Q _ {u} ^ {t + 1} (s, a) \\ \leq \max _ {a} Q _ {u} ^ {t} (s, a) + m _ {t - 1} - m _ {t + 1} \\ = \tilde {V} _ {u} ^ {t} (s) + m _ {t - 1} - m _ {t + 1}, \\ \end{array} +$$ + +which shows the first claim. Hence, + +$$ +\begin{array}{l} V _ {u} ^ {t + 1} (s) = \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t + 1} (s); m _ {t + 1}, m _ {t + 1} + H\right) \\ \leq \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s) + m _ {t} - m _ {t + 1}; m _ {t + 1}, m _ {t + 1} + H\right) \\ \leq \operatorname {C L I P} \left(\tilde {V} _ {u} ^ {t} (s) + m _ {t} - m _ {t + 1}; m _ {t}, m _ {t} + H\right) \\ = \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s); m _ {t + 1}, m _ {t + 1} + H\right) + m _ {t} - m _ {t + 1} \\ \leq \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s); m _ {t}, m _ {t} + H\right) + m _ {t} - m _ {t + 1} \\ = V _ {u} ^ {t} (s) + m _ {t} - m _ {t + 1} \\ \leq V _ {u} ^ {t} (s) + m _ {t - 1} - m _ {t + 1}. \\ \end{array} +$$ + +# C. Regret Analysis + +We first prove the optimism result that says the value function estimates are optimistic estimates of the true value function. + +# C.1. Proof of Lemma 3.4 + +Proof of Lemma 3.4. We prove under the event $\mathcal{E}$ defined in Lemma A.5, which holds with probability at least $1 - \delta$ . We prove by induction on $t$ and $u$ . + +Suppose $V_{u}^{\tau}(s) \geq V^{*}(s)$ , $\widetilde{V}_{u}^{\tau}(s) \geq V^{*}(s)$ and $\widetilde{Q}_{\underline{u}}^{\tau}(s,a) \geq Q^{*}(s,a)$ hold for all $\tau = 1,\dots ,t - 1$ and $u \in [\tau :T]$ and $(s,a) \in S \times \mathcal{A}$ . If we show that $V_{u}^{t}(s) \geq V^{*}(s)$ , $\widetilde{V}_{u}^{t}(s)$ and $\widetilde{Q}_{u}^{t}(s,a) \geq Q^{*}(s,a)$ for all $u \in [t:T]$ and $(s,a) \in S \times \mathcal{A}$ , the proof is complete by induction on $t$ . We show this by induction on $u = T + 1,T,\ldots ,t$ . + +The base case $u = T + 1$ holds since $V_{T + 1}^{t}(s) = \frac{1}{1 - \gamma} \geq V^{*}(s)$ for all $s \in S$ . Now, suppose $V_{u + 1}^{t}(s) \geq V^{*}(s)$ for all + +$s\in S$ for some $u\in [t + 1:T]$ . Then, + +$$ +\begin{array}{l} \widetilde {Q} _ {u} ^ {t} (s, a) = \left(r (s, a) + \gamma \left(\left[ \widehat {P} _ {t} V _ {u + 1} ^ {t} \right] (s, a) + \beta \| \varphi (s, a) \| _ {\Lambda_ {t} ^ {- 1}}\right) \wedge \frac {1}{1 - \gamma} \right. \\ \geq \left(r (s, a) + \gamma \left[ P V _ {u + 1} ^ {t} \right] (s, a)\right) \wedge \frac {1}{1 - \gamma} \\ \geq (r (s, a) + \gamma [ P V ^ {*} ] (s, a)) \wedge \frac {1}{1 - \gamma} \\ = Q ^ {*} (s, a) \wedge \frac {1}{1 - \gamma} \\ = Q ^ {*} (s, a) \\ \end{array} +$$ + +where the first inequality is by the event $\mathcal{E}$ , the second inequality by the induction hypothesis. The second equality is by the Bellman optimality equation. This shows $\bar{Q}_u^t (s,a)\geq Q^* (s,a)$ for all $(s,a)\in S\times \mathcal{A}$ as desired. Additionally, + +$$ +\begin{array}{l} Q _ {u} ^ {t} (s, a) = \operatorname {C L I P} \left(\widetilde {Q} _ {u} ^ {t} (s, a); L _ {u} ^ {t} (s, a), U _ {u} ^ {t} (s, a)\right) \\ \geq \operatorname {C L I P} \left(Q ^ {*} (s, a); L _ {u} ^ {t} (s, a), U _ {u} ^ {t} (s, a)\right) \\ \geq Q ^ {*} (s, a) \wedge U _ {u} ^ {t} (s, a) \\ = Q ^ {*} (s, a) \wedge (\widetilde {Q} _ {u} ^ {t - 1} (s, a) \wedge \widetilde {Q} _ {u} ^ {t - 2} (s, a)) \\ \geq Q ^ {*} (s, a) \\ \end{array} +$$ + +where the second inequality is by the clipping property (ii), and the last inequality holds by induction hypothesis. It follows that + +$$ +\widetilde {V} _ {u} ^ {t} (s) = \max _ {a} Q _ {u} ^ {t} (s, a) \geq \max _ {a} Q ^ {*} (s, a) = V ^ {*} (s). +$$ + +Note that by induction hypothesis, $\widetilde{V}_u^\tau(s) \geq V^*(s)$ for all $\tau \in [t-1]$ , $u \in [\tau : T]$ and $s \in S$ . Hence, $m_t = \min\{\widetilde{V}_t^{t-1}(s_t), \widetilde{V}_{t-1}^{t-2}(s_{t-1}), \ldots, \widetilde{V}_2^1(s_2) \geq \min\{V^*(s_t), V^*(s_{t-1}), \ldots, V^*(s_2), \frac{1}{1-\gamma}\} \geq \min_{s \in S} V^*(s)$ . It follows that + +$$ +\begin{array}{l} V _ {u} ^ {t} (s) = \operatorname {C L I P} \left(\widetilde {V} _ {u} ^ {t} (s); m _ {t}, m _ {t} + H\right) \\ \geq \operatorname {C L I P} (V ^ {*} (s); m _ {t}, m _ {t} + H) \\ \geq \operatorname {C L I P} (V ^ {*} (s); \min _ {s ^ {\prime} \in \mathcal {S}} V ^ {*} (s ^ {\prime}), \min _ {s ^ {\prime} \in \mathcal {S}} V ^ {*} (s ^ {\prime}) + H) \\ \geq V ^ {*} (s) \\ \end{array} +$$ + +where the last inequality uses the fact that $H \geq 2 \cdot \mathfrak{sp}(v^{*})$ is chosen such that $\mathfrak{sp}(V^{*}) \leq H$ . We have shown that if $V_{u + 1}^t (s) \geq V^* (s)$ holds for all $s \in S$ , then $V_{u}^{t}(s) \geq V^{*}(s)$ , $\widetilde{V}_u^t (s)$ and $\widetilde{Q}_u^t (s,a)$ hold for all $(s,a) \in S \times \mathcal{A}$ . By induction on $u = T, \ldots, 1$ , it follows that $V_{u}^{t}(s) \geq V^{*}(s)$ , $\widetilde{V}_{u}^{t}(s) \geq V^{*}(s)$ and $\widetilde{Q}_u^t (s,a) \geq Q^* (s,a)$ hold for all $(s,a) \in S \times \mathcal{A}$ . The proof is complete by induction on $t$ . + +Now, we show an upper bound of the action value function estimate, which is a direct consequence of the concentration inequality in Lemma A.5. + +# C.2. Proof of Lemma 3.5 + +Proof of Lemma 3.5. We prove under the event $\mathcal{E}$ defined in Lemma A.5, which holds with probability at least $1 - \delta$ . Fix any $t \in [T]$ and $u \in [t : T]$ . By event $\mathcal{E}$ , we have + +$$ +\begin{array}{l} \widetilde {Q} _ {u} ^ {t} (s, a) = \left(r (s, a) + \gamma \left(\left[ \widehat {P} _ {t} V _ {u + 1} ^ {t} \right] (s, a) + \beta \| \varphi (\cdot , \cdot) \| _ {\Lambda_ {t} ^ {- 1}}\right) \wedge \frac {1}{1 - \gamma} \right. \\ \leq r (s, a) + \gamma [ P V _ {u + 1} ^ {t} ] (s, a) + 2 \beta \| \boldsymbol {\varphi} (s, a) \| _ {\Lambda_ {t} ^ {- 1}} \\ \end{array} +$$ + +for all $t\in [T]$ . Hence, by Lemma B.2, we have for $t\geq 4$ that + +$$ +\begin{array}{l} \widetilde {Q} _ {u} ^ {t - 2} (s, a) \leq r (s, a) + \gamma [ P V _ {u + 1} ^ {t - 2} ] (s, a) + 2 \beta \| \varphi (s, a) \| _ {\Lambda_ {t} ^ {- 1}} \\ \leq r (s, a) + \gamma [ P (V _ {u + 1} ^ {t}) ] (s, a) + 2 \beta \| \varphi (s, a) \| _ {\Lambda_ {t} ^ {- 1}} + m _ {t - 3} - m _ {t - 1} + m _ {t - 2} - m _ {t} \\ \leq r (s, a) + \gamma \left[ P V _ {u + 1} ^ {t} \right] (s, a) + 2 \beta \left\| \boldsymbol {\varphi} (s, a) \right\| _ {\Lambda_ {t} ^ {- 1}} + 2 \left(m _ {t - 3} - m _ {t}\right). \\ \end{array} +$$ + +Therefore, for $t \geq 4$ , we have + +$$ +\begin{array}{l} Q _ {u} ^ {t} (s, a) = \operatorname {C L I P} \left(\widetilde {Q} _ {u} ^ {t} (s, a); L _ {u} ^ {t} (s, a), U _ {u} ^ {t} (s, a)\right) \\ \leq U _ {u} ^ {t} (s, a) \\ = \widetilde {Q} _ {u} ^ {t - 1} (s, a) \wedge \widetilde {Q} _ {u} ^ {t - 2} (s, a) \\ \leq r (s, a) + \gamma \left[ P V _ {u + 1} ^ {t} \right] (s, a) + 2 \beta \| \boldsymbol {\varphi} (s, a) \| _ {\Lambda_ {t} ^ {- 1}} + 2 \left(m _ {t - 3} - m _ {t}\right) \\ \end{array} +$$ + +![](images/185c240a80dead58e114b79084ac737fbe6f6280323f4d1216ca44d88885cc30.jpg) + +Finally, the following lemma will be used for bounding the sum of the bonus terms. + +Lemma C.1 (Lemma 11 in Abbasi-Yadkori et al. (2011)). Let $\{\phi_t\}_{t\geq 1}$ be a bounded sequence in $\mathbb{R}^d$ with $\| \phi_t\| _2\leq 1$ for all $t\geq 1$ . Let $\Lambda_0 = I$ and $\Lambda_{t} = \sum_{i = 1}^{t}\phi_{i}\phi_{i}^{T} + I$ for $t\geq 1$ . Then, + +$$ +\sum_ {i = 1} ^ {t} \phi_ {i} ^ {T} \Lambda_ {i - 1} ^ {- 1} \phi_ {i} \leq 2 \log \det (\Lambda_ {t}) \leq 2 d \log (1 + t). +$$ + +# C.3. Proof of Main Theorem + +Now, we are ready to prove the main theorem. + +Proof of Theorem 3.6. We prove under the event $\mathcal{E}$ defined in Lemma A.5, which occurs with probability at least $1 - \delta$ . By Lemma 3.5, we have for $t \geq 4$ , + +$$ +Q _ {u} ^ {t} (s, a) \leq r (s, a) + \gamma [ P V _ {u + 1} ^ {t} ] (s, a) + 2 \beta \| \varphi (s, a) \| _ {\Lambda_ {t} ^ {- 1}} + 2 (m _ {t - 3} - m _ {t}). +$$ + +Plugging in $u\gets t,s\gets s_t,a\gets a_t$ ,we get + +$$ +\begin{array}{l} R _ {T} = \sum_ {t = 1} ^ {T} \left(J ^ {*} - r \left(s _ {t}, a _ {t}\right)\right) \\ \leq \sum_ {t = 4} ^ {T} \left(J ^ {*} - Q _ {t} ^ {t} \left(s _ {t}, a _ {t}\right) + \gamma \left[ P V _ {t + 1} ^ {t} \right] \left(s _ {t}, a _ {t}\right) + 2 \beta \| \varphi \left(s _ {t}, a _ {t}\right) \| _ {\Lambda_ {t} ^ {- 1}} + 2 \left(m _ {t - 3} - m _ {t}\right)\right) + \mathcal {O} (1) \\ = \underbrace {\sum_ {t = 4} ^ {T} (J ^ {*} - (1 - \gamma) V _ {t + 1} ^ {t} (s _ {t + 1}))} _ {(a)} + \underbrace {\sum_ {t = 4} ^ {T} (V _ {t + 1} ^ {t} (s _ {t + 1}) - Q _ {t} ^ {t} (s _ {t} , a _ {t}))} _ {(b)} \\ + \gamma \underbrace {\sum_ {t = 4} ^ {T} ([ P V _ {t + 1} ^ {t} ] (s _ {t} , a _ {t}) - V _ {t + 1} ^ {t} (s _ {t + 1}))} _ {(c)} + 2 \underbrace {\beta \sum_ {t = 4} ^ {T} \| \varphi (s _ {t} , a _ {t}) \| _ {\Lambda_ {t} ^ {- 1}}} _ {(d)} + \mathcal {O} (\frac {1}{1 - \gamma}). \\ \end{array} +$$ + +Bounding (a) By the optimism result (Lemma 3.4), we have $V_{u}^{t}(s) \geq V^{*}(s)$ for all $t \in [T]$ and $u \in [t : T]$ with high probability. It follows that + +$$ +\begin{array}{l} J ^ {*} - (1 - \gamma) V _ {t + 1} ^ {t} \left(s _ {t + 1}\right) \leq J ^ {*} - (1 - \gamma) V ^ {*} \left(s _ {t + 1}\right) \\ \leq (1 - \gamma) \operatorname {s p} \left(v ^ {*}\right) \\ \end{array} +$$ + +where the last inequality is by the bound on the error of approximating the average-reward setting by the discounted setting provided in Lemma 2.3. Hence, the term $(a)$ can be bounded by $T(1 - \gamma)\mathrm{sp}(v^{*})$ . + +Bounding (b) Using Lemma 3.2 that controls the difference between $\widetilde{V}_u^{t + 1}$ and $\widetilde{V}_u^t$ , we have + +$$ +\begin{array}{l} V _ {t + 1} ^ {t} \left(s _ {t + 1}\right) = \operatorname {C L I P} \left(\widetilde {V} _ {t + 1} ^ {t} \left(s _ {t + 1}\right); m _ {t}, m _ {t} + H\right) \\ = \operatorname {C L I P} \left(\widetilde {V} _ {t + 1} ^ {t} \left(s _ {t + 1}\right) - m _ {t} + m _ {t + 1}; m _ {t + 1}, m _ {t + 1} + H\right) + m _ {t} - m _ {t + 1} \\ \leq \operatorname {C L I P} \left(\widetilde {V} _ {t + 1} ^ {t} \left(s _ {t + 1}\right); m _ {t + 1}, m _ {t + 1} + H\right) + m _ {t} - m _ {t + 1} \\ \leq \widetilde {V} _ {t + 1} ^ {t} (s _ {t + 1}) + m _ {t} - m _ {t + 1} \\ \leq \widetilde {V} _ {t + 1} ^ {t + 1} (s _ {t + 1}) + 2 m _ {t - 1} - 2 m _ {t + 1} \\ \end{array} +$$ + +where the second inequality holds because $\widetilde{V}_{t+1}^t(s_{t+1}) \geq m_{t+1}$ by Line 15. Hence, Term (b) can be bounded by $\mathcal{O}\left(\frac{1}{1-\gamma}\right)$ using telescoping sums of $\widetilde{V}_{t+1}^{t+1}(s_{t+1}) - \widetilde{V}_t^t(s_t)$ and $2m_{t-1} - 2m_{t+1}$ , and the fact that $V_u^t \leq \frac{1}{1-\gamma}$ and $m_t \leq \frac{1}{1-\gamma}$ for all $t \in [T]$ and $u \in [t:T]$ . + +Bounding (c) Since $V_{u}^{t}$ is $\mathcal{F}_t$ -measurable where $\mathcal{F}_t$ is history up to time step $t$ , we have $\mathbb{E}[V_{t + 1}^t (s_{t + 1})|\mathcal{F}_t] = [PV_{t + 1}^t ](s_t,a_t)$ , making the summation (c) a summation of a martingale difference sequence. Since $\mathrm{sp}(V_{t + 1}^t)\leq H$ for all $t\in [T]$ , the summation can be bounded by $\mathcal{O}(\mathrm{sp}(v^{*})\sqrt{T\log(1 / \delta)})$ using Azuma-Hoeffding inequality. + +Bounding (d) The sum of the bonus terms can be bounded by + +$$ +\begin{array}{l} \beta \sum_ {t = 1} ^ {T} \| \varphi (s _ {t}, a _ {t}) \| _ {\Lambda_ {t} ^ {- 1}} \leq \beta \sqrt {T} \left(\sum_ {t = 1} ^ {T} \| \varphi (s _ {t}, a _ {t}) \| _ {\Lambda_ {t} ^ {- 1}} ^ {2}\right) ^ {1 / 2} \\ \leq \mathcal {O} (\beta \sqrt {d T \log T}) \\ \end{array} +$$ + +where the first inequality is by Cauchy-Schwartz and the last inequality is by Lemma C.1. + +Combining the four bounds, and choosing $H = 2 \cdot \mathrm{sp}(v^{*})$ and choosing $\beta = \mathcal{O}(\mathrm{sp}(v^{*})d\sqrt{\log(dT / \delta)})$ specified in Lemma 3.3, we get + +$$ +R _ {T} \leq \mathcal {O} (T (1 - \gamma) \mathrm {s p} (v ^ {*}) + \frac {1}{1 - \gamma} + \mathrm {s p} (v ^ {*}) \sqrt {T \log (1 / \delta)} + \mathrm {s p} (v ^ {*}) \sqrt {d ^ {3} T \log (d T / \delta) \log T}). +$$ + +Choosing $\gamma$ such that $\frac{1}{1 - \gamma} = \sqrt{T}$ , we get + +$$ +R _ {T} \leq \mathcal {O} (\mathrm {s p} (v ^ {*}) \sqrt {d ^ {3} T \log (d T / \delta) \log T}). +$$ + +# D. Covering Numbers + +In this section, we provide results on covering numbers of function classes used in this paper. We use the notation $\mathcal{N}_{\epsilon}(\mathcal{F},\| \cdot \|)$ to denote the $\varepsilon$ -covering number of the function class $\mathcal{F}$ with respect to the distance measure induced by the norm $\| \cdot \|$ . + +We first present a classical result that bounds the covering number of Euclidean ball. + +Lemma D.1. For any $\varepsilon > 0$ , the $d$ -dimensional Euclidean ball $\mathbb{B}_d(R)$ with radius $R > 0$ has log-covering number upper bounded by + +$$ +\log \mathcal {N} _ {\varepsilon} (\mathbb {B} _ {d} (R), \| \cdot \| _ {2}) \leq d \log (1 + 2 R / \varepsilon). +$$ + +Using this classical result, we bound the covering number of the function class that captures the functions $\widetilde{Q}_u^t (\cdot ,\cdot)$ encountered by our algorithm. + +Lemma D.2 (Adaptation of Lemma D.6 in Jin et al. (2020)). Let $\mathcal{Q}$ be a class of functions mapping from $\mathcal{S} \times \mathcal{A}$ to $\mathbb{R}$ with the following parametric form + +$$ +Q (\cdot , \cdot) = \left(\boldsymbol {w} ^ {T} \boldsymbol {\varphi} (\cdot , \cdot) + v + \beta \sqrt {\boldsymbol {\varphi} (\cdot , \cdot) ^ {T} \Lambda^ {- 1} \boldsymbol {\varphi} (\cdot , \cdot)}\right) \wedge M \tag {2} +$$ + +where the parameters $(\boldsymbol{w},\beta ,v,\Lambda)$ satisfy $\| \pmb {w}\| \leq L$ $\beta \in [0,B]$ and $v\in [0,D]$ , and $\Lambda$ is a positive definite matrix with minimum eigenvalue satisfying $\lambda_{min}(\Lambda)\geq \lambda >0$ . The constant $M > 0$ is fixed. Assume $\| \varphi (s,a)\| \leq 1$ for all $(s,a)$ pairs. Then + +$$ +\log \mathcal {N} _ {\varepsilon} (\mathcal {Q}, \| \cdot \| _ {\infty}) \leq d \log (1 + 8 L / \varepsilon) + \log (1 + 8 D / \varepsilon) + d ^ {2} \log [ 1 + 8 d ^ {1 / 2} B ^ {2} / (\lambda \varepsilon^ {2}) ]. +$$ + +Proof. Introducing $A = \beta^2\Lambda^{-1}$ , we can reparameterize as + +$$ +Q (\cdot , \cdot) = \left(\boldsymbol {w} ^ {T} \boldsymbol {\varphi} (\cdot , \cdot) + v + \sqrt {\boldsymbol {\varphi} (\cdot , \cdot) ^ {T} \boldsymbol {A} \boldsymbol {\varphi} (\cdot , \cdot)}\right) \wedge M +$$ + +where the parameters $(\pmb{w}, v, \pmb{A})$ satisfy $\| \pmb{w} \|_2 \leq L$ , $\| \pmb{A} \| \leq B^2 \lambda^{-1}$ , $v \in [0, D]$ . For any pair of functions $Q_1, Q_2 \in \mathcal{Q}$ with parameterization $(\pmb{w}_1, v_1, \pmb{A}_1)$ and $(\pmb{w}_2, v_2, \pmb{A}_2)$ , respectively, using the fact that $\cdot \wedge M$ is a contraction, we get + +$$ +\begin{array}{l} \| Q _ {1} - Q _ {2} \| _ {\infty} \leq \sup _ {s, a} | (\boldsymbol {w} _ {1} ^ {\top} \boldsymbol {\varphi} (s, a) + v _ {1} + \sqrt {\boldsymbol {\varphi} (s , a) ^ {\top} \boldsymbol {A} _ {1} \boldsymbol {\varphi} (s , a)}) - (\boldsymbol {w} _ {2} ^ {\top} \boldsymbol {\varphi} (s, a) + v _ {2} + \sqrt {\boldsymbol {\varphi} (s , a) ^ {\top} \boldsymbol {A} _ {2} \boldsymbol {\varphi} (s , a)}) | \\ \leq \sup _ {\phi : \| \phi \| _ {2} \leq 1} | (\boldsymbol {w} _ {1} ^ {\top} \phi + v _ {1} + \sqrt {\phi^ {\top} \boldsymbol {A} _ {1} \phi}) - (\boldsymbol {w} _ {2} ^ {\top} \phi + v _ {2} + \sqrt {\phi^ {\top} \boldsymbol {A} _ {2} \phi}) | \\ \leq \sup _ {\phi : \| \phi \| _ {2} \leq 1} | (\boldsymbol {w} _ {1} - \boldsymbol {w} _ {2}) ^ {\top} \boldsymbol {\phi} | + | v _ {1} - v _ {2} | + \sup _ {\phi : \| \phi \| _ {2} \leq 1} \sqrt {| \phi^ {\top} (\boldsymbol {A} _ {1} - \boldsymbol {A} _ {2}) \boldsymbol {\phi} |} \\ = \| \boldsymbol {w} _ {1} - \boldsymbol {w} _ {2} \| _ {2} + | v _ {1} - v _ {2} | + \sqrt {\| \boldsymbol {A} _ {1} - \boldsymbol {A} _ {2} \| _ {2}} \\ \leq \left\| \boldsymbol {w} _ {1} - \boldsymbol {w} _ {2} \right\| _ {2} + \left| v _ {1} - v _ {2} \right| + \sqrt {\left\| \boldsymbol {A} _ {1} - \boldsymbol {A} _ {2} \right\| _ {F}} \tag {3} \\ \end{array} +$$ + +where the third inequality uses the fact that $|\sqrt{x} - \sqrt{y}| \leq \sqrt{|x - y|}$ holds for any $x, y \geq 0$ and $\| \cdot \|_F$ denotes the Frobenius norm. + +Let $\mathcal{C}_w$ be an $\varepsilon/4$ -cover of $\{\pmb{w} \in \mathbb{R}^d : \| \pmb{w} \| \leq L\}$ with respect to the L2-norm, $\mathcal{C}_A$ an $\varepsilon^2/4$ -cover of $\{\pmb{A} \in \mathbb{R}^{d \times d} : \| \pmb{A} \|_F \leq d^{1/2} B^2 \lambda^{-1}\}$ with respect to the Frobenius norm, and $\mathcal{C}_v$ an $\varepsilon/2$ -cover of the interval $[0, D]$ . Then, treating the matrix $\pmb{A} \in \mathbb{R}^{d \times d}$ as a long vector of dimension $d \times d$ , and applying Lemma D.1, we know that we can find such covers with + +$$ +\log | \mathcal {C} _ {\boldsymbol {w}} | \leq d \log (1 + 8 L / \varepsilon), \quad \log | \mathcal {C} _ {\boldsymbol {A}} | \leq d ^ {2} \log (1 + 8 d ^ {1 / 2} B ^ {2} / (\lambda \varepsilon^ {2})), \quad \log | \mathcal {C} _ {\boldsymbol {v}} | \leq \log (1 + 8 D / \varepsilon). +$$ + +Hence, the set of functions + +$$ +\mathcal {C} _ {Q} = \left\{Q \in \mathbb {R} ^ {\mathcal {S} \times \mathcal {A}}: Q (\cdot , \cdot) = \boldsymbol {w} ^ {T} \boldsymbol {\varphi} (\cdot , \cdot) + v + \sqrt {\boldsymbol {\varphi} (\cdot , \cdot) ^ {T} \boldsymbol {A} \boldsymbol {\varphi} (\cdot , \cdot)}, \boldsymbol {w} \in \mathcal {C} _ {\boldsymbol {w}}, \boldsymbol {A} \in \mathcal {C} _ {\boldsymbol {A}}, v \in \mathcal {C} _ {v} \right\} +$$ + +has cardinality bounded by $\log |\mathcal{C}_Q| \leq d\log (1 + 8L / \varepsilon) + d^2\log (1 + 8d^{1 / 2}B^2 /(\lambda \varepsilon^2)) + \log (1 + 8D / \varepsilon)$ . We can show that $\mathcal{C}_Q$ defined above is an $\varepsilon$ -cover for $\mathcal{Q}$ as follows. Fix any $Q \in \mathcal{Q}$ parameterized by $(\boldsymbol{w}, v, \boldsymbol{A})$ and consider $\widetilde{Q} \in \mathcal{Q}$ parameterized by $(\widetilde{\boldsymbol{w}}, \widetilde{v}, \widetilde{\boldsymbol{A}})$ where $\widetilde{\boldsymbol{w}} \in \mathcal{C}_{\boldsymbol{w}}$ with $\| \boldsymbol{w} - \widetilde{\boldsymbol{w}} \|_2 \leq \varepsilon / 4$ , $\widetilde{v} \in \mathcal{C}_v$ with $|v - \widetilde{v}| \leq \varepsilon / 4$ and $\widetilde{\boldsymbol{A}} \in \mathcal{C}_{\boldsymbol{A}}$ with $\| \boldsymbol{A} - \widetilde{\boldsymbol{A}} \|_F \leq \varepsilon^2 / 4$ . Then, by the bound (3), we have $\| Q - \widetilde{Q} \|_{\infty} \leq \varepsilon$ as desired. This concludes the proof. + +Lemma D.3. Let $\mathcal{V}$ be a class of functions mapping from $S$ to $\mathbb{R}$ defined as + +$$ +\mathcal {V} = \left\{\max _ {a} Q (\cdot , a): Q (\cdot , \cdot) = \operatorname {C L I P} \left(Q _ {1} (\cdot , \cdot); Q _ {2} (\cdot , \cdot) \vee Q _ {3} (\cdot , \cdot), Q _ {4} (\cdot , \cdot) \wedge Q _ {5} (\cdot , \cdot), Q _ {1}, \dots , Q _ {5} \in \mathcal {Q} \right. \right\} +$$ + +where the function class $\mathcal{Q}$ is defined in Lemma D.2. Then, + +$$ +\log \mathcal {N} _ {\epsilon} (\mathcal {V}, \| \cdot \| _ {\infty}) \leq 5 d \log (1 + 8 L / \varepsilon) + 5 \log (1 + 8 D / \varepsilon) + 5 d ^ {2} \log [ 1 + 8 d ^ {1 / 2} B ^ {2} / (\lambda \varepsilon^ {2}) ]. +$$ + +Proof. Let $\mathcal{W}$ be a class of functions mapping from $S\times \mathcal{A}\to \mathbb{R}$ of the form + +$$ +Q (\cdot , \cdot) = \operatorname {C L I P} \left(Q _ {1} (\cdot , \cdot); Q _ {2} (\cdot , \cdot) \vee Q _ {3} (\cdot , \cdot), Q _ {4} (\cdot , \cdot) \wedge Q _ {5} (\cdot , \cdot)\right) +$$ + +where $Q_{1},\ldots ,Q_{5}\in \mathcal{Q}$ . Let $\mathcal{C}_0$ be an $\epsilon$ -cover of the function class $\mathcal{Q}$ with size $\log |\mathcal{C}_0|\leq d\log (1 + 8L / \varepsilon) + \log (1 + 4D / \varepsilon) + d^{2}\log [1 + 8d^{1 / 2}B^{2} / (\lambda \varepsilon^{2})]$ . Such a cover exists by Lemma D.2. Let $\mathcal{C}$ be defined as + +$$ +\mathcal {C} = \left\{ \right.Q \in \mathbb {R} ^ {\mathcal {S} \times \mathcal {A}}: Q (\cdot , \cdot) = \operatorname {C L I P} \left( \right.Q _ {1} (\cdot , \cdot); Q _ {2} (\cdot , \cdot) \vee Q _ {3} (\cdot , \cdot), Q _ {4} (\cdot , \cdot) \wedge Q _ {5} (\cdot , \cdot), Q _ {1}, \dots , Q _ {5} \in \mathcal {C} _ {0} \left. \right\}. +$$ + +Algorithm 4 $\gamma$ -LSCVI-UCB (flawed initial version in arXiv by Hong et al. (2025)) +Input: Discounting factor $\gamma \in [0,1)$ , regularization constant $\lambda > 0$ , span $H > 0$ , bonus factor $\beta > 0$ . +Initialize: $k \gets 1, t_k \gets 1, \Lambda_1 \gets \lambda I, Q_1(\cdot, \cdot), V_1(\cdot) \gets \frac{1}{1 - \gamma}$ for $t \in [T]$ . +1: Receive state $s_1$ . +2: for time step $t = 1, \ldots, T$ do +3: Take action $a_t = \operatorname{argmax}_a \max_{\tau \in [t_k:t]} Q_\tau(s_t, a)$ ; Receive reward $r(s_t, a_t)$ ; Receive next state $s_{t+1}$ . +4: $\Lambda_t \gets \Lambda_{t-1} + \varphi(s_t, a_t) \varphi(s_t, a_t)^\top$ . +5: $Q_{t+1}(\cdot, \cdot) \gets (r(\cdot, \cdot) + \gamma([P_{t_k}V_t](\cdot, \cdot) + \beta \| \varphi(\cdot, \cdot) \|_{\Lambda_{t_k}^{-1}})) \wedge \frac{1}{1 - \gamma}$ . +6: $\widetilde{V}_{t+1}(\cdot) \gets \max_a Q_{t+1}(\cdot, a)$ . +7: $V_{t+1}(\cdot) \gets \text{CLIP}(\widetilde{V}_{t+1}(\cdot); \min_{s' \in S} \widetilde{V}_{t+1}(s'), \min_{s' \in S} \widetilde{V}_{t+1}(s') + H)$ . +8: if $2\det(\Lambda_{t_k}) < \det(\Lambda_t)$ then +9: $k \gets k + 1, t_k \gets t + 1$ . +10: end if +11: end for + +Then, we have $\log |\mathcal{C}| \leq 5\log |\mathcal{C}_0|$ , and we can show that $\mathcal{C}$ is an $\varepsilon$ -cover of $\mathcal{W}$ as follows. Consider a function $W \in \mathcal{W}$ , with $W(\cdot, \cdot) = \mathrm{CLIP}(Q_1(\cdot, \cdot); Q_2(\cdot, \cdot) \vee Q_3(\cdot, \cdot), Q_4(\cdot, \cdot) \wedge Q_5(\cdot, \cdot))$ where $Q_1, \ldots, Q_5 \in \mathcal{Q}$ . Let $\widetilde{Q}_i \in \mathcal{C}_0$ be the approximation of $Q_i$ for $i = 1, \ldots, 5$ such that $\| \widetilde{Q}_i - Q_i \|_{\infty} \leq \varepsilon$ . Such a $\widetilde{Q}_i$ exists since $\mathcal{C}_0$ is an $\varepsilon$ -cover of $\mathcal{Q}$ . Let $\widetilde{Q}(\cdot, \cdot) = \mathrm{CLIP}(\widetilde{Q}_1(\cdot, \cdot); \widetilde{Q}_2(\cdot, \cdot) \vee \widetilde{Q}_3(\cdot, \cdot), \widetilde{Q}_4(\cdot, \cdot) \wedge Q_5(\cdot, \cdot))$ . Then, $\widetilde{Q} \in \mathcal{C}$ and + +$$ +\begin{array}{l} Q (\cdot , \cdot) = \operatorname {C L I P} \left(Q _ {1} (\cdot , \cdot); Q _ {2} (\cdot , \cdot) \vee Q _ {3} (\cdot , \cdot), Q _ {4} (\cdot , \cdot) \wedge Q _ {5} (\cdot , \cdot)\right) \\ \leq \operatorname {C L I P} (\widetilde {Q} _ {1} (\cdot , \cdot) + \varepsilon ; (\widetilde {Q} _ {2} (\cdot , \cdot) + \varepsilon) \vee (\widetilde {Q} _ {3} (\cdot , \cdot) + \varepsilon), (\widetilde {Q} _ {4} (\cdot , \cdot) + \varepsilon) \wedge (\widetilde {Q} _ {5} (\cdot , \cdot) + \varepsilon)) \\ = \operatorname {C I L P} (\widetilde {Q} _ {1} (\cdot , \cdot); \widetilde {Q} _ {2} (\cdot , \cdot) \vee \widetilde {Q} _ {3} (\cdot , \cdot), \widetilde {Q} _ {4} (\cdot , \cdot) \wedge \widetilde {Q} _ {5} (\cdot , \cdot)) + \varepsilon \\ = \widetilde {Q} (\cdot , \cdot) + \varepsilon . \\ \end{array} +$$ + +Similarly, we have + +$$ +\begin{array}{l} Q (\cdot , \cdot) = \operatorname {C L I P} \left(Q _ {1} (\cdot , \cdot); Q _ {2} (\cdot , \cdot) \vee Q _ {3} (\cdot , \cdot), Q _ {4} (\cdot , \cdot) \wedge Q _ {5} (\cdot , \cdot)\right) \\ \geq \operatorname {C L I P} (\widetilde {Q} _ {1} (\cdot , \cdot) - \varepsilon ; (\widetilde {Q} _ {2} (\cdot , \cdot) - \varepsilon) \vee (\widetilde {Q} _ {3} (\cdot , \cdot) - \varepsilon), (\widetilde {Q} _ {4} (\cdot , \cdot) - \varepsilon) \wedge (\widetilde {Q} _ {5} (\cdot , \cdot) - \varepsilon)) \\ = \operatorname {C I L P} \left(\widetilde {Q} _ {1} (\cdot , \cdot); \widetilde {Q} _ {2} (\cdot , \cdot) \vee \widetilde {Q} _ {3} (\cdot , \cdot), \widetilde {Q} _ {4} (\cdot , \cdot) \wedge \widetilde {Q} _ {5} (\cdot , \cdot)\right) - \varepsilon \\ = \widetilde {Q} (\cdot , \cdot) - \varepsilon , \\ \end{array} +$$ + +which shows $\| Q - \widetilde{Q}\|_{\infty} \leq \varepsilon$ , and that $\mathcal{C}$ is an $\varepsilon$ -cover of $\mathcal{W}$ . Since $\max_a$ is a contraction map, it follows that $\mathcal{V} = \{\max_a Q(\cdot, a) : Q \in \mathcal{W}\}$ is covered by $\widetilde{\mathcal{V}} = \{\max_a Q(\cdot, a) : Q \in \mathcal{C}\}$ . The proof is complete by observing that $\log |\widetilde{\mathcal{V}}| \leq \log |\mathcal{C}| \leq 5\log |\mathcal{C}_0|$ , and that there exists $\varepsilon$ -cover $\mathcal{C}_0$ for $\mathcal{Q}$ with $\log |\mathcal{C}_0| \leq d\log (1 + 8L / \varepsilon) + \log (1 + 8D / \varepsilon) + d^2\log [1 + 8d^{1/2}B^2 / (\lambda \varepsilon^2)]$ by Lemma D.2. + +# E. More Discussion on Previous Work + +In this section, we provide a more detailed comparison with prior work. The idea of using value iteration for infinite-horizon average-reward linear MDPs via approximation from the discounted setting was first introduced by Hong et al. (2025). However, the initial arXiv version of their work contained a flaw in the analysis. This issue was later corrected in the published version, which involved significant modifications to the algorithmic structure, resulting in a substantial departure from the original version. The corrected algorithm is discussed in Section 2.4 of the main paper. For completeness, we review the original (incorrect) version in this section and explain how Hong et al. (2025) addressed the issue. + +The incorrect version is shown in Algorithm 4. Unlike the corrected version (Algorithm 1), which plans for future policies for the remaining time steps by performing backward value iteration to compute action-value functions $Q_{t}$ for the remaining time steps, the flawed version updates the action-value function in place, meaning it performs a value iteration and updates the action-value function directly at each time step, and selects an action based on this updated value function. For a technical reason, the algorithm runs in episodes, starting a new episode when the covariance $\Lambda_{t}$ doubles (Line 8). + +Although simpler and more memory efficient, the in-place action-value update scheme alone appears insufficient, and the incorrect version of the paper introduces a max-pooling step (Line 3) that pools $Q$ -functions such that the pooled $Q$ function $\bar{Q}_t = \max_{\tau \in [t_k:t]}$ is monotonically increasing within the episode $k$ . To motivate this modification, consider what happens if the action $a_t$ is directly taken with respect to the value function $Q_t$ , without applying max-pooling. Note that by uniform concentration bound on $\widehat{P}_tV$ , we have + +$$ +Q _ {\tau + 1} (s, a) \leq r (s, a) + \gamma [ P V _ {\tau} ] (s, a) + 2 \beta \| \varphi (s, a) \| _ {\Lambda_ {\tau} ^ {- 1}} \tag {4} +$$ + +for all $\tau \in [T]$ , $s \in S$ and $a \in \mathcal{A}$ . Using the inequality with $\tau \gets t + 2$ , $s \gets s_t$ , $a \gets a_t$ , we can bound the regret as: + +$$ +\begin{array}{l} R _ {T} = \sum_ {t = 1} ^ {T} (J ^ {*} - r (s _ {t}, a _ {t})) \\ \leq \sum_ {t = 1} ^ {T} \left(J ^ {*} - Q _ {t + 2} \left(s _ {t}, a _ {t}\right) + \gamma \left[ P V _ {t + 1} \right] \left(s _ {t}, a _ {t}\right) + 2 \beta \| \varphi \left(s _ {t}, a _ {t}\right) \| _ {\Lambda_ {t} ^ {- 1}} \right. \\ \leq \sum_ {t = 1} ^ {T} \left(J ^ {*} - (1 - \gamma) V _ {t + 1} \left(s _ {t + 1}\right)\right) + \sum_ {t = 1} ^ {T} \left(Q _ {t + 1} \left(s _ {t + 1}, a _ {t + 1}\right) - Q _ {t + 2} \left(s _ {t}, a _ {t}\right)\right) \\ + \gamma \sum_ {t = 1} ^ {T} ([ P V _ {t + 1} ] (s _ {t}, a _ {t}) - V _ {t + 1} (s _ {t + 1})) + 2 \beta \sum_ {t = 1} ^ {T} \| \varphi (s _ {t}, a _ {t}) \| _ {\Lambda_ {t} ^ {- 1}}. \\ \end{array} +$$ + +Here, the in-place nature of value iteration causes a misalignment in the second: the $Q$ -function in the second part of the term is one iteration ahead of the $Q$ -function in the first part. This mismatch complicates the regret analysis and undermines the telescoping cancellation typically leveraged in such proofs. + +One potential remedy is to enforce monotonicity in the $Q$ -function within an episode by adding a line $Q_{t+1} \gets Q_t \vee Q_{t+1}$ after Line 5. With such a modification, telescoping goes through. However, this approach introduces a complication: as the $Q$ -function becomes increasingly complex with each update, the covering number of the function class containing all such $Q$ -functions grows exponentially with $T$ . As a result, the uniform concentration bound for $\widehat{P}_t V$ becomes vacuous. + +To sidestep the covering issue, the initial (incorrect) version of Hong et al. (2025) does not enforce monotonicity in $Q_{t}$ , maintaining $Q_{t}$ in a function class with a low covering number. Instead, it max-pools the $Q$ -functions as $\bar{Q}_{t} = \max_{\tau \in [t_{k}; t]} Q_{\tau}(s_{t}, a)$ and selects a greedy action $a_{t}$ with respect to the pooled function $\bar{Q}_{t}$ . The idea is to make $\bar{Q}_{t}$ monotonically increasing in $t$ without running into covering issue. Denoting by $\tau_{t}(s, a) = \operatorname{argmax}_{t \in [\tau_{k}; t]} Q_{\tau}(s, a)$ for $t$ in episode $k$ , and using the inequality (4) with $\tau \gets \tau_{t}(s, a) - 1$ , $s \gets s_{t}$ , $a \gets a_{t}$ , and using $Q_{\tau_{t}(s_{t}, a_{t})}(s_{t}, a_{t}) = \bar{Q}_{t}(s_{t}, a_{t})$ , we get + +$$ +\begin{array}{l} R _ {T} \leq \sum_ {t = 1} ^ {T} \left(J ^ {*} - Q _ {\tau_ {t} \left(s _ {t}, a _ {t}\right)} \left(s _ {t}, a _ {t}\right) + \gamma \left[ P V _ {\tau_ {t} \left(s _ {t}, a _ {t}\right) - 1} \right] \left(s _ {t}, a _ {t}\right) + 2 \beta \| \varphi \left(s _ {t}, a _ {t}\right) \| _ {\Lambda_ {t} ^ {- 1}} \right. \\ = \sum_ {t = 1} ^ {T} (J ^ {*} - (1 - \gamma) V _ {\tau_ {t} (s _ {t}, a _ {t}) - 1} (s _ {t + 1})) + \sum_ {t = 1} ^ {T} (V _ {\tau_ {t} (s _ {t}, a _ {t}) - 1} (s _ {t + 1}) - \bar {Q} _ {t} (s _ {t}, a _ {t})) \\ + \gamma \sum_ {t = 1} ^ {T} ([ P V _ {t + 1} ] (s _ {t}, a _ {t}) - V _ {t + 1} (s _ {t + 1})) + 2 \beta \sum_ {t = 1} ^ {T} \| \boldsymbol {\varphi} (s _ {t}, a _ {t}) \| _ {\Lambda_ {t} ^ {- 1}}. \\ \end{array} +$$ + +The incorrect version of Hong et al. (2025) bounds the second term as follows (we slightly adapt their argument for clarity). + +$$ +\begin{array}{l} V _ {\tau_ {t} (s _ {t}, a _ {t}) - 1} (s _ {t + 1}) \leq \widetilde {V} _ {\tau_ {t} (s _ {t}, a _ {t}) - 1} (s _ {t + 1}) \\ = \max _ {a} Q _ {\tau_ {t} (s _ {t}, a _ {t}) - 1} (s _ {t + 1}, a) \\ \leq \max _ {a} \max _ {\tau \in [ t _ {k}: t + 1 ]} Q _ {\tau} (s _ {t + 1}, a) \\ = \max _ {a} \bar {Q} _ {t + 1} \left(s _ {t + 1}, a\right) \\ = \bar {Q} _ {t + 1} \left(s _ {t + 1}, a _ {t + 1}\right), \\ \end{array} +$$ + +which allows for a telescoping sum. However, the second inequality above is wrong. Although $\tau_t(s_t, a_t) \in [t_k : t]$ , $\tau_t(s_t, a_t) - 1$ is not in the interval $[t_k : t + 1]$ when $\tau_t(s_t, a_t) = t_k$ . Due to this off-by-one error in their analysis, the regret bound fails. + +The corrected version fixes the issue by completely restructuring the algorithm. Specifically, it uses a backward value iteration scheme, so that the value function $Q_{t + 1}$ used for selecting an action $a_{t + 1}$ at time $t + 1$ is one value iteration behind $Q_{t}$ . With this scheme, the time index in (4) changes to: + +$$ +Q _ {\tau} (s, a) \leq r (s, a) + \gamma [ P V _ {\tau + 1} ] (s, a) + 2 \beta \| \varphi (s, a) \| _ {\Lambda_ {\tau} ^ {- 1}}, +$$ + +and the regret bound for the corrected algorithm becomes + +$$ +\begin{array}{l} \sum_ {t} \left(J ^ {*} - r \left(s _ {t}, a _ {t}\right)\right) \leq \sum_ {t} \left(J ^ {*} - Q _ {t} \left(s _ {t}, a _ {t}\right) + \gamma \left[ P V _ {t + 1} \right] \left(s _ {t}, a _ {t}\right) + 2 \beta \| \varphi \left(s _ {t}, a _ {t}\right) \| _ {\Lambda_ {t} ^ {- 1}} \right. \\ \leq \sum_ {t} \left(J ^ {*} - (1 - \gamma) V _ {t + 1} \left(s _ {t + 1}\right)\right) + \sum_ {t} \left(Q _ {t + 1} \left(s _ {t + 1}, a _ {t + 1}\right) - Q _ {t} \left(s _ {t}, a _ {t}\right)\right) \\ + \gamma \sum_ {t} ([ P V _ {t + 1} ] (s _ {t}, a _ {t}) - V _ {t + 1} (s _ {t + 1})) + 2 \beta \sum_ {t} \| \varphi (s _ {t}, a _ {t}) \| _ {\Lambda_ {t} ^ {- 1}}. \\ \end{array} +$$ + +Notice the change in the time index in the second term. Without the need for further modification of the algorithm, the second term can be bounded using telescoping sum, as is done in Appendix C.3. \ No newline at end of file diff --git a/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/images.zip b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..83ff177f5403dc6215d17be46ef3974efde23b19 --- /dev/null +++ b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8f2c3f2e9820f461c6c4373d747e1aa314b519becc53e50e8dc09af59ce7351 +size 1238342 diff --git a/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/layout.json b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..68dbe3ef0b4cb0efa20e455173a034687bb1d259 --- /dev/null +++ b/acomputationallyefficientalgorithmforinfinitehorizonaveragerewardlinearmdps/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e5af1058bedf06bace5ef86784989b777bca86f77418c464e73cbbd403e3f35 +size 1421615 diff --git a/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/d48bd14d-f656-421f-8a2a-6bb91bddc816_content_list.json b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/d48bd14d-f656-421f-8a2a-6bb91bddc816_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..aae6da330e8890d643964e3eb473c9c75d43c69a --- /dev/null +++ b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/d48bd14d-f656-421f-8a2a-6bb91bddc816_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77a6a5fa7fe519e26879cbfac4576a2045fc33c57b432534aa81f8f1ff87f121 +size 120930 diff --git a/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/d48bd14d-f656-421f-8a2a-6bb91bddc816_model.json b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/d48bd14d-f656-421f-8a2a-6bb91bddc816_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6c36e4a10df86ca15d165bd096ae070add48faa2 --- /dev/null +++ b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/d48bd14d-f656-421f-8a2a-6bb91bddc816_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f048ba05ec30118cdcda8b49e5ee9953fd8301efb09c1ba5ab9ce0a339b6925 +size 146992 diff --git a/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/d48bd14d-f656-421f-8a2a-6bb91bddc816_origin.pdf b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/d48bd14d-f656-421f-8a2a-6bb91bddc816_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f46a5120fdf52291a2917b1a9a5767802e6e3141 --- /dev/null +++ b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/d48bd14d-f656-421f-8a2a-6bb91bddc816_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7780d3e121fb80983bc6267bf5b8e1bc11eb8de110bb1eeeb3e4cf3509c2272d +size 1505692 diff --git a/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/full.md b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ae5aa5956d3235bdb25feb5026eb92c0e3d3eaf7 --- /dev/null +++ b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/full.md @@ -0,0 +1,383 @@ +# A Cross Modal Knowledge Distillation & Data Augmentation Recipe for Improving Transcriptomics Representations through Morphological Features + +Ihab Bendidi $^{123}$ Yassir El Mesbahi $^{12}$ Elisandra K. Denton $^{12}$ Karush Suri $^{12}$ Kian Kenyon-Dean $^{2}$ Auguste Genovesio $^{3*}$ Emmanuel Noutahi $^{12*}$ + +1Valence Labs, Montréal, Canada + +$^{2}$ Recursion, Salt Lake City, USA + +$^{3}$ Ecole Normale Supérieure PSL, Paris, France + +Correspondence to: , . + +# Abstract + +Understanding cellular responses to stimuli is crucial for biological discovery and drug development. Transcriptomics provides interpretable, gene-level insights, while microscopy imaging offers rich predictive features but is harder to interpret. Weakly paired datasets, where samples from different modalities are not from the same biological replicate but share key metadata such as cell line and perturbation, enable multimodal learning but are scarce, limiting their utility for training and multimodal inference. We propose a framework to enhance transcriptomics by distilling knowledge from microscopy images. Using weakly paired data, our method aligns and binds modalities, enriching gene expression representations with morphological information. To address data scarcity, we introduce (1) Semi-Clipped, an adaptation of CLIP for cross-modal distillation using pretrained foundation models, achieving state-of-the-art results, and (2) PEA (Perturbation Embedding Augmentation), a novel augmentation technique that enhances transcriptomics data while preserving inherent biological information. These strategies improve the predictive power and retain the interpretability of transcriptomics, enabling rich unimodal representations for complex biological tasks. + +# 1. Introduction + +Understanding how cells respond to various stimuli is fundamental to uncovering cellular functions and identifying novel drug targets. However, current technologies are limited in capturing the full range of cellular activities under diverse conditions, especially given the immense complexity of biological systems (Conesa et al., 2016; Kharchenko, 2021). For instance, the interaction of over 20,000 human protein-coding genes with the estimated $10^{60}$ possible chemical compounds (Reymond, 2015) far exceeds manual analysis, necessitating computational methods. Advances in deep learning for biology, such as predicting protein structures (Jumper et al., 2021), modeling molecular binding (Corso et al., 2023; Evans et al., 2021), and uncovering biological patterns through microscopy and gene expression data (Kraus et al., 2024; Bendidi et al., 2024b; Bourriez et al., 2024), offer powerful tools to address this challenge from a unimodal perspective. However, separately modelling data from various omics modalities, such as morphological features, proteomics, and transcriptomics provides unique yet partial insights into cellular behavior (Miao et al., 2021; Carpenter et al., 2006; Lopez et al., 2018). By combining these perspectives through multimodal fusion, researchers can construct more comprehensive representations of biological systems (Lu et al., 2021; Rosen et al., 2023), revealing connections critical for accelerating drug discovery. However, collecting multimodal data paired at the sample level remains infeasible currently due to massive experimental costs and technical challenges. + +Given the challenges of collecting fully paired data across biological modalities, our focus is on weakly paired datasets, where clusters of samples from two modalities share a common biological state. In this setting, two samples from different modalities are considered "paired" if they belong + +to the same biological state or metadata (Xi et al., 2024). In our case, this means transcriptomics and microscopy imaging samples that are not from the same biological replicate but share the same cell line and were exposed to the same perturbation. However, even weakly paired datasets remain scarce due to the cost and complexity of aligning states across modalities. Only a few such datasets exist, limiting their utility for training or fine-tuning models and making simultaneous inference on both modalities, for multimodal fusion for example, impossible to scale with current resources. To address these constraints, we aim to train models using the limited weakly paired data from transcriptomics and microscopy imaging, while enabling them to operate on a single modality, transcriptomics, during inference. This approach leverages the complementary strengths of the modalities: microscopy images are rich in visual phenotypic features with strong predictive power but are challenging to interpret, while transcriptomics data suffers from weaker predictive power, but is more directly interpretable at the gene level, making it easier to connect to biological mechanisms (Kraus et al., 2024; Bendidi et al., 2024b). The complementarity between these modalities motivates the development of strategies to transfer the rich phenotypic insights from microscopy into transcriptomics representations. + +To overcome pairing scarcity in training, we propose two practical solutions: cross-modal knowledge distillation and biologically inspired data augmentation. Knowledge distillation facilitates the transfer of information from one modality to another to enhance its utility. For instance, the predictive strength of morphological features in microscopy images can enrich transcriptomics representations, making them more powerful for downstream tasks like drug discovery (Kraus et al., 2024; Repogle et al., 2022; Ye et al., 2018; Chandrasekaran et al., 2023; Bourriez et al., 2024; Sanchez et al., 2025). However, most distillation techniques rely on supervised objectives, which require precise labels that are often unavailable for most biological modalities. Alternatively, unsupervised alignment methods aim to uncover shared structures between modalities, though this is challenging due to the distinct biological relationships each captures (Appendix Figure 6). We instead propose to leverage alignment techniques for cross-modal distillation by binding transcriptomics to frozen morphological representations. We further introduce a novel biologically inspired data augmentation technique tailored for transcriptomics vectors, which preserves biological information while introducing meaningful variation to the dataset. This augmentation approach addresses the scarcity of paired data by improving the richness and robustness of transcriptomics representations, enhancing their predictive power while retaining their inherent interpretability. By combining these strategies, our framework enriches gene expression representations, offer + +ing deeper insights into biological processes and expanding their utility across diverse applications. + +To summarize, we introduce in this work a recipe for transferring knowledge from morphological features to transcriptomics representations in weakly paired datasets, composed of the following contributions: + +- We present Semi-Clipped, a straightforward adaptation of CLIP (Radford et al., 2021) that leverages pretrained large unimodal foundation models with trainable adapters. It achieves state-of-the-art performance in cross-modal distillation under data-scarce conditions for our biological modalities. +- We introduce PEA, Perturbation Embedding Augmentation, a novel biologically inspired data augmentation technique for representations of transcriptomics, that introduces significant variation in the training data while retaining meaningful biological information of each sample. PEA improves cross-modal distillation in our low data regime and widely outperforms existing augmentation techniques at uncovering novel biological relationships. + +# 2. Related Works + +Cross-Modal Knowledge Distillation. Knowledge distillation transfers knowledge from a teacher model to a student by aligning output distributions, typically using Kullback-Leibler (KL) divergence (Hinton et al., 2015). Variants introduce gradient similarity (Zhu & Wang, 2021), correlation (Huang et al., 2022), or structural losses (Park et al., 2019). Cross-modal methods leverage strong modalities to guide weaker ones, often relying on label information (Gupta et al., 2016; Roheda et al., 2018; Xue et al., 2021; Lee et al., 2023). For instance, C2KD (Huo et al., 2024) uses an online filtering mechanism for soft label alignment, while SHAKE (Li & Zhe, 2022) employs shadow adapters for bidirectional distillation. XKD (Sarkar & Etemad) combines self-supervised learning with cross-modal distillation but requires large paired datasets. To our knowledge, no distillation approach has effectively leveraged unsupervised cross-modal alignment in the context of limited weakly paired data. + +Multimodal Learning. Multimodal learning encompasses approaches for aligning or merging data types for robust inference. CLIP (Radford et al., 2021) aligns image and text into a shared space, while CSA (han Li et al., 2024) uses pretrained unimodal models for few-shot alignment. Methods like SigClip (Zhai et al., 2023), VICReg (Bardes et al., 2022), and DCCA (Lan et al., 2020) enhance alignment through self-supervised learning or correlation maximization but depend on significant shared information (Tsai + +et al., 2021). Multimodal distillation approaches (Yang et al., 2024; Wu et al., 2023; Fang et al., 2021; Wang et al., 2022) typically require paired data and focus on multimodal-to-multimodal distillation and do not leverage multimodal alignment for cross-modal distillation when only one modality is available at inference. Relevant to our setting, (Hager et al., 2023) proposed a contrastive learning framework combining images and tabular data, structurally similar to our microscopy-transcriptomics setting, demonstrating the viability of such combinations for predictive and interpretable medical tasks. + +Biologically Relevant Representations. Advances in microscopy imaging models have driven progress in high-content screening (Kraus et al., 2024; Yao et al., 2024; Kenyon-Dean et al., 2025; Wenkel et al., 2025), histopathology (Saillard et al., 2024; Chen et al., 2024; Vorontsov et al., 2024), and specialized architectures (Bourriez et al., 2024; Pham & Plummer, 2024). In transcriptomics, foundation models (Cui et al., 2024; Yang et al., 2022; Theodoris et al., 2023; Wen et al., 2024) show promise but often underperform simpler models in biologically relevant tasks, with scVI (Lopez et al., 2018) as an exception (Liu et al., 2023; Bendidi et al., 2024b). Microscopy imaging complements transcriptomics (Camunas-Soler, 2024), but while unimodal datasets (Repogle et al., 2022; Chandrasekaran et al., 2023; Fay et al., 2023) are growing, weakly paired multimodal datasets remain scarce. Recent methods (Xi et al., 2024; Watkinson et al., 2024; Sanchez-Fernandez et al., 2023; Xie et al., 2023) address this kind of limitation for different modalities by leveraging weak pairings through pretrained models with trainable adapters (Fradkin et al., 2024). + +Data Augmentations for Biology. Data augmentations are crucial in addressing data scarcity for biology, as biologically meaningful augmentations can stabilize and improve performance with limited biological datasets (Moutakanni et al., 2024; Bendidi et al., 2023; 2024a). In computational biology, image augmentations have typically focused on basic transformations like rotations (Alfasly et al., 2024; Lafarge & Koelzer, 2022) or differentiable techniques using adversarial learning for domain generalization (Ruppli et al., 2022; Zhou et al., 2024). For transcriptomics, data being in a representation format allows leveraging existing representation-level augmentation methods (DeVries & Taylor, 2017; Li et al., 2022), though their efficacy for biological contexts remains uncertain. Recently, new biologically inspired techniques have emerged specifically for augmenting transcriptomics and biological representations (Kircher et al., 2022; Li et al., 2023; Nouri, 2025). + +# 3. Proposed Approach + +Problem Formulation. We consider two biological data modalities: a teacher modality $T$ and a student modality $S$ , each offering distinct perspectives on cellular behavior. Let $\mathcal{X}_T$ and $\mathcal{X}_S$ represent the datasets from these modalities. The samples $x_T^{(i)} \in \mathcal{X}_T$ and $x_S^{(i)} \in \mathcal{X}_S$ correspond to the same biological perturbation and cell type but are not strongly paired due to biological variability. Each sample is annotated with weak labels $p$ (perturbation) and $l$ (cell type). Both datasets are organized into biological batches $\mathcal{B}_T = \{b_{T,1}, b_{T,2}, \dots, b_{T,|\mathcal{B}_T|}\}$ and $\mathcal{B}_S = \{b_{S,1}, b_{S,2}, \dots, b_{S,|\mathcal{B}_S|}\}$ . Each batch $b_{T,k} \in \mathcal{B}_T$ and $b_{S,m} \in \mathcal{B}_S$ consists of a set of samples $\{x_{T,k}^{(j)}\}_{j=1}^{N_{T,k}}$ and $\{x_{S,m}^{(j)}\}_{j=1}^{N_{S,m}}$ , and each batch includes, in addition to perturbed samples, a number of control (unperturbed) samples, denoted by $\{x_{T,k}^{(c)}\}_{c=1}^{C_{T,k}}$ and $\{x_{S,m}^{(c)}\}_{c=1}^{C_{S,m}}$ for $C_{M,k} \geq 2$ . + +Proposed Distillation Method. Given the scarcity of weakly paired data, we adopt pretrained and frozen unimodal encoders $E_{T}: \mathcal{X}_{T} \to \mathbb{R}^{d_{T}}$ and $E_{S}: \mathcal{X}_{S} \to \mathbb{R}^{d_{S}}$ , following (Fradkin et al., 2024). These encoders produce embeddings $z_{T}^{(i)} = E_{T}(x_{T}^{(i)})$ and $z_{S}^{(i)} = E_{S}(x_{S}^{(i)})$ for the teacher and student modalities, respectively. Our objective is to learn a mapping function $f_{S}: \mathbb{R}^{d_{S}} \to \mathbb{R}^{d_{T}}$ that aligns student embeddings to the teacher embedding space, yielding transformed embeddings $h_{S}^{(i)} = f_{S}(z_{S}^{(i)})$ that integrate properties from the teacher modality $T$ . We aim to achieve the dual objective of leveraging weak biological labels for pairing while minimizing reliance on them as learning objectives, since such labels underperform compared to unsupervised objectives in microscopy imaging (Kraus et al., 2024), and preventing mutual drift between modalities with limited shared information. We propose Semi-Clipped, a straightforward adaptation of the CLIP loss (Radford et al., 2021) for cross-modal knowledge distillation. This approach uses the frozen unimodal encoders to generate embeddings $z_{T}$ and $z_{S}$ . The teacher representation $z_{T}$ is fixed, while an adapter function $f_{S}$ is trained on the student modality by optimizing the CLIP loss between $h_{S}$ and $z_{T}$ to produce aligned embeddings $h_{S}$ . By freezing the teacher embedding space, this avoids dependence on massive amounts of paired data for encoder training and ensures one-way knowledge transfer from the teacher to the student, mitigating mutual drift and feedback from the student to the teacher. + +Batch Correction for Data Augmentation. In biological datasets, batch effects, or variability caused by differences in experimental conditions, introduce noise that can obscure meaningful patterns. Traditional batch correction techniques (Bendidi et al., 2024b; Celik et al., 2024; Ando et al., 2017) address this by centering embeddings on control (unperturbed) samples within each batch, reducing + +noise while preserving the signal. Typically used as a post-processing step, these corrections shift the embedding distribution while retaining key information for downstream analysis. To tackle the scarcity of paired biological modalities, we introduce PEA (Perturbation Embeddings Augmentation), a novel biologically inspired augmentation technique that repurposes batch correction as a data augmentation applied directly to the student embeddings during training. Specifically, a function $A: (\mathbb{R}^{d_S}, X_S^c) \to \mathbb{R}^{d_S}$ is randomly selected from a set $\mathcal{A}$ of batch correction transformations and applied to the student embeddings $z_{S}^{(i)}$ . Augmented embeddings $z_{S,A}^{(i)} = A(z_{S}^{(i)}, X_{S}^{(c)})$ are then passed to the student adapter $f_{S}$ for cross-modal knowledge distillation. To ensure the teacher embeddings focus on relevant information, a fixed batch correction $B$ (Ando et al., 2017) is applied to the teacher modality. + +To augment transcriptomics data while preserving biological relevance, we extend traditional batch correction techniques into a stochastic augmentation framework. Specifically, for each sample, we randomly select one batch correction transformation $A$ from a predefined set of normalization techniques, ensuring controlled variability in perturbation embeddings. Each selected transformation $A: \mathbb{R}^{d_S} \to \mathbb{R}^{d_S}$ falls into one of these categories: (1) centering, which shifts embeddings by subtracting batch-wise control means to remove batch-specific offsets; (2) scaling, which normalizes variance across features to enhance comparability; and (3) principal component-based transformations that reweight variance along principal axes, emphasizing biologically relevant information while reducing batch artifacts. To introduce further stochasticity, we drop a random subset of the steps of each correction method per sample rather than always applying them sequentially. Additionally, the number of control samples used for correction is randomly sampled per training sample, increasing diversity and robustness to out-of-domain experimental shifts in the learned distributions. Detailed implementation of our batch correction techniques is provided in Appendix Section C. + +This method introduces controlled and diverse distributional shifts, helping $f_{S}$ learn robust, biologically meaningful representations by ignoring batch-induced variability. During inference, a batch correction is applied to the student embeddings $z_{S}$ to align them with the training distribution, further improving robustness. Algorithm 1 details the process, ensuring the adapter captures biologically relevant features while increasing training diversity and preserving biological information in low-data settings. + +# 4. Experimental Setup + +Data & Model Training. We use microscopy imaging as the teacher modality and transcriptomics as the student modality. The training dataset includes 130,000 ar + +Algorithm 1 Semi-Clipped with PEA implementation +for each batch $(x_S, x_T) \in (X_S, X_T)$ do +Extract using frozen encoders $z_S = E_S(x_S)$ and $z_T = E_T(x_T)$ +Sample batch correction function $A \sim A$ +Drop a random subset of steps in $A \rightarrow A'$ +Sample a random subset of control samples $X_S^{(c)}$ +Apply batch correction: $z_S^a = A'(z_S, X_S^{(c)})$ +Compute transformed embeddings: $h_S = f_S(z_S^a)$ +Apply TVN correction to teacher embeddings: $z_S^b = B(z_T)$ and compute CLIP loss: + $\mathcal{L} = -\sum_{i=1}^{B} \log \frac{\exp(\sin(h_S^{(i)}, z_T^{(b,i)})/\tau)}{\sum_{j=1}^{B} \exp(\sin(h_S^{(i)}, z_T^{(b,j)})/\tau)}$ + +Backpropagate loss $\mathcal{L}$ and update adapter $f_{S}$ end for + +rayed bulk transcriptomics samples (HUVEC-CMPD) and 20,000 microscopy images of human umbilical vein endothelial cells (HUVEC), cells from cell painting, both covering 1,700 chemical perturbations at three concentrations. Each transcriptomics sample can pair with multiple imaging samples based on treatment and concentration, with one pair randomly selected per epoch. These pairs are weakly paired—i.e., they do not originate from the same biological replicate but share the same cell line and perturbation metadata, ensuring comparable biological states across modalities. For encoding microscopy images, we use the pretrained Phenom-1 model (Kraus et al., 2024), a state-of-the-art pretrained model trained on 93 million microscopy images. For transcriptomics, we compare three models: a simple scVI-like $\mathsf{MLP}^1$ trained from scratch on the HUVEC-CMPD bulk dataset, scVI (Lopez et al., 2018), a model known for strong performance on small datasets, outperforming existing transcriptomics pretrained models (Bendidi et al., 2024b), and similarly trained from scratch on the HUVEC-CMPD bulk dataset, and a pretrained scGPT (Cui et al., 2024) (a pretrained model trained on 33 million transcriptomics samples). A three-layer MLP adapter $f_{S}$ (input size $d_{S}$ , output size $d_{T}$ ) with ReLU activations is trained for the student modality, while both encoders remain frozen. Consistent with (Kenyon-Dean et al., 2025), control samples are excluded from paired data for knowledge distillation and only used for batch correction. The adapter is trained with a temperature of 0.1, learning rate of 0.001, batch size of 1,024, and over 150 epochs. + +Evaluation Setting. The evaluation focuses on assessing the quality of transcriptomic representations after knowledge distillation, emphasizing biological relevance and interpretability. We use a hierarchical benchmarking framework for transcriptomic representations (Bendidi et al., 2024b) (Appendix Section B) with two primary tasks: (1) Retrieval of known biological relationships, this task evaluates the ability of the learned representations to capture established biological relationships by retrieving known interactions between genes. Using cosine similarity of gene embeddings, predicted relationships are validated against annotations from CORUM, HuMAP, StringDB, Reactome, and SIGNOR databases. Success is measured by recall scores averaged across these databases, reflecting how well the representations align with known biology. (2) Transcriptomic interpretability preservation, this task measures how well the distilled embeddings retain information necessary for reconstructing original gene expression profiles. It evaluates two complementary metrics: the Structural Integrity score, which quantifies how accurately the model preserves the relationships between control and perturbation samples, and the Spearman correlation, which assesses the rank-based agreement between predicted and true gene expression profiles. The average of these metrics provides a comprehensive measure of interpretability preservation. + +Success is defined as improving retrieval scores while maintaining interpretability metrics comparable to unimodal transcriptomic representations. This dual focus ensures that the student representations do not collapse or lose transcriptomic-specific information by ignoring it and relying solely on morphological features. Using these tasks, we compare our Semi-Clipped approach, with and without PEA, against standard multimodal alignment and cross-modal knowledge distillation methods. For alignment, we include CLIP (Radford et al., 2021), SigClip (Zhai et al., 2023), VICReg (Bardes et al., 2022), and DCCA (Lan et al., 2020). For distillation, we evaluate KD (Hinton et al., 2015), SHAKE (Li & Zhe, 2022), and C2KD (Huo et al., 2024). All methods use the same pretrained encoders with trainable adapters. For distillation approaches, teacher and student adapters are unimodally pretrained with perturbation labels before fine-tuning via their respective methods. We benchmark PEA by applying it to $z_{S}$ during training, and compare it to existing biological and transcriptomics data augmentation approaches: MWO (Kircher et al., 2022), scVI denoising (Lopez et al., 2018), MDWGAN-GP (Li et al., 2023), scGFT (Nouri, 2025), and their combination with and without PEA. Hyperparameters are optimized via grid search on a validation split, with results averaged across multiple seeds. + +Evaluation Datasets. We assess generalization on three Out-Of-Distribution (OOD) datasets, each introducing dis + +![](images/a8c7c8ae9789b2226bee9803c7aab7ae7a2e8b4c912ea01c766dd9b06029959c.jpg) +Figure 1. Impact of training choices on Semi-Clipped performance for known biological relationship recall on HUVEC-KO. Finetuning or multimodal training from scratch underperforms due to limited weakly paired data, while using adapters on pretrained models significantly improves results. The best performance is achieved with Semi-Clipped : a single transcriptomic adapter aligned to frozen image representations. + +tinct distribution shifts. (1) Experimental variability: The HUVEC-KO dataset contains arrayed bulk transcriptomics data from 120,000 genetically perturbed sample, with around 300 CRISPR gene Knock-Out (KO) in HUVEC cells, unlike the training set, which uses chemical perturbations. This dataset does not share any experiment with the training set, and evaluates generalization to unseen experiments and unseen genetic perturbations. (2) Quantification method shift: The LINCS dataset (Subramanian et al., 2017) includes 443,000 arrayed bulk transcriptomics samples across 31 cell types and 5,157 CRISPR gene KO, using the L1000 assay, a transcript abundance measurement method different from the sequencing-based approach in training. (3) Single-cell adaptation: The SC-RPE1 dataset (Repogle et al., 2022) consists of 247,914 single-cell transcriptomic samples from retinal pigmented epithelium cells with 2,393 CRISPR knockouts, testing the transition from bulk transcriptomics (training dataset) to single-cell transcriptomics. Together, these three OOD evaluation settings introduce significant distribution shifts on different aspects, testing the model's robustness to new cell types, experimental conditions, and gene expression quantification methods. + +# 5. Results + +We aim to evaluate the impact of Semi-Clipped and PEA both independently and in combination. Our primary objective is to improve biological relationship recall on OOD datasets compared to the corresponding unimodal transcriptomic baseline while preserving or enhancing interpretability in transcriptomics. + +![](images/f4535b8e032885d2d9eae5d64297c365fef0736319b5626a5f26c479fbb23ad8.jpg) + +![](images/f9da915f70e18726cd4ead424d4a9f62cac7c6a7054ea85bd5656dea0a115a16.jpg) +Figure 2. Performance comparison of the distillation and augmentation components of our approach compared to existing distillation methods (a) and biological data augmentation techniques (b) across five training seeds. Higher is better for all metrics. Semi-Clipped and PEA maintain interpretability and achieve the highest performance on all OOD datasets. (a) Z-scores of evaluation metrics (relationship recall and Tx preservability) are shown, with cool colors for label-based methods and warm colors for label-free approaches, without data augmentation. (b) Raw scores are shown for relationship recall and Tx preservability. Transcriptomics data augmentations, MWO (Kircher et al., 2022), scVI denoising (Lopez et al., 2018), MDWGAN-GP (Li et al., 2023), scGFT (Nouri, 2025), are applied within Semi-Clipped training. We compare training results where we simultaneously use all evaluated data augmentations, both with and without PEA, to assess its additional impact in a practical setting on both evaluation tasks. + +# 5.1. Semi-Clipped Enables Robust and Generalizable Transcriptomic Representations + +To analyze the effect of different training choices on Semi-Clipped performance, we first examine its impact on known biological relationship recall using the HUVEC-KO dataset. Without data augmentations and using the CLIP loss, we conduct two comparisons. Figure 1 (left) compares training an scVI-like MLP from scratch for the distillation task against using a pretrained scVI model. Additionally, it evaluates the effect of introducing an image adapter instead of relying solely on a transcriptomics adapter while keeping image embeddings frozen. Figure 1 (right) compares finetuning a pretrained scGPT model for distillation versus freezing scGPT and training a transcriptomics adapter on its own or with an image adapter. We find that leveraging a pretrained encoder with adapters consistently outperforms both training from scratch and finetuning for both scVI and scGPT. Furthermore, aligning transcriptomic representations to frozen image embeddings, as proposed in Semi-Clipped, yields superior performance compared to also training a microscopy imaging adapter. + +We evaluate Semi-Clipped's ability to learn generalizable and biologically meaningful representations of transcriptomics compared to existing distillation methods, using an + +scVI pretrained encoder for transcriptomics. For clarity, we define label-free approaches as those that do not use biological labels in the training objective, even if labels are used for modality pairing. To ensure a fair comparison of the core methods, no data augmentation is applied. Figure 2 (a) presents the performance of Semi-Clipped against various label-based and label-free distillation approaches on the Transcriptomic Interpretability Preservation and Known Biological Relationship Recall tasks across all three OOD datasets. Scores are standardized as z-scores and averaged over 5 seeds, with higher values indicating better performance. Distillation methods using label supervision (cool colors) generally show weaker relationship recall compared to unsupervised multimodal methods (warm colors) and even underperform the unimodal baseline in LINCS and SC-RPE1. In contrast, Semi-Clipped achieves the highest relationship recall in HUVEC-KO and SC-RPE1 while also slightly surpassing the unimodal baseline in transcriptomics interpretability in HUVEC-KO. This suggests successful knowledge transfer from morphology to transcriptomics without sacrificing interpretability. In LINCS, Semi-Clipped performs competitively, outperforming all label-supervised distillation methods and the unimodal baseline in relationship recall while closely matching the best unsupervised multimodal methods. On the transcriptomics + +![](images/595c58ec10d21ff86f8d249f4dd7447f07cdf340978f3d662704ece9570e1475.jpg) +Figure 3. Ablation study on the known relationship recall score of hyperparameters choices (Tx Adapter learning rate, CLIP loss temperature, batch size, and training epochs) for training Semi-Clipped on the HUVEC-KO dataset, including the selected optimal configuration (dotted vertical line). For each studied parameter, we set all other hyperparameters at their best performing value. While performance varies with parameter changes, the method remains largely robust, showing minimal degradation and no collapse + +![](images/3fa1cfbaa295fa9e5e996307275018f4164a1dcb05e96e3d371044f126460354.jpg) + +![](images/dd6f06f3518445aa209e332f41fb555e4413b640febb7b0141d14f1b6cf31457.jpg) + +![](images/cf070b1fcf9c8f29ba128be404849a240bed8d3ff362812eb67a554a5e7deaf5.jpg) + +preservation metric for LINCS and SC-RPE1, Semi-Clipped retains strong interpretability, slightly trailing the unimodal baseline but outperforming most distillation approaches. This minor limitation likely reflects the challenge of maintaining interpretability across unseen cell types. Overall, Semi-Clipped effectively balances generalization and interpretability across all OOD settings, consistently achieving the most robust performance across all metrics and demonstrating its strength as a distillation method. + +To further assess Semi-Clipped's robustness, we conduct a detailed ablation study on individual hyperparameters when trained independently on the HUVEC-KO dataset (Figure 3). We isolate the effect of each parameter by fixing all others to their optimal values. The results reveal that while performance fluctuates with changes in configuration, Semi-Clipped remains resilient, exhibiting only minor degradation without any performance collapse. Optimal learning is achieved with a balanced learning rate, a lower temperature for the CLIP loss term, and larger batch sizes, though the method still performs competitively even with small batches. Additionally, increasing the number of training epochs yields substantial improvements. These findings reinforce the method's stability and reliability across a wide range of training conditions. + +# 5.2. PEA Enhances Distillation Across Methods and Synergizes with Existing Augmentations + +We further evaluate the effectiveness of our proposed PEA data augmentation in enhancing distillation performance across both evaluation tasks. Using Semi-Clipped as the base model, we compare its performance over five training seeds in three settings: (1) without any data augmentation, (2) with multiple existing biologically inspired transcriptomics augmentations from the literature, each used separately, and (3) with PEA as the sole augmentation. This initial evaluation isolates the specific contribution of PEA. Additionally, to reflect real-world training conditions where multiple augmentations are typically applied together, we + +conduct a broader comparison. Specifically, we compare Semi-Clipped trained with all existing biological augmentations except PEA against its performance when trained with the full set of augmentations, including PEA. Figure 2 (b) presents the results of this comparison. Across all three evaluation datasets, PEA achieves state-of-the-art performance in Known Biological Relationship Recall, significantly outperforming all existing approaches. It also preserves transcriptomic interpretability, matching the no-augmentation baseline in SC-RPE1 while surpassing it in HUVEC-KO and LINCS. Notably, PEA alone improves performance over not using augmentations by $17\%$ in HUVEC-KO, $55\%$ in LINCS, and $20\%$ in SC-RPE1. More strikingly, PEA outperforms the combined effect of all other biological augmentations used together, highlighting its strong biological foundation and ability to introduce meaningful variation to the distillation process. Furthermore, integrating PEA with all other augmentations further enhances performance beyond using PEA alone, demonstrating its complementarity to existing transcriptomics augmentation techniques. This combined approach yields the highest overall improvements, increasing performance over the no-augmentation baseline by $25\%$ in HUVEC-KO, $69\%$ in LINCS, and $26\%$ in SC-RPE1. These results confirm that PEA not only provides substantial individual benefits but also synergizes effectively with existing augmentation strategies. + +We assess whether PEA enhances performance across different distillation approaches beyond Semi-Clipped and compare its impact on various methods. Specifically, we apply PEA to KD, SHAKE, VICReg, and Semi-Clipped and evaluate its effect on benchmark tasks. Each method is trained over 15 different seeds, both with and without PEA, and we use a Wilcoxon signed-rank test to determine the statistical significance of improvements. Table 1 summarizes the results: PEA consistently enhances performance across all three OOD datasets for every distillation approach, with particularly strong gains in LINCS and SC-RPE1. This confirms that PEA is broadly beneficial across methods. Notably, + +
MethodHUVEC-KOLINCSSC-RPE1
Tx PreservationKnown RelationshipsTx PreservationKnown RelationshipsTx PreservationKnown Relationships
Random baseline33.92 ± 0.0910.37 ± 0.1147.09 ± 0.0710.81 ± 0.0425.34 ± 0.1110.03 ± 0.02
Unimodal baseline52.23 ± 0.3416.51 ± 0.8593.35 ± 0.0712.21 ± 0.1137.75 ± 0.2825.29 ± 0.24
KD52.90 ± 0.3116.00 ± 1.3692.69 ± 0.1511.83 ± 0.2737.43 ± 0.3223.9 ± 0.18
KD + PEA↑54.12 ± 0.63↑20.65 ± 1.78↑93.11 ± 0.29↑15.73 ± 0.59↑37.55 ± 0.38↑29.02 ± 0.36
SHAKE51.93 ± 0.8017.02 ± 1.0291.64 ± 0.2312.09 ± 0.4936.95 ± 0.4625.13 ± 0.19
SHAKE + PEA↑52.93 ± 0.83↑19.98 ± 1.34↑92.43 ± 0.31↑16.84 ± 0.51↓36.15 ± 0.51↑30.81 ± 0.31
VICReg51.87 ± 0.3917.25 ± 1.1491.19 ± 0.1912.96 ± 0.4536.75 ± 0.1732.19 ± 0.26
VICReg + PEA↑53.76 ± 0.66↑20.46 ± 0.83↑91.22 ± 0.25↑18.12 ± 0.19↓36.33 ± 0.22↑38.14 ± 0.29
Semi-Clipped52.78 ± 0.2719.71 ± 1.1992.71 ± 0.2312.68 ± 0.3337.54 ± 0.1932.65 ± 0.21
Semi-Clipped + PEA↑53.87 ± 0.37↑23.05 ± 0.42↑93.15 ± 0.38↑19.63 ± 0.18↑37.56 ± 0.15↑39.84 ± 0.23
+ +Table 1. Performance improvement of different distillation methods with and without PEA under all OOD settings. We average the scores of 15 different seeds for each model, and the p-value of every result improvement is below 0.05 using the Wilcoxon signed-rank statistical test. Improvements from using PEA are indicated with upward arrows. For each OOD setting, the best-performing model is shown in bold, and the second-best is underlined. Using PEA as data augmentation for distillation approaches preserves the transcriptomics information while widely improving the zero-shot retrieval of known biological relationships for all the three OOD datasets used for evaluation. + +it also significantly improves Transcriptomic Interpretability, likely due to its ability to preserve biological information while introducing controlled variations, enhancing the signal-to-noise ratio. All gains in Known Relationship Recall between PEA and non-PEA settings are statistically significant (p-values $< 0.05$ ). Importantly, Semi-Clipped remains the top-performing approach in Known Biological Relationship Recall across all evaluation datasets when using PEA, while also achieving the second-best performance in Transcriptomic Interpretability Preservation across all datasets. + +We analyze the contribution of each PEA component to performance improvements by conducting an ablation study on the HUVEC-KO dataset. We evaluate its impact on KD, SHAKE, VICReg, and Semi-Clipped, progressively adding PEA components to the base distillation methods without augmentations. Each step in the ablation builds upon the previous one: (1) Fixed biological augmentation : applying a predefined set of batch correction techniques. (2) Inference on TVN-corrected embeddings : applying Typical Variation Normalization (TVN) (Ando et al., 2017) correction to $z_{S}$ at inference before passing them to the adapter $f_{S}$ . (3) Augmentation stochasticity : randomly dropping a subset of batch correction steps to introduce variation. (4) Control sampling : randomly sampling a varying amount of control samples for correction, completing the full PEA approach. Table 2 summarizes the results, averaged over 15 seeds and reporting Known Biological Relationship Recall for each distillation approach. Every component contributes incremental improvements, with control sampling providing the strongest boost, particularly for Semi-Clipped. Importantly, all distillation methods show consistent performance gains at each step, indicating that each PEA component plays a critical role in enhancing distillation outcomes. + +# 5.3. Semi-Clipped with PEA Enables Synergistic Integration of Morphological and Transcriptomic Insights + +We analyze the biological insights provided by Semi-Clipped trained with PEA, comparing the known biological relationships it retrieves to those identified independently by unimodal microscopy imaging and transcriptomics models on the HUVEC-KO OOD dataset. Specifically, we evaluate the quantity and overlap of relationships retrieved by KD, SHAKE, VICReg, and Semi-Clipped, all trained with PEA, to assess whether these models remain faithful to transcriptomics-specific relationships or exhibit modality drift. This is quantified by measuring the intersection between relationships retrieved by each distillation method and those identified by the unimodal transcriptomics model. Figure 4 presents Venn diagrams of these intersections. Semi-Clipped shows strong alignment with transcriptomics-retrieved relationships while also capturing additional biological insights typically associated with morphological features. In contrast, while the other distillation approaches retrieve many known relationships, they exhibit minimal overlap with those identified by transcriptomics alone. Notably, KD and SHAKE, both label-based methods, demonstrate particularly weak alignment with transcriptomics relationships, likely due to the confounding effects of weak biological labels used during training. These findings suggest that Semi-Clipped effectively preserves transcriptomic insights while significantly enriching them with complementary morphological information, achieving a better balance between biological faithfulness and multimodal integration. + +We next investigate whether distilling morphological features into transcriptomics yields a purely additive effect or if it generates emergent synergies between modalities. To assess this, we analyze the set Distillation $\backslash$ (Transcriptomics $\cup$ Microscopy) in Figure 4, representing relationships + +
PEA ConfigurationKDSHAKEVICRegOurs
Base Method16.0017.0217.2519.71
+ Fixed Bio-Aug16.7617.2217.9719.95
+ Inference on TVN18.7618.3218.6220.58
+ Aug. Stochasticity19.3718.8419.4321.79
+ Ctrl Sampling (PEA)20.6519.9820.4623.05
+ +Table 2. Ablation study of different PEA components on HUVEC-KO evaluation dataset, on retrieval of known relationships of different distillation methods, averaged over 15 seeds. We see that combining all PEA components achieves significant improvements, especially when using our Semi-Clipped approach. + +uniquely retrieved by the distillation model but absent in unimodal transcriptomics or microscopy imaging. For all evaluated methods, we perform Gene-Set Enrichment Analysis (GSEA) (Subramanian et al., 2005) to identify enriched biological pathways within this set compared to other distinct relationships retrieved by each distillation approach, filtering for gene sets with p-values $< 0.01$ . Surprisingly, KD, SHAKE, and VICReg fail to significantly enrich any biological pathway, whereas Semi-Clipped uniquely enriches pathways related to the cell cycle and post-translational modifications (Appendix Table 3). This suggests that distilling morphological traits into transcriptomics using our approach enhances the capture of cell cycle-related information, which may be less detectable or noisier in either modality alone. This outcome likely arises from Semi-Clipped's ability to integrate rich phenotypic information from microscopy imaging, including morphological traits, spatial organization, and cellular process indicators, with transcriptomic markers such as mitochondrial RNA gene counts, often associated with cell cycle activity. This fusion enables a deeper biological synergy, allowing distillation to reveal novel biological insights that neither modality could achieve independently, while still permitting unimodal inference rather than requiring multimodal fusion. + +# 6. Discussion + +In this work, we introduced Semi-Clipped, a self-supervised framework for distilling morphological knowledge of biology into transcriptomic representations using multimodal alignment techniques. Additionally, we proposed PEA, a biologically informed augmentation strategy that repurposes batch correction to enhance representation learning. Our results demonstrate that Semi-Clipped outperforms existing distillation methods while preserving transcriptomic interpretability. Furthermore, we show that label-free distillation consistently surpasses label-based approaches, reinforcing that biological labels often lack the granularity needed to fully capture cellular complexity. A key contribution of this work is the reinterpretation of batch correction as a biologically meaningful data augmentation. Unlike conventional transcriptomic data augmentations that may disrupt + +![](images/1550bf877c0ae535a1d5dc8a4b478e9b44fb64ad1b77f4038d19827a4253f1ce.jpg) +Figure 4. Venn diagrams of retrieved biological relationships for KD, SHAKE, VICReg, and Semi-Clipped (all trained with PEA) on the HUVEC-KO OOD dataset. Semi-Clipped shows the highest overlap with transcriptomics while integrating morphological insights, whereas KD and SHAKE exhibit the weakest alignment, possibly due to reliance on weak biological labels. Detailed measures of the gains and losses of each method in each modality are available in Figure 5. + +critical expression signals, PEA introduces plausible variability while maintaining essential biological properties. This approach significantly improves cross-modal distillation performance, increasing Known Biological Relationship Recall in OOD tests while preserving interpretability. Beyond aligning transcriptomic and morphological information, Semi-Clipped reveals emergent biological synergies, particularly in cell cycle regulation and post-translational modifications. Despite these advantages, challenges remain. Random pairing within treatment groups may dilute representation quality when subtle intra-group differences exist, highlighting the need for better matching strategies. Limited large-scale paired data also restricts broader applicability. Nonetheless, Semi-Clipped is computationally efficient: training on a scaled version of our dataset with 1.3 million weakly paired samples takes only 19 hours on a single H100 GPU, thanks to the use of frozen backbones and lightweight adapters. As multimodal datasets grow, scaling these methods could further advance biological research and cross-modal understanding. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning in its application to life sciences. There are many potential societal consequences of our work, + +especially relating to the discovery of new biological relationships and potential drug treatments. Utmost care should be taken to validate safety and efficacy of model predictions in pre-clinical trials. + +# References + +Alfasly, S., Shafique, A., Nejat, P., Khan, J., Alsaafin, A., Alabtah, G., and Tizhoosh, H. Rotation-agnostic image representation learning for digital pathology. In CVPR, 2024. +Ando, D. M., McLean, C. Y., and Berndl, M. Improving phenotypic measurements in high-content imaging screens. bioRxiv, July 2017. +Bardes, A., Ponce, J., and LeCun, Y. Vicreg: Variance-invariance-covariance regularization for self-supervised learning. In ICLR, 2022. +Bendidi, I., Bardes, A., Cohen, E., Lamiable, A., Bollot, G., and Genovesio, A. No free lunch in self supervised representation learning, 2023. +Bendidi, I., Bardes, A., Cohen, E., Lamiable, A., Bollot, G., and Genovesio, A. Exploring self-supervised learning biases for microscopy image representation. Biological Imaging, 4, 2024a. doi: 10.1017/S2633903X2400014X. +Bendidi, I., Whitfield, S., Kenyon-Dean, K., Yedder, H. B., Mesbahi, Y. E., Noutahi, E., and Denton, A. K. Benchmarking transcriptomics foundation models for perturbation analysis: one pca still rules them all. In NeurIPS AIDrugX Workshop, 2024b. +Bourriez, N., Bendidi, I., Cohen, E., Watkinson, G., Sanchez, M., Bollot, G., and Genovesio, A. ChAdaViT: Channel Adaptive Attention for Joint Representation Learning of Heterogeneous Microscopy Image. In CVPR, 2024. +Camunas-Soler, J. Integrating single-cell transcriptomics with cellular phenotypes: cell morphology, ca2+ imaging and electrophysiology. Biophys. Rev., 16(1):89-107, February 2024. +Carpenter, A. E., Jones, T. R., Lamprecht, M. R., Clarke, C., Kang, I. H., Friman, O., Guertin, D. A., Chang, J. H., Lindquist, R. A., Moffat, J., Golland, P., and Sabatini, D. M. CellProfiler: image analysis software for identifying and quantifying cell phenotypes. Genome Biol., 7 (10):R100, October 2006. +Celik, S., Hütter, J.-C., Carlos, S. M., Lazar, N. H., Mohan, R., Tillinghast, C., Biancalani, T., Fay, M. M., Earnshaw, B. A., and Haque, I. S. Building, benchmarking, and + +exploring perturbative maps of transcriptional and morphological data. PLOS Computational Biology, 20(10): 1-24, 10 2024. doi: 10.1371/journal.pcbi.1012463. +Chandrasekaran, S. N., Ackerman, J., Alix, E., Ando, D. M., Arevalo, J., Bennion, M., Boisseau, N., Borowa, A., Boyd, J. D., Brino, L., Byrne, P. J., Ceulemans, H., Ch'ng, C., Cimini, B. A., Clevert, D.-A., Deflaux, N., Doench, J. G., Dorval, T., Doyonnas, R., Dragone, V., Engkvist, O., Falcon, P. W., Fritchman, B., Fuchs, F., Garg, S., Gilbert, T. J., Glazer, D., Gnutt, D., Goodale, A., Grignard, J., Guenther, J., Han, Y., Hanifehlou, Z., Hariharan, S., Hernandez, D., Horman, S. R., Hormel, G., Huntley, M., Icke, I., Iida, M., Jacob, C. B., Jaensch, S., Khetan, J., Kost-Alimova, M., Krawiec, T., Kuhn, D., Lardeau, C.-H., Lembke, A., Lin, F., Little, K. D., Lofstrom, K. R., Lotfi, S., Logan, D. J., Luo, Y., Madoux, F., Marin Zapata, P. A., Marion, B. A., Martin, G., McCarthy, N. J., Mervin, L., Miller, L., Mohamed, H., Monteverde, T., Mouchet, E., Nicke, B., Ogier, A., Ong, A.-L., Osterland, M., Otrocka, M., Peeters, P. J., Pilling, J., Prechtl, S., Qian, C., Rataj, K., Root, D. E., Sakata, S. K., Scrace, S., Shimizu, H., Simon, D., Sommer, P., Spruiell, C., Sumia, I., Swalley, S. E., Terauchi, H., Thibaudeau, A., Unruh, A., Van de Waeter, J., Van Dyck, M., van Staden, C., Warchol, M., Weisbart, E., Weiss, A., Wiest-Daessle, N., Williams, G., Yu, S., Zapiec, B., Zyla, M., Singh, S., and Carpenter, A. E. JUMP cell painting dataset: morphological impact of 136,000 chemical and genetic perturbations. bioRxiv, March 2023. +Chen, R. J., Ding, T., Lu, M. Y., Williamson, D. F. K., Jaume, G., Song, A. H., Chen, B., Zhang, A., Shao, D., Shaban, M., Williams, M., Oldenburg, L., Weishaupt, L. L., Wang, J. J., Vaidya, A., Le, L. P., Gerber, G., Sahai, S., Williams, W., and Mahmood, F. Towards a general-purpose foundation model for computational pathology. Nature Medicine, 2024. +Conesa, A., Madrigal, P., Tarazona, S., Gomez-Cabrero, D., Cervera, A., McPherson, A., Szczesniak, M. W., Gaffney, D. J., Elo, L. L., Zhang, X., and Mortazavi, A. A survey of best practices for RNA-seq data analysis. Genome Biol., 17(1), December 2016. +Corso, G., Stärk, H., Jing, B., Barzilay, R., and Jaakkola, T. Diffdock: Diffusion steps, twists, and turns for molecular docking. In ICLR, 2023. +Cui, H., Wang, C., Maan, H., Pang, K., Luo, F., Duan, N., and Wang, B. scGPT: toward building a foundation model for single-cell multi-omics using generative AI. Nat. Methods, 21(8):1470–1480, August 2024. +DeVries, T. and Taylor, G. W. Dataset augmentation in feature space, 2017. + +Evans, R., O'Neill, M., Pritzel, A., Antropova, N., Senior, A., Green, T., Zidek, A., Bates, R., Blackwell, S., Yim, J., Ronneberger, O., Bodenstein, S., Zielinski, M., Bridgland, A., Potapenko, A., Cowie, A., Tunyasuvunakool, K., Jain, R., Clancy, E., Kohli, P., Jumper, J., and Hassabis, D. Protein complex prediction with AlphaFold-Multimer. biorxiv, October 2021. +Fang, Z., Wang, J., Hu, X., Wang, L., Yang, Y., and Liu, Z. Compressing visual-linguistic model via knowledge distillation. In ICCV, 2021. +Fay, M. M., Kraus, O., Victors, M., Arumugam, L., Vuggumudi, K., Urbanik, J., Hansen, K., Celik, S., Cernek, N., Jagannathan, G., Christensen, J., Earnshaw, B. A., Haque, I. S., and Mabey, B. Rrx3: Phenomics map of biology. bioRxiv, 2023. doi: 10.1101/2023.02.07.527350. +Fradkin, P., Azadi, P., Suri, K., Wenkel, F., Bashashati, A., Sypetkowski, M., and Beaini, D. How molecules impact cells: Unlocking contrastive phenomenolecular retrieval. In NeurIPS, 2024. +Gupta, S., Hoffman, J., and Malik, J. Cross modal distillation for supervision transfer. In CVPR, 2016. +Hager, P., Menten, M. J., and Rueckert, D. Best of Both Worlds: Multimodal Contrastive Learning with Tabular and Imaging Data. In CVPR, pp. 23924-23935, Los Alamitos, CA, USA, June 2023. IEEE Computer Society. doi: 10.1109/CVPR52729.2023.02291. URL https://doi.ieeecomputersociety.org/10.1109/CVPR52729.2023.02291. +han Li, P., Chinchali, S. P., and Topcu, U. Csa: Data-efficient mapping of unimodal features to multimodal features, 2024. +Hinton, G., Vinyals, O., and Dean, J. Distilling the knowledge in a neural network. In NeurIPS Deep Learning Workshop, 2015. +Huang, T., You, S., Wang, F., Qian, C., and Xu, C. Knowledge distillation from a stronger teacher. In NeurIPS, 2022. +Huo, F., Xu, W., Guo, J., Wang, H., and Guo, S. C2kd: Bridging the modality gap for cross-modal knowledge distillation. In CVPR, 2024. +Jumper, J., Evans, R., Pritzel, A., Green, T., Figurnov, M., Ronneberger, O., Tunyasuvunakool, K., Bates, R., Zidek, A., Potapenko, A., Bridgland, A., Meyer, C., Kohl, S. A. A., Ballard, A. J., Cowie, A., Romera-Paredes, B., Nikolov, S., Jain, R., Adler, J., Back, T., Petersen, S., Reiman, D., Clancy, E., Zielinski, M., Steinegger, M., Pacholska, M., Berghammer, T., Bodenstein, S., Silver, D., Vinyals, O., Senior, A. W., Kavukcuoglu, + +K., Kohli, P., and Hassabis, D. Highly accurate protein structure prediction with alphabet. Nature, 596 (7873):583-589, Aug 2021. ISSN 1476-4687. doi: 10.1038/s41586-021-03819-2. +Kenyon-Dean, K., Wang, Z. J., Urbanik, J., Donhauser, K., Hartford, J., Saberian, S., Sahin, N., Bendidi, I., Celik, S., Fay, M., Vera, J. S. R., Haque, I. S., and Kraus, O. Vitally consistent: Scaling biological representation learning for cell microscopy. In ICML, 2025. +Kharchenko, P. V. The triumphs and limitations of computational methods for scRNA-seq. Nat. Methods, 18(7): 723-732, July 2021. +Kircher, M., Chludzinski, E., Krepel, J., Saremi, B., Beineke, A., and Jung, K. Augmentation of transcriptomic data for improved classification of patients with respiratory diseases of viral origin. Int. J. Mol. Sci., 23 (5):2481, February 2022. +Kraus, O., Kenyon-Dean, K., Saberian, S., Fallah, M., McLean, P., Leung, J., Sharma, V., Khan, A., Balakrishnan, J., Celik, S., Beaini, D., Sypetkowski, M., Cheng, C. V., Morse, K., Makes, M., Mabey, B., and Earnshaw, B. Masked autoencoders for microscopy are scalable learners of cellular biology. In CVPR, 2024. +Lafarge, M. W. and Koelzer, V. H. Rotation invariance and extensive data augmentation: A strategy for the mitosis domain generalization (midog) challenge. In Biomedical Image Registration, Domain Generalisation and Out-of-Distribution Analysis, pp. 62-67, Cham, 2022. Springer International Publishing. ISBN 978-3-030-97281-3. +Lan, Y.-T., Liu, W., and Lu, B.-L. Multimodal emotion recognition using deep generalized canonical correlation analysis with an attention mechanism. In IJCNN, 2020. doi: 10.1109/IJCNN48605.2020.9207625. +Lee, P., Kim, T., Shim, M., Wee, D., and Byun, H. Decomposed cross-modal distillation for rgb-based temporal action detection. In CVPR, 2023. +Li, H., Miao, C., Leung, C., Huang, Y., Huang, Y., Zhang, H., and Wang, Y. Exploring representation-level augmentation for code search, 2022. +Li, L. and Zhe, J. Shadow knowledge distillation: Bridging offline and online knowledge transfer. In NeurIPS, 2022. +Li, R., Wu, J., Li, G., Liu, J., Xuan, J., and Zhu, Q. Mdwgangp: data augmentation for gene expression data based on multiple discriminator WGAN-GP. BMC Bioinformatics, 24(1):427, November 2023. +Liu, T., Li, K., Wang, Y., Li, H., and Zhao, H. Evaluating the utilities of foundation models in single-cell data analysis. bioRxiv, September 2023. + +Lopez, R., Regier, J., Cole, M. B., Jordan, M. I., and Yosef, N. Deep generative modeling for single-cell transcriptomics. Nature Methods, 15(12):1053-1058, 2018. +Lu, S., Furth, D., and Gillis, J. Integrative analysis methods for spatial transcriptomics. Nat. Methods, 18(11):1282-1283, November 2021. +Miao, Z., Humphreys, B. D., McMahon, A. P., and Kim, J. Multi-omics integration in the age of million single-cell data. Nat. Rev. Nephrol., 17(11):710-724, November 2021. +Moutakanni, T., Oquab, M., Szafraniec, M., Vakalopoulou, M., and Bojanowski, P. You don't need domain-specific data augmentations when scaling self-supervised learning. In NeurIPS, 2024. +Nouri, N. Single-cell RNA-seq data augmentation using generative fourier transformer. Commun. Biol., 8(1):113, January 2025. +Park, W., Kim, D., Lu, Y., and Cho, M. Relational knowledge distillation. In CVPR, June 2019. +Pham, C. and Plummer, B. A. Enhancing feature diversity boosts channel-adaptive vision transformers. In NeurIPS, 2024. +Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., Krueger, G., and Sutskever, I. Learning transferable visual models from natural language supervision. In NeurIPS, 2021. +Replogle, J. M., Saunders, R. A., Pogson, A. N., Hussmann, J. A., Lenail, A., Guna, A., Mascibroda, L., Wagner, E. J., Adelman, K., Lithwick-Yanai, G., Iremadze, N., Oberstrass, F., Lipson, D., Bonnar, J. L., Jost, M., Norman, T. M., and Weissman, J. S. Mapping information-rich genotype-phenotype landscapes with genome-scale perturb-seq. Cell, 185(14):2559-2575.e28, July 2022. +Reymond, J.-L. The chemical space project. Acc. Chem. Res., 48(3):722-730, March 2015. +Roheda, S., Riggan, B. S., Krim, H., and Dai, L. Cross-modality distillation: A case for conditional generative adversarial networks. In ICASSP, 2018. doi: 10.1109/ICASSP.2018.8462082. +Rosen, Y., Roohani, Y., Agarwal, A., Samotorčan, L., Tabula Sapiens Consortium, Quake, S. R., and Leskovec, J. Universal cell embeddings: A foundation model for cell biology. *bioRxiv*, November 2023. +Ruppli, C., Gori, P., Ardon, R., and Bloch, I. Optimizing Transformations for Contrastive Learning in a Differentiable Framework, pp. 96-105. Springer Nature + +Switzerland, 2022. ISBN 9783031167607. doi: 10. 1007/978-3-031-16760-7_10. URL http://dx.doi.org/10.1007/978-3-031-16760-7_10. +Saillard, C., Jenatton, R., Llinares-López, F., Mariet, Z., Cahané, D., Durand, E., and Vert, J.-P. H-optimus-0, 2024. URL https://github.com/biooptimus/releases/tree/main/models/h-optimus/v0. +Sanchez, M., Bourriez, N., Bendidi, I., Cohen, E., Svatko, I., Del Nery, E., Tajmouati, H., Bollot, G., Calzone, L., and Genovesio, A. Large scale cell painting guided compound selection reveals activity cliffs and functional relationships. May 2025. +Sanchez-Fernandez, A., Rumetshofer, E., Hochreiter, S., and Klambauer, G. CLOOME: contrastive learning unlocks bioimaging databases for queries with chemical structures. Nat. Commun., 14(1):7339, November 2023. +Sarkar, P. and Etemad, A. Xkd: Cross-modal knowledge distillation with domain alignment for video representation learning. Proceedings of the AAAI Conference on Artificial Intelligence, 38. doi: 10.1609/aaai.v38i13.29407. +Subramanian, A., Tamayo, P., Mootha, V. K., Mukherjee, S., Ebert, B. L., Gillette, M. A., Paulovich, A., Pomeroy, S. L., Golub, T. R., Lander, E. S., and Mesirov, J. P. Gene set enrichment analysis: A knowledge-based approach for interpreting genome-wide expression profiles. Proc. Natl. Acad. Sci. U. S. A., 102(43):15545-15550, October 2005. +Subramanian, A., Narayan, R., Corsello, S. M., Peck, D. D., Natoli, T. E., Lu, X., Gould, J., Davis, J. F., Tubelli, A. A., Asiedu, J. K., Lahr, D. L., Hirschman, J. E., Liu, Z., Donahue, M., Julian, B., Khan, M., Wadden, D., Smith, I. C., Lam, D., Liberzon, A., Toder, C., et al. A next generation connectivity map: L1000 platform and the first 1,000,000 profiles. Cell, 171(6):1437-1452.e17, 2017. +Theodoris, C. V., Xiao, L., Chopra, A., Chaffin, M. D., Al Sayed, Z. R., Hill, M. C., Mantineo, H., Brydon, E. M., Zeng, Z., Liu, X. S., and Ellinor, P. T. Transfer learning enables predictions in network biology. Nature, 618 (7965):616-624, June 2023. +Tsai, Y.-H. H., Wu, Y., Salakhutdinov, R., and Morency, L.-P. Self-supervised learning from a multi-view perspective, 2021. URL https://arxiv.org/abs/2006.05576. +Vorontsov, E., Bozkurt, A., Casson, A., Shaikovski, G., Zelechowski, M., Liu, S., Severson, K., Zimmermann, E., Hall, J., Tenenholtz, N., Fusi, N., Mathieu, P., van Eck, A., Lee, D., Viret, J., Robert, E., Wang, Y. K., + +Kunz, J. D., Lee, M. C. H., Bernhard, J., Godrich, R. A., Oakley, G., Millar, E., Hanna, M., Retamero, J., Moye, W. A., Yousfi, R., Kanan, C., Klimstra, D., Rothrock, B., and Fuchs, T. J. Virchow: A million-slide digital pathology foundation model, 2024. URL https://arxiv.org/abs/2309.07778. +Wang, Z., Codella, N., Chen, Y.-C., Zhou, L., Dai, X., Xiao, B., Yang, J., You, H., Chang, K.-W., fu Chang, S., and Yuan, L. Multimodal adaptive distillation for leveraging unimodal encoders for vision-language tasks, 2022. URL https://arxiv.org/abs/2204.10496. +Watkinson, G., Cohen, E., Bourriez, N., Bendidi, I., Bollot, G., and Genovesio, A. Weakly supervised cross-modal learning in high-content screening. In ISBI, 2024. doi: 10.1109/ISBI56570.2024.10635200. +Wen, H., Tang, W., Dai, X., Ding, J., Jin, W., Xie, Y., and Tang, J. CellPLM: Pre-training of cell language model beyond single cells. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=BKXvPDekud. +Wenkel, F., Tu, W., Masschelein, C., Shirzad, H., Eastwood, C., Whitfield, S. T., Bendidi, I., Russell, C., Hodgson, L., Mesbahi, Y. E., Ding, J., Fay, M. M., Earnshaw, B., Noutahi, E., and Denton, A. K. Txpert: Leveraging biochemical relationships for out-of-distribution transcriptomic perturbation prediction, 2025. +Wu, K., Peng, H., Zhou, Z., Xiao, B., Liu, M., Yuan, L., Xuan, H., Valenzuela, M., Chen, X. S., Wang, X., Chao, H., and Hu, H. Tinyclip: Clip distillation via affinity mimicking and weight inheritance. In ICCV, 2023. +Xi, J., Osea, J., Xu, Z., and Hartford, J. Propensity score alignment of unpaired multimodal data. In NeurIPS, 2024. +Xie, R., Pang, K., Chung, S. W., Perciani, C., Mac-Parland, S., WANG, B., and Bader, G. Spatially resolved gene expression prediction from histology images via bi-modal contrastive learning. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=eT1tMdAUoc. +Xue, Z., Ren, S., Gao, Z., and Zhao, H. Multimodal knowledge expansion. In ICCV, 2021. doi: 10.1109/ICCV48922.2021.00089. +Yang, C., An, Z., Huang, L., Bi, J., Yu, X., Yang, H., Diao, B., and Xu, Y. Clip-kd: An empirical study of clip model distillation. In CVPR, 2024. + +Yang, F., Wang, W., Wang, F., Fang, Y., Tang, D., Huang, J., Lu, H., and Yao, J. scBERT as a large-scale pretrained deep language model for cell type annotation of single-cell RNA-seq data. Nat. Mach. Intell., 4(10):852-866, September 2022. +Yao, H., Hanslovsky, P., Huetter, J.-C., Hoeckendorf, B., and Richmond, D. Weakly supervised set-consistency learning improves morphological profiling of single-cell images. In CVPR Workshops, 2024. +Ye, C., Ho, D. J., Neri, M., Yang, C., Kulkarni, T., Randhawa, R., Henault, M., Mostacci, N., Farmer, P., Renner, S., Ihry, R., Mansur, L., Keller, C. G., McAllister, G., Hild, M., Jenkins, J., and Kaykas, A. DRUG-seq for miniaturized high-throughput transcriptome profiling in drug discovery. Nat. Commun., 9(1):4307, October 2018. +Zhai, X., Mustafa, B., Kolesnikov, A., and Beyer, L. Sigmoid loss for language image pre-training. In ICCV, 2023. +Zhou, Y., Badgery, H., Read, M., Bailey, J., and Davey, C. E. Dda: Dimensionality driven augmentation search for contrastive learning in laparoscopic surgery, 2024. URL https://arxiv.org/abs/2406.00907. +Zhu, Y. and Wang, Y. Student customized knowledge distillation: Bridging the gap between student and teacher. In ICCV, 2021. doi: 10.1109/ICCV48922.2021.00501. + +# A. Detailed Experimental Setup + +# A.1.Encoders + +We use three main models for our experiments, in addition to the MLP trained from scratch. Phenom-1 (Kraus et al., 2024) is a Vision Transformer-based model with 300 million parameters, trained using a Masked Autoencoder (MAE) framework. It is pretrained on RPI-93M, a dataset of 93 million microscopy images, capturing diverse cellular phenotypes across CRISPR, chemical, and soluble perturbations, making it highly effective for large-scale cellular morphology analysis. scVI (Lopez et al., 2018) is a probabilistic generative model designed for single-cell RNA sequencing (scRNA-seq) data, trained using a Variational Autoencoder (VAE) framework. It encodes high-dimensional gene expression data into a biologically meaningful latent space, leveraging a zero-inflated negative binomial (ZINB) reconstruction objective to model overdispersion and dropout effects in transcriptomic data. scGPT (Cui et al., 2024) is a transformer-based foundation model pretrained on 33 million scRNA-seq samples using a masked language modeling objective. It captures complex gene-gene and gene-cell interactions, with fine-tuning capabilities for tasks like cell type annotation, multi-omic integration, and perturbation response prediction. These models provide robust, biologically relevant representations tailored for microscopy and transcriptomics data. + +# A.2. Implementation details + +The MLP adapters $f_{S}$ and $f_{T}$ used in this work are fully connected feedforward networks designed to align embeddings from the transcriptomics (Tx) and microscopy imaging encoders into a shared latent space. For the transcriptomics adapter, the architecture comprises an input layer of size 256, two hidden layers with dimensions 512 and 1024 respectively, and an output layer of size 768. The image adapter follows a similar design, with an input size of 768, two hidden layers of size 1024, and an output layer of size 768. ReLU activations are applied to all hidden layers, while the output layer uses a linear activation. + +For VICReg, learning rates for the Tx and image adapters were 0.1 and $1 \times 10^{-8}$ , respectively, and training spanned 10 epochs with a minimum learning rate of $10^{-10}$ ; the VICReg loss parameters (similarity, variance, and covariance weights) were kept at their default settings. Similarly, SigClip used Tx and Img adapters learning rates of 0.1 and $10^{-8}$ , respectively, with training conducted for 10 epochs and a minimum learning rate of $10^{-10}$ ; the temperature and normalization parameters were kept at their defaults. For DCCA, the Tx and Img adapters were trained with a learning rate of $10^{-6}$ and $10^{-8}$ respectively over 50 epochs, a minimum learning rate of $10^{-10}$ , and loss parameters including an output dimension size of 30, usage of all singular values, and an epsilon of $10^{-6}$ . The SHAKE method utilized Tx and Img adapters learning rates of 0.1 and $10^{-8}$ , Tx and Img classifier learning rates of $10^{-4}$ and $10^{-7}$ , respectively, and a temperature of 9, with loss balancing hyperparameters $\alpha = 10$ and $\beta = 0.001$ ; training was conducted over 10 epochs with a minimum learning rate of $10^{-10}$ . For KD, the Tx adapters and classifier learning rates were 0.1 and $10^{-4}$ , respectively, with a temperature of 9 and $\alpha = 10$ , trained for 10 epochs with a minimum learning rate of $10^{-10}$ . Lastly, C2KD employed Tx and Img adapters learning rates of 0.1 and $10^{-6}$ , Tx and Img classifier learning rates of $10^{-5}$ and $10^{-3}$ , respectively, and a temperature of 2 with a Kendall Rank Correlation threshold of 0.3; training spanned 30 epochs with a minimum learning rate of $10^{-7}$ . At evaluation step, we perform TVN alignment for all output embeddings for the Known Relationship Recall benchmark, and use raw embeddings for Transcriptomic Interpretability Preservation benchmark, as is used in (Bendidi et al., 2024b). + +# B. Evaluation tasks + +# B.1. Known Biological Relationship Recall + +The Known Relationship Recall score is a benchmarking metric introduced in (Celik et al., 2024) and designed to evaluate the extent to which a perturbative map captures established biological relationships. This score serves as a proxy for assessing the biological relevance of the map and its ability to uncover meaningful interactions between genes. By comparing predicted relationships within the map to curated annotations from biological databases, the Known Relationship Recall score provides a quantitative measure of the map's fidelity to known biology. + +The computation of the Known Relationship Recall score follows these steps: + +1. Pairwise Similarity Computation: For each pair of genes $(g_i, g_j)$ in the map, we compute the cosine similarity between + +their aggregated embeddings $\mathbf{x}_{g_i}$ and $\mathbf{x}_{g_j}$ . The cosine similarity is defined as: + +$$ +\cos \left(\mathbf {x} _ {g _ {i}}, \mathbf {x} _ {g _ {j}}\right) = \frac {\left\langle \mathbf {x} _ {g _ {i}} , \mathbf {x} _ {g _ {j}} \right\rangle}{\left\| \mathbf {x} _ {g _ {i}} \right\| \left\| \mathbf {x} _ {g _ {j}} \right\|}, +$$ + +where $\langle \mathbf{x}_{g_i},\mathbf{x}_{g_j}\rangle$ is the dot product of the embeddings, and $\| \mathbf{x}_{g_i}\|$ is the Euclidean norm of $\mathbf{x}_{g_i}$ . + +2. Selection of Predicted Relationships: Relationships are classified as "predicted" if their cosine similarity scores fall into the top or bottom relationships according to a percentage threshold (usually $5\%$ ) of the distribution of all pairwise similarities. High similarity scores indicate cooperative relationships, while low scores suggest functional opposition. +3. Validation Against Biological Databases: The predicted relationships are validated using established biological annotations from databases such as CORUM, HuMAP, Reactome, SIGNOR, and StringDB. Only gene that appear in the perturbation dataset are considered for pairs in the database. +4. Recall Calculation for Each Database: For each database, the recall is computed as the fraction of annotated relationships that are successfully identified among the predicted relationships: + +$$ +\operatorname {R e c a l l} _ {\mathrm {d b}} = \frac {\# (\text {T r u e P o s i t i v e R e l a t i o n s h i p s})}{\# (\text {T o t a l A n n o t a t e d R e l a t i o n s h i p s i n M a p})} +$$ + +Here, true positive relationships are those annotated in the database that also fall within the predicted set. The final Known Relationship Recall score is computed as the mean of the recall values across the five databases. + +The Known Relationship Recall score provides a single aggregated metric that encapsulates the map's ability to recapitulate established biological relationships. A high score indicates strong alignment with existing annotations, demonstrating the map's utility in representing meaningful biological interactions. + +# B.2. Transcriptomic Interpretability Preservation + +The Transcriptomic Interpretability Preservation, first introduced as linear interpretability evaluation in (Bendidi et al., 2024b), is an evaluation framework designed to assess how well a model captures and preserves biologically meaningful patterns in transcriptomic data. This task evaluates the quality of the model's internal representations and their ability to reconstruct gene expression profiles accurately while maintaining the structural relationships between control and perturbation conditions. By focusing on both the accuracy of reconstructed gene expression profiles and the preservation of batch-specific control-perturbation relationships, this metric provides a holistic view of the model's capability to retain original transcriptomic interpretability. The evaluation relies on two complementary metrics, which are averaged to compute the final Transcriptomic Interpretability Preservation score: + +Structural Integrity Score: This metric quantifies how well the model preserves the relationships between control and perturbation conditions within each biological batch. The Structural Integrity score is computed as: + +$$ +\text {S t r u c t u r a l I n t e g r i t y} = 1 - \frac {\text {S t r u c t u r a l D i s t a n c e}}{\text {S t r u c t u r a l D i s t a n c e} _ {\max}}, +$$ + +where the Structural Distance measures the Frobenius norm of the difference between centered predicted and actual gene expression matrices, and Structural $\mathrm{Distance}_{\mathrm{max}}$ is the theoretical maximum distance, as derived in (Bendidi et al., 2024b). A score close to 1 indicates strong preservation of the structural relationships. + +Spearman Correlation of Reconstruction: This metric evaluates how accurately the model reconstructs original gene expression profiles from its internal latent representations. The Spearman correlation is calculated between the predicted and true gene expression profiles, providing a robust measure of rank-based agreement. + +To provide a comprehensive evaluation, the Transcriptomic Interpretability Preservation metric is computed as the average of the Structural Integrity score and the Spearman correlation of reconstruction. By evaluating both aspects, the metric ensures that a model not only produces high-quality reconstructions but also retains the underlying biological structure of the data. This is crucial for downstream applications such as identifying gene interactions or studying the effects of perturbations in various conditions. + +# C. Batch Correction Techniques + +# C.1. Centering + +Centering involves adjusting the dataset such that each feature has a mean of zero. This is achieved by subtracting the mean of each feature from the data. Given a feature matrix $X \in \mathbb{R}^{n \times m}$ , where $n$ is the number of samples and $m$ is the number of features, the centered matrix $\tilde{X}$ is computed as: + +$$ +\tilde {X} _ {i j} = X _ {i j} - \frac {1}{n} \sum_ {k = 1} ^ {n} X _ {k j}, \quad \forall i = 1, \ldots , n, \quad \forall j = 1, \ldots , m. +$$ + +This step shifts the data so that each feature's mean is zero. In batch-corrected biological datasets, centering is typically applied to remove the influence of negative control embeddings, facilitating the focus on perturbation effects. + +# C.2. Center Scaling/Standardization + +Center scaling/Standardization extends centering by adjusting each feature so that it has unit variance. This ensures comparability across features. For a centered matrix $\hat{X}$ , the scaled matrix $\hat{X}$ is defined as: + +$$ +\hat {X} _ {i j} = \frac {\tilde {X} _ {i j}}{\sigma_ {j}}, \quad \sigma_ {j} = \sqrt {\frac {1}{n} \sum_ {k = 1} ^ {n} \tilde {X} _ {k j} ^ {2}}, +$$ + +$$ +\forall i = 1, \dots , n, \quad \forall j = 1, \dots , m, +$$ + +where $\sigma_{j}$ represents the standard deviation of the $j$ -th feature. Center scaling is important for techniques like Principal Component Analysis (PCA), which are influenced by the scale of the data. + +# C.3. Typical Variation Normalization (TVN) + +Typical Variation Normalization (TVN) is a technique designed to enhance the representation of biological data by minimizing batch effects and accentuating subtle phenotypic differences. TVN is particularly relevant in high-content imaging screens and other scenarios with significant batch variability. + +TVN begins by computing the principal components of control samples (negative control conditions) to identify the primary directions of variation. PCA is performed on the centered control data $\tilde{X}_{\mathrm{control}}$ to obtain principal components $\{\mathbf{v}_1,\dots ,\mathbf{v}_m\}$ , with each component representing a variance direction in the data space. The normalization process involves the following steps: + +1. Centering and Scaling of Negative Controls: The negative control data $X_{\mathrm{control}}$ is centered and scaled as: + +$$ +\hat {X} _ {\text {c o n t r o l}} = \frac {X _ {\text {c o n t r o l}} - \mu_ {\text {c o n t r o l}}}{\sigma_ {\text {c o n t r o l}}}, +$$ + +where $\mu_{\mathrm{control}}$ and $\sigma_{\mathrm{control}}$ are the mean and standard deviation of the control embeddings. + +2. Principal Component Analysis (PCA): PCA is conducted on $\hat{X}_{\mathrm{control}}$ to derive principal components. The matrix $W \in \mathbb{R}^{m \times m}$ consists of columns that are the component vectors $\mathbf{v}_j$ . + +3. TVN Transformation: The transformation matrix $T$ is constructed to normalize variance along each principal component axis: + +$$ +T = W \cdot D ^ {- 1 / 2} \cdot W ^ {\top}, +$$ + +where $D$ is a diagonal matrix of the eigenvalues associated with the principal components. + +4. Application to All Embeddings: The transformation is applied to all embeddings $X_{\mathrm{all}}$ as: + +$$ +X _ {\mathrm {T V N}} = T \cdot X _ {\mathrm {a l l}}. +$$ + +This step reduces unwanted variation while emphasizing important biological differences, enabling a focus on subtle or rare phenotypic features without batch-related artifacts. + +# D. Additional Results + +
# of relationship countsKDSHAKEVICRegSemi-Clipped
Distillation Relationship Gains relative to Tx59445036
Distillation Relationship Losses relative to Tx3928305
Transcriptomic Relationship Preservation22333256
Total Recalled Relationships81778292
+ +Figure 5. Comparison of relationship gains and losses across cross-modal distillation methods shown in Figure 4. Our approach achieves the highest overall relationship recall and best preserves transcriptomic information. + +![](images/e385a1ed4eab1d684b24ab48926d43687b22449dcda226ff24b39ebfd71ebff0.jpg) +Figure 6. Literature-known biological relationships retrieved through the LINCS dataset by the transcriptomics and microscopy imaging unimodal encoders, alongside our proposed Semi-Clipped approach, without data augmentations, and a null distribution through randomization of the perturbation labels of the pretrained Semi-Clipped. Semi-Clipped remains consistent with transcriptomics while distilling new relationships from microscopy imaging, displaying a distinct pattern from the null distribution. + +![](images/c7794e1c8211eb587da4353b8eda516fe1777b928b29b4d1aef48c950884a2c6.jpg) +Top 1% & Bottom 1% Relationships Top 2% & Bottom 2% Relationships Top 3% & Bottom 3% Relationships Top 4% & Bottom 4% Relationships Top 5% & Bottom 5% Relationships +Figure 7. Literature-known biological relationships retrieved by the transcriptomics and microscopy imaging unimodal encoders, alongside our proposed Semi-Clipped approach (first row), without data augmentations, across different retrieval thresholds (columns) on the HUVEC-KO dataset. Semi-Clipped remains consistent with transcriptomics while distilling new relationships from microscopy imaging. In second and third row, we compare Semi-Clipped to a null distribution achieved through randomization of the perturbation labels of the pretrained Semi-Clipped. Our approach displays a distinct pattern from the null distribution, and aligns better to both modalities than random. + +
Enriched PathwaysSource SetP-value
REACTOME CELL CYCLE CHECKPOINTSSemi-Clipped \ (Tx ∪ Img)0.0323
KEGG ANTIGEN PROCESSING AND PRESENTATION(Semi-Clipped ∩ Img) \ Tx0.0049
KEGG P53 SIGNALING PATHWAY(Semi-Clipped ∩ Img) \ Tx0.0033
KEGG RIG I LIKE RECEPTOR SIGNALING PATHWAY(Semi-Clipped ∩ Img) \ Tx0.0082
REACTOME ADAPTIVE IMMUNE SYSTEM(Semi-Clipped ∩ Img) \ Tx0.0114
REACTOME ANTIGEN PRESENTATION FOLDING ASSEMBLY AND PEPTIDE LOADING OF CLASS I MHC(Semi-Clipped ∩ Img) \ Tx0.0049
REACTOME ANTIGEN PROCESSING CROSS PRESENTATION(Semi-Clipped ∩ Img) \ Tx0.0016
REACTOME ASPARAGINE N LINKED GLYCOSYLATION(Semi-Clipped ∩ Img) \ Tx0.0049
REACTOME CALNEXIN CALRETICULIN CYCLE(Semi-Clipped ∩ Img) \ Tx0.0049
REACTOME CELL CYCLE(Semi-Clipped ∩ Img) \ Tx0.0480
REACTOME CLASS I MHC MEDIATED ANTIGEN PROCESSING PRESENTATION(Semi-Clipped ∩ Img) \ Tx0.0049
REACTOME DDX58 IFI1 mediated induction of INTERFERON ALPHA BETA(Semi-Clipped ∩ Img) \ Tx0.0082
REACTOME DEUBIQUITINATION(Semi-Clipped ∩ Img) \ Tx0.0130
REACTOME G1 S DNA DAMAGE CHECKPOINTS(Semi-Clipped ∩ Img) \ Tx0.0033
REACTOME G ALPHA Q SIGNALLING EVENTS(Semi-Clipped ∩ Img) \ Tx0.0065
REACTOME HEMOSTASIS(Semi-Clipped ∩ Img) \ Tx0.0082
REACTOME INNATE IMMUNE SYSTEM(Semi-Clipped ∩ Img) \ Tx0.0227
REACTOME NEGATIVE REGULATORS OF DDX58 IFI1 SIGNALING(Semi-Clipped ∩ Img) \ Tx0.0033
REACTOME N GLYCAN TRIMMING IN THE ER AND CALNEXIN CALRETICULIN CYCLE(Semi-Clipped ∩ Img) \ Tx0.0049
REACTOME OVARIAN TUMOR DOMAIN PROTEASES(Semi-Clipped ∩ Img) \ Tx0.0016
REACTOME PLATELET ACTIVATION SIGNALING AND AGGREGATION(Semi-Clipped ∩ Img) \ Tx0.0065
REACTOME POST TRANSLATIONAL PROTEIN MODIFICATION(Semi-Clipped ∩ Img) \ Tx0.0002
REACTOME REGULATION OF TP53 ACTIVITY(Semi-Clipped ∩ Img) \ Tx0.0179
REACTOME REGULATION OF TP53 ACTIVITY THROUGH METHYLATION(Semi-Clipped ∩ Img) \ Tx0.0016
REACTOME REGULATION OF TP53 ACTIVITY THROUGH PHOSPHORYLATION(Semi-Clipped ∩ Img) \ Tx0.0179
REACTOME REGULATION OF TP53 EXPRESSION AND DEGRADATION(Semi-Clipped ∩ Img) \ Tx0.0016
REACTOME RNA POLYMERASE II TRANSCRIPTION(Semi-Clipped ∩ Img) \ Tx0.0480
REACTOME SIGNALING BY GPCR(Semi-Clipped ∩ Img) \ Tx0.0082
REACTOME STABILIZATION OF P53(Semi-Clipped ∩ Img) \ Tx0.0016
REACTOME TRANSCRIPTIONAL REGULATION BY TP53(Semi-Clipped ∩ Img) \ Tx0.0195
+ +Table 3. Gene Set Enrichment Analysis (GSEA) results on the HUVEC-KO dataset, highlighting enriched pathways identified uniquely in the Semi-Clipped approach compared to the transcriptomics and microscopy imaging unimodal encoders. The first row represents pathways uniquely enriched in Semi-Clipped after excluding the union of transcriptomics and morphological relationships, revealing enrichment in cell cycle pathways. The subsequent rows list pathways enriched in the intersection of Semi-Clipped and microscopy imaging, excluding transcriptomics relationships, which shows that in addition to Semi-Clipped unique enriched pathways, our approach is also enriched by morphology specific pathways. \ No newline at end of file diff --git a/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/images.zip b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..25df87e159800e888603c6ca50154bb0e7b987c3 --- /dev/null +++ b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70d118957e3a30b3dffe6f45d368675b195447e3005837046c36fd936ff74dd6 +size 751828 diff --git a/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/layout.json b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f17588faf0e75c067563e2a618d25f71861ed585 --- /dev/null +++ b/acrossmodalknowledgedistillationdataaugmentationrecipeforimprovingtranscriptomicsrepresentationsthroughmorphologicalfeatures/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa7150e966ad28e952c1b7a8dbc64f1f74549977b61a1fb8e7ef1c503e182aa7 +size 535365 diff --git a/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/3daf9907-45cc-4904-9946-cc4416e5e818_content_list.json b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/3daf9907-45cc-4904-9946-cc4416e5e818_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2a9b4f2ac4224004239232a9ccc67dcde4426a57 --- /dev/null +++ b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/3daf9907-45cc-4904-9946-cc4416e5e818_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff587e87ab9f9e1fb64bdb061edd97c9ab3d08000a50a423e97ebbba77b8fce4 +size 267628 diff --git a/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/3daf9907-45cc-4904-9946-cc4416e5e818_model.json b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/3daf9907-45cc-4904-9946-cc4416e5e818_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a158409e4485517a753e55d0ec3180dde91d237c --- /dev/null +++ b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/3daf9907-45cc-4904-9946-cc4416e5e818_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec12e5a02431cf136214db2afa954b0b8c1f1cc03a350d9cfd16d66690735b2a +size 324194 diff --git a/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/3daf9907-45cc-4904-9946-cc4416e5e818_origin.pdf b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/3daf9907-45cc-4904-9946-cc4416e5e818_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9e3e2462e48fde613225e3d0b480dad024045959 --- /dev/null +++ b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/3daf9907-45cc-4904-9946-cc4416e5e818_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51b48d037f6da19b18d3db53fada7eca0d237075030216dfdb71b0fd3ef5863d +size 2869858 diff --git a/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/full.md b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a849f03c2660ee39adbaffa0cfc9742b8d1b71bc --- /dev/null +++ b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/full.md @@ -0,0 +1,1858 @@ +# A Dynamical Systems-Inspired Pruning Strategy for Addressing Oversmoothing in Graph Attention Networks + +Biswadeep Chakraborty1 Harshit Kumar1 Saibal Mukhopadhyay1 + +# Abstract + +Graph Neural Networks (GNNs) face a critical limitation known as oversmoothing, where increasing network depth leads to homogenized node representations, severely compromising their expressiveness. We present a novel dynamical systems perspective on this challenge, revealing oversmoothing as an emergent property of GNNs' convergence to low-dimensional attractor states. Based on this insight, we introduce DYNAMO-GAT, which combines noise-driven covariance analysis with Anti-Hebbian learning to dynamically prune attention weights, effectively preserving distinct attractor states. We provide theoretical guarantees for DYNAMO-GAT's effectiveness and demonstrate its superior performance on benchmark datasets, consistently outperforming existing methods while requiring fewer computational resources. This work establishes a fundamental connection between dynamical systems theory and GNN behavior, providing both theoretical insights and practical solutions for deep graph learning. + +# 1. Introduction + +Graph Neural Networks (GNNs) (Wu et al., 2020) have emerged as powerful tools for learning from graph-structured data, achieving remarkable success in molecular property prediction (Gilmer et al., 2017; Reiser et al., 2022; Gasteiger et al., 2021), social network analysis (Kipf & Welling, 2017; Fan et al., 2019), and recommendation systems (Ying et al., 2018). However, as these networks grow deeper, they face a critical challenge: oversmoothing, where node representations become increasingly homogeneous and indistinguishable, severely impairing their expressiveness + +$^{1}$ Department of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, USA. Correspondence to: Biswadeep Chakraborty . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/b5c145d3b11c14e61a45285933603dd4a118243d59bfbe2859d5b66c600b1ea6.jpg) +Figure 1. As the number of layers $k$ in a GNN increases, oversmoothing causes node embeddings to converge towards a single attractor state, resulting in the loss of node feature diversity. Pruning mitigates this effect by maintaining multiple attractor states, thereby preserving the distinctiveness of node embeddings and preventing the detrimental effects of oversmoothing. + +and performance (Li et al., 2018). + +Oversmoothing emerges from the fundamental mechanism of GNNs - repeated message passing between nodes (Oono & Suzuki, 2020; Cai & Wang, 2020; Keriven, 2022). While various architectural solutions have been proposed, including skip connections (Li et al., 2019; Xu et al., 2018), normalization techniques (Ba et al., 2016; Ioffe & Szegedy, 2015; Zhou et al., 2020), attention mechanisms (Velickovic et al., 2018; Wu et al., 2023), and other strategies like stochastic methods or residual connections, these approaches primarily focus on structural modifications. While some work also explores GNN dynamics, for instance, through learned energy metrics (Jin & Zhu, 2024), many existing methods fail to fully address the underlying convergence dynamics that drive oversmoothing (Li et al., 2018; Chen et al., 2020; Oono & Suzuki, 2020). + +Recent attempts to mitigate oversmoothing through pruning (Zhao et al., 2020) or graph sparsification (Spielman & Srivastava, 2011) have shown promise in reducing network redundancy. However, traditional sparsification often prioritizes structural or spectral fidelity primarily for efficiency, not directly targeting the feature dynamics causing oversmoothing. Similarly, Graph Attention Networks (GATs), while improving feature aggregation, still struggle in deep architectures (Wu et al., 2023). This is partly because they + +often overlook the fundamental dynamical behavior and can face challenges in learning truly sparse attention patterns due to inherent trainability issues, which can prevent the effective removal of redundant connections (Mustafa et al., 2021). + +In this work, we reconceptualize oversmoothing through the lens of dynamical systems theory. By viewing the message-passing process as a dynamical system converging to a low-dimensional attractor (Li et al., 2019), we formally characterize the conditions driving the collapse of node representations. Our analysis, based on eigenvalue properties of graph attention mechanisms (Abbe et al., 2020; Allen-Zhu et al., 2019), reveals oversmoothing as an emergent property of the network's convergence dynamics, enabling the design of more effective countermeasures. + +We introduce DYNAMO-GAT, a GNN architecture that adaptively counteracts oversmoothing by leveraging dynamical systems principles. DYNAMO-GAT preserves node diversity across layers by altering the system's fixed points during training through selective pruning and noise-driven covariance analysis. Our key contributions are: + +- A rigorous theoretical framework that analyzes oversmoothing through dynamical systems principles, revealing its fundamental causes and potential mitigation strategies. +- DYNAMO-GAT: A novel architecture that dynamically counteracts oversmoothing by adaptively modifying the network's attractor landscape during training. +- Comprehensive theoretical analysis and empirical validation demonstrating how DYNAMO-GAT preserves node diversity and enhances expressiveness in deep GNNs, achieving superior performance on benchmark datasets. + +This work represents a significant shift from empirical fixes to a fundamental understanding of oversmoothing, establishing both theoretical foundations and practical solutions. Our findings not only advance the development of more robust and expressive GNN architectures but also open new avenues for analyzing deep learning systems through dynamical principles. + +# 2. Dynamical Systems View of Oversmoothing + +Oversmoothing in GNNs is a critical challenge, particularly as the depth of these networks increases. While Graph Attention Networks (GATs) introduce dynamic weighting mechanisms that can mitigate oversmoothing to some extent, they can also contribute to it under certain conditions (Velickovic et al., 2018; Rusch et al., 2023b). To fully under + +stand and address this phenomenon, we adopt a dynamical systems perspective (Roth & Liebig, 2024). + +Unlike traditional approaches that focus on architectural modifications, the dynamical systems view provides a more fundamental explanation by examining the stability and convergence properties of GNNs. By modeling GATs as dynamical systems, we can analyze how node representations evolve across layers and identify the conditions under which oversmoothing occurs (Wu et al., 2024; Di Giovanni et al., 2023). This perspective not only deepens our theoretical understanding but also suggests new strategies for mitigating oversmoothing (Roth & Liebig, 2024; Rusch et al., 2022). + +GATs as Dynamical Systems. In GATs, node representations evolve according to the learned attention weights $\alpha_{ij}$ , which govern the influence of neighboring nodes. This dynamic weighting introduces complexity into the system's behavior, making it essential to understand how these weights evolve across layers. + +As these weights evolve, the system's dynamics may lead to a state where node representations become indistinguishable, resulting in oversmoothing. Understanding this process is key to designing GATs that avoid oversmoothing while still leveraging attention mechanisms effectively. + +# 2.1. Theoretical Analysis of Oversmoothing in GATs + +In this subsection, we rigorously analyze the phenomenon of oversmoothing in GATs using dynamical systems theory. Specifically, we explore the existence of fixed points, their stability, and the conditions under which node representations converge to indistinguishable states. The detailed theoretical proofs are given in the Supplementary Section + +Lemma 1 (GAT Fixed Point Properties). Let $G = (V, E)$ be a graph with $N$ nodes and consider a GAT with update rule $f: \mathbb{R}^{N \times d} \to \mathbb{R}^{N \times d}$ : + +$$ +X _ {i} (t + 1) = \sigma \left(\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} (t) W X _ {j} (t)\right), +$$ + +where: + +- $\sigma$ is $L_{\sigma}$ -Lipschitz with $L_{\sigma} \leq 1$ +- $W \in \mathbb{R}^{d \times d}$ with $\| W \|_2 < \frac{1}{1 + K}$ +- Attention weights $\alpha_{ij}(t)$ satisfy: - Non-negativity and normalization: $\alpha_{ij}(t) \geq 0$ , $\sum_{j \in \mathcal{N}(i)} \alpha_{ij}(t) = 1$ . Lipschitz continuity: $\|\alpha_{ij}(t) - \alpha_{ij}(t - 1)\|_2 \leq K\|X_i(t) - X_i(t - 1)\|_2$ . Boundedness: $\max_{i,j} \|\alpha_{ij}(t)\|_2 \leq M$ + +Then: + +(a) $f$ is a contraction with constant $c = \| W\| _2(1 + K) < 1$ + +(b) There exists a unique fixed point $X^{*}$ with $X^{*} = f(X^{*})$ +(c) For any $X(0)$ : $\| X(t) - X^{*}\|_{F} \leq c^{t}\| X(0) - X^{*}\|_{F}$ + +(d) The attention weights converge to $\alpha_{ij}^{*}$ with: $\| \alpha_{ij}(t) - \alpha_{ij}^{*}\|_{2} \leq c^{t}M\| X(0) - X^{*}\|_{F}$ and $\sum_{j \in \mathcal{N}(i)}\|\alpha_{ij}^{*}\|_{2} \leq \frac{M}{1 - c}$ + +Intuition and Proof Sketch. [Complete proof in Suppl. Sec. A] This lemma establishes GAT's convergence properties through dynamical systems analysis. At each node $i$ , using $\sigma$ 's Lipschitz property and attention normalization: + +$$ +\begin{array}{l} \| X _ {i} (t + 1) - X _ {i} (t) \| _ {2} = \| \sigma (\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} (t) W X _ {j} (t)) \\ - \sigma (\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} (t - 1) W X _ {j} (t - 1)) \| _ {2} \\ \end{array} +$$ + +$$ +\leq \| W \| _ {2} (\| X (t) - X (t - 1) \| _ {F} + K \| X (t - 1) - X (t - 2) \| _ {F}) +$$ + +These node-level contractions yield a matrix-level contraction $\| X(t + 1) - X(t)\| _F\leq c\| X(t) - X(t - 1)\| _F$ where $c = \| W\| _2(1 + K) < 1$ . The Banach fixed-point theorem then ensures convergence to a unique fixed point $X^{*}$ , with attention weights inheriting this convergence through their Lipschitz continuity. + +Lemma 2 (Spectral Analysis of Fixed Point). Let $X^{*} \in \mathbb{R}^{N \times d}$ be the fixed point from Lemma 1, and let $A^{*} \in \mathbb{R}^{N \times N}$ be the fixed-point attention matrix with entries $[A^{*}]_{ij} = \alpha_{ij}^{*}$ for $j \in \mathcal{N}(i)$ and 0 otherwise. Let $\lambda_1(A^*)$ , $\lambda_2(A^*)$ be its largest and second-largest eigenvalues with $v_{1}$ the leading eigenvector. Then: + +(a) At fixed point: $X_{i}^{*} = \sigma (\sum_{j\in \mathcal{N}(i)}\alpha_{ij}^{*}WX_{j}^{*})$ +(b) Feature deviation from leading eigenvector: + +$$ +\left\| X ^ {*} - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} X ^ {*} \right\| _ {F} \leq \frac {\lambda_ {2} (A ^ {*})}{\lambda_ {1} (A ^ {*})} \| X ^ {*} \| _ {F} +$$ + +(c) The spectral gap $\gamma = 1 - \frac{\lambda_2(A^*)}{\lambda_1(A^*)}$ bounds pairwise differences: + +$$ +\left\| X _ {i} ^ {*} - X _ {j} ^ {*} \right\| _ {2} \leq (1 - \gamma) \left\| X ^ {*} \right\| _ {F}, \quad \forall i, j +$$ + +(d) Features decompose as $X^{*} = \frac{v_{1}v_{1}^{T}}{v_{1}^{T}\mathbf{1}_{N}} X^{*} + E$ where: + +$$ +\| E \| _ {F} \leq \left(\frac {\lambda_ {2} (A ^ {*})}{\lambda_ {1} (A ^ {*})}\right) ^ {2} \| X ^ {*} \| _ {F} +$$ + +Intuition and Proof Sketch. [The complete proof is given in Suppl. Sec. A] This lemma characterizes how node features converge at the fixed point through spectral analysis + +of the attention matrix $A^{*}$ . The key insight is that the eigenstructure of $A^{*}$ determines feature homogenization, with the spectral gap $\gamma$ serving as a natural measure. + +Using the Spectral Theorem, we decompose $A^{*}$ into eigencomponents: + +$$ +A ^ {*} = \lambda_ {1} (A ^ {*}) \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} + \sum_ {i = 2} ^ {N} \lambda_ {i} (A ^ {*}) v _ {i} v _ {i} ^ {T}, +$$ + +where $\{\lambda_i(A^*)\}$ are ordered eigenvalues and $\{v_{i}\}$ are orthonormal eigenvectors. At the fixed point: + +$$ +X ^ {*} = \sigma \left(A ^ {*} W X ^ {*}\right) \approx A ^ {*} W X ^ {*} (\text {l o c a l l y}), +$$ + +where the approximation follows from $\sigma$ being contractive. Using matrix perturbation theory: + +$$ +\left\| X ^ {*} - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} X ^ {*} \right\| _ {F} \leq \frac {\lambda_ {2} (A ^ {*})}{\lambda_ {1} (A ^ {*})} \| X ^ {*} \| _ {F}. +$$ + +The spectral gap $\gamma = 1 - \frac{\lambda_2(A^*)}{\lambda_1(A^*)}$ controls feature differences through: + +$$ +\left\| X _ {i} ^ {*} - X _ {j} ^ {*} \right\| _ {2} \leq (1 - \gamma) \left\| X ^ {*} \right\| _ {F}, +$$ + +revealing that small spectral gaps lead to oversmoothing, with the residual term $E$ capturing deviations from complete homogenization. + +Lemma 3 (Low-Dimensional Attractor Characterization). For a GAT with node features $X(t) \in \mathbb{R}^{N \times d}$ at layer $t$ , define the feature diversity measure: + +$$ +\mu (X (t)) = \frac {1}{N (N - 1)} \sum_ {i \neq j} \frac {\left\| X _ {i} (t) - X _ {j} (t) \right\| _ {2}}{\left\| X _ {i} (t) \right\| _ {2} + \left\| X _ {j} (t) \right\| _ {2}} +$$ + +Under the conditions from Lemmas 1 and 2: + +(a) There exists an attractor $\mathcal{A} \subset \mathbb{R}^{N \times d}$ where: + +$$ +\lim _ {t \rightarrow \infty} \inf _ {Y \in \mathcal {A}} \| X (t) - Y \| _ {F} = 0 +$$ + +(b) The attractor dimension $k$ satisfies: + +$$ +k \leq \min \left\{d, r a n k (C o v (X ^ {*})), \left\lceil \frac {1}{1 - \gamma} \right\rceil \right\} +$$ + +(c) Feature diversity decays geometrically: + +$$ +\mu (X (t)) \leq \min \{(1 - \gamma) ^ {t}, c ^ {t} \} \mu (X (0)) +$$ + +Intuition and Proof Sketch. [The complete proof is given in Suppl. Sec. A] This lemma characterizes how GAT + +dynamics lead to feature homogenization through a low-dimensional attractor. The key insight is that oversmoothing emerges from both network dynamics and attention matrix properties. + +We analyze the attractor set: + +$$ +\mathcal {A} = \left\{Y \in \mathbb {R} ^ {N \times d}: \| Y - X ^ {*} \| _ {F} \leq \frac {\lambda_ {2} (A ^ {*})}{\lambda_ {1} (A ^ {*})} \| X ^ {*} \| _ {F} \right\}, +$$ + +where $X^{*}$ is the fixed point and $A^{*}$ is the limiting attention matrix. Convergence to $\mathcal{A}$ follows from the contraction property $\| f(X) - f(Y)\|_{F}\leq c\| X - Y\|_{F}$ and attention convergence $\| A(t) - A^{*}\|_{F}\to 0$ . The attractor dimension satisfies: + +$$ +k \leq \min \{d, \mathrm {r a n k} (\mathrm {C o v} (X ^ {*})), \left\lceil \frac {1}{1 - \gamma} \right\rceil \}, +$$ + +constrained by ambient dimension, feature correlation, and spectral properties. + +Combining contraction and spectral bounds yields: + +$$ +\mu (X (t)) \leq \min \{c ^ {t}, (1 - \gamma) ^ {t} \} \mu (X (0)), +$$ + +revealing oversmoothing as dual compression through network dynamics and attention mechanisms. + +Lemma 4 (Fixed Point Stability). Let $f$ be the GAT update rule with fixed point $X^{*}$ and Jacobian $J_{f}(X^{*})$ , where $\sigma$ is continuously differentiable near $X^{*}$ . Then: + +(a) The Jacobian has block structure: + +$$ +[ J _ {f} (X ^ {*}) ] _ {i j} = \left\{ \begin{array}{l l} \sigma^ {\prime} (h _ {i} ^ {*}) \alpha_ {i j} ^ {*} W & i f j \in \mathcal {N} (i) \\ 0 & o t h e r w i s e \end{array} \right. +$$ + +where $h_i^* = \sum_{j\in \mathcal{N}(i)}\alpha_{ij}^* WX_j^*$ + +(b) $X^{*}$ is asymptotically stable iff $\rho (J_{f}(X^{*})) < 1$ +(c) For small perturbations $\delta X(0)$ , the error evolves as: + +$$ +\| \delta X (t) \| _ {F} \leq (1 + \delta) \| J _ {f} (X ^ {*}) \| _ {2} ^ {t} \| \delta X (0) \| _ {F} +$$ + +(d) Oversmoothing occurs iff: + +$$ +k e r (I - J _ {f} \left(X ^ {*}\right)) = s p a n \left\{\mathbf {1} _ {N} \otimes v: v \in \mathbb {R} ^ {d} \right\} +$$ + +Intuition and Proof Sketch. This lemma characterizes GAT stability through local linearization around fixed points, revealing how Jacobian structure drives oversmoothing. At the fixed point, the Jacobian structure emerges from: + +$$ +\frac {\partial f _ {i}}{\partial X _ {j}} = \sigma^ {\prime} \left(h _ {i} ^ {*}\right) \alpha_ {i j} ^ {*} W + \sigma^ {\prime} \left(h _ {i} ^ {*}\right) W X _ {j} ^ {*} \frac {\partial \alpha_ {i j} ^ {*}}{\partial X _ {j}}, \tag {1} +$$ + +where the second term vanishes due to attention weight convergence. For perturbations $\delta X(t) = X(t) - X^{*}$ , classical Lyapunov theory gives: + +$$ +\delta X (t + 1) = J _ {f} \left(X ^ {*}\right) \delta X (t) + R (X (t)), \tag {2} +$$ + +where $\| R(X(t))\| _F = o(\| \delta X(t)\| _F)$ is the remainder term. The spectral radius condition $\rho (J_{f}(X^{*})) < 1$ ensures exponential stability, while the kernel analysis: + +$$ +\left(I - J _ {f} \left(X ^ {*}\right)\right) \delta X = 0 \Longleftrightarrow \delta X _ {i} = \delta X _ {j} \quad \forall i, j, \tag {3} +$$ + +reveals that stable perturbations must lie in the span of constant vectors, characterizing the oversmoothing phenomenon. + +# 3. DYNAMO-GAT Algorithm + +The DYNAMO-GAT algorithm is a novel approach designed to address the oversmoothing problem in attention-based GNNs. It counters this by selectively pruning attention weights using a combination of noise injection, covariance analysis, Anti-Hebbian principles, dynamic thresholding, gradual pruning, and layer-wise pruning rates. The DYNAMO-GAT introduces non-linear perturbations into the system's state (node features) and modifies the connectivity structure (attention weights) dynamically. This not only disrupts the undesired fixed points associated with oversmoothing but also introduces mechanisms that ensure the system explores a richer set of node representations, maintaining diversity across layers. + +# 3.1. Covariance Matrix and Noise Injection + +The covariance analysis directly addresses the low-dimensional attractor problem identified in Lemma 3. By analyzing the correlation structure of node features, we can detect when the system begins to approach the homogeneous fixed point characterized in Lemma 1, allowing for targeted intervention through pruning. The first step in the DYNAMO-GAT algorithm involves injecting independent Gaussian noise into the node features at each layer: + +$$ +\mathbf {h} _ {i} ^ {(l)} = \mathbf {h} _ {i} ^ {(l)} + \sigma \xi_ {i} ^ {(l)}, \tag {4} +$$ + +where $\xi_i^{(l)}\sim \mathcal{N}(0,I)$ represents Gaussian white noise with a standard deviation $\sigma$ . This noise perturbs the system state, revealing the underlying correlations between node features through their covariance structure. + +The covariance matrix $C^{(l)}$ is then computed as: + +$$ +C _ {i j} ^ {(l)} = \operatorname {C o v} \left(\mathbf {h} _ {i} ^ {(l)}, \mathbf {h} _ {j} ^ {(l)}\right) = \mathbb {E} \left[ \left(\mathbf {h} _ {i} ^ {(l)} - \mathbb {E} [ \mathbf {h} _ {i} ^ {(l)} ]\right) \left(\mathbf {h} _ {j} ^ {(l)} - \mathbb {E} [ \mathbf {h} _ {j} ^ {(l)} ]\right) ^ {\top} \right]. +$$ + +This matrix captures the pairwise correlations between node features, which are crucial in identifying which connections + +![](images/f27b0739a8d5702edc45b12d6d5ffd8ea088d402791338dad050da8d9e0a1f49.jpg) + +![](images/87523b90d34654d307d88270d44104cbabd8a4ac74970a9f3b5c4fcd8fb26995.jpg) + +![](images/0e1e3e8ee0604932043044b4f21809d9e7a01a9b4602055ef57016386e243526.jpg) + +![](images/494edc8139efb516ac8ff63ba3df6d31c405aeffc377fbf7b3d0fb855a67e4de.jpg) +Figure 2. Comparison of oversmoothing coefficient $(\mu(X))$ and test accuracy across layers for Citeseer, Cora, and Cornell datasets. DYNAMO-GAT consistently outperforms both GCN, GAT and G2GAT maintaining high accuracy across all layers. + +![](images/92db650a6f82fa59f27bf313e0323fa1a3a168c8a628543f511f571aa1ba8046.jpg) + +![](images/e5d928abd5278b6dcba949b1e3ccf2765d52aee43e6f7320e1e724a94b107e84.jpg) + +![](images/ab7ae809bd0a7414904d8e3942080ceb04d631853b310b309cfe3d9664ca3ea7.jpg) + +(attention weights) contribute to oversmoothing. Nodes with highly correlated features are likely to converge towards similar representations. The covariance matrix measures the system's state coherence. High coherence (correlation) across many node pairs indicates a drift towards a stable, but undesirable, fixed point where oversmoothing dominates. By analyzing these correlations, DYNAMO-GAT can selectively target and prune connections that reinforce this drift, thereby altering the trajectory of the system's evolution. + +# 3.2. Anti-Hebbian Pruning Criterion + +The Anti-Hebbian pruning strategy is designed to modify the spectral properties of the attention matrix characterized in Lemma 2. By selectively pruning connections between highly correlated nodes, we effectively increase the spectral gap $\gamma$ , which Lemma 2 showed is crucial for maintaining feature diversity. The pruning strategy in DYNAMO-GAT is grounded in the Anti-Hebbian principle, which dictates that connections between highly correlated nodes should be weakened or eliminated. Taking inspiration from recent works on using noise to prune (Moore & Chaudhuri, 2020; Chakraborty et al., 2024), this principle computes the pruning probability $p_{ij}^{(l)}$ , which is dynamically adjusted based on a threshold $\tau(t)$ that adapts to the distribution of edge weights. The dynamic pruning threshold $\tau(t)$ is defined as: + +$$ +\tau (t) = \mu (| w _ {i j} |) + \beta \cdot \sigma (| w _ {i j} |), +$$ + +where $\mu$ and $\sigma$ represent the mean and standard deviation of the edge weights, respectively. This threshold ensures that the pruning process is sensitive to the distribution of edge weights, allowing for more adaptive and context-sensitive + +pruning. The pruning probability is then computed as: + +$$ +p _ {i j} ^ {(l)} = r (t) \cdot \frac {| \alpha_ {i j} ^ {(l)} |}{\tau (t)} \cdot (C _ {i i} ^ {(l)} + C _ {j j} ^ {(l)} \mp 2 C _ {i j} ^ {(l)}), +$$ + +where $r(t)$ is the layer-wise pruning rate defined as $r(t) = r_0 \cdot (1 + \gamma t)$ . This scales with the depth of the layer, allowing for more aggressive pruning in later layers where oversmoothing is more likely to occur. + +The pruning probability $p_{ij}^{(l)}$ acts as a control mechanism that adjusts the strength and structure of the network's connections in response to the current state (as reflected by the covariance matrix). By dynamically adapting to the network's evolving state, DYNAMO-GAT effectively steers the system away from regions of the state space associated with oversmoothing, thus maintaining a more robust and diverse set of node representations. + +# 3.3. Gradual Pruning Process and Update Rule + +The gradual nature of our pruning approach aligns with the stability analysis in Lemma 4. By making incremental modifications to the network structure, we ensure that the Jacobian's spectral radius remains bounded while steering the system away from oversmoothed states. DYNAMO-GAT employs a gradual pruning approach, where edge weights are progressively reduced based on the computed pruning probability, rather than being immediately set to zero. This is given by: + +$$ +w _ {i j} (t + 1) = w _ {i j} (t) \cdot \left(1 - p _ {i j} ^ {(l)}\right). \tag {5} +$$ + +An edge is fully pruned (i.e., its weight is set to zero) only if $w_{ij}(t + 1)$ falls below a small threshold $\epsilon$ . + +The gradual pruning process introduces continuity into the network's dynamics, allowing the system to smoothly transition from one state to another. This contrasts with abrupt changes that could destabilize the learning process. The gradual reduction of weights effectively modifies the original update rule $F$ to a pruned update rule $F_{P}$ , which can be expressed as: + +$$ +\mathbf {h} ^ {(l + 1)} = F _ {P} \left(\mathbf {h} ^ {(l)}, \alpha^ {(l)}, \mathbf {W} ^ {(l)}, \mathbf {C} ^ {(l)}\right), \tag {6} +$$ + +where $F_{P}$ incorporates the cumulative effects of pruning across layers. This gradual pruning can be seen as a form of perturbative adjustment, where the system is continuously nudged towards a more favorable configuration. The incremental changes introduced by gradual pruning helps the system avoid large, disruptive shifts that could lead to suboptimal convergence or loss of critical information. + +# 3.4. Recalibration of Attention Weights + +The recalibration step maintains the normalization conditions required by Lemma 1 while preserving the enhanced spectral properties achieved through pruning, as characterized in Lemma 2. Once pruning has been applied, it is essential to recalibrate the remaining attention weights to ensure effective information propagation within the network. This recalibration process re-normalizes the attention coefficients $\alpha_{ij}^{(l)}$ among the surviving connections: + +$$ +\alpha_ {i j} ^ {(l, \mathrm {r e c a l})} = \frac {\alpha_ {i j} ^ {(l)}}{\sum_ {k \in \mathcal {N} (i) \backslash \operatorname {P r u n e d} (i)} \alpha_ {i k} ^ {(l)}}, +$$ + +where $\operatorname{Pruned}(i)$ denotes the set of pruned edges for node $i$ . Recalibration ensures that the information flow in the network remains balanced despite the reduced number of connections. This step is crucial for maintaining the stability of the network's dynamics post-pruning, as it prevents any remaining connections from becoming disproportionately influential, which could lead to oversmoothing. + +# 3.5. Theoretical Results + +Leveraging noise-driven covariance analysis, DYNAMOGAT introduces stochasticity into the system, preventing the network from settling into fixed points prematurely. This stochasticity is particularly important in deeper networks, where oversmoothing is more likely to occur. The selective pruning mechanism further refines the system's dynamics, ensuring that only the most relevant connections are maintained, which aligns with the goal of avoiding low-dimensional attractors. Building on the fixed point and stability analysis from Section 2, we now establish theoretical guarantees for DYNAMOGAT's effectiveness in preventing oversmoothing. The following lemmas show how our pruning strategy modifies the network's spectral + +properties while preserving essential features of the original dynamics. + +Lemma 5 (DYNAMO-GAT Pruning Properties). Let $F_P$ be the pruned version of GNN transformation $F$ , with pruning rate $p$ and fixed point $X^*$ . Then: + +(a) Spectral radius reduction: + +$$ +\rho \left(J _ {F _ {P}} \left(X ^ {*}\right)\right) \leq (1 - p) \rho \left(J _ {F} \left(X ^ {*}\right)\right) +$$ + +(b) Under covariance-based pruning with $p_{ij} = r(t) \cdot \frac{|\alpha_{ij}|}{\tau(t)} \cdot (C_{ii} + C_{jj} \mp 2C_{ij})$ : + +$$ +\left| \lambda_ {k} \left(J _ {F _ {P}}\right) \right| \leq \left| \lambda_ {k} \left(J _ {F}\right) \right| \cdot \exp \left(- \beta \frac {\operatorname {T r} (C)}{\| C \| _ {F}}\right) +$$ + +(c) Spectral gap enhancement: + +$$ +\gamma_ {P} = 1 - \frac {\lambda_ {2} (J _ {F _ {P}})}{\lambda_ {1} (J _ {F _ {P}})} \geq \gamma + p (1 - \gamma) +$$ + +(d) Rank preservation: + +$$ +\operatorname {r a n k} \left(\operatorname {C o v} \left(F _ {P} (X)\right)\right) \geq \operatorname {r a n k} \left(\operatorname {C o v} (X)\right) - \kappa (p) +$$ + +$$ +w h e r e \kappa (p) \leq \left\lceil p \cdot \operatorname {r a n k} \left(\operatorname {C o v} (X)\right)\right\rceil +$$ + +Intuition and Proof Sketch. [The complete proof is given in Suppl. Sec. A] This lemma characterizes how DYNAMOGAT's pruning affects the network's spectral properties to prevent feature homogenization. The proof analyzes the interplay between pruning and eigenstructure through matrix perturbation theory. + +For edge $(i,j)$ pruned with probability $p_{ij}$ , the Jacobian entries scale as: + +$$ +\left[ J _ {F _ {P}} \left(X ^ {*}\right) \right] _ {i j} = \left(1 - p _ {i j}\right) \left[ J _ {F} \left(X ^ {*}\right) \right] _ {i j}, +$$ + +leading to spectral radius reduction $\rho(J_{F_P}(X^*)) \leq (1 - p)\rho(J_F(X^*))$ . Using the Hadamard product $J_{F_P} = J_F \circ (1 - P)$ and matrix norm inequalities: + +$$ +\left\| J _ {F _ {P}} \right\| _ {2} ^ {2} \leq \left\| J _ {F} \right\| _ {2} ^ {2} \exp \left(- 2 \beta \frac {\operatorname {T r} (C)}{\| C \| _ {F}}\right), +$$ + +where the exponential term reflects covariance-guided pruning. Weyl's inequality and eigenvalue interlacing give: + +$$ +\lambda_ {2} \left(J _ {F _ {P}}\right) \leq (1 - p) \lambda_ {2} \left(J _ {F}\right), +$$ + +$$ +\lambda_ {1} \left(J _ {F _ {P}}\right) \geq \left(1 - \frac {p}{2}\right) \lambda_ {1} \left(J _ {F}\right), +$$ + +ensuring monotonic spectral gap increase. The Eckart-Young-Mirsky theorem bounds rank reduction as $\mathrm{rank}(\mathrm{Cov}(F_P(X)))\geq \mathrm{rank}(\mathrm{Cov}(X)) - \kappa (p)$ + +This reveals how covariance-guided pruning creates controlled perturbations that increase spectral gaps while preserving rank, effectively preventing convergence to oversmoothed states. + +Lemma 6 (DYNAMO-GAT Rank Preservation). Let $X(t)$ be node features at layer $t$ with covariance matrix: + +$$ +C (t) = \frac {1}{N} X (t) ^ {T} X (t) - \frac {1}{N ^ {2}} X (t) ^ {T} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T} X (t) +$$ + +Under DYNAMO-GAT's noise injection and pruning: + +(a) Noise-perturbed features $\tilde{X}(t) = X(t) + \sigma \xi(t), \xi(t) \sim \mathcal{N}(0, I)$ satisfy: + +$$ +\operatorname {r a n k} (C (\tilde {X} (t))) = d +$$ + +with probability 1 + +(b) Pruning preserves rank as: + +$$ +\operatorname {r a n k} (C (X (t + 1))) \geq \operatorname {r a n k} (C (X (t))) - \kappa (t) +$$ + +where $\kappa (t)$ counts eigenvalues below $\epsilon (t)$ + +(c) For noise level $\sigma > 0$ : + +$$ +\lambda_ {\min } (C (t)) \geq \sigma^ {2} \left(1 - \frac {1}{N}\right) - O (\| X (t) \| _ {F} \sigma) +$$ + +(d) Under threshold $\tau(t) = \mu(|w_{ij}|) + \beta \cdot \sigma(|w_{ij}|)$ , rank is preserved w.h.p. if: + +$$ +\beta \geq \sqrt {\frac {2 \log (d / \delta)}{N}} +$$ + +Intuition and Proof Sketch. [The complete proof is given in Suppl. Sec. A] This lemma establishes how DYNAMOGAT's dual mechanisms - noise injection and adaptive pruning - preserve feature diversity. The proof leverages matrix perturbation theory to analyze covariance spectrum evolution. + +For noise-perturbed features, the covariance decomposes as: + +$$ +\begin{array}{l} C (\tilde {X} (t)) = C (X (t)) + \sigma^ {2} \left(I - \frac {1}{N} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T}\right) \\ + \frac {\sigma}{N} (X (t) ^ {T} \xi (t) + \xi (t) ^ {T} X (t)), \tag {7} \\ \end{array} +$$ + +where the middle term ensures full rank through its positive definiteness. Under pruning with mask $P(t)$ : + +$$ +\left\| C (X (t + 1)) - C (X (t)) \right\| _ {2} \leq \left\| P (t) \right\| _ {2} \lambda_ {\max } (C (X (t))), \tag {8} +$$ + +Weyl's interlacing theorem then bounds rank reduction by $\kappa(t)$ . Matrix concentration gives: + +$$ +\lambda_ {\min } (C (t)) \geq \sigma^ {2} \left(1 - \frac {1}{N}\right) - O (\| X (t) \| _ {F} \sigma), \tag {9} +$$ + +ensuring well-conditioned features. The adaptive threshold $\tau(t)$ with $\beta \geq \sqrt{\frac{2\log(d / \delta)}{N}}$ maintains rank preservation with probability $1 - \delta$ through eigenvalue separation. + +Table 1. Table comparing the different datasets and the number of GFLOPS for each model for each dataset + +
ModelsMetricCoraCiteSeerCornell
Nodes (N)2,7083,327183
Edges (E)5,4294,732280
Avg. Degree (2|E|/|N|)4.012.843.06
GCN(Kipf & Welling, 2017)Best Accuracy81.575.754.2
#Layers222
GFLOPS0.5981.7890.049
Accuracy/GFLOPS136.2843.531106.12
GAT(Veličković et al., 2018)Best Accuracy82.5576.156.3
#Layers422
GFLOPS2.3516.7540.184
Accuracy/GFLOPS35.1111.27306.52
G2GAT(Rusch et al., 2023a)Best Accuracy83.2782.0661.55
#Layers128128128
GFLOPS1.2092.4520.0879
Accuracy/GFLOPS68.8833.47700.34
DYNAMO-GATBest Accuracy83.2182.0162.56
#Layers128128128
GFLOPS0.6051.6750.051
Accuracy/GFLOPS137.5348.961226.67
+ +# 4. Experimental Results + +# 4.1. Experimental Setup + +Datasets: We conduct experiments on three real-world and two synthetic datasets. We use Cora (McCallum et al., 2000), Citeseer (Sen et al., 2008), two citation networks, and Cornell (University) which is part of the WebKB collection. + +Baselines: We compare DYNAMO-GAT with GCN (Kipf & Welling, 2017), GAT (Velicković et al., 2018), and G2GAT (Rusch et al., 2023a), focusing on their effectiveness in preventing oversmoothing. + +Evaluation Metrics: Models are evaluated using Accuracy, Oversmoothing Coefficient $(\mu)$ (Wu et al., 2023), GFLOPS, and the Accuracy/GFLOPS ratio to gauge the trade-off between performance and computational cost. + +# 4.2. Performance on Real-World Datasets + +Figure 2 illustrates the performance of DYNAMO-GAT, G2GAT, GCN, and GAT across three real-world datasets: Citeseer, Cora, and Cornell. The top row shows the oversmoothing coefficient $(\mu(X))$ on a log scale, while the bottom row displays the test accuracy as the number of layers increases. + +Oversmoothing Coefficient $(\mu(X))$ [Figs. 2(a,b)]: The results demonstrate that GCN and GAT suffer from significant oversmoothing as the number of layers increases. Their oversmoothing coefficients decrease rapidly, indicating that node features become increasingly indistinguishable. G2GAT performs better by reducing the rate of oversmoothing, but it still shows a downward trend as layers increase. In contrast, DYNAMO-GAT maintains a nearly constant oversmoothing coefficient across all layers, effectively preventing this phenomenon. This stability suggests that DYNAMO-GAT preserves meaningful node representations even in deep + +architectures. + +Test Accuracy [Figs. 2(c,d)]: The test accuracy results align with the oversmoothing observations. GCN and GAT experience a sharp decline in accuracy as the number of layers increases, reflecting the negative impact of oversmoothing on model performance. G2GAT performs better, with a slower decline in accuracy, but still struggles as the network depth increases. DYNAMO-GAT, however, consistently achieves the highest accuracy across all datasets and depths. Its ability to maintain high accuracy even with many layers indicates that it effectively balances expressivity and resistance to oversmoothing. + +These observations underscore the challenges of using deep GNNs in practical applications, where oversmoothing can severely degrade performance. The consistent performance of DYNAMO-GAT across different datasets and network depths suggests that it is a robust solution for deep GNNs, addressing a critical limitation of existing models. This makes DYNAMO-GAT particularly suitable for tasks that require deep networks without sacrificing accuracy or node representation quality. + +# 4.3. Performance Comparison Across Datasets + +Table 1 compares the performance of DYNAMO-GAT, G2GAT, GCN, and GAT across three datasets: Cora, Cite-seer, and Cornell. The table highlights key metrics such as best accuracy, the number of layers, GFLOPS, and the accuracy-to-GFLOPS ratio. + +- Best Accuracy: DYNAMO-GAT consistently achieves the highest accuracy across all datasets, particularly excelling on the Cornell dataset with $62.56\%$ . This demonstrates its robustness in deep architectures. +- GFLOPS: Despite its deep architecture (128 layers), DYNAMO-GAT is computationally more efficient than GAT and G2GAT, with significantly lower GFLOPS, especially on larger datasets like Cora and Citeseer. +Accuracy/GFLOPS Ratio: DYNAMO-GAT outperforms all models in the accuracy-to-GFLOPS ratio, indicating the best trade-off between accuracy and computational cost. For example, on Cora, it achieves 137.53, compared to GCN's 136.28 and GAT's 35.11. + +# 4.4. Synthetic Dataset Results + +Figure 3 presents the performance of DYNAMO-GAT, G2GAT, GCN, and GAT on the Syn_Products dataset, tested across varying node degrees and homophily levels. + +(a) Oversmoothing vs. Layers (Avg. Degree = 68.75): DYNAMO-GAT exhibits the least oversmoothing as lay + +ers increase, maintaining higher $\mu(X)$ compared to other models. This indicates DYNAMO-GAT's robustness in preserving node features even in deep networks. + +(b) Accuracy vs. Layers (Avg. Degree = 68.75): DYNAMO-GAT consistently achieves the highest accuracy across all layers, outperforming G2GAT, GCN, and GAT. This demonstrates its effectiveness in managing deep architectures without performance degradation. +(c) Accuracy vs. Homophily (Avg. Degree = 11.93): In sparse graphs, DYNAMO-GAT and G2GAT perform well across all homophily levels, with DYNAMO-GAT showing stronger performance as homophily increases. This highlights its adaptability in different homophily settings. +(d) Accuracy vs. Homophily (Avg. Degree = 68.75): In dense graphs, DYNAMO-GAT significantly outperforms other models, particularly in low-homophily settings, showcasing its strength in complex, heterophilic structures. + +![](images/4689b1e3e56d66f5289fba525694a0fe46ed55df348edccba6fd6fa15f60c623.jpg) + +![](images/581f38a2ca204546d9a1ae581960fdf793c12745cb7cefb7c062e8c3801035b5.jpg) +Figure 3. Performance of DYNAMO-GAT, G2GAT, GCN, and GAT on the Syn_Products dataset. (a) Oversmoothing vs. layers: DYNAMO-GAT shows the least oversmoothing. Comparing test accuracy (b) vs. number of layers (c) vs. homophily for sparse graph (Avg. Degree=11.93) (d) vs. homophily for dense graph (Avg. Degree=68.75) + +![](images/95bc0131fa92f00c813598fbdf50b25f4101562f012bcd45fd42e1a734fad6a1.jpg) + +![](images/5d452add832508f0880f71ab37ad84f91593caba8eb6c4701c74e5582af522ac.jpg) + +Summary: DYNAMO-GAT consistently outperforms other models in preventing oversmoothing and maintaining accuracy. Its efficiency, as highlighted by the accuracy-to-GFLOPS ratio, makes it suitable for real-world applications where computational resources are limited. The model's versatility across graph densities and homophily levels suggests it is well-suited for a range of tasks, from social network analysis to biological network modeling. + +Table 2. Performance Comparison on OGB Datasets. DYNAMO-GAT shows strong scalability and efficiency. + +
DatasetModelAccuracy (%)GFLOPSAccuracy/GFLOPS
ogbn-arxivGCN71.912.55.75
ogbn-arxivG2GAT72.510.37.04
ogbn-arxivDYNAMO-GAT72.16.710.76
ogbn-productsG2GAT73.922.13.34
ogbn-productsDYNAMO-GAT75.314.55.19
+ +# 4.5. Scalability and Performance on Larger Graphs + +To address the important question of scalability and performance on larger, more diverse graphs, we extended our evaluation to include benchmarks from the Open Graph Benchmark (OGB) (Hu et al., 2020b) — specifically ogbn-arxiv (a large-scale homophilic citation network) and ogbn-products (a large-scale heterophilic product co-purchasing network). We also tested on LRGB datasets. We compared DYNAMO-GAT against GCN and G2GAT. The results, summarized in Table 2, demonstrate that DYNAMO-GAT scales effectively to graphs with hundreds of thousands of nodes. + +Crucially, DYNAMO-GAT achieves competitive or superior accuracy while requiring significantly fewer GFLOPS, leading to a much better accuracy-to-GFLOPS ratio. For instance, on ogbn-arxiv, DYNAMO-GAT achieves an Accuracy/GFLOPS ratio of 10.76, compared to G2GAT's 7.04. On ogbn-products, it achieves 5.19 compared to G2GAT's 3.34. These findings confirm the robustness and efficiency of our approach on large-scale graphs, including those with heterophilic structures. + +Furthermore, we evaluated DYNAMO-GAT in inductive settings using OGB benchmarks, where it again achieved competitive accuracy with enhanced computational efficiency (up to $55\%$ improvement in Accuracy/GFLOPS). This confirms its suitability for scenarios where the model must generalize to unseen nodes. + +Table 3. Ablation Study Results on Cora and Citeseer. All components contribute to performance. + +
Model / VariantAccuracy (%)OS Coeff. μ(X)
CoraCiteSeerCoraCiteSeer
Full DYNAMO-GAT83.2182.010.570.62
- Noise Injection (σ = 0)81.5480.260.450.52
- Covariance-based Pruning79.3277.150.310.36
- Adaptive Thresholding80.6779.520.380.41
- Gradual Pruning80.1478.930.340.39
- Attention Recalibration79.7878.410.350.40
+ +# 4.6. Ablation Study + +To understand the contribution of each key component within DYNAMO-GAT, we conducted a comprehensive + +ablation study on the Cora and Citeseer datasets. We systematically removed or modified: Noise Injection, Covariance-based Pruning, Adaptive Thresholding (replacing it with a fixed threshold), Gradual Pruning (replacing it with aggressive pruning), and Attention Recalibration. + +The results, presented in Table 3, demonstrate that all components are critical for achieving optimal performance and mitigating oversmoothing. Removing any part leads to a noticeable drop in accuracy and an increase in the oversmoothing coefficient (lower $\mu(X)$ values, indicating worse performance), confirming the synergistic effect of our design choices. Notably, removing covariance-based pruning had the most significant negative impact. + +# 5. Conclusion + +This paper introduced DYNAMO-GAT, a novel approach using dynamical systems theory and noise-driven adaptive pruning to mitigate GNN oversmoothing. We provided rigorous theoretical guarantees and demonstrated strong experimental performance on both benchmark and large-scale datasets (Hu et al., 2020a), confirming DYNAMO-GAT's effectiveness, scalability, and computational efficiency. The results suggest DYNAMO-GAT is well-suited for real-world applications requiring deep GNNs, and its mechanism may enhance model interpretability. While acknowledging potential limitations, such as in extremely sparse graphs, future work will target domains like physics/chemistry and extend to graph-level tasks. + +In summary, our dynamical systems perspective offers a powerful, theoretically-grounded solution to oversmoothing, paving the way for more robust, efficient, and expressive deep learning models for complex graphs. + +# Impact Statement + +This work advances Graph Neural Networks through theoretical insights and practical improvements. While the primary contribution is technical in nature, our more efficient approach (shown by better accuracy-to-GFLOPS ratios) could reduce computational costs and energy consumption in AI applications. The improved preservation of node feature diversity may also lead to more reliable outcomes in critical + +applications like molecular modeling and social network analysis. + +# Acknowledgement + +The materials are based on work supported in parts by SRC JUMP2.0 (CogniSense Center, 2023-JU-3133) and Army Research Office (Grant Number W911NF-19-1-0447). Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of SRC or Army Research Office. + +# References + +Abbe, E., Fan, J., Wang, K., and Zhong, Y. Entrywise eigenvector analysis of random matrices with low expected rank. The Annals of Statistics, 48(3):1452-1474, 2020. +Allen-Zhu, Z., Li, Y., and Song, Z. Convergence rates of neural networks for supervised learning on manifolds. In Advances in Neural Information Processing Systems, pp. 6191-6201, 2019. +Ba, J. L., Kiros, J. R., and Hinton, G. E. Layer normalization. In arXiv preprint arXiv:1607.06450, 2016. +Cai, C. and Wang, Y. A note on over-smoothing for graph neural networks. In ICML Graph Representation Learning and Beyond (GRL+) Workshop, 2020. +Chakraborty, B., Kang, B., Kumar, H., and Mukhopadhyay, S. Sparse spiking neural network: Exploiting heterogeneity in timescales for pruning recurrent snn. arXiv preprint arXiv:2403.03409, 2024. +Chen, M., Wei, Z., Huang, Z., Ding, B., and Li, Y. Measuring and relieving the over-smoothing problem for graph neural networks from the topological view. Proceedings of the AAAI Conference on Artificial Intelligence, 34(04): 3438-3445, 2020. +Di Giovanni, F., Rowbottom, J., Chamberlain, B. P., and Bronstein, M. M. How does over-squashing affect the power of gnns? arXiv preprint arXiv:2306.03589, 2023. +Fan, W., Ma, Y., Li, Q., He, Y., Zhao, E., Tang, J., and Yin, D. Graph neural networks for social recommendation. In The world wide web conference, pp. 417-426, 2019. +Gasteiger, J., Becker, F., and Gunnemann, S. Gemnet: Universal directional graph neural networks for molecules. Advances in Neural Information Processing Systems, 34: 6790-6802, 2021. +Gilmer, J., Schoenholz, S. S., Riley, P. F., Vinyals, O., and Dahl, G. E. Neural message passing for quantum chem + +istry. International Conference on Machine Learning, pp. 1263-1272, 2017. +Hu, W., Fey, M., Zitnik, M., Dong, Y., Ren, H., Liu, B., Catasta, M., and Leskovec, J. Open Graph Benchmark: Datasets for Machine Learning on Graphs. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M. F., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 22118-22133, 2020a. URL https://proceedings.neurips.cc/paper/2020/file/fb60d41b046c3001af1cb3c58b43153c-Paper.pdf. (For OGB datasets used in rebuttal/new experiments [cite: 70, 93, 110, 130, 174, 205]). +Hu, W., Fey, M., Zitnik, M., Dong, Y., Ren, H., Liu, B., Catasta, M., and Leskovec, J. Open Graph Benchmark: Datasets for Machine Learning on Graphs. In Advances in Neural Information Processing Systems, volume 33, pp. 22118-22133, 2020b. +Ioffe, S. and Szegedy, C. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International conference on machine learning, pp. 448-456. PMLR, 2015. +Jin, Y. and Zhu, X. Graph Rhythm Network: Beyond Energy Modeling for Deep Graph Neural Networks. In 2024 IEEE International Conference on Data Mining (ICDM). IEEE, 2024. +Keriven, N. Not too little, not too much: a theoretical analysis of graph (over)smoothing. In NeurIPS, volume 35, pp. 2268-2281, 2022. +Kipf, T. and Welling, M. Semi-supervised classification with graph convolutional networks. In ICLR, 2017. +Li, G., Muller, M., Thabet, A., and Ghanem, B. Deep GCs: Can GCs go as deep as cnns? Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9267-9276, 2019. +Li, Q., Han, Z., and Wu, X.-M. Deeper insights into graph convolutional networks for semi-supervised learning. Proceedings of the AAAI Conference on Artificial Intelligence, 32(1), 2018. +McCallum, A., Nigam, K., Rennie, J., and Seymore, K. Automating the construction of internet portals with machine learning. Information Retrieval, 3(2):127-163, 2000. +Moore, E. and Chaudhuri, R. Using noise to probe recurrent neural network structure and prune synapses. Advances in neural information processing systems, 33:14046-14057, 2020. + +Mustafa, S., Lachi, V.-A., Velickovic, P., Deac, A., Nilsson, S., Cucurull, G., Lio, P., Blais, F.-D., and Bengio, Y. GATE: How to Keep Out Intrusive Neighbors. In Proceedings of the 38th International Conference on Machine Learning, Proceedings of Machine Learning Research. PMLR, 2021. +Oono, K. and Suzuki, T. Graph neural networks exponentially lose expressive power for node classification. In ICLR, 2020. +Reiser, P., Neubert, M., Eberhard, A., Torresi, L., Zhou, C., Shao, C., Metni, H., van Hoesel, C., Schopmans, H., Sommer, T., et al. Graph neural networks for materials science and chemistry. Communications Materials, 3(1): 93, 2022. +Roth, A. and Liebig, T. Simplifying the theory on oversmoothing. arXiv preprint arXiv:2407.11876, 2024. +Rusch, T., Bronstein, M., and Mishra, S. Gradient gating for deep multi-rate learning on graphs. International Conference on Learning Representations, 2023a. +Rusch, T., Bronstein, M. M., and Mishra, S. A survey on oversmoothing in graph neural networks. ArXiv, abs/2303.10993, 2023b. +Rusch, T. K., Bronstein, M. M., and Mishra, S. Graph-coupled oscillator networks. In International Conference on Machine Learning, pp. 18888-18909. PMLR, 2022. +Sen, P., Namata, G., Bilgic, M., Getoor, L., Galligher, B., and Eliassi-Rad, T. Collective classification in network data. In AI Magazine, volume 29, pp. 93-93, 2008. +Spielman, D. A. and Srivastava, N. Graph sparsification by effective resistances. SIAM Journal on Computing, 40(6): 1913-1926, 2011. +University, C. Webkb dataset. URL http://www.cs.cmu.edu/afs/cs.cmu.edu/project/theo-20/www/data/. Accessed: 2024-08-16. +Velickovic, P., Cucurull, G., Casanova, A., Romero, A., Lio, P., and Bengio, Y. Graph attention networks. In International Conference on Learning Representations, 2018. +Veličković, P., Cucurull, G., Casanova, A., Romero, A., Lio, P., and Bengio, Y. Graph attention networks. In ICLR, 2018. +Wu, F., Gomez, A., Tian, Y., Qiu, J., and Tang, J. Demystifying the weak performance of graph attention networks. International Conference on Learning Representations, 2023. + +Wu, X., Ajorlou, A., Wu, Z., and Jadbabaie, A. Demystifying oversmoothing in attention-based graph neural networks. Advances in Neural Information Processing Systems, 36, 2024. +Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., and Philip, S. Y. A comprehensive survey on graph neural networks. IEEE Transactions on Neural Networks and Learning Systems, 32(1):4-24, 2020. +Xu, K., Li, C., Tian, Y., Sonobe, T., Kawarabayashi, K., and Jegelka, S. Representation learning on graphs with jumping knowledge networks. Proceedings of the 35th International Conference on Machine Learning, 80: 5453-5462, 2018. +Ying, R., He, R., Chen, K., Eksombatchai, P., Hamilton, W. L., and Leskovec, J. Graph convolutional neural networks for web-scale recommender systems. Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 974-983, 2018. +Zhao, J., Park, D., Zhang, S., Lee, L., and Yan, C. Sparsity preserving low-rank decomposition for compression of deep networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12123-12132, 2020. +Zhou, K., Huang, X., Li, Y., Zha, D., Chen, R., and Hu, X. Towards deeper graph neural networks with differentiable group normalization. Advances in neural information processing systems, 33:4917-4928, 2020. +Zhu, J., Yan, Y., Zhao, L., Heimann, M., Akoglu, L., and Koutra, D. Beyond homophily in graph neural networks: Current limitations and effective designs. Advances in neural information processing systems, 33:7793-7804, 2020. + +Table 4. Summary of Notations + +
NotationDescription
X(t)Node feature matrix at layer t, where N is the number of nodes, and d is the feature dimension.
hi(t)Feature vector of node i at layer t, representing the i-th row of X(t).
αij(t)Attention weight between nodes i and j at layer t, satisfying ∑j∈N(i) αij(t) = 1.
A(t)Attention matrix at layer t, with entries [A(t)]ij = αij(t).
σ(·)Activation function that is Lσ-Lipschitz continuous with Lσ < 1.
WLearnable weight matrix in Rdxd with spectral norm ||W||2 ≤ 1.
γSpectral gap of the attention matrix, defined as γ = 1 - λ2(A*) / λ1(A*), where λ1 and λ2 are the largest and second-largest eigenvalues of A*.
μ(X(t))Oversmoothing coefficient, quantifying feature diversity at layer t: μ(X(t)) = 1/N(N-1) ∑i≠j ||h_i(t)-h_j(t)||_2 + ||h_j(t)||_2.
κ(t)Maximum number of eigenvalues below the pruning threshold ε(t) in the covariance matrix.
r(t)Layer-wise pruning rate, defined as r(t) = r0 · (1 + γt).
τ(t)Dynamic pruning threshold, defined as τ(t) = μ(|wi|) + β · σ(|wi|), where μ and σ represent the mean and standard deviation of edge weights, respectively.
C(t)Covariance matrix of node features at layer t, defined as Cij(t) = Cov(hi(t), hj(t)).
ξi(t)Gaussian noise added to node features at layer t, whereξi(t) ~ N(0, I).
Jf(X*)Jacobian of the update rule f evaluated at the fixed point X*.
ρ(Jf(X*))Spectral radius of the Jacobian Jf(X*).
P(t)Pruning mask applied to the attention matrix at layer t.
λi(C)i-th eigenvalue of the covariance matrix C.
v1Leading eigenvector of the fixed-point attention matrix A*.
EResidual term in the spectral decomposition of X*, quantifying deviation from the leading eigenvector component.
+ +# 6. Supplementary Section A: Theoretical Proofs + +# 6.1. Notations + +# 6.2. Lemma 1 + +Lemma 1 (Existence and Properties of GAT Fixed Points). Let $G = (V,E)$ be a graph with $N$ nodes. Consider a Graph Attention Network (GAT) with an update rule $f: \mathbb{R}^{N \times d} \to \mathbb{R}^{N \times d}$ , where the feature update for each node $i \in V$ is given as: + +$$ +X _ {i} (t + 1) = f \left(X _ {i} (t)\right) = \sigma \left(\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} (t) W X _ {j} (t)\right), +$$ + +where: + +- $\sigma : \mathbb{R}^d \to \mathbb{R}^d$ is $L_{\sigma}$ -Lipschitz continuous with $L_{\sigma} \leq 1$ . +- $W \in \mathbb{R}^{d \times d}$ has spectral norm $\| W \|_2 < \frac{1}{1 + K}$ . +- The attention mechanism $\alpha : \mathbb{R}^d \times \mathbb{R}^d \to \mathbb{R}$ satisfies: + +- $\alpha_{ij}(t) \geq 0$ , $\sum_{j \in \mathcal{N}(i)} \alpha_{ij}(t) = 1$ (normalization). +$-\| \alpha_{ij}(t) - \alpha_{ij}(t - 1)\| _2\leq K\| X_i(t) - X_i(t - 1)\| _2,$ for some $K > 0$ (Lipschitz property). +- $\max_{i,j} \| \alpha_{ij}(t) \|_2 \leq M$ for some $M > 0$ (bound- edness). + +Then: + +(a) The mapping $f$ is a contraction in the Frobenius norm with constant $c = \| W\| _2(1 + K) < 1$ . +(b) There exists a unique fixed point $X^{*}\in \mathbb{R}^{N\times d}$ such that $X^{*} = f(X^{*})$ +(c) For any initial state $X(0)$ , the sequence $\{X(t)\}$ converges geometrically to $X^{*}$ with rate: + +$$ +\left\| X (t) - X ^ {*} \right\| _ {F} \leq c ^ {t} \left\| X (0) - X ^ {*} \right\| _ {F}. +$$ + +(d) The attention weights converge to fixed values $\alpha_{ij}^{*}$ with rate: + +$$ +\left\| \alpha_ {i j} (t) - \alpha_ {i j} ^ {*} \right\| _ {2} \leq c ^ {t} M \| X (0) - X ^ {*} \| _ {F}, +$$ + +and satisfy: + +$$ +\sum_ {j \in \mathcal {N} (i)} \| \alpha_ {i j} ^ {*} \| _ {2} \leq \frac {M}{1 - c}. +$$ + +Proof. The proof proceeds in four parts, establishing the contraction property, existence of a fixed point, convergence rate, and attention weight convergence. + +(a) Contraction Property: Consider two consecutive states $X(t), X(t - 1)$ . For any node $i \in V$ : + +$$ +\begin{array}{l} \left\| X _ {i} (t + 1) - X _ {i} (t) \right\| _ {2} \\ = \| \sigma (\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} (t) W X _ {j} (t)) - \\ \sigma \left(\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} (t - 1) W X _ {j} (t - 1)\right) \| _ {2} \\ \leq L _ {\sigma} \| \sum_ {j \in \mathcal {N} (i)} [ \alpha_ {i j} (t) W X _ {j} (t) - \alpha_ {i j} (t - 1) W X _ {j} (t - 1) ] \| _ {2}, \\ \end{array} +$$ + +where the inequality follows from the $L_{\sigma}$ -Lipschitz property of $\sigma$ . Adding and subtracting $\alpha_{ij}(t)W X_j(t - 1)$ : + +$$ +\begin{array}{l} \leq L _ {\sigma} \| \sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} (t) W \left(X _ {j} (t) - X _ {j} (t - 1)\right) \\ + \sum_ {j \in \mathcal {N} (i)} \left(\alpha_ {i j} (t) - \alpha_ {i j} (t - 1)\right) W X _ {j} (t - 1) \| _ {2} \\ \leq L _ {\sigma} \| W \| _ {2} [ \| \sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} (t) \left(X _ {j} (t) - X _ {j} (t - 1)\right) \| _ {2} \\ + \| \sum_ {j \in \mathcal {N} (i)} \left(\alpha_ {i j} (t) - \alpha_ {i j} (t - 1)\right) X _ {j} (t - 1) \| _ {2} ], \tag {10} \\ \end{array} +$$ + +where we used $\| W\| _2\leq 1$ and the triangle inequality. By the attention normalization condition $\sum_{j\in \mathcal{N}(i)}\alpha_{ij}(t) = 1$ and the Lipschitz property of attention weights: + +$$ +\begin{array}{l} \leq L _ {\sigma} \| W \| _ {2} [ \| X (t) - X (t - 1) \| _ {2} \\ + K \left\| X (t - 1) - X (t - 2) \right\| _ {2} ]. \tag {11} \\ \end{array} +$$ + +For the matrix-level bound: + +$$ +\begin{array}{l} \| X (t + 1) - X (t) \| _ {F} ^ {2} = \sum_ {i = 1} ^ {N} \| X _ {i} (t + 1) - X _ {i} (t) \| _ {2} ^ {2} \\ \leq \left(L _ {\sigma} \| W \| _ {2} (1 + K)\right) ^ {2} \| X (t) - X (t - 1) \| _ {F} ^ {2}. \\ \end{array} +$$ + +Therefore, $f$ is a contraction mapping with constant $c = L_{\sigma} \| W \|_2 (1 + K) < 1$ . + +(b) Fixed Point Existence: Since $(\mathbb{R}^{N\times d},\| \cdot \| _F)$ is complete and $f$ is a contraction mapping, by the Banach Fixed-Point Theorem, there exists a unique fixed point $X^{*}\in \mathbb{R}^{N\times d}$ such that $X^{*} = f(X^{*})$ . The boundedness of iterates follows from: + +$$ +\left\| X (t + 1) \right\| _ {F} \leq \left\| X (t) \right\| _ {F} + c \| X (t) \| _ {F} + \| f (0) \| _ {F}, \tag {12} +$$ + +where $\| f(0)\| _F$ is finite due to the properties of $\sigma$ and $W$ . + +(c) Convergence Rate: At the fixed point $X^{*}$ : + +$$ +\begin{array}{l} \left\| X (t + 1) - X ^ {*} \right\| _ {F} = \left\| f (X (t)) - f (X ^ {*}) \right\| _ {F} \\ \leq c \| X (t) - X ^ {*} \| _ {F}. \tag {13} \\ \end{array} +$$ + +By induction, for any $t \geq 0$ : + +$$ +\left\| X (t) - X ^ {*} \right\| _ {F} \leq c ^ {t} \| X (0) - X ^ {*} \| _ {F}, \tag {14} +$$ + +establishing geometric convergence with rate $c$ . + +(d) Attention Weight Convergence: By the Lipschitz property of the attention mechanism: + +$$ +\begin{array}{l} \left\| \alpha_ {i j} (t + 1) - \alpha_ {i j} (t) \right\| _ {2} \\ \leq K \| X _ {i} (t + 1) - X _ {i} (t) \| _ {2} \leq K c ^ {t} \| X (1) - X (0) \| _ {F}. \\ \end{array} +$$ + +The sequence $\{\alpha_{ij}(t)\}$ is Cauchy since: + +$$ +\begin{array}{l} \| \alpha_ {i j} (t) - \alpha_ {i j} (s) \| _ {2} \leq \sum_ {k = s} ^ {t - 1} \| \alpha_ {i j} (k + 1) - \alpha_ {i j} (k) \| _ {2} \\ \leq K \| X (1) - X (0) \| _ {F} \sum_ {k = s} ^ {t - 1} c ^ {k} \\ \leq \frac {K \| X (1) - X (0) \| _ {F} c ^ {s}}{1 - c}. \tag {15} \\ \end{array} +$$ + +Therefore, $\{\alpha_{ij}(t)\}$ converges to some $\alpha_{ij}^{*}$ . Using the triangle inequality and normalization: + +$$ +\sum_ {j \in \mathcal {N} (i)} \| \alpha_ {i j} ^ {*} \| _ {2} \leq 1 + \frac {K \| X (1) - X (0) \| _ {F}}{1 - c} \leq \frac {1}{1 - c}. \tag {16} +$$ + +# 6.3. Lemma 2 + +Lemma 2 (Structure and Spectral Properties of GAT Fixed Points). Let $G = (V,E)$ be a graph with $N$ nodes and let $X^{*}\in \mathbb{R}^{N\times d}$ be the fixed point established in Lemma 1. Define the fixed point attention matrix $A^{*}\in \mathbb{R}^{N\times N}$ with entries $[A^*]_{ij} = \alpha_{ij}^*$ for $j\in \mathcal{N}(i)$ and 0 otherwise. Then: + +(a) At the fixed point, for any node $i$ : + +$$ +X _ {i} ^ {*} = \sigma \left(\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} ^ {*} W X _ {j} ^ {*}\right) +$$ + +(b) Let $\lambda_1(A^*)$ and $v_{1}$ be the largest eigenvalue and corresponding eigenvector of $A^{*}$ . Then: + +$$ +\left\| X ^ {*} - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} 1 _ {N}} X ^ {*} \right\| _ {F} \leq \frac {\lambda_ {2} (A ^ {*})}{\lambda_ {1} (A ^ {*})} \| X ^ {*} \| _ {F} +$$ + +where $\lambda_2(A^*)$ is the second largest eigenvalue of $A^*$ . + +(c) The spectral gap $\gamma = 1 - \frac{\lambda_2(A^*)}{\lambda_1(A^*)}$ controls feature homogenization through: + +$$ +\| X _ {i} ^ {*} - X _ {j} ^ {*} \| _ {2} \leq (1 - \gamma) \| X ^ {*} \| _ {F} \quad \forall i, j +$$ + +(d) The node features decompose as: + +$$ +X ^ {*} = \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} 1 _ {N}} X ^ {*} + E +$$ + +where the error term $E$ satisfies: + +$$ +\| E \| _ {F} \leq \left(\frac {\lambda_ {2} (A ^ {*})}{\lambda_ {1} (A ^ {*})}\right) ^ {2} \| X ^ {*} \| _ {F} +$$ + +(e) For any $\epsilon > 0$ , if $\gamma > 1 - \epsilon$ , then there exists a vector $v \in \mathbb{R}^d$ such that: + +$$ +\left\| X ^ {*} - 1 _ {N} v ^ {T} \right\| _ {F} \leq \sqrt {\epsilon} \| X ^ {*} \| _ {F} +$$ + +(f) The covariance matrix of node features at the fixed point satisfies: + +$$ +\operatorname {r a n k} \left(\operatorname {C o v} \left(X ^ {*}\right)\right) \leq \operatorname {r a n k} \left(I - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} 1 _ {N}}\right) + 1 +$$ + +Proof. Preliminary Definitions and Setup: Let $G = (V, E)$ be a graph with $N$ nodes and let $X^{*} \in \mathbb{R}^{N \times d}$ be the fixed point. Let $A^{*}$ be the fixed-point attention matrix where $[A^{*}]_{ij} = \alpha_{ij}^{*}$ for $j \in \mathcal{N}(i)$ and 0 otherwise. Note that $A^{*}$ is row-stochastic by construction. + +# Part (a): Fixed Point Characterization + +First, we establish that the fixed point condition is well-defined: + +1) At convergence, by Lemma 1, the sequence $\{X(t)\}$ converges to $X^{*}$ and $\{\alpha_{ij}(t)\}$ converges to $\alpha_{ij}^{*}$ . +2) By continuity of $\sigma$ and the update rule: + +$$ +\begin{array}{l} X _ {i} ^ {*} = \lim _ {t \rightarrow \infty} X _ {i} (t + 1) \\ = \lim _ {t \rightarrow \infty} \sigma \left(\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} (t) W X _ {j} (t)\right) \\ = \sigma \left(\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} ^ {*} W X _ {j} ^ {*}\right) \\ \end{array} +$$ + +# Part (b): Spectral Approximation + +1) First, observe that $A^*$ is row-stochastic and non-negative. By the Perron-Frobenius theorem: $-\lambda_1(A^*)$ is real and positive $-|\lambda_i(A^*)| \leq \lambda_1(A^*)$ for all $i \geq 2$ . The corresponding eigenvector $v_1$ can be chosen to be positive +2) By the Spectral Theorem, $A^{*}$ has an orthogonal decomposition: + +$$ +A ^ {*} = \sum_ {i = 1} ^ {N} \lambda_ {i} \left(A ^ {*}\right) v _ {i} v _ {i} ^ {T} \tag {17} +$$ + +where $\{v_{i}\}_{i = 1}^{N}$ form an orthonormal basis. + +3) The fixed point equation can be written in matrix form: + +$$ +X ^ {*} = \sigma \left(A ^ {*} W X ^ {*}\right) \tag {18} +$$ + +4) Using the $L_{\sigma}$ -Lipschitz property of $\sigma$ and the fact that $L_{\sigma} < 1$ : + +$$ +\begin{array}{l} \left\| X ^ {*} - A ^ {*} W X ^ {*} \right\| _ {F} = \left\| \sigma \left(A ^ {*} W X ^ {*}\right) - A ^ {*} W X ^ {*} \right\| _ {F} \\ \leq L _ {\sigma} \left\| A ^ {*} W X ^ {*} \right\| _ {F} \\ \leq L _ {\sigma} \| X ^ {*} \| _ {F} \\ \end{array} +$$ + +5) Therefore, locally around the fixed point: + +$$ +X ^ {*} \approx A ^ {*} W X ^ {*} \tag {19} +$$ + +6) Applying the spectral decomposition: + +$$ +\begin{array}{l} X ^ {*} \approx \left(\lambda_ {1} \left(A ^ {*}\right) \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} + \sum_ {i = 2} ^ {N} \lambda_ {i} \left(A ^ {*}\right) v _ {i} v _ {i} ^ {T}\right) W X ^ {*} \\ = \lambda_ {1} (A ^ {*}) \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} W X ^ {*} + \sum_ {i = 2} ^ {N} \lambda_ {i} (A ^ {*}) v _ {i} v _ {i} ^ {T} W X ^ {*} \\ \end{array} +$$ + +7) By the Davis-Kahan theorem and matrix perturbation theory: + +$$ +\left\| X ^ {*} - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} X ^ {*} \right\| _ {F} \leq \frac {\lambda_ {2} (A ^ {*})}{\lambda_ {1} (A ^ {*})} \| X ^ {*} \| _ {F} \tag {20} +$$ + +This establishes the bound in part (b). + +# Part (c): Feature Homogenization Analysis + +1) For any pair of nodes i,j, consider their feature difference: + +$$ +\begin{array}{l} \| X _ {i} ^ {*} - X _ {j} ^ {*} \| _ {2} = \| \sigma (\sum_ {k \in \mathcal {N} (i)} \alpha_ {i k} ^ {*} W X _ {k} ^ {*}) \\ - \sigma (\sum_ {l \in \mathcal {N} (j)} \alpha_ {j l} ^ {*} W X _ {l} ^ {*}) \| _ {2} \\ \end{array} +$$ + +2) Using the Lipschitz property of $\sigma$ : + +$$ +\begin{array}{l} \leq L _ {\sigma} \| \sum_ {k \in \mathcal {N} (i)} \alpha_ {i k} ^ {*} W X _ {k} ^ {*} - \sum_ {l \in \mathcal {N} (j)} \alpha_ {j l} ^ {*} W X _ {l} ^ {*} \| _ {2} \\ = L _ {\sigma} \left\| \left(e _ {i} ^ {T} - e _ {j} ^ {T}\right) A ^ {*} W X ^ {*} \right\| _ {2} \\ \end{array} +$$ + +where $e_i$ is the i-th standard basis vector. + +3) Using the spectral decomposition of $A^{*}$ and the fact that $L_{\sigma} < 1$ : + +$$ +\begin{array}{l} \left\| X _ {i} ^ {*} - X _ {j} ^ {*} \right\| _ {2} \leq \left\| \left(e _ {i} ^ {T} - e _ {j} ^ {T}\right) \left(A ^ {*} - \lambda_ {1} \left(A ^ {*}\right) \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}}\right) W X ^ {*} \right\| _ {2} \\ \leq \left\| e _ {i} ^ {T} - e _ {j} ^ {T} \right\| _ {2} \left\| A ^ {*} - \right. \\ \lambda_ {1} \left(A ^ {*}\right) \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} \| _ {2} \| W \| _ {2} \| X ^ {*} \| _ {F} \\ \end{array} +$$ + +4) Since $\| e_i^T - e_j^T \|_2 = \sqrt{2}$ and $\| W \|_2 \leq 1$ : + +$$ +\left\| X _ {i} ^ {*} - X _ {j} ^ {*} \right\| _ {2} \leq (1 - \gamma) \left\| X ^ {*} \right\| _ {F} +$$ + +# Part (d): Feature Decomposition Analysis + +1) Start with the spectral decomposition of $A^{*}$ : + +$$ +A ^ {*} = \lambda_ {1} (A ^ {*}) \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} + \sum_ {i = 2} ^ {N} \lambda_ {i} (A ^ {*}) v _ {i} v _ {i} ^ {T} +$$ + +2) The node features can be decomposed as: + +$$ +X ^ {*} = \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} X ^ {*} + \left(I - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}}\right) X ^ {*} +$$ + +3) Define the residual term: + +$$ +E = \left(I - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} {\bf 1} _ {N}}\right) X ^ {*} +$$ + +4) Using the orthogonality of eigenvectors: + +$$ +\begin{array}{l} \| E \| _ {F} ^ {2} = \operatorname {t r} \left(E ^ {T} E\right) \\ = \operatorname {t r} \left(X ^ {* T} \left(I - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}}\right) ^ {2} X ^ {*}\right) \\ \leq \left(\frac {\lambda_ {2} \left(A ^ {*}\right)}{\lambda_ {1} \left(A ^ {*}\right)}\right) ^ {2} \| X ^ {*} \| _ {F} ^ {2} \\ \end{array} +$$ + +# Part (e): Uniform Feature Approximation + +1) When $\gamma > 1 - \epsilon$ , we have $\frac{\lambda_2(A^*)}{\lambda_1(A^*)} < \epsilon$ . +2) Define $v = \frac{v_1^T X^*}{v_1^T \mathbf{1}_N}$ . Then: + +$$ +\begin{array}{l} \left\| X ^ {*} - \mathbf {1} _ {N} v ^ {T} \right\| _ {F} = \left\| X ^ {*} - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} X ^ {*} + \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} X ^ {*} - \mathbf {1} _ {N} v ^ {T} \right\| _ {F} \\ \leq \left\| X ^ {*} - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} X ^ {*} \right\| _ {F} \\ \leq \sqrt {\epsilon} \| X ^ {*} \| _ {F} \\ \end{array} +$$ + +# Part (f): Covariance Rank Analysis + +1) The covariance matrix is defined as: + +$$ +\operatorname {C o v} \left(X ^ {*}\right) = \frac {1}{N} X ^ {* T} \left(I - \frac {\mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T}}{N}\right) X ^ {*} +$$ + +2) Using the feature decomposition from part (d): + +$$ +\begin{array}{l} \operatorname {C o v} (X ^ {*}) \\ = \frac {1}{N} \left(\frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} X ^ {*} + E\right) ^ {T} \left(I - \frac {\mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T}}{N}\right) \left(\frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} X ^ {*} + E\right) \\ = \frac {1}{N} E ^ {T} \left(I - \frac {\mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T}}{N}\right) E \\ \end{array} +$$ + +3) By rank properties: + +$$ +\operatorname {r a n k} \left(\operatorname {C o v} \left(X ^ {*}\right)\right) \leq \operatorname {r a n k} \left(I - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}}\right) + 1 +$$ + +This completes the detailed proof of all parts of Lemma 2. + +![](images/4a071767d0a0bf23291dc3ed16ea5a3d5cae7ca8624aa3b10b4fa045211d4d0a.jpg) + +# 6.4. Lemma 3 + +Lemma 3 (Characterization of Oversmoothing Attractors in GATs). Let $X(t) \in \mathbb{R}^{N \times d}$ represent the node features at layer $t$ in a GAT. Define the feature diversity measure at layer $t$ as: + +$$ +\mu (X (t)) = \frac {1}{N (N - 1)} \sum_ {i \neq j} \frac {\| X _ {i} (t) - X _ {j} (t) \| _ {2}}{\| X _ {i} (t) \| _ {2} + \| X _ {j} (t) \| _ {2}}. +$$ + +Let $A(t) \in \mathbb{R}^{N \times N}$ be the attention matrix at layer $t$ . Then, under the conditions from Lemmas 1 and 2, the following statements hold: + +(a) There exists a compact set $\mathcal{A} \subset \mathbb{R}^{N \times d}$ such that: + +$$ +\lim _ {t \to \infty} d i s t (X (t), \mathcal {A}) = 0, +$$ + +where $dist(X,\mathcal{A}) = \inf_{Y\in \mathcal{A}}\| X - Y\| _F$ + +(b) The attractor $\mathcal{A}$ has intrinsic dimension $k$ bounded by: + +$$ +k \leq \min \left\{d, r a n k (C o v (X ^ {*})), \left\lceil \frac {1}{1 - \gamma} \right\rceil \right\}, +$$ + +where $\gamma$ is the spectral gap from Lemma 2. + +(c) The feature diversity measure decreases geometrically with rate determined by both the contraction constant $c$ and spectral gap $\gamma$ : + +$$ +\mu (X (t)) \leq \min \{(1 - \gamma) ^ {t}, c ^ {t} \} \mu (X (0)). +$$ + +(d) At convergence, the feature diversity measure is bounded by: + +$$ +\lim _ {t \to \infty} \mu (X (t)) \leq \frac {\lambda_ {2} (A ^ {*})}{\lambda_ {1} (A ^ {*})} \cdot \frac {\| X ^ {*} \| _ {F}}{2 \min _ {i} \| X _ {i} ^ {*} \| _ {2}}. +$$ + +(e) The covariance matrix of the node features evolves according to: + +$$ +\| C o v (X (t)) - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} 1 _ {N}} C o v (X ^ {*}) \| _ {F} \leq (1 - \gamma) ^ {t} \| C o v (X (0)) \| _ {F}. +$$ + +(f) The eigenvalues of the covariance matrix satisfy: + +$$ +\lambda_ {i} (C o v (X (t))) \leq \left(\frac {\lambda_ {2} (A ^ {*})}{\lambda_ {1} (A ^ {*})}\right) ^ {2 t} \lambda_ {i} (C o v (X (0))), +$$ + +for all $i > 1$ + +Proof. Preliminaries: First, recall that by Lemma 1, we have a contraction mapping with constant $c$ and a unique fixed point $X^{*}$ . From Lemma 2, we have spectral properties of the attention matrix $A^{*}$ with spectral gap $\gamma = 1 - \frac{\lambda_2(A^*)}{\lambda_1(A^*)}$ . + +# Part (a): Existence of Compact Attractor + +Let us define the attractor set $\mathcal{A}$ : + +$$ +\mathcal {A} = \left\{Y \in \mathbb {R} ^ {N \times d}: \| Y - X ^ {*} \| _ {F} \leq \frac {\lambda_ {2} (A ^ {*})}{\lambda_ {1} (A ^ {*})} \| X ^ {*} \| _ {F} \right\} +$$ + +Hence, we show $\mathcal{A}$ is compact: + +- Closed: $\mathcal{A}$ is the preimage of a closed interval under a continuous function +- Bounded: $\| Y\| _F\leq \| X^*\| _F(1 + \frac{\lambda_2(A^*)}{\lambda_1(A^*)})$ for all $Y\in \mathcal{A}$ + +We prove convergence to $\mathcal{A}$ : + +$$ +\begin{array}{l} \operatorname {d i s t} (X (t), \mathcal {A}) = \inf _ {Y \in \mathcal {A}} \| X (t) - Y \| _ {F} \\ \leq \| X (t) - X ^ {*} \| _ {F} \\ \leq c ^ {t} \| X (0) - X ^ {*} \| _ {F} \rightarrow 0 \text {a s} t \rightarrow \infty \\ \end{array} +$$ + +Part (b): Attractor Dimension Bounds + +- Direct consequence of $\mathcal{A} \subset \mathbb{R}^{N \times d}$ +- By construction, features cannot span more dimensions than $d$ +- Let $C^* = \operatorname{Cov}(X^*)$ be the covariance matrix at the fixed point +- For any $Y \in \mathcal{A}$ : + +$$ +\operatorname {r a n k} \left(\operatorname {C o v} (Y)\right) \leq \operatorname {r a n k} \left(C ^ {*}\right) +$$ + +Proof: Use SVD of $(Y - X^{*})$ and bound perturbation of eigenvalues +- From Lemma 2, the spectral gap $\gamma$ controls feature similarity +- For any orthonormal basis $\{v_{i}\}$ of the attractor space: + +$$ +\sum_ {i = 1} ^ {k} (1 - \gamma) ^ {i} \leq 1 +$$ + +This implies $k\leq \left\lceil \frac{1}{1 - \gamma}\right\rceil$ + +# Part (c): Feature Diversity Decay + +Analyzing pairwise distances using contraction property, we get + +$$ +\begin{array}{l} \left\| X _ {i} (t + 1) - X _ {j} (t + 1) \right\| _ {2} = \left\| f \left(X _ {i} (t)\right) - f \left(X _ {j} (t)\right) \right\| _ {2} \\ \leq c \| X _ {i} (t) - X _ {j} (t) \| _ {2} \\ \end{array} +$$ + +Hence, using spectral bound from Lemma 2: + +$$ +\left\| X _ {i} (t) - X _ {j} (t) \right\| _ {2} \leq (1 - \gamma) ^ {t} \| X (0) \| _ {F} +$$ + +Combining bounds for feature diversity measure: + +$$ +\begin{array}{l} \mu (X (t)) = \frac {1}{N (N - 1)} \sum_ {i \neq j} \frac {\| X _ {i} (t) - X _ {j} (t) \| _ {2}}{\| X _ {i} (t) \| _ {2} + \| X _ {j} (t) \| _ {2}} \\ \leq \min \{(1 - \gamma) ^ {t}, c ^ {t} \} \mu (X (0)) \\ \end{array} +$$ + +# Part (d): Convergence Analysis of Feature Diversity + +First, we analyze limiting behavior of pairwise distances: For any nodes $i,j$ at the fixed point $X^{*}$ : + +$$ +\begin{array}{l} \left\| X _ {i} ^ {*} - X _ {j} ^ {*} \right\| _ {2} = \left\| \sum_ {k \in \mathcal {N} (i)} \alpha_ {i k} ^ {*} W X _ {k} ^ {*} - \sum_ {k \in \mathcal {N} (j)} \alpha_ {j k} ^ {*} W X _ {k} ^ {*} \right\| _ {2} \\ \leq \| W \| _ {2} \| \sum_ {k} \left(\alpha_ {i k} ^ {*} - \alpha_ {j k} ^ {*}\right) X _ {k} ^ {*} \| _ {2} \\ \leq \frac {\lambda_ {2} (A ^ {*})}{\lambda_ {1} (A ^ {*})} \| X ^ {*} \| _ {F} \\ \end{array} +$$ + +Thus, the lower bound node norms at convergence: + +$$ +\left\| X _ {i} ^ {*} \right\| _ {2} \geq \min _ {i} \left\| X _ {i} ^ {*} \right\| _ {2} > 0 +$$ + +where positivity follows from the non-degenerate fixed point. + +Finally, we combine to bound limiting diversity: + +$$ +\begin{array}{l} \lim _ {t \rightarrow \infty} \mu (X (t)) = \frac {1}{N (N - 1)} \sum_ {i \neq j} \frac {\left\| X _ {i} ^ {*} - X _ {j} ^ {*} \right\| _ {2}}{\left\| X _ {i} ^ {*} \right\| _ {2} + \left\| X _ {j} ^ {*} \right\| _ {2}} (21) \\ \leq \frac {\lambda_ {2} \left(A ^ {*}\right)}{\lambda_ {1} \left(A ^ {*}\right)} \cdot \frac {\| X ^ {*} \| _ {F}}{2 \min _ {i} \| X _ {i} ^ {*} \| _ {2}} (22) \\ \end{array} +$$ + +# Part (e): Covariance Evolution Analysis + +Expressing covariance matrix evolution: + +$$ +\operatorname {C o v} (X (t)) = \frac {1}{N} X (t) ^ {T} X (t) - \frac {1}{N ^ {2}} X (t) ^ {T} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T} X (t) \tag {23} +$$ + +Decomposing using eigenvectors of $A^{*}$ : + +$$ +X (t) = \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} X ^ {*} + E (t) \tag {24} +$$ + +$$ +\| E (t) \| _ {F} \leq (1 - \gamma) ^ {t} \| X (0) \| _ {F} \tag {25} +$$ + +Hence, we analyze covariance deviation: + +$$ +\begin{array}{l} \left\| \operatorname {C o v} (X (t)) - \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} \operatorname {C o v} (X ^ {*}) \right\| _ {F} (26) \\ \leq \left\| E (t) ^ {T} E (t) \right\| _ {F} + 2 \left\| \frac {v _ {1} v _ {1} ^ {T}}{v _ {1} ^ {T} \mathbf {1} _ {N}} X ^ {*} E (t) ^ {T} \right\| _ {F} (27) \\ \leq (1 - \gamma) ^ {t} \| \operatorname {C o v} (X (0)) \| _ {F} (28) \\ \end{array} +$$ + +# Part (f): Eigenvalue Analysis + +Expressing eigenvalue evolution using matrix perturbation theory: For $i > 1$ , let $u_{i}(t)$ be the $i$ -th eigenvector of $\operatorname{Cov}(X(t))$ : + +$$ +\lambda_ {i} (\operatorname {C o v} (X (t))) = u _ {i} (t) ^ {T} \operatorname {C o v} (X (t)) u _ {i} (t) \tag {29} +$$ + +Applying spectral decomposition of $A^{*}$ : + +$$ +\begin{array}{l} \lambda_ {i} (\operatorname {C o v} (X (t))) (30) \\ \leq \left\| A ^ {*} \right\| _ {2} ^ {2 t} \lambda_ {i} (\operatorname {C o v} (X (0))) (31) \\ = \left(\frac {\lambda_ {2} \left(A ^ {*}\right)}{\lambda_ {1} \left(A ^ {*}\right)}\right) ^ {2 t} \lambda_ {i} (\operatorname {C o v} (X (0))) (32) \\ \end{array} +$$ + +- By induction on $t$ , show that for all $i > 1$ : + +$$ +\lambda_ {i} (\operatorname {C o v} (X (t + 1))) \leq \left(\frac {\lambda_ {2} \left(A ^ {*}\right)}{\lambda_ {1} \left(A ^ {*}\right)}\right) ^ {2} \lambda_ {i} (\operatorname {C o v} (X (t))) \tag {33} +$$ + +- The base case follows from spectral properties of $A^{*}$ +- The inductive step uses the GAT update rule and eigenvalue interlacing + +This completes the proof, showing that GATs exhibit exponential convergence to a low-dimensional attractor, characterized by rapidly decaying feature diversity and covariance eigenvalues. The rate of convergence is controlled by both the contraction constant $c$ and the spectral gap $\gamma$ of the attention matrix. + +![](images/94ee9cdbddd75c908fa2e836ba974a51b4dc85e2a4d42b5312b9d2ed8452eecc.jpg) + +Corollary 0.1 (Oversmoothing Rate). The rate of oversmoothing is controlled by the contraction constant $c$ and the network depth $t$ : + +$$ +\mu (X (t)) = \mathcal {O} ((1 - \delta) ^ {t}), +$$ + +where $\delta = \min \{\gamma, 1 - c\}$ . This quantifies how quickly node features collapse to indistinguishable values as the network deepens. + +# 6.5. Lemma 4 + +Lemma 4 (Stability Analysis of GAT Fixed Points). Let $f: \mathbb{R}^{N \times d} \to \mathbb{R}^{N \times d}$ be the GAT update rule with fixed point $X^* \in \mathbb{R}^{N \times d}$ . Let $J_f(X^*)$ denote the Jacobian of $f$ at $X^*$ . Then: + +(a) The Jacobian $J_{f}(X^{*})$ has the block structure: + +$$ +[ J _ {f} (X ^ {*}) ] _ {i j} = \left\{ \begin{array}{l l} \sigma^ {\prime} (h _ {i} ^ {*}) \alpha_ {i j} W & i f j \in \mathcal {N} (i) \\ 0 & o t h e r w i s e \end{array} \right. +$$ + +where $h_i^* = \sum_{j\in \mathcal{N}(i)}\alpha_{ij}WX_j^*$ + +(b) The fixed point $X^{*}$ is asymptotically stable if and only if: + +$$ +\rho (J _ {f} (X ^ {*})) < 1, +$$ + +where $\rho (\cdot)$ denotes the spectral radius. + +(c) For any perturbation $\delta X(0)$ , the error evolution follows: + +$$ +\| \delta X (t) \| _ {F} \leq \| J _ {f} (X ^ {*}) \| _ {2} ^ {t} \| \delta X (0) \| _ {F}. +$$ + +(d) At a stable fixed point, the attention weights satisfy: + +$$ +\sum_ {j \in \mathcal {N} (i)} \| \sigma^ {\prime} (h _ {i} ^ {*}) \alpha_ {i j} W \| _ {2} < 1 +$$ + +for all nodes $i$ . + +(e) The oversmoothing condition $\lim_{t\to \infty}\| X_i^* -X_j^*\| _2 = 0$ occurs when: + +$$ +\ker \left(I - J _ {f} \left(X ^ {*}\right)\right) \subseteq s p a n \left\{\mathbf {1} _ {N} \otimes v: v \in \mathbb {R} ^ {d} \right\}. +$$ + +Proof. Before proceeding with the proof, we establish some key definitions and properties: + +1. The GAT update rule $f: \mathbb{R}^{N \times d} \to \mathbb{R}^{N \times d}$ at node $i$ is: + +$$ +f _ {i} (X) = \sigma \left(\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} W X _ {j}\right) +$$ + +2. At the fixed point $X^{*}$ .. + +$$ +X _ {i} ^ {*} = \sigma \left(\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} ^ {*} W X _ {j} ^ {*}\right) +$$ + +# Part (a): Jacobian Structure + +First, we compute the partial derivatives For $j\in \mathcal{N}(i)$ + +$$ +\begin{array}{l} \frac {\partial f _ {i}}{\partial X _ {j}} = \frac {\partial}{\partial X _ {j}} \sigma \left(\sum_ {k \in \mathcal {N} (i)} \alpha_ {i k} W X _ {k}\right) \\ = \sigma^ {\prime} \left(h _ {i} ^ {*}\right) \left(\alpha_ {i j} W + \sum_ {k \in \mathcal {N} (i)} X _ {k} ^ {*} W ^ {\top} \frac {\partial \alpha_ {i k}}{\partial X _ {j}}\right) \\ \end{array} +$$ + +At fixed point $X^{*}$ , the attention weights have converged (from Lemma 1), so: + +$$ +\frac {\partial \alpha_ {i k}}{\partial X _ {j}} = 0 +$$ + +Therefore: + +$$ +[ J _ {f} (X ^ {*}) ] _ {i j} = \left\{ \begin{array}{l l} \sigma^ {\prime} (h _ {i} ^ {*}) \alpha_ {i j} ^ {*} W & \text {i f} j \in \mathcal {N} (i) \\ 0 & \text {o t h e r w i s e} \end{array} \right. +$$ + +# Part (b): Stability Criterion + +Consider perturbation $\delta X = X - X^{*}$ By Taylor expansion around $X^{*}$ : + +$$ +f (X) = f \left(X ^ {*}\right) + J _ {f} \left(X ^ {*}\right) \left(X - X ^ {*}\right) + R (X), +$$ + +where $\| R(X)\| _F = o(\| X - X^*\| _F)$ + +At fixed point: + +$$ +f (X ^ {*}) = X ^ {*} +$$ + +The perturbation evolves as: + +$$ +\begin{array}{l} \delta X (t + 1) = f \left(X ^ {*} + \delta X (t)\right) - X ^ {*} \\ = J _ {f} \left(X ^ {*}\right) \delta X (t) + R (\delta X (t)) \\ \end{array} +$$ + +By Lyapunov's linearization theorem, asymptotic stability requires: + +$$ +\rho \left(J _ {f} \left(X ^ {*}\right)\right) < 1 +$$ + +# Part (c): Error Evolution + +For sufficiently small perturbations, linearization dominates: + +$$ +\| \delta X (t + 1) \| _ {F} = \| J _ {f} (X ^ {*}) \delta X (t) + R (\delta X (t)) \| _ {F} +$$ + +Using triangle inequality: + +$$ +\left\| \delta X (t + 1) \right\| _ {F} \leq \left\| J _ {f} \left(X ^ {*}\right) \delta X (t) \right\| _ {F} + \left\| R (\delta X (t)) \right\| _ {F} +$$ + +For small enough $\| \delta X(t)\| _F$ : + +$$ +\| R (\delta X (t)) \| _ {F} \leq \epsilon \| \delta X (t) \| _ {F} +$$ + +for any $\epsilon >0$ + +Therefore: + +$$ +\| \delta X (t) \| _ {F} \leq \left(\| J _ {f} \left(X ^ {*}\right) \| _ {2} + \epsilon\right) ^ {t} \| \delta X (0) \| _ {F} +$$ + +# Part (d): Attention Weight Condition + +The spectral norm satisfies: + +$$ +\| J _ {f} (X ^ {*}) \| _ {2} \leq \max _ {i} \sum_ {j \in \mathcal {N} (i)} \| \sigma^ {\prime} \left(h _ {i} ^ {*}\right) \alpha_ {i j} ^ {*} W \| _ {2} +$$ + +For stability: + +$$ +\sum_ {j \in \mathcal {N} (i)} \| \sigma^ {\prime} \left(h _ {i} ^ {*}\right) \alpha_ {i j} ^ {*} W \| _ {2} < 1 \quad \forall i +$$ + +# Part (e): Oversmoothing Characterization + +At oversmoothing: + +$$ +X _ {i} ^ {*} = X _ {j} ^ {*} = v \quad \forall i, j +$$ + +for some $v\in \mathbb{R}^d$ + +This implies: + +$$ +X ^ {*} = \mathbf {1} _ {N} \otimes v +$$ + +By fixed point property: + +$$ +\left(I - J _ {f} \left(X ^ {*}\right)\right) X ^ {*} = 0 +$$ + +Therefore: + +$$ +\ker \left(I - J _ {f} \left(X ^ {*}\right)\right) \subseteq \operatorname {s p a n} \left\{\mathbf {1} _ {N} \otimes v: v \in \mathbb {R} ^ {d} \right\} +$$ + +To show sufficiency, consider any $X^{*}\in \ker (I - J_{f}(X^{*}))$ Then: + +$$ +\left(I - J _ {f} \left(X ^ {*}\right)\right) X ^ {*} = 0 +$$ + +$$ +\begin{array}{l} X ^ {*} = J _ {f} (X ^ {*}) X ^ {*} \\ = \left[ \begin{array}{c} \sigma^ {\prime} (h _ {1} ^ {*}) \sum_ {j \in \mathcal {N} (1)} \alpha_ {1 j} ^ {*} W X _ {j} ^ {*} \\ \vdots \\ \sigma^ {\prime} (h _ {N} ^ {*}) \sum_ {j \in \mathcal {N} (N)} \alpha_ {N j} ^ {*} W X _ {j} ^ {*} \end{array} \right] \\ \end{array} +$$ + +By assumption, $X^{*}\in \operatorname {span}\{\mathbf{1}_{N}\otimes v:v\in \mathbb{R}^{d}\}$ , so: + +$$ +X ^ {*} = \mathbf {1} _ {N} \otimes v \text {f o r s o m e} v \in \mathbb {R} ^ {d} +$$ + +This means $X_{i}^{*} = v$ for all $i \in \{1, \dots, N\}$ . Substituting back: + +$$ +\begin{array}{l} v = \sigma^ {\prime} \left(h _ {i} ^ {*}\right) \sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} ^ {*} W v \\ = \sigma^ {\prime} \left(h _ {i} ^ {*}\right) \left(\sum_ {j \in \mathcal {N} (i)} \alpha_ {i j} ^ {*}\right) W v \\ = \sigma^ {\prime} \left(h _ {i} ^ {*}\right) W v \\ \end{array} +$$ + +where we used the normalization condition $\sum_{j\in \mathcal{N}(i)}\alpha_{ij}^{*} = 1$ + +Therefore: + +$$ +\left\| X _ {i} ^ {*} - X _ {j} ^ {*} \right\| _ {2} = \left\| v - v \right\| _ {2} = 0 \quad \forall i, j +$$ + +This confirms that any solution in $\ker (I - J_f(X^*))$ exhibits oversmoothing, as all node features converge to the same value $v$ . The stability of this solution is guaranteed by the spectral radius condition from part (b). + +# 6.6. Lemma 5 + +Lemma 5 (Spectral Properties of DYNAMO-GAT Pruning). Let $G = (V, E)$ be a graph, and let $F, F_{P}: \mathbb{R}^{N \times d} \to \mathbb{R}^{N \times d}$ represent the original and pruned GNN transformations, respectively. Let $X^{*} \in \mathbb{R}^{N \times d}$ be an oversmoothing fixed point. Then: + +(a) The spectral radius satisfies: + +$$ +\rho \left(J _ {F _ {P}} \left(X ^ {*}\right)\right) \leq (1 - p) \rho \left(J _ {F} \left(X ^ {*}\right)\right), +$$ + +where $p$ is the effective pruning rate. + +(b) For the covariance-based pruning strategy in DYNAMO-GAT: + +$$ +p _ {i j} = r (t) \cdot \frac {| \alpha_ {i j} |}{\tau (t)} \cdot (C _ {i i} + C _ {j j} \mp 2 C _ {i j}), +$$ + +the pruned Jacobian eigenvalues $\lambda_{k}(J_{F_{P}})$ satisfy: + +$$ +\left| \lambda_ {k} \left(J _ {F _ {P}}\right) \right| \leq \left| \lambda_ {k} \left(J _ {F}\right) \right| \cdot \exp \left(- \beta \frac {\operatorname {T r} (C)}{\| C \| _ {F}}\right), +$$ + +where $\beta$ is a pruning adaptation parameter. + +(c) The pruned spectral gap increases monotonically: + +$$ +\gamma_ {P} = 1 - \frac {\lambda_ {2} \left(J _ {F _ {P}}\right)}{\lambda_ {1} \left(J _ {F _ {P}}\right)} \geq \gamma + p (1 - \gamma), +$$ + +where $\gamma$ is the original spectral gap from Lemma 2. + +(d) The rank of pruned feature representations is preserved: + +$$ +\operatorname {r a n k} \left(\operatorname {C o v} \left(F _ {P} (X)\right)\right) \geq \operatorname {r a n k} \left(\operatorname {C o v} (X)\right) - \kappa (p), +$$ + +where $\kappa(p) \leq \lceil p \cdot \text{rank}(\text{Cov}(X)) \rceil$ . + +(e) The pruned attention weights maintain feature diversity through: + +$$ +\mu \left(F _ {P} (X)\right) \geq (1 + p \gamma) \mu (X), +$$ + +where $\mu (\cdot)$ is the feature diversity measure from Lemma 2. + +(f) The eigenvalues of the pruned covariance matrix satisfy: + +$$ +\lambda_ {i} (C o v (F _ {P} (X))) \geq (1 - p \beta) ^ {2} \lambda_ {i} (C o v (X)), +$$ + +for all $i \leq \operatorname{rank}(\operatorname{Cov}(X)) - \kappa(p)$ . + +# Proof. Part (a): Spectral Radius Reduction + +First, observe that pruning modifies each Jacobian entry as: + +$$ +\left[ J _ {F _ {P}} \left(X ^ {*}\right) \right] _ {i j} = \left(1 - p _ {i j}\right) \left[ J _ {F} \left(X ^ {*}\right) \right] _ {i j}, \tag {34} +$$ + +where $p_{ij}$ is the pruning probability for edge $(i,j)$ . + +By the Perron-Frobenius theorem, since $J_{F}(X^{*})$ has non-negative entries: + +$$ +\rho \left(J _ {F} \left(X ^ {*}\right)\right) = \lim _ {k \rightarrow \infty} \| J _ {F} \left(X ^ {*}\right) ^ {k} \| ^ {1 / k}, \tag {35} +$$ + +where $\| \cdot \|$ is any matrix norm. + +Using the element-wise inequality and non-negativity of $(1 - p_{ij})$ : + +$$ +\begin{array}{l} \left\| J _ {F _ {P}} \left(X ^ {*}\right) ^ {k} \right\| \leq \left\| \left((1 - p) J _ {F} \left(X ^ {*}\right)\right) ^ {k} \right\| (36) \\ = (1 - p) ^ {k} \left\| J _ {F} \left(X ^ {*}\right) ^ {k} \right\|, (37) \\ \end{array} +$$ + +where $p = \mathrm{avg}(p_{ij})$ is the effective pruning rate. + +Taking the $k$ -th root and limit: + +$$ +\rho \left(J _ {F _ {P}} \left(X ^ {*}\right)\right) \leq (1 - p) \rho \left(J _ {F} \left(X ^ {*}\right)\right). \tag {38} +$$ + +# Part (b): Covariance-Based Pruning Effect + +First, we express the pruned Jacobian using Hadamard product: + +$$ +J _ {F _ {P}} = J _ {F} \circ (1 - P), \tag {39} +$$ + +where $P$ is the matrix of pruning probabilities. + +For the covariance-based pruning: + +$$ +p _ {i j} = r (t) \cdot \frac {\left| \alpha_ {i j} \right|}{\tau (t)} \cdot \left(C _ {i i} + C _ {j j} \mp 2 C _ {i j}\right), \tag {40} +$$ + +Using the submultiplicative property of matrix norms: + +$$ +\left\| J _ {F _ {P}} \right\| _ {2} ^ {2} \leq \left\| J _ {F} \right\| _ {2} ^ {2} \| (1 - P) \| _ {2} ^ {2} \tag {41} +$$ + +The norm of $(1 - P)$ relates to the covariance through: + +$$ +\left\| (1 - P) \right\| _ {2} ^ {2} \leq \exp \left(- 2 \beta \frac {\operatorname {T r} (C)}{\| C \| _ {F}}\right) \tag {42} +$$ + +By eigenvalue interlacing: + +$$ +\left| \lambda_ {k} \left(J _ {F _ {P}}\right) \right| \leq \left| \lambda_ {k} \left(J _ {F}\right) \right| \cdot \exp \left(- \beta \frac {\operatorname {T r} (C)}{\| C \| _ {F}}\right) \tag {43} +$$ + +# Part (c): Spectral Gap Analysis + +By Weyl's inequality and the structure of $P$ : + +$$ +\lambda_ {2} \left(J _ {F _ {P}}\right) \leq (1 - p) \lambda_ {2} \left(J _ {F}\right) \tag {44} +$$ + +$$ +\lambda_ {1} \left(J _ {F _ {P}}\right) \geq \left(1 - \frac {p}{2}\right) \lambda_ {1} \left(J _ {F}\right) \tag {45} +$$ + +The spectral gap $\gamma_{P}$ becomes: + +$$ +\gamma_ {P} = 1 - \frac {\lambda_ {2} \left(J _ {F _ {P}}\right)}{\lambda_ {1} \left(J _ {F _ {P}}\right)} \tag {46} +$$ + +$$ +\geq 1 - \frac {(1 - p) \lambda_ {2} \left(J _ {F}\right)}{\left(1 - \frac {p}{2}\right) \lambda_ {1} \left(J _ {F}\right)} \tag {47} +$$ + +$$ += 1 - (1 - p) \left(1 + \frac {p}{2} + O \left(p ^ {2}\right)\right) (1 - \gamma) \tag {48} +$$ + +$$ +\geq \gamma + p (1 - \gamma) \tag {49} +$$ + +# Part (d): Rank Preservation Analysis + +Consider the covariance matrix before and after pruning: + +$$ +\operatorname {C o v} (X) = \frac {1}{N} X ^ {\top} X - \frac {1}{N ^ {2}} X ^ {\top} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {\top} X \tag {50} +$$ + +$$ +\operatorname {C o v} \left(F _ {P} (X)\right) = \frac {1}{N} F _ {P} (X) ^ {\top} F _ {P} (X) - \frac {1}{N ^ {2}} F _ {P} (X) ^ {\top} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {\top} F _ {P} (X) \tag {51} +$$ + +By the pruning operation: + +$$ +F _ {P} (X) = F (X) \circ (1 - P) = F (X) (I - D _ {p}), \tag {52} +$$ + +where $D_p$ is a diagonal matrix with entries from $P$ . + +Using the rank-nullity theorem: + +$$ +\begin{array}{l} \operatorname {r a n k} \left(\operatorname {C o v} \left(F _ {P} (X)\right)\right) = \operatorname {r a n k} \left(\operatorname {C o v} (X)\right) - \dim \left(\ker \left(I - D _ {p}\right)\right) (53) \\ \geq \operatorname {r a n k} (\operatorname {C o v} (X)) - | \{i: p _ {i} = 1 \} | (54) \\ \end{array} +$$ + +By the definition of $\kappa(p)$ : + +$$ +\left|\left\{i: p _ {i} = 1 \right\}\right| \leq \left\lceil p \cdot \operatorname {r a n k} (\operatorname {C o v} (X)) \right\rceil = \kappa (p) \tag {55} +$$ + +# Part (e): Feature Diversity Maintenance + +First, let us express the feature diversity measure after pruning: + +$$ +\begin{array}{l} \mu \left(F _ {P} (X)\right) = \frac {1}{N (N - 1)} \sum_ {i \neq j} \frac {\left\| F _ {P} \left(X _ {i}\right) - F _ {P} \left(X _ {j}\right) \right\| _ {2}}{\left\| F _ {P} \left(X _ {i}\right) \right\| _ {2} + \left\| F _ {P} \left(X _ {j}\right) \right\| _ {2}} (56) \\ = \frac {1}{N (N - 1)} \sum_ {i \neq j} \frac {\| \left(1 - p _ {i j}\right) \left(F \left(X _ {i}\right) - F \left(X _ {j}\right)\right) \| _ {2}}{\| \left(1 - p _ {i i}\right) F \left(X _ {i}\right) \| _ {2} + \| \left(1 - p _ {j j}\right) F \left(X _ {j}\right) \| _ {2}} \text {w h e r e} \kappa (t) \text {i s t h e m a x i m u m n u m b e r o f e i g e n a l v e u s e s} \\ \operatorname {r a n k} \left(C (X (t + 1))\right) \geq \operatorname {r a n k} (C (X (t))) - \kappa (t), (68) \\ \end{array} +$$ + +Using the spectral gap property from part (c): + +$$ +\begin{array}{l} \left\| F _ {P} \left(X _ {i}\right) - F _ {P} \left(X _ {j}\right) \right\| _ {2} \geq (1 - p _ {i j}) (1 + p \gamma) \| F \left(X _ {i}\right) - F \left(X _ {j}\right) \| _ {2} (58) \\ \left\| F _ {P} \left(X _ {i}\right) \right\| _ {2} \leq \left(1 - p _ {i i}\right) \| F \left(X _ {i}\right) \| _ {2} (59) \\ \end{array} +$$ + +Combining these inequalities: + +$$ +\mu \left(F _ {P} (X)\right) \geq (1 + p \gamma) \mu (X) \tag {60} +$$ + +# Part (f): Covariance Eigenvalue Analysis + +First, we express the pruned covariance matrix eigenvalues using perturbation theory: + +$$ +\lambda_ {i} \left(\operatorname {C o v} \left(F _ {P} (X)\right)\right) = \lambda_ {i} \left(\operatorname {C o v} (X)\right) + \delta_ {i}, \tag {61} +$$ + +where $\delta_{i}$ is the perturbation term. + +By Weyl's perturbation theorem: + +$$ +\left| \delta_ {i} \right| \leq \| P \| _ {2} \cdot \left\| \operatorname {C o v} (X) \right\| _ {2} \leq p \beta \lambda_ {i} (\operatorname {C o v} (X)) \tag {62} +$$ + +For preserved eigenvalues $(i\leq \mathrm{rank}(\mathrm{Cov}(X)) - \kappa (p))$ + +$$ +\begin{array}{l} \lambda_ {i} \left(\operatorname {C o v} \left(F _ {P} (X)\right)\right) \geq \lambda_ {i} \left(\operatorname {C o v} (X)\right) - p \beta \lambda_ {i} (\operatorname {C o v} (X)) (63) \\ = (1 - p \beta) \lambda_ {i} (\operatorname {C o v} (X)) (64) \\ \end{array} +$$ + +By the geometric-arithmetic mean inequality: + +$$ +\lambda_ {i} \left(\operatorname {C o v} \left(F _ {P} (X)\right)\right) \geq (1 - p \beta) ^ {2} \lambda_ {i} (\operatorname {C o v} (X)) \tag {65} +$$ + +# 6.7. Lemma 6 + +Lemma 7 (Rank Preservation Under DYNAMO-GAT). Let $X(t) \in \mathbb{R}^{N \times d}$ be the node features at layer $t$ . Define the covariance matrix $C(t) \in \mathbb{R}^{d \times d}$ as: + +$$ +C (t) = \frac {1}{N} X (t) ^ {T} X (t) - \frac {1}{N ^ {2}} X (t) ^ {T} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T} X (t), \tag {66} +$$ + +where $\mathbf{1}_N$ is the all-ones vector. Under the DYNAMO-GAT noise injection and pruning strategy: + +(a) For the noise-perturbed features $\tilde{X}(t) = X(t) + \sigma \xi(t)$ , where $\xi(t) \sim \mathcal{N}(0, I)$ : + +$$ +\operatorname {r a n k} \left(C \left(\tilde {X} (t)\right)\right) = d \tag {67} +$$ + +with probability 1. + +(b) The pruned update preserves rank: + +where $\kappa (t)$ is the maximum number of eigenvalues $F(X_{\epsilon})$ below a threshold $\epsilon (t)$ . +(c) For noise level $\sigma > 0$ , the minimum eigenvalue satisfies: + +$$ +\lambda_ {\min } (C (t)) \geq \sigma^ {2} \left(1 - \frac {1}{N}\right) - O (\| X (t) \| _ {F} \sigma). \tag {69} +$$ + +(d) Under the adaptive pruning threshold: + +$$ +\tau (t) = \mu \left(\left| w _ {i j} \right|\right) + \beta \cdot \sigma \left(\left| w _ {i j} \right|\right), \tag {70} +$$ + +rank is preserved with high probability if: + +$$ +\beta \geq \sqrt {\frac {2 \log (d / \delta)}{N}}, \tag {71} +$$ + +where $\delta$ is the failure probability. + +Detailed proof of Lemma 6. We prove each part of the lemma separately, showing how noise injection and pruning affect the covariance structure and rank properties. + +# (a) Full Rank Property of Noise-Perturbed Features: + +First, expand the covariance of noise-perturbed features: + +$$ +\begin{array}{l} C (\tilde {X} (t)) = \frac {1}{N} (X (t) + \sigma \xi (t)) ^ {T} (X (t) + \sigma \xi (t)) \\ - \frac {1}{N ^ {2}} (X (t) + \sigma \xi (t)) ^ {T} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T} (X (t) + \sigma \xi (t)) \\ = C (X (t)) + \sigma^ {2} \left(I - \frac {1}{N} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T}\right) \\ + \frac {\sigma}{N} (X (t) ^ {T} \xi (t) + \xi (t) ^ {T} X (t)) \\ - \frac {\sigma^ {2}}{N ^ {2}} \xi (t) ^ {T} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T} \xi (t) \tag {72} \\ \end{array} +$$ + +Let's analyze each term: 1. $C(X(t))$ is the original covariance 2. $\sigma^2 (I - \frac{1}{N}\mathbf{1}_N\mathbf{1}_N^T)$ is positive semidefinite with rank $d - 1$ . 3. $\frac{\sigma}{N} (X(t)^T\xi (t) + \xi (t)^TX(t))$ is random with mean zero 4. The last term is of order $O(\sigma^2 /N)$ + +For any unit vector $v\in \mathbb{R}^d$ + +$$ +\begin{array}{l} v ^ {T} C (\tilde {X} (t)) v \geq v ^ {T} C (X (t)) v + \sigma^ {2} \left(1 - \frac {1}{N}\right) \\ + \frac {\sigma}{N} v ^ {T} (X (t) ^ {T} \xi (t) + \xi (t) ^ {T} X (t)) v \\ - \frac {\sigma^ {2}}{N ^ {2}} (v ^ {T} \xi (t) ^ {T} \mathbf {1} _ {N}) (\mathbf {1} _ {N} ^ {T} \xi (t) v) \tag {73} \\ \end{array} +$$ + +By the properties of Gaussian random matrices, with probability 1: + +$$ +\operatorname {r a n k} (\xi (t)) = \min (N, d) \tag {74} +$$ + +Therefore, $C(\tilde{X}(t))$ is full rank with probability 1. + +# (b) Rank Preservation Under Pruning: + +Let $P(t)$ be the pruning mask at layer $t$ . The pruned update can be written as: + +$$ +X (t + 1) = P (t) \odot f (X (t)) \tag {75} +$$ + +For the covariance difference: + +$$ +\begin{array}{l} \left\| C (X (t + 1)) - C (X (t)) \right\| _ {2} \\ = \left\| \frac {1}{N} X (t + 1) ^ {T} X (t + 1) - \frac {1}{N} X (t) ^ {T} X (t) \right. \\ - \frac {1}{N ^ {2}} (X (t + 1) ^ {T} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T} X (t + 1) - X (t) ^ {T} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T} X (t)) \| _ {2} \\ \leq \| P (t) \| _ {2} \lambda_ {\max } (C (X (t))) \tag {76} \\ \end{array} +$$ + +By Weyl's interlacing theorem: + +$$ +\left| \lambda_ {i} \left(C (X (t + 1))\right) - \lambda_ {i} (C (X (t))) \right| \leq \| P (t) \| _ {2} \lambda_ {\max } (C (X (t))) \tag {77} +$$ + +Therefore: + +$$ +\operatorname {r a n k} (C (X (t + 1))) \geq \operatorname {r a n k} (C (X (t))) - \kappa (t) \tag {78} +$$ + +where $\kappa (t)$ counts eigenvalues that could fall below $\epsilon (t)$ . + +# (c) Minimum Eigenvalue Bound: + +For the minimum eigenvalue, we use matrix concentration: + +$$ +\begin{array}{l} \lambda_ {\min } (C (t)) \geq \lambda_ {\min } (C (X (t))) + \sigma^ {2} \left(1 - \frac {1}{N}\right) \\ - \left\| \frac {\sigma}{N} (X (t) ^ {T} \xi (t) + \xi (t) ^ {T} X (t)) \right\| _ {2} \\ - \left\| \frac {\sigma^ {2}}{N ^ {2}} \xi (t) ^ {T} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T} \xi (t) \right\| _ {2} \tag {79} \\ \end{array} +$$ + +By sub-gaussian concentration inequalities: + +$$ +\left\| \frac {\sigma}{N} (X (t) ^ {T} \xi (t) + \xi (t) ^ {T} X (t)) \right\| _ {2} \leq O (\left\| X (t) \right\| _ {F} \sigma) \tag {80} +$$ + +And: + +$$ +\left\| \frac {\sigma^ {2}}{N ^ {2}} \xi (t) ^ {T} \mathbf {1} _ {N} \mathbf {1} _ {N} ^ {T} \xi (t) \right\| _ {2} \leq O \left(\frac {\sigma^ {2}}{N}\right) \tag {81} +$$ + +Therefore: + +$$ +\lambda_ {\min } (C (t)) \geq \sigma^ {2} \left(1 - \frac {1}{N}\right) - O \left(\| X (t) \| _ {F} \sigma\right) \tag {82} +$$ + +# (d) Rank Preservation Under Adaptive Threshold: + +The adaptive threshold $\tau(t)$ ensures that with high probability: + +$$ +\| P (t) \| _ {2} \leq \beta \sqrt {\frac {\log (d / \delta)}{N}} \tag {83} +$$ + +For $\beta \geq \sqrt{\frac{2\log(d / \delta)}{N}}$ , by union bound: + +$$ +\begin{array}{l} P (\operatorname {r a n k} (C (X (t + 1))) < \operatorname {r a n k} (C (X (t)))) \\ \leq P \left(\lambda_ {\min } \left(C (X (t + 1))\right) < \epsilon (t)\right) \\ \leq \delta \tag {84} \\ \end{array} +$$ + +This completes the proof that rank is preserved with probability at least $1 - \delta$ . + +# 7. Supplementary Section B: Experimental Section + +# 7.1. Experimental Setup + +Datasets We conduct our experiments on three real-world datasets and two synthetic datasets - + +- Cora Dataset (McCallum et al., 2000): The Cora citation network consists of 2,708 nodes and 5,429 edges. Each node represents a document, and each edge represents a citation link between two documents. The dataset is commonly used for semi-supervised node classification tasks. +- CiteSeer Dataset (Sen et al., 2008): The CiteSeer citation network consists of 3,327 nodes and 4,732 edges. Similar to Cora, each node represents a document, and the edges represent citation links. This dataset is also widely used for evaluating GNN performance. +- Cornell Dataset (University): The Cornell dataset is a small graph with 183 nodes and 295 edges. It is part of the WebKB network collection and is commonly used for node classification tasks. +- Synthetic Datasets (Syn_Products and Syn_Cora) (Zhu et al., 2020): To further test the advantages of DYNAMO-GAT, we use synthetic datasets. Syn_Products is designed to simulate product copurchasing networks, and Syn_Cora mimics citation networks. We vary the graph density and homophily levels to analyze the performance of different GNN models under controlled conditions. For space limitations, we give the syn_cora results in the appendix. + +Baselines We compare DYNAMO-GAT against several baseline models to assess its effectiveness: + +- GCN (Graph Convolutional Network) (Kipf & Welling, 2017): A widely used GNN model that applies graph convolutions to aggregate information from neighboring nodes. +- GAT (Graph Attention Network) (Velicković et al., 2018): A model that incorporates attention mechanisms to weigh the importance of neighboring nodes during message passing. +- G2GAT (Rusch et al., 2023a): A recent method that introduces gradient gating to prevent oversmoothing in attention-based GNNs. + +Evaluation Metrics We evaluate the performance of all models using the following metrics: + +- Accuracy: The classification accuracy on the test set. +- Oversmoothing Coefficient $(\mu)$ : A measure of the degree to which node representations become indistinguishable as network depth increases. +- GFLOPS: The computational efficiency, measured in Giga Floating Point Operations Per Second. +- Accuracy/GFLOPS: A ratio indicating the trade-off between accuracy and computational cost. + +# 7.2. Experiment 1: Real-World Dataset Evaluation + +Objective: This experiment aims to evaluate the effectiveness of DYNAMO-GAT in mitigating oversmoothing and maintaining high test accuracy across varying network depths on three real-world datasets: Citeseer, Cora, and Cornell. The performance of DYNAMO-GAT is compared with that of three baseline models: GCN, GAT, and G2GAT. + +# Methodology: + +# - Metrics: + +- Oversmoothing Coefficient $(\mu(X))$ : This metric quantifies the degree of oversmoothing, where lower values indicate greater oversmoothing. It is plotted on a logarithmic scale to better capture the dynamics across a wide range of values. +- Test Accuracy: This metric measures the classification accuracy of the models on the test set. The objective is to assess how well the models perform as the number of layers increases. + +# - Baselines: + +- GCN (Graph Convolutional Network): A standard graph neural network model that aggregates node features through graph convolutions. + +- GAT (Graph Attention Network): A GNN model that uses attention mechanisms to weigh the importance of neighboring nodes during aggregation. +- G2GAT: A recent model that introduces gradient gating to prevent oversmoothing in attention-based GNNs. + +# - Experimental Setup: + +- The number of layers is varied from 2 to 128 to observe how the models behave as the network depth increases. +- The training parameters are kept consistent across models for a fair comparison, including the use of the Adam optimizer and a fixed learning rate. + +# Results (Figure 'real_data'): + +# 1. Oversmoothing Coefficient $(\mu(X))$ : + +- Citeseer (Figure a): As the number of layers increases, GCN and GAT exhibit significant oversmoothing, with their oversmoothing coefficients rapidly decreasing. G2GAT mitigates this effect better than GCN and GAT, but still shows a decline. DYNAMO-GAT, however, maintains a consistent oversmoothing coefficient, effectively preventing oversmoothing across all layers. +- Cora (Figure b): Similar trends are observed, with GCN and GAT experiencing substantial oversmoothing as the number of layers increases. DYNAMO-GAT demonstrates its robustness by keeping the oversmoothing coefficient stable, while G2GAT also shows improved performance compared to GCN and GAT but not as strong as DYNAMO-GAT. +- Cornell (Figure c): Again, DYNAMO-GAT outperforms the other models in controlling oversmoothing, maintaining a stable coefficient across all layers. GCN and GAT display rapid declines, indicating severe oversmoothing. + +# 2. Test Accuracy: + +- CiteSeer (Figure a): GCN and GAT suffer from a significant drop in accuracy as the number of layers increases, correlating with their high levels of oversmoothing. DYNAMO-GAT maintains consistently high accuracy, even in deep networks, highlighting its effectiveness in mitigating oversmoothing. G2GAT also shows relatively stable accuracy but still declines with increasing layers. +- Cora (Figure b): Similar patterns are observed, with DYNAMO-GAT achieving the highest accuracy across all layers. GCN and GAT see their + +accuracy decline sharply as layers increase, while G2GAT performs better but still experiences a decrease. + +- Cornell (Figure c): DYNAMO-GAT once again demonstrates superior performance by maintaining high accuracy, while GCN and GAT show a considerable drop in accuracy as the number of layers increases. G2GAT performs better than GCN and GAT but still shows a downward trend in accuracy. + +Analysis: The results clearly demonstrate the superiority of DYNAMO-GAT in preventing oversmoothing and maintaining high test accuracy across deep network architectures. In contrast, GCN and GAT suffer from severe oversmoothing, leading to a significant decline in accuracy as the number of layers increases. G2GAT mitigates oversmoothing to some extent but is still not as effective as DYNAMO-GAT. This consistent performance across three different datasets underscores the robustness of DYNAMO-GAT in handling deep graph neural networks, making it a promising approach for tasks that require deep architectures. + +The effectiveness of DYNAMO-GAT can be attributed to its ability to preserve meaningful node representations even in deep networks, as evidenced by its stable oversmoothing coefficient and high accuracy. This experiment highlights the potential of DYNAMO-GAT to overcome one of the significant challenges in deep GNNs - oversmoothing - while delivering strong performance on real-world datasets. + +# 7.3. Experiment 2: Performance Comparison Table + +Objective: This experiment aims to compare the performance of DYNAMO-GAT with other baseline models (GCN, GAT, and G2GAT) in terms of accuracy, computational efficiency (GFLOPS), and the accuracy-to-GFLOPS ratio across three datasets: Cora, Citeseer, and Cornell. The goal is to highlight both the effectiveness and efficiency of DYNAMO-GAT, particularly in deeper network architectures. + +# Methodology: + +# - Metrics: + +- Best Accuracy: The highest classification accuracy achieved by each model on the test set. +- # Layers: The number of layers used by the model to achieve its best accuracy. +- GFLOPS: The computational cost measured in Giga Floating Point Operations Per Second, which provides an indication of the model's efficiency. +- Accuracy/GFLOPS: This metric represents the trade-off between accuracy and computa + +tional cost, indicating how efficiently the model achieves its performance. + +# - Comparison Setup: + +- The models were trained on the three datasets (Cora, Citeseer, Cornell), each with different graph structures and node/edge counts. +- GCN and GAT were tested with relatively shallow architectures, while G2GAT and DYNAMO-GAT were evaluated with deeper networks (128 layers). +- The results were compiled to highlight the efficiency of each model in terms of accuracy and GFLOPS. + +# Results (Table 1): + +# 1. Best Accuracy: + +DYNAMO-GAT achieves the best accuracy across all datasets, particularly excelling on the Cornell dataset with an accuracy of 62.56 +- G2GAT also performs well, particularly on Citeseer and Cornell, where it closely matches DYNAMO-GAT. +- GCN and GAT show lower performance compared to the deeper models, particularly on the more challenging Cornell dataset. + +# 2. # Layers: + +- GCN and GAT achieve their best accuracy with only 2-4 layers, indicating their limitations in deeper architectures due to oversmoothing. +- In contrast, G2GAT and DYNAMO-GAT are able to sustain performance across 128 layers, highlighting their robustness in deeper networks. + +# 3. GFLOPS: + +DYNAMO-GAT exhibits lower GFLOPS compared to GAT and G2GAT, indicating that it is computationally more efficient. +- For example, on the Cora dataset, DYNAMOGAT uses 0.605 GFLOPS, which is significantly lower than GAT's 2.351 GFLOPS. + +# 4. Accuracy/GFLOPS: + +- DYNAMO-GAT consistently outperforms other models in the accuracy-to-GFLOPS ratio, demonstrating its superior efficiency. +- For instance, on the Cora dataset, DYNAMOGAT achieves an Accuracy/GFLOPS ratio of 137.53, which is the highest among all models, indicating that it provides the best trade-off between accuracy and computational cost. + +- Similarly, on the Citeseer and Cornell datasets, DYNAMO-GAT achieves the highest ratios, with 48.96 and 1226.67, respectively, far surpassing the other models. + +Analysis: The results highlight the advantages of DYNAMO-GAT in both accuracy and efficiency. Despite using deep architectures (128 layers), DYNAMO-GAT manages to maintain high accuracy while keeping computational costs low. This is particularly evident when comparing the Accuracy/GFLOPS ratio, where DYNAMO-GAT significantly outperforms GCN, GAT, and even G2GAT. This indicates that DYNAMO-GAT is not only effective in mitigating oversmoothing but also highly efficient in terms of resource usage, making it a superior choice for applications that require deep graph neural networks with limited computational resources. + +# 7.4. Experiment 3: Synthetic Dataset Evaluation + +Objective: The goal of this experiment is to assess the performance of DYNAMO-GAT under controlled synthetic conditions. Specifically, we vary the graph density (average node degree) and homophily to observe how different models handle oversmoothing and accuracy in these environments. + +# Results: + +# 1. Oversmoothing vs. Layers (Figure a): + +- Observation: The figure shows the oversmoothing coefficient $\mu(X)$ on a logarithmic scale as the number of layers increases, with an average node degree of 68.75. +- Key Result: As the network depth increases, DYNAMO-GAT shows the least amount of oversmoothing, maintaining higher $\mu(X)$ values compared to G2GAT, GCN, and GAT. GAT and GCN exhibit rapid oversmoothing, with $\mu(X)$ decreasing significantly as layers increase. +- Implication: This result demonstrates that DYNAMO-GAT is more robust to oversmoothing, especially in dense graphs. This suggests that it can preserve meaningful node features better than the other models as the network depth increases. + +# 2. Accuracy vs. Layers (Figure b): + +- Observation: This plot shows accuracy as a function of the number of layers for the same dense graph (average node degree = 68.75). +- Key Result: DYNAMO-GAT consistently achieves the highest accuracy across all layers. + +While G2GAT performs well, its accuracy decreases slightly with deeper layers. GCN and GAT see a sharp decline in accuracy as the network depth increases. + +- Implication: The stability of DYNAMO-GAT in maintaining high accuracy, even with a large number of layers, indicates its effectiveness in managing deeper architectures without suffering from oversmoothing, unlike the other models. + +# 3. Accuracy vs. Homophily (Sparse Graph - Figure c): + +- Observation: This plot examines accuracy across varying homophily levels (from 0 to 1) for a sparse graph with an average node degree of 11.93. +Key Result: DYNAMO-GAT and G2GAT outperform GCN and GAT across all homophily levels. DYNAMO-GAT achieves particularly strong performance as homophily increases, indicating its ability to leverage node similarity effectively. +- Implication: This suggests that DYNAMO-GAT is versatile and can adapt well to different homophily settings, making it suitable for graphs with varying levels of node similarity. + +# 4. Accuracy vs. Homophily (Dense Graph - Figure d): + +- Observation: Similar to Figure c, but for a dense graph with an average node degree of 68.75. +- Key Result: DYNAMO-GAT significantly outperforms all other models, especially in lowhomophily settings. As homophily increases, DYNAMO-GAT maintains its lead, showcasing its robustness across all homophily levels. +- Implication: This result highlights DYNAMOGAT's strength in dense graphs, where it can handle more complex interactions and still maintain high accuracy. Its performance in low-homophily conditions also suggests it is well-suited for graphs with more heterophilic structures. + +Analysis: The synthetic dataset results confirm that DYNAMO-GAT excels in both dense and sparse graphs, effectively handling oversmoothing and maintaining high accuracy across varying network depths and homophily levels. Its ability to outperform other models, particularly in dense graphs and low-homophily settings, underscores its robustness and versatility. These findings demonstrate that DYNAMO-GAT is a powerful tool for tackling oversmoothing while delivering strong performance in diverse graph structures, making it ideal for complex real-world applications. + +Table 5. Pruning Statistics and Cosine Similarity Analysis. DYNAMO-GAT prunes a significant portion of edges. Crucially, edges connecting nodes with lower feature similarity (lower cosine similarity) are preferentially pruned, empirically supporting our approach to mitigating oversmoothing. + +
DatasetPruning Ratio (%)Cosine Sim. (Retained)Cosine Sim. (Pruned)
Cora18.30.810.52
Citeseer15.70.78 ]0.48
+ +Table 6. Hyperparameter Sensitivity Analysis on Cora. + +
Noise Level σThreshold βAccuracy (%)
0.010.582.9
0.051.083.5
0.12.083.2
+ +# 7.5. Analysis of Pruning Ratios and Feature Similarity + +To provide further insight into the structural impact of DYNAMO-GAT's pruning mechanism, we analyzed the pruning ratio (percentage of edges removed) and the cosine similarity of node features for both retained and pruned edges on the Cora and Citeseer datasets. The cosine similarity was calculated between the final layer node embeddings of connected nodes just before pruning decisions. + +As shown in Table ??, DYNAMO-GAT prunes a significant portion of edges (18.3% on Cora, 15.7% on Citeseer). More importantly, the average cosine similarity for pruned edges is considerably lower than for retained edges (e.g., 0.52 vs. 0.81 on Cora). This empirically validates our theoretical insight: DYNAMO-GAT preferentially prunes edges connecting nodes with lower feature similarity (and thus likely contributing more to noise/homogenization than meaningful signal), thereby preserving structural information crucial for preventing oversmoothing. + +# 7.6. Hyperparameter Sensitivity + +DYNAMO-GAT introduces two primary hyperparameters: the noise level $(\sigma)$ and the pruning threshold adaptation parameter $(\beta)$ . We conducted experiments to assess the model's sensitivity to these parameters. As shown in Table 6, DYNAMO-GAT demonstrates robust performance across a reasonable range of values for both $\sigma$ and $\beta$ . The accuracy remains stable within $\pm 0.6\%$ , indicating that our method is not overly sensitive to hyperparameter choices and simplifies the tuning process for practical deployment. + +# 7.7. Generalizability to Other Attention-Based GNNs + +While the main experiments focused on GAT, we posited that the core DYNAMO mechanism is attention-agnostic and applicable to other attention-based GNNs. To support this, we applied DYNAMO-GAT's pruning strategy + +to Graphormer and SAN on the Cora and Citeseer datasets. The results (Table 7) show improvements in both accuracy and OS coefficient, along with a reduction in GFLOPS, demonstrating the potential generalizability of our approach. + +# 7.8. Results and Discussion + +The experimental results across both real-world and synthetic datasets consistently demonstrate the effectiveness of DYNAMO-GAT in addressing the oversmoothing problem in deep graph neural networks (GNNs). + +From the real-world datasets (Figure 2), we observe that DYNAMO-GAT maintains a stable oversmoothing coefficient $(\mu(X))$ across varying network depths, outperforming GCN, GAT, and G2GAT, which exhibit significant oversmoothing as the number of layers increases. Correspondingly, DYNAMO-GAT consistently achieves the highest accuracy across all layers, whereas GCN and GAT suffer a sharp decline in accuracy due to oversmoothing, and G2GAT shows moderate performance. + +The performance comparison table (Table 1) further highlights the efficiency of DYNAMO-GAT. It achieves the best accuracy across all datasets while maintaining lower GFLOPS compared to GAT and G2GAT. The high accuracy-to-GFLOPS ratio underscores DYNAMO-GAT's superior trade-off between computational cost and performance, making it the most efficient model among the tested baselines. + +In the synthetic dataset experiments (Figure 3), DYNAMOGAT again demonstrates its robustness. It shows the least oversmoothing in dense graphs (Figure 3a) and maintains the highest accuracy across layers (Figure 3b). When varying homophily, DYNAMOGAT excels in both sparse (Figure 3c) and dense (Figure 3d) graphs, particularly in lowhomophily settings, showcasing its adaptability to different graph structures. + +The results show a clear trend where models generally perform better as the average degree increases. This is particularly evident in higher homophily settings, where the additional connections help to reinforce the graph structure, leading to more accurate node classification. For instance, in the syn-products dataset, the accuracy of GCN improves from 0.567 to 0.762 as the average degree increases from 11.93 to 36.14 at a homophily level of 0.4. + +Table 7. Applying DYNAMO Pruning to Graphormer and SAN. + +
ModelDatasetAcc. (%)OS Coeff.GFLOPS
Graphormer (base)Cora83.920.512.1
DYNAMO-GraphormerCora85.130.641.41
SAN (base)Citeseer80.230.472.35
DYNAMO-SANCiteseer81.740.591.52
+ +Interestingly, models like G2GAT and DYNAMO-GAT, which incorporate additional mechanisms for graph processing, consistently outperform simpler models such as GCN and GAT, particularly in low homophily settings. This suggests that these models are better able to leverage the graph structure even when the nodes are less similar to their neighbors. + +These findings have significant implications for the development and deployment of GNNs in real-world applications. The ability of DYNAMO-GAT to maintain high accuracy while mitigating oversmoothing, especially in deep architectures, addresses a critical challenge faced by many existing GNN models. Its superior efficiency, as evidenced by the accuracy-to-GFLOPS ratio, makes it a viable option for resource-constrained environments where both performance and computational cost are important considerations. + +Moreover, DYNAMO-GAT's strong performance across varying graph densities and homophily levels suggests that it is well-suited for a wide range of graph structures, from sparse networks with high node similarity to dense, heterophilic graphs. This versatility makes DYNAMO-GAT an attractive solution for complex graph-based tasks in domains such as social network analysis, recommendation systems, and biological network modeling. \ No newline at end of file diff --git a/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/images.zip b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..389275995970df7acf3c8a922cec4ca89d22f41d --- /dev/null +++ b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e90dcaaa7ce326e279e38a89a986a6060fe9140cb4ed5b6845e457702bc8aa01 +size 1764106 diff --git a/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/layout.json b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..50ce57207b52a5122703c1919698e7e2f1f3d22e --- /dev/null +++ b/adynamicalsystemsinspiredpruningstrategyforaddressingoversmoothingingraphattentionnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4a3a0ad6cabd93a46ee5df920bba241f686591522eff3998a9c9a91e71f16e0 +size 1477936 diff --git a/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/5ba0ad45-0b51-436a-bef5-30f32fcaef67_content_list.json b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/5ba0ad45-0b51-436a-bef5-30f32fcaef67_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7bb2afe7f91bbeeaca4b08c3975a4f15c898dd01 --- /dev/null +++ b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/5ba0ad45-0b51-436a-bef5-30f32fcaef67_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79a8c461af3feca9624eea6733792eeab46a9e02b318a3f055e5df579bfe5db1 +size 190272 diff --git a/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/5ba0ad45-0b51-436a-bef5-30f32fcaef67_model.json b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/5ba0ad45-0b51-436a-bef5-30f32fcaef67_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2d427554eac8a5b46eddb82f39f135813bf10aec --- /dev/null +++ b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/5ba0ad45-0b51-436a-bef5-30f32fcaef67_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23dfda27edb9dbf4ba41d8545bf671c8a7e38e7231b1e0683af8aeda1e5080ce +size 241817 diff --git a/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/5ba0ad45-0b51-436a-bef5-30f32fcaef67_origin.pdf b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/5ba0ad45-0b51-436a-bef5-30f32fcaef67_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cf2ed42ae30749b933a1cdd2ee31e2bcb3bff4c1 --- /dev/null +++ b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/5ba0ad45-0b51-436a-bef5-30f32fcaef67_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:984026cab1737ab3255b79f88bd8eb1b41cdd69d98012dd1f51fbd57b23d7bf8 +size 14262597 diff --git a/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/full.md b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..48a41a7d3b9515cb13a06f6f36bc74005c674b5e --- /dev/null +++ b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/full.md @@ -0,0 +1,992 @@ +# A First-order Generative Bilevel Optimization Framework for Diffusion Models + +Quan Xiao† 12 Hui Yuan³ A F M Saif¹ Gaowen Liu⁴ Ramana Kompella⁴ Mengdi Wang³ Tianyi Chen† 12 + +# Abstract + +Diffusion models, which iteratively denoise data samples to synthesize high-quality outputs, have achieved empirical success across domains. However, optimizing these models for downstream tasks often involves nested bilevel structures, such as tuning hyperparameters for fine-tuning tasks or noise schedules in training dynamics, where traditional bilevel methods fail due to the infinite-dimensional probability space and prohibitive sampling costs. We formalize this challenge as a generative bilevel optimization problem and address two key scenarios: (1) fine-tuning pre-trained models via an inference-only lower-level solver paired with a sample-efficient gradient estimator for the upper level, and (2) training diffusion model from scratch with noise schedule optimization by reparameterizing the lower-level problem and designing a computationally tractable gradient estimator. Our first-order bilevel framework overcomes the incompatibility of conventional bilevel methods with diffusion processes, offering theoretical grounding and computational practicality. Experiments demonstrate that our method outperforms existing fine-tuning and hyperparameter search baselines. Our code has been released at https://github.com/afmsaif/bilevel_diffusion. + +# 1. Introduction + +Bilevel optimization, which involves nested problems where a lower-level optimization is constrained by the solution of + +$^{\dagger}$ This work was done when the authors were at Rensselaer Polytechnic Institute. $^{1}$ Department of Electrical, Computer, and Systems Engineering, Rensselaer Polytechnic Institute, Troy, NY $^{2}$ Department of Electrical and Computer Engineering, Cornell Tech, Cornell University, New York, NY $^{3}$ Department of Electrical and Computer Engineering, Princeton University, NJ $^{4}$ Cisco Research. Correspondence to: Quan Xiao , Tianyi Chen . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +an upper-level objective, has evolved from its theoretical origins in the 1970s (Bracken & McGill, 1973) into a cornerstone of modern machine learning. Its ability to model hierarchical dependencies makes it ideal for complex learning tasks, such as hyperparameter tuning (Pedregosa, 2016), meta-learning (Finn et al., 2017), reinforcement learning (Stadie et al., 2020; Shen et al., 2024), adversarial training (Zhang et al., 2022), neural architecture search (Liu et al., 2019) and LLM alignment (Zakarias et al., 2024; Shen et al., 2025a; Gong et al., 2022; Qin et al., 2024). + +Meanwhile, the diffusion model has achieved remarkable success across various domains, particularly in image (Croitoru et al., 2023; Ho et al., 2020; Song et al., 2021a,b), audio (Yang et al., 2023; Liu et al., 2023a), and biological sequence generation (Jing et al., 2022; Wu et al., 2022). Yet, optimizing these models for downstream tasks often introduces nested objectives: for instance, fine-tuning pre-trained models to maximize task-specific rewards (e.g., aesthetic quality (Yang et al., 2024)) risks reward over-optimization, where generated samples become unrealistic despite high scores. To mitigate this, incorporating an auxiliary objective can balance the optimization process and prevent excessive focus on a single metric; see Section 3.1. Similarly, designing noise schedules for the forward/reverse processes (Chen, 2023) requires balancing sample quality against computational cost - a problem inherently requiring coordination between training dynamics (lower-level) and scheduler parameters (upper-level); see Section 3.2. An overview of the bilevel generative problem is shown in Figure 1. All of the above illustrate the need for developing bilevel algorithms that are friendly to diffusion models. However, applying existing bilevel methods to diffusion models - which operate in infinite-dimensional probability spaces and require costly sampling steps—poses unique challenges. Traditional gradient-based bilevel approaches (Franceschi et al., 2017; Maclaurin et al., 2015) rely on exact lower-level solutions and dense gradient backpropagation, both infeasible for diffusion processes where generating a single sample can involve hundreds of neural network evaluations. + +In this paper, we focus on designing computationally efficient and diffusion-friendly approaches for the following problem that we call the generative bilevel problem: + +$$ +\min _ {x \in \mathcal {X}, y \in \mathcal {P}} f (x, y), \quad \text {s . t .} \quad y \in \mathcal {S} (x) = \underset {y \in \mathcal {P}} {\arg \min } g (x, y) \tag {1} +$$ + +![](images/34d9c7d9dad2ab8298174249a6a1f646cd794b08b41d1ce5914b1c30ccd2ec6f.jpg) +Figure 1. An overview of bilevel generative optimization problems. (Left) Fine-tuning diffusion model with entropy regularization strength parameter $\lambda$ . (Right) Noise parameter $q_{t}$ scheduling problem in the diffusion model. + +![](images/3dd85ee4e5620f46590f91ef40498b643997cab95c2eaaf0907ae873b2daf033.jpg) + +where $x$ is some hyperparameter in the diffusion model and $y$ represents a distribution we aim to learn, which can be either an image distribution or a noise distribution. Both the upper-level $f:\mathbb{R}^{d_x}\times \mathcal{P}\to \mathbb{R}$ and lower-level objective functions $g:\mathbb{R}^{d_x}\times \mathcal{P}\rightarrow \mathbb{R}$ are continuously differentiable, $\mathcal{X}\subset \mathbb{R}^d$ is a closed set, and $\mathcal{P}$ is the probability space. We study the optimistic setting where we select the best response distribution $y\in S(x)$ to minimize the upper-level loss. Let us denote the minimal lower-level objective value as the value function $g^{*}(x) = \min_{y\in S(x)}g(x,y)$ and the nested objective as $F(x) = \min_{y\in S(x)}f(x,y)$ . + +The key challenges of solving the generative bilevel problem (1) are threefold. First, the lower-level variable $y$ is typically a distribution that operates in infinite dimensional probability space. However, direct access to or optimization over distribution is not feasible; we only have access to samples, and estimating distributions from samples is highly sample-inefficient. Therefore, the gradient over the distribution is inaccessible, making traditional gradient-based bilevel approaches (Shen et al., 2025b; Kwon et al., 2023; Ji et al., 2021; Chen et al., 2021; Hong et al., 2023; Ghadimi & Wang, 2018) generally inapplicable. Second, the objectives $f(x,y)$ and $g(x,y)$ are usually some measures of the sample quality and might not have an explicit form in terms of the hyperparameter $x$ , so that $\nabla_x f(x,y)$ and $\nabla_x g(x,y)$ are either not explicitly given or requires sample efficient approximation. Third, for fine-tuning the diffusion model, existing literature related to bilevel fine-tuning on diffusion model (Clark et al., 2024; Marion et al., 2024) requires backpropagations over the pre-trained model, which often suffers from high computational and memory costs. In contrast, we design an inference-only bilevel method for this task. + +To address these challenges, we classify generative bilevel problems into two categories: (1) those with a pre-trained model, where the target lower-level distribution is the image distribution (e.g., fine-tuning diffusion models), and (2) those without a pre-trained model, where the target lower-level distribution is the noise distribution in the forward process (e.g., noise scheduling during diffusion model train- + +ing); see an overview in Figure 1. Two applications we considered are essentially bilevel hyperparameter optimization. To the best of our knowledge, this is the first study to explore bilevel hyperparameter optimization in the context of diffusion models. We develop a first-order bilevel framework in both categories to solve (1). The primary differences with non-generative bilevel methods are: + +D1) for fine-tuning diffusion models that include a pretrained model, we adopt guidance-based approaches rather than gradient-based methods for the lower-level and penalty problems concerning distribution $y$ , ensuring the process is training-free and inference-only; +D2) for the noise scheduling problem without a pre-trained model, we optimize a noise proxy parameterized by a score neural network, rather than performing noise distribution matching directly in the lower-level problem of (1); and, +D3) we design scalable methods to estimate $\nabla_{x}f(x,y)$ and $\nabla_{x}g(x,y)$ for two specific applications, i.e. leveraging the closed form of them and proposing sample-efficient estimation for the fine-tuned diffusion model, and using zeroth-order method to estimate $\nabla_{x}f(x,y)$ in noise scheduling problem without a pre-trained diffusion model. + +# 2. Bilevel Optimization and Diffusion Models + +In this section, we will review some preliminaries on bilevel optimization, diffusion models, and guided generation, as well as two motivating applications of studying diffusion models in bilevel optimization. + +# 2.1. Bilevel optimization + +An efficient approach to solving bilevel optimization in (1) is to reformulate (1) to its single-level penalty problem (Shen et al., 2025b; Kwon et al., 2024), given by + +$$ +\min _ {x \in \mathcal {X}, y \in \mathcal {P}} \mathcal {L} _ {\gamma} (x, y) := f (x, y) + \gamma (g (x, y) - g ^ {*} (x)) \tag {2} +$$ + +and then optimize the upper-level and lower-level variables jointly. By setting the penalty constant $\gamma = \mathcal{O}(\epsilon^{-0.5})$ in + +versely proportional to the target accuracy $\epsilon$ , the single-level problem (2) is an $\mathcal{O}(\epsilon)$ approximate problem to the original bilevel problem (1). This method builds upon equilibrium backpropagation (Scellier & Bengio, 2017; Zucchet & Sacramento, 2022), which introduced a similar framework for strongly convex lower-level problems. However, recent works extend the study to accommodate some nonconvex lower-level problems and lay the foundation for broader applications (Shen et al., 2025b; Kwon et al., 2024). + +Gradient-based bilevel approaches. In the context of diffusion models, the upper-level and lower-level variables, $x$ and $y$ , usually have different meanings. To facilitate algorithm design tailored to diffusion models, we decompose (2) into separate $y$ - and $x$ -optimization problems, that is + +$$ +\min _ {x \in \mathcal {X}} \mathcal {L} _ {\gamma} ^ {*} (x), \quad \text {w i t h} \quad \mathcal {L} _ {\gamma} ^ {*} (x) = \min _ {y \in \mathcal {S} _ {\gamma} (x)} \mathcal {L} _ {\gamma} (x, y) +$$ + +$$ +\text {a n d} \mathcal {S} _ {\gamma} (x) := \underset {y \in \mathcal {P}} {\arg \min } \mathcal {L} _ {\gamma} (x, y). \tag {3} +$$ + +Under some mild conditions specified in (Kwon et al., 2024), $\mathcal{L}_{\gamma}^{*}(x)$ is differentiable with the gradient given by + +$$ +\nabla \mathcal {L} _ {\gamma} ^ {*} (x) = \nabla_ {x} f (x, z ^ {*}) + \gamma (\nabla_ {x} g (x, z ^ {*}) - \nabla_ {x} g (x, y ^ {*})) \tag {4} +$$ + +where $z^{*} \in S_{\gamma}^{*}(x)$ in (3) and $y^{*} \in S(x)$ in (1) are any solutions. Moreover, $\nabla \mathcal{L}_{\gamma}^{*}(x)$ is a proxy of the original gradient, with the error bounded by $\| \nabla \mathcal{L}_{\gamma}^{*}(x) - \nabla F(x) \| \leq \mathcal{O}(1 / \gamma)$ ; see details in Section B. Therefore, when the lower-level problem $g(x, y)$ and the penalty problem $\mathcal{L}_{\gamma}(x, y)$ are solvable with solutions $y^{*}, z^{*}$ , we can approximate $\nabla F(x)$ and update the upper-level variable $x$ . + +# 2.2. Diffusion models + +The goal of diffusion models (Song et al., 2021b; Ho et al., 2020; Song et al., 2021a) is to generate samples that match the some target distribution. This is achieved through two complementary stochastic differential equations (SDEs): a forward process, which gradually transforms input data into random noise, and a backward process, which reconstructs the data by denoising the noise. Central to this framework is the learning of a score function, which captures the gradient of the log-likelihood of the data distribution and is invariant to the input. This score function, learned during the forward process, is then used to guide the reverse sampling process. Below, we provide a brief overview of these processes. + +Forward process. The forward process of a diffusion model gradually transforms the original data $U_0 \in \mathbb{R}^D$ into pure noise by incrementally adding noise $\mathrm{d}W_t$ . This transformation simplifies complex data distributions into a tractable form, enabling efficient modeling and sampling. The following SDE formally describes the process: + +$$ +\mathrm {d} U _ {t} = - \frac {1}{2} q (t) U _ {t} \mathrm {d} t + \sqrt {q (t)} \mathrm {d} W _ {t}, \quad \text {f o r} q (t) > 0 \tag {5} +$$ + +where the initial $U_{0}$ is a random variable drawn from the data distribution $p_{\mathrm{data}}$ , $\{W_t\}_{t \geq 0}$ denotes the standard Wiener process, $q(t)$ is a nondecreasing noise scheduling function, and $U_{t}$ represents the noise-corrupted data distribution at time $t$ . Under mild conditions and for a sufficiently large timestep $T$ , (5) transforms the original distribution $p_{\mathrm{data}}$ into a distribution close to Gaussian random noise $\mathcal{N}(0, \mathbf{I}_D)$ . + +Backward process. Given the forward process in (5), the reverse-time SDE is defined by + +$$ +\begin{array}{l} \mathrm {d} \widetilde {U} _ {t} = \left[ - \frac {1}{2} q (t) \widetilde {U} _ {t} - q (t) \nabla \log p _ {t} (\widetilde {U} _ {t}) \right] \mathrm {d} t \\ + \sqrt {q (t)} \mathrm {d} \widetilde {W _ {t}}, \quad \text {f o r} t \in (0, T ], \tag {6} \\ \end{array} +$$ + +where $\mathrm{d}\widetilde{W}_t$ is the reverse-time Wiener process, $p_t(\cdot)$ is the marginal distribution of $U_{t}$ in the forward process. Let $u_{t}$ denote the realization of a random variable $U_{t}$ and $s(u,t)\coloneqq \nabla \log p_t(u)$ is the score function that has to be estimated in practice or given by the pre-trained model. + +Score matching loss. To estimate the score function $s(u, t)$ , we train a parameterized score network $s_{\theta}(u, t)$ by tracking the gradient of the log-likelihood of probability from the forward process, which eliminates the need for distribution normalization. Specifically, we minimize the following score-matching loss (Song et al., 2021b): + +$$ +\begin{array}{l} \min _ {\theta} \operatorname {L} _ {\mathrm {S M}} (\theta , u) \\ := \mathbb {E} _ {t, u _ {0} \sim p _ {\mathrm {d a t a}}, u _ {t} | u _ {0}} \left[ \| \nabla \log p _ {t} (u _ {t} | u _ {0}) - s _ {\theta} (u _ {t}, t) \| ^ {2} \right] \tag {7} \\ \end{array} +$$ + +where $t$ is uniformly sampled over the interval $[0,T]$ , and $p_t(u_t|u_0)$ is the conditional distribution of $u_{t}$ over the initial image $u_{0}$ . Typically, the score network $s_\theta (u,t)$ is parametrized by a U-Net model (Ronneberger et al., 2015). + +Guided generation for optimization. By leveraging the estimated score function $s_{\theta}(u, T - t)$ from (7) to replace $\nabla \log p_{T - t}(u)$ , samples can be generated through the backward process (6). Furthermore, we can introduce guidance terms into the backward process to steer the generation toward the desired reward $V = v$ . Using the conditional score function, the goal is to estimate the conditional distribution $\mathbb{P}(U|V = v)$ . By Bayes' rule, we have $\nabla_{u_t} \log p_t(u_t \mid v) = \nabla \log p_t(u_t) + \nabla_{u_t} \log p_t(v \mid u_t)$ . Given the pre-trained score $s_{\theta}(u, t) \approx \nabla \log p_t(u_t)$ for the unconditional forward process, and the guidance term $G \approx \nabla_{u_t} \log p_t(v \mid u_t)$ , the backward SDE is defined by + +$$ +\begin{array}{l} \mathrm {d} \widetilde {U} _ {t} = \left[ - \frac {1}{2} q (t) \widetilde {U} _ {t} - q (t) s _ {\theta} (\widetilde {U} _ {t}, t) + G (\widetilde {U} _ {t}, t) \right] \mathrm {d} t \\ + \sqrt {q (t)} \mathrm {d} \widetilde {W _ {t}}, t \in (0, T ]. \tag {8} \\ \end{array} +$$ + +With a proper guidance term and an increasing reward value $v$ , the guided sampling process in (8) generates samples that + +maximize the given reward function $r(\cdot)$ with an entropy regularization to the pre-trained distribution (Guo et al., 2024; Uehara et al., 2024). The design of the guidance term and the complete procedure of guided generation are outlined in Algorithm 5 and can be found in Appendix E. + +# 3. Applications of Generative Bilevel Problems + +In this section, we introduce two bilevel optimization problems in diffusion models: one in the fine-tuning stage with a pre-trained model, and another in the pre-training stage. + +# 3.1. Reward fine-tuning in diffusion models + +![](images/cf43ef4ddccb319757e23597a7244838ff153ccd8557723dce08e9acf87de4b9.jpg) +(a) $\lambda = 0.01$ + +![](images/7df52b08b9ca8137f9104d74ba3979c9939dbae3d7b90420f1e2d527e58d9116.jpg) +(b) $\lambda = 55.5$ + +![](images/aa8e6a08037d717ddf027b520c641ea052a439474ebf1446286661e466a56841.jpg) +(c) $\lambda = 0.01$ + +![](images/948895ae935f630f11a46ba5e2b0e0487f45dcfce9e4a9c4657b26779666ee46.jpg) +(d) $\lambda = 44.3$ + +Figure 2. Visualization of generated images: (a) Horse and (c) elephant generated with $\lambda = 0.01$ , leading to reward over-optimization and resulting in more abstract images misaligned with captions. In contrast, (b) horse and (d) elephant, generated using the bilevel method with $\lambda$ optimized via CLIP score. This suggests CLIP score is a proper metrics for $\lambda$ selection. More visualizations are shown in Figure 8 and can be found in Appendix. + +In practice, fine-tuning a pre-trained diffusion model is often necessary to generate samples that achieve high reward. However, if the model over-focuses on reward maximization, it may generate overly aggressive samples that diverge from realistic distributions (Gao et al., 2023). Therefore, a well-tuned model must carefully balance reward optimization with adherence to the pre-trained data distribution. This balance can be formulated as a bilevel optimization problem: + +$$ +\min _ {\lambda \in \mathbb {R} _ {+}, p \in \mathcal {S} (\lambda)} f (\lambda , p) := - \mathbb {E} _ {u \sim p} \left[ r _ {1} (u) \right] \tag {9} +$$ + +$$ +\text{s.t.}\mathcal{S}(\lambda) = \operatorname *{arg min}_{p^{\prime}\in \mathcal{P}}\underbrace{-\mathbb{E}_{u\sim p^{\prime}}[r_{2}(u)] + \lambda\mathrm{KL}(p^{\prime}\| p_{\mathrm{data}})}_{g(\lambda ,p):=} +$$ + +where the lower level adjusts data distribution by optimizing an entropy regularized reward learning problem (Uehara et al., 2024; Fan et al., 2024), and the upper level selects the best-response entropy strength $\lambda$ by another realistic-measured reward. As shown in Figure 2, the upper-level reward $r_1(\cdot)$ can be caption alignment score (CLIP), further refining the generated samples to align with the provided captions. Since the pre-trained diffusion model is available, $p_{\mathrm{data}}$ is measured by the pre-trained score $s_\theta(u,t)$ . + +# 3.2. Noise scheduling in diffusion models + +Tuning the noise magnitude $q(t)$ in the forward and backward processes is essential for generating high-quality im + +ages with diffusion models. Instead of relying on cross-validation, bilevel optimization can automatically learn an effective noise scheduler, enabling the model to learn useful features while efficiently transforming inputs into noise. In this application, bilevel problem (10) optimizes the noise scheduler in the upper level to minimize a quality score, while the lower level learns the noise distribution from the forward process to match the true Gaussian noise. Instead of framing the lower-level problem as a distribution matching task, we optimize the distribution's parameter $\theta$ as follows. + +$$ +\min _ {q \geq 0, \theta \in \mathcal {S} (q)} f (q, \theta) := \mathbb {E} _ {\tilde {u} (q) \sim p _ {\theta}} [ \mathrm {L} _ {\mathrm {S Q}} (\tilde {u} (q)) ], +$$ + +$$ +\text {s . t .} \quad \mathcal {S} (q) = \underset {\theta^ {\prime} \in \mathbb {R} ^ {d}} {\arg \min } g (q, \theta) := \mathrm {L} _ {\mathrm {S M}} \left(\theta^ {\prime}, u (q)\right) \tag {10} +$$ + +where $p_{\theta}$ is the probability distribution generated by the backward SDE (6) associated with parameter $\theta$ in the score network, $u(q)$ collects samples in the forward pass from $[0,T]$ defined by schedule $q$ , $\mathrm{L}_{\mathrm{SM}}(\cdot)$ is the score matching loss defined in (7), and $\mathrm{L}_{\mathrm{SQ}}(\cdot)$ measures the scheduling quality. For a given schedule $q = \{q(t)\}_{t=1}^{T}$ , at the lower-level, we generate samples $\{u_t\}_{t=1}^T$ according to $q$ and optimize the score network $\theta$ to predict a good proxy of $\nabla \log p_t(u_t)$ . Then, at the upper level, we automatically tune the scheduling parameter $q$ by sampling from the reverse process with probability parameterized by $\theta$ and evaluating the quality of the generated samples by $\mathrm{L}_{\mathrm{SQ}}(\cdot)$ . Typical choice of $\mathrm{L}_{\mathrm{SQ}}(\cdot)$ can be Fréchet Inception Distance (FID) score, a commonly used metric to measure the quality of the generated image, and is differentiable; see details in Appendix E.3. + +# 4. Diffusion-friendly Bilevel Methods + +In this section, we first present the meta-algorithm for the generative bilevel problem (1), followed by tailored subroutines for two specific applications in Section 3. + +A meta bilevel algorithm. To solve the generative bilevel problem (1), we can compute the gradient $\nabla \mathcal{L}_{\gamma}^{*}(x)$ according to (4), where the solutions $z^{*}\in S_{\gamma}^{*}(x)$ and $y^{*}\in S(x)$ can be approximated using numerical oracles (e.g., gradient descent or Adam (Kingma, 2015)). Specifically, at each iteration $k$ , we first solve the $y$ -problem over $\mathcal{L}_{\gamma}(x^k,y)$ and $g(x^{k},y)$ to obtain near-optimal solutions $y^{k}\approx y^{*}$ and $z^{k}\approx z^{*}$ . We then perform gradient descent updates for the $x$ -problem according to (4) with $y^{k}$ and $z^{k}$ . The procedure is detailed in Algorithm 1. + +# 4.1. Strategy with pre-trained diffusion models + +We first focus on algorithms to guide the generated data distribution of the pre-trained diffusion model toward the optimal solution of (9) in the application of reward finetuning diffusion model, with a pre-trained score network. + +Guided-sampling from the lower-level variable. For + +a given $\lambda$ , we want to solve two optimization problems $\min_p g(\lambda, p)$ and $\min_p \mathcal{L}_{\gamma}(\lambda, p)$ . For single-level optimization, the distribution generated by the guided backward sampling in Algorithm 5 converges to the optimal distribution for maximizing the reward function $r$ with an entropy regularization term to ensure the generated samples remain close to the pre-training data (Guo et al., 2024). This suggests Algorithm 5 can be used to solve the lower-level problem and penalty problem with respect to $p$ . The guidance terms added in the backward sampling process for the lower-level and penalty problems, are defined as + +$$ +G _ {\text {l o w e r}} (t, u, \lambda) = G \left(u _ {t}, t; r _ {2}\right) / \lambda \tag {11a} +$$ + +$$ +G _ {\text {p e n a l t y}} (t, u, \lambda) = G \left(u _ {t}, t; r _ {1} / \gamma + r _ {2}\right) / \lambda \tag {11b} +$$ + +where $\mathrm{G}(u_t, t; r)$ is defined in (32). Then Algorithm 5 is able to generate samples that are approximately from the optimal lower-level and penalty distribution. + +Gradient update for the upper-level $\lambda$ . By substituting the definition of the objective function into (4), we obtain + +$$ +\nabla \mathcal {L} _ {\gamma} ^ {*} (\lambda) = \gamma \left(\mathrm {K L} \left(p _ {\gamma} ^ {*} (\lambda) \| p _ {\text {d a t a}}\right) - \mathrm {K L} \left(p ^ {*} (\lambda) \| p _ {\text {d a t a}}\right)\right) \tag {12} +$$ + +where $p_{\gamma}^{*}(\lambda) \in \arg \min_{p} \mathcal{L}_{\gamma}(\lambda, p)$ and $p^{*}(\lambda) \in \arg \min_{p} g(\lambda, p)$ . Following the gradient-based bilevel method (Kwon et al., 2023; Shen et al., 2025b), a direct way to estimate $\nabla \mathcal{L}_{\gamma}^{*}(\lambda)$ is to use guided backward sampling in Algorithm 5 with (11a) and (11b) to obtain samples from $p^{*}(\lambda)$ and $p_{\gamma}^{*}(\lambda)$ , and then compute the KL divergence from samples using kernel-based probability estimation. However, it has two drawbacks: 1) each $\lambda$ update requires guided backward sampling, which is computationally expensive; and 2) when the number of samples is less than the dimensionality of the data, the covariance matrix becomes rank-deficient, which makes kernel-based density estimation impossible. + +To address these issues, by leveraging the marginal density induced by the SDE, we can derive a closed-form expression for the upper-level gradient in terms of samples. + +Proposition 1. The gradient in (12) takes the form + +$$ +\begin{array}{l} \nabla \mathcal {L} _ {\gamma} ^ {*} (\lambda) = - \mathbb {E} _ {u \sim p _ {d a t a}} \left[ \lambda^ {- 1} r _ {1} (u) \right] - \gamma \log \mathbb {E} _ {u \sim p _ {d a t a}} \left[ e ^ {\frac {r _ {2} (u)}{\lambda}} \right] \\ + \gamma \log \mathbb {E} _ {u \sim p _ {\text {d a t a}}} \left[ e ^ {\frac {r _ {1} (u) / \gamma + r _ {2} (u)}{\lambda}} \right]. \tag {13} \\ \end{array} +$$ + +Remark 1. This proposition enables us to estimate $\nabla \mathcal{L}_{\gamma}^{*}(\lambda)$ directly from the pre-trained distribution, eliminating the need for guided backward sampling in Algorithm 5 to compute $p^*(\lambda)$ and $p_{\gamma}^{*}(\lambda)$ for each $\lambda$ and thus, significantly reducing computational cost. The proof is in Appendix D.1. + +Based on Proposition 1, the upper-level gradient in (13) can be estimated via the Monte Carlo method. In other words, + +# Algorithm 1 A meta generative bilevel algorithm + +1: Inputs: Initialization $x_0, y_0, z_0$ ; target error $\epsilon_k$ ; step-sizes $\eta_k$ ; penalty constant $\gamma_k$ +2: for $k = 0,1,\ldots ,K - 1$ do +3: estimate $y_{k} = \arg \min_{y\in \mathcal{P}}g(x^{k},y)$ with $\epsilon_{k}$ error. +4: estimate $z_{k} = \arg \min_{z\in \mathcal{P}}\mathcal{L}_{\gamma_{k}}(x^{k},z)$ with $\epsilon_{k}$ error +5: estimate $\nabla \mathcal{L}_{\gamma}^{*}(x_{k})$ with $y^{k}\approx y^{*}$ and $z^k\approx z^*$ in (4) +6: update $x_{k + 1} = \mathrm{Proj}_{\mathcal{X}}(x_k - \eta_k\bar{\nabla}\mathcal{L}_\gamma^* (x_k))$ +7: end for +8: outputs: $(x_{K},z_{K})$ + +# Algorithm 2 Bilevel approach with pre-trained model + +1: Input: Pre-trained score network $s_{\theta}(\cdot, \cdot)$ , differentiable reward $r_1(\cdot), r_2(\cdot)$ , stepsizes $\eta_k$ , penalty constant $\gamma_k$ . +2: sample $\{\tilde{u}_m\}_{m = 1}^{M_0}$ from reverse SDE (6) using $s_\theta$ +3: for $k = 0,1,\ldots ,K - 1$ do +4: estimate $\nabla \mathcal{L}_{\gamma_k}^* (\lambda_k)$ by (33) +5: update $\lambda_{k + 1} = \mathrm{Proj}_{\mathbb{R}_+}\left(\lambda_k - \eta_k\overline{\nabla}\mathcal{L}_{\gamma_k}^* (\lambda_k)\right)$ +6: end for +7: sample $\{u_{K,m}^{z}\}_{m = 1}^{M}$ from Algorithm 5 using $(s_{\theta},\frac{r_1}{\gamma_K} +$ $r_2,G_{\mathrm{penalty}}^k (\cdot ,\cdot ,\lambda_K))$ in (11b) +8: Output: $(\lambda_{K},\{u_{K,m}^{z}\}_{m = 1}^{M})$ + +with samples $\{\tilde{u}_m\}_{m=1}^{M_0} \sim p_{\mathrm{data}}$ , it is estimated by empirical mean with detailed form deferred to Appendix E.2. + +The full procedure is summarized in Algorithm 2. + +# 4.2. Strategy without pre-trained diffusion models + +We next design a bilevel algorithm to solve (10) in the application of noise scheduling for training diffusion models. + +Lower-level problem solver. When $q$ is given, the samples from the forward process $u(q)$ are determined. Then optimizing the score matching objective $\mathrm{L}_{\mathrm{SM}}(\cdot)$ on the score network gives the optimal lower-level solution, i.e. optimal weights of the score network $\theta \in \arg \min_{\theta} \mathrm{L}_{\mathrm{SM}}(\theta, u(q))$ . + +Penalty problem solver with respect to $\theta$ . Gradient-based approaches on the penalty function $\mathcal{L}_{\gamma}(q,\theta)$ are effective in solving the penalty problem over $\theta$ . The gradient of $\mathcal{L}_{\gamma}(q,\theta)$ with respect to $\theta$ takes the form of + +$$ +\nabla_ {\theta} \mathcal {L} _ {\gamma} (q, \theta) = \nabla_ {\theta} \mathbb {E} _ {\tilde {u} (q) \sim p _ {\theta}} [ \mathrm {L S Q} (\tilde {u} (q)) ] + \gamma \nabla_ {\theta} \mathrm {L S M} (\theta , u (q)) +$$ + +where the second term can be directly calculated by differentiating the score-matching loss over $\theta$ , and the first term can be estimated by the mean of gradients over a batch of samples $\{\tilde{u}_{\theta,q}^{m}\}_{m=1}^{M}$ generated by the backward process (6). Although it is possible to obtain the gradient of $\nabla_{\theta}\mathrm{L}_{\mathrm{SQ}}(\tilde{u}_{\theta,q}^{m})$ using PyTorch's auto-differentiation, it requires differentiating through the backward sampling trajectory. Since backward sampling involves 50-100 steps, even for effi + +cient methods like the Denoising Diffusion Implicit Model (DDIM), auto-differentiation is memory-intensive. Instead, we estimate $\nabla_{\theta}\mathrm{L}_{\mathrm{SQ}}(\tilde{u}_{\theta ,q}^{m})$ by zeroth-order (ZO) approximation (Nesterov & Spokoiny, 2017; Shamir, 2017) + +$$ +\tilde {\nabla} _ {\theta} \mathrm {L} _ {\mathrm {S Q}} \left(\tilde {u} _ {\theta , q} ^ {m}\right) = \frac {\xi}{2 \nu} \left(\mathrm {L} _ {\mathrm {S Q}} \left(\tilde {u} _ {\theta + \nu \xi , q} ^ {m}\right) - \mathrm {L} _ {\mathrm {S Q}} \left(\tilde {u} _ {\theta - \nu \xi , q} ^ {m}\right)\right) \tag {14} +$$ + +where $\nu > 0$ is the perturbation amount and $\xi \sim \mathcal{N}(0, I_d)$ is randomly drawn from standard Gaussian distribution. At each round, (14) executes two backward processes to get the query of $\mathrm{L}_{\mathrm{SQ}}(\cdot)$ with two perturbation $\theta + \nu \xi$ and $\theta - \nu \xi$ . + +Gradient for the upper-level scheduler $q$ . According to (4), $\nabla \mathcal{L}_{\gamma}^{*}(q)$ takes the following form + +$$ +\begin{array}{l} \nabla \mathcal {L} _ {\gamma} ^ {*} (q) = \nabla_ {q} \mathbb {E} _ {\tilde {u} (q) \sim p _ {\theta_ {z} ^ {*}}} [ \mathrm {L} _ {\mathrm {S Q}} (\tilde {u} (q)) ] \\ + \gamma (\nabla_ {q} \mathrm {L} _ {\mathrm {S M}} (\theta_ {z} ^ {*}, u (q)) - \nabla_ {q} \mathrm {L} _ {\mathrm {S M}} (\theta_ {y} ^ {*}, u (q))) \\ \end{array} +$$ + +where $\theta_y^* \in \arg \min_{\theta} g(\theta, q)$ and $\theta_z^* \in \arg \min_{\theta} \mathcal{L}_\gamma(\theta, q)$ are given by the lower-level and penalty problem solver. For $\nabla_q \mathrm{L}_{\mathrm{SM}}(\theta, u(q))$ , according to the chain rule, we have + +$$ +\nabla_ {q} \mathrm {L} _ {\mathrm {S M}} (\theta , u (q)) = \frac {\partial u (q)}{\partial q} \nabla_ {u} \mathrm {L} _ {\mathrm {S M}} (\theta , u (q)). \tag {15} +$$ + +Since the score matching loss for popular choices of diffusion models has explicit dependency on the generated noisy samples $u_{t}$ in the forward process and $u_{t}$ has one-step closed form with respect to the initial sample, $\nabla_q\mathrm{L}_{\mathrm{SM}}(\theta ,u(q))$ has closed form for popular choices of diffusion model; see details in Appendix D.2. For $\nabla_q\mathbb{E}_{\tilde{u} (q)\sim p_\theta}\left[\mathrm{L}_{\mathrm{SQ}}(\tilde{u} (q))\right]$ whose explicit expression is not available, we can use similar ZO approaches in (14) with perturbation on noise scheduler $q$ to get the gradient estimator. + +Parametrization for noise scheduler. To further reduce the memory cost and ensure the nondecreasing of $q(t)$ , we parameterize the noise scheduler by the commonly used cosine and sigmoid function (Nichol & Dhariwal, 2021; Chen, 2023; Kingma et al., 2021) and optimize the parameters within these functions instead of directly optimizing $\{q(t)\}_{t=1}^{T}$ . In both parametrization, we optimize just 4 scalar parameters, significantly reducing the dimensionality of the optimization from $T$ to 4. Specifically, we use + +$$ +l (t) = \cos \left[ \frac {\left(t \left(q _ {e} - q _ {s}\right) + q _ {s}\right) / T + q _ {\epsilon}}{1 + q _ {\epsilon}} \times \frac {\pi}{2} \right] ^ {2 q _ {\tau}} \tag {16} +$$ + +where $q_{s}, q_{e}, q_{\epsilon}, q_{\tau}$ represent the start, end, offset error, and power effect, respectively. Sigmoid parameterization is defined similarly in (34) and can be found in Appendix F.2. Since $q(t)$ should be nondecreasing, we assign $q(t) = 1 - l(t) / l(t - 1)$ . After parameterization, ZO perturbation will be added on $q_{s}, q_{e}, q_{\epsilon}, q_{\tau}$ instead of directly on $q(t)$ . + +The full procedure is summarized in Algorithm 6 and can be found in Appendix E. + +# 5. Theoretical Guarantee + +In this section, we quantify the theoretical benefits of the bilevel algorithms in both applications. We make the following assumption, which is standard in bilevel optimization literature (Kwon et al., 2023; Ji et al., 2021; Chen et al., 2021; Franceschi et al., 2018; Hong et al., 2023). + +Assumption 1. The objective $g(x, \cdot)$ is $\mu_g$ -strongly convex, $f(x, y)$ and $g(x, y)$ are jointly smooth over $(x, y)$ with constant $\ell_{f,1}$ and $\ell_{g,1}$ for all $x \in \mathcal{X}$ and $y \in \mathcal{P}$ . Moreover, $f(x, \cdot)$ is $\ell_{f,0}$ Lipschitz continuous and $g(x, y)$ has $\ell_{g,2}$ Lipschitz Hessian jointly with respect to $(x, y)$ . + +We will justify the validity of this assumption in two generative bilevel applications in Section 3 after we prove the hyperparameter improvement theorem below. + +Theorem 1. Under Assumption 1, given any initial hyperparameter $x_0$ , letting the inner loop accuracy $\epsilon_k \leq \frac{B}{\gamma_k^2}$ , then there exists stepsize $\eta_k \leq \frac{1}{L_F}$ and penalty constant $\gamma_k$ such that the next updates $x_{k+1}$ generated by Algorithm 1 satisfy + +$$ +F (x _ {k + 1}) - F (x _ {k}) \leq - \frac {\eta_ {k}}{4} \| G _ {\eta_ {k}, \gamma_ {k}} (x _ {k}) \| ^ {2} + \frac {6 B ^ {2} \eta_ {k}}{\gamma_ {k} ^ {2}} +$$ + +where $G_{\eta ,\gamma}(x) = \frac{\mathrm{Proj}_{\mathcal{X}}(x - \eta\bar{\nabla}\mathcal{L}_{\gamma}^{*}(x)) - x}{\eta}$ is the projected gradient and $L_{F},B = \mathcal{O}(1)$ are defined in Lemma 1. + +This theorem demonstrates that when $G_{\eta_k,\gamma_k}(x_k) \neq 0$ , and setting penalty constant $\gamma_k \geq \frac{4\sqrt{3}B}{\|G_{\eta_k,\gamma_k}(x_k)\|}$ , the bilevel algorithm will have strict descent over the hyper-function $F(x)$ . Otherwise, since $\| \bar{\nabla}\mathcal{L}_{\gamma}^{*}(x) - \nabla F(x)\| = \mathcal{O}(1 / \gamma_k)$ , $G_{\eta_k,\gamma_k}(x_k) = 0$ is approximately the stationary points of $F(x)$ . The proof can be found in Appendix D.3. + +Implications on generative bilevel applications. For fine-tuning diffusion models, the KL divergence with respect to a probability distribution $p$ is strongly convex if $p$ is strongly log-concave (Vempala & Wibisono, 2019). This condition is usually met in diffusion models (Song et al., 2021a; Ho et al., 2020), as they generate Gaussian distribution with positive definite covariance matrices. Therefore, when reward function is concave (Guo et al., 2024), Assumption 1 holds. In this application, $\epsilon_{k} = 0$ since the upper-level gradient estimator does not depend on the inner loop accuracy; see (13). For noise scheduling problem, score matching loss is a composite quadratic function with respect to the noise network (see (24)), which can be viewed as a strongly convex function over the parameterized probability (functional) space (Petrulionyte et al., 2024), so that Assumption 1 holds. In this application, the upper-level gradient estimation error includes an additional term dependent on the error of the ZO estimator, which can be made sufficiently small by appropriately choosing perturbation amount $\nu$ . + +Therefore, Theorem 1 applies to both settings, indicating that, regardless of initialization - whether from a random + +
BaselinesFID ↓CLIP ↑Time ↓
Grid search125.77 ±1.331.72 ±2.13.34
Random search123.70 ±4.335.70 ±1.13.37
Bayesian search140.35 ±2.433.29 ±2.912.7
Weighted sum116.52 ±3.936.50 ±1.14.31
Bilevel method102.82 ±3.539.54 ±2.23.35
+ +Table 1. Best FID and CLIP score given by different baselines and our method with penalty constant $\gamma = 10^{3}$ for fine-tuning diffusion model application using synthetic lower-level reward (Yuan et al., 2024). Running time is measured in hours. + +![](images/950f00d2c28d1b69425d3fca28a2a7957337cbdad0f58e76777bd37a1addd626.jpg) +Figure 3. Visualization of images generated at different steps: (a) Images generated with $\lambda = 0.1$ become progressively more abstract at each step, while (b) images generated with bilevel method ( $\lambda = 55.5$ ) are more colorful and vivid than the pre-trained images and achieve a perfect balance of quality across steps. + +point or selected through cross-validation - the distribution generated using the hyperparameter $x_{k}$ of bilevel algorithms is guaranteed to perform better. For fine-tuning diffusion models, the bilevel algorithm generates images with higher CLIP scores, while the bilevel noise scheduling algorithm produces images with lower FID scores. + +# 6. Numerical Experiments + +In this section, we present the experimental results of the proposed bilevel-diffusion algorithms in two applications: reward fine-tuning and noise scheduling for diffusion models, and compare them with baseline hyperparameter optimization methods: grid search, random search, and Bayesian search (Snoek et al., 2012). + +# 6.1. Reward fine-tuning in diffusion models + +For this experiment, we use the StableDiffusion V1.5 model as our pre-trained model and employ a ResNet-18 architecture (trained on the ImageNet dataset) as the synthetic (lower-level) reward model, following (Yuan et al., 2024), to enhance colorfulness and vibrancy. To enable scalar reward outputs, we replace the final prediction layer of ResNet-18 with a randomly initialized linear layer. + +We evaluate bilevel reward fine-tuning Algorithm 5 on the image generation task with complex prompts (Wang et al., 2023; 2024; Clark et al., 2023), comparing it to gradient guidance generation approach in (Guo et al., 2024) combined with conventional hyperparameter search methods for tuning $\lambda$ . Inspired by Figure 2, we use CLIP score as the upper-level loss to automatically tune $\lambda$ in a bilevel algorithm. To rule out the impact of the additive effect on the upper-level loss and lower-level reward, we also compare our approach with the weighted sum method, which naively combines the CLIP score and lower-level reward $r_2(\cdot)$ , with weight selected by grid search. A detailed description of the baselines is provided in the Appendix F.2. + +Table 1 presents the average FID, CLIP score, and execution time for each method over prompts. The bilevel method outperformed traditional hyperparameter tuning methods, achieving superior FID and CLIP scores. Its comparable time complexity arises from requiring backpropagation through the CLIP score, unlike standard methods. For the weighted sum method, which also involves backpropagation through the CLIP score, the bilevel method is faster. Moreover, the bilevel method achieved an $11.76\%$ improvement in the FID score and an $8.32\%$ improvement in the CLIP score over the best-performing weighted sum method. + +Figure 3 shows the generated images over generation iteration in Algorithm 5 using $\lambda = 0.1$ and the $\lambda$ optimized by the bilevel approach. The results demonstrate that the entropy strength selected by the bilevel approach achieves a better balance between image quality and realism. Figure 4 shows the optimization process of $\lambda$ , revealing that the optimal value of $\lambda$ varies across different prompts. + +![](images/5fba96264ffd0915ca7fd32cff56894e6014c0b0e329af8c298c7166f60f76c4.jpg) +Figure 4. Change of $\lambda$ over iteration given by bilevel approach for different prompts. + +More visualizations are provided in Figures 9-11 and can be found in Appendix, which visually illustrate the impact of over-aggressive reward optimization, which tends to generate more abstract images (e.g., as observed in the results from grid search and Bayesian search methods). + +Furthermore, to showcase the robustness of our approach with respect to different reward functions at the lower level, + +
BaselinesFID ↓CLIP ↑Time ↓
Grid search142.76 ±2.436.3 ±1.73.34
Random search139.21 ±3.135.20 ±3.13.37
Bayesian search153.25 ±1.234.98 ±2.912.7
Weighted sum140.56 ±1.335.40 ±2.14.31
Bilevel method137.23 ±1.737.10 ±3.23.35
+ +Table 2. Best FID and CLIP score given by different baselines and our method with penalty constant $\gamma = 10^{3}$ for fine-tuning diffusion model application using HPSv2 (Wu et al., 2023) as the lower-level reward. Running time is measured in hours. + +we test the performance of each method for benchmarking reward function, HPSv2 (Wu et al., 2023), as the lower-level reward function. Comparisons of our method and different baselines are given in Table 2. Similar to the results given by the synthetic reward function (Yuan et al., 2024), bilevel approach also outperform other baselines in terms of image quality in comparable time complexity. We also provided the visualization of the generated images in Figure 5. While all HPO on fine-tuned models enhance the aesthetic, clarity and sharpness compared to the pre-trained image, the random, grid, Bayesian search, and weighted sum approaches messed up the legs and trunk, and fail to generate the right number of elephant's legs. In comparison, our proposed bilevel approach not only generate colorful images, but also preserve correct elephant biological feature. + +![](images/7a22ff7409864fbeeb8542e6252c875ca05e47c72c73d1e012c70db11b2f93b2.jpg) +Pre-trained + +![](images/5b01e2dc0863202b209f8f3996bf7fe5b63359f26c62777ffab43360413ea06a.jpg) +Random + +![](images/04bf31907bf6d3c5532e9cbf0614de251eb687ce533dcd0e3a90f6bc41afe91f.jpg) +Grid + +![](images/23b724c9fe274bfb001444befcb2c718716a38108fab86604dd8f90ff1477536.jpg) +Bayesian + +![](images/eed01a556f709332d4fae27dd653fd2efdd19bf34954d236d4bf914af1ffe2e5.jpg) +Weighted sum +Figure 5. Visualization of images generated by different methods using the prompt "elephant" and HPSv2 reward (Wu et al., 2023). + +![](images/2a7c5441dd0121ccc8dc65c7f6b277e05d0dbe5203df48f9f293f54334ddaeca.jpg) +Bilevel + +# 6.2. Noise scheduling in diffusion models + +We evaluated our bilevel noise scheduling method, detailed in Algorithm 6, paired with DDIM backward sampling for the image generation on the MNIST dataset. We trained a U-Net with 178 layers and $10^{6}+$ parameters following the github repository1. We considered both cosine and sigmoid parametrization and tuned 4 parameters $q_{s}, q_{e}, q_{\tau}, q_{\epsilon}$ jointly. + +We compare our method to DDIM combined with baseline hyperparameter optimization methods. We chose greedy grid search over standard grid search as the baseline, as the latter is computationally intensive for searching across multiple hyperparameters. In greedy grid search, we sequentially optimize parameters based on sensitivity, fixing each optimized parameter before tuning the next. Additional experimental setup can be found in Appendix F.2. + +Bilevel noise scheduling algorithm in Algorithm 6 alternates between optimizing the weights $\theta$ in U-Net and finding the best noise scheduler $q(t)$ online, so that is computationally efficient and outperforms fixed noise schedulers. Figure 6 shows the learned hyperparameter $q_{s}, q_{e}, q_{\tau}, q_{\epsilon}$ by bilevel optimization versus iteration $k$ and the corresponding $q(t)$ at four timesteps. We observe the parameters are nontrivial: $q_{\tau}$ is the most influential factor, varying significantly throughout the training process; start $q_{s}$ and end $q_{e}$ update inversely and are utilized more extensively at the beginning of training; and $q_{\epsilon}$ increases progressively over the course of training. These parameters determine the noise scheduler $q(t)$ , which introduces more noise at the beginning and the latter middle stages of training step $k$ . + +![](images/d3f35009aeaa4ad35c87deb7016aa2b9106ed0c0741282f2688ffdb7f84a8282.jpg) +Figure 6. Varying hyperparameters start $q_{s}$ , end $q_{e}$ , power $q_{\tau}$ and offset $q_{\epsilon}$ in cosine parameterization learned by bilevel method along the training steps and corresponding noise scheduler $q(t)$ at iteration $k = 0, 100, 300, 469$ . + +![](images/3989d4c32289844b0b5f2624a5b5f98b84b8d8a02ea7afcf4994fafcc64c098f.jpg) + +Table 3 presents the best FID, inception score (IS), and time complexity achieved by each method. The bilevel method achieves comparable performance with the hyperparameter optimization baselines in both FID and IS while being $6 \times$ time faster. Generated images by each method are shown in Figure 7. While the Bayesian approach achieves relatively better FID and IS, it tends to focus on generating simpler numbers, such as 1 and 7. In contrast, the images produced by the bilevel method show excellent diversity across numbers 0 - 9 while maintaining image fidelity. + +# 7. Related works + +Fine-tuning diffusion models. Fine-tuning diffusion models aims to adapt pre-trained models to boost the reward on downstream tasks. Methods in this domain include directly backpropagating the reward (Clark et al., 2024), RL-based fine-tuning (Fan et al., 2024; Black et al., 2023), direct latent optimization (Tang et al., 2024; Wallace et al., 2023; Hoogeboom et al., 2023), guidance-based approach (Guo + +
MethodsCosineSigmoid
FID ↓IS ↑Time ↓FID ↓IS ↑Time ↓
Grid search67.301.7631.5365.311.7639.12
Random search68.971.6129.6266.021.6935.94
Bayesian search67.161.6926.8565.171.6529.13
DDIM (default)105.271.431.5985.791.541.78
Bilevel method65.411.783.8865.161.793.94
+ +Table 3. Comparison of FID, IS, and running time (in hours) for different baselines and our method for the noise scheduling application with cosine and sigmoid parameterization. Default DDIM parameters are from (Nichol & Dhariwal, 2021) for cosine and (Vidhya, 2024) for sigmoid parameterization. + +et al., 2024; Chung et al., 2022; Bansal et al., 2023) and optimal control (Uehara et al., 2024). Although entropy regularization is often incorporated into the reward to prevent over-optimization, no existing work has explored designing an efficient bilevel method to tune its strength. + +Noise scheduling in diffusion models. Noise schedule is crucial to balance the computational efficiency with data fidelity during image generation. Early works, such as DDPM (Ho et al., 2020), employed simple linear schedules for noise variance, while Nichol & Dhariwal (2021) and Kingma et al. (2021) introduced cosine and sigmoid schedules to enhance performance. Recent studies (Lin et al., 2024; Chen, 2023) have highlighted limitations in traditional noise schedules and proposed new parameterization to improve the image quality. Notably, Sahoo et al. (2024) learned the noise scheduler by optimizing the log-likelihood, which yields a tighter lower bound (ELBO) and thus improves the generation quality of the diffusion model. However, none of the prior works considered using bilevel optimization to automatically learn the noise schedule for directly optimizing sample quality. + +Bilevel hyperparameter optimization. Bilevel optimization has been explored as an efficient hyperparameter optimization framework, including hypernetwork search (Mackay et al., 2019; Liu et al., 2019), hyper-representation (Franceschi et al., 2018), regularization learning (Shaban et al., 2019) and data reweighting (Shaban et al., 2019; Franceschi et al., 2017). Recently, it has been explored in federated learning (Tarzanagh et al., 2022) and LLM finetuning (Shen et al., 2025a; Zakarias et al., 2024). None of the existing works have explored hyperparameter optimization in diffusion models, and the methods proposed so far are inapplicable due to the infinite-dimensional probability space and the high computational cost of sampling. + +# 8. Conclusions + +In this paper, we analyze two types of generative bilevel hyperparameter optimization problems in diffusion models: fine-tuning a diffusion model (with a pre-trained model) and + +![](images/81dd93a1cb4c355d5062c4e0950801737286cbe2ab740f78fbd62b4c029cbacb.jpg) +(a) Bilevel + +![](images/064978726f158ede9435fcc75d0689b3ffbf33c95c9808cc199374344f9f8427.jpg) +(b) DDIM (default) + +![](images/bc0747b037d035dc25ba545f903a291440bd63a35deec5f367faed80c159169f.jpg) +(c) Bayesian +Figure 7. Visualization of the final generated images by different methods using cosine parameterization. + +noise scheduling for training a diffusion model from scratch. For fine-tuning, we propose an inference-only bilevel approach to guide the diffusion model toward the target distribution and leverage the closed-form of KL divergence to update the entropy strength. For training from scratch, we optimize the parameters of the noise distribution to match the true noise and use zeroth-order optimization to determine the optimal noise scheduler for generating high-quality images in the backward process "on the fly." Experiments demonstrate the effectiveness of the proposed method. + +# Acknowledgment + +The work of Q. Xiao and T. Chen was supported by National Science Foundation (NSF) MoDL-SCALE project 2401297, NSF project 2412486, and the Cisco Research Award. + +# Impact Statement + +This paper aims to advance diffusion models with bilevel generative optimization, providing a novel approach to hyperparameter tuning for improved image generation. By addressing key challenges in fine-tuning diffusion model and noise scheduling, our work contributes to the broader development of more efficient and adaptive generative models. Potential societal impacts include applications in creative content generation, data augmentation, and machine learning-based simulations. While we acknowledge the possibility of unintended uses, we do not identify any specific societal risks that need to be highlighted in this context. + +# References + +Arbel, M. and Mairal, J. Amortized implicit differentiation for stochastic bilevel optimization. In Proc. International Conference on Learning Representations, virtual, 2022. +Bansal, A., Chu, H.-M., Schwarzschild, A., Sengupta, S., Goldblum, M., Geiping, J., and Goldstein, T. Universal guidance for diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 843-852, 2023. +Black, K., Janner, M., Du, Y., Kostrikov, I., and Levine, S. + +Training diffusion models with reinforcement learning. arXiv preprint arXiv:2305.13301, 2023. +Bracken, J. and McGill, J. T. Mathematical programs with optimization problems in the constraints. Operations Research, 21(1):37-44, 1973. +Chen, L., Xu, J., and Zhang, J. On finding small hypergradients in bilevel optimization: Hardness results and improved analysis. In The Thirty Seventh Annual Conference on Learning Theory, pp. 947-980. PMLR, 2024. +Chen, T. On the importance of noise scheduling for diffusion models. arXiv preprint arXiv:2301.10972, 2023. +Chen, T., Sun, Y., and Yin, W. Closing the gap: Tighter analysis of alternating stochastic gradient methods for bilevel problems. In Proc. Advances in Neural Information Processing Systems, virtual, 2021. +Chung, H., Kim, J., Mccann, M. T., Klasky, M. L., and Ye, J. C. Diffusion posterior sampling for general noisy inverse problems. arXiv preprint arXiv:2209.14687, 2022. +Clark, K., Vicol, P., Swersky, K., and Fleet, D. J. Directly fine-tuning diffusion models on differentiable rewards. arXiv preprint arXiv:2309.17400, 2023. +Clark, K., Vicol, P., Swersky, K., and Fleet, D. J. Directly fine-tuning diffusion models on differentiable rewards. In Proc. International Conference on Learning Representations, Vienna, Austria, 2024. +Croitoru, F.-A., Hondru, V., Ionescu, R. T., and Shah, M. Diffusion models in vision: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45 (9):10850-10869, 2023. +Denker, A., Vargas, F., Padhy, S., Didi, K., Mathis, S. V., Barbano, R., Dutordoir, V., Mathieu, E., Komorowska, U. J., and Lio, P. Deft: Efficient fine-tuning of diffusion models by learning the generalised $h$ -transform. In Proc. Advances in Neural Information Processing Systems, Vancouver, BC, Canada, 2024. +Fan, Y., Watkins, O., Du, Y., Liu, H., Ryu, M., Boutilier, C., Abbeel, P., Ghavamzadeh, M., Lee, K., and Lee, K. Reinforcement learning for fine-tuning text-to-image diffusion models. In Proc. Advances in Neural Information Processing Systems, Vancouver, BC, Canada, 2024. +Finn, C., Abbeel, P., and Levine, S. Model-agnostic meta-learning for fast adaptation of deep networks. In Proc. International Conference on Machine Learning, Sydney, Australia, 2017. +Franceschi, L., Donini, M., Frasconi, P., and Pontil, M. Forward and reverse gradient-based hyperparameter optimization. In Proc. International Conference on Machine Learning, Sydney, Australia, 2017. + +Franceschi, L., Frasconi, P., Salzo, S., Grazzi, R., and Pontil, M. Bilevel programming for hyperparameter optimization and meta-learning. In Proc. International Conference on Machine Learning, Stockholm, Sweden, 2018. +Gao, L., Schulman, J., and Hilton, J. Scaling laws for reward model overoptimization. In Proc. International Conference on Machine Learning, pp. 10835-10866, Honolulu, HI, 2023. +Ghadimi, S. and Wang, M. Approximation methods for bilevel programming. arXiv preprint arXiv:1802.02246, 2018. +Gong, S., Zhang, S., Yang, J., Dai, D., and Schiele, B. Bi-level alignment for cross-domain crowd counting. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, 2022. +Grazzi, R., Franceschi, L., Pontil, M., and Salzo, S. On the iteration complexity of hypergradient computation. In Proc. International Conference on Machine Learning, virtual, 2020. +Guo, Y., Yuan, H., Yang, Y., Chen, M., and Wang, M. Gradient guidance for diffusion models: An optimization perspective. arXiv preprint arXiv:2404.14743, 2024. +Ho, J., Jain, A., and Abbeel, P. Denoising diffusion probabilistic models. In Proc. Advances in Neural Information Processing Systems, virtual, 2020. +Ho, J., Sahara, C., Chan, W., Fleet, D. J., Norouzi, M., and Salimans, T. Cascaded diffusion models for high fidelity image generation. Journal of Machine Learning Research, 23(47):1-33, 2022. +Hong, M., Wai, H.-T., Wang, Z., and Yang, Z. A two-timescale stochastic algorithm framework for bilevel optimization: Complexity analysis and application to actor-critic. SIAM Journal on Optimization, 33(1):147-180, 2023. +Hoogeboom, E., Heek, J., and Salimans, T. simple diffusion: End-to-end diffusion for high resolution images. In Proc. International Conference on Machine Learning, Honolulu, HI, 2023. +Ji, K., Yang, J., and Liang, Y. Bilevel optimization: Convergence analysis and enhanced design. In Proc. International Conference on Machine Learning, virtual, 2021. +Jiang, L., Xiao, Q., Tenorio, V. M., Real-Rojas, F., Marques, A. G., and Chen, T. A primal-dual-assisted penalty approach to bilevel optimization with coupled constraints. In Proc. Advances in Neural Information Processing Systems, Vancouver, BC, Canada, 2024. + +Jing, B., Corso, G., Chang, J., Barzilay, R., and Jaakkola, T. Torsional diffusion for molecular conformer generation. In Proc. Advances in Neural Information Processing Systems, New Orleans, LA, 2022. +Karras, T., Aittala, M., Aila, T., and Laine, S. Elucidating the design space of diffusion-based generative models. In Proc. Advances in Neural Information Processing Systems, New Orleans, LA, 2022. +Khanduri, P., Zeng, S., Hong, M., Wai, H.-T., Wang, Z., and Yang, Z. A near-optimal algorithm for stochastic bilevel optimization via double-momentum. In Proc. Advances in Neural Information Processing Systems, virtual, 2021. +Kingma, D., Salimans, T., Poole, B., and Ho, J. Variational diffusion models. In Proc. Advances in Neural Information Processing Systems, virtual, 2021. +Kingma, D. P. Adam: A method for stochastic optimization. In Proc. International Conference on Learning Representations, 2015. +Kwon, J., Kwon, D., Wright, S., and Nowak, R. D. A fully first-order method for stochastic bilevel optimization. In Proc. International Conference on Machine Learning, Honolulu, HI, 2023. +Kwon, J., Kwon, D., Wright, S., and Nowak, R. On penalty methods for nonconvex bilevel optimization and first-order stochastic approximation. In Proc. International Conference on Learning Representations, Vienna, Austria, 2024. +Li, J., Gu, B., and Huang, H. A fully single loop algorithm for bilevel optimization without hessian inverse. In Proc. Association for the Advancement of Artificial Intelligence, virtual, 2022. +Lin, S., Liu, B., Li, J., and Yang, X. Common diffusion noise schedules and sample steps are flawed. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pp. 5404-5411, 2024. +Liu, B., Ye, M., Wright, S., Stone, P., et al. Bome! bilevel optimization made easy: A simple first-order approach. In Proc. Advances in Neural Information Processing Systems, New Orleans, LA, 2022. +Liu, H., Simonyan, K., and Yang, Y. DARTS: Differentiable architecture search. In Proc. International Conference on Learning Representations, New Orleans, LA, 2019. +Liu, H., Chen, Z., Yuan, Y., Mei, X., Liu, X., Mandic, D., Wang, W., and Plumbley, M. D. Audioldm: Text-to-audio generation with latent diffusion models. In Proc. International Conference on Machine Learning, pp. 21450-21474, Honolulu, HI, 2023a. + +Liu, R., Liu, Y., Yao, W., Zeng, S., and Zhang, J. Averaged method of multipliers for bi-level optimization without lower-level strong convexity. In Proc. International Conference on Machine Learning, Honolulu, HI, 2023b. +Lu, Z. and Mei, S. First-order penalty methods for bilevel optimization. arXiv preprint arXiv:2301.01716, 2023. +Mackay, M., Vicol, P., Lorraine, J., Duvenaud, D., and Grosse, R. Self-tuning networks: Bilevel optimization of hyperparameters using structured best-response functions. In Proc. International Conference on Learning Representations, 2019. +Maclaurin, D., Duvenaud, D., and Adams, R. Gradient-based hyperparameter optimization through reversible learning. In Proc. International Conference on Machine Learning, Lille, France, 2015. +Marion, P., Korba, A., Bartlett, P., Blondel, M., De Bortoli, V., Doucet, A., Llinares-Lopez, F., Paquette, C., and Berthet, Q. Implicit diffusion: Efficient optimization through stochastic sampling. arXiv preprint arXiv:2402.05468, 2024. +Mathiasen, A. and Hvilshøj, F. Backpropagating through frechet inception distance. arXiv preprint arXiv:2009.14075, 2020. +Nesterov, Y. and Spokoiny, V. Random gradient-free minimization of convex functions. Foundations of Computational Mathematics, 17(2):527-566, 2017. +Nesterov, Y. et al. Lectures on convex optimization, volume 137. Springer, 2018. +Nichol, A. Q. and Dhariwal, P. Improved denoising diffusion probabilistic models. In Proc. International Conference on Machine Learning, pp. 8162-8171, 2021. +Pedregosa, F. Hyperparameter optimization with approximate gradient. In Proc. International Conference on Machine Learning, New York City, NY, 2016. +Petrulionyte, I., Mairal, J., and Arbel, M. Functional bilevel optimization for machine learning. In Proc. Advances in Neural Information Processing Systems, Vancouver, BC, Canada, 2024. +Qin, P., Zhang, R., and Xie, P. Bidora: Bi-level optimization-based weight-decomposed low-rank adaptation. arXiv preprint arXiv:2410.09758, 2024. +Ronneberger, O., Fischer, P., and Brox, T. U-net: Convolutional networks for biomedical image segmentation. In Medical image computing and computer-assisted intervention-MICCAI 2015: 18th international conference, Munich, Germany, October 5-9, 2015, proceedings, part III 18, pp. 234-241, 2015. + +Sahoo, S., Gokaslan, A., De Sa, C. M., and Kuleshov, V. Diffusion models with learned adaptive noise. In Proc. Advances in Neural Information Processing Systems, 2024. +Sambharya, R., Hall, G., Amos, B., and Stellato, B. Learning to warm-start fixed-point optimization algorithms. Journal of Machine Learning Research, 25(166):1-46, 2024. +Scellier, B. A deep learning theory for neural networks grounded in physics. arXiv preprint arXiv:2103.09985, 2021. +Scellier, B. and Bengio, Y. Equilibrium propagation: Bridging the gap between energy-based models and backpropagation. Frontiers in computational neuroscience, 11:24, 2017. +Seitzer, M. pytorch-fid: FID Score for PyTorch. https://github.com/mseitzer/pytorch-fid, August 2020. Version 0.3.0. +Shaban, A., Cheng, C.-A., Hatch, N., and Boots, B. Truncated back-propagation for bilevel optimization. In Proc. International Conference on Artificial Intelligence and Statistics, Naha, Japan, 2019. +Shamir, O. An optimal algorithm for bandit and zero-order convex optimization with two-point feedback. The Journal of Machine Learning Research, 18(1-1):1703-1713, 2017. +Shen, H., Yang, Z., and Chen, T. Principled penalty-based methods for bilevel reinforcement learning and RLHF. In Proc. International Conference on Machine Learning, Vienna, Austria, 2024. +Shen, H., Chen, P.-Y., Das, P., and Chen, T. Seal: Safety-enhanced aligned LLM fine-tuning via bilevel data selection. In Proc. International Conference on Learning Representations, 2025a. +Shen, H., Xiao, Q., and Chen, T. On penalty-based bilevel gradient descent method. Mathematical Programming, pp. 1-51, 2025b. +Snoek, J., Larochelle, H., and Adams, R. P. Practical bayesian optimization of machine learning algorithms. In Proc. Advances in Neural Information Processing Systems, 2012. +Song, J., Meng, C., and Ermon, S. Denoising diffusion implicit models. In Proc. International Conference on Learning Representations, virtual, 2021a. +Song, Y., Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Ermon, S., and Poole, B. Score-based generative modeling through stochastic differential equations. In Proc. + +International Conference on Learning Representations, virtual, 2021b. +Stadie, B., Zhang, L., and Ba, J. Learning intrinsic rewards as a bi-level optimization problem. In Conference on Uncertainty in Artificial Intelligence, virtual, 2020. +Tang, W. Fine-tuning of diffusion models via stochastic control: entropy regularization and beyond. arXiv preprint arXiv:2403.06279, 2024. +Tang, Z., Peng, J., Tang, J., Hong, M., Wang, F., and Chang, T.-H. Tuning-free alignment of diffusion models with direct noise optimization. arXiv preprint arXiv:2405.18881, 2024. +Tarzanagh, D. A., Li, M., Thrampoulidis, C., and Oymak, S. FEDNEST: Federated bilevel, minimax, and compositional optimization. In Proc. International Conference on Machine Learning, Baltimore, MD, 2022. +Uehara, M., Zhao, Y., Black, K., Hajiramezanali, E., Scalia, G., Diamant, N. L., Tseng, A. M., Biancalani, T., and Levine, S. Fine-tuning of continuous-time diffusion models as entropy-regularized control. arXiv preprint arXiv:2402.15194, 2024. +Vempala, S. and Wibisono, A. Rapid convergence of the unadjusted Langevin algorithm: Isoperimetry suffices. In Proc. Advances in Neural Information Processing Systems, Vancouver, Canada, 2019. +Vicol, P., Lorraine, J. P., Pedregosa, F., Duvenaud, D., and Grosse, R. B. On implicit bias in overparameterized bilevel optimization. In Proc. International Conference on Machine Learning, Baltimore, MD, 2022. +Vidhya, A. Noise schedules in stable diffusion. https://www.analyticsvidhya.com/blog/2024/07/noise-schedules-in-stable-diffusion/, 2024. +Wallace, B., Gokul, A., Ermon, S., and Naik, N. End-to-end diffusion latent optimization improves classifier guidance. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 7280-7290, 2023. +Wang, R., Liu, T., Hsieh, C.-J., and Gong, B. On discrete prompt optimization for diffusion models. arXiv preprint arXiv:2407.01606, 2024. +Wang, Z., Jiang, Y., Lu, Y., He, P., Chen, W., Wang, Z., and Zhou, M. In-context learning unlocked for diffusion models. Advances in Neural Information Processing Systems, pp. 8542-8562, 2023. +Wu, L., Gong, C., Liu, X., Ye, M., and Liu, Q. Diffusion-based molecule generation with informative prior bridges. + +In Advances in Neural Information Processing Systems, New Orleans, LA, 2022. +Wu, X., Hao, Y., Sun, K., Chen, Y., Zhu, F., Zhao, R., and Li, H. Human preference score v2: A solid benchmark for evaluating human preferences of text-to-image synthesis. arXiv preprint arXiv:2306.09341, 2023. +Xiao, Q., Lu, S., and Chen, T. A generalized alternating method for bilevel optimization under the polyak-losjasiewicz condition. In Proc. Advances in Neural Information Processing Systems, New Orleans, LA, 2023. +Yang, D., Yu, J., Wang, H., Wang, W., Weng, C., Zou, Y., and Yu, D. Diffsound: Discrete diffusion model for text-to-sound generation. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 31:1720-1733, 2023. +Yang, J., Ji, K., and Liang, Y. Provably faster algorithms for bilevel optimization. In Proc. Advances in Neural Information Processing Systems, virtual, 2021. +Yang, K., Tao, J., Lyu, J., Ge, C., Chen, J., Shen, W., Zhu, X., and Li, X. Using human feedback to fine-tune diffusion models without any reward model. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, 2024. +Yao, W., Yin, H., Zeng, S., and Zhang, J. Overcoming lower-level constraints in bilevel optimization: A novel approach with regularized gap functions. arXiv preprint arXiv:2406.01992, 2024. +Yuan, H., Huang, K., Ni, C., Chen, M., and Wang, M. Reward-directed conditional diffusion: Provable distribution estimation and reward improvement. In Proc. Advances in Neural Information Processing Systems, Vancouver, BC, Canada, 2024. +Zakarias, G. W., Hansen, L. K., and Tan, Z.-H. Bissl: Bilevel optimization for self-supervised pre-training and finetuning. arXiv preprint arXiv:2410.02387, 2024. +Zhang, Y., Zhang, G., Khanduri, P., Hong, M., Chang, S., and Liu, S. Revisiting and advancing fast adversarial training through the lens of bi-level optimization. In Proc. International Conference on Machine Learning, Baltimore, MD, 2022. +Zucchet, N. and Sacramento, J. Beyond backpropagation: bilevel optimization through implicit differentiation and equilibrium propagation. Neural Computation, 34(12): 2309-2346, 2022. + +# Appendix for "A First-order Generative Bilevel Optimization Framework for Diffusion Models" + +# A. Additional related works + +Bilevel optimization methods. Bilevel optimization has a long history that dates back to (Bracken & McGill, 1973). Recent efforts have focused on developing efficient gradient-based bilevel optimization methods with non-asymptotic convergence guarantees, inspired by works such as (Ghadimi & Wang, 2018; Ji et al., 2021; Hong et al., 2023; Chen et al., 2021). Since the gradient of the bilevel nested objective depends on the Hessian of the lower-level objective, existing literature proposed different Hessian inversion approximation methods including unrolling differentiation (Franceschi et al., 2017; 2018; Grazzi et al., 2020), implicit differentiation (Chen et al., 2021; Ghadimi & Wang, 2018; Hong et al., 2023; Pedregosa, 2016; Khanduri et al., 2021), conjugate gradients (Ji et al., 2021; Yang et al., 2021) and its warm-started single-loop versions (Arbel & Mairal, 2022; Li et al., 2022; Liu et al., 2023b; Xiao et al., 2023), and equilibrium backpropagation (Scellier & Bengio, 2017; Scellier, 2021); see (Zucchet & Sacramento, 2022) for a comparison. Among these methods, equilibrium backpropagation stands out as a fully first-order approach, valued for its balance of efficiency, robustness, and simplicity. Building on this principle, recent works have extended its applicability from the strongly convex setting to convex, nonconvex and constrained settings by reformulating the bilevel optimization problem as a single-level penalty problem and solving it via first-order approaches (Shen et al., 2025b; Liu et al., 2022; Kwon et al., 2023; 2024; Chen et al., 2024; Lu & Mei, 2023; Jiang et al., 2024; Yao et al., 2024). + +# B. Background on bilevel optimization + +In this section, we review some background knowledge for first order bilevel optimization. + +The differentiability of the penalty problem relies on the differentiability of the value function $g^{*}(x)$ , which is established through the extended Danskin theorem (Shen et al., 2025b, Proposition 4). Specifically, the gradient of value function takes + +$$ +\nabla g ^ {*} (x) = \nabla_ {x} g \left(x, y ^ {*}\right), \forall y ^ {*} \in \mathcal {S} (x). \tag {17} +$$ + +This enables us to solve (2) by gradient-based approach. Similarly, by applying the extended Danskin theorem to the penalty function (Kwon et al., 2024), we know + +$$ +\nabla \mathcal {L} _ {\gamma} ^ {*} (x) = \nabla_ {x} \mathcal {L} _ {\gamma} (x, z ^ {*}), \quad \text {w i t h} \quad \forall z ^ {*} \in \mathcal {S} _ {\gamma} (x) +$$ + +which can be further rewritten according to (17) as + +$$ +\nabla \mathcal {L} _ {\gamma} ^ {*} (x) = \nabla_ {x} f (x, z ^ {*}) + \gamma (\nabla_ {x} g (x, z ^ {*}) - \nabla_ {x} g (x, y ^ {*})). \tag {18} +$$ + +Moreover, the following lemma shows that the penalty objective is a proxy of original bilevel hyper-function $F(x)$ . + +Lemma 1 ((Kwon et al., 2023, Lemma 3.1)). Under Assumption 1, let $\gamma \geq \frac{2\ell_{f,1}}{\mu_g}$ , we have $F(x)$ is $L_{F}$ -smooth and + +$$ +\| \nabla F (x) - \nabla \mathcal {L} _ {\gamma} ^ {*} (x) \| \leq \frac {B}{\gamma} +$$ + +where $L_{F} = \left(1 + \frac{3l_{g,1}}{\mu_{g}}\right)\left(l_{f,1} + \frac{l_{g,1}^{2}}{\mu_{g}} +\frac{2l_{f,0}l_{g,1}l_{g,2}}{\mu_{g}^{2}}\right) = \mathcal{O}(1 / \kappa^{3})$ and $B = \frac{4l_{f,0}l_{g,1}}{\mu_g^2}\left(l_{f,1} + \frac{2l_{f,0}l_{g,2}}{\mu_g}\right) = \mathcal{O}(1 / \kappa^3)$ and $\kappa = \frac{\ell_{f,1}}{\mu_g}$ is the condition number. + +This lemma indicates that $\nabla \mathcal{L}_{\gamma}^{*}(x)$ is an approximation of $\nabla F(x)$ with error controlled by enlarging penalty constant $\gamma$ . + +# C. Background on diffusion models + +In this section, we connect continuous to discrete diffusion model to enable the derivation of the closed-form gradient of the score matching function with respect to the noise scheduler in the discrete diffusion model implementation. + +Denoising diffusion probabilistic model (DDPM) (Ho et al., 2020) and Denoising diffusion implicit model (DDIM) (Song et al., 2021a) provide standard ways to discretize the continuous SDE in (5) and (6). To be self-contained, we provide a + +derivation of connection between them. Let us recall the continuous forward process in (5) as + +$$ +\mathrm {d} U _ {t} = - \frac {1}{2} q (t) U _ {t} \mathrm {d} t + \sqrt {q (t)} \mathrm {d} W _ {t} \tag {13} +$$ + +which gives the following transition probabilities + +$$ +p (u _ {t} | u _ {0}) = \mathcal {N} \left(u _ {0} e ^ {- \int_ {0} ^ {T} \frac {q (s)}{2} \mathrm {d} s}, I \int_ {0} ^ {T} q (t) e ^ {- \int_ {0} ^ {T - t} q (s) \mathrm {d} s} \mathrm {d} t\right) = \mathcal {N} \left(u _ {0} e ^ {- \int_ {0} ^ {T} \frac {q (s)}{2} \mathrm {d} s}, \left(1 - e ^ {- \int_ {0} ^ {T} q (s) \mathrm {d} s}\right) I.\right) +$$ + +See also (Song et al., 2021b, Appendix B) and (Denker et al., 2024, Appendix A). Therefore, by defining $\bar{q}(t) = e^{-\int_0^T q(s)\mathrm{d}s}$ , we get the form in DDPM (Ho et al., 2020) + +$$ +p \left(u _ {t} \mid u _ {0}\right) = \mathcal {N} \left(\sqrt {\bar {q} (t)} u _ {0}, (1 - \bar {q} (t)) \mathbf {I} _ {d}\right). \tag {19} +$$ + +Since the approximation $1 - x \approx e^{-x}$ holds well when $x$ is small, we have a discrete approximation of $\bar{q}(t)$ as + +$$ +\bar {q} (t) = e ^ {- \int_ {0} ^ {T} q (s) d s} \approx \prod_ {n = 0} ^ {N - 1} \left(1 - q (t _ {n}) \Delta t\right). +$$ + +By choosing $\Delta t = 1$ , we get the expression of discrete DDPM in (Ho et al., 2020) as follows. + +Forward process. Given a data point sampled from a data distribution $u_0 \sim p_{\mathrm{data}}$ , the forward process in DDPM generates a sequence of samples $u_1, u_2, \ldots, u_T$ by gradually adding noise + +$$ +p \left(u _ {1: T} \mid u _ {0}\right) = \prod_ {t = 1} ^ {T} p \left(u _ {t} \mid u _ {t - 1}\right), \quad p \left(u _ {t} \mid u _ {t - 1}\right) = \mathcal {N} \left(\sqrt {1 - q _ {t}} u _ {t - 1}, q _ {t} \mathbf {I} _ {d}\right) \tag {20} +$$ + +where $\{q_t\}_{t=1}^T$ corresponds to the noise scheduler in discrete DDPM. (20) can be further expressed as + +$$ +p \left(u _ {t} \mid u _ {0}\right) = \mathcal {N} \left(\sqrt {\bar {q} _ {t}} u _ {0}, \left(1 - \bar {q} _ {t}\right) \mathbf {I} _ {d}\right) \tag {21} +$$ + +where $\bar{q}_t = \prod_{s=1}^t (1 - q_s)$ is the variance scheduler defined by the noise scheduler $\{q_t\}_{t=1}^T$ . + +Backward process of DDPM. The backward process aims to recover $u_{0}$ from $u_{T}$ by iteratively denoising + +$$ +\tilde {p} _ {\theta} \left(u _ {0: T}\right) = \tilde {p} \left(u _ {T}\right) \prod_ {t = 1} ^ {T} \tilde {p} _ {\theta} \left(u _ {t - 1} \mid u _ {t}\right), \tag {22} +$$ + +where $\tilde{p}(u_T) = \mathcal{N}(0, \mathbf{I}_d)$ and each $p_\theta$ is modeled as a Gaussian distribution parameterized by $\theta$ + +$$ +\tilde {p} _ {\theta} (u _ {t - 1} | u _ {t}) = \mathcal {N} \big (\mu_ {\theta} (u _ {t}, t), \sigma_ {\theta} ^ {2} (u _ {t}, t) \mathbf {I} _ {d} \big) +$$ + +with the mean and variance learned by optimizing the score-matching objective. + +Score matching. In the discrete DDPM, score-matching loss also takes a simpler form. To learn $\mu_{\theta}$ and $\sigma_{\theta}$ , we first estimate the backward probability given the initial state using the Gaussian kernel estimation as follows + +$$ +\tilde {p} _ {t} \left(u _ {t - 1} \mid u _ {t}, u _ {0}\right) = \mathcal {N} \left(\mu_ {t} \left(u _ {t}, u _ {0}\right), \sigma_ {t} ^ {2} \mathbf {I} _ {d}\right) +$$ + +where $\mu_t(u_t, u_0) = \frac{\sqrt{\bar{q}_{t-1}} q_t}{1 - \bar{q}_t} u_0 + \frac{\sqrt{1 - q_t} (1 - \bar{q}_{t-1})}{1 - \bar{q}_t} u_t \stackrel{\mathrm{(a)}}{=} \frac{1}{\sqrt{1 - q_t}} \left( u_t - \frac{q_t}{\sqrt{1 - \bar{q}_t}} \delta_t \right)$ + +and $\sigma_t^2 = \frac{1 - \bar{q}_{t - 1}}{1 - \bar{q}_t} q_t$ (23b) + +where (a) is earned by reparameterizing (21) as $u_{t}(u_{0},\delta_{t}) = \sqrt{\bar{q}_{t}} u_{0} + (1 - \bar{q}_{t})\delta_{t}$ for $\delta_t\sim \mathcal{N}(0,\mathbf{I}_d)$ . As $\mu_t$ is proportional to $\delta_t$ , we can fit a neural network to proxy $\mu_t$ by optimizing the score matching loss in (7) in the following simplified form with explicit dependence on noise scheduler $q$ + +$$ +\operatorname {L} _ {\mathrm {S M}} (\theta , q) = \mathbb {E} _ {u _ {0}, \delta , t} \left[ \left\| \delta - \delta_ {\theta} \left(\sqrt {\bar {q} _ {t}} u _ {0} + \sqrt {1 - \bar {q} _ {t}} \delta , t\right) \right\| ^ {2} \right] \tag {24} +$$ + +where $\delta_{\theta}$ is a neural network approximator (e.g. U-Net) intended to predict Gaussian noise $\delta$ from $u_{t}$ . + +By optimizing the score matching objective $\mathrm{L}_{\mathrm{SM}}(\theta ,q)$ with respect to $\theta$ we obtain the proxy of $\delta_{\theta}$ and using $\delta_{\theta}$ instead of $\delta_t$ in (23a), we can sample the backward process by + +$$ +u _ {t - 1} = \frac {1}{\sqrt {q _ {t}}} \left(u _ {t} - \frac {1 - q _ {t}}{\sqrt {1 - \bar {q} _ {t}}} \delta_ {\theta}\right) + \sigma_ {t} v \tag {25} +$$ + +with $v\sim \mathcal{N}(0,\mathbf{I}_d)$ . The full training and backward sampling process in DDPM is summarized in Algorithm 3 and 4. + +# Algorithm 3 Score network training + +1: repeat +2: draw $\{u_0^m\}_{m = 1}^M\sim p_{\mathrm{data}}$ +3: $\{t_m\}_{m = 1}^M\sim \mathrm{Uniform}([T])$ +4: $\{\delta_m\}_{m = 1}^M\sim \mathcal{N}(0,\mathbf{I}_d)$ +5: Take gradient descent step on $\nabla_{\theta}\frac{1}{M}\sum_{m = 1}^{M}\| \delta -$ $\delta_{\theta}(\sqrt{\bar{q}_{t_m}} u_0^m +\sqrt{1 - \bar{q}_{t_m}}\delta_m,t_m)\| ^2$ +6: until converged + +# Algorithm 4 Backward sampling + +1: $\{\tilde{u}_T^m\}_{m = 1}^M\sim \mathcal{N}(0,\mathbf{I}_d)$ +2: for $t = T, \dots, 1$ do +3: $\{v^m\}_{m = 1}^M\sim \mathcal{N}(0,\mathbf{I}_d)$ if $t > 1$ , else $v^{m} = 0$ +4: $\tilde{u}_{t - 1}^{m} = \frac{1}{\sqrt{1 - q_{t}}}\left(\tilde{u}_{t}^{m} - \frac{q_{t}}{\sqrt{1 - \bar{q}_{t}}}\delta_{\theta}(\tilde{u}_{t}^{m},t)\right) + \sigma_{t}v^{m}$ +5: end for +6: return $\frac{1}{M}\sum_{m = 1}^{M}u_0^M$ + +DDIM (Song et al., 2021a) uses the same forward process and score network training as DDPM, but employs a deterministic backward sampling strategy and eliminates redundant sampling steps to further accelerate the backward process as follows. + +Backward process of DDIM. Letting $\{t_i\}$ be some selected time steps from $[0, T]$ , (25) is generalized by + +$$ +u _ {t _ {i - 1}} = \sqrt {\bar {q} _ {t _ {i - 1}}} \left(\frac {u _ {t _ {i}} - \sqrt {1 - \bar {q} _ {t _ {i}}} \delta_ {\theta} ^ {(t _ {i})} \left(u _ {t _ {i}}\right)}{\sqrt {\bar {q} _ {t _ {i}}}}\right) + \sqrt {1 - \bar {q} _ {t _ {i - 1}} - \sigma_ {t _ {i}} ^ {2}} \cdot \delta_ {\theta} ^ {(t _ {i})} \left(u _ {t _ {i}}\right) + \sigma_ {t _ {i}} v _ {t _ {i}}, \tag {26} +$$ + +which recovers DDPM in (25) when $\sigma_t = \sqrt{(1 - \bar{q}_{t-1})\frac{q_t}{(1 - \bar{q}_t)}}$ in (23b) and without skipping. i.e. $t_i = t$ , and the resulting deterministic model when $\sigma_t = 0$ is called DDIM. In DDIM, time steps $\{t_i\}$ are selected using either linear $(t_i = \lfloor ci \rfloor$ for some $c)$ or a quadratic $(t_i = \lfloor ci^2 \rfloor$ for some $c)$ strategy. With these designs, backward sampling steps of DDIM can be reduced from 1000 in DDPM to 50 - 10 (Song et al., 2021a). + +# D. Theoretical analysis + +In this section, we present the closed-form of $\nabla \mathcal{L}_{\gamma}^{*}(\lambda)$ for fine-tuning diffusion model application, the gradient of the score matching function with respect to noise scheduler in discrete diffusion models, and the theoretical guarantee of Algorithm 1. + +# D.1. Upper-level gradient: Proof for Proposition 1 + +Proof: According to (Tang, 2024, Equation (3.7)), we have the closed form of KL divergence of fine-tuning distribution and pre-trained distribution as follows. + +$$ +\mathrm {K L} \left(p ^ {*} (\lambda) \| p _ {\mathrm {d a t a}}\right) = - \mathbb {E} _ {u \sim p _ {\mathrm {d a t a}}} \left[ \frac {r _ {2} (u)}{\lambda} \right] + \log \mathbb {E} _ {u \sim p _ {\mathrm {d a t a}}} \left[ e ^ {r _ {2} (u) / \lambda} \right] +$$ + +$$ +\operatorname {K L} \left(p _ {\gamma} ^ {*} (\lambda) \| p _ {\mathrm {d a t a}}\right) = - \mathbb {E} _ {u \sim p _ {\mathrm {d a t a}}} \left[ \frac {r _ {1} (u) / \gamma + r _ {2} (u)}{\lambda} \right] + \log \mathbb {E} _ {u \sim p _ {\mathrm {d a t a}}} \left[ e ^ {\frac {r _ {1} (u) / \gamma + r _ {2} (u)}{\lambda}} \right] \tag {27} +$$ + +Then the proof can be obtained by plugging the closed-form of KL divergence in (27) into (12). That is, + +$$ +\begin{array}{l} \nabla \mathcal {L} _ {\gamma} ^ {*} (\lambda) = \gamma (\mathrm {K L} (p _ {\gamma} ^ {*} (\lambda) \| p _ {\mathrm {d a t a}}) - \mathrm {K L} (p ^ {*} (\lambda) \| p _ {\mathrm {d a t a}})) \\ = - \mathbb {E} _ {u \sim p _ {\mathrm {d a t a}}} \left[ \frac {r _ {1} (u) / \gamma + r _ {2} (u)}{\lambda} \right] + \log \mathbb {E} _ {u \sim p _ {\mathrm {d a t a}}} \left[ e ^ {\frac {r _ {1} (u) / \gamma + r _ {2} (u)}{\lambda}} \right] + \mathbb {E} _ {u \sim p _ {\mathrm {d a t a}}} \left[ \frac {r _ {2} (u)}{\lambda} \right] - \log \mathbb {E} _ {u \sim p _ {\mathrm {d a t a}}} \left[ e ^ {r _ {2} (u) / \lambda} \right] \\ = - \mathbb {E} _ {u \sim p _ {\mathrm {d a t a}}} \left[ \lambda^ {- 1} r _ {1} (u) \right] - \gamma \log \mathbb {E} _ {u \sim p _ {\mathrm {d a t a}}} \left[ e ^ {\frac {r _ {2} (u)}{\lambda}} \right] + \gamma \log \mathbb {E} _ {u \sim p _ {\mathrm {d a t a}}} \left[ e ^ {\frac {r _ {1} (u) / \gamma + r _ {2} (u)}{\lambda}} \right] \\ \end{array} +$$ + +which completes the proof. + +# D.2. Explicit lower-level noise scheduler's gradient in discrete diffusion models + +In this section, we derive the explicit gradient expression of the score matching function with respect to the noise scheduler. Since score matching loss in both DDPM and DDIM takes the form in (15), the noise scheduler's gradient in score matching objective can be earned by the chain rule + +$$ +\nabla_ {q} \mathrm {L} _ {\mathrm {S M}} (\theta , u (q)) \approx \frac {1}{M} \sum_ {m = 1} ^ {M} \frac {\partial u _ {q} ^ {m}}{\partial q} \nabla_ {u} \mathrm {L} _ {\mathrm {S M}} (\theta , u _ {q} ^ {m}) \tag {28} +$$ + +where $u_{q}^{m} = u_{t_{m}}^{m}$ with $t_{m}$ uniformly chosen from $t \in [T] = \{1, \dots, T\}$ and subscript $q$ means this forward sample is generated using noise scheduler $q = [q_{1}, \dots, q_{T}]$ . In this way, using the reparameterization $u_{t} = \sqrt{\bar{q}_{t}} u_{0} + (1 - \bar{q}_{t})\delta$ and the relation of $\bar{q}_{t} = \prod_{s=1}^{t}(1 - q_{s})$ , we have for any $t \leq t_{m}$ , + +$$ +\frac {\partial u _ {q} ^ {m}}{\partial q _ {t}} = \frac {\partial u _ {t _ {m}} ^ {m}}{\partial q _ {t}} = \frac {\partial \bar {q} _ {t _ {m}}}{\partial q _ {t}} \frac {\partial u _ {t _ {m}} ^ {m}}{\partial \bar {q} _ {t _ {m}}} = - \frac {\bar {q} _ {t _ {m}}}{q _ {t}} \left(\frac {u _ {0}}{2 \sqrt {\bar {q} _ {t _ {m}}}} - \delta\right) ^ {\top}. \tag {29} +$$ + +On the other hand, the gradient of the score-matching function with respect to sample $u$ takes the form of + +$$ +\nabla_ {u} \mathrm {L} _ {\mathrm {S M}} \left(\theta , u _ {q} ^ {m}\right) = \frac {\partial \delta_ {\theta} \left(u _ {t _ {m}} ^ {m}\right)}{\partial u _ {t _ {m}} ^ {m}} \frac {\partial \mathrm {L} _ {\mathrm {S M}} \left(\theta , u _ {q} ^ {m}\right)}{\partial \delta_ {\theta} \left(u _ {t _ {m}} ^ {m}\right)} = 2 \frac {\partial \delta_ {\theta} \left(u _ {t _ {m}} ^ {m}\right)}{\partial u _ {t _ {m}} ^ {m}} \left(\delta_ {\theta} \left(u _ {t _ {m}} ^ {m}\right) - \delta_ {m}\right) \tag {30} +$$ + +where $u_{t_m}^m = \sqrt{q_{t_m}} u_0^m + (1 - \bar{q}_{t_m})\delta_m$ and the first term $\frac{\partial\delta_{\theta}(u_{t_m}^m)}{\partial u_{t_m}^m}$ is the derivative of the score network with respect to the input samples that is directly obtainable via auto-differentiation library in Pytorch. By plugging the above closed forms of partial derivative in (29) and (30) into (28), we get for any $t \in [T]$ + +$$ +\begin{array}{l} \nabla_ {q _ {t}} \mathrm {L} _ {\mathrm {S M}} (\theta , u (q)) \approx \frac {1}{| \mathcal {M} _ {t} |} \sum_ {\mathcal {M} _ {t}: = \{m \mid t _ {m} \geq t \}} \frac {\partial u _ {q} ^ {m}}{\partial q _ {t}} \nabla_ {u} \mathrm {L} _ {\mathrm {S M}} (\theta , u _ {q} ^ {m}) \\ = \frac {2}{\left| \mathcal {M} _ {t} \right|} \sum_ {\mathcal {M} _ {\tau}: = \{m \mid t _ {m} \geq t \}} - \frac {\bar {q} _ {t _ {m}}}{q _ {t}} \left(\frac {u _ {0}}{2 \sqrt {\bar {q} _ {t _ {m}}}} - \delta_ {m}\right) ^ {\top} \frac {\partial \delta_ {\theta} \left(u _ {t _ {m}} ^ {m}\right)}{\partial u _ {t _ {m}} ^ {m}} \left(\delta_ {\theta} \left(u _ {t _ {m}} ^ {m}\right) - \delta_ {m}\right). \tag {31} \\ \end{array} +$$ + +In practice, we do not need to manually implement the closed form in (31), as PyTorch's auto-differentiation handles it automatically. The derivation in this section highlights the low computational cost of auto-differentiation, as only $\frac{\partial\delta_{\theta}(u_{tm}^{m})}{\partial u_{tm}^{m}}$ depends on the U-Net structure, and this differential is commonly used in gradient guidance diffusion models (Guo et al., 2024; Bansal et al., 2023). + +# D.3. Descent theorem: Proof of Theorem 1 + +Proof: By Taylor expansion and the $L_{F}$ smoothness of $F(x)$ , we have + +$$ +\begin{array}{l} F (x _ {k + 1}) \leq F (x _ {k}) + \langle \nabla F (x _ {k}), x _ {k + 1} - x _ {k} \rangle + \frac {L _ {F}}{2} \| x _ {k + 1} - x _ {k} \| ^ {2} \\ \leq F (x _ {k}) + \langle \nabla F (x _ {k}), \operatorname {P r o j} _ {\mathcal {X}} (x _ {k} - \eta_ {k} \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k})) - x _ {k} \rangle + \frac {L _ {F}}{2} \| \operatorname {P r o j} _ {\mathcal {X}} (x _ {k} - \eta_ {k} \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k})) - x _ {k} \| ^ {2} \\ = F \left(x _ {k}\right) + \left\langle \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} \left(x _ {k}\right), \operatorname {P r o j} _ {\mathcal {X}} \left(x _ {k} - \eta_ {k} \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} \left(x _ {k}\right)\right) - x _ {k} \right\rangle + \frac {L _ {F}}{2} \| \operatorname {P r o j} _ {\mathcal {X}} \left(x _ {k} - \eta_ {k} \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} \left(x _ {k}\right)\right) - x _ {k} \| ^ {2} \\ + \left\langle \nabla F (x _ {k}) - \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k}), \operatorname {P r o j} _ {\mathcal {X}} \left(x _ {k} - \eta_ {k} \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k})\right) - x _ {k} \right\rangle \\ \leq F (x _ {k}) + \langle \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k}), \mathrm {P r o j} _ {\mathcal {X}} (x _ {k} - \eta_ {k} \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k})) - x _ {k} \rangle + \frac {L _ {F}}{2} \| \mathrm {P r o j} _ {\mathcal {X}} (x _ {k} - \eta_ {k} \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k})) - x _ {k} \| ^ {2} \\ + \frac {1}{2 \alpha} \| \nabla F (x _ {k}) - \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k}) \| ^ {2} + \frac {\alpha}{2} \| \operatorname {P r o j} _ {\mathcal {X}} (x _ {k} - \eta_ {k} \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k})) - x _ {k} \| ^ {2} \\ \stackrel {(a)} {\leq} F (x _ {k}) - \frac {1}{4 \eta_ {k}} \| \operatorname {P r o j} _ {\mathcal {X}} (x _ {k} - \eta_ {k} \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k})) - x _ {k} \| ^ {2} + \eta_ {k} \| \nabla F (x _ {k}) - \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k}) \| ^ {2} \\ \end{array} +$$ + +$$ +\stackrel {(b)} {\leq} F (x _ {k}) - \frac {1}{4 \eta_ {k}} \| \mathrm {P r o j} _ {\mathcal {X}} (x _ {k} - \eta_ {k} \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k})) - x _ {k} \| ^ {2} + \frac {2 B ^ {2} \eta_ {k}}{\gamma_ {k} ^ {2}} + 4 \eta_ {k} \gamma_ {k} ^ {2} \epsilon_ {k} ^ {2} +$$ + +where $(a)$ comes from the descent lemma of projected gradient (e.g. (Nesterov et al., 2018, Theorem 2.2.13)) and choosing $\alpha = \frac{1}{2\eta_k}$ and $(b)$ is because + +$$ +\| \nabla F (x _ {k}) - \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k}) \| ^ {2} \leq 2 \| \nabla F (x _ {k}) - \nabla \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k}) \| ^ {2} + 2 \| \bar {\nabla} \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k}) - \nabla \mathcal {L} _ {\gamma_ {k}} ^ {*} (x _ {k}) \| ^ {2} \leq \frac {2 B ^ {2}}{\gamma_ {k} ^ {2}} + 4 \gamma_ {k} ^ {2} \epsilon_ {k} ^ {2} +$$ + +where the last inequality comes from Lemma 1 and the estimation error $\epsilon_{k}$ of penalty and lower-level problem. By defining the projected gradient as $G_{\eta ,\gamma}(x) = \frac{\mathrm{Proj}_{\mathcal{X}}(x - \eta\bar{\nabla}\mathcal{L}_{\gamma}^{*}(x)) - x}{\eta}$ and letting $\epsilon_{k}\leq \frac{B}{\gamma_{k}^{2}}$ we get the conclusion. + +# E. Complete Algorithms + +In this section, we present the complete algorithms with additional details for gradient guided diffusion model for (single-level) generative optimization (Guo et al., 2024), and the bilevel diffusion algorithm for fine-tuning and noise scheduling problem proposed in this work. + +# E.1. Guided Diffusion algorithm for Generative Optimization + +To generate samples that optimize a given reward function $r$ , we can iteratively apply the backward SDE in (6) with the pre-trained score network $s_{\theta}$ and the guidance defined as + +$$ +\mathrm {G} \left(\tilde {u} _ {t}, t; r\right) = - \rho (t) \nabla_ {\tilde {u} _ {t}} \left[ v - \frac {g ^ {\top} \left(\left(\tilde {u} _ {t} + h (t) s _ {\theta} \left(\tilde {u} _ {t} , t\right)\right)\right)}{\sqrt {\bar {q} (t)}} \right] ^ {2} \tag {32} +$$ + +where $g$ is a gradient vector associated with the reward function $r(\cdot)$ evaluated at the current sample $\tilde{u}_t$ , $v$ is a given target reward value that increase along the optimization, $\bar{q}(t) = \exp(-\int_0^t q(s)ds)$ , $h(t) = 1 - \bar{q}(t)$ are the mean and variance of $t$ -th sample and $\rho(t)$ is the tuning parameter. + +We can iteratively update the gradient guidance to steer the sample generation process maximize the reward function. Specifically, at each iteration $n$ , the backward SDE (8) is stimulated using the current gradient guidance from (32), evaluated at the current samples, to generate new samples. Subsequently, the gradient guidance term is updated at the newly generated samples. After $N$ steps of guidance updates, we are able to generate samples approximately that follow the target distribution with $\mathcal{O}(\log(1/N))$ , effectively minimizing $r(\cdot)$ while incorporating regularization to align with the pre-trained model (Guo et al., 2024). The complete algorithm for guided diffusion model for generative optimization is outlined in Algorithm 5. + +# E.2. Bilevel fine-tuning algorithm + +Bilevel fine-tuning diffusion algorithm is summarized in Algorithm 2 with the following upper-level gradient estimation. + +Monte Carlo estimation of upper-level gradient. The upper-level gradient can be estimated from the following way + +$$ +\bar {\nabla} \mathcal {L} _ {\gamma} ^ {*} (\lambda) = - \frac {1}{\lambda M _ {0}} \sum_ {m = 1} ^ {M _ {0}} r _ {1} (\tilde {u} _ {m}) - \gamma \log \frac {1}{M _ {0}} \sum_ {m = 1} ^ {M _ {0}} \left[ e ^ {\frac {r _ {2} (\tilde {u} _ {m})}{\lambda}} \right] + \gamma \log \frac {1}{M _ {0}} \sum_ {m = 1} ^ {M _ {0}} \left[ e ^ {\frac {r _ {1} (\tilde {u} _ {m}) / \gamma + r _ {2} (\tilde {u} _ {m})}{\lambda}} \right]. \tag {33} +$$ + +where $\{\tilde{u}_m\}_{m=1}^{M_0}$ are samples from pre-trained distribution. + +# E.3. Bilevel noise scheduling algorithm + +With ZO estimation and the parametrization, the complete algorithm for bilevel noise scheduling problem is summarized in Algorithm 6. Besides, the upper-level schedule quality loss is differentiable according to (Mathiasen & Hvilshøj, 2020). + +Differentiable $\mathrm{L}_{\mathbf{SQ}}(\cdot)$ loss. FID score is a commonly used metric in computer vision to measure the distance of the generated distribution and the true distribution. Given $\{u_m\}_{m=1}^M \sim p_\theta$ generated from diffusion model algorithm and $\{\tilde{u}_m\}_{m=1}^{M_0} \sim p_{\mathrm{data}}$ , we first encode all samples $u_m, \tilde{u}_m$ by the pre-trained Inception network (Seitzer, 2020) and then FID + +Algorithm 5 Guided Diffusion for Generative Optimization +1: Input: Pre-trained score network $s_{\theta}(\cdot, \cdot)$ , differentiable reward $r(\cdot)$ , guidance $G$ . +2: Parameter: Strength parameters $\rho(t)$ , $\{v_n\}_{n=0}^{N-1}$ , number of iterations $N$ , batch sizes $\{B_n\}$ . +3: Initialization: $G_0 = \mathrm{NULL}$ . +4: for iteration $n = 0, \ldots, N-1$ do +5: Generate: Sample $\tilde{u}_{n,i}$ for $i \in [B_n]$ by backward SDE in (8) with $(s_{\theta}, G_n)$ until time $T$ +6: Compute Guidance: +(i) Sample mean $\bar{u}_n := \frac{1}{B_n} \sum_{i=1}^{B_n} \tilde{u}_{n,i}$ . +(ii) Query gradient $g_n = \nabla r(\bar{u}_n)$ . +(iii) Update gradient guidance $G_{n+1}(\cdot, \cdot) = G(\cdot, \cdot; r)$ via (32), using $s_{\theta}$ , gradient vector $g_n$ , and reward target $v_n$ and $\beta(t)$ . +7: end for +8: Generate: Sample $\tilde{u}_i$ for $i \in [B_N]$ by backward SDE in (8) with $(s_{\theta}, G_N)$ until time $T$ +9: Output: $\{\tilde{u}_i\}_{i=1}^{B_N}$ . + +score is computed by the Wasserstein distance between the two multivariate normal distributions. Therefore, when the Inception network used for encoding is differentiable with respect to its input, as the one proposed by Seitzer (2020) does, $\mathrm{L}_{\mathrm{SQ}}(\cdot)$ is differentiable with respect to the sample and then by the chain rule, it is differentiable with respect to $q$ and $\theta$ . + +# F. Experimental details + +In this section, we introduce the details of experimental setup for two applications. All experiments were conducted on two servers: one with four NVIDIA A6000 GPUs, and 256 GB of RAM; one with an Intel i9-9960X CPU and two NVIDIA A5000 GPUs. + +# F.1. Application 1: fine-tuning diffusion model with bilevel entropy regularization learning + +For the hyperparameter settings, we set the initial value of noise scheduler $q(t)$ to 1 and tune the entropy strength $\lambda$ using different methods. We use a batch size of 3 for the fine-tuning step and set optimization step 7 and repeat the optimization for 4 times. The prompts we used for generating these figures are mentioned in the figure 9 - 11. We compare our results against various baseline methods including grid search, random search, bayesian method, and weighted sum. + +Grid Search. For the grid search method, we selected the following $\lambda$ values and conducted simulations for each value: + +$$ +\lambda \in \{0. 0 1, 0. 1, 1. 0, 1 0. 0, 1 0 0 \} +$$ + +Random search. We fine-tuned the diffusion model using $\lambda$ values generated by a random value generator. Specifically, we sampled 5 random values logarithm uniformly from the range [0.01, 100]. The $\lambda$ values generated are as follows: + +$$ +\lambda \in \{6 2. 3, 7 4. 0, 7 4. 1 8, 7 9. 5 2, 9 4. 2 5 \} +$$ + +Bayesian search. We utilized Bayesian optimization with the objective of maximizing the reward function and the CLIP score. Specifically, the search space for the hyperparameter $\lambda_{\mathrm{scale}}$ was defined as a continuous range [0.01, 100], sampled on a logarithmic scale using a log-uniform distribution. The optimization process was conducted using the qp_minimize function from the scikit-optimize library, which employs Gaussian process-based Bayesian optimization. To balance computational efficiency and optimization quality, the number of function evaluations was limited to $n_{\mathrm{calls}} = 15$ . Additionally, a fixed random seed (random_state = 42) was set to ensure the reproducibility of results. + +Since Bayesian optimization minimizes the objective function by default, we reformulated the problem by negating the combined reward and CLIP score, thereby transforming the maximization task into a minimization problem. This reformulation allowed us to identify the optimal $\lambda_{\mathrm{scale}}$ value that best balances reward maximization and adherence to the + +Algorithm 6 Bilevel Approach without Pre-trained Diffusion Model +1: Input: Differentiable loss functions $\mathrm{L}_{\mathrm{SQ}}(\cdot)$ and $\mathrm{L}_{\mathrm{SM}}(\cdot)$ , initial samples $\{\tilde{u}_m\}_{m=1}^{M_0}$ , iteration number $K$ , $S_z$ , $S_y$ , initial noise scheduler parametrization parameter $q_{\mathrm{param}} = \{q_s, q_e, q_\tau, q_\epsilon\}$ (cosine or sigmoid), feasible set for $q_{\mathrm{param}} \in \mathcal{Q}$ , stepsizes $\beta, \eta_k$ . +2: for $k = 0, 1, \ldots, K - 1$ do +3: sample $\{u_{k,m}\}_{m=1}^M$ from the forward process (5) with noise scheduler $q_k$ . +4: for $s = 0, 1, \ldots, S_k^k - 1$ do +5: update $\theta_{k,s+1}^y = \theta_{k,s}^y - \frac{\beta}{M} \sum_{m=1}^M \nabla_\theta \mathrm{LSM}(\theta_{k,s}^y, u_{k,m})$ . +6: end for +7: for $s = 0, 1, \ldots, S_z - 1$ do +8: sample $\{\tilde{u}_{k,m}^{s,+}, \tilde{u}_{k,m}^{s,-}\}_{m=1}^M$ from (6) with $q_k$ and $\theta_{k,s}^z + \nu \theta_{\text{perturb}}$ and $\theta_{k,s}^z - \nu \theta_{\text{perturb}}$ . +9: estimate $\{\nabla_\theta \mathrm{LSQ}(\tilde{u}_{k,m}^s)\}_{m=1}^M$ by ZO in (14) +10: update $\theta_{k,s+1}^z = \theta_{k,s}^z - \frac{\beta}{M} \sum_{m=1}^M \left( \nabla_\theta \mathrm{LSQ}(\tilde{u}_{k,m}^s) + \gamma \nabla_\theta \mathrm{LSM}(\theta_{k,s}^z, u_{k,m}) \right)$ +11: end for +12: calculate parameterization perturbation $q_{k,\mathrm{param}}^+ = q_{k,\mathrm{param}} + \nu q_{\text{perturb}}$ , $q_{k,\mathrm{param}}^- = q_{k,\mathrm{param}} - \nu q_{\text{perturb}}$ +13: calculate noise scheduler $q_k^+, q_k^-$ from $q_{k,\mathrm{param}}^+, q_{k,\mathrm{param}}^-$ by cosine or sigmoid parameterization +14: sample $\{\tilde{u}_{k+1,m}^+, \tilde{u}_{k+1,m}^-\}_{m=1}^M$ from backward process (6) with $q_k^+, q_k^-$ and $\theta_{k+1}^z$ . +15: estimate $\nabla_{q_{\mathrm{param}}} \mathrm{LSQ}(\tilde{u}_{k+1,m}) = \frac{q_k, p_{\mathrm{perturb}}}{2\nu} (\mathrm{LSQ}(\tilde{u}_{k+1,m}) - \mathrm{LSQ}(\tilde{u}_{k+1,m}))$ by ZO +16: calculate $\{\nabla_{q_{\mathrm{param}}} \mathrm{LSM}(\theta_{k+1}^z, u_{k,m}), \nabla_{q_{\mathrm{param}}} \mathrm{LSM}(\theta_{k+1}^y, u_{k,m})\}_{m=1}^M$ by auto-differentiation +17: update $q_{k+1,\mathrm{param}} = q_{k,\mathrm{param}} - \frac{\eta_k}{M} \sum_{m=1}^M \left( \nabla_{q_{\mathrm{param}}} \mathrm{LSQ}(\tilde{u}_{k+1,m}) + \gamma (\nabla_{q_{\mathrm{param}}} \mathrm{LSM}(\theta_{k+1}^z, u_{k,m}) - \nabla_{q_{\mathrm{param}}} \mathrm{LSM}(\theta_{k+1}^y, u_{k,m})) \right)$ +18: update $q_{k+1,\mathrm{param}} = \operatorname{Proj}_{\mathcal{Q}}(q_{k+1,\mathrm{param}})$ +19: end for +20: calculate noise scheduler $q_K$ from $q_K,\mathrm{param}$ by cosine or sigmoid parameterization +21: sample $\{\tilde{u}_{K,m}\}_{m=1}^M$ from the backward process (5) with $q_K$ and $\theta_K^z$ . +22: Output: $(q_K, \{u_{K,m}^z\}_{m=1}^M)$ . + +original data distribution. The acquisition function used was the expected improvement (EI), defined as: + +$$ +- E I (\lambda) = - \mathbb {E} [ f (\lambda) - f \left(\lambda_ {t} ^ {+}\right) ] +$$ + +where $f(\lambda_t^+)$ represents the best observed value at iteration $t$ . + +Weighted sum. For the weighted sum method, we jointly optimized the reward function and the CLIP score during the fine-tuning of the diffusion model. The optimization was performed by taking the weighted sum of the reward value and the CLIP score, with the weight for the CLIP score set to 0.5. The $\lambda$ values used for the weighted sum method are selected by grid search with the search grid: $\lambda \in \{0.01, 0.1, 1.0, 10.0, 100\}$ . + +# F.2. Application 2: bilevel noise scheduling learning + +This cosine parametrization in (16) covers both the cosine noise scheduler in (Nichol & Dhariwal, 2021) when $q_{s} = 0$ , $q_{e} = q_{\tau} = 1$ and (Chen, 2023) when $q_{\epsilon} = 0$ . Sigmoid parameterization is defined similarly by + +$$ +l (t) = \operatorname {s i g m o i d} \left[ \frac {T - t \left(q _ {e} - q _ {s}\right) - q _ {s}}{\tau T} + q _ {\epsilon} \right] \tag {34} +$$ + +which covers (Chen, 2023) when $q_{\epsilon} = 0$ . Since $q(t)$ should be nondecreasing, we assign $q(t) = 1 - l(t) / l(t - 1)$ . With the use of parameterization, ZO perturbation will be added on $q_{s}, q_{\epsilon}, q_{\epsilon}, q_{\tau}$ instead of directly on $q(t)$ . + +For hyperparameter optimization for noise scheduler, we compare our method against greedy grid search, random search, Bayesian search and the default DDIM. Default parameter choices of DDIM with cosine noise scheduler in (Nichol & Dhariwal, 2021) are $q_{s} = 0$ , $q_{e} = 1$ , $q_{\tau} = 1$ , $q_{\epsilon} = 0.008$ . Default parameter choices of DDIM with sigmoid noise scheduler are $q_{s} = -3$ , $q_{e} = 3$ , $q_{\tau} = 0.1$ , $q_{\epsilon} = -0.5$ according to (Vidhya, 2024). + +(Greedy) grid search. According to the sensitivity analysis shown in Figure 6, the most sensitive parameter is $q_{\tau}$ , while the last three almost equally important. Therefore, in greedy grid search, we tuned the parameters in the order $q_{\tau}, q_{\epsilon}, q_{s}, q_{e}$ . We adopt the following search grid for cosine parametrization and best parameter given by greedy grid search is highlighted: + +$$ +q _ {s} \in \{0, \mathbf {0 . 1}, 0. 2, 0. 3, 0. 4 \} +$$ + +$$ +q _ {e} \in \left\{\mathbf {1}, 0. 9, 0. 8 \right\} +$$ + +$$ +q _ {\tau} \in \{1, 2, 3, 4 \} +$$ + +$$ +q _ {\epsilon} \in \{0. 0 0 5, 0. 0 0 8, 0. 0 1, \mathbf {0 . 0 2}, 0. 0 3, 0. 0 4 \} +$$ + +For sigmoid parametrization, we use the following search grid and the best parameter is highlighted in black: + +$$ +q _ {s} \in \{- 6, - 5, - 4, - 3, - 2, - 1, 0 \} +$$ + +$$ +q _ {e} \in \{2, 3, 4 \} +$$ + +$$ +q _ {\tau} \in \{0. 1, 0. 2, \mathbf {0 . 3}, 0. 4, 0. 5, 1, 1 0 \} +$$ + +$$ +q _ {\epsilon} \in \{- 2, - 1, - \mathbf {0 . 5}, 0, 1 \} +$$ + +Random search. We sample 16 random combinations of $q_{s}, q_{e}, q_{\tau}, q_{\epsilon}$ from $q_{s} \in [0,0.4], q_{e} \in [0.8,1], q_{\tau} \in [1,4], q_{\epsilon} \in [0.005,0.04]$ for cosine parameterization and $q_{s} \in [-6,0], q_{e} \in [2,4], q_{\tau} \in [0.1,1], q_{\epsilon} \in [-2,1]$ for sigmoid parameterization. We report the best-performing results given by the random combination. + +Bayesian search. We use the same range as the random search for Bayesian search and employ the same implementation to the first application. + +Bilevel algorithm. We employ bilevel algorithm in Algorithm 6 and set the initialization of the noise scheduler parameter $q_{s}, q_{e}, q_{\tau}, q_{\epsilon}$ as the default values in DDIM (Nichol & Dhariwal, 2021; Vidhya, 2024). We use a batch size of 128 and choose the number of inner loop $S_{z}$ for $\theta^{z}$ updates as 1. Empirically, we found that, at the beginning of the training process (i.e. when $k = 0$ ), the number of inner loop $S_{y}^{0}$ for updating $\theta^{y}$ should be larger to obtain a relatively reasonable U-Net, but later on, we do not need large inner loop, i.e. we set $S_{y}^{k} = 10$ for $k \geq 1$ . We formalize this stage as initial epoch, where we traverse every batch and set $S_{y}^{0} = 20$ . We choose the ZO perturbation amount as $\nu = 0.01$ . Moreover, Algorithm 6 leverages the warm-start strategy. + +Warm-start strategy. To further accelerate convergence, we avoid fully optimizing the penalty and lower-level problem with respect to $\theta$ for every $q$ . Instead, we employ a warm-start strategy, initializing $\theta$ using its value from the previous epoch (Arbel & Mairal, 2022; Vicol et al., 2022; Sambharya et al., 2024). Empirically, this approach effectively reduces the inner loop for optimizing $\theta$ in the lower-level and penalty problems to 10 and 1, respectively. Moreover, only 3 - 4 outer epochs are needed for optimizing $q$ . Compared to the 100 epochs required for single-level diffusion model training, this significantly enhances the computational efficiency of our method, as shown in Table 3. With only $2.5\times$ the training time of a single-level diffusion model, the bilevel method achieves a $30\%$ improvement over the default model while using just $15\%$ of the time for Bayesian search. + +Exponential moving average (EMA). We also incorporate EMA, which is an indispensable strategy in all high-quality image generation methods to stabilize training (Nichol & Dhariwal, 2021; Song et al., 2021b; Ho et al., 2022; Karras et al., 2022). EMA maintains a running average of model parameters over time, where recent updates are weighted more heavily than older ones so that it smooths out fluctuations in the training process. + +![](images/27d7e461de341ae9250651a3f20fead4db0edc2115e2c429505231d589026616.jpg) +(a) $\lambda = 0.01$ +(b) $\lambda = 0.1$ + +![](images/ccbd5d1d1c3cefd001c58cff1b7028dede35015d622c44e264cd4ce79d5c6875.jpg) +(c) $\lambda = 1.0$ +Figure 8. Balancing the realism and aesthetic in the image generation by controlling the entropy regularization strength parameter $\lambda$ . Prompt: "An African elephant on a foggy morning, with hot air balloons landing in the background." + +![](images/caf5221348270967b18fe57170c0dfd6a4be2d9f4e9dc8954787f96a1e87b0d1.jpg) +(d) $\lambda = 10.0$ + +![](images/a54e1bb644cdadc7dc643464654431d3fc2937e906caf26686a77c17f002eaf2.jpg) +(e) $\lambda = 44.3$ + +![](images/ac6f1b46f6aca616d534b575be8d102fbb0e6dc2bb2cd52f1a91c1451d74c263.jpg) +(f) $\lambda = 100.0$ + +![](images/0b9e48f912ca97abecaf55d2d9b5da507f1f342b2c2bbb19e7056c655c9c106f.jpg) +(a) Grid Search + +![](images/54c191755cc9d14d78df21fd33e1e8dfe2e0cc52d51ec1b4888f5f92774d3373.jpg) +(b) Bayesian Search + +![](images/ac4eaa7ba4c6a61988f369ebfb05fb6320d41a697cbaf5c37ecf1f699496f27d.jpg) +(c) Random Search + +![](images/aa4e76ca04abc26c18c52cba2ced9cb6e7a1302220b1445b1d46c0e7cc2122ed.jpg) +$\mathrm{(FID = 127.04,CLIP = 31.97)}$ +(d) Weighted Sum +$\mathrm{(FID = 108.95,CLIP = 35.87)}$ +Figure 9. Visualization of the final generated images (step-7) by different methods. Prompt: "A realistic photo of a horse standing on lush green grass in a countryside meadow on a sunny day, with clear blue sky in the background." (a) Grid Search: The generated images do not fully adhere to the prompt, as the clear blue sky is often missing. Some images appear more abstract. (b) Bayesian Search: Most images lack a blue sky in the background, and some horses are deformed. (c) Random Search: In certain images, the mane is not well-defined. (d) Weighted Sum: Some images exhibit imperfections in the mane and facial features of the horses. (e) Bilevel: Generates visually striking, highly realistic images that closely align with the given prompt. + +![](images/16121a4a69523971e5238d6a0b24223e5115f7cd10187a7a0204a50cf738c2c6.jpg) +$\mathrm{(FID = 140.35,CLIP = 32.68)}$ +(e) Bilevel +(FID=104.35, CLIP=36.54) + +![](images/dda6b54cd7f5ddd1b5b10ed58633a071fe50209a8002af01c6357bc2b5054a89.jpg) +$\mathrm{(FID = 117.46,CLIP = 34.67)}$ +(f) $\lambda = 0.01$ +$\mathrm{(FID = 403.66,CLIP = 17.58)}$ + +![](images/09125743e5160cba2ac5268980a21504d2e62d14ec779644eb52e10690d8edf0.jpg) +(a) Grid Search + +![](images/c9c053e97ffd591028ab5c378693242621592063bcec90c3c4d0e66249541844.jpg) +(b) Bayesian Search + +![](images/9b8b0356ccdc89a80e5ae2c43adfde9dbed2fe907453dd56401a924079364b1b.jpg) +(c) Random Search + +![](images/ecd9b76b911429094713c1cb95e224ff4694e6bf4ef007b0869adc0f820dd009.jpg) +$\mathrm{(FID = 131.95,CLIP = 31.66)}$ +(d) Weighted Sum +$\mathrm{(FID = 117.95,CLIP = 37.85)}$ +Figure 10. Visualization of the final generated images by different methods. Prompt: "An African elephant on a foggy morning, with hot air balloons landing in the background." (a) Grid Search: Some images exhibit deformed elephant figures, and the hot air balloons are missing. (b) Bayesian Search: The images appear more abstract, with deformed elephants and trees. Elephant is even missing in one figure, while another depicts elephants on top of a tree. (c) Random Search: The elephant and hot air balloons are unclear in some images. (d) Weighted Sum: Struggles to generate a recognizable elephant figure, producing a deformed trunk instead. (e) Bilevel: Generates relatively high-quality images with no visible deformations. + +![](images/a6812026747cca5d3d0cf243c52dffdd2e224468e47ca75ceefa55bcfadb1efe.jpg) +$\mathrm{(FID = 128.15,CLIP = 34.16)}$ +(e) Bilevel +(FID=105.72, CLIP=39.05) + +![](images/068c5ca1603a8385820e95647a0f15651fea343eab726cc2cad3e65b2a947986.jpg) +$\mathrm{(FID = 127.91,CLIP = 36.34)}$ +(f) $\lambda = 0.01$ +$\mathrm{(FID = 440.40,CLIP = 18.78)}$ + +![](images/ad352cfdf7cf364189261c8ce04b1915168d928df1c638dd411a4ee18c5a1d85.jpg) +(a) Grid Search + +![](images/20f16e72c4a419f4bf6745835681cb133d72b310f6f3aba646333e84da05ca4c.jpg) +(b) Bayesian Search + +![](images/e346c418c563019025edae2da3929ed759e862eefc1a6d77053ac4c2adf43cf7.jpg) +(c) Random Search + +![](images/d696de518d8826848560b73285c6ee54c502a53b40313a9bae227720d4a4ab02.jpg) +$\mathrm{(FID = 144.23,CLIP = 31.37)}$ +(d) Weighted Sum +$\mathrm{(FID = 118.91,CLIP = 34.53)}$ +Figure 11. Visualization of the final generated images by different methods. Prompt: "A gentleman wearing white clothes and a beard, posing in a seaside setting." (a) Grid Search: Struggles to generate human faces; images appear blurry. (b) Bayesian Search: Some faces are blurry, and hands are deformed. (c) Random Search: Some face images appear blurry. (d) Weighted Sum: Produces comparatively good-quality images. (e) Bilevel: Generates relatively high-quality images with no visible deformations. + +![](images/6967be034525c28113fd2a03778d43126f8e4a8a3d08b622ca0eab3700638218.jpg) +$\mathrm{(FID = 142.45,CLIP = 32.71)}$ +(e) Bilevel +(FID=112.78, CLIP=36.65) + +![](images/afe777a969bdcd1909fc78569c513d991a68ccb7cd71660a0368593350c293a1.jpg) +$\mathrm{(FID = 121.23,CLIP = 33.97)}$ +(f) $\lambda = 0.01$ +$\mathrm{(FID = 450.34,CLIP = 16.26)}$ \ No newline at end of file diff --git a/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/images.zip b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f93bcdc4835414c8893023042364cef572df6a8b --- /dev/null +++ b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:207fca1bf6317cbd40fced992e99191cc94b1579bb5467271a2e6e042fd3a91b +size 1715505 diff --git a/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/layout.json b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1f8b6b232f8115d543c538959bd027ca6f63a7c2 --- /dev/null +++ b/afirstordergenerativebileveloptimizationframeworkfordiffusionmodels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:758f1aa796a1913d037f48fddc1b9a3a5ee1824373f9db4b860fdd10c63303d2 +size 1278231 diff --git a/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/d0c5f167-7cc6-4dd6-843e-0718ac038eca_content_list.json b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/d0c5f167-7cc6-4dd6-843e-0718ac038eca_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6465768caadafbfc0854ddae3bc65c92ab5d944b --- /dev/null +++ b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/d0c5f167-7cc6-4dd6-843e-0718ac038eca_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6d9e84f55f2e12e344dbff4414b768d0577aeb89b2cffd75a396c1456c0de77 +size 134207 diff --git a/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/d0c5f167-7cc6-4dd6-843e-0718ac038eca_model.json b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/d0c5f167-7cc6-4dd6-843e-0718ac038eca_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d38752d9f1fbd471ff5b16b527c354c272565593 --- /dev/null +++ b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/d0c5f167-7cc6-4dd6-843e-0718ac038eca_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddd265e0376c50337ccb0dd856d9a731f72a50c5d6ac2bc052912a36e26caf1d +size 153570 diff --git a/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/d0c5f167-7cc6-4dd6-843e-0718ac038eca_origin.pdf b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/d0c5f167-7cc6-4dd6-843e-0718ac038eca_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..92c4b1d27b86a16f8df704df64edfa6f90c3dec4 --- /dev/null +++ b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/d0c5f167-7cc6-4dd6-843e-0718ac038eca_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92041757f94b3ada03da3470daf33838a12e2dcc755577a672aa5e87bbb133a1 +size 12475910 diff --git a/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/full.md b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/full.md new file mode 100644 index 0000000000000000000000000000000000000000..93cc56e1949bf31aa2d32b5c86db24d6d842f838 --- /dev/null +++ b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/full.md @@ -0,0 +1,634 @@ +# A Forget-and-Grow Strategy for Deep Reinforcement Learning Scaling in Continuous Control + +Zilin Kang $^{*12}$ Chenyuan Hu $^{*3}$ Yu Luo $^{4}$ Zhecheng Yuan $^{31}$ Ruijie Zheng $^{5}$ Huazhe Xu $^{316}$ + +# Abstract + +Deep reinforcement learning for continuous control has recently achieved impressive progress. However, existing methods often suffer from primacy bias—a tendency to overfit early experiences stored in the replay buffer—which limits an RL agent's sample efficiency and generalizability. In contrast, humans are less susceptible to such bias, partly due to infantile amnesia, where the formation of new neurons disrupts early memory traces, leading to the forgetting of initial experiences (Akers et al., 2014). Inspired by this dual processes of forgetting and growing in neuroscience, in this paper, we propose Forget and Grow (FoG), a new deep RL algorithm with two mechanisms introduced. First, Experience Replay Decay (ER Decay)—“forgetting early experience”—which balances memory by gradually reducing the influence of early experiences. Second, Network Expansion—“growing neural capacity”—which enhances agents' capability to exploit the patterns of existing data by dynamically adding new parameters during training. Empirical results on four major continuous control benchmarks with more than 40 tasks demonstrate the superior performance of FoG against SoTA existing deep RL algorithms, including BRO, SimBa and TD-MPC2. + +![](images/bfde5fc687e3f19ebe9ab958c6628a3fab2f02157f37ba9a2ba938a9b4d0bd5b.jpg) + +![](images/207cf5f6f305a9b691fa4f6f9132724e764f86cc9247219dbfad60d34f67f4cd.jpg) + +![](images/1179708081691dca948c3b9d66c4662b1c67a191841019952ac8ee4d25a91f52.jpg) + +![](images/eedaae0a35aed96537d88f46e7ea8b5b3b15e3da800c8ba0898c96b9c00361a0.jpg) +Figure 1. Overview. Top: we illustrate two key components of our strategy: ER Decay and Network Expansion. Bottom: comparison of normalized score. FoG outperforms popular model-based and model-free methods including TD-MPC2, SimBa and BRO. + +![](images/73dd2ef9e1c3149835bec4fd9ea29c2375757c775d25e6e79c48fdfd5177d4cb.jpg) + +![](images/c3990335b374855ee413690a0ee346517a3f1687049ff5f738b9ab39d3ba2006.jpg) + +![](images/94a20a7ebe2d211fc31d2eddbf48c97a35cbdb77bd598cc0a54624d5b91a96cd.jpg) + +![](images/ee491682767ee28b82ee2433f38969728123c69a88ecb6c1fd16c48901936798.jpg) + +# 1. Introduction + +Do humans remember learning how to speak or walk? For the majority, the answer is no. This phenomenon, known as infantile amnesia in neural science (Josselyn & Frankland, 2012), occurs because the hippocampus generates a large number of new neurons during infancy, which disrupts existing memory traces and leads to forgetting (Alberini & Travaglia, 2017). Observed in humans and other mammals, this phenomenon plays a critical role in the development of memory and learning abilities. + +![](images/7feb8d86c883bb93aee05239406c9d394a4db9dc78c4fd4215a28caa7e72e88e.jpg) +Figure 2. Normalized scores of algorithms on DMC-Hard tasks (5 hardest Dog & Humanoid tasks). The performance of the OBAC+scaling method is comparable to that of SimBa and BRO, but when combined with FoG, it achieves superior results. + +However, in the field of deep reinforcement learning, agents typically do not have a natural mechanism to forget their early training experiences. Instead, they often overfit to initial data, which is often described as primacy bias (Nikishin et al., 2022b; Qiao et al., 2023). In particular, deep RL methods that rely heavily on experience replay (Mnih et al., 2015; Fedus et al., 2020) with high replay ratios (D'Oro et al., 2022) tend to repeatedly revisit old transitions, reinforcing patterns formed in the early stage of training. + +To address this issue, previous works (Nikishin et al., 2022b; Qiao et al., 2023) have introduced a reset mechanism that periodically resets part of the policy's network parameters. While resets partially reduce primacy bias, the older samples are still replayed more frequently than the newer ones. Thus, this imbalance could still lead to overfitting on the old experience, harming the overall performance. + +To draw a parallel, infantile amnesia involves two key aspects—forget and grow. During infancy, the brain generates a large number of new neurons, which not only disrupt existing memory traces and lead to forgetting but also provide the capacity for reorganizing and forming new structures critical for memory and learning. This phenomenon inspires + +our question: can reinforcement learning agents follow a similar process, combining forgetting and growth, to mitigate primacy bias and improve performance? + +Our answer is affirmative, with two novel methods: Experience Replay Decay (ER Decay) and Network Expansion, both of which are simple and efficient. ER Decay reduces the sampling probability of older data in the replay buffer, effectively allowing the agent to "forget" outdated transitions in a way analogous to the memory disruption observed in infantile amnesia. Meanwhile, Network Expansion introduces new neurons to the model early in training, providing fresh capacity to adapt and reorganize, much like the growth of new neurons in infancy. + +Together, these methods are directly inspired by the "forget and grow" mechanism observed in infantile amnesia, and they work in tandem to suppress primacy bias and enhance overall performance. + +In this work, we give theory-based intuition on how does such a "forgetting plus growth" mechanism work, and we provide a thorough empirical investigation of its effectiveness. We also propose a new algorithm Forget-and-Grow (FoG), which integrates these methods into the OBAC algorithm (Luo et al., 2024) and further boosts performance using scaled networks and replay ratios. Our approach achieved highly competitive results across more than 40 environments in several benchmarks, including Mujoco (Todorov et al., 2012), DMControl (Tassa et al., 2018), Meta-World (Yu et al., 2020), and HumanoidBench (Sferrazza et al., 2024) surpassing popular methods including SimBa (Lee et al., 2024), BRO (Hansen et al., 2024) and TD-MPC2 (Hansen et al., 2024) in multiple settings. + +To summarize, the contributions of this paper are three-fold: + +1. We show empirically that reset mechanisms alone cannot fully resolve the primacy bias issue. +2. We introduce two strategies: ER Decay and Network Expansion, demonstrating their effectiveness in mitigating primacy bias. +3. Develop a new deep continuous control algorithm FoG, achieving state-of-the-art performance across several benchmarks. + +# 2. Related Works + +Off-policy RL. Off-policy reinforcement learning is a frequently used paradigm where agents learn policies from data generated by previous policies (Mnih et al., 2015; Munos et al., 2016; Prudencio et al., 2023; Ma et al., 2024), allowing for more efficient use of prior experiences. Due to the advantage of improving sample efficiency, it is widely used in scenarios where collecting on-policy data is costly + +or risky. Many approaches focus on real-world application (Delarue et al., 2020; Yang et al., 2022) and algorithmic improvements such as reducing bias in Q-value estimation (Fujimoto et al., 2018; Lan et al., 2021), better utilizing offline datasets (Fujimoto et al., 2019; Schaul et al., 2016), and integration with other paradigms (Luo et al., 2024; Tan et al., 2024). + +Primacy bias. The concept of primacy bias in deep reinforcement learning (RL) refers to the overfitting of policies to earlier experiences when training on progressively growing datasets, which can negatively impact the following learning process (Nikishin et al., 2022a). This phenomenon is particularly problematic under high replay ratios, where policies overfit to out-of-distribution data from past experiences, as noted by Li et al. (2023); Lyu et al. (2023). One straightforward approach to mitigate primacy bias is reinitializing the network to restore plasticity, as explored by Nikishin et al. (2022b); Ma et al. (2023); Nauman et al. (2024b). There are other methods to alleviate the problem including model ensembles (Chen et al., 2021), regularization (Kumar et al., 2023b), plasticity injection (Nikishin et al., 2023), and ReDo (Sokar et al., 2023). These approaches aim to balance stability and adaptability, reducing the impact of primacy bias and enhancing overall learning performance + +Experience replay. To better utilize the previous experience and improve sample efficiency, Lin (1992) propose the concept of experience replay, which revisits transitions in the replay buffer with a uniform sampling strategy to update the agent. Following Lin (1992), Prioritized Experience Replay (Schaul et al., 2016) measures the priority of transitions according to the magnitude of their temporal-difference (TD) error so that the agent can focus on transitions that are more important to improve sample efficiency. Andrychowicz et al. (2018) introduces Hindsight Experience Replay (HER) which incorporates a set of additional goals into each trajectory to avoid complicated reward engineering. Zhang & Sutton (2018) proposes Combined Experience Replay (CER) that adds the latest transition to the batch and uses the corrected batch to train the agent. Corrected Uniform Experience Replay (CUER) (Yenicesu et al., 2024) also adopts the idea of balancing the sampling of the transitions in the replay buffer to make the sampling distribution more uniform considering the whole training process. + +Model capacity improvement in RL. The most straightforward way to improve model capacity is model size scaling (Hestness et al., 2017). However, in RL, naive scaling can lead to instability or degraded performance (van Hasselt et al., 2018; Sinha et al., 2020; Bjorck et al., 2022). High-capacity models have shown effectiveness in offline RL (Kumar et al., 2023a; Lee et al., 2022) and model-based RL (Hafner et al., 2024; Hansen et al., 2024; Hamrick + +et al., 2021). As for off-policy RL, model size scaling has exhibited advantages for both discrete action representation (Schwarzer et al., 2023) and continuous control (Nauman et al., 2024b). + +Besides scaling, internal structural changes, such as activation functions and normalization, also improve capacity. For example, TD-MPC2 (Hansen et al., 2024) enhanced model performance by incorporating LayerNorm to stabilize gradients, Mish as a smoother activation function, and SimNorm to maintain stable updates across layers. Similarly, Nauman et al. (2024a) demonstrated that LayerNorm and residual connections significantly enhance performance, while SimBa (Lee et al., 2024) used running statistics normalization, residual feedforward blocks, and post-Layer normalization to address simplicity bias. These modifications highlight that structural improvements, alongside careful scaling, are crucial for leveraging high-capacity models effectively in RL. + +# 3. Method + +# 3.1. A Motivating Example + +Primacy bias has been studied in previous works (Nikishin et al., 2022b; Qiao et al., 2023), and a common approach to mitigate it is to adopt a reset strategy. However, even if an agent resets multiple times during training, experience replay remains imbalanced: older transitions dominate the sampling process. The following theorem formalizes this issue: + +Theorem 3.1. Given a uniformly sampled replay buffer $\mathcal{D}$ that stores $N$ sequentially added transitions $\{\kappa_1,\kappa_2,\dots ,\kappa_N\}$ , the earliest transition is sampled $\Omega (\beta \log N)$ times in expectation, where $\beta$ (the product of replay ratio and batch size) is a constant. + +More specifically, for any transition $\kappa_{t}$ (with $t > 1$ ), its expected number of samples $\mathbb{E}[n_t]$ satisfies: + +$$ +\ln \frac {N}{t - 1} + \frac {1}{N} - 1 < \frac {\mathbb {E} [ n _ {t} ]}{\beta} < \ln \frac {N}{t - 1} + 1 - \frac {1}{t - 1}. +$$ + +Proof. See Appendix A. + +![](images/4cbd599527ca3b5a1dd78a5cb2d1dded250439a3bbe560fdbeb3a1a38a80473d.jpg) + +This result indicates that older transitions are sampled considerably more often, regardless of how frequently resets happen. In fact, shorter reset intervals often lead to higher replay ratios and can even exacerbate primacy bias. To verify this, we train four agents on humanoid-walk and HalfCheetah-v4 with a replay ratio of 10 and batch size of 256 (i.e., $\beta = 2560$ ). To ensure stability of training under such a high replay ratio, we add a layernorm after every dense layer. + +![](images/b244833bf566669068161d8f71f5e4ada8319519c4137d6ce87a0cc132c7ef13.jpg) + +![](images/9ee174696b8eb8f804764b822f2156b2d0e567f65c226ae2a848550b86665696.jpg) + +![](images/d121cf684491b7c29379494d9e8f8195e562926dccf770199b9b84ad93def92d.jpg) + +![](images/0bbf793cf7960823772dbc51c6a39e5aa56867f4752a8dbafe53207bf28871a3.jpg) +Figure 3. Learning Curves and Heat Maps of SAC Variants. Top Left: Return curves of various SAC variants in humanoid-walk. Top Center: Critic loss heatmap of Normal SAC in humanoid-walk. Top Right: Critic loss heatmap of SAC with reset in the humanoid-walk environment. Bottom Left: Return curves of various SAC variants in the HalfCheetah-v4. Bottom Center: Critic loss heatmap of Balanced SAC in humanoid-walk. Bottom Right: Critic loss heatmap of Expanded SAC in humanoid-walk. About Critic Loss Heatmaps: Every 100k steps, we measure critic loss over the entire buffer and average the loss every 100k steps to get critic loss heatmaps. The darker the color near the diagonal, the less influenced by primacy bias; conversely, the darker the color towards the top-right corner indicates greater influence from primacy bias. + +![](images/6264a5ce2a40ff8ce56309f00d7290bbc8d027d83205c2f661acbba26b82491a.jpg) + +![](images/b1d97543bbd8c2360192e7dae199e43a96d9b7f3056d42e45685c359f4ee1817.jpg) + +- SAC: A baseline Soft Actor-Critic agent (Mnih et al., 2015) with uniform replay buffer and no resets. +- SAC with reset: SAC that resets at 15k, 50k, 100k, 200k, 400k, 600k, and 800k steps. +- PER-SAC: Based on SAC with reset, plus PER (prioritized experience replay) (Schaul et al., 2016). +- Balanced SAC: Based on SAC with reset, plus our ER decay mechanism to mitigate primacy bias, with $\epsilon = 1e - 4$ , $\tau = 1e - 1$ . +- Expanded SAC: Based on SAC with reset, plus both ER decay and network expansion, which expands critic networks from 3 dense layers to 7 dense layers, at 50k and 200k network iterations after each reset, 2 layers at a time. + +We measure the critic loss across the buffer every 100k steps to generate critic loss heatmaps. As shown in Figure 3, the critic loss of Normal SAC is significantly higher than that of other SAC variants that incorporate resets, indicating its failure to fit the data after millions of updates. Even SAC with reset experiences a spike in loss in the diagonal areas as training progresses. This suggests that, despite multiple resets, the SAC with reset agent still overfits to early data and fails to adapt effectively to newer transitions. This observation highlights that resetting alone is insufficient to mitigate primacy bias. + +In contrast, Expanded SAC exhibits a darker diagonal area, indicating that the model is less influenced by primacy bias, with little to no increase in loss over time. Not only does Expanded SAC reduce the loss on recent transitions more effectively than SAC with reset, but it also achieves superior + +performance across both tasks. Specifically, it delivers $53\%$ and $27\%$ improvements in final scores on humanoid-walk and HalfCheetah-v4, respectively, compared to SAC with reset. Furthermore, Expanded SAC outperforms recent methods like SimBa (Lee et al., 2024) by $74\%$ and $22\%$ , while maintaining a simpler design. + +Although this small-scale experiment is not exhaustive, it underscores the critical role of addressing primacy bias in experience replay and provides strong motivation for our proposed method. + +# 3.2. Experience Replay Decay and Network Expansion + +Experience replay decay. We incorporate a decay factor into experience replay so that the sampling probability of older transitions gradually decreases. This strategy partially "forgets" older samples and mitigates primacy bias. + +Theorem 3.2. Let $\mathcal{D}$ be a replay buffer with ER decay $\epsilon$ . For any transition $\kappa_{i}$ in $\mathcal{D}$ , the expected number of times it is sampled, $\mathbb{E}[n_i]$ , is bounded by a constant $C$ . + +Proof. See Appendix A. + +![](images/9a777afc8032d21bb66a1cdd28b7562660175e0448633eb40b41c98931c47526.jpg) + +This result implies that the sampling frequency of older transitions stays within a constant range. However, a purely exponential decay quickly diminishes the sample weight of older transitions, causing them to virtually disappear from the replay buffer. This effectively reduces the buffer size and, in practice, can harm the final performance. Therefore, we set a lower bound for sampling weights: + +$$ +w _ {\{t, i \}} = \max \big (\tau , (1 - \epsilon) ^ {t - i} \big), +$$ + +where $\epsilon$ is the decay rate, $\tau$ is the minimum weight, and the sampling probability of transition $\kappa_{i}$ at time $t$ is: + +$$ +P _ {\{t, i \}} = \frac {w _ {\{t , i \}}}{\sum_ {j = 1} ^ {t} w _ {\{t , j \}}}. +$$ + +Simulation (see Figure 4) shows that ER decay can effectively suppress sample times of older transitions and balance the sample times of transitions across a large range of steps. + +During the experiments, we compared the performance of our ER decay method with Prioritized Experience Replay (PER). PER assigns higher replay weights to transitions with larger TD errors. In the previously discussed motivating example, we analyzed the loss landscape of both PER and ER decay. As demonstrated in Figure 5, the value in the diagonal row of ER Decay is generally smaller than those of PER, which indicates that ER Decay may better alleviate primacy bias. Experimentally, ER decay achieved a significant advantage over PER in the motivating example. This result was further validated through ablation studies conducted on a broader range of scenarios. + +![](images/f09e39e562b5b59f518b1da9d2029865a15a79976938bd4b8a2538c7d8074047.jpg) +Figure 4. Sample times of transitions in a normal buffer and a decayed buffer with $\epsilon = 1e - 4,\tau = 0.01$ over $100\mathrm{k}$ steps. + +![](images/6f46f313bbf315b882cdb99812fc660b8f00f14bae03510da6ed20a0a4a0ac5b.jpg) +Figure 5. Changes in critic loss over time for PER(left) and ER decay(right) in humanoid-walk. The darker the color near the diagonal, the less influenced by primacy bias; conversely, the darker the color towards the top-right corner indicates greater influence from primacy bias. + +![](images/5651735cb241b00bf882c851b96a9220d7727854ed4df9f225148eb235d0da57.jpg) + +Network expansion. Early training relies heavily on initial transitions in replay buffer, which often deviate significantly from the final policy distribution. Yet during this stage, the neural network has the highest plasticity. To address this, we propose network expansion, inspired by infantile amnesia in mammals. The method involves gradually adding new parameters to the critic network early in training (e.g., after each reset) through residual connections. These newly added parameters are not influenced by early transitions, enabling better adaptation to data shifts when combined with ER decay. + +Our network structure is based on BRO's design, which incorporates layer normalization after each dense layer and residual connections for parameter management. Building on this, we modularized the network into distinct blocks, facilitating the implementation of network expansion. + +Although starting with a large network can provide better + +![](images/8773e50595da9a838d5034f74134487bc706c77cf57a488b55c5eff4fbc372be.jpg) +Figure 6. Network expansion illustration. We initialize networks with fewer parameters and progressively add a new block (in the frame) to residual connections at each expansion step. + +performance in the early stages of training, it tends to encounter early convergence issues in the mid-to-late stages. In contrast, agents trained with network expansion adapt more effectively to changing training objectives. This observation is further validated in the FoG algorithm. Even when training begins with a network significantly larger than the one used in the motivating example, without network expansion, the agent is highly prone to loss explosions under larger replay ratios. This directly impacts the agent's stability. Therefore, network expansion is a necessary component in FoG. For more details, refer to Section 4. + +A similar idea, called plasticity injection (Nikishin et al., 2023), also involves network expansion. However, compared to the complex parameter adjustments required by plasticity injection, our approach is simpler to implement, imposing minimal constraints. Our experiments demonstrate its superior performance and efficiency. + +# 3.3. The Forget and Grow Strategy (FoG) + +We combine ER decay and network expansion into a unified algorithm, FoG, built on the following key ideas: + +OBAC backbone. Our FoG is based on the Offline Boosted Actor-Critic (Luo et al., 2024). OBAC enhances online policies using offline data and demonstrates strong performance across various standard benchmarks. + +Scaled critic networks and replay ratio. For scaling up the networks, we utilize a larger network for the critic. To increase flexibility, we modularized the network structure, constructing the critic entirely from blocks connected via residual connections. Each block contains two dense layers, each followed by a layer normalization. This modular architecture proves highly compatible with our FoG mechanism. + +Additionally, we increase the replay ratio to 10 and introduce a reset list to manage the agent's reset behavior effectively. + +ER decay and network expansion. We introduce ER decay into the replay buffer, where older transitions are assigned lower sampling probabilities, and apply network expansion to the critic networks early in training. Together, these methods embody the concept of forget and grow, allowing the agent to better adapt to shifts in replay data. While simply scaling up OBAC yields performance on par with SimBa or BRO, the forget-and-grow approach is crucial for FoG's superior performance. + +# 4. Experiment + +To evaluate the performance of FoG, we collect in total 41 tasks from 4 domains: Mujoco (Todorov et al., 2012), DM-Control (Tassa et al., 2018), Meta-World (Yu et al., 2020), and HumanoidBench (Sferrazza et al., 2024), covering a wide range of challenges, including high-dimensional states and actions, sparse rewards, multi-object and delicate manipulation, and complex locomotion. The implementation details and environment settings are provided in Appendix B. + +Baselines. We compare FoG against 3 state-of-the-art off-policy RL algorithms, including 2 model-free methods and 1 model-based method. Our baselines contain: 1) BRO (Nauman et al., 2024b), which scales the critic network of SAC while integrating distributional Q-learning, optimistic exploration, and periodic resets. 2) SimBa (Lee et al., 2024), which adopts running statistics normalization, residual feedforward blocks, and post-layer normalization to address simplicity bias. 3) TD-MPC2 (Hansen et al., 2024), a high-efficient model-based RL method that combines model predictive control and TD-learning. + +# 4.1. Experimental Results + +Figure 7 presents the learning curves that demonstrate the performance of FoG alongside various baselines across diverse task suites. Overall, we observe that FoG typically outperforms most model-free and model-based baselines across various environments in terms of exploration efficiency and asymptotic performance. In HumanoidBench, FoG also exhibits comparable capabilities to the best baseline TD-MPC2. + +Notably, with identical hyperparameters, FoG achieves consistently high performance across all benchmarks. Other baselines have certain weaknesses in some benchmarks. Due to the task-specific done signal setting, TD-MPC2 may perform poorly on Mujoco. SimBa gets lower scores in simple environments with small action dimensions, such as Mujoco and DMC-Easy while BRO performs worse in more complex environments with high action dimensions, such as DMC-Hard and HumanoidBench. + +The key takeaway is that with very simple algorithmic + +![](images/df8fa13b55eaa4f56555a333e5ea3e09b51fb93ffce65cd440254af063457e33.jpg) + +![](images/5344c25d88ccd0982f84764920608dd9cf58862141fb5bedb0baea6ef493aeb2.jpg) + +![](images/ab8b606bfc16f1af825f58bafaa4e38f26c4695b6db91d261422a687a3fe8407.jpg) + +![](images/7a36045d88909fdf88160d9f7155e8a991530f0afa69a1ac8bc5df241fd8bdd1.jpg) + +![](images/92506f051467e3218160b6d448a663abef7b480c3e64598e8ecd50df77d75c4d.jpg) + +![](images/fc2f167148c87dffc2ae844f4cdc4ba2a0a95d6356b279e854c8fb5d84a53c6a.jpg) + +![](images/328c4586733aad3005042805e84fcfaed9d4f9f0f1865694c8fd92f849e7ca57.jpg) + +![](images/1c99a1732676ef0a7d8a1245d63cbc18c2ddad2aef0d4b60dccfa6c630a94f3a.jpg) + +![](images/3dbf35fbd7c092f7d7de3dd1a24d64f80c19d52b793ff3b58fbbb63a37d35fe2.jpg) + +![](images/d50bba49ed3a08ea280498f35d2a48107a0bdc76fc1c79b5e2a78d8703e10481.jpg) + +![](images/ce91f6db8a68d8ff4cce275de9dfdecc6a0fad4443ff6cb50973b21b7af57c84.jpg) + +![](images/73b3f4d54b3b46f1ec431edb7209bc025f42b64808dd76d316b94648f4f92821.jpg) + +![](images/b4ffda917064397378df708a653ad792df0d9b2f412b11131d016c15fd61e858.jpg) +Figure 7. Main results. We provide performance comparisons for 16 of the 41 tasks, four for each task suite. Please refer to Appendix C for the comprehensive results. The solid lines are the average return/success rate, while the shades indicate $95\%$ confidence intervals. All algorithms are evaluated with 3 random seeds. + +![](images/dcb9fe5e61a78a01bedb335c6b7922a15fbcb2bc777ac44ddad98a8959da699f.jpg) + +![](images/713b7c8a38d43152121ed71b13c4683961919b64fa486c4f198c682db41eb55a.jpg) + +![](images/34a8f4fe33cf96e82049447b278db6da6a65b454486850a0f64a30fa9fa2821b.jpg) + +changes, including ER decay, network expansion, and simple model structure modifications, FoG successfully overcomes primacy bias and achieves better performance. Notably, previous studies found that model performance saturated when the model parameters reached 5M (Nauman et al., 2024b). However, with the help of network expansion, FoG unlocks new levels of favorable model size scaling up to 23M parameters. We will discuss in detail the performance improvements from each modification in the upcoming ablation section. + +# 4.2. Ablation Studies + +We conduct several ablations to demonstrate the effectiveness of the design choices of FoG in this section. + +Choice of experience replay methods. One of the key designs of our algorithm is ER decay, which gradually decreases the sampling weight of older transitions. To evaluate its effectiveness, we implement other experience replay methods including PER and CUER. For the sake of fairness, we simply replace the experience replay method of FoG while keeping other parts unchanged for comparison. Additionally, we also test the results without using any experience replay method. Results are shown in Figure 8. We observe that both using PER and ER decay significantly improve the final performance and convergence speed, with ER decay showing the best results. However, the improvement with CUER is marginal. In certain cases, CUER provides no improvement. + +![](images/05663fde1cd36ba1adb728ec0f994af44edd919a79a5c492be040f297b5d3841.jpg) +Figure 8. Choice of experience replay methods. We adopt 4 tasks from Mujoco and DMControl, two for each task suite, to compare different experience replay methods. Mean of 3 runs; shaded areas are $95\%$ confidence intervals. + +![](images/b38acda50d4a2e4ba8b0a787fe4b6c71e52f3ec39d71cb350680a492b67e2d0d.jpg) + +![](images/ad0963bbdba03eb59547ad20c2ce2c6f89ff46f3860474530a2d8d8fe49ed842.jpg) + +![](images/705c2553b5dd7fc33ba1dd7104d0e1bc6d5e9148915838c2fc180d30e830d2f7.jpg) + +![](images/1a35115f18545d649b5f08c432dd281f204819b59306ff042208fc54bae856d4.jpg) +Figure 9. Ablation on network expansion. We adopt 4 tasks from Mujoco and DMControl, two for each task suite, to showcase the necessity of network expansion. Mean of 3 runs; shaded areas are $95\%$ confidence intervals. + +![](images/0fee2ebc341bce9a9fbeeb602f030147bd7bcb4ad01e9913533222a8a9464f5a.jpg) + +![](images/5f69fd9bbb4343be246914972c789319659b71de1629c010acc12daff8b79ae9.jpg) + +![](images/90b4d1b7cd26f667408dd870763e49d234e80913c75128ea516557fe10db3ab7.jpg) + +![](images/cf593afe5c5ffaa032753d59d8fdeeaa295ea0eefcce3e57f561039fc7c8d405.jpg) +Figure 10. Critic buffer loss with and without network expansion. We visualize the critic buffer loss of the first 300k steps for the 2 tasks of DMControl suite. Mean of 3 runs; shaded areas are $95\%$ confidence intervals. + +![](images/d588bb057da649d84b4501887a7bfeadced6381a8bb290f68e7ab60bff0d5925.jpg) +Figure 11. Dormant ratio during training. We measure the ratio of dormant neurons during training on HalfCheetah-v4 and humanoid-walk. Red lines indicate time steps where network expansion happens. + +Necessity of network expansion. To establish the importance of network expansion in our Framework of Growth (FoG), we conducted a series of experiments. Firstly, we compared the standard FoG, which incorporates dynamic network expansion, against versions with a fixed model size, denoted FoG (fixed). These fixed models were configured with either 2 or 4 additional blocks, and network expansion was disabled. As illustrated in Figure 9, enabling network expansion leads to a discernible performance improvement over both fixed-size configurations. The critic buffer loss, presented in Figure 10, offers insight into this advantage: after resetting the network, the critic buffer network overfits early transitions and generate incorrect behavior cloning + +![](images/34b20ca095963cdf7e10cb29f5ef6f5d82f26604da4849396104c709c92e8a85.jpg) + +![](images/ca609f9e489056128875205ffe3f686c4a64fcf917bff0d1afb0cfaae89a1e54.jpg) + +signals, causing the loss to explode. However, network expansion helps to suppress this excessive catastrophic growth in the loss. + +Furthermore, network expansion significantly enhances model plasticity by reducing the prevalence of dormant neurons. Activated neurons, characterized by non-zero gradients, can be updated by new data, whereas dormant neurons remain static during training. Consequently, a higher ratio of dormant neurons indicates a more severe loss of plasticity. This metric has been adopted in several recent studies as an indicator of a model's representational capacity and plasticity degradation (Liu et al., 2024; Sokar et al., 2023; Xu et al., 2023). Our experiments, shown in Figure 11, reveal that + +![](images/fb690fc8fb35ef9d3312979ca321d09819874541b440926be1a0650d5f0651c2.jpg) +Figure 12. T-SNE visualization of representations. We visualize the representations via t-SNE after training 0.2M steps on HalfCheetah-v4. From left to right are the t-SNE results of 2 blocks, 4 blocks and expansion from 2 to 4 blocks. + +FoG effectively reduces the number of dormant neurons. Notably, this reduction is achieved even when compared to baseline models that, despite possessing a larger overall parameter count than a fully expanded FoG agent, do not employ network expansion. This highlights the efficacy of the expansion mechanism itself. Moreover, steep drops in the dormant neuron ratio are consistently observed immediately following network expansion events, underscoring its direct role in reactivating parts of the network. + +To further understand how the expanded network adapts to new memories and improves representations, we conducted a representation analysis on the HalfCheetah-v4. We sampled experiences from the replay buffer, passed them through the critic network, and extracted features from the final layer for t-SNE visualization in a 2D space. We compared three settings: FoG with network expansion, FoG (fixed) with 2 blocks, and FoG (fixed) with 4 blocks. As depicted in Figure 12, network expansion facilitates the formation of clearer clusters in the feature space. This observation suggests that network expansion enables the learning of better-separated and more structured representations, contributing to the overall performance gains. + +# 5. Conclusion + +In this work, we propose Forget-and-Grow (FoG), which effectively addresses the primacy bias problem in deep continuous control through two simple yet effective methods: ER decay and network expansion. By incorporating forget and grow, FoG enables agents to mitigate the overfitting to early experiences and boost their performance across various continuous control tasks. Abundant experiment results show the superiority of FoG compared with existing state-of-the-art off-policy RL and model-based RL algorithms, including BRO, SimBa and TD-MPC2. Our findings reveal a new perspective to alleviate the primacy bias, highlighting the potential of integrating inspired cognitive mechanisms into reinforcement learning frameworks. While FoG outperforms existing algorithms across various continuous control tasks, it is important to note that the increased computa + +tional complexity and longer training times may limit its practicality in scenarios that require rapid training. Additionally, the effectiveness of our two strategies is primarily supported by empirical experiments and intuitive theoretical insights, lacking a thorough and in-depth investigation into their mechanisms. Future works include seeking theoretical guarantees for the FoG strategies and applying the Forget-and-Grow strategy to a broader range of algorithms. + +# Impact Statement + +This work contributes to advancing the field of Reinforcement Learning (RL), particularly in the domain of off-policy RL algorithms. The proposed algorithm holds potential implications for real-world applications, especially in areas such as robotics. It's worth noting that exploration of an RL agent in real-world environments may require several safety considerations to avoid unsafe behavior during the process. + +# References + +Akers, K. G., Martinez-Canabal, A., Restivo, L., Yiu, A. P., De Cristofaro, A., Hsiang, H.-L., Wheeler, A. L., Guskjolen, A., Niibori, Y., Shoji, H., et al. Hippocampal neurogenesis regulates forgetting during adulthood and infancy. Science, 344(6184):598-602, 2014. +Alberini, C. M. and Travaglia, A. Infantile amnesia: a critical period of learning to learn and remember. Journal of Neuroscience, 37(24):5783-5795, 2017. +Andrychowicz, M., Wolski, F., Ray, A., Schneider, J., Fong, R., Welinder, P., McGrew, B., Tobin, J., Abbeel, P., and Zaremba, W. Hindsight experience replay, 2018. URL https://arxiv.org/abs/1707.01495. +BJORCK, J., Gomes, C. P., and Weinberger, K. Q. Towards deeper deep reinforcement learning with spectral normalization, 2022. URL https://arxiv.org/abs/2106.01151. +Chen, X., Wang, C., Zhou, Z., and Ross, K. Randomized ensembled double q-learning: Learning fast without a model, 2021. URL https://arxiv.org/abs/2101.05982. +Delarue, A., Anderson, R., and Tjandraatmadja, C. Reinforcement learning with combinatorial actions: An application to vehicle routing, 2020. URL https://arxiv.org/abs/2010.12001. +D'Oro, P., Schwarzer, M., Nikishin, E., Bacon, P.-L., Bellemare, M. G., and Courville, A. Sample-efficient reinforcement learning by breaking the replay ratio barrier. In Deep Reinforcement Learning Workshop NeurIPS 2022, 2022. + +Fedus, W., Ramachandran, P., Agarwal, R., Bengio, Y., Larochelle, H., Rowland, M., and Dabney, W. Revisiting fundamentals of experience replay. In International conference on machine learning, pp. 3061-3071. PMLR, 2020. +Fujimoto, S., Hoof, H., and Meger, D. Addressing function approximation error in actor-critic methods. In International conference on machine learning, pp. 1587-1596. PMLR, 2018. +Fujimoto, S., Meger, D., and Precup, D. Off-policy deep reinforcement learning without exploration, 2019. URL https://arxiv.org/abs/1812.02900. +Haarnoja, T., Zhou, A., Abbeel, P., and Levine, S. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor, 2018. URL https://arxiv.org/abs/1801.01290. +Hafner, D., Pasukonis, J., Ba, J., and Lillicrap, T. Mastering diverse domains through world models, 2024. URL https://arxiv.org/abs/2301.04104. +Hamrick, J. B., Friesen, A. L., Behbahani, F., Guez, A., Viola, F., Witherspoon, S., Anthony, T., Buesing, L., Velicković, P., and Weber, T. On the role of planning in model-based deep reinforcement learning, 2021. URL https://arxiv.org/abs/2011.04021. +Hansen, N., Su, H., and Wang, X. Td-mpc2: Scalable, robust world models for continuous control, 2024. URL https://arxiv.org/abs/2310.16828. +Hestness, J., Narang, S., Ardalani, N., Diamos, G., Jun, H., Kianinejad, H., Patwary, M. M. A., Yang, Y., and Zhou, Y. Deep learning scaling is predictable, empirically, 2017. URL https://arxiv.org/abs/1712.00409. +Josselyn, S. A. and Frankland, P. W. Infantile amnesia: a neurogenic hypothesis. Learning & Memory, 19(9): 423-433, 2012. +Kumar, A., Agarwal, R., Geng, X., Tucker, G., and Levine, S. Offline q-learning on diverse multi-task data both scales and generalizes, 2023a. URL https://arxiv.org/abs/2211.15144. +Kumar, S., Marklund, H., and Roy, B. V. Maintaining plasticity in continual learning via regenerative regularization, 2023b. URL https://arxiv.org/abs/2308.11958. +Lan, Q., Pan, Y., Fyshe, A., and White, M. Maxmin q-learning: Controlling the estimation bias of q-learning, 2021. URL https://arxiv.org/abs/2002.06487. + +Langley, P. Crafting papers on machine learning. In Langley, P. (ed.), Proceedings of the 17th International Conference on Machine Learning (ICML 2000), pp. 1207-1216, Stanford, CA, 2000. Morgan Kaufmann. +Lee, H., Hwang, D., Kim, D., Kim, H., Tai, J. J., Subramanian, K., Wurman, P. R., Choo, J., Stone, P., and Seno, T. Simba: Simplicity bias for scaling up parameters in deep reinforcement learning. arXiv preprint arXiv:2410.09754, 2024. +Lee, K.-H., Nachum, O., Yang, M., Lee, L., Freeman, D., Xu, W., Guadarrama, S., Fischer, I., Jang, E., Michalewski, H., and Mordatch, I. Multi-game decision transformers, 2022. URL https://arxiv.org/abs/2205.15241. +Li, Q., Kumar, A., Kostrikov, I., and Levine, S. Efficient deep reinforcement learning requires regulating overfitting, 2023. URL https://arxiv.org/abs/2304.10466. +Lin, L.-J. Self-improving reactive agents based on reinforcement learning, planning and teaching. Machine learning, 8:293-321, 1992. +Liu, J., Obando-Ceron, J., Courville, A., and Pan, L. Neuroplastic expansion in deep reinforcement learning. arXiv preprint arXiv:2410.07994, 2024. +Luo, Y., Ji, T., Sun, F., Zhang, J., Xu, H., and Zhan, X. Offline-boosted actor-critic: Adaptively blending optimal historical behaviors in deep off-policy rl. arXiv preprint arXiv:2405.18520, 2024. +Lyu, J., Wan, L., Lu, Z., and Li, X. Off-policy rl algorithms can be sample-efficient for continuous control via sample multiple reuse, 2023. URL https://arxiv.org/abs/2305.18443. +Ma, G., Li, L., Zhang, S., Liu, Z., Wang, Z., Chen, Y., Shen, L., Wang, X., and Tao, D. Revisiting plasticity in visual reinforcement learning: Data. Modules and Training Stages, 2023. +Ma, G., Zhang, L., Wang, H., Li, L., Wang, Z., Wang, Z., Shen, L., Wang, X., and Tao, D. Learning better with less: effective augmentation for sample-efficient visual reinforcement learning. Advances in Neural Information Processing Systems, 36, 2024. +Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness, J., Bellemare, M. G., Graves, A., Riedmiller, M., Fidjeland, A. K., Ostrovski, G., et al. Human-level control through deep reinforcement learning. nature, 518(7540): 529-533, 2015. + +Moskovitz, T., Parker-Holder, J., Pacchiano, A., Arbel, M., and Jordan, M. I. Tactical optimism and pessimism for deep reinforcement learning, 2022. URL https:// arxiv.org/abs/2102.03765. +Munos, R., Stepleton, T., Harutyunyan, A., and Bellemare, M. Safe and efficient off-policy reinforcement learning. In Lee, D., Sugiyama, M., Luxburg, U., Guyon, I., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016. URL https://proceedings.neurips.cc/paper_files/paper/2016/file/c3992e9a68c5ae12bd18488bc579b30d-Paper.pdf. +Nauman, M., Bortkiewicz, M., Miłos, P., Trzeciński, T., Ostaszewski, M., and Cygan, M. Overestimation, overfitting, and plasticity in actor-critic: the bitter lesson of reinforcement learning, 2024a. URL https://arxiv.org/abs/2403.00514. +Nauman, M., Ostaszewski, M., Jankowski, K., Miłos, P., and Cygan, M. Bigger, regularized, optimistic: scaling for compute and sample-efficient continuous control. arXiv preprint arXiv:2405.16158, 2024b. +Nikishin, E., Schwarzer, M., D'Oro, P., Bacon, P.-L., and Courville, A. The primacy bias in deep reinforcement learning. In Chaudhuri, K., Jegelka, S., Song, L., Szepesvari, C., Niu, G., and Sabato, S. (eds.), Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pp. 16828-16847. PMLR, 17-23 Jul 2022a. URL https://proceedings.mlrpress/v162/nikishin22a.html. +Nikishin, E., Schwarzer, M., D'Oro, P., Bacon, P.-L., and Courville, A. The primacy bias in deep reinforcement learning. In International conference on machine learning, pp. 16828-16847. PMLR, 2022b. +Nikishin, E., Oh, J., Ostrovski, G., Lyle, C., Pascanu, R., Dabney, W., and Barreto, A. Deep reinforcement learning with plasticity injection, 2023. URL https://arxiv.org/abs/2305.15555. +Prudencio, R. F., Maximo, M. R., and Colombini, E. L. A survey on offline reinforcement learning: Taxonomy, review, and open problems. IEEE Transactions on Neural Networks and Learning Systems, 2023. +Qiao, Z., Lyu, J., and Li, X. The primacy bias in model-based rl. arXiv preprint arXiv:2310.15017, 2023. +Schaul, T., Quan, J., Antonoglou, I., and Silver, D. Prioritized experience replay, 2016. URL https://arxiv.org/abs/1511.05952. + +Schwarzer, M., Obando-Ceron, J., Courville, A., Bellemare, M., Agarwal, R., and Castro, P. S. Bigger, better, faster: Human-level atari with human-level efficiency, 2023. URL https://arxiv.org/abs/2305.19452. +Sferrazza, C., Huang, D.-M., Lin, X., Lee, Y., and Abbeel, P. Humanoidbench: Simulated humanoid benchmark for whole-body locomotion and manipulation, 2024. URL https://arxiv.org/abs/2403.10506. +Sinha, S., Bharadhwaj, H., Srinivas, A., and Garg, A. D2rl: Deep dense architectures in reinforcement learning. arXiv preprint arXiv:2010.09163, 2020. +Sokar, G., Agarwal, R., Castro, P. S., and Evci, U. The dormant neuron phenomenon in deep reinforcement learning. In International Conference on Machine Learning, pp. 32145-32168. PMLR, 2023. +Tan, X., Qu, C., Xiong, J., Zhang, J., Qiu, X., and Jin, Y. Model-based off-policy deep reinforcement learning with model-embedding. IEEE Transactions on Emerging Topics in Computational Intelligence, 8(4):2974-2986, 2024. doi: 10.1109/TETCI.2024.3369636. +Tassa, Y., Doron, Y., Muldal, A., Erez, T., Li, Y., Casas, D. d. L., Budden, D., Abdelmaleki, A., Merel, J., Lefrancq, A., et al. Deepmind control suite. arXiv preprint arXiv:1801.00690, 2018. +Todorov, E., Erez, T., and Tassa, Y. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ international conference on intelligent robots and systems, pp. 5026-5033. IEEE, 2012. +van Hasselt, H., Doron, Y., Strub, F., Hessel, M., Sonnerat, N., and Modayil, J. Deep reinforcement learning and the deadly triad, 2018. URL https://arxiv.org/abs/1812.02648. +Xu, G., Zheng, R., Liang, Y., Wang, X., Yuan, Z., Ji, T., Luo, Y., Liu, X., Yuan, J., Hua, P., et al. Drm: Mastering visual reinforcement learning through dormant ratio minimization. arXiv preprint arXiv:2310.19668, 2023. +Yang, Y., Ding, Z., Wang, R., Modares, H., and Wunsch, D. C. Data-driven human-robot interaction without velocity measurement using off-policy reinforcement learning. IEEE/CAA Journal of Automatica Sinica, 9(1):47-63, 2022. doi: 10.1109/JAS.2021.1004258. +Yenicesu, A. S., Mutlu, F. B., Kozat, S. S., and Oguz, O. S. Cuer: Corrected uniform experience replay for off-policy continuous deep reinforcement learning algorithms, 2024. URL https://arxiv.org/abs/2406.09030. + +Yu, T., Quillen, D., He, Z., Julian, R., Hausman, K., Finn, C., and Levine, S. Meta-world: A benchmark and evaluation for multi-task and meta reinforcement learning. In Conference on robot learning, pp. 1094-1100. PMLR, 2020. +Zhang, S. and Sutton, R. S. A deeper look at experience replay, 2018. URL https://arxiv.org/abs/1712.01275. + +# A. Proofs + +# A.1. Proof of Theorem 3.1 + +Proof. Given a uniformly sampled replay buffer $\mathcal{D}$ that stores $N$ sequentially added transitions $\{\kappa_1, \kappa_2, \dots, \kappa_N\}$ , transition $\kappa_t$ (with $t > 1$ ) is sampled with probability $\frac{1}{i}$ , where $i > t$ is the number of transitions at sample time. So the expectation of sample times $\mathbb{E}[n_t]$ can be calculated as: + +$$ +\mathbb {E} [ n _ {t} ] = \beta (\sum_ {i = t} ^ {N} \frac {1}{i}) = \beta (\sum_ {i = 1} ^ {N} \frac {1}{i} - \sum_ {i = 1} ^ {t - 1} \frac {1}{i}) = \beta (H _ {N} - H _ {t - 1}) +$$ + +where $H_{N}$ is the $N$ -th harmonic number, and $H_{t-1}$ is the $(t-1)$ -th harmonic number. And we have the following inequality: + +$$ +\ln n + \frac {1}{n} < H _ {n} < \ln n + 1 +$$ + +So we can get: + +$$ +\ln \frac {N}{t - 1} + \frac {1}{N} - 1 = (\ln N + \frac {1}{N}) - (\ln t - 1 + 1) < \frac {\mathbb {E} [ n _ {t} ]}{\beta} < (\ln N + 1) - (\ln t - 1 + \frac {1}{t - 1}) = \ln \frac {N}{t - 1} + 1 - \frac {1}{t - 1} +$$ + +For the earliest transition $\kappa_{1}$ , its expected sample times $\mathbb{E}[n_1]$ is bounded by: + +$$ +\ln N + \frac {1}{N} < \frac {\mathbb {E} [ n _ {1} ]}{\beta} < \ln N + 1 +$$ + +The earliest transition is at least sampled $\Omega (\beta \log N)$ times in expectation. + +# A.2. Proof of Theorem 3.2 + +Proof. Let $\mathcal{D}$ be a replay buffer with ER decay $\epsilon$ . For any transition $\kappa_{i}$ in $\mathcal{D}$ , its expected sample times $\mathbb{E}[n_i]$ can be calculated as: + +$$ +\mathbb {E} [ n _ {i} ] = \beta (\sum_ {t = 0} ^ {\infty} \frac {(1 - \epsilon) ^ {t}}{1 + (1 - \epsilon) + \cdots + (1 - \epsilon) ^ {i + t - 1}}) +$$ + +We have: + +$$ +\mathbb {E} [ n _ {i} ] \leq \mathbb {E} [ n _ {1} ], \forall i \in \{1, 2, \dots , N \} +$$ + +So the expected sample times of any transition in $\mathcal{D}$ is bounded by the earliest transition. + +$$ +\mathbb {E} [ n _ {1} ] = \beta (\sum_ {t = 0} ^ {\infty} \frac {(1 - \epsilon) ^ {t}}{1 + (1 - \epsilon) + \cdots + (1 - \epsilon) ^ {t}}) = \beta (\sum_ {t = 0} ^ {\infty} \frac {\epsilon (1 - \epsilon) ^ {t}}{1 - (1 - \epsilon) ^ {t + 1}}) +$$ + +As $\epsilon = 1 - (1 - \epsilon) < 1 - (1 - \epsilon)^{t + 1}$ , we have: + +$$ +\mathbb {E} [ n _ {1} ] < \beta \left(\sum_ {t = 0} ^ {\infty} (1 - \epsilon) ^ {t}\right) = \frac {\beta}{\epsilon} +$$ + +So we can find a constant $C$ such that: + +$$ +\mathbb {E} [ n _ {i} ] < C, \forall i \in \{1, 2, \dots , N \} +$$ + +The expected sample times of any transition in $\mathcal{D}$ is bounded by a constant. + +# B. Implementation Details + +# B.1. Hyperparameters + +In this section, we delve into the specific implementation details of FoG. Our Hyperparameters are listed in Table 1. + +Table 1. The hyperparameters of the proposed method + +
HyperparametersHyperparameterValue
Optimizer (Critic)AdamW
Critic learning rate3e-4
Critic initial depth2
Critic maximal depth4
Critic expansion iters50k, 200k
Optimizer (Actor)Adam
Actor dense layers3
Actor learning rate3e-4
Actor log std clipping(-20,2)
Discount factor0.99
Batch size256
Replay buffer size1e6
ER Decay ε1e-5
Minimal buffer weight τ0.1
Behavior clone weight λ1e-3
Network ArchitectureNetwork hidden dim512
Network activation functionelu
Critic depth2-4
+ +For all tasks, we use a max-entropy framework (Haarnoja et al., 2018) for the online learning policy $\pi$ with automatic temperature tuning. Besides, we set the pessimism of the online policy (Moskovitz et al., 2022) to 0 in MetaWorld tasks to further encourage exploration. In other benchmarks it is set to 1. + +We use two reset lists for FoG. For 4 relatively simple locomotion tasks (h1-stand, h1-walk, h1-stair and h1-slide) in HumanoidBench, we use a reset list of 15k, 50k, 250k, 500k, 750k (The same as BRO's reset list) to further improve exploitation. We use a reset list of 15k, 50k, 100k, 200k, 400k, 600k, 800k for other benchmarks and other tasks in HumanoidBench. + +# B.2. Details of Network Expansion + +The expansion of the critic network is a key component of FoG. Each expansion step adds a new block composed of two dense layers with 512 hidden dims and ELU activation functions. Surprisingly, we find that there is no restriction on the initialization of the new block, and we initialize the new block with the same initialization as the original network (which is orthogonal init with scale of $\sqrt{2}$ ). + +At each expansion step, we reinitialize the optimizer and decay the learning rate by the number of parameters in the network. Namely, we use init_lr $\times \frac{\text{init.params}}{\text{current.params}}$ to decay the learning rate, where init_lr is the initial learning rate, init.params is approximated by the number of dense layers in the initial network, and current.params is the number of dense layers in the current network. + +Each time the network is reset, we reinitialize the depth of the critic network back to 2, so the network can expand again. + +# B.3. Other Implementation Details + +Small actor network Previous work (Lee et al., 2024; Nauman et al., 2024b) has shown that scaling up the actor network only provides marginal improvements in performance. To simplify our framework, we did not impose any special characteristics or constraints on the actor network or optimizer beyond what is typically done in standard SAC implementations. Specifically, we used the simplest MLP architecture and the Adam optimizer, which also provides a solid foundation for deploying the actor. + +About OBAC implementation In the OBAC algorithm, an offline agent is used to improve the online agent. Specifically, the offline agent adds a constraint to the online actor, encouraging it to learn from the offline agent when the Q-value estimate of the online actor is lower than that of the offline agent. In our experiments, we found that after a reset during training, the offline agent could quickly gain an advantage over the online actor by better utilizing the information in the buffer. Allowing the actor to immediately learn from the offline agent could lead to early convergence. To address this, we introduced a "protection period" for the online actor, during which the OBAC algorithm is temporarily disabled after a reset. This period, which we call OBAC wait, was found to yield fine results when set to 250k network iterations in all cases. Thus, we use 250k as the default in all experiments. + +# B.4. Is Forget and Grow a Universal Technique? + +In the FoG algorithm, we use OBAC as the foundational framework, combined with scaling the network size and replay ratio. A natural question arises: is the Forget and Grow technique universally applicable? + +We tested SAC in the MuJoCo environment and observed the following: even with the standard SAC algorithm at a replay ratio of 1, using ER decay "forget" technique led to stable performance improvements. However, network expansion required a larger replay ratio to achieve relatively significant effects. This may be due to the fact that the newly introduced parameters in network expansion require more intense updates before they become effective. + +![](images/601180ab8ab17cb6f2b8c2a497546e2804f7cc1e7287c31684766bdd95e364a9.jpg) + +![](images/eaecbc836eaa42f9fe7377cacf548ad35586bfe7781e2d5a86cfa624b5bbaa67.jpg) + +![](images/92581eb90de7f1840cf96fa309dbea7c6e986e200c432d36d0d0efbadbb362ae.jpg) +Figure 13. The results of SAC and SAC with ER decay 4 tasks in Mujoco. + +![](images/fe041fff839d62f391139abf945c0df378e33925524e093702e9d4e0562bf5f3.jpg) + +We also evaluated the data efficiency of the FoG-enhanced SAC (FoG-SAC) algorithm in both DMC-Hard and MuJoCo environments. We found that FoG-SAC achieved data efficiency close to that of BRO, showing significant improvement in the later stages of training. However, it did not outperform BRO, which had undergone other algorithmic adjustments. + +We also tested FoG with BRO, but FoG-BRO yielded performance very similar to that of the original BRO. This suggests that some of the adjustments in BRO may conflict with the FoG mechanism. + +Overall, our experiments indicate that FoG integrates well with the native SAC and OBAC algorithms. However, its effectiveness when combined with other existing algorithms warrants further investigation. + +# B.5. Baselines and Environments + +We compare FoG with BRO, SimBa and TD-MPC2, we use their official implementations, hyperparameters and results to ensure a fair comparison. + +![](images/ce9bd5d6d0165712865fa772ec9dab1b348f2295440c031b02d93c72822f2fd0.jpg) +Figure 14. The results of FoG-SAC + +![](images/297b84fc164d478e6e7bc9512245d2a78abb1625c5eea84c99e59df69e7e9171.jpg) + +![](images/8ea2db455af3d7d6e5df2b1b047ba727c4084e36f4ed729889d4d82c539320ce.jpg) + +1. BRO: We use the official implementation from https://github.com/naumix/BiggerRegularizedOptimistic. +2. SimBa: We use SimBa-SAC from official implementation and results from https://github.com/SonyResearch/simba. +3. TD-MPC2: We use the official implementation and results from https://github.com/nicklashansen/tdmpc2. +4. SAC: We use implementation from https://github.com/proceduralia/high_replay_ratio連續_CONTROL. + +We use the official setting of each task domain, including the reward setting, the task horizon, the done signal and there original state-action spaces. + +# B.6. Official Implementation of FoG + +Please check https://github.com/nothingbutbut/FoG.git for official implementation of FoG. + +# C. Complete Experimental Results + +To show the superiority of FoG, we list all the experimental results in this section. + +# C.1. Numerical Results + +Table 2. Normalized Score over benchmarks + +
EnvironmentFoGTD-MPC2SimBaBRO
Mujoco0.96 ± 0.020.07 ± 0.000.58 ± 0.030.85 ± 0.04
DMC-Easy0.99 ± 0.000.73 ± 0.010.74 ± 0.040.90 ± 0.11
DMC-Medium0.85 ± 0.050.65 ± 0.030.63 ± 0.020.79 ± 0.04
DMC-Hard0.99 ± 0.010.50 ± 0.020.75 ± 0.010.76 ± 0.02
MetaWorld0.99 ± 0.000.90 ± 0.080.64 ± 0.070.96 ± 0.04
HumanoidBench0.82 ± 0.020.81 ± 0.020.73 ± 0.040.54 ± 0.01
Total0.92 ± 0.010.70 ± 0.020.69 ± 0.020.76 ± 0.02
+ +Table 3. Returns of ${600}\mathrm{k}$ steps from Mujoco tasks + +
MethodFoGTD-MPC2SimBaBRO
Ant6979.19 ± 98.06563.04 ± 54.124827.24 ± 148.806798.11 ± 237.61
HalfCheetah15119.91 ± 583.412445.42 ± 48.4310393.10 ± 656.9813765.24 ± 712.18
Humanoid7170.79 ± 24.58282.40 ± 25.212803.31 ± 290.756038.88 ± 918.07
Walker2d5310.89 ± 320.6093.38 ± 66.433365.35 ± 695.814223.97 ± 457.07
+ +Table 4. Returns of ${150}\mathrm{k}$ steps from DMC-Easy tasks + +
MethodFoGTD-MPC2SimBaBRO
Cartpole Balance999.62 ± 0.08997.77 ± 0.58999.64 ± 0.17999.70 ± 0.22
Cartpole Swingup879.58 ± 0.43839.40 ± 35.20872.01 ± 8.37878.20 ± 0.88
finger-spin983.07 ± 4.49947.50 ± 27.89703.57 ± 124.98941.23 ± 20.54
Hopper Stand922.97 ± 14.5428.17 ± 28.21237.10 ± 106.32604.57 ± 416.54
+ +Table 5. Returns of ${500k}$ steps from DMC-Medium tasks + +
MethodFoGTD-MPC2SimBaBRO
Acrobot Swingup423.88 ± 21.81368.27 ± 39.63377.23 ± 28.29509.34 ± 38.23
Hopper Hop409.42 ± 119.77285.43 ± 56.43278.30 ± 2.66288.40 ± 9.97
Humanoid Stand866.60 ± 27.14401.87 ± 40.85402.85 ± 46.63769.53 ± 131.23
Walker Run820.02 ± 2.45818.07 ± 7.18753.80 ± 10.10760.53 ± 18.42
+ +Table 6. Returns of ${1000}\mathrm{k}$ steps from DMC-Hard tasks + +
MethodFoGTD-MPC2SimBaBRO
Dog Run652.78 ± 7.02183.13 ± 14.75534.02 ± 16.77479.68 ± 12.26
Dog Trot911.62 ± 7.98423.13 ± 42.88856.32 ± 26.84842.09 ± 51.18
Dog Walk954.09 ± 6.14719.83 ± 55.70924.67 ± 8.60948.46 ± 4.95
Humanoid Run436.34 ± 10.87178.17 ± 2.93177.10 ± 9.81235.07 ± 48.55
Humanoid Walk932.03 ± 6.96572.10 ± 14.33609.73 ± 36.53609.56 ± 3.05
+ +Table 7. Success rates of ${1000k}$ steps from Metaworld tasks + +
MethodFoGTD-MPC2SimBaBRO
Assembly1.00 ± 0.000.67 ± 0.470.70 ± 0.421.00 ± 0.00
Coffee pull1.00 ± 0.001.00 ± 0.001.00 ± 0.000.93 ± 0.09
Coffee push0.93 ± 0.051.00 ± 0.000.97 ± 0.050.87 ± 0.19
Disassemble1.00 ± 0.000.67 ± 0.471.00 ± 0.001.00 ± 0.00
Pick out of hole1.00 ± 0.001.00 ± 0.001.00 ± 0.001.00 ± 0.00
Pick place1.00 ± 0.001.00 ± 0.001.00 ± 0.001.00 ± 0.00
Pick place wall1.00 ± 0.001.00 ± 0.000.00 ± 0.000.80 ± 0.28
Push back1.00 ± 0.000.67 ± 0.470.67 ± 0.471.00 ± 0.00
Shelf place1.00 ± 0.001.00 ± 0.000.10 ± 0.141.00 ± 0.00
Stick push1.00 ± 0.001.00 ± 0.000.00 ± 0.001.00 ± 0.00
+ +Table 8. Returns of ${1000}\mathrm{k}$ steps from HumanoidBench tasks + +
MethodFoGTD-MPC2SimBaBRO
Balance Hard72.84 ± 1.8261.23 ± 2.8379.87 ± 9.1562.10 ± 2.48
Balance Simple546.66 ± 66.0152.88 ± 8.01256.46 ± 135.3868.77 ± 5.11
Crawl971.02 ± 0.65963.36 ± 2.48939.58 ± 18.65897.50 ± 31.20
Hurdle86.31 ± 7.19363.48 ± 34.69208.65 ± 7.7648.50 ± 0.65
Maze380.13 ± 5.53323.64 ± 4.12389.39 ± 19.61273.00 ± 61.73
Pole817.70 ± 73.53647.96 ± 172.64754.56 ± 4.06340.60 ± 24.14
Reach3963.71 ± 289.433913.07 ± 740.944418.50 ± 395.173984.43 ± 236.95
Run437.49 ± 49.97780.80 ± 3.18262.65 ± 73.3249.33 ± 12.19
Sit Hard814.95 ± 12.93749.94 ± 14.30667.38 ± 206.50829.10 ± 4.34
Sit Simple843.99 ± 8.91801.01 ± 1.15860.78 ± 5.00850.03 ± 3.88
Slide396.74 ± 25.44329.21 ± 26.01270.43 ± 17.06250.10 ± 7.94
Stair386.91 ± 117.06562.50 ± 24.62226.79 ± 162.5077.57 ± 0.70
Stand806.14 ± 27.59812.80 ± 2.95845.22 ± 9.60799.73 ± 16.74
Walk842.72 ± 8.53813.88 ± 1.38619.36 ± 200.68186.17 ± 27.30
+ +# C.2. Learning Curves + +One thing to notice about DMC-easy tasks Figure 16 is that the starting point of the learning curve is $25\mathrm{k}$ steps, which is because the first evaluation step of BRO is at $25\mathrm{k}$ steps. At this time, FoGhas already achieved convergence in some environments, like cartpole-swingup. + +![](images/a8d512d321ce61c8a82049e52533ab5fd9b72859768c2ac518dc30ca0ca9b81b.jpg) +Figure 15. The results of 4 tasks in Mujoco. + +![](images/e4bd7e455b73acbdefe1a3eca09431fc49877627476bad8b62ecc919a13fddc3.jpg) +FoG TD-MPC2 SimBa BRO + +![](images/2141e4206d6ff5a82f6034f491bd3ea05828bfc65444f9bd63c6c6210f7545b1.jpg) + +![](images/9c43d514fc4974a3f07188a6534f8d823df2b3c50957e4d6f34dd1bc47e4061d.jpg) + +![](images/a9c08b35e07947e53eeeb9312709d2b50a6043dd14a7daf60c37b57133c0b23e.jpg) +Figure 16. The results of 4 tasks in DM Control Easy. + +![](images/ca35b88a2a51e34e1e5b4a2a3e5ada41fe476aa8d083941a11717ffc95871ea6.jpg) + +![](images/118108f064407b42f773af0dab1170707ecb2542b409f43d98c0300bc0cb2b5a.jpg) + +![](images/d8609eb85278880db4dd9e830c628f0bab64d65ff9045868f74927f2f29fc61d.jpg) + +![](images/9dc1051cddc0cb4509a5fd332353cfde8760ef848704cf0fb356a6130eec09ec.jpg) +Figure 17. The results of 4 tasks in DM Control Medium. + +![](images/d01b737e72b610f301dc959dc026b259c574101156a7a0a9704700a560bd4242.jpg) + +![](images/8552b18f80b27b07b323bde776c9781e98b808443b2790e30f1a2904758341c9.jpg) + +![](images/c44b0c14fa8e36cb43b70e69717732171b652273112dc3c8c58a456076262de0.jpg) + +![](images/3a83422194f8eea64c1d273eb355f16bf4161ec8fc09dee087af3d92002e4bf3.jpg) + +![](images/976580fc833275761ce0f9926b30cb58f3134386fe529f04feac3e1ceec1d93b.jpg) + +![](images/1a400f0a616100afcdf8968dcb78ac464d4e87fd8482019f3a139da5b914b235.jpg) + +![](images/e554b58531722d7c11a641b00f64fd13051a619be2bfdcdf8e235e4877233ae3.jpg) + +![](images/84dbfed0b71608ccae25903d588daa710439efc714f04dc9ee6cb0f65314ba19.jpg) +Figure 18. The results of 5 tasks in DM Control Hard. + +![](images/67a2a72f60a006b1f2666c9d284301c850adeeb1700ffa26749d006d63192101.jpg) + +![](images/878553f839c152224d72badcadbd5aaa9aa94d703a5bdb13a741052f7c1c22c2.jpg) + +![](images/535638cf9916d8f38b7b4bd785d8baecaf11dc94bc5dbef11e52515937d7e31a.jpg) + +![](images/f78eae7170b59cd2a3c812279ec7c34a0e310760a51d72173f043a1a7421c88a.jpg) + +![](images/0a632c3982859bd9667d3dcfee9c693857be67f7fc0de1ccde66e6d9f49eadca.jpg) + +![](images/0fd20ffdca4ef4e67fba421910a64ceed15c61627abcdbdef2ee7f397fd73621.jpg) + +![](images/78ea810fc0a8c304ae7b183f3918a039c1a06bf8e838f2965ac285895cc0a9c9.jpg) + +![](images/6085cdedad2f7783b14ec2fa58025f32d67ab297eff11ca5b57481583139ca3f.jpg) + +![](images/afc54e3dffc935f77b4d326a237dce626c4f02cbb29f3ad302141b08367d51da.jpg) + +![](images/cf2156c2a679bd47bde1eb1fb0ce9ab93179cfa64cabc1401f403915f18a3ac3.jpg) +Figure 19. The results of 5 tasks in Meta-World. + +![](images/6c87bdf7898c2a2e164a4337c2c9af64ca1b29437dbfd45ecb546b1a11c9971f.jpg) + +![](images/923c96a7dce9a9e4119001a8977911fd61177e1f7e61624f85dc6318a3876adb.jpg) + +![](images/0ab9ce8acfd9fbe0cfaa82cf3755aca4fc0401285da2ca7b9aeff7f5e0bc1f28.jpg) + +![](images/7448ddd7534ddf0edb5b56b0d39dd086c7c45d88e5ba55041e4c1f8c71928071.jpg) + +![](images/0bd97b4046796f17b2d132a07608e0424af49991a08ae37b56432fb025caf0f6.jpg) + +![](images/4c432031d6e1abe33db659e9dacb1c4e45ff62df4bb009e5c8cce7546ea97948.jpg) + +![](images/58bf15acfe7663b398e92709cb074179b5eaff2a59f915c181991e01280ef8f5.jpg) + +![](images/0f64fe48af39ae717c0119a4c106055887678ddfb0ef6b1e27329d5a94300338.jpg) + +![](images/f796ce078a2a2e918199b47b1173dfe4c64b67cb3d10fef46e55184f85c30e6b.jpg) + +![](images/1872af1564f0481be1c83d4ad81ba49736bfb4ba7a8e36d3273c8f13e4d372d0.jpg) + +![](images/d03641eb254c3332c45bc75bc08afffdab9a78ade0ef76e6d6b56563665c2983.jpg) + +![](images/a9f59f71713d62b8916c1f807ce62d336d5e92c540853b1291aff0b5c8fcf143.jpg) + +![](images/778c1bb84207494a5a65218e916d4d159d70059c8882bfa062b51c34e193acab.jpg) + +![](images/d7f2104351e6fc7c31aaee0f04b6d957ccd88459a047406ad3890339ee011c80.jpg) + +![](images/b4d7ff8c12584c367f8521bf9430ca2ecc7086581cf4520174be32216febabac.jpg) +Figure 20. The results of 14 tasks in HumanoidBench. + +![](images/b287dcc1353010df476b86a186190eee1ebb5b39eaa940dc8181f6967f4fb404.jpg) + +![](images/0ae2bf919cf8df384b11aeb3574fed8a72982ef48fcffc17cd1b17e9a249a77b.jpg) + +# D. Performance comparison under similar computation cost + +To demonstrate that the performance gains of FoG are not merely due to increased computation, we provide a performance comparison under similar computational costs. + +We evaluate SimBa (depth=10, approximately 42M parameters), TD-MPC2 (19M version), and BRO (depth=10, approximately 42M parameters) on the humanoid benchmark to compare their performance against FoG, despite all of them having more parameters than FoG (at most 21M). Our experiments demonstrate that FoG outperforms competitive baselines even when compared to larger models, achieving superior performance while using less computation in this setup. + +![](images/95b8742d30fc00b4c496346df5e6c282b2c1185bf826c1fa494c147ef1f0664a.jpg) +Figure 21. The results under similar computation cost + +![](images/7aeb07521e8db4b17e3fa7d6583adf153037939558b1020bc0e40217089c0101.jpg) + +# E. Comparison to similar methods + +We conducted a comparative analysis between FoG and the Neuroplastic Expansion (NE) algorithm(Liu et al., 2024), utilizing the official NE implementation to ensure fairness. The evaluation was performed across four diverse tasks: HalfCheetah-v4, dog-run, dog-walk, and humanoid-walk. Both the original NE model and a variant with expanded capacity were tested to examine the impact of model scaling on performance. + +The results consistently demonstrate that FoG outperforms NE across all tasks, even when operating at relatively low update-to-data ratios. Notably, increasing the capacity of the NE model yields only marginal performance gains, whereas FoG maintains robust improvements without requiring significant model enlargement. These findings underscore FoG's superior scalability and adaptability, establishing it as a more effective approach for handling complex reinforcement learning environments. + +![](images/2cf4c76caca82b47ccd5f24514a4776163ed22b3bb272bd0a24e282f94716eb4.jpg) + +![](images/a88a6c5a17b631f3a9b21037ba802383326c2df2b3e7163855edc4eaf02e02e9.jpg) + +![](images/2106eab808372a1fe6366d6ed5f2d264e0a5900dfe6b439e53ab253c16829630.jpg) +Figure 22. Comparison to Neuroplastic Expansion method + +![](images/e849d1e476f16f4fea67560a8535debcdd6ff1e8786e486c23c460327d6684b9.jpg) \ No newline at end of file diff --git a/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/images.zip b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2db915185165edbdef0a5719b1fd7ee900e4e0b8 --- /dev/null +++ b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c37f7a771377b7ea2cd209b131961a160e959c112af0f9f2da33bd84e4883093 +size 1841917 diff --git a/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/layout.json b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e546dcfee5e2194c8780c4e74e35f3bf231674dc --- /dev/null +++ b/aforgetandgrowstrategyfordeepreinforcementlearningscalingincontinuouscontrol/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e5c0851df28555d6de8a26bf15443bfbb16cb39812ff7990bea22a6bd826ef8 +size 685282 diff --git a/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/90cfcf76-fac6-4232-ae9d-7811e45cffe1_content_list.json b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/90cfcf76-fac6-4232-ae9d-7811e45cffe1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e7d0d14c1ba65e41f184cd6c0fd50833f0551d7d --- /dev/null +++ b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/90cfcf76-fac6-4232-ae9d-7811e45cffe1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d47e1b3140977d56e2293bde6713a5c3bd14c23c53e3a76e6635364db756c399 +size 147634 diff --git a/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/90cfcf76-fac6-4232-ae9d-7811e45cffe1_model.json b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/90cfcf76-fac6-4232-ae9d-7811e45cffe1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a047768514886ada8ec72452d40f3ba69586fcf8 --- /dev/null +++ b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/90cfcf76-fac6-4232-ae9d-7811e45cffe1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e87ba76ea329667f9f61f630d1537190ade40d3f52b7803e824c78c2c2a39880 +size 180334 diff --git a/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/90cfcf76-fac6-4232-ae9d-7811e45cffe1_origin.pdf b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/90cfcf76-fac6-4232-ae9d-7811e45cffe1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e7e74b693516af4b2f6bc936f937c010fa01f156 --- /dev/null +++ b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/90cfcf76-fac6-4232-ae9d-7811e45cffe1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b4a50843e3213ed9f655ec374eff9a907921f51a49cb511dc2f08c7163d40d8 +size 20301557 diff --git a/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/full.md b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..77f9577cc776319352991672eb6290b272c1343b --- /dev/null +++ b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/full.md @@ -0,0 +1,631 @@ +# A General Framework for Inference-Time Scaling and Steering of Diffusion Models + +Raghav Singhal $^{1}$ Zachary Horvitz $^{2}$ Ryan Teehan $^{1}$ Mengye Ren $^{1}$ Zhou Yu $^{2,3}$ Kathleen McKeown $^{2}$ Rajesh Ranganath $^{1,4}$ + +# Abstract + +Diffusion models have demonstrated remarkable performance in generative modeling, but generating samples with specific desiderata remains challenging. Existing solutions — such as fine-tuning, best-of-n sampling, and gradient-based guidance — are expensive, inefficient, or limited in applicability. In this work, we introduce Feynman-Kac (FK) steering, which applies Feynman-Kac interacting particle systems to the inference-time steering of diffusion models with arbitrary reward functions. FK steering works by generating multiple trajectories, called particles, and resampling particles at intermediate steps based on scores computed using functions called potentials. Potentials are defined using rewards for intermediate states and are chosen such that a high score indicates the particle will yield a high-reward sample. We explore various choices of potentials, rewards, and samplers. Steering text-to-image models with a human preference reward, we find that FK steering outperforms finetuned models with just 2 particles. Moreover, FK steering a 0.8B parameter model outperforms a 2.6B model, achieving state-of-the-art performance on prompt fidelity. We also steer text diffusion models with rewards for text quality and rare attributes such as toxicity, and find that FK steering generates lower perplexity text and enables gradient-free control. Overall, inference-time scaling and steering of diffusion models, even training-free, provides significant quality and controllability benefits. Code available here. + +$^{*}$ Equal contribution $^{1}$ Courant Institute of Mathematical Sciences, New York University $^{2}$ Columbia University $^{3}$ Arxlex.ai $^{4}$ Center for Data Science, New York University. Correspondence to: Raghav Singhal , Zachary Horvitz , Ryan Teehan . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +# 1. Introduction + +Diffusion-based generative models (Sohl-Dickstein et al., 2015) have led to advances in modeling images (Ho et al., 2020; Song et al., 2020b), videos (Ho et al., 2022), and proteins (Gruver et al., 2023), as well as promising results for text generation (Li et al., 2022; Han et al., 2023; Gong et al., 2023; Gulrajani & Hashimoto, 2023; Horvitz et al., 2024). Despite these advances, diffusion models have failure modes. For example, text-to-image models often fail to adhere to text prompts (Ghosh et al., 2024). Additionally, adapting models to produce samples that conform to specific user preferences remains a challenge. + +One approach for making generative models $p_{\theta}(\mathbf{x})$ adher to user preferences is to encode preferences in a reward $r(\mathbf{x}_0)$ and sample from the tilted distribution $p_{\mathrm{target}}(\mathbf{x}) \propto p_{\theta}(\mathbf{x}) \exp (r(\mathbf{x}))$ (Korbak et al., 2022), where $r(\mathbf{x})$ can be human preference models (Xu et al., 2024; Wu et al., 2023b), vision-language models (Liu et al., 2024a), or likelihoods $p(y \mid \mathbf{x})$ (Wu et al., 2023a). Sampling from this tilted distribution favors high-reward samples. Current approaches for sampling from the tilted distribution can be categorized into (a) fine-tuning and (b) inference-time steering methods. + +Black et al. (2023), Fan et al. (2024), Domingo-Enrich et al. (2024), and Wallace et al. (2024) fine-tune diffusion models with reward functions. However, fine-tuning requires expensive training and ties the model to the reward used while training. Alternatively, two common inference-time approaches are gradient-based guidance (Song et al., 2020b; Bansal et al., 2023) and best-of- $n$ sampling. Best-of- $n$ sampling can be used for any diffusion model and reward function, however, it wastes computation on low-reward samples (Chatterjee & Diaconis, 2018). Gradient-based guidance presents an efficient alternative, but it is limited to differentiable reward functions and continuous-state diffusion models. + +In this work, we present FK steering, a flexible framework for steering diffusion-based generative models with arbitrary rewards that uses FK interacting particle system methods (Moral, 2004; Vestal et al., 2008). We generalize previous works that define Feynman-Kac measures to condition- + +![](images/c97e3cb710586b3b7eb417888e8df0cf1ddaf72ba0e687c64a148d98bb836522.jpg) +Prompt:"a green stop sign in a red field" + +![](images/bf1a263d6cdf5eac0d9ecc7c23825549d13f8697451f2de4a60d45127edd8290.jpg) +(1) Iteratively de-noise $x_{T}\to x_{T - 1}\to \dots \to x_{0}$ + +![](images/558b543f7929825900cef60250dd9946cfcb851a123557e6eecfc788eb890311.jpg) +(2) Generate multiple samples (particles). + +ally sample diffusion models (Trippe et al., 2022; Wu et al., 2023a; Chung et al., 2022; Janati et al., 2024). FK steering enables guidance with arbitrary reward functions, differentiable or otherwise, for both discrete and continuous-state models. The approach makes use of a rare-event simulation method, Feynman-Kac interacting particle system (FK-IPS) (Moral, 2004; Del Moral & Garnier, 2005; Hairer & Weare, 2014; Vestal et al., 2008). FK-IPS enables the generation of samples with high-rewards, which may be rare events under the original model $p_{\theta}(\mathbf{x})$ . + +Applying FK steering has two components: defining a sequence of tilted distributions over the diffusion trajectory using potential functions, and then sampling from these tilted distributions. To sample from these tilted distributions, FK steering (1) samples multiple diffusion processes, called particles, (2) scores particles using the potential functions, and (3) resamples the particles based on potential scores at intermediate steps during generation, see fig. 1. Potential functions are defined using intermediate rewards and are selected such that resampling high-scoring particles yield high-reward samples $\mathbf{x}_0$ . + +We show that diffusion models enable many choices of intermediate rewards, samplers, and potentials. We then empirically demonstrate that these new choices improve on traditional choices (Wu et al., 2023a). Remarkably, for a number of tasks, we see significant performance benefits for both image and text diffusion models with FK steering with as few as $k = 4$ particles (see fig. 2). + +Contributions. Our methodological contributions are the following: + +- We present Feynman-Kac steering, a flexible and effective framework for building particle-based approximations of the tilted distribution $p_{\theta}(\mathbf{x} \mid \mathbf{c}) \exp(\lambda r(\mathbf{x}, \mathbf{c}))$ , + +Figure 1. Feynman-Kac steering is a particle-based sampler which produces consistent approximations of the target distribution, $p_{\theta}(\mathbf{x}_0) \exp (\lambda r(\mathbf{x}_0))$ . At intermediate steps, FK steering scores particles using functions called potentials and and then resamples based on potential scores. Potentials are defined using intermediate rewards and are selected such that paths yielding high-reward samples are up-weighted. +![](images/0ed22603309e8be3b8a2a8177123bb5b824391181d49de2944846120c6dc9015.jpg) +(3) Resample promising particles at intermediate steps. + +![](images/0dde9b969a414f456457d2698661a91b396d9061b41ec761ac19c9b8f6e02e5a.jpg) + +![](images/21758872ecc2d5f90990c19165a67dede0cd78fe833cd521ab7695bd138a44a0.jpg) +Figure 2. FK steering small models outperforms bigger models with less compute. We measure the prompt fidelity of samples from text-to-image models using the GenEval benchmark (Ghosh et al., 2024). We compare the highest-reward sample from FK steering the base models against the base models and their finetuned versions. As the reward, we use ImageReward (Xu et al., 2024). FK steering, with no extra training, improves performance for all models, outperforming fine-tuning with $k = 2$ . Moreover, FK steering SDv2.1 (0.8B) outperforms a fine-tuned SDXL (2.6B) model, with fewer FLOPS and faster sampling. + +![](images/bac28d1c7aa8c04c6f3a735c596e0192a9e968a5091c788c91e64146d95a1c4e.jpg) + +for both continuous and discrete diffusion models, and for arbitrary rewards. + +- We show that particle-based methods such as twisted diffusion sampler (TDS) (Wu et al., 2023a) and Li et al. (2024), are instances of FK interacting particle systems. Expanding the set of potentials, samplers, and reward models improves performance across many tasks. + +Empirically, we demonstrate that FK steering: + +- Provides an alternative to fine-tuning and gradient guidance. FK steering text-to-image diffusion models with + +![](images/88b7c978b1527e5b6067f617f3bf1c74594ed890da0c34273454429cac1884aa.jpg) +Figure 3. FK steering improves prompt fidelity and sample quality. First row: a random sample from SDXL. Middle and bottom rows: the highest reward sample using gradient-free FK steering with SDXL and SDv2.1, with $k = 4$ . FK steering SDXL and SDv2.1 improves prompt fidelity compared to a random sample from the base model. Prompts are selected from the GenEval benchmark set. + +human preference rewards outperforms fine-tuned models and gradient-guidance on a prompt fidelity benchmark with just two particles, see fig. 2. Moreover, FK steering combined with fine-tuned models or gradient guidance unlocks even further improvements. We also steer text diffusion models to generate higher quality samples with improved linguistic acceptability and perplexity. + +- Enables smaller models to beat larger models (Ghosh et al., 2024), with faster sampling and less compute (see the right panel in fig. 2). +- Generates samples with (rare) specified attributes, such as toxicity, a useful attribute for red-teaming (Zhao et al., 2024a). FK steering a text diffusion model, without gradient guidance, increases the toxicity rate from $0.3\%$ to $64.7\%$ , and outperforms best-of- $n$ . + +Overall, in all settings we consider, FK steering always improves performance, highlighting the benefits of inference-time scaling and steering of diffusion models. + +# 2. Related Work + +Current approaches to generate samples from the tilted distribution $p_{\theta}(\mathbf{x}_0)\exp (\lambda r(\mathbf{x}_0))$ can be categorized into two types: (1) fine-tuning and (2) inference-time steering approaches, such as universal guidance (Song et al., 2020b; Bansal et al., 2023) and particle-based approaches such as best-of- $n$ and TDS (Wu et al., 2023a). + +Fine-tuning. Recent work (Black et al., 2023; Xu et al., 2024) proposes fine-tuning a diffusion model to maximize the reward without a Kullback-Leibler (KL) penalty. Fan et al. (2024); Domingo-Enrich et al. (2024) propose KL-regularized fine-tuning, and more recently Wallace et al. + +(2024) propose direct preference optimization (Rafailov et al., 2024) for diffusion models. However, fine-tuning requires allocating training resources and coupling a model to a specific reward. Moreover, we show FK steering, with just 2 particles, outperforms fine-tuning in several settings without any additional training. + +Inference-time steering. Gradient-based methods such as classifier guidance (Song et al., 2020b; Bansal et al., 2023) enable steering diffusion models at inference-time. Reward gradients are used to tilt the diffusion model's score, $s_{\theta}(\mathbf{x}_t,t) + \nabla_{\mathbf{x}_t}r(\mathbf{x}_t)$ , where $s_{\theta}$ is the marginal score. However, gradient-based guidance is limited to differentiable rewards and continuous-state models. + +FK steering builds on top of recent works that sample from Feynman-Kac path distributions for conditional sampling with diffusion models, either using particle-based sampling (Trippe et al., 2022; Wu et al., 2023a; Cardoso et al., 2023; Dou & Song, 2024; Zhao et al., 2024b) or gradient-based sampling (Chung et al., 2022; Janati et al., 2024). In appendix F.2, we show how TDS (Wu et al., 2023a) and SVDD (Li et al., 2024) are examples of FK interacting particle systems (Moral, 2004). Our experiments demonstrate the effectiveness of these methods for new settings, and the value of expanding the choice of potentials, rewards, and samplers. + +# 3. Feynman-Kac Steering of Diffusion Models + +In this section, we present details of the FK steering framework for inference-time steering of diffusion models. + +# 3.1. Diffusion Models + +Diffusion models (Sohl-Dickstein et al., 2015) are stochastic processes that are learned by reversing a forward nois-ing process, $q(\mathbf{x}_t)$ . The nois-ing process takes data $x \sim q_{\mathrm{data}}$ and produces a noisy state $\mathbf{x}_t \sim q(\mathbf{x}_t \mid \mathbf{x}_0 = x)$ such that at a terminal-time $T$ , $q(\mathbf{x}_T) = \pi_{\mathrm{prior}}$ , where $\pi_{\mathrm{prior}}$ is the model prior. The nois-ing process can be defined as a continuous-time Markov process (Song et al., 2020b; Kingma et al., 2021; Singhal et al., 2023; 2024) or discrete-time Markov chain (Austin et al., 2021; Sahoo et al., 2024; Shi et al., 2024; Campbell et al., 2022). For exposition, we focus on discrete-time models, though the techniques are applicable to continuous-time as noted below. A discrete-time diffusion model, given a context $\mathbf{c}$ , is defined as: + +$$ +p _ {\theta} \left(\mathbf {x} _ {T}, \dots , \mathbf {x} _ {0} \mid \mathbf {c}\right) = \pi_ {\text {p r i o r}} \left(\mathbf {x} _ {T}\right) \prod_ {t = T - 1} ^ {0} p _ {\theta} \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {t + 1}, \mathbf {c}\right). +$$ + +Sampling involves iteratively generating a path $(\mathbf{x}_T, \mathbf{x}_{T-1}, \ldots, \mathbf{x}_0)$ , where $\mathbf{x}_0$ is the model sample. The model $p_\theta$ can be trained by maximizing a lower bound on the model log-likelihood $\log p_\theta(\mathbf{x}_0 = x)$ . + +Most uses of generative models require samples with user-specified properties. In the next section, we describe a generic formulation for steering diffusion models towards such samples. + +# 3.2. Steering Diffusion Models + +One way to steer diffusion models is to encode user preferences in a reward model $r(\mathbf{x}_0)$ and sample from a distribution that tilts the diffusion model's generations $p_{\theta}(\mathbf{x}_0)$ towards an exponential of the reward function $r(\mathbf{x}_0)$ : + +$$ +p _ {\text {t a r g e t}} \left(\mathbf {x} _ {0} \mid \mathbf {c}\right) = \frac {1}{\mathbf {Z}} p _ {\theta} \left(\mathbf {x} _ {0} \mid \mathbf {c}\right) \exp (\lambda r \left(\mathbf {x} _ {0}, \mathbf {c}\right)). \tag {1} +$$ + +The reward can be any arbitrary function, such as a human preference reward (Xu et al., 2024; Wu et al., 2023b), a non-differentiable constraint, or a likelihood $p(y \mid \mathbf{x}_0)$ . + +The target distribution favors high-reward samples, which may be rare under the model $p_{\theta}$ . This suggests the use of simulation methods that better tilt towards rare events. One broad class of rare-event simulation methods are FK-IPS approaches (Moral, 2004; Hairer & Weare, 2014) that tilt the transition kernels of the diffusion process to up-weight paths that have higher-reward samples. + +Next, we develop FK steering, a framework for inference-time steering of diffusion models using FK-IPS. + +# 3.3. Feynman-Kac diffusion steering + +We use FK-IPS to produce paths $(\mathbf{x}_T,\mathbf{x}_{T - 1},\dots ,\mathbf{x}_0)$ with high-reward $\mathbf{x}_0$ samples. FK-IPS requires defining a sequence of FK distributions, $p_{\mathrm{FK},t}(\mathbf{x}_T,\mathbf{x}_{T - 1},\ldots ,\mathbf{x}_t)$ , by tilting the base distribution $p_{\theta}(\mathbf{x}_T,\mathbf{x}_{T - 1},\ldots ,\mathbf{x}_t)$ using potentials $G_{t}$ (Moral, 2004; Chopin et al., 2020). The sequence of distributions $p_{\mathrm{FK},t}$ is built iteratively by tilting the transition kernels $p_{\theta}(\mathbf{x}_t\mid \mathbf{x}_{t + 1})$ with a potential $G_{t}(\mathbf{x}_{T},\mathbf{x}_{T - 1},\dots ,\mathbf{x}_{t})$ . We start with $p_{\mathrm{FK},T}(\mathbf{x}_T)\propto p_{\theta}(\mathbf{x}_T\mid \mathbf{c})G_T(\mathbf{x}_T,\mathbf{c})$ and then define the subsequent distributions as: + +$$ +\begin{array}{l} p _ {\mathrm {F K}, t} \left(\mathbf {x} _ {T}, \dots , \mathbf {x} _ {t} \mid \mathbf {c}\right) \tag {2} \\ = \frac {1}{\mathbf {Z} _ {t}} p _ {\theta} (\mathbf {x} _ {T}, \ldots , \mathbf {x} _ {t} \mid \mathbf {c}) \left\{\prod_ {s = T} ^ {t} G _ {t} (\mathbf {x} _ {T}, \ldots , \mathbf {x} _ {s}, \mathbf {c}) \right\} \\ \end{array} +$$ + +where $\mathbf{Z}_t = \mathbb{E}_{p_\theta}[\prod_{s=T}^t G_s]$ is the normalization constant. The potentials $G_t$ are selected to up-weight paths $(\mathbf{x}_T, \ldots, \mathbf{x}_t)$ that yield high-rewards $r(\mathbf{x}_0)$ . We require that the product of the potentials $G_t$ matches the exponential tilt of $p_{\mathrm{target}}$ : + +$$ +\prod_ {t = T} ^ {0} G _ {t} \left(\mathbf {x} _ {T}, \dots , \mathbf {x} _ {t}, \mathbf {c}\right) = \exp \left(\lambda r \left(\mathbf {x} _ {0}, \mathbf {c}\right)\right). \tag {3} +$$ + +This choice ensures that sampling $\mathbf{x}_0$ from $p_{\mathrm{FK},0}$ is equivalent to sampling $p_{\mathrm{target}}(\mathbf{x}_0|\mathbf{c})$ , since $p_{\mathrm{FK},0} \propto$ + +# Algorithm 1 Feynman-Kac Diffusion Steering + +Input: Diffusion model $p_{\theta}(\mathbf{x}_{0:T} \mid \mathbf{c})$ , reward $r(\mathbf{x}_0,\mathbf{c})$ , proposals $\tau (\mathbf{x}_t \mid \mathbf{x}_{t + 1},\mathbf{c})$ , potentials $G_{t}$ , intermediate rewards $r_{\phi}(\mathbf{x}_t,\mathbf{c})$ , number of particles $k$ . + +Sample $\mathbf{x}_T^i\sim \tau (\mathbf{x}_T\mid \mathbf{c})$ for $i\in [K]$ + +Score $G_{T}^{i} = G_{T}(\mathbf{x}_{T}^{i},\mathbf{c})$ for $i\in [K]$ + +for $t\in \{T,\ldots ,1\}$ do + +Resample: Sample $a_{t}^{i}\sim \mathrm{Multinomial}(\mathbf{x}_{t}^{i},G_{t}^{i})$ and let $\mathbf{x}_t^i = \mathbf{x}_t^{a_i}$ for $i\in [K]$ + +Propose: Sample $\mathbf{x}_{t - 1}^i\sim \tau (\mathbf{x}_{t - 1}\mid \mathbf{x}_t^i,\ldots ,\mathbf{x}_T^i,\mathbf{c})$ for $i\in [K]$ + +Re-weight: Compute weight $G_{t-1}^{i}$ for $i \in [K]$ : + +$$ +G _ {t - 1} ^ {i} = \frac {p _ {\theta} (\mathbf {x} _ {t - 1} ^ {i} \mid \mathbf {x} _ {t} ^ {i} , \mathbf {c})}{\tau (\mathbf {x} _ {t - 1} ^ {i} \mid \mathbf {x} _ {t : T} ^ {i} , \mathbf {c})} G _ {t - 1} (\mathbf {x} _ {T: t - 1} ^ {i}, \mathbf {c}) +$$ + +end for + +Output: return samples $\{\mathbf{x}_0^i\}$ + +$p_{\theta}(\mathbf{x}_T,\dots ,\mathbf{x}_0\mid \mathbf{c})\exp (\lambda r(\mathbf{x}_0,\mathbf{c}))$ . Potential functions that satisfy this constraint are not unique. + +Sampling from $p_{\mathrm{FK},0}$ . Direct sampling from the FK measure, $p_{\mathrm{FK},0}$ , is intractable. However, targeting the intermediate distributions $p_{\mathrm{FK},t}$ supports sampling of the distribution $p_{\mathrm{FK},0}$ with particle-based methods, such as sequential Monte Carlo (SMC) (Moral, 2004; Doucet & Lee, 2018), nested IS (Naesseth et al., 2019), and diffusion Monte Carlo (DMC) (Hairer & Weare, 2014). SMC generates $k$ particles using a proposal generator $\tau(\mathbf{x}_t \mid \mathbf{x}_{t+1}, \ldots, \mathbf{x}_T, \mathbf{c})$ and at each transition step scores the particles using the potential and the transition kernel importance weights: + +$$ +G _ {t} ^ {i} = G _ {t} (\mathbf {x} _ {T} ^ {i}, \ldots , \mathbf {x} _ {t + 1} ^ {i}, \mathbf {x} _ {t} ^ {i}, \mathbf {c}) \frac {p _ {\theta} (\mathbf {x} _ {t} ^ {i} \mid \mathbf {x} _ {t + 1} ^ {i} , \mathbf {c})}{\tau (\mathbf {x} _ {t} ^ {i} \mid \mathbf {x} _ {t + 1} ^ {i} , \ldots , \mathbf {x} _ {T} ^ {i} , \mathbf {c})}. +$$ + +Next, the particles $\mathbf{x}_t^i$ are resampled based on the scores $G_{t}^{i}$ . See algorithm 1 for details. Particle approximations are consistent, that is the weighted empirical distribution defined by $((\mathbf{x}_T^i,\dots ,\mathbf{x}_t^i),G_t^i)$ converges to $p_{\mathrm{FK},t}$ , see theorem 3.19 in Del Moral & Miclo (2000). For a proof that the weighted empirical distribution, $(\mathbf{x}_0^i,G_t^i)$ , converges to $p_{\mathrm{target}}$ , see appendix C. + +Choosing the proposal generator $\tau$ . For the proposal generator $\tau$ , the simplest choice is to sample from the diffusion model's transition kernel $p_{\theta}(\mathbf{x}_t \mid \mathbf{x}_{t+1}, \mathbf{c})$ . Alternatively, another choice is to tilt the transition kernels towards high-reward samples, for instance, by using reward-gradient guidance (Song et al., 2020b; Bansal et al., 2023). We discuss some choices in appendix D.1. + +Choosing the potential $G_{t}$ . One choice of potentials is $G_{t} = 1$ for $t \geq 1$ and $G_{0} = \exp(\lambda(r(\mathbf{x}_{0}, \mathbf{c})))$ , this leads to importance sampling. However, importance sampling + +can require many particles to generate a high-reward sample (Chatterjee & Diaconis, 2018). Instead, FK steering uses potentials to up-weight paths that yield high-reward samples. We consider the following potentials that satisfy eq. (3), defined using intermediate rewards $r_{\phi}(\mathbf{x}_t,\mathbf{c})$ : + +- DIFFERENCE: $G_{t}(\mathbf{x}_{t},\mathbf{x}_{t + 1},\mathbf{c}) = \exp (\lambda (r_{\phi}(\mathbf{x}_{t},\mathbf{c}) - r_{\phi}(\mathbf{x}_{t + 1},\mathbf{c})))$ and $G_{T} = 1$ , similar to (Wu et al., 2023a), prefers particles that have increasing rewards. +- MAX: $G_{t}(\mathbf{x}_{T},\dots ,\mathbf{x}_{t},\mathbf{c}) = \exp (\lambda \max_{s = t}^{T}r_{\phi}(\mathbf{x}_{s},\mathbf{c}))$ and $G_{0} = \exp (\lambda r(\mathbf{x}_{0},\mathbf{c}))(\prod_{t = 1}^{T}G_{t})^{-1}$ prefers particles that have the highest rewards. +- SUM: $G_{t}(\mathbf{x}_{T},\ldots ,\mathbf{x}_{t}) = \exp (\lambda \sum_{s = t}^{T}r_{\phi}(\mathbf{x}_{s},\mathbf{c}))$ and $G_0 = \exp (\lambda r(\mathbf{x}_0,\mathbf{c}))(\prod_{t = 1}^T G_t)^{-1}$ selects particles that have the highest accumulated rewards. + +Any choice of potentials that satisfy eq. (3) produce consistent approximations of $p_{\mathrm{target}}(\mathbf{x}_0)$ . However, the rewards of the particle approximation depend on the choice of potentials. For instance, if $r(\mathbf{x}_0)$ is bounded, then using the difference potential assigns low scores to particles that reach the maximum reward early in generation. In this setting, alternatives like the MAX potential may be apt. + +Interval Resampling. For a typical diffusion process, the states $\mathbf{x}_t$ and $\mathbf{x}_{t + 1}$ do not differ significantly. As a result, we propose interval resampling. We resample at selected steps, specified by a resampling schedule $R = \{t_r,\dots ,0\}$ . For $t\in R$ , $G_{t}$ is a non-uniform potential, such as the max potential, otherwise $G_{t} = 1$ . Interval resampling encourages exploration and reduces sampling time and compute. See fig. 8 and appendix E for its effect on samples. + +Choosing intermediate rewards $r_{\phi}(\mathbf{x}_t,\mathbf{c})$ . The ideal rewards for the intermediate state $\mathbf{x}_t$ requires knowledge of the distribution of terminal rewards given an intermediate step, $p_{\theta}(r(\mathbf{x}_0) | \mathbf{x}_t, \mathbf{c})$ . With this distribution, rewards $r_{\phi}$ can be chosen to ensure high-expected rewards or good worst-case quality by using the 10th percentile. Producing this distribution of rewards requires training with model samples, which can be expensive. Alternatively, we demonstrate that diffusion models offer many options with different trade-offs between compute versus the quality of the reward estimate $r(\mathbf{x}_0)$ : + +- Rewards at expected $\mathbf{x}_0$ . Similar to Song et al. (2020b); Bansal et al. (2023); Wu et al. (2023a); Li et al. (2024), intermediate rewards can be defined by evaluating the reward function at the diffusion model's approximation of the expected sample $\mathbf{x}_0$ : $\widehat{\mathbf{x}}_t \approx \mathbb{E}_{p_\theta(\mathbf{x}_0 \mid \mathbf{x}_t, \mathbf{c})}[\mathbf{x}_0 \mid \mathbf{x}_t, \mathbf{c}]$ . With this choice, the intermediate rewards are $r_\phi(\mathbf{x}_t, \mathbf{c}) = r(\mathbf{x}_0 = \widehat{\mathbf{x}}_t, \mathbf{c})$ . +- Many-sample $r_{\phi}$ . Diffusion models provide a means to sample $p_{\theta}(\mathbf{x}_0 \mid \mathbf{x}_t, \mathbf{c})$ . During inference, for each particle + +$\mathbf{x}_t^i$ , we sample $N$ samples $\mathbf{x}_0^{i,j}\sim p_\theta (\mathbf{x}_0\mid \mathbf{x}_t^i,\mathbf{c})$ and then use $r_{\phi}(\mathbf{x}_{t}^{i},\mathbf{c}) = \log \frac{1}{N}\sum_{j = 1}^{N}\exp (r(\mathbf{x}_{0}^{i,j},\mathbf{c}))$ to summarize the empirical distribution of rewards. + +- Learned $r_{\phi}$ . When sampling from $p_{\theta}(\mathbf{x}_0 \mid \mathbf{x}_t, \mathbf{c})$ is expensive, we can use the fact that $p_{\theta}$ is trained to approximate the noise process $q$ (Sohl-Dickstein et al., 2015; Song et al., 2020b). Therefore, we can use data samples to train $r_{\phi}$ . For instance, when $r(\mathbf{x}_0)$ is a classifier $p_{\theta}(y \mid \mathbf{x}_0)$ , then Nichol et al. (2021) train a classifier $p_{\phi}(y \mid \mathbf{x}_t)$ . For more general rewards, we can use: + +$$ +\underset {t \sim U [ 0, T ]} {\mathbb {E}} \underset {q _ {\text {d a t a}} (\mathbf {x} _ {0}) q (\mathbf {x} _ {t} \mid \mathbf {x} _ {0})} {\mathbb {E}} \| a _ {\phi} (\mathbf {x} _ {t}, \mathbf {c}) - \exp (r (\mathbf {x} _ {0}, \mathbf {c}) \| _ {2} ^ {2} +$$ + +and define $r_{\phi} = \log a_{\phi}$ . When $p_{\theta} = q$ , the reward $r_{\phi} = \log \mathbb{E}_{p_{\theta}(\mathbf{x}_0|\mathbf{x}_t,\mathbf{c})}[\exp (r(\mathbf{x}_0,\mathbf{c}))]$ can be used to define potentials $G_{t}$ that leads to the local transitions which minimize the variance of the potential at each step, see theorem 10.1 in (Chopin et al., 2020). + +We note that as long as the potentials satisfy eq. (3), any choice of $r_{\phi}$ allows for consistent approximations. See fig. 5 for how different choices of $r_{\phi}$ correlate with $r(\mathbf{x}_0)$ . + +Continuous-time diffusions. While the presentation above is for discrete-time models, FK steering can also be used for continuous-time models (Song et al., 2020b; Kingma et al., 2021; Singhal et al., 2023). Continuous-time models are sampled using numerical methods, such as Euler-Maruyama (Särkkä & Solin, 2019), which involve defining a discrete grid $\{1,1-\Delta t,\ldots,0\}$ and then sampling from the transition kernel $p_{\theta}(\mathbf{x}_t \mid \mathbf{x}_{t+\Delta},\mathbf{c})$ . Therefore, similar to discrete-time models, FK steering can tilt the transition kernels with potentials $G_t(\mathbf{x}_1,\mathbf{x}_{1-\Delta t},\ldots,\mathbf{x}_t)$ . + +# 4. Experiments + +We evaluate FK steering with the following experiments: + +- FK steering for sample quality: This experiment steers text-to-image diffusion models and text diffusion models with rewards that measure sample quality. + +- For text-to-image models, we use a human preference score, ImageReward, as the reward function. We evaluate on the heldout GenEval benchmark, a prompt fidelity benchmark. +- For text diffusion models, we explore three choices of rewards: the perplexity computed using either GPT2 (Radford et al., 2019) or a trigram language model (Liu et al., 2024b), and a linguistic acceptability classifier (Morris et al., 2020). + +- Studying potential choices in FK steering: Here we study the effect of the choices of potential on the rewards $r\left( {\mathbf{x}}_{0}^{i}\right)$ . + +- Studying different choices of intermediate rewards: We examine the effect of using different intermediate rewards with FK steering. + +- For text diffusion models, we consider control of text toxicity, which occurs in around $1\%$ of base model samples. +- For image diffusion models, we do class-conditional generation on ImageNet. In this experiment, we incorporate reward gradients to tilt the proposal generator. + +# 4.1. FK steering for sample quality + +Text-to-Image Diffusion Models. Here we use stable diffusion (Rombach et al., 2022; Podell et al., 2023; von Platen et al., 2022) text-to-image models $p_{\theta}(\mathbf{x}_0 \mid \mathbf{c})$ , where $\mathbf{c}$ is the text prompt. These models include both continuous and discrete-time processes. As the reward, we use the ImageReward preference model (Xu et al., 2024). Intermediate rewards are defined by evaluating the reward model on the denoised state, $r_{\phi}(\mathbf{x}_t) = r(\mathbf{x}_0 = \widehat{\mathbf{x}}_t)$ where $\widehat{\mathbf{x}}_t \approx \mathbb{E}_{p_\theta}[\mathbf{x}_0 \mid \mathbf{x}_t]$ . + +For the proposal generator $\tau$ , we use the base model itself. For sampling from the base model, we use classifier-free guidance (Ho & Salimans, 2022) with guidance scale set to $7.5^1$ , alongside the DDIM sampler (Song et al., 2020a) with $\eta = 1$ and $T = 100$ time-steps. We use $\lambda = 10$ and resampling schedule $[0, 20, 40, 60, 80]$ with the max potential $\exp (\lambda \max_{s = t}^{T}r_{\phi}(\mathbf{x}_{s}))$ , see table 7 for score model parameter counts and sampling time. + +We measure prompt fidelity using the GenEval benchmark $^2$ (Ghosh et al., 2024) and we also report ImageReward $^3$ and HPS (Wu et al., 2023b) scores. See appendix A for results with different sampling choices. As a benchmark, we compare against best-of- $n$ (BoN) sampling and gradient guidance. Additionally, we also benchmark against publicly available models, fine-tuned for prompt alignment and aesthetic quality. We use models fine-tuned using DPO $^4$ (Wallace et al., 2024) and DDPO (Black et al., 2023) $^5$ , an RL-based method. Additionally, we also evaluate FK steering fine-tuned models. + +In table 1 we report the prompt fidelity and aesthetic quality scores of the highest-reward particle generated by FK steering, and in fig. 4, we report average particle performance. + +Default choice from Hugging Face, see https://huggingface.co/blog/stable_diffusion + +2Prompts from https://github.com/djghosh13/geneval/tree/main/prompts +3Prompts from https://github.com/THUDM/ ImageReward/blob/main/data/test.json +4https://huggingface.co/papers/2311.12908 +$^{5}$ https://huggingface.co/kvabblack/ddpo-alignment + +![](images/24a4b7e1b7d6e0a1ad89fcb9d6dad7775b5f4f7280fdbdc49fae0c1ef674dbaa.jpg) +Figure 4. Effect of scaling the number of particles. Left: GENEVAL scores for FK steering using IMAGEREWARD, average particle performance. Dashed lines indicate performance of fine-tuned baselines. Middle: Corresponding IMAGEREWARD scores. Right: Distribution of IMAGEREWARD scores for samples from SDv2.1 (0.8B) with and without FK steering, compared with SDXL (2.6B). + +# We observe: + +- FK steering the base model beats fine-tuning. FK steering with $k = 4$ particles outperforms fine-tuned models on both prompt fidelity and human preference alignment. Moreover, Figure 2 shows that FK steering with just $k = 2$ has a higher GenEval score than the DPO and DDPO fine-tuned models. Additionally, we show that in Table 4, FK steering outperforms steering with gradient guidance (Bansal et al., 2023) using the ImageReward model. +- FK steering smaller models outperforms larger models. With $k = 4$ , FK steering SDv2.1 outperforms SDXL and its DPO (Wallace et al., 2024) fine-tuned version, on GenEval scores and aesthetic quality with less sampling time: 11.5s versus 9.1s, see fig. 3 for samples. +- Steering fine-tuned models. In table 1, we observe that FK steering fine-tuned models further improves performance. +- Effect of scaling the number of particles. Figure 4 shows that scaling the number of particles improves the average prompt fidelity and human preference alignment scores of all particles for all models. + +Text Diffusion Models. Next, we investigate steering to improve the sample quality of text diffusion models (Li et al., 2022; Gulrajani & Hashimoto, 2023; Horvitz et al., 2024). We consider two base text diffusion models: SSD-LM (Han et al., 2023) and MDLM (Sahoo et al., 2024) and use these models as the proposal generator $\tau$ . SSD-LM is a continuous space diffusion model trained on noised word logits, while MDLM is a discrete diffusion model. We consider three reward functions for improving text quality: perplexity computed with a trigram lan + +
ModelSampler\( GenEval^2 \uparrow \)\( IR^3 \uparrow \)\( HPS^3 \uparrow \)
SDv1.4k=10.440.230.245
SDv1.4\( BoN(k=4) \)0.540.800.256
\( SDv1.4_{DDPO} \)k=10.430.260.241
SDv1.4\( FK(k=4) \)0.540.920.26
SDv1.5k=10.440.180.245
SDv1.5\( \nabla(k=1) \)0.450.660.245
SDv1.5\( BoN(k=4) \)0.520.730.265
\( SDv1.5_{DPO} \)k=10.460.340.255
SDv1.5\( FK(k=4) \)0.540.890.263
\( SDv1.5_{DPO} \)\( FK(k=4) \)0.570.880.276
SDv2.1k=10.510.370.253
SDv2.1\( BoN(k=4) \)0.610.880.263
SDv2.1\( FK(k=3) \)0.590.860.265
SDv2.1\( FK(k=4) \)0.621.010.268
SDXLk=10.550.870.289
SDXL\( BoN(k=4) \)0.631.230.296
\( SDXL_{DPO} \)k=10.580.850.296
SDXL\( FK(k=4) \)0.641.290.302
\( SDXL_{DPO} \)\( FK(k=4) \)0.671.190.317
+ +guage model $^6$ , a classifier $^7$ (Morris et al., 2020) trained on the Corpus of Linguistic Acceptability (CoLA) dataset (Warstadt et al., 2018), and perplexity computed by GPT2. For all choices of reward models, we define the intermediate rewards using $r_{\phi}(\mathbf{x}_t) = r(\mathbf{x}_0 = \widehat{\mathbf{x}}_t)$ and the potential $G_t = \exp (\lambda (r_\phi (\mathbf{x}_t) - r_\phi (\mathbf{x}_{t + 1})))$ + +For both models, we resample 50 times, every 10 steps for SSD-LM ( $T = 500$ ) and every 20 for MDLM ( $T = 1000$ ). We use $\lambda = 10.0$ and return the highest reward sample at $t = 0$ . Following Han et al. (2023), we generate 20 continuations of length 50 using their 15 prompts. In addition, we evaluate base model performance, best-of- $n$ , and GPT2-Medium performance. As a baseline, we also include results for SSD-LM with more sampling time-steps, $T = 5000$ versus $T = 500$ for FK steering. We evaluate perplexity using GPT2-XL and CoLA acceptability. Additional details are included in appendix B. + +Table 2 contains the evaluation results. We observe: + +- FK steering improves the perplexity and CoLA scores of both models. For all reward functions, FK steering with $k = 4$ outperforms best-of-4 on the corresponding target metric (perplexity or CoLA). For MDLM, trigram + +Table 1. Effect of FK steering on prompt fidelity and human preference scores: For all models, FK steering improves performance, outperforming best-of- $n$ , gradient guidance $(\nabla)$ , and fine-tuning. Interestingly, even best-of- $n$ outperforms fine-tuning, showing the effectiveness of inference-time scaling. For all metrics, a higher value is better. + +
Model + Sampler(r)kPPL (GPT-XL) ↓CoLA ↑
GPT2-medium114.187.6
SSD-LM123.268.3
SSD-LMT×10118.876.6
FK(GPT2)411.080.0
FK(Trigram)414.177.4
FK(CoLA)417.495.7
BoN(GPT2)413.675.6
BoN(Trigram)415.971.9
BoN(CoLA)419.293.8
BoN(GPT2)811.280.3
BoN(Trigram)813.976.8
BoN(CoLA)818.497.2
MDLM185.328.9
FK(GPT2)449.039.8
FK(Trigram)440.337.0
FK(CoLA)473.669.8
BoN(GPT2)455.532.9
BoN(Trigram)452.130.1
BoN(CoLA)471.459.4
BoN(GPT2)846.937.2
BoN(Trigram)845.935.4
BoN(CoLA)868.273.1
+ +Table 2. Text sample quality results metrics. We sample texts of length 50 from all models and score perplexity with GPT2-XL and CoLA acceptability. Results are averaged over three seeds. Both SSD-LM and GPT-medium have 355 million parameters. MDLM is a smaller model with 170 million parameters. + +steering dramatically improves perplexity (40.3 vs 85.3), but is less effective at improving CoLA (37.0 vs 28.9). + +- FK steering outperforms best-of- $n$ . For all settings, FK steering outperforms best-of- $n$ for the same number of particles. Notably, in many cases FK steering outperforms best-of- $n$ with twice as many particles. Additionally, FK steering SSD-LM with $T = 500$ outperforms SSD-LM with $T = 5000$ for all metrics. + +Overall, our results demonstrate that FK steering with off-the-shelf rewards can enable sampling lower-perplexity, more linguistically acceptable text from diffusion models. + +# 4.2. Studying different choices of potentials + +In the previous section, we use two different potentials: the max potential, $\exp (\lambda \max_{s\geq t}r_{\phi}(\mathbf{x}_s))$ , for the text-to-image experiments and the difference potential, $\exp (\lambda (r_{\phi}(\mathbf{x}_t) - r_{\phi}(\mathbf{x}_{t + 1})))$ , for the text quality experiment. However, as discussed in section 3, the choice of potential is not unique. In this experiment, we steer text-toimage diffusion models with different choices of potentials, including the sum, max and difference potentials. + +In table 3, for all models, using the max potential yielded higher prompt fidelity scores. Since ImageReward is + +
PotentialkSDv1.4SDv1.5SDv2.1SDXL
Max40.5400.5400.6160.633
Sum40.4960.4990.5690.613
Difference40.5250.5260.5780.603
Max80.5690.5610.6350.648
Sum80.5320.5170.5880.634
Difference80.5660.5530.6150.640
+ +Table 3. Effect of different potentials on GenEval scores. Here we have the GenEval prompt fidelity score, averaged over all particles. Using the max potential outperforms the difference potential and the sum potential. + +
ModelSamplerGenEvalIRHPSTime
SDv1.5k=10.440.1870.2452.4s
SDv1.5∇(k=1)0.450.6680.24520s
SDv1.5FK(k=4)0.540.8980.2638.1s
SDv1.5FK(∇, k=4)0.561.2900.26855s
+ +bounded between $[-2, 2]$ , using the difference of intermediate rewards can assign lower scores to particles that achieve the maximum reward early in generation. However, for the same $\lambda$ and $k$ , the max potential favors higher scoring particles more so than the difference potential. This can lead to lower particle diversity. See appendix E for samples. + +4.3. Studying different choices of intermediate rewards In this experiment, we study the effect of using different choices of intermediate rewards on FK steering. Here we generate samples with rare attributes, such as (a) toxicity for text diffusion models and (b) class-conditional image generation with 1000 classes in the dataset. + +Controlling Text Toxicity. We consider the task of red-teaming toxicity, a rare attribute identified in only $1\%$ of base SSD-LM samples and $0.3\%$ of MDLM samples. Here, we examine whether FK steering enables testing rare but dangerous model behavior, a critical factor considered before deploying systems (Zhao et al., 2024a). The text diffusion models, SSD-LM and MDLM, the sampling parameters, and prompts are identical to section 4.1. We use the base models as the proposal generators. As a baseline, we compare against gradient guidance for SSD-LM and best-of- $n$ for both models. For reward, we use a popular toxicity + +Table 4. Comparison against gradient guidance. Here we note that FK steering with the model as the proposal generator outperforms gradient guidance, with faster sampling. We also note that FK steering can benefit from gradient guidance, albeit at the cost of more compute and sampling time. + +
Model + SamplerToxic ↑Toxic (H) ↑PPL ↓
SSD-LM0.4%1.2%23.2
SSD-LM (∇ guidance)22.3%22.6%40.3
MDLM0.3%1.9%85.3
SSD-LM (no gradients)
BoN(4)1.6%4.8%21.9
BoN(8)5.0%8.1%23.0
FK(k=4)8.4%14.0%22.5
FK(k=4, learned rφ)15.2%19.6%26.3
FK(k=8)25.0%29.7%23.9
FK(k=8, learned rφ)39.0%38.0%26.9
MDLM (no gradients)
BoN(4)2.2%6.7%83.8
BoN(8)3.7%10.8%84.6
FK(k=4)23.0%29.0%81.0
FK(k=4, many rφ)37.0%40.2%83.0
FK(k=8)53.4%48.3%74.3
FK(k=8, many rφ)64.7%51.7%82.9
+ +Table 5. Toxicity results. We evaluate the toxicity of the generated samples with (a) the classifier used for steering and (b) a separate holdout (H) classifier, we also report GPT2-XL perplexity. + +classifier (Logacheva et al., 2022).8 + +In this experiment, we explore the effect of different choices of intermediate rewards: + +- For SSD-LM, we consider two choices: (1) the reward evaluated at the denoised state and (2) the reward $r_{\phi}$ learned with real data. +- For MDLM, we use $N$ samples $\mathbf{x}_0^{i,j} \sim p_\theta(\mathbf{x}_0^{i,j} \mid \mathbf{x}_t^i)$ to compute the reward $r_\phi = \log \frac{1}{N} \sum_{j=1}^N \exp(r(\mathbf{x}_0^{i,j}))$ with $N = 4, 16$ samples. + +For evaluation, we also include results from an additional holdout toxicity classifier, trained on a multilingual mixture of toxicity datasets (Dementieva et al., 2024). Details are included in appendix B. In Table 5, we observe the following: + +- Using many-sample $r_{\phi}$ improves controllability: FK steering MDLM with $k = 8$ achieves an accuracy of $53.4\%$ . Using more samples for intermediate rewards improves performance even further to $64.7\%$ . FK steering outperforms best-of- $n$ sampling with both 4 and 8 particles. +- FK steering can outperform gradient guidance and preserves fluency: With 8 particles, FK steering SSD-LM outperforms gradient guidance on holdout toxicity accuracy (29.7% vs 22.6%), and improves on perplexity + +(23.9 vs 40.3). Using learned intermediate rewards improves performance further, increasing toxicity to $39.0\%$ . + +![](images/1ee708151fdc5c843c663657adb35218af59b93f59688fa68992b9b4054845db.jpg) +Figure 5. Correlation between $r_{\phi}(\mathbf{x}_t)$ and final state $r(\mathbf{x}_0)$ : Left: Correlations between $r(\mathbf{x}_0)$ and $r(\mathbf{x}_0 = \widehat{\mathbf{x}}_t)$ for several text-to-image models, where $r$ is the ImageReward model. Right: Correlation between a text toxicity classifier $r(\mathbf{x}_0)$ and (a) $r(\mathbf{x}_0 = \widehat{\mathbf{x}}_t)$ and (b) learned $r_{\phi}(\mathbf{x}_t)$ , using on SSD-LM. Learning the intermediate rewards with a regression objective improves the correlation between $r(\mathbf{x}_t)$ and $r(\mathbf{x}_0)$ . + +![](images/8a5ab8d8c37c62436be3f018a870e2461c86ff5cc2ed8895260bb066e1327842.jpg) + +Better Rewards vs. More Particles. We observed that using better intermediate rewards, either learned or using multiple samples, improves performance. For instance, FK steering SSD-LM for $k = 4$ achieves $15.2\%$ accuracy with learned rewards, compared to $8.4\%$ when using the reward evaluated at the denoised state, however, with $k = 8$ accuracy increases to $25\%$ , without the learned rewards. Therefore, FK steering offers two ways for scaling compute to improve performance: allocating additional resources to better estimate rewards $r(\mathbf{x}_0)$ , or by scaling the number of particles. + +Class-Conditional Image Generation. In this experiment, we steer a marginal diffusion model $p_{\theta}(\mathbf{x}_0)$ to produce samples from one of 1000 different classes. Similar to Wu et al. (2023a), the reward is $r(\mathbf{x}_0,y) = \log p_{\theta}(y\mid \mathbf{x}_0)$ and we also use gradient guidance for the proposal distribution $\tau (\mathbf{x}_t\mid \mathbf{x}_{t + 1},\mathbf{c})$ . + +We compare two potentials, the max potential and the difference potentials, along with two different reward models: one that uses the denoised state $r(\mathbf{x}_0 = \widehat{\mathbf{x}}_t, y)$ and one that is trained on noisy states $\mathbf{x}_t \sim q(\mathbf{x}_t \mid \mathbf{x}_0)$ where $\mathbf{x}_0 \sim q_{\mathrm{data}}$ (Nichol et al., 2021). This experiment uses pre-trained marginal diffusion model and classifiers from Nichol & Dhariwal (2021) and generates $256 \times 256$ resolution images. In table 6, we observe that learning $r_\phi$ , for both gradient guidance and potential computation, provides significant improvements over the reward evaluated at the denoised state. + +# 5. Conclusion + +We present Feynman-Kac steering, a framework for inference-time steering of diffusion modeling, based on + +
rφ(xt)Gtp(y | x0) Mean (Max)
r(x0 = x̂t)Diff.0.59 (0.72)
r(x0 = x̂t)Max0.65 (0.70)
LearnedDiff.0.88 (0.94)
LearnedMax0.88 (0.96)
+ +Table 6. ImageNet class-conditional probabilities with different choices of rewards and potentials. In this experiment, we explore the effect of two choices of rewards, learned and the reward evaluated at the denoised state (Wu et al., 2023a). We also explore the effect of different choices of potentials, the difference and the max potential. We observe that learning the reward improves performance significantly. + +FK-IPS (Moral, 2004). Our experiments demonstrate that FK steering can improve sample quality and controllability of image and text diffusion models, outperforming finetuning and other inference-time approaches. + +FK steering can be used in a "plug-and-play" fashion, with no extra training. For instance, using the difference potential with intermediate rewards defined using the denoised state and the base model as the proposal generator improves performance significantly, outperforms fine-tuned models, and enables small models to outperform larger models, with less compute. Additionally, by exploring different choices of potentials, intermediate rewards, and samplers, users can optimize performance for their tasks. + +Our experiments show that scaling the number of particles is a natural mechanism for improving diffusion models. Notably, in our text-to-image experiments, even best-of-4 outperforms fine-tuned models. FK steering improves on best-of- $n$ by resampling using intermediate rewards during generation, resulting in efficient inference-time scaling. + +# Acknowledgments + +The authors would like to acknowledge Stefan Andreas Baumann, Yunfan Zhang, Anshuk Uppal, Mark Goldstein, and Eric Horvitz for their valuable feedback. + +This work was partly supported by the NIH/NHLBI Award R01HL148248, NSF Award 1922658 NRT-HDR: FUTURE Foundations, Translation, and Responsibility for Data Science, NSF CAREER Award 2145542, ONR N00014-23-1-2634, and Apple. Additional support was provided by a Fellowship from the Columbia Center of AI Technology. This work was also supported by IITP with a grant funded by the MSIT of the Republic of Korea in connection with the Global AI Frontier Lab International Collaborative Research (No. RS-2024-00469482 & RS-2024-00509279). + +# Impact Statement + +Controllable generation methods such as FK steering can be applied to align language models with human preferences, including to improve their personalization or safety. Additionally, we show that FK steering can be used for automated red-teaming, which can inform model deployment. We recognize that any such method for controllable generation can be used to generate harmful samples by malicious actors. However, FK steering enables the research community to better understand properties of generative models and make them safer, which we believe will ultimately outweigh these harms. + +# References + +Jacob Austin, Daniel D Johnson, Jonathan Ho, Daniel Tarlow, and Rianne Van Den Berg. Structured denoising diffusion models in discrete state-spaces. Advances in Neural Information Processing Systems, 34:17981-17993, 2021. +Arpit Bansal, Hong-Min Chu, Avi Schwarzschild, Soumyadip Sengupta, Micah Goldblum, Jonas Geiping, and Tom Goldstein. Universal guidance for diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 843-852, 2023. +Kevin Black, Michael Janner, Yilun Du, Ilya Kostrikov, and Sergey Levine. Training diffusion models with reinforcement learning. arXiv preprint arXiv:2305.13301, 2023. +Andrew Campbell, Joe Benton, Valentin De Bortoli, Thomas Rainforth, George Deligiannidis, and Arnaud Doucet. A continuous time framework for discrete denoising models. Advances in Neural Information Processing Systems, 35:28266-28279, 2022. +Gabriel Cardoso, Yazid Janati El Idrissi, Sylvain Le Corff, and Eric Moulines. Monte carlo guided diffusion for bayesian linear inverse problems. arXiv preprint arXiv:2308.07983, 2023. +Sourav Chatterjee and Persi Diaconis. The sample size required in importance sampling. The Annals of Applied Probability, 28(2):1099-1135, 2018. +Nicolas Chopin, Omiros Papaspiliopoulos, et al. An introduction to sequential Monte Carlo, volume 4. Springer, 2020. +Hyungjin Chung, Jeongsol Kim, Michael T McCann, Marc L Klasky, and Jong Chul Ye. Diffusion posterior sampling for general noisy inverse problems. arXiv preprint arXiv:2209.14687, 2022. + +Pierre Del Moral and Josselin Garnier. Genealogical particle analysis of rare events. 2005. +Pierre Del Moral and Laurent Miclo. Branching and interacting particle systems approximations of Feynman-Kac formulae with applications to non-linear filtering. Springer, 2000. +Daryna Dementieva, Daniil Moskovskiy, Nikolay Babakov, Abinew Ali Ayele, Naquee Rizwan, Frolian Schneider, Xintog Wang, Seid Muhie Yimam, Dmitry Ustalov, Elisei Stakovskii, Alisa Smirnova, Ashraf Elnagar, Animesh Mukherjee, and Alexander Panchenko. Overview of the multilingual text detoxification task at pan 2024. In Guglielmo Faggioli, Nicola Ferro, Petra Galuscakova, and Alba Garcia Seco de Herrera (eds.), Working Notes of CLEF 2024 - Conference and Labs of the Evaluation Forum. CEUR-WS.org, 2024. +Carles Domingo-Enrich, Michal Drozdal, Brian Karrer, and Ricky TQ Chen. Adjoint matching: Finetuning flow and diffusion generative models with memoryless stochastic optimal control. arXiv preprint arXiv:2409.08861, 2024. +Zehao Dou and Yang Song. Diffusion posterior sampling for linear inverse problem solving: A filtering perspective. In The Twelfth International Conference on Learning Representations, 2024. +Arnaud Doucet and Anthony Lee. Sequential monte carlo methods. In Handbook of graphical models, pp. 165-188. CRC Press, 2018. +Ying Fan, Olivia Watkins, Yuqing Du, Hao Liu, Moonkyung Ryu, Craig Boutilier, Pieter Abbeel, Mohammad Ghavamzadeh, Kangwook Lee, and Kimin Lee. Reinforcement learning for fine-tuning text-to-image diffusion models. Advances in Neural Information Processing Systems, 36, 2024. +Dhruba Ghosh, Hannaneh Hajishirzi, and Ludwig Schmidt. Geneval: An object-focused framework for evaluating text-to-image alignment. Advances in Neural Information Processing Systems, 36, 2024. +Aaron Gokaslan, Vanya Cohen, Ellie Pavlick, and Stefanie TELlex. Openwebtext corpus. http://Skylion007.github.io/OpenWebTextCorpus, 2019. +Shansan Gong, Mukai Li, Jiangtao Feng, Zhiyong Wu, and Lingpeng Kong. Diffuseq: Sequence to sequence text generation with diffusion models, 2023. URL https://arxiv.org/abs/2210.08933. +Nate Gruver, Samuel Stanton, Nathan C. Frey, Tim G. J. Rudner, Isidro Hotzel, Julien LaFrance-Vanasse, Arvind Rajpal, Kyunghyun Cho, and Andrew Gordon Wilson. + +Protein design with guided discrete diffusion, 2023. URL https://arxiv.org/abs/2305.20009. +Ishaan Gulrajani and Tatsunori B. Hashimoto. Likelihood-based diffusion language models, 2023. URL https://arxiv.org/abs/2305.18619. +Martin Hairer and Jonathan Weare. Improved diffusion monte carlo. Communications on Pure and Applied Mathematics, 67(12):1995-2021, 2014. +Xiaochuang Han, Sachin Kumar, and Yulia Tsvetkov. Sd-lm: Semi-autoregressive simplex-based diffusion language model for text generation and modular control, 2023. URL https://arxiv.org/abs/2210.17432. +Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. arXiv preprint arXiv:2207.12598, 2022. +Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. arXiv preprint arXiv:2006.11239, 2020. +Jonathan Ho, Tim Salimans, Alexey Gritsenko, William Chan, Mohammad Norouzi, and David J Fleet. Video diffusion models. Advances in Neural Information Processing Systems, 35:8633-8646, 2022. +Zachary Horvitz, Ajay Patel, Chris Callison-Burch, Zhou Yu, and Kathleen McKeown. Paraguide: Guided diffusion paraphrasers for plug-and-play textual style transfer, 2024. URL https://arxiv.org/abs/2308.15459. +Yazid Janati, Badr Moufad, Alain Durmus, Eric Moulines, and Jimmy Olsson. Divide-and-conquer posterior sampling for denoising diffusion priors. Advances in Neural Information Processing Systems, 37:97408-97444, 2024. +Diederik P Kingma, Tim Salimans, Ben Poole, and Jonathan Ho. Variational diffusion models. arXiv preprint arXiv:2107.00630, 2021. +Tomasz Korbak, Ethan Perez, and Christopher L Buckley. Rl with kl penalties is better viewed as bayesian inference. arXiv preprint arXiv:2205.11275, 2022. +Xiang Lisa Li, John Thickstun, Ishaan Gulrajani, Percy Liang, and Tatsunori B. Hashimoto. Diffusion-lm improves controllable text generation, 2022. URL https://arxiv.org/abs/2205.14217. +Xiner Li, Yulai Zhao, Chenyu Wang, Gabriele Scalia, Gokcen Eraslan, Surag Nair, Tommaso Biancalani, Aviv Regev, Sergey Levine, and Masatoshi Uehara. Derivative-free guidance in continuous and discrete diffusion models with soft value-based decoding, 2024. URL https://arxiv.org/abs/2408.08252. + +Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. Advances in neural information processing systems, 36, 2024a. +Jiacheng Liu, Sewon Min, Luke Zettlemoyer, Yejin Choi, and Hannaneh Hajishirzi. Infini-gram: Scaling unbounded n-gram language models to a trillion tokens. arXiv preprint arXiv:2401.17377, 2024b. +Varvara Logacheva, Daryna Dementieva, Sergey Ustyantsev, Daniil Moskovskiy, David Dale, Irina Krotova, Nikita Semenov, and Alexander Panchenko. ParaDetox: Detoxification with parallel data. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 6804-6818, Dublin, Ireland, May 2022. Association for Computational Linguistics. URL https://aclanthology.org/2022.acl-long.469. +Pierre Moral. Feynman-Kac formulae: genealogical and interacting particle systems with applications. Springer, 2004. +John Morris, Eli Lifland, Jin Yong Yoo, Jake Grigsby, Di Jin, and Yanjun Qi. Textattack: A framework for adversarial attacks, data augmentation, and adversarial training in nlp. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pp. 119-126, 2020. +Christian A Naesseth, Fredrik Lindsten, Thomas B Schön, et al. Elements of sequential monte carlo. Foundations and Trends® in Machine Learning, 12(3):307-392, 2019. +Alex Nichol and Prafulla Dhariwal. Improved denoising diffusion probabilistic models. arXiv preprint arXiv:2102.09672, 2021. +Alex Nichol, Prafulla Dhariwal, Aditya Ramesh, Pranav Shyam, Pamela Mishkin, Bob McGrew, Ilya Sutskever, and Mark Chen. Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint arXiv:2112.10741, 2021. +Dustin Podell, Zion English, Kyle Lacey, Andreas Blattmann, Tim Dockhorn, Jonas Müller, Joe Penna, and Robin Rombach. Sdxl: Improving latent diffusion models for high-resolution image synthesis. arXiv preprint arXiv:2307.01952, 2023. +Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019. +Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. + +Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748-8763. PMLR, 2021. +Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D Manning, Stefano Ermon, and Chelsea Finn. Direct preference optimization: Your language model is secretly a reward model. Advances in Neural Information Processing Systems, 36, 2024. +Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10684-10695, 2022. +Subham Sekhar Sahoo, Marianne Arriola, Yair Schiff, Aaron Gokaslan, Edgar Marroquin, Justin T Chiu, Alexander Rush, and Volodymyr Kuleshov. Simple and effective masked diffusion language models, 2024. +Simo Särkkä and Arno Solin. Applied stochastic differential equations, volume 10. Cambridge University Press, 2019. +Jiaxin Shi, Kehang Han, Zhe Wang, Arnaud Doucet, and Michalis K Titsias. Simplified and generalized masked diffusion for discrete data. arXiv preprint arXiv:2406.04329, 2024. +Raghav Singhal, Mark Goldstein, and Rajesh Ranganath. Where to diffuse, how to diffuse, and how to get back: Automated learning for multivariate diffusions. In International conference on learning representations, 2023. +Raghav Singhal, Mark Goldstein, and Rajesh Ranganath. What's the score? automated denoising score matching for nonlinear diffusions. In International conference on machine learning, 2024. +Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In International Conference on Machine Learning, pp. 2256-2265. PMLR, 2015. +Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020a. +Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456, 2020b. +Brian L Trippe, Jason Yim, Doug Tischer, David Baker, Tamara Broderick, Regina Barzilay, and Tommi Jaakkola. Diffusion probabilistic modeling of pro + +tein backbones in 3d for the motif-scaffolding problem. arXiv preprint arXiv:2206.04119, 2022. +Douglas Vestal, René Carmona, and Jean-Pierre Fouque. Interacting particle systems for the computation of cdo tranche spreads with rare defaults. 2008. +Patrick von Platen, Suraj Patil, Anton Lozhkov, Pedro Cuenca, Nathan Lambert, Kashif Rasul, Mishig Davaadorj, Dhruv Nair, Sayak Paul, William Berman, Yiyi Xu, Steven Liu, and Thomas Wolf. Diffusers: State-of-the-art diffusion models. https://github.com/huggingface/diffusers, 2022. +Bram Wallace, Meihua Dang, Rafael Rafailov, Linqi Zhou, Aaron Lou, Senthil Purushwalkam, Stefano Ermon, Caiming Xiong, Shafiq Joty, and Nikhil Naik. Diffusion model alignment using direct preference optimization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8228-8238, 2024. +Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. Neural network acceptability judgments. arXiv preprint arXiv:1805.12471, 2018. +Luhuan Wu, Brian Trippe, Christian Naesseth, David Blei, and John P Cunningham. Practical and asymptotically exact conditional sampling in diffusion models. Advances in Neural Information Processing Systems, 36, 2023a. +Xiaoshi Wu, Yiming Hao, Keqiang Sun, Yixiong Chen, Feng Zhu, Rui Zhao, and Hongsheng Li. Human preference score v2: A solid benchmark for evaluating human preferences of text-to-image synthesis. arXiv preprint arXiv:2306.09341, 2023b. +Jiazheng Xu, Xiao Liu, Yuchen Wu, Yuxuan Tong, Qinkai Li, Ming Ding, Jie Tang, and Yuxiao Dong. Imagereward: Learning and evaluating human preferences for text-to-image generation. Advances in Neural Information Processing Systems, 36, 2024. +Stephen Zhao, Rob Brekelmans, Alireza Makhzani, and Roger Grosse. Probabilistic inference in language models via twisted sequential monte carlo, 2024a. URL https://arxiv.org/abs/2404.17546. +Zheng Zhao, Ziwei Luo, Jens Sjolund, and Thomas B Schon. Conditional sampling within generative diffusion models. arXiv preprint arXiv:2409.09650, 2024b. + +# A. Text to Image Experiments + +
ModelParamsBase(k=1)Base(k=4)FK(k=4)FK(k=4, parallel)
SD v1.4/v1.5860M2.4s7.3s8.1s5.0s
SD v2.1865M4.6s15.6s17.4s9.1s
SDXL2.6B11.5s42.3s43.5s21.7s
+ +Table 7. Parameter counts and timing. In this table, we provide inference timing for text-to-image diffusion models with FK steering. We include results for FK steering on a single NVIDIA-A100 GPU and a two-device parallel implementation. FK steering incurs only a minimal increase in time compared to independently generating $k$ particles. This gap shrinks as the diffusion model parameter count increases. + +In this section, we explore the effect of $\lambda$ and the resampling schedule on particle diversity for text-to-image generation. Similar to Domingo-Enrich et al. (2024), we measure the diversity of generations using the CLIP (Radford et al., 2021) encoder $f_{\theta}$ , so given $k\left\{\mathbf{x}_0^i\right\}_{i=1}^k$ particles, we measure: + +$$ +\operatorname {C L I P - D i v} \left(\left\{\mathbf {x} _ {0} ^ {i} \right\} _ {i = 1} ^ {k}\right) := \sum_ {i = 1} ^ {k} \sum_ {j = i} ^ {k} \frac {2}{k (k - 1)} \left\| f _ {\theta} \left(\mathbf {x} _ {0} ^ {i}\right) - f _ {\theta} \left(\mathbf {x} _ {0} ^ {j}\right) \right\| _ {2} ^ {2}. \tag {4} +$$ + +Similar to section 4.1, we use the stable diffusion text-to-image models (Rombach et al., 2022) with the ImageReward human preference score (Xu et al., 2024) as the reward function. Here we use the difference potential. + +We evaluate FK steering with different values of $\lambda$ and different resampling schedules, [0, 20, 40, 60, 80] and [0, 70, 75, 80, 85, 90]. In table 8, we observe that for all values of $\lambda$ and the resampling schedule, the GenEval score of FK steering outperforms the base model. However, for lower values of $\lambda$ , the CLIP diversity score is significantly higher, implying higher particle diversity. Similarly, in table 9, we observe that for higher values of $\lambda$ , the human preference scores are higher, while the particle diversity is lower. + +# B. Text Experiments + +For all text experiments, we use publicly available SSD-LM $^{10}$ , MDLM $^{11}$ , and GPT2-Medium $^{12}$ checkpoints. For both text experiments, we generate sequences of length 50, conditioned on the prompts used by Han et al. (2023) to evaluate controllable text generation. We generate 20 continuations for each of the 15 prompts. + +# B.1. Baselines + +Following Han et al. (2023), for SSD-LM we iteratively generate these continuations in blocks of 25. Except for our $T = 5000$ quality experiment, we default to $T = 500$ for all SSD-LM experiments, and follow the multi-hot sampling procedure, with a top-p = 0.20 (Han et al., 2023). For toxicity gradient guidance, we set the learning rate = 2000. For MDLM, we condition on each prompt by prefilling the prompt tokens at inference time. The model is trained to generate tokens in blocks of 1024. For consistency, we only consider the first 50 tokens of each generated sample, after re-tokenizing with the SSD-LM tokenizer. We use 1000 steps for all MDLM experiments. For the GPT2-Medium baseline, we generate all samples with top-p = 0.95 and temperature = 1.0. + +# B.2. FK steering Details + +For all FK steering text experiments, we set $\lambda = 10.0$ and use the difference of rewards potential. We resample 50 times for each inference: at every 10 steps for SSD-LM and every 20 steps for MDLM. To convert intermediate SSD-LM states to text, we sample tokens from the logit estimate, $\widehat{\mathbf{x}}_t$ , with top-p = 0.20. To convert intermediate MDLM states to text, we sample the masked tokens from the multinomial distribution given by $\widehat{\mathbf{x}}_t$ . By default, we sample one intermediate text for SSD-LM, and four texts for MDLM. Rewards are averaged over these samples. For Improved FK steering with MDLM, we sample and evaluate 16 intermediate texts, rather than 4. + +For Improved FK steering with SSD-LM, we take the more involved approach of fine-tuning the off-the-shelf toxicity classifier on intermediate states, $\widehat{x}_t$ . To build a training dataset, we used reward toxicity classifier to identify 26K non-toxic + +
ModelSamplerScheduleCLIP Div.GenEval Score
SD v1.4FK(k=4,λ=10)5-30-50.14370.4814
SD v1.4FK(k=4,λ=10)20-80-200.10500.5258
SD v1.4FK(k=4,λ=2)5-30-50.23210.4975
SD v1.4FK(k=4,λ=2)20-80-200.22390.4910
SD v1.4base (k=4)-0.31580.4408
SD v1.5FK(k=4,λ=10)5-30-50.14590.4861
SD v1.5FK(k=4,λ=10)20-80-200.10380.5224
SD v1.5FK(k=4,λ=2)5-30-50.23300.4854
SD v1.5FK(k=4,λ=2)20-80-200.22520.5114
SD v1.5base (k=4)-0.31150.4483
SD v2.1FK(k=4,λ=10)5-30-50.12590.5523
SD v2.1FK(k=4,λ=10)20-80-200.10610.5783
SD v2.1FK(k=4,λ=2)5-30-50.20510.5607
SD v2.1FK(k=4,λ=2)20-80-200.22130.5587
SD v2.1base (k=4)-0.29480.5104
SDXLFK(k=4,λ=10)5-30-50.11820.6056
SDXLFK(k=4,λ=10)20-80-200.10550.6034
SDXLFK(k=4,λ=2)5-30-50.18160.5863
SDXLFK(k=4,λ=2)20-80-200.21110.5857
SDXLbase (k=4)-0.28590.5571
+ +Table 8. Effect of $\lambda$ and resampling schedule on diversity. Here we report average GenEval scores of all particles generation by FK steering to show that prompt fidelity increases for all particles. Moreover, we notice that lower values of $\lambda$ can also be used to generate diverse particles. + +
ModelSamplerScheduleIR (Mean / Max)HPS (Mean / Max)CLIP Div.
SD v1.4base (k=4)-0.234 (0.800)0.245 (0.256)0.348
SD v1.4FK (k=4,λ=10.0)5-30-50.506 (0.783)0.251 (0.255)0.193
SD v1.4FK (k=4,λ=10.0)20-80-200.811 (0.927)0.258 (0.259)0.091
SD v1.4FK (k=4,λ=1.0)20-80-200.502 (0.763)0.252 (0.256)0.173
SD v1.4FK (k=4,λ=1.0)5-30-50.368 (0.723)0.248 (0.254)0.236
SD v2.1base (k=4)-0.372 (0.888)0.253 (0.263)0.318
SD v2.1FK (k=4,λ=1.0)5-30-50.582 (0.835)0.258 (0.261)0.180
SD v2.1FK (k=4,λ=10.0)20-80-200.891 (1.006)0.264 (0.266)0.087
SD v2.1FK (k=4,λ=1.0)20-80-200.579 (0.826)0.257 (0.261)0.164
SDXLbase (k=4)-0.871 (1.236)0.289 (0.296)0.248
SDXLFK (k=4,λ=10.0)5-30-51.032 (1.186)0.293 (0.295)0.123
SDXLFK (k=4,λ=10.0)20-80-201.211 (1.298)0.296 (0.297)0.071
+ +Table 9. Effect of $\lambda$ and resampling schedule on diversity. Here we report the average ImageReward and HPS scores of all particles generation by FK steering to show that sample quality increases for all particles. + +and 26K toxic texts from the OpenWebText corpus (Gokaslan et al., 2019). We then applied the SSD-LM forward process $q$ to noise the text to random timestep $t$ , and then use the base model to infer $\widehat{x}_t$ . We then fine-tune the off-the-shelf reward classifier to estimate the toxicity probability of the original text given the intermediate text. + +We fine-tune three reward models for different SSD-LM time-step ranges: + +$$ +t \in [ 5 0 0, 3 0 0), [ 3 0 0, 2 0 0), [ 2 0 0, 1 0 0) +$$ + +We train with batch size $= 16$ and learning rate $= 5e - 7$ , using a constant learning rate with 50 warm-up steps. We train with cross entropy loss, and use a weighting (0.99 non-toxic, 0.01 toxic), due to the rarity of toxicity in the original data distribution. For the gradient-based guidance baseline for SSD-LM, we use the default guidance scale from Han et al. (2023) $^{13}$ . + +# C. Consistency of Particle Approximations + +In this section, we prove that using SMC with multinomial resampling leads to a consistent approximation of the target distribution, that is, suppose we have $k$ particles $\mathbf{x}_0^i$ and potentials $G_0(\mathbf{x}_T^i,\ldots ,\mathbf{x}_0^i)$ , then the weighted empirical distribution converges to the target $p_{\mathrm{target}}(\mathbf{x}_0)\propto p_\theta (\mathbf{x}_0)\exp (\lambda r(\mathbf{x}_0))$ . Let $\mathbf{w}_t^i$ denote the normalized potential scores + +$$ +\mathbf {w} _ {t} ^ {i} := \frac {1}{\sum_ {j = 1} ^ {k} G _ {t} \left(\mathbf {z} _ {t} ^ {j}\right)} G _ {t} \left(\mathbf {z} _ {t} ^ {i}\right) \tag {5} +$$ + +where $\mathbf{z}_t^i = (\mathbf{x}_T^i,\dots ,\mathbf{x}_t^i)$ for $i\in \{1,\ldots ,k\}$ denotes the path sampled till time $t$ . Then we show that as $k\to \infty$ + +$$ +\sum_ {i = 1} ^ {k} \mathbf {w} _ {0} ^ {i} \delta_ {\mathbf {z} _ {0} ^ {i}} \Rightarrow \frac {1}{\mathbf {Z}} p _ {\theta} \left(\mathbf {x} _ {T}, \dots , \mathbf {x} _ {0}\right) \exp \left(\lambda r \left(\mathbf {x} _ {0}\right)\right) \tag {6} +$$ + +which implies that $\sum_{i=1}^{k} \mathbf{w}_0^i \delta_{\mathbf{x}_0^i} \Rightarrow p_{\mathrm{target}}(\mathbf{x}_0)$ . + +The proof of consistency relies on the following two facts: + +- The process on the extended space $\mathbf{z}_t$ is also Markov, that is $p_{\theta}(\mathbf{z}_t \mid \mathbf{z}_{t+1}, \ldots, \mathbf{z}_T) = p_{\theta}(\mathbf{z}_t \mid \mathbf{z}_{t+1})$ . +- For each $t \in \{T - 1, \dots, 0\}$ , the particle-based approximation is consistent, so + +$$ +\sum_ {i = 1} ^ {k} \mathbf {w} _ {t} ^ {i} \delta_ {\mathbf {z} _ {t} ^ {i}} \Rightarrow p _ {\mathrm {F K}, t} (\mathbf {x} _ {T}, \dots , \mathbf {x} _ {t}). \tag {7} +$$ + +Note that, since $\prod_{t = T}^{0}G_{t} = \exp (\lambda r(\mathbf{x}_{0}))$ , eq. (7) for $t = 0$ implies eq. (6). + +To prove consistency we rely on lemma 11.1 in Chopin et al. (2020) which proves weak convergence of the SMC particle approximations. + +Lemma 1 (Lemma 11.1 in Chopin et al. (2020)). Suppose the potential functions $\{G_t\}_{t=T}^0$ are upper-bounded and $\mathbf{x}_t \in \mathbf{R}^d$ , then for all $t \in \{T, \ldots, 0\}$ , there exists a constant $c_t > 0$ such that for all continuous and bounded functions $\phi: \mathbf{R}^{d \times t} \to \mathbf{R}$ , for all $k$ we have: + +$$ +\mathbb {E} \left[ \right.\left.\left| \sum_ {i = 1} ^ {k} \mathbf {w} _ {t} ^ {i} \phi \left(\mathbf {z} _ {t} ^ {i}\right) - \underset {p _ {\mathrm {F K}, t}} {\mathbb {E}} [ \phi (\mathbf {z} _ {t}) ] \right| ^ {2} \right] \leq c _ {t} \frac {1}{k} \| \phi \| _ {\infty} ^ {2} \tag {8} +$$ + +where $\mathbf{w}_t^i = \frac{G_t(\mathbf{z}_t^i)}{\sum_{j=1}^k G_t(\mathbf{z}_t^j)}$ are the normalized resampling weights. + +Lemma 1 implies that the weighted empirical distribution for all $t$ are consistent, proving eq. (7). Now, note that eq. (8) implies that the weighted empirical distribution $\sum_{i=1}^{k} \mathbf{w}_0^i \delta_{\mathbf{x}_0^i}$ converges to $p_{\mathrm{target}}(\mathbf{x}_0)$ , since for all continuous and bounded functions $\psi: \mathbf{R}^d \to \mathbf{R}$ , eq. (8) implies that + +$$ +\mathbb {E} \left[ \right.\left.\left| \sum_ {i = 1} ^ {k} \mathbf {w} _ {0} ^ {i} \psi \left(\mathbf {x} _ {0} ^ {i}\right) - \underset {p _ {\mathrm {F K}, 0}} {\mathbb {E}} [ \psi (\mathbf {x} _ {0}) ] \right| ^ {2} \right] \leq c _ {0} \frac {1}{k} \| \psi \| _ {\infty} ^ {2} \tag {9} +$$ + +therefore, for $t = 0$ the particle-approximation converges to the target distribution: + +$$ +\sum_ {i = 1} ^ {k} \mathbf {w} _ {0} ^ {i} \delta_ {\mathbf {x} _ {0} ^ {i}} \Rightarrow \frac {1}{\mathbf {Z}} p _ {\theta} (\mathbf {x} _ {0}) \exp (\lambda r (\mathbf {x} _ {0})) \tag {10} +$$ + +# D. Feynman-Kac IPS Discussion + +# D.1. Choice of proposal distribution + +Here we discuss various choices for twisting the transition kernel towards high reward samples: + +- Gradient-based guidance: For continuous-state models and differentiable rewards, we can use gradient's from the reward (Sohl-Dickstein et al., 2015; Song et al., 2020b; Bansal et al., 2023; Wu et al., 2023a) to guide the sampling process. Suppose $p_{\theta}(\mathbf{x}_t \mid \mathbf{x}_{t+1}, \mathbf{c}) = \mathcal{N}(\mu_{\theta}(\mathbf{x}_t, \mathbf{c}), \sigma_{\theta}^2 I_d)$ , then we can twist the transition kernel using reward gradients: + +$$ +\mathcal {N} \left(\mu_ {\theta} (\mathbf {x} _ {t}, \mathbf {c}) + \sigma_ {\theta} ^ {2} \lambda \nabla_ {\mathbf {x} _ {t}} r _ {\phi} (\mathbf {x} _ {t}, \mathbf {c}), \sigma_ {\theta} ^ {2}\right), \tag {11} +$$ + +where $r_{\phi}$ is the intermediate reward, either learned or evaluated at the reward on the denoised state $r(\mathbf{x}_0 = \widehat{\mathbf{x}}_t)$ . + +- Discrete normalization: For discrete diffusion models, such as masked diffusion language model (MDLM) (Sahoo et al., 2024; Shi et al., 2024), we can also estimate the normalization constant: + +$$ +\sum_ {\mathbf {x} _ {t}} p _ {\theta} \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {t + 1}, \mathbf {c}\right) G _ {t} \left(\mathbf {x} _ {T}, \dots , \mathbf {x} _ {t}, \mathbf {c}\right) \tag {12} +$$ + +and sample from $p_{\mathrm{FK},t}(\mathbf{x}_t \mid \mathbf{x}_{t+1}, \ldots, \mathbf{x}_T) \propto p_\theta(\mathbf{x}_t \mid \mathbf{x}_{t+1}) G_t(\mathbf{x}_T, \ldots, \mathbf{x}_t)$ . + +However, such methods for twisting the transition kernel can lead to increased sampling time compared to sampling from the base model $p_{\theta}$ . + +# D.2. How existing work fits into FK steering + +TDS (Wu et al., 2023a) uses SMC to do conditional sampling with a marginally trained model and a differentiable reward. They make the choices: + +- Potential. $G_{t}(\mathbf{x}_{t},\mathbf{x}_{t + 1}) = \exp (\lambda (r(\mathbf{x}_{t}) - r(\mathbf{x}_{t + 1})))$ , where the reward is computed on the denoised state $r(\mathbf{x}_t) = r(\mathbf{x}_0 = \widehat{\mathbf{x}}_t)$ . +- Proposal generator. They use classifier-guidance to approximate the conditional score model $s_{\theta}(\mathbf{x}_t,t,y) \approx s_{\theta}(\mathbf{x}_t,t) + \nabla_{\mathbf{x}_t}\log p_{\theta}(y\mid \mathbf{x}_0 = \widehat{\mathbf{x}}_t(\mathbf{x}_t,t))$ and use the following proposal generator $\tau (\mathbf{x}_t\mid \mathbf{x}_{t + 1})$ : + +$$ +\tau \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {t + 1}\right) = \mathrm {N} \left(\Delta t \left[ f - g g ^ {\top} s _ {\theta} \left(\mathbf {x} _ {t}, t, y\right) \right], g (t) \Delta t\right) \tag {13} +$$ + +FK steering allows for a more flexible use of potentials $G_{t}$ , as well as proposal generators. For instance, Nichol et al. (2021) show that conditionally trained scores outperform classifier-guidance even when the classifier is trained on noisy states $\mathbf{x}_{t}$ . However, as shown by Ghosh et al. (2024), conditionally trained models still have failure modes. Therefore, we demonstrate how particle based methods can be used to improve the performance of conditionally trained models as well. Furthermore, FK steering allows these methods to be applied to discrete-space diffusions as well as non-differentiable rewards. + +Soft value-based decoding in diffusion models (SVDD) is another particle-based method. Instead of using SMC, SVDD utilizes a nested importance sampling algorithm (see algorithm 5 of Naesseth et al. (2019)) for the proposal generator with a single particle. SVDD makes the following choices: + +- Potential. Similar to TDS, they use the potential $G_{t} = \exp (\lambda (r(\mathbf{x}_{t}) - r(\mathbf{x}_{t + 1})))$ where $r(\mathbf{x}_t)$ can be off-the-shelf like TDS or learned from model samples. +- Sampler. SVDD uses the base model as the proposal generator and generates $k$ samples at each step, selects a single sample using importance sampling and makes $k$ copies of it for the next step. + +With $\lambda = \infty$ , SVDD is equivalent to doing best-of- $n$ at each step, since the authors recommend sampling from $p_{\mathrm{target}}(\mathbf{x}_0) \propto \lim_{\lambda \to \infty} p_\theta(\mathbf{x}_0) \exp(\lambda r(\mathbf{x}_0))$ . We note that similar to SVDD, $p_{\mathrm{FK},0}$ can be sampled using nested importance sampling. + +# D.3. Adaptive Resampling + +Following Naesseth et al. (2019); Wu et al. (2023a), we can use adaptive resampling to increase diversity of samples. Given $k$ particles $\mathbf{x}_t^i$ and their potentials $G_{t}^{i}$ , we define the effective sample size (ESS): + +$$ +\mathrm {E S S} _ {t} = \frac {1}{\sum_ {i = 1} ^ {k} \left(\widehat {G} _ {t} ^ {i}\right) ^ {2}} \tag {14} +$$ + +where $\widehat{G}$ refers to the normalized potentials and $\mathrm{ESS}_t\in [1,k]$ . If $\mathrm{ESS}_t < \frac{k}{2}$ , then we skip the resampling step. This encourages particle diversity. + +# E. FK steering samples + +In this section, we show the effect of various sampling parameters, such as potentials, the temperature parameter $\lambda$ , number of sampling steps, etc. on the diversity of samples. We use the stable diffusion XL-base (SDXL) as the base model and proposal generator and the ImageReward (Xu et al., 2024) human preference score model as the reward function. We also use adaptive resampling introduced in appendix D.3. We compare FK steering against generating $k$ independent samples, using the same seed for generation, thus providing a counterfactual generation. + +- Effect of $\lambda$ : The parameter $\lambda$ is used to define the target distribution: + +$$ +p _ {\text {t a r g e t}} \left(\mathbf {x} _ {0}\right) = \frac {1}{\mathbf {Z}} p _ {\theta} \left(\mathbf {x} _ {0}\right) \exp \left(\lambda r \left(\mathbf {x} _ {0}\right)\right), \tag {15} +$$ + +therefore, higher values of $\lambda$ upweight higher reward samples $\mathbf{x}_0$ . Similarly, the potentials also use $\lambda$ which affects resampling. We generate $k = 4$ samples from the SDXL using FK steering as well as $k = 4$ independent samples using the max potential. In fig. 7, we observe that using FK steering improves prompt fidelity, and higher values of $\lambda$ improve fidelity at the cost of particle diversity. + +- Effect of potential: In fig. 6, we observe that FK steering with the max potential reduces diversity compared to the difference potential. Here we use $\lambda = 2$ and generate $k = 8$ samples using the max and difference potential. +- Effect of sampling steps. In fig. 6, we observe that diversity can be increased by increasing the number of sampling steps from 100 to 200. Here we use [180, 160, 140, 120, 0] and [80, 60, 40, 20, 0] as the resampling interval. We note that even if the samples $\mathbf{x}_0$ share the same particle as parent, there is diversity in the final samples. +- Effect of interval resampling: In fig. 8, we show that using interval resampling even with 100 sampling steps produces diversity in samples. For comparison, see fig. 8 for the independent versus FK steering generations. + +![](images/6d1abd4b40d77b8864a34bcd11b8809328adfbb5916a56bf89ff6942e1d333ca.jpg) + +![](images/5b00f2da58d7e725c2f4f3fad018b39a5403ad20392bee1e4ed7a70e57af546c.jpg) + +![](images/14cd955fd2d2b9417e7ce515e19d1b5372f1538c422747401225d5b4323f716f.jpg) + +![](images/596d42d8ee6ef407de4cac793ffbca08ff2c6f77d5fd564b1350b6371fb4c469.jpg) + +![](images/73fec43ba84cc32bf83a64ebba4905041f96ed1dd113920771af7a46b1758214.jpg) + +![](images/478a7d9c067243e5e3d92a05bb6314eeb51980d14a060c937a68f9b3ae24b6e3.jpg) + +![](images/66044e0f61e4ff94ccce7ad2e827506499fc350ed2aa7577d7618dad81d7fc2c.jpg) + +![](images/a0ee84cd082cd1ca2a484c2bd8442a1de569ac86c58dbfbf0e307116cf05bd0b.jpg) + +![](images/8aed41cdd7cea409589565c691568bc0a621076b1eedad1d27807bfb577599bb.jpg) +Diff + +![](images/b678177dc96e00ea60cdffffbfb623a5447870dd4649ca10e6f317652646116d.jpg) + +![](images/915a5c622be8c0daed47bfd57d496349625df734ed2231fabc3f2a058eadf81b.jpg) + +![](images/039b17a091aaa44a2cd58b3a079486739faec740a7918790b23a31d37438c090.jpg) + +![](images/331966b68f8937c52b72645b33c333d95c17b826516c24eb9d3e78f9e743055e.jpg) + +![](images/945b0de2b3971b978f49451665f9a1e2c448880de3225541aa3a1a4ee764e725.jpg) + +![](images/246d16688b3d24171b66577acf85d63fe52ab4a439bee7c9a3b7232b82c926c4.jpg) + +![](images/d5d3efd09edbadaf1c11043d965c4686201d45adc30eeb68f954cbf14fd3c81e.jpg) + +![](images/4f16308bd05177a886d5afb3b757150483d4b14802fb553b4abc2123c981f8a9.jpg) +Max + +![](images/0768228251a659ba58000cb3ce0ce8e60cd1837e08a68e04ca749929d3187a7a.jpg) +Figure 6. Max versus Difference potential: In the top row, we plot 8 independent samples from the base model and in the bottom two rows, we have the FK steering particles for the max and difference potentials. Using the max potential reduces diversity compared to the difference potential. However, we note that by increasing the number of sampling steps, the diversity of the samples can be increased. Caption: a green stop sign in a red field + +![](images/a044f44060bc64b49b38af405af9b8a9b55e01d3ebc93141205e644354bdbea6.jpg) + +![](images/14dd2fb293b69cba666275f695521164c009a00143b1570442a7fabf8ea0f0e0.jpg) + +![](images/d1b2a3aad238f45aca87d2413350de5eb03fe263f4780f2a9e880b910e07e938.jpg) + +![](images/6b04ed7325f3415caf42c106ed54e514d9433ede03bd04445f8fb59021470f62.jpg) + +![](images/994a49c32638ab3fa01a00f8d49da768b577333e1166fb1cd57c1644b745c72c.jpg) + +![](images/bd6ffd04afc8704a9769125533a60aa7767d014e777c440636a03f8c729d2bef.jpg) + +![](images/8f7c5dbca5497e9325cfc9f688b62c0be6fba9940ab14a78f21a9c01f464d908.jpg) +Figure 7. Effect on $\lambda$ on diversity: In the top panel, we plot 4 independent samples from the base model and in the bottom 3 panels, we have the FK steering particles for varying values of $\lambda$ . We observe that increasing $\lambda$ leads to a decrease in diversity, at the cost of higher prompt fidelity and improved aesthetic quality, compared to the first row which has 4 independent samples. Caption: a green stop sign in a red field + +![](images/df27f3653c96707e326149b5cb6568e641e3ed53a6e12aff3cd98a3b076f781a.jpg) +Figure 8. Increased prompt fidelity: In this generation, we compare $k = 8$ independent samples (top panel) versus $k = 8$ samples from FK steering (bottom panel). FK steering selects samples which follow the prompt. Caption: a photo of a frisbee above a truck \ No newline at end of file diff --git a/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/images.zip b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2bfb23bd3995940b4164c0fc8964d88a3c321c35 --- /dev/null +++ b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff23248dc3e9bfc14514b47c247308fb46ecfbd578ef9d45d6f4ad51c82b00e1 +size 1060303 diff --git a/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/layout.json b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e8a2ca533e474b62d24321db1b354a2673668590 --- /dev/null +++ b/ageneralframeworkforinferencetimescalingandsteeringofdiffusionmodels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e3c582a12cfff9c9e517fc07614802bca82f4a3de7cbde0f7951e2c4694831b +size 901344 diff --git a/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/ca6a5049-a60c-48c5-ae77-2d7605cb6f2e_content_list.json b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/ca6a5049-a60c-48c5-ae77-2d7605cb6f2e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9ad9ceedacd30ed4fa49b36c2407b7c7302fcae3 --- /dev/null +++ b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/ca6a5049-a60c-48c5-ae77-2d7605cb6f2e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00164ccb22e522e745c68162da030b0f8b5d34e786f37f7f462d83ffbdfdd048 +size 194946 diff --git a/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/ca6a5049-a60c-48c5-ae77-2d7605cb6f2e_model.json b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/ca6a5049-a60c-48c5-ae77-2d7605cb6f2e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b4fbb2d690a73d759740b569ec434c81ec944204 --- /dev/null +++ b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/ca6a5049-a60c-48c5-ae77-2d7605cb6f2e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2c4d563cdcdd5fc78c7c292caeb1389b4a164f4a78720725c823530aa59c32a +size 228660 diff --git a/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/ca6a5049-a60c-48c5-ae77-2d7605cb6f2e_origin.pdf b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/ca6a5049-a60c-48c5-ae77-2d7605cb6f2e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3d4b9c1a012bd6c0762360f9058507c0cc30556f --- /dev/null +++ b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/ca6a5049-a60c-48c5-ae77-2d7605cb6f2e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f78fb92a3a5ccd3d6bf3dbc9f89138f4af9f556629a42889efbcf06944a640a4 +size 4172428 diff --git a/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/full.md b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0763cd9774f8b4b2076ee3078f182aae14c6bb85 --- /dev/null +++ b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/full.md @@ -0,0 +1,852 @@ +# A General Graph Spectral Wavelet Convolution via Chebyshev Order Decomposition + +Nian Liu $^{1}$ Xiaoxin He $^{1}$ Thomas Laurent $^{2}$ Francesco Di Giovanni $^{3}$ Michael M. Bronstein $^{3,4}$ Xavier Bresson $^{1}$ + +# Abstract + +Spectral graph convolution, an important tool of data filtering on graphs, relies on two essential decisions: selecting spectral bases for signal transformation and parameterizing the kernel for frequency analysis. While recent techniques mainly focus on standard Fourier transform and vector-valued spectral functions, they fall short in flexibility to model signal distributions over large spatial ranges, and capacity of spectral function. In this paper, we present a novel wavelet-based graph convolution network, namely WaveGC, which integrates multi-resolution spectral bases and a matrix-valued filter kernel. Theoretically, we establish that WaveGC can effectively capture and decouple short-range and long-range information, providing superior filtering flexibility, surpassing existing graph wavelet neural networks. To instantiate WaveGC, we introduce a novel technique for learning general graph wavelets by separately combining odd and even terms of Chebyshev polynomials. This approach strictly satisfies wavelet admissibility criteria. Our numerical experiments showcase the consistent improvements in both short-range and long-range tasks. This underscores the effectiveness of the proposed model in handling different scenarios. Our code is available at https://github.com/liun-online/WaveGC. + +# 1. Introduction + +Spectral graph theory (SGT) (Chung, 1997), which enables analysis and learning on graph data, has firmly established itself as a pivotal methodology in graph machine learning. A significant milestone in SGT is the generalization + +$^{1}$ National University of Singapore $^{2}$ Loyola Marymount University $^{3}$ University of Oxford $^{4}$ AITHYRA, Austria. Correspondence to: Nian Liu . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +of the convolution operation to graphs, as convolution for grid-structured data, i.e. sequences and images, has demonstrated remarkable success (LeCun et al., 1998; Hinton et al., 2012; Krizhevsky et al., 2012). Significant research interests in graph convolution revolve around two key factors: (1) designing diverse bases for spectral transform, and (2) parameterizing powerful graph kernel. For (1), the commonly used graph Fourier basis, consisting of the eigenvectors of the graph Laplacian (Shuman et al., 2013), stands as a prevalent choice. However, graph wavelets (Hammond et al., 2011) offer enhanced flexibility by constructing adaptable bases. For (2), classic approaches involve diagonalizing the kernel with fully free parameters (Bruna et al., 2013) or employing various polynomial approximations such as Chebyshev (Defferrard et al., 2016) and Cayley (Levie et al., 2018) polynomials. Additionally, convolution with a tensor-valued kernel serves as the spectral function of Transformer (Vaswani et al., 2017) under the shift-invariant condition (Li et al., 2021; Guibas et al., 2021). + +Despite the existence of techniques in each aspect, the integration of these two lines into a unified framework remains challenging, impeding the full potential of graph convolution. In an effort to unravel this challenge, we introduce a novel operation — Wavelet-based Graph Convolution (WaveGC), which seamlessly incorporates both spectral basis and kernel considerations. In terms of spectral basis design, WaveGC is built upon graph wavelets, allowing it to capture information across the entire graph through a multi-resolution approach from highly adaptive construction of multiple graph wavelet bases. For filter parameterization, we opt for a matrix-valued spectral kernel with weight-sharing. The matrix-valued kernel offers greater flexibility to filter wavelet signals, thanks to its larger parameter space. + +To comprehensively explore WaveGC, we theoretically analyse and assess its information-capturing capabilities. In contrast to the K-hop basic message-passing framework, WaveGC is demonstrated to exhibit both significantly larger and smaller receptive fields concurrently, achieved through the manipulation of scales. Previous graph wavelet theory (Hammond et al., 2011) only verifies the localization in small scale limit. Instead, our proof is complete as it covers both extremely small and large scales from the perspective + +of information mixing (Di Giovanni et al., 2023). Moreover, our proof also implies that WaveGC is capable of simultaneously capturing both short-range and long-range information for each node, which facilitate global node interaction. + +To implement WaveGC, a critical step lies in constructing graph wavelet bases that satisfy two fundamental criteria: (1) meeting the wavelet admissibility criteria (Mallat, 1999) and (2) showing adaptability to different graphs. Existing designs of graph wavelets face limitations, with some falling short in ensuring the criteria (Xu et al., 2019a; 2022), while others having fixed wavelet forms, lacking adaptability (Zheng et al., 2021; Cho et al., 2023). To address these limitations, we propose an innovative and general implementation of graph wavelets. Our solution involves approximating scaling function basis and multiple wavelet bases using odd and even terms of Chebyshev polynomials, respectively. This approach is inspired by our observation that, after a certain transformation, even terms of Chebyshev polynomials strictly satisfy the admissibility criteria, while odd terms supplement direct current signals. Through the combination of these terms via learnable coefficients, we aim to theoretically approximate scaling function and multiple wavelets with arbitrary complexity and flexibility. Our contributions are: + +- We derive a new wavelet-based graph convolution (WaveGC), which integrates multi-resolution bases and matrix-valued kernel, enhancing spectral convolution on large spatial ranges. +- We theoretically prove that WaveGC can capture and distinguish the information from short and long ranges, surpassing conventional graph wavelet techniques. +- We pioneer an implementation of learnable graph wavelets, employing odd terms and even terms of Chebyshev polynomials individually. This implementation strictly satisfies the wavelet admissibility criteria. +- Our approach consistently outperforms baseline methods on both short-range and long-range tasks, achieving up to $15.7\%$ improvement on VOC dataset. + +# 2. Preliminaries + +An undirected graph can be presented as $\mathcal{G} = (\mathcal{V},E)$ where $\mathcal{V}$ is the set of $N$ nodes and $E\subseteq \mathcal{V}\times \mathcal{V}$ is the set of edges. The adjacency matrix of this graph is $\pmb {A}\in \{0,1\}^{N\times N}$ , where $\pmb{A}_{ij}\in \{0,1\}$ denotes the relation between nodes $i$ and $j$ in $\mathcal{V}$ . The degree matrix is $\pmb {D} = \mathrm{diag}(d_1,\dots d_N)\in \mathbb{R}^{N\times N}$ , where $d_{i} = \sum_{j\in \mathcal{V}}A_{ij}$ is the degree of node $i\in \mathcal{V}$ . The node feature matrix is $\pmb {X} = [x_{1},x_{2},\ldots ,x_{N}]\in \mathbb{R}^{N\times d_{0}}$ , where $x_{i}$ is a $d_0$ dimensional feature vector of node $i\in \mathcal{V}$ . Let $\hat{\pmb{A}} = \pmb {D}^{-\frac{1}{2}}\pmb {A}\pmb {D}^{-\frac{1}{2}}$ be the symmetric normalized adjacency matrix, then $\hat{\mathcal{L}} = I_N - \hat{\pmb{A}} = D^{-\frac{1}{2}}(D - A)D^{-\frac{1}{2}}$ is the symmetric normalized + +graph Laplacian. With eigen-decomposition, $\hat{\mathcal{L}} = \mathbf{U}\pmb{\Lambda}\mathbf{U}^{\top}$ where $\pmb{\Lambda} = \mathrm{diag}(\lambda_1,\dots ,\lambda_N)\in \mathbb{R}^{N\times N},\lambda_i\in [0,2]$ and $\pmb {U} = [\pmb {u}_1^\top ,\dots ,\pmb {u}_N^\top ]\in \mathbb{R}^{N\times N}$ are the eigenvalues and eigenvectors of $\hat{\mathcal{L}}$ , respectively. Given a signal $f\in \mathbb{R}^N$ on $\mathcal{G}$ , the graph Fourier transform (Shuman et al., 2013) is defined as $\hat{f} = \pmb{U}^{\top}f\in \mathbb{R}^{N}$ , and its inverse is $f = U\hat{f}\in \mathbb{R}^{N}$ + +Spectral graph wavelet transform (SGWT). Hammond et al. (2011) redefine the wavelet basis (Mallat, 1999) on vertices in the spectral graph domain. Specifically, the SGWT is composed of three components: (1) Unit wavelet basis, denoted as $\Psi$ such that $\Psi = g(\hat{\mathcal{L}}) = Ug(\Lambda)U^{\top}$ , where $g$ acts as a band-pass filter $g:\mathbb{R}^{+}\to \mathbb{R}^{+}$ meeting the following wavelet admissibility criteria (Mallat, 1999): + +$$ +\mathcal {C} _ {\Psi} = \int_ {- \infty} ^ {\infty} \frac {| g (\lambda) | ^ {2}}{| \lambda |} d \lambda < \infty . \tag {1} +$$ + +To meet this requirement, $g(\lambda = 0) = 0$ and $\lim_{\lambda \to \infty} g(\lambda) = 0$ are two essential prerequisites. (2) Spatial scales, a series of positive real values $\{s_j\}$ where distinct values of $s_j$ with $\Psi_{s_j} = U g(s_j \Lambda) U^\top$ can control different size of neighbors. (3) Scaling function basis, denoted as $\Phi$ such that $\Phi = U h(\lambda) U^\top$ . Here, the function of $h: \mathbb{R}^+ \to \mathbb{R}^+$ is to supplement direct current (DC) signals at $\lambda = 0$ , which is omitted by all wavelets $g(s_j \lambda)$ since $g(0) = 0$ . Next, given a signal $f \in \mathbb{R}^N$ , the formal SGWT (Hammond et al., 2011) is: + +$$ +W _ {f} (s _ {j}) = \Psi_ {s _ {j}} f = \boldsymbol {U} g (s _ {j} \boldsymbol {\Lambda}) \boldsymbol {U} ^ {\top} f \in \mathbb {R} ^ {N}, \tag {2} +$$ + +where $W_{f}(s_{j})$ is the wavelet coefficients of $f$ under scale $s_{j}$ . Similarly, scaling function coefficients are given by $S_{f} = \Phi f = Uh(\mathbf{\Lambda})U^{\top}f\in \mathbb{R}^{N}$ . Let $G(\lambda) = h(\lambda)^2 + \sum_jg(s_j\lambda)^2$ , then if $G(\lambda)\equiv 1$ , $\forall \lambda \in \Lambda$ , the constructed graph wavelets are known as tight frames, which guarantee energy conservation of the given signal between the original and the transformed domains (Shuman et al., 2015). More spectral graph wavelets are introduced in Appendix E. + +# 3. From Graph Convolution to Graph Wavelets + +Spectral graph convolution is a fundamental operation in the field of graph signal processing (Shuman et al., 2013). Specifically, given a signal matrix (or node features) $\mathbf{X} \in \mathbb{R}^{N \times d}$ on graph $\mathcal{G}$ , the spectral filtering of this signal is defined with a kernel $\kappa \in \mathbb{R}^{N \times N}$ by the convolution theorem (Arfken, 1985): + +$$ +\kappa * _ {\mathcal {G}} \boldsymbol {X} = \mathcal {F} ^ {- 1} \left(\mathcal {F} (\kappa) \cdot \mathcal {F} (\boldsymbol {X})\right) \in \mathbb {R} ^ {N \times d}, \tag {3} +$$ + +where $\cdot$ is the matrix multiplication operator, $\mathcal{F}(\cdot)$ and $\mathcal{F}^{-1}(\cdot)$ are the spectral transform (e.g., graph Fourier transform (Bruna et al., 2013)) and corresponding inverse transform, respectively. To implement a spectral convolution, + +two critical choices must be considered in Eq. (3): 1) the selection of the transform $\mathcal{F}$ and 2) the parameterization of the kernel $\kappa$ . + +# 3.1. General spectral wavelet via Chebyshev decomposition + +For the selection of the spectral transform $\mathcal{F}$ and its inverse $\mathcal{F}^{-1}$ , it can be tailored to the specific nature of data. For set data, the Dirac Delta function (Oppenheim et al., 1997) is employed, while the fast Fourier Transform (FFT) proves efficient for both sequences (Li et al., 2021) and grids (Guibas et al., 2021). In the context of graphs, the Fourier transform $(\mathcal{F} \to U^{\top})$ emerges as one classical candidate. However, some inherent flaws limit the capacity of Fourier bases. (1) Standard graph Fourier bases, represented by one fixed matrix $U^{\top}$ , maintain a constant resolution and fixed frequency modes. (2) Fourier bases lack the adaptability to be further optimized according to different datasets and tasks. Therefore, multiple resolution and adaptability are two prerequisites for the design of an advanced base. + +Notably, wavelet base is able to conform the above two demands, and hence offers enhanced filtering compared to Fourier base. For the resolution, the use of different scales $s_j$ allows wavelet to analyze detailed components of a signal at different granularities. More importantly, due to its strong spatial localization (Hammond et al., 2011), each wavelet corresponds to a signal diffused away from a central node (Xu et al., 2019a). Therefore, these scales also control varying receptive fields in spatial space, which enables the simultaneous fusion of short- and long-range information. For the adaptability, graph wavelets offer the flexibility to adjust the shapes of wavelets and scaling function. These components can be collaboratively optimized for the alignment of basis characteristics with different datasets, potentially enhancing generalization performance. + +Next, we need to determine the form of the scaling function basis $\Phi = Uh(\Lambda)U^{\top}$ , the unit wavelet basis $\Psi = Ug(\Lambda)U^{\top}$ , and the scales $s_j$ . The forms of $h$ and $g$ are expected to be powerful enough and easily available. Concurrently, $g$ should strictly satisfy the wavelet admissibility criteria, i.e., Eq. (1), and $h$ should complementally provide DC signals. To achieve this target, we separately introduce odd terms and even terms from Chebyshev polynomials (Hammond et al., 2011) into the approximation of $h$ and $g$ . Please recall that the Chebyshev polynomial $T_{k}(y)$ of order $k$ may be computed by the stable recurrence relation $T_{k}(y) = 2yT_{k - 1}(y) - T_{k - 2}(y)$ with $T_0 = 1$ and $T_{1} = y$ . After the following transform, we surprisingly observe that these transformed terms match all above expectations: + +$$ +T _ {k} (y) \rightarrow 1 / 2 \cdot (- T _ {k} (y - 1) + 1). \tag {4} +$$ + +To give a more intuitive illustration, we present the spec- + +tra of first six Chebyshev polynomials before and after the transform in Fig. 1 (b), where the set of odd and even terms after the transform are denoted as $\{T_i^o\}$ and $\{T_i^e\}$ , respectively. From the figure, $g(\lambda = 0) \equiv 0$ for all $\{T_i^e\}$ , and $h(\lambda = 0) \equiv 1$ for all $\{T_i^o\}$ . Consequently, $\{T_i^e\}$ and $\{T_i^o\}$ strictly meet the criteria and naturally serve as the basis of unit wavelet and scaling function. Moreover, not only can we easily get each Chebyshev term via iteration, but the constructed wavelet owns arbitrarily complex waveform because of the combination of as many terms as needed. Given $\{T_i^e\}$ and $\{T_i^o\}$ , all we need to do is just to learn the coefficients to form the corresponding $g(\lambda)$ and $h(\lambda)$ : + +$$ +g (\boldsymbol {\Lambda}) = \sum_ {i} ^ {\rho} a _ {i} T _ {i} ^ {e} (\boldsymbol {\Lambda}) \in \mathbb {R} ^ {N \times N}, \tag {5} +$$ + +$$ +h (\pmb {\Lambda}) = \sum_ {i} ^ {\rho} b _ {i} T _ {i} ^ {o} (\pmb {\Lambda}) \in \mathbb {R} ^ {N \times N}, +$$ + +where $\rho = K / 2$ ( $K$ is the total number of truncated Chebyshev terms), $\tilde{\pmb{a}} = (a_{1}, a_{2}, \dots, a_{\rho}) \in \mathbb{R}^{1 \times \rho}$ and $\tilde{\pmb{b}} = (b_{1}, b_{2}, \dots, b_{\rho}) \in \mathbb{R}^{1 \times \rho}$ represent two learnable coefficient vectors as follows: + +$$ +\tilde {\boldsymbol {a}} = \operatorname {M e a n} \left(\boldsymbol {W} _ {a} \hat {\boldsymbol {Z}} + \boldsymbol {b} _ {a}\right), \quad \tilde {\boldsymbol {b}} = \operatorname {M e a n} \left(\boldsymbol {W} _ {b} \hat {\boldsymbol {Z}} + \boldsymbol {b} _ {b}\right), \tag {6} +$$ + +where $\{\pmb{W}_a, \pmb{W}_b\} \in \mathbb{R}^{d \times \rho}$ and $\{\pmb{b}_a, \pmb{b}_b\} \in \mathbb{R}^{1 \times \rho}$ are learnable parameters, and $\hat{\pmb{Z}}$ is the eigenvalue embedding composed by the module in (Bo et al., 2023). Further details can be found in Appendix B. Also, we can learn the scales $\tilde{s} = (s_1, s_2, \dots, s_J)$ in the same way: + +$$ +\tilde {\boldsymbol {s}} = \sigma \left(\operatorname {M e a n} \left(\boldsymbol {W} _ {\boldsymbol {s}} \hat {\boldsymbol {Z}} + \boldsymbol {b} _ {\boldsymbol {s}}\right)\right) \cdot \bar {\boldsymbol {s}} \in \mathbb {R} ^ {1 \times J}, \tag {7} +$$ + +where $\sigma$ is sigmoid function, $W_{s} \in \mathbb{R}^{d \times J}$ and $\boldsymbol{b}_{s} \in \mathbb{R}^{1 \times J}$ are learnable parameters, and $\overline{s} = (\overline{s_1}, \overline{s_2}, \dots, \overline{s_J})$ is a predefined vector to control the size of $\tilde{s}$ . + +Based on our construction, $g(\lambda)$ is a strict band-pass filter in [0, 2], while $s$ can scale its shape in $g(s\lambda)$ . Specifically, $s < 1$ "stretches" the shape of $g(\lambda)$ , and $s > 1$ "squeezes" its shape (Please refer to Fig. 9). To maintain the same spectral interval [0, 2], we truncate $g(s\lambda)$ within the intersection of $\lambda \in [0, 2]$ and $\lambda \in [0, 2/s]$ . + +# 3.2. Matrix-valued kernel via weight sharing + +Next, we consider the parametrization of the convolutional kernel $\mathcal{F}(\kappa)$ . In the spectral domain, each Fourier mode typically corresponds to a global frequency pattern, either low- or high-frequency. Consequently, in Fourier-based approaches, it is common to apply a vector-valued kernel over the diagonalized graph Laplacian spectrum, denoted as $\mathrm{diag}(\theta_{\lambda})$ (Bruna et al., 2013; Defferrard et al., 2016; Levie et al., 2018), which effectively scales these global frequency components. However, this strategy becomes unsuitable after applying a wavelet transform. Unlike Fourier + +![](images/34b473ea33a9ce5af76b410121aaa6f7d9cb90c10483f75dd952b6324809a21b.jpg) +Figure 1. (a) Overview of our proposed WaveGC technique. (b) Illustration of Chebyshev polynomials before and after the given transform, from $[-1, 1]$ to $[0, 2]$ . In this representation, we distinguish odd and even terms, presenting only the first three terms for each. + +![](images/d8058ac33bb3aa92f88794a1fdd0f015a6512eaf120ab0dfb75bb6502312add3.jpg) + +bases, wavelet coefficients encode localized, node-specific patterns that may capture short- or long-range interactions, but not global frequency modes. As a result, a different parametrization scheme, tailored to the localized nature of wavelet representations, is required. + +Along another line of research, Fourier Neural Operator (FNO) (Li et al., 2021) models the convolution kernel as a fully learnable tensor $\mathbb{M} \in \mathbb{R}^{N \times d \times d}$ , where $N$ is the number of frequency modes, and $d$ is the feature dimension. This tensor-valued kernel offers two notable advantages. First, although FNO was originally introduced in the context of the Fourier transform, the kernel $\mathbb{M}$ is inherently independent of graph spectrum, and is thus amenable to generalization across other transforms (Tripura & Chakraborty, 2023). Second, in contrast to vector-valued kernels, the matrix-valued formulation provides a significantly larger number of learnable parameters, thereby increasing its expressivity and capacity to adapt to complex patterns. Experimental results presented in Section 6.2 empirically demonstrate that the matrix-valued kernel outperforms its vector-valued counterpart in the context of filtering wavelet-transformed signals. + +In this paper, we adopt the tensor $\mathbb{M}$ for the convolution kernel. The standard parameter count for $\mathbb{M}$ is $N\times d\times d$ . This can lead to a substantial number of parameters, especially for large-scale graphs with high $N$ , increasing the risk of overfitting. To mitigate this while preserving model expressivity, we introduce a parameter-sharing strategy across all frequency modes by employing a single MLP. This approach reduces the number of learnable parameters from $N\times d\times d$ (tensor) to $d\times d$ (matrix). Accordingly, the convolution operation in Eq. (3) simplifies to $\mathbb{M} *_{\mathcal{G}} \boldsymbol{X} = \mathcal{F}^{-1} \mathbb{M} \circ \mathcal{F}(\boldsymbol{X}) = \mathcal{F}^{-1}(\mathrm{MLP}(\mathcal{F}(\boldsymbol{X})))$ , where $\circ$ is the composition between two functions. An alternative method is presented in AFNO (Guibas et al., 2021), introducing a similar technique that offers improved efficiency but with a more intricate design. + +# 3.3. WAVELET-BASED GRAPH CONVOLUTION + +Until now, we have elaborated the proposed advancements on kernel and bases, and now discuss how to integrate these two aspects. Provided that we have $J$ wavelet $\{\Psi_{s_j}\}_{j = 1}^J$ and one scaling function $\Phi$ constructed via the above Chebyshev decomposition, $\mathcal{F}:\mathbb{R}^{N\times d}\to \mathbb{R}^{N(J + 1)\times d}$ in Eq. (3) is the stack of transforms from each component: + +$$ +\begin{array}{l} \mathcal {F} \left(\boldsymbol {H} ^ {(l)}\right) = \boldsymbol {T} \boldsymbol {H} ^ {(l)} = \left(\left(\Phi \boldsymbol {H} ^ {(l)}\right) ^ {\top} \right\rVert \\ \left(\Psi_ {s _ {1}} \boldsymbol {H} ^ {(l)}\right) ^ {\top} \left\| \dots \right\| \left(\Psi_ {s _ {J}} \boldsymbol {H} ^ {(l)}\right) ^ {\top}) ^ {\top} \in \mathbb {R} ^ {N (J + 1) \times d}, \tag {8} \\ \end{array} +$$ + +where $\pmb{T} = (\Phi^{\top}||\Psi_{s_1}^{\top}||\dots ||\Psi_{s_J}^{\top})^{\top}$ is the overall transform and $||$ means concatenation, $\pmb{H}^{(l)}$ is the node embedding matrix at layer $l$ . Next, we check if the inverse $\mathcal{F}^{-1}$ exists. Considering $\pmb{T}$ is not a square matrix, $\mathcal{F}^{-1}$ should be its pseudo-inverse as $(T^{\top}T)^{-1}T^{\top}$ , where $T^{\top}T = \Phi \Phi^{\top} + \sum_{j=1}^{J}\Psi_{s_j}\Psi_{s_j}^{\top} = U[h(\lambda)^2 + \sum_{j=1}^{J}g(s_j\lambda)^2]U^{\top}$ . Ideally, if $\pmb{T}$ is imposed as tight frames, then $h(\lambda)^2 + \sum_{j=1}^{J}g(s_j\lambda)^2 = I$ (Leonardi & Van De Ville, 2013), and $\pmb{T}^{\top}\pmb{T} = \pmb{U}\pmb{I}\pmb{U}^{\top} = \pmb{I}$ . In this case, $\mathcal{F}^{-1} = (T^{\top}\pmb{T})^{-1}\pmb{T}^{\top} = \pmb{T}^{\top}$ , and Eq. (3) becomes: + +$$ +\begin{array}{l} \boldsymbol {H} ^ {(l + 1)} = \boldsymbol {T} ^ {\top} \mathbb {M} \circ \boldsymbol {T} \boldsymbol {H} ^ {(l)} \\ = \Phi \mathbb {S} \circ \Phi \boldsymbol {H} ^ {(l)} + \sum_ {j = 1} ^ {J} \Psi_ {s _ {j}} \mathbb {W} _ {j} \circ \Psi_ {s _ {j}} \boldsymbol {H} ^ {(l)} \in \mathbb {R} ^ {N \times d}, \tag {9} \\ \end{array} +$$ + +where we separate $\mathbb{M}$ into $\mathbb{S}$ and $\{\mathbb{W}\}_{j=0}^{J}$ as scaling kernel and different wavelet kernels. + +How to guarantee tight frames? From above derivations, tight frames is a key for the simplification of inverse $\mathcal{F}^{-1}$ in Eq. (9). This can be guaranteed by $l_{2}$ norm on the above constructed wavelets and scaling function. For each eigenvalue $\lambda_{i}\in \Lambda$ , we have $v_{i}^{2} = h(\lambda_{i})^{2} + \sum_{j = 1}^{J}g(s_{j}\lambda_{i})^{2}$ , $\tilde{h} (\lambda_i) = h(\lambda_i) / v$ , $\tilde{g}_i(s_j\lambda_i) = g(s_j\lambda_i) / v$ . Then, $G(\Lambda) = \tilde{h} (\Lambda)^2 +\sum_j\tilde{g} (s_j\Lambda)^2 = I$ forms tight frames (Section 2). Thus, while the pseudo-inverse must theoretically exist, we + +Table 1. Comparison between spectral graph convolution and WaveGC. + +
Spectral Graph ConvolutionWaveGC
Kerneldiag(θλ): Diagonal matrixS / W: Full matrix
BasesU^T: Fourier basisΦ / Ψs: Scaling / Wavelet basis
ConvolutionUdiag(θλ)U^TXΦS o ΦX / ΨsW o ΨsX
+ +can circumvent the necessity of explicitly calculating the pseudo-inverse. + +Resembling the multi-head attention (Vaswani et al., 2017), we treat each wavelet transform as a "wavelet head", and concatenate them rather than sum them to get $H^{(l + 1)} \in \mathbb{R}^{N \times d}$ : + +$$ +\begin{array}{l} \boldsymbol {H} ^ {(l + 1)} = \sigma \left(\left[ \Phi \mathbb {S} \circ \Phi \boldsymbol {H} ^ {(l)} | | \Psi_ {s _ {1}} \mathbb {W} _ {1} \circ \Psi_ {s _ {1}} \boldsymbol {H} ^ {(l)} | \right. \right. \tag {10} \\ \left. \right. \dots \left| \right.\left| \right. \Psi_ {s _ {J}} \mathbb {W} _ {J} \circ \Psi_ {s _ {J}} \boldsymbol {H} ^ {(l)} \left. \right] \cdot \boldsymbol {W}\left. \right), \\ \end{array} +$$ + +where an outermost MLP increases the flexibility. Fig. 1 (a) presents the whole framework of our wavelet-based graph convolution, or WaveGC. For a better understanding, we compare spectral graph convolution and WaveGC in Table. 1, where WaveGC contains only one wavelet for simplicity. Based on the differences shown in the table, WaveGC endows spectral graph convolution with the beneficial inductive bias of long-range dependency. + +# 4. Theoretical Properties of WaveGC + +Traditionally, wavelet is notable for its diverse receptive fields because of varying scales (Mallat, 1999). For graph wavelet, Hammond et al. (2011) were the first to prove the localization when scale $s \to 0$ , but did not discuss the long-range case when $s \to \infty$ . We further augment this discussion and demonstrate the effectiveness of the proposed WaveGC in capturing both short- and long-range information. Intuitively, a model's ability to integrate global information enables the reception and mixing of messages from distant nodes. Conversely, a model with a limited receptive field can only effectively mix local messages. Hence, assessing the degree of information 'mixing' becomes a key property. For this reason, we focus on the concept of maximal mixing: + +Definition 4.1. (Maximal mixing) (Di Giovanni et al., 2023). For a twice differentiable graph-function $y_{G}$ of node features $\mathbf{x}_i$ , the maximal mixing induced by $y_{G}$ among the features $\mathbf{x}_a$ and $\mathbf{x}_b$ with nodes $a, b$ is + +$$ +\operatorname {m i x} _ {y _ {G}} (a, b) = \max _ {\boldsymbol {x} _ {i}} \max _ {1 \leq \alpha , \beta \leq d} \left| \frac {\partial^ {2} y _ {G} (\boldsymbol {X})}{\partial x _ {a} ^ {\alpha} \partial x _ {b} ^ {\beta}} \right|. \tag {11} +$$ + +This definition is established in the context of graph-level task, and $y_{G}$ is the final output of an end-to-end framework, + +comprising the primary model and a readout function (e.g., mean, max) applied over the last layer. $\alpha$ and $\beta$ represent two entries of the $d$ -dimensional features $\pmb{x}_a$ and $\pmb{x}_b$ . + +Next, we employ the concept of 'maximal mixing' on the WaveGC. For simplicity, we only take one wavelet basis $\Psi_{s}$ for analysis. The capacity of $\Psi_{s}$ on mixing information depends on two factors, i.e. $K$ -order Chebyshev term and scale $s$ . For a fair discussion on the effect of $s$ on message passing, we compare $\sigma (\Psi_s HW)$ and K-order message passing with the form of $\sigma (\sum_{j = 0}^{K}\tau_{j}A^{j}HW),\tau_{j}\in [0,1]$ : + +Theorem 4.2 (Short-range and long-range receptive fields). Given a large even number $K > 0$ and two random nodes $a$ and $b$ , if the depths $m_{\Psi}$ and $m_A$ are necessary for $\sigma(\Psi_s HW)$ and $\sigma(\sum_{j=0}^{K} \tau_j A^j HW)$ to induce the same amount of mixing $mix_{y_G}(b, a)$ , then the lower bounds of $m_{\Psi}$ and $m_A$ , i.e. $L_{m_{\Psi}}$ and $L_{m_A}$ , approximately satisfy the following relation when scale $s \to 0$ : + +$$ +L _ {m _ {\Psi}} \approx \frac {P}{K} L _ {m _ {A}} + \frac {2 | E |}{K \sqrt {d _ {a} d _ {b}}} \frac {m i x _ {y _ {G}} (b , a)}{\gamma} \cdot \frac {1}{\left(\alpha^ {2} s ^ {2 K}\right) ^ {m _ {\Psi}}}. \tag {12} +$$ + +Or, if $s \to \infty$ , the relation becomes: + +$$ +L _ {m _ {\Psi}} \approx \frac {P}{K} L _ {m _ {A}} - \frac {2 | E |}{K (K + 1) ^ {2 m _ {A}} \tau_ {P} ^ {2 m _ {A}} \sqrt {d _ {a} d _ {b}}} \frac {\operatorname {m i x} _ {y _ {G}} (b , a)}{\gamma}, \tag {13} +$$ + +where $P < K$ and $(\tau_{P}A^{P})_{ba} = \max \{(\tau_{m}A^{m})_{ba}\}_{m = 0}^{K}$ . $d_{a}$ and $d_{b}$ are degrees of two nodes, and $\alpha = \frac{C\cdot 2^{K}(K + 1)}{K!}$ . $\gamma = \sqrt{\frac{d_{max}}{d_{min}}}$ , where $d_{max} / d_{min}$ is the maximum / minimum degree in the graph. + +The proof is provided in Appendix A.3. In Eq. (12), since the second term on the right-hand side is large ( $s \to 0$ ), it required $\Psi_s$ to propagate more layers to mix the nodes. Conversely, if $s \to \infty$ (Eq. (13)), $\Psi_s$ will achieve the same degree of node mixing as $K$ -hop message passing but with less propagation. Moreover, the greater the "mixing" $\mathrm{mix}_{y_G}(b, a)$ is required between nodes, the fewer number of layers $L_{m_\Psi}$ is needed compared to $L_{m_A}$ . To conclude, $\Psi_s$ presents the short- and long-range characteristics of WaveGC on message passing, while these characteristics do not derive from the order $K$ of Chebyshev polynomials but from the scale $s$ exclusively. + +Table 2. Qualified results on short-range tasks compared to baselines. Bold: Best, Underline: Runner-up, OOM: Out-of-memory. All results are reproduced based on source codes. + +
ModelCSPhotoComputerCoraFullogbn-arxiv
Accuracy ↑Accuracy ↑Accuracy ↑Accuracy ↑Accuracy ↑
GCN92.92±0.1292.70±0.2089.65±0.5261.76±0.1471.74±0.29
GAT93.61±0.1493.87±0.1190.78±0.1364.47±0.1871.82±0.23
APPNP94.49±0.0794.32±0.1490.18±0.1765.16±0.2871.90±0.25
Scattering94.77±0.3392.10±0.6185.68±0.7157.65±0.8466.23±0.19
Scattering GCN95.18±0.3093.07±0.4288.83±0.4461.14±1.1371.18±0.76
SGWT94.81±0.2392.45±0.6285.19±0.5955.04±1.1269.08±0.30
GWNN90.75±0.5994.45±0.4590.75±0.5964.19±0.7971.13±0.47
UFGConvS95.33±0.2793.98±0.5988.68±0.3961.25±0.9370.04±0.22
UFGConvR95.46±0.3394.34±0.3489.29±0.4662.43±0.8071.97±0.12
WaveShrink-ChebNet94.90±0.3093.54±0.9088.20±0.6558.98±0.69OOM
DEFT95.04±0.3294.35±0.4491.63±0.5268.01±0.8672.01±0.20
WaveNet94.91±0.2994.09±0.6392.06±0.3357.65±1.0571.37±0.14
SEA-GWNN95.11±0.3794.35±0.5089.88±0.6466.74±0.7972.64±0.21
WaveGC (ours)95.89±0.3495.37±0.4492.26±0.1869.14±0.7873.01±0.18
+ +# 5. Why do we need decomposition? + +As shown in Fig. 1 (b), odd and even terms of Chebyshev polynomials meet the requirements on constructing wavelet after decomposition and transform. Additionally, each term is apt to be obtained according to the iteration formula, while infinite number of terms guarantee the expressiveness of the final composed wavelet. Next, we compare our decomposition solution with other related techniques: + +- Constructing wavelet via Chebyshev polynomials. Previous wavelet-based GNNs leverage Chebyshev polynomials with two purposes. (1) Approximate wavelets of pre-defined forms. SGWT (Hammond et al., 2011), GWNN (Xu et al., 2019a) and UFGConvS/R (Zheng et al., 2021) follow this line. They firstly fix the shape of wavelets as cubic spline, exponential or high-pass/low-pass filters, followed by the approximation via Chebyshev polynomials. In this pipeline, wavelet fails to learn further and suit the dataset and task at hand. (2)Compose a new wavelet. DEFT (Bastos et al., 2023) employs an MLP or GNN network to freely learn the coefficients before each Chebyshev basis. These coefficients are optimized according to the training loss, but loose the constraint on wavelet admissibility criteria. + +- No decomposition. If we uniformly learn the coefficients for all Chebyshev terms without decomposition, WaveGC degrades to a variant similar to ChebNet (Defferrard et al., 2016). However, mixture rather than decomposition blends the signals from different ranges, and the final spatial ranges cannot be precisely predicted and controlled. + +We provide numerical comparison and spectral visualization in section 6.3 for WaveGC against these related studies. + +# 6. Numerical Experiments + +In this section, we evaluate the performance of WaveGC on both short-range and long-range benchmarks using the + +following datasets: (1) Datasets for short-range tasks: CS, Photo, Computer and CoraFull from the PyTorch Geometric (PyG) (Fey & Lenssen, 2019), and one large-size graph, i.e. ogbn-arxiv from Open Graph Benchmark (OGB) (Hu et al., 2020) (2) Datasets for long-range tasks: PascalVOC-SP (VOC), PCQM-Contact (PCQM), COCO-SP (COCO), Peptides-func (Pf) and Peptides-struct (Ps) from LRGB (Dwivedi et al., 2022). Please refer to Appendix C.1 for implementation details and Appendix C.2 for details of datasets. + +# 6.1. Benchmarking WaveGC + +For short-range (S) datasets, we follow the settings from (Chen et al., 2022). For ogbn-arxiv, we use the public splits in OGB (Hu et al., 2020). For long-range datasets, we adhere to the experimental configurations outlined in (Dwivedi et al., 2022). The selected baselines belong to four categories, i.e., classical GNNs {GCN (Kipf & Welling, 2017), GAT (Velickovic et al., 2017), APPNP (Gasteiger et al., 2018), GINE (Xu et al., 2019b) and GatedGCN (Bresson & Laurent, 2017)}, graph scattering network {Scattering (Gama et al., 2018) and Scattering GCN (Min et al., 2020)}, spectral graph wavelet network {SGWT (Hammond et al., 2011), GWNN (Xu et al., 2019a), UFGConvS (Zheng et al., 2021), UFGConvR (Zheng et al., 2021), WaveShrink (Wan et al., 2023), DEFT (Bastos et al., 2023) and WaveNet (Yang et al., 2024)} and wavelet lifting transform {SEA-GWNN (Deb et al., 2024)}1. The results of the comparison with SOTA models are shown in Table 2 and 3, where our WaveGC demonstrates the best results on all datasets. Remarkably, the improvement on VOC achieves up to $11.83\%$ , implying the superior long-range information perception. + +In the experiments conducted on the five short-range + +Table 3. Qualified results on long-range tasks compared to baselines. Bold: Best, Underline: Runner-up, OOM: Out-of-memory, All results are reproduced based on source codes. + +
ModelVOCPCQMCOCOPfPs
F1 score ↑MRR ↑F1 score ↑AP ↑MAE ↓
GCN12.68±0.6032.34±0.0608.41±0.1059.30±0.2334.96±0.13
GINE12.65±0.7631.80±0.2713.39±0.4454.98±0.7935.47±0.45
GatedGCN28.73±2.1932.18±0.1126.41±0.4558.64±0.7734.20±0.13
Scattering16.58±0.4933.90±0.2716.44±0.7956.80±0.3826.77±0.11
Scattering GCN30.45±0.3633.73±0.4530.27±0.6062.87±0.6426.43±0.20
SGWT31.22±0.5634.04±0.0532.97±0.5360.23±0.2725.39±0.21
GWNN25.60±0.5632.72±0.0813.39±0.4465.47±0.4827.34±0.04
UFGConvS31.27±0.3933.94±0.2423.15±0.5565.83±0.7527.08±0.58
UFGConvR31.08±0.3334.08±0.2026.02±0.4865.29±0.8227.50±0.21
WaveShrink-ChebNet18.80±0.8532.56±0.1111.12±0.4661.12±0.5327.45±0.06
DEFT35.98±0.2034.25±0.0630.14±0.4966.95±0.6325.06±0.13
WaveNet28.60±0.1533.19±0.2023.06±0.1864.63±0.2725.88±0.01
SEA-GWNN31.97±0.5529.89±0.2624.33±0.2368.75±0.2025.64±0.31
WaveGC (ours)41.63±0.1934.50±0.0235.96±0.2269.73±0.4324.83±0.11
+ +datasets, the model is required to prioritize local information, while the five long-range datasets necessitate the handling of distant interactions. The results clearly demonstrate that the proposed WaveGC consistently outperforms traditional graph convolutions and graph wavelets in effectively aggregating both local and long-range information. + +# 6.2. Effectiveness of matrix-valued kernel + +The proposed matrix-valued kernel and weight-sharing strategy mark an advancement over conventional graph convolution, particularly in the context of processing wavelet-based signals. In this section, we conduct a comprehensive analysis of the effectiveness of these two architectural innovations. + +As shown in Table 4, the matrix-valued kernel consistently outperforms its vector-valued counterpart. This improvement suggests that increasing the expressiveness of the kernel—through a higher parameter capacity—enhances the model's ability on feature learning. + +Table 4. Compare Matrix-valued and Vector-valued kernels. + +
KernelComputer (Accuracy ↑)Ps (MAE ↓)
Vector-valued89.9625.30
Matrix-valued92.2624.83
+ +In addition, Table 5 examines the impact of weight sharing across spectral frequencies. Assigning distinct kernels to individual frequencies does not improve performance and, even results in degradation. This decline is likely due to overfitting caused by the large number of parameters introduced in the non-sharing setup. Specifically, non-sharing kernels require a mapping from each eigenvalue embedding to a unique transformation matrix, defined as $f: \mathbb{R}^d \to \mathbb{R}^{d \times d}$ , which is implemented using a multi-layer perceptron (MLP) with a weight dimension of $\mathbb{R}^{d \times d \times d}$ , $d$ is the embedding dimension. For instance, when $d = 96$ in P s, this results in + +an approximate increase about 876K parameters. + +Table 5. Compare sharing and non-sharing kernel weights. + +
Result (Parameters)Computer (Accuracy ↑)Ps (MAE ↓)
Non-sharing90.51 (535k)26.22 (1,410k))
Sharing92.26 (167k)24.83 (534k)
+ +# 6.3. Effectiveness of learnable wavelet bases + +In this section, we compare the learnt wavelet bases from WaveGC with other baselines, including five graph wavelets (i.e. SGWT (Hammond et al., 2011), UFGConvS/R (Zheng et al., 2021), DEFT (Bastos et al., 2023), GWNN (Xu et al., 2019a) and WaveNet (Yang et al., 2024)). We additionally evaluate ChebNet*, a variant of our WaveGC where the only change is to combine odd and even terms without decomposition. Therefore, the improvement of WaveGC over ChebNet* reflects the effectiveness of decoupling operation. The numerical comparison on Computer and PascalVOC-SP has been shown in Table. 2 and 3, which demonstrates obvious gains from WaveGC especially on long-range PascalVOC-SP. The ChebNet* gets 89.85 and 36.45 separately on Computer and PascalVOC-SP, still inferior to WaveGC. + +To address the performance gap observed on the VOC dataset, we provide insights through the spectral visualization of various bases in Fig. 2. Upon examination of various wavelets, those from SGWT and UFGConvS/R meet admissibility criteria with multiple resolutions, but these lines are not adaptive. DEFT outputs multiple bases with unpredictable shapes, so it is hard to strictly restrain these outputs as wavelets. GWNN adopts one exponential wavelet base, omitting information from different ranges as well as not meeting criteria. WaveNet and ChebNet* blend local and distant information in spatial space, hampering the deci + +![](images/2daa6c7a9b0aaa076d329b277752fb56213bcc87373e202a07c747d9789212bc.jpg) +Figure 2. The spectral and spatial visualization of different bases on PascalVOC-SP. + +sion on the best range. For our WaveGC, Fig. 2 intuitively demonstrates that the unit wavelet got by our decoupling of Chebyshev polynomials strictly meets the admissibility criteria, as Eq. (1), while the corresponding base scaling function supplements the direct current signals at $\lambda = 0$ . After integration of learnable scales, the final wavelets also meet criteria and adapt to the demand on multiresolution. The plot of $G(\lambda) = h(\lambda)^{2} + \sum_{j=1}^{3} g(s_{j}\lambda)^{2}$ as a black dashed line (located at 1) confirms the construction of tight frames via normalization technique. Fig.2 also depicts the signal distribution over the topology centered on the target node (the red-filled circle). As the scale $s_{j}$ increases, the receptive field of the central node expands. Once again, this visualization intuitively confirms the capability of WaveGC to aggregate both short- and long-range information simultaneously but distinguishingly. More analyses are given in Appendix C.3.1. + +# 6.4. Ablation study + +Table 6. Results of the ablation study. Bold: Best. + +
VariantsComputerPs
Accuracy ↑MAE ↓
WaveGC92.2624.83
w/o wavelet89.6534.20
w/o MPNN90.8925.04
w/o h(λ)90.5725.12
w/o g(sλ)90.8725.09
+ +In this section, we conduct an ablation study of our WaveGC to assess the effectiveness of each component, and the corresponding results are presented in Table 6. The evaluation is conducted on Peptides-struct (long-range) and Computer (short-range). + +Given the hybrid network (Fig. 3), we firstly remove the MPNN part (i.e., 'w/o MPNN') and wavelet part (i.e., 'w/o wavelet'), respectively. Both ablations degrade model performances, where 'w/o wavelet' decline more. To avoid interference from MPNN part, we base on 'w/o MPNN', and + +continue to exclude scaling term (i.e., 'w/o $h(\lambda)$ ), wavelet terms (i.e., 'w/o $g(s\lambda)$ ) and tight frame constrains (i.e., 'w/o tight frame'). Then, both the scaling function basis $h(\lambda)$ and wavelet bases $g(s\lambda)$ are essential components of our WaveGC. In particular, neglecting $h(\lambda)$ results in a larger drop in performance on both short-range and long-range cases, emphasizing the crucial role of low-frequency information. + +# 6.5. Complexity analysis + +The main complexity of WaveGC is the eigen-decomposition process, involving $O(N^3)$ . This is practical for the small-to-medium graphs used in all long-range and some short-range benchmarks, where detailed spectral modeling is critical. To accelerate the decomposition on large-scale graph (e.g., ogbn-arxiv), we may adopt randomized SVD (Halko et al., 2009) with complexity $O(N^2\log K)$ , where we only pick the top $K$ eigenvectors. + +Table 7. Training and EVD time on short- and long-range datasets. + +
Short-rangeCSPhotoComputerCoraFullogbn-arxiv
Training (min)5.700.954.8722.0036.67
EVD (min)2.820.321.443.4921.69
Long-rangeVOCPCQMCOCOPfPs
Training (h)4.0212.3345.401.881.32
EVD (h)0.050.210.580.020.02
+ +Fig. 7 presents a direct comparison of the training time and EVD time across both short-range and long-range datasets. As shown, the time required for EVD is consistently lower than that of training across all datasets, with the difference being particularly significant in the long-range cases. Furthermore, the EVD operation is performed only once before training, and it is a prerequisite for most graph wavelet baselines. To further reduce complexity, we propose a fully polynomial-based approximation that removes the need for EVD, achieving total complexity of $O(N)$ . More details are given in Appendix D. + +Other experiments In Appendix C.5, we analyze the complexity and report the running time for WaveGC and other spectral graph wavelets. Our model shows shorter running times than competitive spectral models while being significantly more accurate. In Appendix C.6, we test the sensitivity of two important hyper-parameters. + +# 7. Conclusion + +In this study, we proposed a novel graph convolution operation based on wavelets (WaveGC), establishing its theoretical capability to capture information at both short and long ranges through a multi-resolution approach. + +# Acknowledgements + +XB is supported by NUS Grant R-252-000-B97-133 and MOE AcRF T1 Grant 251RES2423. MB is partially supported by the EPSRC Turing AI World-Leading Research Fellowship No. EP/X040062/1 and EPSRC AI Hub No. EP/Y028872/1. The authors would like to express their gratitude to the reviewers for their feedback, which has improved the clarity and contribution of the paper. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# References + +Arfken, G. Convolution theorem. In Mathematical Methods for Physicists). Academic Press, 1985. +Bastos, A., Nadgeri, A., Singh, K., Suzumura, T., and Singh, M. Learnable spectral wavelets on dynamic graphs to capture global interactions. In Proceedings of the AAAI Conference on Artificial Intelligence, pp. 6779-6787, 2023. +Bo, D., Wang, X., Shi, C., and Shen, H. Beyond low-frequency information in graph convolutional networks. In Proceedings of the AAAI conference on artificial intelligence, pp. 3950-3957, 2021. +Bo, D., Shi, C., Wang, L., and Liao, R. Specformer: Spectral graph neural networks meet transformers. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023, 2023. +Bresson, X. and Laurent, T. Residual gated graph convnets. arXiv preprint arXiv:1711.07553, 2017. +Bruna, J., Zaremba, W., Szlam, A., and LeCun, Y. Spec + +tral networks and locally connected networks on graphs. arXiv preprint arXiv:1312.6203, 2013. +Chen, J., Gao, K., Li, G., and He, K. Nagphormer: A tokenized graph transformer for node classification in large graphs. In The Eleventh International Conference on Learning Representations, 2022. +Chien, E., Peng, J., Li, P., and Milenkovic, O. Adaptive universal generalized pagerank graph neural network. arXiv preprint arXiv:2006.07988, 2020. +Cho, H., Jeong, M., Jeon, S., Ahn, S., and Kim, W. H. Multi-resolution spectral coherence for graph generation with score-based diffusion. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. +Chung, F. R. Spectral graph theory, volume 92. American Mathematical Soc., 1997. +Coifman, R. R. and Maggioni, M. Diffusion wavelets. Applied and computational harmonic analysis, 21(1):53-94, 2006. +Deb, S., Rahman, S., and Rahman, S. Sea-gwnn: Simple and effective adaptive graph wavelet neural network. In Proceedings of the AAAI Conference on Artificial Intelligence, pp. 11740-11748, 2024. +Defferrard, M., Bresson, X., and Vandergheynst, P. Convolutional neural networks on graphs with fast localized spectral filtering. Advances in neural information processing systems, 29, 2016. +Di Giovanni, F., Rusch, T. K., Bronstein, M. M., Deac, A., Lackenby, M., Mishra, S., and Velicković, P. How does over-squashing affect the power of gnns? arXiv preprint arXiv:2306.03589, 2023. +Dwivedi, V. P. and Bresson, X. A generalization of transformer networks to graphs. arXiv preprint arXiv:2012.09699, 2020. +Dwivedi, V. P., Rampasek, L., Galkin, M., Parviz, A., Wolf, G., Luu, A. T., and Beaini, D. Long range graph benchmark. Advances in Neural Information Processing Systems, 35:22326-22340, 2022. +Fey, M. and Lenssen, J. E. Fast graph representation learning with PyTorch Geometric. In ICLR Workshop on Representation Learning on Graphs and Manifolds, 2019. +Gama, F., Ribeiro, A., and Bruna, J. Diffusion scattering transforms on graphs. arXiv preprint arXiv:1806.08829, 2018. +Gama, F., Ribeiro, A., and Bruna, J. Stability of graph scattering transforms. Advances in Neural Information Processing Systems, 32, 2019. + +Gao, F., Wolf, G., and Hirn, M. Geometric scattering for graph data analysis. In International Conference on Machine Learning, pp. 2122-2131. PMLR, 2019. +Gasteiger, J., Bojchevski, A., and Gunnemann, S. Predict then propagate: Graph neural networks meet personalized pagerank. arXiv preprint arXiv:1810.05997, 2018. +Guibas, J., Mardani, M., Li, Z., Tao, A., Anandkumar, A., and Catanzaro, B. Adaptive fourier neural operators: Efficient token mixers for transformers. arXiv preprint arXiv:2111.13587, 2021. +Halko, N., Martinsson, P.-G., and Tropp, J. A. Finding structure with randomness: Stochastic algorithms for constructing approximate matrix decompositions. arXiv preprint arXiv:0909.4061, 909, 2009. +Hammond, D. K., Vandergheynst, P., and Gribonval, R. Wavelets on graphs via spectral graph theory. Applied and Computational Harmonic Analysis, 30(2):129-150, 2011. +He, M., Wei, Z., Xu, H., et al. Bernnet: Learning arbitrary graph spectral filters via bernstein approximation. Advances in Neural Information Processing Systems, pp. 14239-14251, 2021. +Hinton, G., Deng, L., Yu, D., Dahl, G. E., Mohamed, A.-r., Jaitly, N., Senior, A., Vanhoucke, V., Nguyen, P., Sainath, T. N., et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal processing magazine, 29(6):82-97, 2012. +Hu, W., Fey, M., Zitnik, M., Dong, Y., Ren, H., Liu, B., Catasta, M., and Leskovec, J. Open graph benchmark: Datasets for machine learning on graphs. Advances in neural information processing systems, 33:22118-22133, 2020. +Hu, W., Fey, M., Ren, H., Nakata, M., Dong, Y., and Leskovec, J. Ogb-lsc: A large-scale challenge for machine learning on graphs. arXiv preprint arXiv:2103.09430, 2021. +Huang, K., Wang, Y. G., Li, M., et al. How universal polynomial bases enhance spectral graph neural networks: Heterophily, over-smoothing, and over-squashing. arXiv preprint arXiv:2405.12474, 2024. +Ioannidis, V. N., Chen, S., and Giannakis, G. B. Pruned graph scattering transforms. In International Conference on Learning Representations, 2020. +Kipf, T. N. and Welling, M. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, + +Toulon, France, April 24-26, 2017, Conference Track Proceedings, 2017. +Koke, C. and Kutyniok, G. Graph scattering beyond wavelet shackles. Advances in Neural Information Processing Systems, 35:30219-30232, 2022. +Krizhevsky, A., Sutskever, I., and Hinton, G. E. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25, 2012. +LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2324, 1998. +Leonardi, N. and Van De Ville, D. Tight wavelet frames on multislice graphs. IEEE Transactions on Signal Processing, 61(13):3357-3367, 2013. +Levie, R., Monti, F., Bresson, X., and Bronstein, M. M. Cayleynets: Graph convolutional neural networks with complex rational spectral filters. IEEE Transactions on Signal Processing, 67(1):97-109, 2018. +Li, Q., Han, Z., and Wu, X.-M. Deeper insights into graph convolutional networks for semi-supervised learning. In Proceedings of the AAAI conference on artificial intelligence, 2018. +Li, Z., Kovachki, N. B., Azizzadenesheli, K., Liu, B., Bhattacharya, K., Stuart, A. M., and Anandkumar, A. Fourier neural operator for parametric partial differential equations. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021, 2021. +Lovász, L. Random walks on graphs. Combinatorics, Paul Erdős is eighty, 2(1-46):4, 1993. +Mallat, S. A Wavelet Tour of Signal Processing, 2nd Edition Academic Press, 1999. +Mallat, S. Group invariant scattering. Communications on Pure and Applied Mathematics, 65(10):1331-1398, 2012. +Min, Y., Wenkel, F., and Wolf, G. Scattering gcd: Overcoming oversmoothness in graph convolutional networks. Advances in neural information processing systems, 33: 14498-14508, 2020. +Opolka, F., Zhi, Y.-C., Lio, P., and Dong, X. Adaptive gaussian processes on graphs via spectral graph wavelets. In International Conference on Artificial Intelligence and Statistics, pp. 4818-4834. PMLR, 2022. +Oppenheim, A. V., Willsky, A. S., Nawab, S. H., and Ding, J.-J. Signals and systems, volume 2. Prentice hall Upper Saddle River, NJ, 1997. + +Pan, C., Chen, S., and Ortega, A. Spatio-temporal graph scattering transform. arXiv preprint arXiv:2012.03363, 2020. +Rampásek, L., Galkin, M., Dwivedi, V. P., Liu, A. T., Wolf, G., and Beini, D. Recipe for a general, powerful, scalable graph transformer. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 - December 9, 2022, 2022. +Shuman, D. I., Narang, S. K., Frossard, P., Ortega, A., and Vanderheynst, P. The emerging field of signal processing on graphs: Extending high-dimensional data analysis to networks and other irregular domains. IEEE signal processing magazine, 30(3):83-98, 2013. +Shuman, D. I., Wiesmeyr, C., Holighaus, N., and Vanderheynst, P. Spectrum-adapted tight graph wavelet and vertex-frequency frames. IEEE Transactions on Signal Processing, 63(16):4223-4235, 2015. +Tripura, T. and Chakraborty, S. Wavelet neural operator for solving parametric partial differential equations in computational mechanics problems. Computer Methods in Applied Mechanics and Engineering, pp. 115783, 2023. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. Advances in neural information processing systems, 30, 2017. +Velickovic, P., Cucurull, G., Casanova, A., Romero, A., Lio, P., Bengio, Y., et al. Graph attention networks. stat, 1050 (20):10-48550, 2017. +Wan, L., Li, X., Han, H., Yan, X., Sun, L., Ning, Z., and Xia, F. Unifying and improving graph convolutional neural networks with wavelet denoising filters. In Proceedings of the ACM Web Conference 2023, pp. 177-187, 2023. +Wu, Q., Zhao, W., Yang, C., Zhang, H., Nie, F., Jiang, H., Bian, Y., and Yan, J. Simplifying and empowering transformers for large-graph representations. arXiv preprint arXiv:2306.10759, 2023. +Xing, Y., Wang, X., Li, Y., Huang, H., and Shi, C. Less is more: on the over-globalizing problem in graph transformers. arXiv preprint arXiv:2405.01102, 2024. +Xu, B., Shen, H., Cao, Q., Qiu, Y., and Cheng, X. Graph wavelet neural network. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019, 2019a. + +Xu, K., Hu, W., Leskovec, J., and Jegelka, S. How powerful are graph neural networks? In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019, 2019b. +Xu, M., Dai, W., Li, C., Zou, J., Xiong, H., and Frossard, P. Graph neural networks with lifting-based adaptive graph wavelets. IEEE Transactions on Signal and Information Processing over Networks, 8:63-77, 2022. +Yang, Z., Hu, Y., Ouyang, S., Liu, J., Wang, S., Ma, X., Wang, W., Su, H., and Liu, Y. Wavenet: Tackling nonstationary graph signals via graph spectral wavelets. In Proceedings of the AAAI Conference on Artificial Intelligence, pp. 9287-9295, 2024. +Ying, C., Cai, T., Luo, S., Zheng, S., Ke, G., He, D., Shen, Y., and Liu, T.-Y. Do transformers really perform badly for graph representation? Advances in Neural Information Processing Systems, 34:28877-28888, 2021. +Zhang, K., Pu, X., Li, J., Wu, J., Shu, H., and Kong, Y. Hierarchical diffusion scattering graph neural network. In IJCAI, pp. 3737-3743, 2022. +Zheng, X., Zhou, B., Gao, J., Wang, Y., Lió, P., Li, M., and Montúfar, G. How framelets enhance graph neural networks. In Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139, pp. 12761-12771, 2021. +Zou, D. and Lerman, G. Graph convolutional neural networks via scattering. Applied and Computational Harmonic Analysis, 49(3):1046-1074, 2020. + +# A. Theoretical Proof + +Firstly, we give two auxiliary but indispensable lemma and theorem. Let starts from the formula $\sigma(\Psi_s HW)$ . In this equation, we bound the first derivative of non-linear function as $|\sigma'| < c_{\sigma}$ , and set $||W|| \leq w$ , where $||\cdot||$ is the operator norm. First, we give an upper bound for each entry in $\Psi_s$ . + +Lemma A.1 (Upper bound for graph wavelet). Let $\Psi = Ug(\Lambda)U^T$ . Given a large even number $K > 0$ , then for $\forall i, j \in V \times V$ , we have: + +$$ +\left. \left(\Psi_ {s}\right) _ {i j} < \left(\alpha (\hat {\boldsymbol {A}}) ^ {K / 2} s ^ {K}\right) _ {i j}, \quad \alpha = \frac {C \cdot 2 ^ {K} (K + 1)}{K !}. \right. \tag {14} +$$ + +The proof is given in Appendix A.1. In this lemma, we assume $g$ is smooth enough at $\lambda = 0$ . For fair comparison with traditional K-hop message passing framework $\sigma(\sum_{j=0}^{K} \tau_j A^j HW)$ , we just test the flexibility with the similar form $\sigma(\Psi_s HW)$ . In this case, we derive the depth $m_\Psi$ necessary for this wavelet basis $\Psi_s$ to induce the amount of mixing $\mathrm{mix}_{y_G}(a, b)$ between two nodes $a$ and $b$ . + +Theorem A.2 (The least depth for mixing). Given commute time $\tau(a, b)$ (Lovász, 1993) and number of edges $|E|$ . If $\Psi_s$ generates mixing $m_{y_G}(b, a)$ , then the number of layers $m_\Psi$ satisfies + +$$ +m _ {\Psi} \geq \frac {\tau (a , b)}{2 K} + \frac {2 | E |}{K \sqrt {d _ {a} d _ {b}}} \left[ \frac {m i x _ {y _ {G}} (b , a)}{\gamma \left(\alpha^ {2} s ^ {2 K}\right) ^ {m _ {\Psi}}} - \frac {1}{\lambda_ {1}} \left(\gamma + | 1 - \lambda^ {*} | ^ {K m _ {\Psi} + 1}\right) \right], \tag {15} +$$ + +where $d_{a}$ and $d_{b}$ are degrees of two nodes, $\gamma = \sqrt{\frac{d_{max}}{d_{min}}}$ , and $|1 - \lambda^{*}| = \max_{0 < n \leq N-1} |1 - \lambda_{n}| < 1$ . + +The proof is given in Appendix A.2. In the following subsections, we firstly prove these lemma and theorem, and finally give the complete proof of Theorem 4.2. + +# A.1. Proof of Lemma A.1 (Upper bound for graph wavelet) + +Proof. We aim to investigate the properties of filters $\Psi_{s_j} = Ug(s_j\lambda)U^\top$ to capture both global and local information, corresponding to the cases $s_j \to 0$ and $s_j \to \infty$ , respectively. In the former case, as $s_j$ approaches zero, $g(s_j\lambda)$ tends towards $g(0)$ . For the latter case, the spectral information becomes densely distributed and concentrated near zero. Hence, the meaningful analysis of $g(\lambda)$ primarily revolves around $\lambda = 0$ . Expanding $g(\lambda)$ using Taylor's series around $\lambda = 0$ , we get: + +$$ +g (\lambda) = \sum_ {k = 0} ^ {K} C _ {k} \frac {\lambda^ {k}}{k !} + g ^ {(K + 1)} \left(\lambda^ {*}\right) \frac {\lambda^ {K + 1}}{(K + 1) !} \approx \sum_ {k = 0} ^ {K} C _ {k} \frac {\lambda^ {k}}{k !}, \tag {16} +$$ + +where we neglect the high-order remainder term. Next, we have + +$$ +\begin{array}{l} (\Psi) _ {i j} = \left(\boldsymbol {U} g (\Lambda) \boldsymbol {U} ^ {T}\right) _ {i j} = \left(\sum_ {k = 0} ^ {K} C _ {k} \frac {\hat {\mathcal {L}} ^ {k}}{k !}\right) _ {i}, \\ = \left(\sum_ {k = 0} ^ {K} \frac {C _ {k}}{k !} (\boldsymbol {I} - \hat {\boldsymbol {A}}) ^ {k}\right) _ {i j} = \left(\sum_ {k = 0} ^ {K} \frac {C _ {k}}{k !} \sum_ {p = 0} ^ {k} \binom {k} {p} (- \hat {\boldsymbol {A}}) ^ {p}\right) _ {i j} \\ < \left(\sum_ {k = 0} ^ {K} \frac {C _ {k}}{k !} \sum_ {p = 0} ^ {k} {\binom {k} {p}} (\hat {\boldsymbol {A}}) ^ {p}\right) _ {i j} = \left(\sum_ {k = 0} ^ {K} \frac {C _ {k}}{k !} \sum_ {p = 0} ^ {k} \frac {k !}{(k - p) ! p !} (\hat {\boldsymbol {A}}) ^ {p}\right) _ {i j} \\ = \left(\sum_ {k = 0} ^ {K} C _ {k} \sum_ {p = 0} ^ {k} \frac {(\hat {\mathbf {A}}) ^ {p}}{(k - p) ! p !}\right) _ {i j}. \tag {17a} \\ \end{array} +$$ + +We introduce a new parameter $\mu = \frac{\left(\sum_{k=0}^{K-1} C_k \sum_{p=0}^k \frac{(\hat{\mathbf{A}})^p}{(k-p)!p!}\right)_{ij}}{\left(C_K \sum_{p=0}^K \frac{(\hat{\mathbf{A}})^p}{(K-p)!p!}\right)_{ij}}$ , so the above relation becomes: + +$$ +\left(\Psi\right) _ {i j} < \left((\mu + 1) C _ {K} \sum_ {p = 0} ^ {K} \frac {(\hat {\boldsymbol {A}}) ^ {p}}{(K - p) ! p !}\right) _ {i j} = \left(C \sum_ {p = 0} ^ {K} \frac {(\hat {\boldsymbol {A}}) ^ {p}}{(K - p) ! p !}\right) _ {i j}, \tag {18} +$$ + +where we set $C = (\mu +1)C_K$ . Then, let us explore the expression $\epsilon_{ij}^{p} = \frac{(\hat{\mathbf{A}})_{ij}^{p}}{(K - p)!p!}$ . First, we will address the denominator $(K - p)!p!$ . As $p$ increases, this denominator experiences a sharp decrease followed by a rapid increase. The minimum value occurs at $(K / 2)! (K / 2)!$ when $p = K / 2$ , assuming $K$ is even. Second, let's analyze the numerator $(\hat{\mathbf{A}})_{ij}^{p}$ , which involves repeated multiplication of $\hat{\mathbf{A}}$ . According to Theorem 1 in (Li et al., 2018), this repeated multiplication causes $(\hat{\mathbf{A}})^{p}$ to converge to the eigenspaces spanned by the eigenvector $D^{-1 / 2}\mathbf{1}$ of $\lambda = 0$ , where $\mathbf{1} = (1,1,\dots,1) \in \mathbb{R}^{n^3}$ . Then, let us assume there exists a value $p^*$ beyond which the change in $(\hat{\mathbf{A}})^{p}$ becomes negligible. Given that $K$ is a large even number, we can infer that $K / 2 \gg p^*$ . Thus, when $(K - p)!p!$ sharply decreases, $(\hat{\mathbf{A}})^{p}$ has already approached a stationary state. Consequently, $\max \epsilon_{ij}^{p} = \frac{(\hat{\mathbf{A}})_{ij}^{K / 2}}{(K / 2)!(K / 2)!}$ , where the denominator reaches its minimum. Thus, we have + +$$ +\begin{array}{l} (\Psi) _ {i j} < \left(C \sum_ {p = 0} ^ {K} \frac {(\hat {\boldsymbol {A}}) ^ {p}}{(K - p) ! p !}\right) _ {i j} \\ < C (K + 1) \left(\frac {(\hat {\boldsymbol {A}}) ^ {K / 2}}{(K / 2) ! (K / 2) !}\right) _ {i j} \\ < \left(\frac {C \cdot 2 ^ {K} (K + 1)}{K !} (\hat {\boldsymbol {A}}) ^ {K / 2}\right) _ {i j}. \tag {19a} \\ \end{array} +$$ + +We have $\frac{1}{(K / 2)!(K / 2)!} < \frac{2^K}{K!}$ given that + +$$ +\begin{array}{l} (K / 2)! (K / 2)! = \left(\frac {K}{2} \cdot \frac {K - 2}{2} \dots \frac {4}{2} \cdot \frac {2}{2}\right) \left(\frac {K}{2} \cdot \frac {K - 2}{2} \dots \frac {4}{2} \cdot \frac {2}{2}\right) \\ > \left(\frac {K}{2} \cdot \frac {K - 2}{2} \dots \frac {4}{2} \cdot \frac {2}{2}\right) \left(\frac {K - 1}{2} \cdot \frac {K - 3}{2} \dots \frac {3}{2} \cdot \frac {1}{2}\right) \tag {20} \\ = \underbrace {\frac {K \cdot K - 1 \cdot K - 2 \cdot K - 3 \dots 4 \cdot 3 \cdot 2 \cdot 1}{2 \cdot 2 \cdot 2 \cdot 2 \dots 2 \cdot 2 \cdot 2 \cdot 2}} _ {\text {K t e r m s}} = \frac {K !}{2 ^ {K}}. \\ \end{array} +$$ + +With $\alpha = \frac{C\cdot 2^K(K + 1)}{K!}$ and scale $s$ , Eq. (19a) can be finally written as + +$$ +\left. \left(\Psi_ {s}\right) _ {i j} < \left(\alpha (\hat {\boldsymbol {A}}) ^ {K / 2} s ^ {K}\right) _ {i j}. \right. \tag {21} +$$ + +# A.2. Proof of Theorem A.2 (The least depth for mixing) + +For this section, we mainly refer to the proof from (Di Giovanni et al., 2023). + +Preliminary. For simplicity, we follow (Di Giovanni et al., 2023) to denote some operations utilized in this section. As stated, we consider the message passing formula $\sigma (\Psi_s HW)$ . First, we denote $h_a^{(l),\alpha}$ as the $\alpha$ -th entry of the embedding $h_a^{(l)}$ for node $a$ at the $l$ -th layer. Then, we rewrite the formula as: + +$$ +\boldsymbol {h} _ {a} ^ {(l), \alpha} = \sigma \left(\widetilde {\boldsymbol {h}} _ {a} ^ {(l - 1), \alpha}\right), \quad 1 \leq \alpha \leq d, \tag {22} +$$ + +where $\widetilde{h}_a^{(l - 1),\alpha} = (\Psi_s HW)_a$ is the entry $\alpha$ of the pre-activated embedding of node $a$ at layer $l$ . Given nodes $a$ and $b$ , we denote the following differentiation operations: + +$$ +\nabla_ {a} \boldsymbol {h} _ {b} ^ {(l)} := \frac {\partial \boldsymbol {h} _ {b} ^ {(l)}}{\partial \boldsymbol {x} _ {a}}, \quad \nabla_ {a b} ^ {2} \boldsymbol {h} _ {i} ^ {(l)} := \frac {\partial^ {2} \boldsymbol {h} _ {i} ^ {(l)}}{\partial \boldsymbol {x} _ {a} \partial \boldsymbol {x} _ {b}}. \tag {23} +$$ + +Next, we firstly derive upper bounds on $\nabla_{a}\pmb{h}_{b}^{(l)}$ , and then on $\nabla_{ab}^2\pmb{h}_i^{(l)}$ . + +Lemma A.3. Given the message passing formula $\sigma(\Psi_s HW)$ , let assume $|\sigma'| \leq c_\sigma$ and $||W|| \leq w$ , where $|| \cdot ||$ is the operator norm. For two nodes $a$ and $b$ after $l$ layers of message passing, the following holds: + +$$ +\left\| \nabla_ {a} \boldsymbol {h} _ {b} ^ {(l)} \right\| \leq \left(c _ {\sigma} w\right) ^ {l} \left(\boldsymbol {B} ^ {l}\right) _ {b a}, \tag {24} +$$ + +where $\pmb{B}_{ba} = \left(\alpha (\hat{\pmb{A}})^{K / 2}s^{K}\right)_{ba}$ . + +Proof. If $l = 1$ and we fix entries $1 \leq \alpha, \beta \leq d$ , then we have: + +$$ +\left(\nabla_ {a} \boldsymbol {h} _ {b} ^ {(1)}\right) _ {\alpha \beta} = \left(\operatorname {d i a g} \left(\sigma^ {\prime} \left(\widetilde {\boldsymbol {h}} _ {b} ^ {(0)}\right)\right) \left(\boldsymbol {W} ^ {(1)} \Psi_ {b a} \boldsymbol {I}\right)\right) _ {\alpha \beta}. \tag {25} +$$ + +With Cauchy-Schwarz inequality, we bound the left hand side by + +$$ +\begin{array}{l} \left| \left| \nabla_ {a} \boldsymbol {h} _ {b} ^ {(1)} \right| \right| \leq \left| \left| \operatorname {d i a g} \left(\sigma^ {\prime} \left(\widetilde {\boldsymbol {h}} _ {b} ^ {(0)}\right)\right) \right| \right| \cdot \left| \left| \boldsymbol {W} ^ {(1)} \Psi_ {b a} \right| \right| \\ \leq c _ {\sigma} w \boldsymbol {B} _ {b a}. \\ \end{array} +$$ + +Next, we turn to a general case where $l > 1$ : + +$$ +\left(\nabla_ {a} \boldsymbol {h} _ {b} ^ {(l)}\right) _ {\alpha \beta} = \left(\operatorname {d i a g} \left(\sigma^ {\prime} \left(\widetilde {\boldsymbol {h}} _ {b} ^ {(l - 1)}\right) \left(W \sum_ {j} \Psi_ {b j} \nabla_ {a} \boldsymbol {h} _ {j} ^ {(m - 1)}\right)\right) _ {\alpha \beta}. \right. \tag {27} +$$ + +Then, we can use the induction step to bound the above equation: + +$$ +\begin{array}{l} \left| \left| \nabla_ {a} h _ {b} ^ {(l)} \right| \right| \leq \left(c _ {\sigma} w\right) ^ {l} \left| \sum_ {j _ {0}} \sum_ {j _ {1}} \dots \sum_ {j _ {l - 2}} \Psi_ {b j _ {0}} \Psi_ {j _ {0} j _ {1}} \dots \Psi_ {j _ {l - 3} j _ {l - 2}} \Psi_ {j _ {l - 2} a} \right| \tag {28} \\ \leq \left(c _ {\sigma} w\right) ^ {l} \left(\boldsymbol {B} ^ {l}\right) _ {b a}. \\ \end{array} +$$ + +In Eq. (28), we implicitly use $|\Psi_s^l|_{ba} < \left(\alpha (\hat{\mathbf{A}})^{K / 2}s^K\right)_ba = \mathbf{B}_{ba}^l$ . Similar to proof given in Appendix A.1, we can give the following proof: + +$$ +\begin{array}{l} | \Psi_ {s} ^ {l} | _ {b a} = \left| \boldsymbol {U} g (s \Lambda) ^ {l} \boldsymbol {U} ^ {T} \right| _ {b a} = \left| s ^ {l K} C ^ {l} \frac {\hat {\mathcal {L}} ^ {l K}}{K ! ^ {l}} \right| _ {b a} \\ = \left| s ^ {l K} \frac {C ^ {l}}{K !} (\pmb {I} - \hat {\pmb {A}}) ^ {l K} \right| _ {b a} = \left| s ^ {l K} \frac {C ^ {l}}{K !} \sum_ {p = 0} ^ {l K} \binom {l K} {p} (- \hat {\pmb {A}}) ^ {p} \right| _ {b a} \\ < \left(s ^ {l K} \frac {C ^ {l}}{K !} \sum_ {p = 0} ^ {l K} \binom {l K} {p} (\hat {\boldsymbol {A}}) ^ {p}\right) _ {b a} = \left(s ^ {l K} \frac {C ^ {l}}{K !} \sum_ {p = 0} ^ {l K} \frac {(l K) !}{(l K - p) ! p !} (\hat {\boldsymbol {A}}) ^ {p}\right) _ {b a} \tag {29} \\ = \left(s ^ {l K} \frac {C ^ {l} (l K) !}{K ! ^ {l}} \sum_ {p = 0} ^ {l K} \frac {(\hat {\mathbf {A}}) ^ {p}}{(l K - p) ! p !}\right) _ {b a} < \left(s ^ {l K} \frac {C ^ {l} (l K) !}{K ! ^ {l}} (l K + 1) \left(\frac {(\hat {\mathbf {A}}) ^ {l K / 2}}{(l K / 2) ! (l K / 2) !}\right)\right) _ {b a} \\ < \left(s ^ {l K} \frac {C ^ {l} (l K) !}{K ! ^ {l}} (l K + 1) \frac {2 ^ {l K}}{(l K) !} (\hat {\boldsymbol {A}}) ^ {l K / 2}\right) _ {b a} = \left(s ^ {l K} \frac {C ^ {l} \cdot 2 ^ {l K} (l K + 1)}{K ! ^ {l}} (\hat {\boldsymbol {A}}) ^ {l K / 2}\right) _ {b a} \\ < \left(s ^ {l K} \frac {C ^ {l} \cdot 2 ^ {l K} (K + 1) ^ {l}}{K ! ^ {l}} (\hat {\boldsymbol {A}}) ^ {l K / 2}\right) _ {b a} = \left(\alpha (\hat {\boldsymbol {A}}) ^ {K / 2} s ^ {K}\right) _ {b a} ^ {l}, \\ \end{array} +$$ + +where in the last line, we utilize the relation $lK + 1 < (K + 1)^l$ . + +Lemma A.4. Given the message passing formula $\sigma (\Psi_sHW)$ , let assume $|\sigma^{\prime}|,|\sigma^{\prime \prime}|\leq c_{\sigma}$ and $||W||\leq w$ , where $||\cdot ||$ is operator norm. For nodes $i$ , $a$ and $b$ after $l$ layers of message passing, the following holds: + +$$ +\left| \left| \nabla_ {a b} ^ {2} \boldsymbol {h} _ {i} ^ {(l)} \right| \right| \leq \sum_ {k = 0} ^ {l - 1} \sum_ {j \in V} \left(c _ {\sigma} w\right) ^ {2 l - k - 1} w \left(\boldsymbol {B} ^ {l - k}\right) _ {j b} \left(\boldsymbol {B} ^ {k}\right) _ {i j} \left(\boldsymbol {B} ^ {l - k}\right) _ {j a}, \tag {30} +$$ + +where $\pmb{B}_{ba} = \left(\alpha (\hat{\pmb{A}})^{K / 2}s^{K}\right)_{ba}$ . + +Proof. Considering $\nabla_{ab}^2\pmb{h}_i^{(l)}\in \mathbb{R}^{d\times (d\times d)}$ , we refer to (Di Giovanni et al., 2023) to use the following ordering for indexing the columns: + +$$ +\frac {\partial^ {2} \boldsymbol {h} _ {i} ^ {(l) , \alpha}}{\partial x _ {b} ^ {\beta} \partial x _ {a} ^ {\gamma}} := \left(\nabla_ {a b} ^ {2} \boldsymbol {h} _ {i} ^ {(l)}\right) _ {\alpha , d (\beta - 1) + \gamma}. \tag {31} +$$ + +Similar to the proof of Lemma A.3, we firstly focus on $m = 1$ : + +$$ +\left(\nabla_ {a b} ^ {2} \boldsymbol {h} _ {i} ^ {(1)}\right) _ {\alpha , d (\beta - 1) + \gamma} = \left(\operatorname {d i a g} \left(\sigma^ {\prime \prime} \left(\widetilde {\boldsymbol {h}} _ {i} ^ {(0), \alpha}\right)\right) \left(\boldsymbol {W} ^ {(1)} \Psi_ {i b} \boldsymbol {I}\right) _ {\alpha \gamma} \times \left(\boldsymbol {W} ^ {(1)} \Psi_ {i a} \boldsymbol {I}\right) _ {\alpha \beta}. \right. \tag {32} +$$ + +We bound the left-hand side as: + +$$ +\left| \left| \nabla_ {a b} ^ {2} \boldsymbol {h} _ {i} ^ {(1)} \right| \right| \leq \left(c _ {\sigma} w\right) \left(w \left| \boldsymbol {B} _ {i b} \right| \left| \boldsymbol {B} _ {i a} \right|\right). \tag {33} +$$ + +Then, for $m > 1$ : + +$$ +\begin{array}{l} \left(\nabla_ {a b} ^ {2} \boldsymbol {h} _ {i} ^ {(l)}\right) _ {\alpha , d (\beta - 1) + \gamma} \\ = \underbrace {\operatorname {d i a g} \left( \right.\sigma^ {\prime \prime} \left(\widetilde {\boldsymbol {h}} _ {i} ^ {(l - 1) , \alpha}\right)\left(W \sum_ {j} \Psi_ {i j} \nabla_ {a} \boldsymbol {h} _ {j} ^ {(l - 1)}\right) \times \left(W \sum_ {j} \Psi_ {i j} \nabla_ {b} \boldsymbol {h} _ {j} ^ {(l - 1)}\right)} _ {R} \tag {34} \\ + \underbrace {\operatorname {d i a g} (\sigma^ {\prime} (\widetilde {\boldsymbol {h}} _ {i} ^ {(l - 1) , \alpha}) (\boldsymbol {W} ^ {(m)} \sum_ {j} \Psi_ {i j} \nabla_ {a b} ^ {2} \boldsymbol {h} _ {j} ^ {(l - 1)})} _ {\boldsymbol {z}}. \\ \end{array} +$$ + +We denote $||\nabla_{j}\pmb{h}_{i}^{(l - 1)}||$ as $(D\pmb{h}^{(l - 1)})_{ij}$ , and $||\nabla_{ab}^2\pmb{h}_i^{(l - 1)}||$ as $(D^{2}\pmb{h}^{(l - 1)}_{ba})_i$ . To bound $\pmb{R}$ , we deduce as follows: + +$$ +\begin{array}{l} \left| \left| \boldsymbol {R} \right| \right| \leq c _ {\sigma} \left(w \sum_ {j} \boldsymbol {B} _ {i j} \left| \left| \nabla_ {a} \boldsymbol {h} _ {j} ^ {(l - 1)} \right| \right|\right) \times \left(w \sum_ {j} \boldsymbol {B} _ {i j} \left| \left| \nabla_ {b} \boldsymbol {h} _ {j} ^ {(l - 1)} \right| \right|\right) \\ = c _ {\sigma} w \left(w B D h ^ {(l - 1)}\right) _ {i b} \left(B D h ^ {(l - 1)}\right) _ {i a} \\ \leq c _ {\sigma} w \left(w \boldsymbol {B} \left(c _ {\sigma} w\right) ^ {l - 1} \boldsymbol {B} ^ {l - 1}\right) _ {i b} \left(\boldsymbol {B} \left(c _ {\sigma} w\right) ^ {l - 1} \boldsymbol {B} ^ {l - 1}\right) _ {i a} \tag {35a} \\ = \left(c _ {\sigma} w\right) ^ {2 l - 1} \left(w \left(\boldsymbol {B} ^ {l}\right) _ {i b} \left(\boldsymbol {B} ^ {l}\right) _ {i a}\right), \\ \end{array} +$$ + +where we utilize the conclusion from Theorem A.3 in (35a). For term $Z$ , we have: + +$$ +\begin{array}{l} \left\| \boldsymbol {Z} \right\| \leq c _ {\sigma} w \left(\boldsymbol {B} D ^ {2} \boldsymbol {h} ^ {(l - 1)}\right) _ {i} \\ \leq c _ {\sigma} w \sum_ {s} \boldsymbol {B} _ {i s} \sum_ {k = 0} ^ {l - 2} \sum_ {j \in V} \left(c _ {\sigma} w\right) ^ {2 l - 2 - k - 1} w \left(\boldsymbol {B} ^ {l - 1 - k}\right) _ {j b} \left(\boldsymbol {B} ^ {k}\right) _ {s j} \left(\boldsymbol {B} ^ {l - 1 - k}\right) _ {j a} \tag {36a} \\ = \sum_ {k = 0} ^ {l - 2} \sum_ {j \in V} (c _ {\sigma} w) ^ {2 l - 2 - k} (\boldsymbol {B} ^ {l - 1 - k}) _ {j b} (\boldsymbol {B} ^ {k + 1}) _ {i j} (\boldsymbol {B} ^ {l - 1 - k}) _ {j a} \\ = \sum_ {k = 1} ^ {l - 1} \sum_ {j \in V} (c _ {\sigma} w) ^ {2 l - 1 - k} (\pmb {B} ^ {l - k}) _ {j b} (\pmb {B} ^ {k}) _ {i j} (\pmb {B} ^ {l - k}) _ {j a}, \\ \end{array} +$$ + +where in (36a), we recursively use the Eq. (34). Finally, we finish the proof as: + +$$ +\begin{array}{l} | | \nabla_ {a b} ^ {2} \pmb {h} _ {i} ^ {(l)} | | \leq | | \pmb {R} | | + | | \pmb {Z} | | \\ \leq \sum_ {k = 0} ^ {l - 1} \sum_ {j \in V} \left(c _ {\sigma} w\right) ^ {2 l - 1 - k} \left(\boldsymbol {B} ^ {l - k}\right) _ {j b} \left(\boldsymbol {B} ^ {k}\right) _ {i j} \left(\boldsymbol {B} ^ {l - k}\right) _ {j a}. \tag {37} \\ \end{array} +$$ + +With Lemma A.3 and A.4, now we give the following theorem. + +Theorem A.5. Consider the message passing formula $\sigma(\Psi_s HW)$ with $m_{\Psi}$ layers, the induced mixing mix $y_G(b, a)$ over the features of nodes $a$ and $b$ satisfies: + +$$ +\left. m i x _ {y _ {G}} (b, a) \leq \sum_ {l = 0} ^ {m _ {\Psi} - 1} \left(c _ {\sigma} w\right) ^ {(2 m _ {\Psi} - l - 1)} \left(w \left(\boldsymbol {B} ^ {m _ {\Psi} - l}\right) ^ {\top} d i a g \left(\mathbf {1} ^ {\top} \boldsymbol {B} ^ {l}\right) \boldsymbol {B} ^ {m _ {\Psi} - l}\right) _ {a b}, \right. \tag {38} +$$ + +where $\pmb{B}_{ba} = \left(\alpha (\hat{\pmb{A}})^{K / 2}s^{K}\right)_{ba}$ and $\mathbf{1}\in \mathbb{R}^n$ is the vector of ones. + +Proof. Here, we define the prediction function $y_{G}: N \times d \to d$ on $G$ as $y_{G}^{(m_{\Psi})} = \text{Readout}(\pmb{H}^{(m_{\Psi})}\pmb{\theta})$ , where Readout is to gather all nodes embeddings to get the final graph embedding, $\pmb{H}^{(m_{\Psi})}$ is the node embedding matrix after $m_{\Psi}$ layers and $\pmb{\theta}$ is the learnable weight for graph-level task. If we set Readout = sum, we derive: + +$$ +\begin{array}{l} \operatorname{mix}_{y_{G}}(b,a) = \max_{x}\max_{1\leq \beta ,\gamma \leq d}\left|\frac{\partial^{2}y_{G}^{(m_{\Psi})}(\boldsymbol{X})}{\partial\boldsymbol{x}_{a}^{\beta}\partial\boldsymbol{x}_{b}^{\gamma}}\right| \\ \leq \sum_ {i \in V} \left| \sum_ {\alpha = 1} ^ {d} \theta_ {\alpha} \frac {\partial^ {2} h _ {i} ^ {(m _ {\Psi}) , \alpha}}{\partial \boldsymbol {x} _ {a} ^ {\beta} \partial \boldsymbol {x} _ {b} ^ {\gamma}} \right| \\ = \sum_ {i \in V} | | \left(\nabla_ {a b} ^ {2} \boldsymbol {h} _ {i} ^ {(m _ {\Psi})}\right) ^ {\top} \boldsymbol {\theta} | | \\ \leq \sum_ {i \in V} \left\| \nabla_ {a b} ^ {2} h _ {i} ^ {(m _ {\Psi})} \right\| (39a) \\ \leq \sum_ {k = 0} ^ {m _ {\Psi} - 1} \left(c _ {\sigma} w\right) ^ {(2 m _ {\Psi} - k - 1)} \left(w \left(\boldsymbol {B} ^ {m _ {\Psi} - k}\right) ^ {\top} \operatorname {d i a g} \left(\mathbf {1} ^ {\top} \boldsymbol {B} ^ {k}\right) \boldsymbol {B} ^ {m _ {\Psi} - k}\right) _ {a b}, (39b) \\ \end{array} +$$ + +where in (39a), we assume the norm $||\pmb{\theta}|| \leq 1$ . In (39b), we use the results from Lemma A.4. This upper bound still holds if Readout is chosen as MEAN or MAX (Di Giovanni et al., 2023). + +In theorem A.5, we can assume that $c_{\sigma}$ to be smaller or equal than one, which is satisfied by the majority of current active functions. Furthermore, considering the normalization (e.g., $L_{2}$ norm) on $W$ , we assume $w < 1$ . With these two assumptions, the conclusion of theorem A.5 is rewritten as: + +$$ +\left. \operatorname {m i x} _ {y _ {G}} (b, a) \leq \sum_ {l = 0} ^ {m _ {\Psi} - 1} \left(\left(\boldsymbol {B} ^ {m _ {\Psi} - l}\right) ^ {\top} \operatorname {d i a g} \left(\mathbf {1} ^ {\top} \boldsymbol {B} ^ {l}\right) \boldsymbol {B} ^ {m _ {\Psi} - l}\right) _ {a b}. \right. \tag {40} +$$ + +With this new conclusion, we now turn to the proof of Theorem A.2: + +Proof. Firstly, $\mathrm{diag}\left(\mathbf{1}^\top \mathbf{B}^l\right)_i = (\alpha s^K)^l (((\hat{\mathbf{A}})^{K / 2})^l\mathbf{1})_i\leq \gamma (\alpha s^K)^l$ by using $((\hat{A})^{K / 2})^l\mathbf{1})_i\leq \gamma$ (Di Giovanni et al., 2023). Then, we find + +$$ +\begin{array}{l} \sum_ {l = 0} ^ {m _ {\Psi} - 1} \left(\left(\boldsymbol {B} ^ {m _ {\Psi} - l}\right) ^ {\top} \operatorname {d i a g} \left(\mathbf {1} ^ {\top} \boldsymbol {B} ^ {l}\right) \boldsymbol {B} ^ {m _ {\Psi} - l}\right) _ {a b} \leq \gamma \left(\sum_ {l = 0} ^ {m _ {\Psi} - 1} \boldsymbol {B} ^ {2 (m _ {\Psi} - l)} \cdot (\alpha s ^ {K}) ^ {l}\right) _ {a b} \\ < \gamma \left(\sum_ {l = 0} ^ {m _ {\Psi} - 1} \left(\alpha (\hat {\boldsymbol {A}}) ^ {K / 2} s ^ {K}\right) ^ {2 (m _ {\Psi} - l)} \cdot \left(\alpha s ^ {K}\right) ^ {l}\right) _ {a b} \tag {41} \\ < \gamma (\alpha s ^ {K}) ^ {2 m _ {\Psi}} \left(\sum_ {l = 0} ^ {m _ {\Psi} - 1} \hat {\boldsymbol {A}} ^ {K (m _ {\Psi} - l)}\right) _ {a b} \\ = \gamma (\alpha s ^ {K}) ^ {2 m _ {\Psi}} \left(\sum_ {l = 1} ^ {m _ {\Psi}} \hat {\boldsymbol {A}} ^ {K l}\right) _ {a b}. \\ \end{array} +$$ + +The following proof depends on commute time $\tau(a, b)$ (Lovász, 1993), whose definition is as follows using the spectral representation of the graph Laplacian (Di Giovanni et al., 2023): + +$$ +\tau (a, b) = 2 | E | \sum_ {n = 0} ^ {N - 1} \frac {1}{\lambda_ {n}} \left(\frac {u _ {n} (a)}{\sqrt {d _ {a}}} - \frac {u _ {n} (b)}{\sqrt {d _ {b}}}\right) ^ {2}. \tag {42} +$$ + +Then, we have: + +$$ +\begin{array}{l} \left(\sum_ {l = 1} ^ {m _ {\Psi}} \hat {\boldsymbol {A}} ^ {K l}\right) _ {a b} \leq \sum_ {l = 0} ^ {K m _ {\Psi}} \left(\hat {\boldsymbol {A}} ^ {l}\right) _ {a b} \\ = \sum_ {l = 0} ^ {K m _ {\Psi}} \sum_ {n \geq 0} (1 - \lambda_ {n}) ^ {l} u _ {n} (a) u _ {n} (b) \\ = \left(K m _ {\Psi} + 1\right) \frac {\sqrt {d _ {a} d _ {b}}}{2 | E |} + \sum_ {n > 0} \frac {1 - (1 - \lambda) ^ {K m _ {\Psi} + 1}}{\lambda_ {n}} u _ {n} (a) u _ {n} (b) \tag {43a} \\ = (K m _ {\Psi} + 1) \frac {\sqrt {d _ {a} d _ {b}}}{2 | E |} + \sum_ {n > 0} \frac {1}{\lambda_ {n}} u _ {n} (a) u _ {n} (b) - \sum_ {n > 0} \frac {(1 - \lambda) ^ {K m _ {\Psi} + 1}}{\lambda_ {n}} u _ {n} (a) u _ {n} (b). \\ \end{array} +$$ + +In Eq. (43a), we use $u_0(a) = \sqrt{\frac{d_a}{2|E|}}$ . Then, from the definition of commute time, we can get: + +$$ +\begin{array}{l} \sum_ {n = 1} ^ {N - 1} \frac {1}{\lambda_ {n}} u _ {n} (a) u _ {n} (b) = \frac {- \tau (a , b)}{4 | E |} \sqrt {d _ {a} d _ {b}} + \frac {1}{2} \sum_ {n > 0} \frac {1}{\lambda_ {n}} \left(u _ {n} ^ {2} (a) \sqrt {\frac {d _ {b}}{d _ {a}}} + u _ {n} ^ {2} (b) \sqrt {\frac {d _ {a}}{d _ {b}}}\right) \tag {44} \\ \leq \frac {- \tau (a , b)}{4 | E |} \sqrt {d _ {a} d _ {b}} + \frac {1}{2 \lambda_ {1}} \left(\sqrt {\frac {d _ {a}}{d _ {b}}} + \sqrt {\frac {d _ {b}}{d _ {a}}} - \frac {\sqrt {d _ {a} d _ {b}}}{| E |}\right), \\ \end{array} +$$ + +where in the last inequation, we utilize the fact that $\sum_{n > 0}u_n^2 (a) = 1 - u_0^2 (a)$ because $\{u_n\}$ is a set of orthonormal basis. Besides, we use $\lambda_{n} > \lambda_{1},\forall n > 1$ . Next, we derive + +$$ +\begin{array}{l} - \sum_ {n > 0} \frac {(1 - \lambda) ^ {K m _ {\Psi} + 1}}{\lambda_ {n}} u _ {n} (a) u _ {n} (b) \leq \sum_ {n > 0} \frac {| 1 - \lambda^ {*} | ^ {K m _ {\Psi} + 1}}{\lambda_ {n}} | u _ {n} (a) u _ {n} (b) | | \\ \leq \frac {\left| 1 - \lambda^ {*} \right| ^ {K m _ {\Psi} + 1}}{2 \lambda_ {1}} \sum_ {n > 0} \left(u _ {n} ^ {2} (a) + u _ {n} ^ {2} (b)\right) \tag {45} \\ \leq \frac {\left| 1 - \lambda^ {*} \right| ^ {K m _ {\Psi} + 1}}{2 \lambda_ {1}} \left(2 - \frac {d _ {a} + d _ {b}}{2 | E |}\right), \\ \end{array} +$$ + +where $|1 - \lambda^{*}| = \max_{0 < n \leq N - 1} |1 - \lambda_{n}| < 1$ . Insert derivations (44) and (45) into (43), then gather all above derivations: + +$$ +\begin{array}{l} \operatorname {m i x} _ {y _ {G}} (b, a) \leq \gamma (\alpha s ^ {K}) ^ {2 m _ {\Psi}} \left\{\left(K m _ {\Psi} + 1\right) \frac {\sqrt {d _ {a} d _ {b}}}{2 | E |} - \frac {\tau (a , b)}{4 | E |} \sqrt {d _ {a} d _ {b}} \right. \\ + \frac {1}{2 \lambda_ {1}} \left(\sqrt {\frac {d _ {a}}{d _ {b}}} + \sqrt {\frac {d _ {b}}{d _ {a}}} - \frac {\sqrt {d _ {a} d _ {b}}}{| E |}\right) + \frac {| 1 - \lambda^ {*} | ^ {K m _ {\Psi} + 1}}{2 \lambda_ {1}} \left(2 - \frac {d _ {a} + d _ {b}}{2 | E |}\right) \Bigg \} \tag {46} \\ \leq \gamma (\alpha s ^ {K}) ^ {2 m _ {\Psi}} \sqrt {d _ {a} d _ {b}} \left(\frac {K m _ {\Psi}}{2 | E |} - \frac {\tau (a , b)}{4 | E |}\right) + \frac {\gamma (\alpha s ^ {K}) ^ {2 m _ {\Psi}}}{2 \lambda_ {1}} \left(\sqrt {\frac {d _ {a}}{d _ {b}}} + \sqrt {\frac {d _ {b}}{d _ {a}}}\right) + \frac {\gamma (\alpha s ^ {K}) ^ {2 m _ {\Psi}}}{\lambda_ {1}} | 1 - \lambda^ {*} | ^ {K m _ {\Psi} + 1}. \\ \end{array} +$$ + +In last inequation, we discard $\frac{\sqrt{d_a d_b}}{2|E|}\left[1 - \frac{1}{\lambda_1}\left(1 + \frac{|1 - \lambda^*|^{Km_\Psi + 1}}{2}\left(\sqrt{\frac{d_a}{d_b}} +\sqrt{\frac{d_b}{d_a}}\right)\right)\right] < 0$ because $\lambda_{1} < 1$ . Then, + +$$ +\frac {\operatorname {m i x} _ {y _ {G}} (b , a)}{\gamma \left(\alpha s ^ {K}\right) ^ {2 m _ {\Psi}} \sqrt {d _ {a} d _ {b}}} \leq \frac {K m _ {\Psi}}{2 | E |} - \frac {\tau (a , b)}{4 | E |} + \frac {1}{2 \lambda_ {1} \sqrt {d _ {a} d _ {b}}} \left(\sqrt {\frac {d _ {a}}{d _ {b}}} + \sqrt {\frac {d _ {b}}{d _ {a}}} + 2 | 1 - \lambda^ {*} | ^ {K m _ {\Psi} + 1}\right). \tag {47} +$$ + +From (47), we can finally give the lower bound of $m_{\Psi}$ as: + +$$ +\begin{array}{l} m _ {\Psi} \geq \frac {2 | E |}{K} \left\{\frac {\tau (a , b)}{4 | E |} + \frac {\operatorname {m i x} _ {y _ {G}} (b , a)}{\gamma (\alpha s ^ {K}) ^ {2 m _ {\Psi}} \sqrt {d _ {a} d _ {b}}} - \frac {1}{2 \lambda_ {1} \sqrt {d _ {a} d _ {b}}} \left(\sqrt {\frac {d _ {a}}{d _ {b}}} + \sqrt {\frac {d _ {b}}{d _ {a}}} + 2 | 1 - \lambda^ {*} | ^ {K m _ {\Psi} + 1}\right) \right\} \\ \left. > \frac {2 | E |}{K} \left\{\frac {\tau (a , b)}{4 | E |} + \frac {1}{\sqrt {d _ {a} d _ {b}}} \left[ \frac {\operatorname {m i x} _ {y _ {G}} (b , a)}{\gamma (\alpha s ^ {K}) ^ {2 m _ {\Psi}}} - \frac {1}{2 \lambda_ {1}} \left(2 \gamma + 2 | 1 - \lambda^ {*} | ^ {K m _ {\Psi} + 1}\right) \right] \right\} \right. \tag {48} \\ = \frac {2 | E |}{K} \left\{\frac {\tau (a , b)}{4 | E |} + \frac {1}{\sqrt {d _ {a} d _ {b}}} \left[ \frac {\operatorname {m i x} _ {y _ {G}} (b , a)}{\gamma (\alpha^ {2} s ^ {2 K}) ^ {m _ {\Psi}}} - \frac {1}{\lambda_ {1}} \left(\gamma + | 1 - \lambda^ {*} | ^ {K m _ {\Psi} + 1}\right) \right] \right\} \\ = \frac {\tau (a , b)}{2 K} + \frac {2 | E |}{K \sqrt {d _ {a} d _ {b}}} \left[ \frac {\mathrm {m i x} _ {y _ {G}} (b , a)}{\gamma (\alpha^ {2} s ^ {2 K}) ^ {m _ {\Psi}}} - \frac {1}{\lambda_ {1}} \left(\gamma + | 1 - \lambda^ {*} | ^ {K m _ {\Psi} + 1}\right) \right] \\ \end{array} +$$ + +![](images/3ac90b46d72a1cef5b78eaf08ba8283a35299440187296443daef93ba7eff7db.jpg) + +# A.3. Proof of Theorem 4.2 (Short-range and long-range receptive fields) + +Proof. From theorem A.2, we denote $L_{m_{\Psi}} = \frac{\tau(a,b)}{2K} + \frac{2|E|}{K\sqrt{d_a d_b}} \left[ \frac{\mathrm{mix}_{y_G}(b,a)}{\gamma(\alpha^2 s^{2K})^{m_{\Psi}}} - \frac{1}{\lambda_1} \left( \gamma + |1 - \lambda^*|^{Km_{\Psi} + 1} \right) \right]$ . For K-order message passing $\sigma(\sum_{j=0}^{K} \tau_j A^j HW)$ , $\tau_j \in [0,1]$ , we assume that $(\tau_P A^P)_{ba}$ is the maximum among $\{(\tau_0 A^0)_{ba}, \ldots, (\tau_K A^K)_{ba}\}$ . According to theorem A.5, we can get the similar conclusion, replacing $B$ with $C = (K + 1) \tau_P A^P$ . Then, we have the following proof: + +Proof. Again, $\mathrm{diag}\left(\mathbf{1}^\top \mathbf{C}^l\right)_i = ((K + 1)\tau_P)^l (A^{Pl})\mathbf{1})_i\leq \gamma ((K + 1)\tau_P)^l$ . Then, we have + +$$ +\begin{array}{l} \sum_ {l = 0} ^ {m _ {A} - 1} \left(\left(\boldsymbol {C} ^ {m _ {A} - l}\right) ^ {\top} \operatorname {d i a g} \left(\mathbf {1} ^ {\top} \boldsymbol {C} ^ {l}\right) \boldsymbol {C} ^ {m _ {A} - l}\right) _ {a b} \leq \gamma \left(\sum_ {l = 0} ^ {m _ {A} - 1} \boldsymbol {C} ^ {2 (m _ {A} - l)} \cdot ((K + 1) \tau_ {P}) ^ {l}\right) _ {a b} \\ < \gamma \left(\sum_ {l = 0} ^ {m _ {A} - 1} \left((K + 1) \tau_ {P} A ^ {P}\right) ^ {2 (m _ {A} - l)} \cdot \left((K + 1) \tau_ {P}\right) ^ {l}\right) _ {a b} \\ < \gamma ((K + 1) \tau_ {P}) ^ {2 m _ {A}} \left(\sum_ {l = 0} ^ {m _ {A} - 1} \hat {\boldsymbol {A}} ^ {2 P (m _ {A} - l)}\right) _ {a b} \tag {49} \\ = \gamma ((K + 1) \tau_ {P}) ^ {2 m _ {A}} \left(\sum_ {l = 1} ^ {m _ {A}} \hat {\boldsymbol {A}} ^ {2 P l}\right) _ {a b} \\ < \gamma (\sqrt {(K + 1) \tau_ {P}}) ^ {4 m _ {A}} \left(\sum_ {l = 1} ^ {2 m _ {A}} \hat {\boldsymbol {A}} ^ {P l}\right) _ {a b}. \\ \end{array} +$$ + +![](images/0df3e0b8361b555a3009abbbf98a7e44cf1f23c602a4776d94cffdbb957c4ce2.jpg) + +Following the rest proof of $L_{m_{\Psi}}$ , replace $\{\alpha s^{K}, m_{\Psi}, K\}$ with $\{\sqrt{(K + 1)\tau_{P}}, 2m_{A}, P\}$ , and get the expression of $L_{m_A}$ : + +$$ +L _ {m _ {A}} = \frac {\tau (a , b)}{2 P} + \frac {2 | E |}{P \sqrt {d _ {a} d _ {b}}} \left[ \frac {\operatorname {m i x} _ {y _ {G}} (b , a)}{\gamma ((K + 1) ^ {2} \tau_ {P} ^ {2}) ^ {m _ {A}}} - \frac {1}{\lambda_ {1}} (\gamma + | 1 - \lambda^ {*} | ^ {2 P m _ {A} + 1}) \right]. \tag {50} +$$ + +Therefore, we have + +$$ +L _ {m _ {\Psi}} \approx \frac {P}{K} L _ {m _ {A}} + \frac {2 | E |}{K \sqrt {d _ {a} d _ {b}}} \left[ \frac {\operatorname {m i x} _ {y _ {G}} (b , a)}{\gamma} \left(\frac {1}{\left(\alpha^ {2} s ^ {2 K}\right) ^ {m _ {\Psi}}} - \frac {1}{\left((K + 1) ^ {2} \tau_ {P} {} ^ {2}\right) ^ {m _ {A}}}\right) \right], \tag {51} +$$ + +where we ignore $|1 - \lambda^{*}|^{Km_{\Psi} + 1}$ and $|1 - \lambda^{*}|^{2Pm_{A} + 1}$ . Since $|1 - \lambda^{*}| < 1$ as shown in theorem A.2, therefore $|1 - \lambda^{*}|^{Km_{\Psi} + 1} - |1 - \lambda^{*}|^{2Pm_{A} + 1}$ will be very small, especially when $m_{\Psi}$ and $m_{A}$ are large. From Eq. (51), when $s \to \infty$ , the relation becomes: + +$$ +L _ {m _ {\Psi}} \approx \frac {P}{K} L _ {m _ {A}} - \frac {2 | E |}{K (K + 1) ^ {2 m _ {A}} \tau_ {P} ^ {2 m _ {A}} \sqrt {d _ {a} d _ {b}}} \frac {\operatorname {m i x} _ {y _ {G}} (b , a)}{\gamma}. \tag {52} +$$ + +Or, when $s \to 0$ , the relation becomes: + +$$ +L _ {m _ {\Psi}} \approx \frac {P}{K} L _ {m _ {A}} + \frac {2 | E |}{K \sqrt {d _ {a} d _ {b}}} \frac {\operatorname {m i x} _ {y _ {G}} (b , a)}{\gamma} \cdot \frac {1}{\left(\alpha^ {2} s ^ {2 K}\right) ^ {m _ {\Psi}}}. \tag {53} +$$ + +# B. Details of Encoding Eigenvalues + +In this paper, we adopt Eigenvalue Encoding (EE) Module (Bo et al., 2023) to encode eigenvalues. EE functions as a set-to-set spectral filter, enabling interactions between eigenvalues. In EE, both magnitudes and relative differences of all eigenvalues are leveraged. Specifically, the authors use an eigenvalue encoding function to transform each $\lambda$ from scalar $\mathbb{R}^1$ to a vector $\mathbb{R}^d$ : + +$$ +\rho (\lambda , 2 i) = \sin \left(\epsilon \lambda / 1 0 0 0 0 ^ {2 i / d}\right), \quad \rho (\lambda , 2 i + 1) = \cos \left(\epsilon \lambda / 1 0 0 0 0 ^ {2 i / d}\right), \tag {54} +$$ + +where $i$ is the dimension of the representations and $\epsilon$ is a hyper parameter. By encoding in this way, relative frequency shifts between eigenvalues are captured. Then, the raw representations of eigenvalues are the concatenation between eigenvalues and corresponding representation vectors: + +$$ +\boldsymbol {Z} _ {\lambda} = \left[ \lambda_ {1} \| \rho (\lambda_ {1}), \dots , \lambda_ {N - 1} \| \rho (\lambda_ {N - 1}) \right] ^ {\top} \in \mathbb {R} ^ {N \times d}. \tag {55} +$$ + +To capture the dependencies between eigenvalues, a standard Transformer is used followed by skip-connection and feed forward network (FFN): + +$$ +\hat {\boldsymbol {Z}} _ {\lambda} = \operatorname {T r a n s f o r m e r} \left(\mathrm {L N} \left(\boldsymbol {Z} _ {\lambda}\right)\right) + \boldsymbol {Z} _ {\lambda} \in \mathbb {R} ^ {N \times d}, \quad \boldsymbol {Z} = \operatorname {F F N} \left(\mathrm {L N} \left(\hat {\boldsymbol {Z}} _ {\lambda}\right)\right) + \hat {\boldsymbol {Z}} _ {\lambda} \in \mathbb {R} ^ {N \times d}, \tag {56} +$$ + +where LN is the layer normalization. Then, $Z$ is the embedding matrix for eigenvalues, which is injected into the learning of combination coefficients $\tilde{a}$ and $\tilde{b}$ , and scales $\tilde{s}$ . + +# C. Experimental Details + +# C.1. Implementation Details + +Inspired by (Rampásek et al., 2022), we adopt the hybrid network architecture as shown in Fig. 3, where the "WaveGC" block is the process shown in Fig. 1 (a). This architecture explicitly involves a parallel massage passing neural network (MPNN) (e.g., GCN (Kipf & Welling, 2017), GatedGCN (Bresson & Laurent, 2017)) to augment the low-frequency modeling. Then, these two branches separately go through skip-connection and normalization, and then sum together followed by a two-layers MLP, eventually skip-connection and normalization. + +We explore the number of truncated terms $\rho$ from 1 to 10 and adjust the number of scales $J$ from 1 to 5. Additionally, for the pre-defined vector $\overline{s}$ controlling the amplitudes of scales, we test each element in $\overline{s}$ from 0.1 to 10. The usage of the tight frames constraint is also a parameter subject to tuning, contingent on the given dataset. Typically, models iterate through several layers to produce a single result, thus the parameters of WaveGC may or may not be shared between different layers. For short-range datasets, we only retain the + +![](images/0145de55d923473a862d62e5f1ef28a31eca43bb99210a23f5919de4f75084f5.jpg) +Figure 3. Combing MPNN with WaveGC. + +first $30\%$ of eigenvalues and their corresponding eigenvectors for efficient eigendecomposition, and set a threshold $\aleph$ and filter out entries in $\Phi$ and $\Psi_{s_j}$ whose absolute value is lower than $\aleph$ . + +For fair comparisons, we randomly run 4 times on long-range datasets (Dwivedi et al., 2022), and 10 times on short-range datasets (Chen et al., 2022), and report the average results with their standard deviation for all methods. For the sake of reproducibility, we also report the related parameters in Appendix C.7. + +Table 8. The statistics of the short-range datasets. + +
Dataset# Graphs# Nodes# Edges# Features# Classes
CS118,333163,7886,80515
Photo17,650238,1637458
Computer113,752491,72276710
CoraFull119,793126,8428,71070
ogbn-arxiv1169,3431,116,24312840
+ +# C.2. Datasets Description + +For short-range datasets, we choose five commonly used CS, Photo, Computer, CoraFull (Fey & Lenssen, 2019) and ogbn-arxiv (Hu et al., 2020). CS is a network based on co-authorship, with nodes representing authors and edges symbolizing collaboration between them. In the Photo and Computer networks, nodes stand for items, and edges suggest that the connected items are often purchased together, forming co-purchase networks. CoraFull is a network focused on citations, where nodes are papers and edges indicate citation connections between them. ogbn-arxiv is a citation network among all Computer Science (CS) Arxiv papers, where each node corresponds to an Arxiv paper, and the edges indicate the citations between papers. The details of these five datasets are summarized in Table 8. + +Table 9. The statistics of the long-range datasets. + +
Dataset# GraphsAvg. # nodesAvg. # edgesPrediction levelTaskMetric
PascalVOC-SP11,355479.42,710.5inductive node21-class classif.F1 score
PCQM-Contact529,43430.161.0inductive linklink rankingMRR
COCO-SP123,286476.92,693.7inductive node81-class classif.F1 score
Peptides-func15,535150.9307.3graph10-task classif.Avg. Precision
Peptides-struct15,535150.9307.3graph11-task regressionMean Abs. Error
+ +For long-range tasks, we choose five long-range datasets (Dwivedi et al., 2022), including PascalVOC-SP (VOC), PCQM-Contact (PCQM), COCO-SP (COCO), Peptides-func (Pf) and Peptides-struct (Ps). These five datasets are usually used to test the performance on long-range modeling. VOC and COCO datasets are created through SLIC superpixelization of the Pascal VOC and MS COCO image collections. They are both utilized for node classification, where each super-pixel node is categorized into a specific object class. PCQM is developed from PCQM4Mv2 (Hu et al., 2021) and its related 3D molecular structures, focusing on binary link prediction. This involves identifying node pairs that are in 3D contact but distant in the 2D graph. Both Pf and Ps datasets consist of atomic graphs of peptides sourced from SATPdb. In the Peptides-func dataset, the task involves multi-label graph classification into 10 distinct peptide functional classes. Conversely, the Peptides-struct dataset is centered on graph regression to predict 11 different 3D structural properties of peptides. The details of these five datasets are summarized in Table 9. + +# C.3. More analyses for section 6.3 + +In this section, we firstly give a further visualization on short-range dataset and then analyze the impact of the learned scales. + +# C.3.1. VISUALIZATION ON CORAFULL + +To give one more example, we provide additional visualization results on the CoraFull dataset. These results are presented in Fig. 4, where the learned scaling functions $h(\lambda)$ and $g(\lambda)$ meet the specified requirements. The four subfigures in Fig. 4(c) illustrate that as the scale $s_j$ increases, the receptive field of the center node expands. This highlights WaveGC's capability to capture both short- and long-range information by adjusting different values of $s_j$ . However, one of our strategies for CoraFull involves considering only $30\%$ of eigenvalues as input. Consequently, the full spectrum is truncated, leaving only the remaining $30\%$ parts, as depicted in Fig. 5. We give a deeper insight in the behavior of this truncation from both spectral and spatial perspectives: + +- Spectral perspective. As shown in Fig. 5, the wavelet function $g(s\lambda)$ retains non-trivial amplitudes within the first $30\%$ domain. While $g(\lambda) \approx 0$ , the retained spectral range is sufficiently broad to allow the wavelets to operate + +![](images/c62ad86914f94edcb10348327df7ed5bdbdc3cad5395e14db441c15065383fec.jpg) + +![](images/25adfb60c009feadbe32911569e87670b014942be3380a3b88647072afd8bf17.jpg) + +![](images/32fe2a7dd661b0b454d87c807a1f168fa60d7807f9e5051cdb40e7d943af8a4f.jpg) +Figure 4. Illustration of the spectral and spatial signals of the learned function basis and multiple wavelet bases with full spectrum. + +![](images/a28fa8913f9c4a3330c20597e360062fe5b4787abe30dae3b8d1a47be7699676.jpg) +Figure 5. Illustration of the spectral and spatial signals of the learned function basis and multiple wavelet bases with partial spectrum. + +![](images/403f6c5b435e4d2d73b092d594a88b2a95f6ea5d75abfc3fe8179976233c9131.jpg) + +![](images/3b613aad5d0250b1b85784b7301234e10aa639b98a363b54d21631bd5b3e69cc.jpg) + +![](images/34c27099c2153c94ed388fdf4bb5c0c3855d5799759bfaa77ca8cbd7549560a9.jpg) + +![](images/85908c530190fd5171874f839ef213bc58c3872dc5b1449be02332d3075c675f.jpg) + +effectively. Therefore, even in the truncated setting, both the scaling function $h(\lambda)$ and wavelet function $g(\lambda)$ contribute meaningfully to low-frequency modeling. + +- Spatial perspective. In Fig. 5(b), we observe that truncating the spectrum mimics the effect of using a larger wavelet scale $s > 1$ , which reduces the effective spectral range and increases the spatial receptive field. This effect is visually confirmed in Fig. 4(c) and 5(c), where the receptive fields become noticeably larger after truncation. Thus, even on short-range datasets, the wavelet branch captures valuable higher-order information that complements local aggregation from MPNN. This complementary role is further validated by the performance drop observed in Table 6 when wavelets are removed. + +Overall, spectral truncation does not impair wavelet behavior; instead, it supports effective low-frequency modeling while also enhancing spatial coverage. + +# C.3.2. IMPACT OF THE LEARNED SCALES + +![](images/03e90eab7e7bd2abea20cc327207bb114436125e1e592c37488fc6dfc024e91b.jpg) +Figure 6. Visualizations of receptive fields for Peptides-struct (Ps) and Pascal-VOC (VOC) at their largest scale $s$ . + +Table 10. Comparison of average and max receptive fields of Ps and VOC. + +
Peptides-structPascal-VOC
Avg. Receptive Field3.020.74
Max Receptive Field93
Avg. Shortest Path20.8910.74
+ +We empirically analyze the learned scale values and their impact on receptive fields in Fig. 6. Specifically, we illustrate the largest learned scales for the Ps and VOC datasets, along with their corresponding receptive field visualizations. The receptive field is heuristically defined as follows: + +Definition 1. (Receptive field.) Given a wavelet $\Psi(s\lambda)$ , node $j$ lies in the receptive field of node $i$ if $|\Psi(s\lambda)[i,j]| > 0.1 \times \max(|\Psi(s\lambda)|)$ . + +Under this criterion, we observe that Ps exhibits larger receptive fields, corresponding to a larger learned scale of 9.48. We further report the average and maximum receptive field sizes across all nodes in Table 10. The larger receptive fields in Ps align with its inherently longer average shortest-path distances, thus validating the model's ability to adaptively adjust to long-range dependencies. To examine the extreme case of large-scale values, we increase the predefined scale vector $\bar{s}$ in Eq. (7) for Peptides-func (Pf) to (10, 100, 1000). This vector determines the upper bound of the learnable scale range. The + +![](images/bbcc60c94b98a3347c394fb94b508d37e69bc05aac9b96d60fa75e6954965d5a.jpg) +Figure 7. Visualizations of receptive fields for Peptides-func (Pf) at extreme scales. + +resulting learned scales and receptive fields are depicted in Figure 3. When $s = 9.17$ , the red node primarily aggregates local information; in contrast, at $s = 988.24$ , the same node gathers information from a much broader range. This confirms our theoretical assertion that WaveGC exhibits long-range behavior as s approaches infinity. + +# C.4. More comparisons between WaveGC and ChebNet + +Table 11. More ablations for differences between WaveGC and ChebNet. + +
Free αFree βFix s=1Free s̅Original
Computer91.28±0.1591.19±0.0991.73±0.0291.51±0.0292.26±0.18
Ps25.08±0.0125.09±0.1225.28±0.0025.15±0.2524.83±0.11
+ +Obviously, both WaveGC and ChebNet attempt weighted combination of Chebyshev polynomials in different ways. On one hand, ChebNet learns term coefficients independently, while WaveGC map eigenvectors into coefficients $\tilde{\alpha}$ and $\tilde{\beta}$ . On the other hand, WaveGC further involves multiple and learnable scales $\tilde{s}$ . Finally, we test importance of these differences on the Computer and Ps. The results are summarized in Table 11, showcasing different variants such as free learning coefficients (i.e., $\tilde{\alpha},\tilde{\beta}$ ), adopting single scale $s = 1$ , and free learning $\tilde{s}$ to avoid joint parameterization. Each of these modifications resulted in degraded performance compared to the original model, demonstrating the improvements our new model offers over ChebNet. + +# C.5. Complexity and Running time + +Table 12. Comparison on running time per epoch (s). + +
SGWTGWNNWaveShrinkWaveNetDEFTUFGConvSUFGConvRWaveGC
Computer3.60.82.72.01.13.13.21.5
Ps21.030.552.027.323.647.343.523.9
+ +The main contribution of WaveGC is to address long-range interactions in graph convolution, so it inevitably establishes spatial connections between distant nodes. This results in the same $O(N^2)$ complexity as Transformer (Vaswani et al., 2017). This is the same for all spectral graph wavelets, including SGWT, GWNN, WaveShrink, WaveNet and UFGConvS/R. A possible solution is to decrease the number of considered frequency modes from $N$ to $\nu$ . In this way, the complexity is reduced to $O(\nu \cdot N)$ . We report the running time consumption of WaveGC and other spectral graph wavelets (that is, SGWT, GWNN, WaveShrink, WaveNet, DEFT, UFGConvS and UFGConvR). The time consumptions for Computer and Ps are presented in Table 12. According to the table, the running time of WaveGC is in the first level among spectral graph wavelets. + +# C.6. Hyper-Parameter Sensitivity Analysis + +In WaveGC, two key hyper-parameters, namely $\rho$ and $J$ , play important roles. The parameter $\rho$ governs the number of truncated terms for both $T_{i}^{o}$ and $T_{i}^{e}$ , while $J$ determines the number of scales $s_j$ in Eq. (7). In this section, we explore the sensitivity of $\rho$ and $J$ on the Peptides-struct (Ps) and Computer datasets. The results are visually presented in Fig.8, where the color depth of each point reflects the corresponding performance (the lighter the color, the better the performance), and + +the best points are identified with a red star. Observing the results, we note that the optimal value for $\rho$ is 2 for Ps and 7 for Computer. This discrepancy can be attributed to the substantial difference in the graph sizes between the two datasets, with Computer exhibiting a significantly larger graph size (refer to Appendix C.2). Consequently, a more intricate filter design is necessary for the larger dataset. Concerning $J$ , the optimal value is determined to be 3 for both Ps and Computer. A too small $J$ leads to inadequate coverage of ranges, while an excessively large $J$ results in redundant scales with overlapping ranges. + +![](images/f957727e7d942abb696eb22f52c36cece06aadca7f84fa631a2df9579fee77f4.jpg) +(a) Ps: $\rho$ -analysis + +![](images/0793d02627d423e9d104734393b672d279551916910f48985ec3c62932ed51b7.jpg) +(b) Computer: $\rho$ -analysis + +![](images/7a1ef613aa971ba31c22b45e66773e1d233d43e7cd611bce9c8923f1e9d31453.jpg) +(c) Ps: $J$ -analysis + +![](images/341efa229c8538d4b62d434e316faf0e615501968a1eabddda38ccce539eabda.jpg) +(d) Computer: $J$ -analysis +Figure 8. Analysis of the sensitivities of $\rho$ and $J$ . + +# C.7. Hyper-parameters Settings + +We implement our WaveGC in PyTorch, and list some important parameter values in our model in Table 13. Please note that for the five long-range datasets, we follow the parameter budget $\sim 500\mathrm{k}$ (Dwivedi et al., 2022). + +Table 13. The values of parameters used in WaveGC (T: True; F: False). + +
Dataset# parametersρJTight framesN
CS495k33{0.5, 0.5, 0.5}T0.1
Photo136k33{1.0, 1.0, 1.0}T0.1
Computer167k73{10.0, 10.0, 10.0}T0.1
CoraFull621k33{2.0, 2.0, 2.0}T0.1
ogbn-arxiv2,354k33{5.0, 5.0, 5.0}F/
PascalVOC-SP506k53{0.5, 1.0, 10.0}T/
PCQM-Contact508k53{0.5, 1.0, 5.0}T/
COCO-SP546k33{0.5, 1.0, 10.0}T/
Peptides-func496k53{10.0, 10.0, 10.0}T/
Peptides-struct534k33{10.0, 10.0, 10.0}F/
+ +# C.8. Operating Environment + +The environment where our code runs is shown as follows: + +- Operating system: Linux version 5.11.0-43-generic +- CPU information: Intel(R) Xeon(R) Gold 6226R CPU @ 2.90GHz +- GPU information: NVIDIA RTX A5000 + +# D. Approximation Strategy for O(N) Complexity + +To further reduce complexity, we propose a fully polynomial-based approximation that removes the need for eigendecomposition, achieving total complexity of $O(N)$ , on par with graph Fourier-basis-based methods. This is achieved via polynomial approximation of the wavelet transform using Chebyshev polynomials: + +![](images/bec082c52f90da40992ad180d748d4a7d4da6548c4f63e6b536b35742db59198.jpg) +(1) Base $g(\lambda)$ + +![](images/fce856f72848883b30a82e643b0ef4cc55ab34673aa1bb3258307c72c617add0.jpg) +(2) $s < 1$ , "stretched" + +![](images/11b2593e8ab4997cebe4f8e621583c96c876e9922ff0e21dd6b304d515d14e1d.jpg) +(3) $s > 1$ "squeezed" +Figure 9. The scale $s$ can "stretch" or "squeeze" the shape of $g(\lambda)$ as $g(s\lambda)$ . + +![](images/d923189c47daa5233fd8b1ee590d7f0e19f7e4f3e3fc6968b249d2752d829646.jpg) +Figure 10. The illustration of applying "window" over $g(s\lambda)$ . + +- Scaling function $h(\Lambda)$ . Since $h(\Lambda) = \sum b_i T_i^o(\Lambda)$ , where $T_i^o$ are odd-degree Chebyshev polynomials, we can compute + +$$ +\boldsymbol {\Phi} \boldsymbol {f} = U h (\boldsymbol {\Lambda}) \boldsymbol {U} ^ {\top} \boldsymbol {f} = \sum b _ {i} T _ {i} ^ {o} (\boldsymbol {L}) \boldsymbol {f}. \tag {57} +$$ + +This is equivalent to a polynomial operation over the graph Laplacian $\pmb{L}$ , which has $O(N)$ complexity. + +- Wavelet Function $g(\Lambda)$ . Similarly, $g(\Lambda) = \sum a_i T_i^e(\Lambda)$ , where $T_i^e$ are even-degree Chebyshev polynomials, gives + +$$ +\Psi \boldsymbol {f} = U g (\boldsymbol {\Lambda}) \boldsymbol {U} ^ {\top} \boldsymbol {f} = \sum a _ {i} T _ {i} ^ {e} (\boldsymbol {L}) \boldsymbol {f}, \tag {58} +$$ + +which is also polynomial in $\pmb{L}$ with $O(N)$ cost. + +- Incorporating scale $s$ . The domain $\lambda \in [0,2]$ for $g(\lambda)$ transforms to $\lambda \in [0,2 / s]$ in $g(s\lambda)$ . This raises two scenarios: + +- If $s < 1$ : The full spectrum [0,2] is covered, and $g(s\lambda)$ remains valid as a polynomial (Fig. 9 (2)). +- If $s > 1$ : Only the interval $[0,2/s]$ is valid. The rest of the spectrum $[2/s,2]$ should be suppressed (Fig. 9 (3)). To handle this, we apply a window function $w(\lambda)$ , where: + +$$ +w (\lambda) = \left\{ \begin{array}{l l} 1 & \quad \lambda \in [ 0, 2 / s ] \\ 0 & \quad \lambda \in [ 2 / s, 2 ] \end{array} \right. +$$ + +The true scaled wavelet becomes $g(s\lambda) = g(s\lambda)\cdot w(\lambda)$ . Both $g(s\lambda)$ and $w(\lambda)$ can be approximated using Chebyshev polynomials, so the entire operation remains within $O(N)$ complexity. + +Using this approach, plus without eigenvalue encoding (EE) and tight frame constraint, we no longer require EVD with the maximum simplification. The resulting model maintains the theoretical structure of WaveGC while gaining substantial computational benefits. + +Table 14. Running time (s) per epoch. + +
CSPhotoComputer
GPRGNN1.10.20.4
BernNet1.50.51.3
UniFilter5.70.81.5
WaveGC_simplified1.40.61.8
+ +Table 15. Qualified results on three short-range datasets. + +
Accuracy ↑CSPhotoComputer
GPRGNN95.1394.4990.82
BernNet95.4294.6790.98
UniFilter95.6894.3490.07
WaveGC_simplified95.6394.9091.22
WaveGC95.8995.3792.26
+ +To validate this simplified version, we compared its runtime and accuracy with GPRGNN (Chien et al., 2020), BernNet (He et al., 2021), and UniFilter (Huang et al., 2024) on three short-range datasets. As shown in Table 14, the WaveGC_simplified achieves comparable training time to Fourier-based methods. According to Table 2, it incurs only a small drop in performance compared with WaveGC, confirming that polynomial approximation remains effective even without EVD. + +# E. Related Work + +Graph Wavelet Transform. Graph wavelet transform is a generalization of classical wavelet transform (Mallat, 1999) into graph domain. SGWT (Hammond et al., 2011) defines the computing paradigm on weighted graph via spectral graph theory. Specifically, it defines scaling operation in time field as the scaling on eigenvalues. The authors also prove the localization properties of SGWT in the spatial domain in the limit of fine scales. To accelerate the computation on transform, they additionally present a fast Chebyshev polynomial approximation algorithm. GWNN (Xu et al., 2019a) chooses heat kernel as the filter to construct the bases. The graph wavelet bases learnt from these methods are not guaranteed as band-pass filters in $\lambda \in [0,2]$ and thus violate admissibility condition (Mallat, 1999). UFGCONV (Zheng et al., 2021) defines a framelet-based graph convolution with Haar-type filters. WaveNet (Yang et al., 2024) relies on Haar wavelets as bases, and uses the highest-order scaling function to approximate all the other wavelets and scaling functions. WGGP (Opolka et al., 2022) integrates Gaussian processes with Mexican Hat to represent varying levels of smoothness on the graph. The above four methods fix the form of the constructed wavelets, extremely limiting the adaptivity to different datasets. In this paper, our WaveGC constructs band-pass filter and low-pass filter purely depending on the even terms and odd terms of Chebyshev polynomials. In this case, the admissibility condition is strictly guaranteed, and the constructed graph wavelets can be arbitrarily complex and flexible with the number of truncated terms increasing. In addition, SEA-GWNN (Deb et al., 2024) focuses on the second generation of wavelets, or lifting schemes, which is a different topic from ours. + +Graph Scattering Transform. The Scattering Transform constructs a hierarchical, tree-like structure by combining a cascading filter bank (or wavelets), point-wise non-linearity, and a low-pass operator. As introduced by Mallat (Mallat, 2012), this approach guarantees translation invariance and stability to deformations. On one hand, researchers have explored the application of this technique to graph data. Early efforts, such as those by (Zou & Lerman, 2020), (Gama et al., 2019), and GS-SVM (Gao et al., 2019), extended the scattering transform into the graph spectral domain. ST-GST (Pan et al., 2020) defined filtering and wavelets for spatio-temporal graphs, deriving the corresponding scattering process. Meanwhile, (Gama et al., 2018) employed lazy diffusion(Coifman & Maggioni, 2006) as wavelets to construct graph diffusion scattering, demonstrating its stability against deformations based on diffusion distance. HDS-GNN (Zhang et al., 2022) enhanced GNNs by integrating scattering features from a diffusion scattering network layer by layer, while GGSN (Koke & Kutyniok, 2022) introduced further flexibility to each operation. On the other hand, the computational efficiency of this transform, which involves a total of $\sum_{l=1}^{L} J^{l}$ filtering operations, poses a significant challenge. To address this, pGST (Ioannidis et al., 2020) proposed a pruning strategy, retaining only the higher-energy child signals for each parent node. Scattering GCN (Min et al., 2020) further optimized the process by selectively using more beneficial wavelets, simplifying the scattering computation. + +Spectral graph convolution. Traditional studies on spectral graph convolution mainly concentrate on the design of filter with fixed Fourier bases. One way is to design low-pass filters that smooth signals within neighboring regions. GCN (Kipf & Welling, 2017) keeps the first two ChebNet (Defferrard et al., 2016) terms with extra tricks, and averages signals between neighbors. PPNP (Gasteiger et al., 2018) smooths signals in a broader range following PageRank based diffusion. Another way is to design adaptive filters so work in both homophily and heterophily scenarios. ChebNet (Defferrard et al., 2016) approximates universe filter functions with learnable coefficients before each Chebyshev term. FAGCN (Bo et al., 2021) proposes self-gating mechanism to adaptively learn more information beyond low-frequency information in GNNs. + +Graph Transformer. Graph Transformer (GT) has attracted considerable attention on long-range interaction. GT (Dwivedi & Bresson, 2020) proposes to employ Laplacian eigenvectors as PE with randomly flipping their signs. Graphormer (Ying et al., 2021) takes the distance of the shortest path between two nodes as spatial encoding, which is involved in attention calculation as a bias. GraphGPS (Rampasek et al., 2022) provides different choices for PE, consisting of LapPE, RWSE, SignNet and EquivStableLapPE. SGFormer (Wu et al., 2023) is empowered by a simple attention model that can efficiently propagate information among arbitrary nodes. Recently, Xing et al. (2024) are the first to reveal the over-globalizing problem in graph transformer, and propose CoBFormer to improve the GT capacity on local modeling with a theoretical guarantee. \ No newline at end of file diff --git a/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/images.zip b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9f67f2ffb4c75412df33ea9a19ec2815b83a528a --- /dev/null +++ b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e00b1ae2ba967f8e72700a1a0a9e59c7b4561e37bdcadb0440a0193dc5f4c42 +size 1589227 diff --git a/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/layout.json b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..bc40bca73e3f03fdaf3b9cb857488999e0db700e --- /dev/null +++ b/ageneralgraphspectralwaveletconvolutionviachebyshevorderdecomposition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a02eb53509f16fcc783a8aa0d9a0ecba57f840dcd410aad0e9cfaa3f9f6773f6 +size 1150718 diff --git a/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/97e50113-6ba1-4974-acb9-7c0727625bed_content_list.json b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/97e50113-6ba1-4974-acb9-7c0727625bed_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b1a36da2b4a11f2fd5cdc68383db98ca1734001a --- /dev/null +++ b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/97e50113-6ba1-4974-acb9-7c0727625bed_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d2a03331e6730d5dbce9b2277b5ca246e6d52127ee685293c3a68f736a0b352 +size 202142 diff --git a/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/97e50113-6ba1-4974-acb9-7c0727625bed_model.json b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/97e50113-6ba1-4974-acb9-7c0727625bed_model.json new file mode 100644 index 0000000000000000000000000000000000000000..203f8862c01638e15d1dd5cd2021799bb01dab4e --- /dev/null +++ b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/97e50113-6ba1-4974-acb9-7c0727625bed_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2340fdcd988e374a801abf36548d73eaa951f6adb9a1350258e4745fe5bfa4f0 +size 242884 diff --git a/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/97e50113-6ba1-4974-acb9-7c0727625bed_origin.pdf b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/97e50113-6ba1-4974-acb9-7c0727625bed_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fb85d3c3bace06051b1bfe476338d237089eebbb --- /dev/null +++ b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/97e50113-6ba1-4974-acb9-7c0727625bed_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20651a8816842ca8bec47e30b5a62e9b1c5ca2f8d998679b0d617ad7e5c9e429 +size 2088284 diff --git a/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/full.md b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/full.md new file mode 100644 index 0000000000000000000000000000000000000000..024acaa282da1f4821a81da98e7abf404e34c720 --- /dev/null +++ b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/full.md @@ -0,0 +1,956 @@ +# A Generalizable Physics-Enhanced State Space Model for Long-Term Dynamics Forecasting in Complex Environments + +Yuchen Wang $^{1}$ Hongjue Zhao $^{2}$ Haohong Lin $^{3}$ Enze Xu $^{1}$ Lifang He $^{4}$ Huajie Shao $^{1}$ + +# Abstract + +This work aims to address the problem of long-term dynamic forecasting in complex environments where data are noisy and irregularly sampled. While recent studies have introduced some methods to improve prediction performance, these approaches still face a significant challenge in handling long-term extrapolation tasks under such complex scenarios. To overcome this challenge, we propose Phy-SSM, a generalizable method that integrates partial physics knowledge into state space models (SSMs) for long-term dynamics forecasting in complex environments. Our motivation is that SSMs can effectively capture long-range dependencies in sequential data and model continuous dynamical systems, while the incorporation of physics knowledge improves generalization ability. The key challenge lies in how to seamlessly incorporate partially known physics into SSMs. To achieve this, we decompose partially known system dynamics into known and unknown state matrices, which are integrated into a Phy-SSM unit. To further enhance long-term prediction performance, we introduce a physics state regularization term to make the estimated latent states align with system dynamics. Besides, we theoretically analyze the uniqueness of the solutions for our method. Extensive experiments on three real-world applications, including vehicle motion prediction, drone state prediction, and COVID-19 epidemiology forecasting, demonstrate the superior performance of Phy-SSM over the baselines in both long-term interpolation and extrapolation tasks. The code is available at https://github.com/511205787/Phy_SSM-ICML2025. + +# 1. Introduction + +Dynamical systems have been widely applied across a broad range of real-world domains, including autonomous driving (Kong et al., 2015; Rajamani, 2011), epidemiology (Nicho, 2010), and climate science (Ionides et al., 2006). + +Generally, dynamical systems are often governed by underlying physical laws. Motivated by this, some studies have developed physics-enhanced machine learning models (O'Driscoll et al., 2019; Cicirello, 2024) for to enhance the generalization ability of dynamics forecasting by incorporating known physical laws, such as energy conservation and differential equations (Greydanus et al., 2019; Raissi et al., 2019). A common assumption in these methods is that the physical laws governing system dynamics are fully known as prior knowledge. However, in practice, it is challenging to obtain the complete governing equations for complex dynamical systems using first principles (Linial et al., 2021; Gentine et al., 2018). On the other hand, dynamical systems like autonomous vehicles operate in complex and unknown environments such as inclement weather conditions, their sensors often suffer from faults or mismatched clocks (Dabrowski & Rahman, 2019; Huang et al., 2023), resulting in noisy and irregularly sampled data. + +To address these issues, few recent works (Linial et al., 2021; Takeishi & Kalousis, 2021; Yang et al., 2022) have developed partially known physics-enhanced machine learning models for noisy, regular data. While these methods perform well in interpolation tasks, they often struggle with long-term extrapolation tasks with irregular data. An illustrative example is provided in Appendix A. This limitation arises from their solutions heavily relying on initial conditions, lacking an effective mechanism to dynamically refine predictions based on subsequent observations (Chen et al., 2024; Kidger et al., 2020). Thus, the question is: how to enhance accuracy and generalization for long-term dynamics forecasting with noisy, irregular data? + +In this work, we propose Phy-SSM, a generalizable method that incorporates partially known physics into deep statespace models (SSMs), as shown in Fig. 1. Our motivation is that deep SSMs (Gu et al., 2021; Smith et al.; Gu & Dao, 2023) can not only effectively capture long-range dependen + +![](images/38e932ac298510d1b9032464334b81f547e15c7aae161b8b57d217e0dd4a755e.jpg) +(a) Overall architecture of Phy-SSM +(b) Architecture of Phy-SSM unit +Figure 1. (a) The overall architecture of Phy-SSM, consisting of three components: a sequential encoder, Phy-SSM Unit, and a decoder. (b) Detailed architecture of Phy-SSM unit. + +cies in sequential data but also model continuous dynamical systems. However, developing Phy-SSM involves addressing two main challenges: (i) seamlessly integrating partial physics knowledge into the model architecture, and (ii) facilitating long-term predictions in the presence of noisy and irregularly sampled data. To tackle the first challenge, we develop a novel Phy-SSM unit that decomposes partially known dynamics into known and unknown state matrices, as shown in Fig. 1(b). This decomposition represents a significant advancement compared to existing deep SSMs (Gu & Dao, 2023; Gu et al., 2022). For the second challenge, we introduce a physics state regularization term to further constrain the estimated latent states by the encoder to comply with the system dynamics. Furthermore, we provide a theoretical analysis of the uniqueness of solutions for modeling partially known dynamical systems. Finally, we evaluate the proposed Phy-SSM on three real-world applications: vehicle motion prediction, drone state prediction, and COVID-19 epidemiology forecasting. The results demonstrate that our method significantly outperforms baseline methods for long-term interpolation and extrapolation tasks. These findings highlight the effectiveness of incorporating partial physical knowledge into deep SSMs for improving predictive generalization in complex, real-world scenarios. + +Our contributions are four-fold: 1) We propose Phy-SSM, a novel approach that integrates partially known physics into state-space models to improve generalization for long-term forecasting in complex environments; 2) To enhance long-term prediction accuracy, we introduce a physics state regularization term that constrains latent states to align with system dynamics; 3) We offer a theoretical analysis of uniqueness of solutions for our method; and 4) Extensive experiments on three real-world applications demonstrate + +that Phy-SSM significantly outperforms baseline methods in long-term dynamics forecasting. + +# 2. Related Work + +Physics-Enhanced Machine Learning (PEML). Depending on how underlying physics knowledge is incorporated into models, PEML (Faroughi et al., 2022; O'Driscoll et al., 2019; Cicirello, 2024) can be classified into two main types: + +(i) Physics-Informed Loss Function. This method incorporates physical laws into the loss function as a soft constraint, ensuring that ML models remain consistent with the laws of physics (Baydin et al., 2018; Chen et al., 2020; Wang et al., 2023; Raissi et al., 2020; Yu et al., 2022; Raissi et al., 2019). A typical line of this method is PINN (Lu et al., 2021; Raissi et al., 2019) that integrates differential equations into the loss. However, such methods often struggle to extrapolate beyond the training distribution (Bonfanti et al., 2024; Kim et al., 2021), since they are trained to conform to the solutions within a pre-specified domain. +(ii) Physics-Informed Architecture Design. This approach tries to embed physical principles into the design of ML architectures to enhance model generalization. Some works focused on neural ordinary differential equations (NODEs) (Chen et al., 2018) that adopted deep neural networks (DNNs) to parameterize underlying ODEs. For instance, a recent study developed ContiFormer (Chen et al., 2024) that combines Transformer with NODEs to model continuous-time dynamics on irregular time series. This method, however, is very computationally expensive and may struggle to extract generalized physical representations for long-term predictions. Other studies designed + +ML to model energy-conserving systems by complying with Hamiltonian mechanics (Greydanus et al., 2019; Bacsa et al., 2023; Zhong et al.) or Lagrangian mechanics (Cranmer et al., 2020; Lutter et al., 2018). While these methods improve model generalization ability due to their embedded physics inductive bias, their reliance on specific physics knowledge limits their broader applicability as a general-purpose approach. + +In summary, these existing methods did not consider real-world dynamical systems where obtaining complete physics knowledge is often infeasible (Linial et al., 2021). + +Partially Known Physics-Based ML. Some works have focused on partially known physics-based machine learning (ML). For instance, SINDy Autoencoders (Champion et al., 2019) identified physical laws directly from data by optimizing a linear combination of predefined functions. Phytaylor (Mao et al., 2023) integrated system dynamics into its architecture design. However, these approaches rely on finite difference techniques to estimate derivatives, making them only applicable to noise-free and regular data (Champion et al., 2019; Yin et al., 2021). + +Recently, few studies (Yin et al., 2021; Linial et al., 2021; Wehenkel et al., 2023; Takeishi & Kalousis, 2021) have explored partially known physics-enhanced machine learning that use physics-based NODEs to model underlying dynamics. While these methods have proven effective for continuous-time modeling, their reliance on NODEs presents challenges in accurately capturing nonlinear and time-variant systems over long time horizons. This limitation arises from NODEs' heavy reliance on initial conditions, which hinders their ability to capture subsequent long-term sequence correlations. Additionally, these methods are only employed to regular data rather than irregular data in the experiments. + +Different from prior work, we propose a generalizable model that leverages partial physics knowledge to enhance the generalization of long-term dynamics forecasting with noisy, irregular data. + +# 3. Preliminaries + +Notations. The detailed descriptions of important notations are presented in Table 6 in Appendix B. + +# 3.1. Problem Statement + +We first review the background of dynamical systems and then describe our research problem. + +Background. Given a set of observations $\pmb{x}(t)$ from a dynamic system. We assume that the observed trajectory is governed by the underlying system dynamics $\pmb{z}$ through a + +fixed emission function $g$ .. + +$$ +\boldsymbol {x} (t) = \boldsymbol {g} (\boldsymbol {z} (t)), \tag {1} +$$ + +where $\boldsymbol{x} : [0, T] \to \mathcal{X} \subseteq \mathbb{R}^{d_x}$ and $\boldsymbol{z} : [0, T] \to \mathcal{Z} \subseteq \mathbb{R}^{d_z}$ represent the observations and full system states, respectively. In practice, the system states $z(t)$ are hardly observable, governed by the underlying system dynamics below: + +$$ +\frac {\mathrm {d} \boldsymbol {z} (t)}{\mathrm {d} t} = \boldsymbol {f} (\boldsymbol {z} (t), \boldsymbol {u} (t)), \tag {2} +$$ + +where $\pmb{u}(t)$ represents the control input that influences the system, and $\pmb{f}$ denotes a governing equation of system dynamics, which is often partially known. + +Our Problem. The goal of this work is to predict the long-term trajectories of a dynamical system in complex environments where data are noisy and irregularly sampled. Specifically, the inputs include the observational sequence $\left[\pmb{x}\left(t_{0}\right),\pmb{x}\left(t_{1}\right),\dots ,\pmb{x}\left(t_{n}\right)\right]$ with $n + 1$ data points, where $0 = t_0 < t_1 < \dots < t_n = T$ , and the control input sequence $\left[\pmb{u}\left(t_0\right),\dots ,\pmb{u}\left(t_n\right),\dots ,\pmb{u}\left(t_{n + l}\right)\right]$ , where $l$ is the length of the prediction window. + +Our tasks will involve: i) Interpolation: Predict the sequence $[\bar{\pmb{x}}(t_0), \bar{\pmb{x}}(t_1), \dots, \bar{\pmb{x}}(t_n)]$ using the learned dynamics. Here, $\bar{\pmb{x}}(t_i)$ is the predicted observation at $t_i$ , obtained using our method. ii) Extrapolation: Forecast the future trajectories $\bar{\pmb{x}}(t)$ for $t \in (t_n, t_{n+l}]$ . + +# 3.2. Structured State Space Model + +We introduce the foundation of Structured State Space Models (S4) (Gu et al., 2021), which serves as the core component of the proposed Phy-SSM. S4 is an emerging neural architecture built on classical state space models (SSMs) from control theory, designed to capture long-range dependencies in sequential data. To better understand S4, we first review the basic knowledge of classical SSMs as follows: + +$$ +\dot {\boldsymbol {z}} (t) = \boldsymbol {A} \boldsymbol {z} (t) + \boldsymbol {B} \boldsymbol {u} (t), +$$ + +$$ +\boldsymbol {y} (t) = \boldsymbol {C} \boldsymbol {z} (t) + \boldsymbol {D} \boldsymbol {u} (t), \tag {3} +$$ + +where $\mathbf{A} \in \mathbb{R}^{n \times n}$ , $\mathbf{B} \in \mathbb{R}^{n \times m}$ , $\mathbf{C} \in \mathbb{R}^{p \times n}$ , and $\mathbf{D} \in \mathbb{R}^{p \times m}$ are the state, input, output, and feedthrough matrices, respectively. In addition, $\mathbf{u}(t) \in \mathbb{R}^m$ represents the input signal, $\mathbf{z}(t) \in \mathbb{R}^n$ denotes the state variables, and $\mathbf{y}(t) \in \mathbb{R}^p$ represents the outputs. Note that $D\mathbf{u}(t) = \mathbf{0}$ , as $D\mathbf{u}(t)$ can be interpreted as a skip connection. + +For practical applications involving discrete sequences, the continuous model needs to be discretized. Common discretization methods, such as bilinear transformations (Tustin, 1947), can be employed. By discretizing with a step size $\Delta$ , the system is expressed by the following linear recurrence relations: + +$$ +\boldsymbol {z} _ {n} = \bar {\boldsymbol {A}} \boldsymbol {z} _ {n - 1} + \bar {\boldsymbol {B}} \boldsymbol {u} _ {n}, \tag {4} +$$ + +$$ +\boldsymbol {y} _ {n} = \boldsymbol {C} \boldsymbol {z} _ {n}, +$$ + +where $\bar{A}$ , $\bar{B}$ , and $\bar{C}$ are the discrete-time parameters derived from $A$ , $B$ , and $C$ with the step size $\Delta$ . These parameters preserve the dynamics of the continuous model in the discretized setting, enabling effective modeling of sequential data. S4 (Gu et al., 2021) extends the use of SSMs for modeling long sequences. In particular, S4 leverages a specialized matrix initialization technique called HiPPO (Gu et al., 2020) to efficiently maintain information from past inputs. Building on S4, multiple variants of deep SSMs such as S5 (Smith et al.) and Mamba (Gu & Dao, 2023) have been proposed in recent years. + +Among these, recent work (Smith et al.) introduced a S5 model that employs parallel scans to accelerate training in a recurrent mode. This design allows the model to efficiently handle time-varying SSMs. Its key advantages include: (i) It can capture long-term data dependencies through the HiPPO memory, and (ii) Its continuous-time formulation enables the effective modeling of irregularly sampled data. Inspired by these, we developed a physics-enhanced SSM that incorporates partial physics knowledge for long-term dynamics forecasting in complex environments. + +# 4. Proposed Method + +# 4.1. Framework of Phy-SSM + +As mentioned in Sec. 3.1, our goal is to enhance long-term predictions of dynamical systems when data are noisy and irregularly sampled. To achieve this, we propose a novel Phy-SSM that incorporates partially known physics knowledge into the model design, as shown in Fig. 1. Phy-SSM is composed of three main components: a sequential encoder layer, the Phy-SSM Unit, and a decoder, with the Phy-SSM Unit serving as the core. The key idea behind Phy-SSM is to first employ a sequential encoder to encode the inputs to approximate the posterior distribution of the latent system state. Next, the Phy-SSM Unit jointly takes in the past latent state and control inputs to predict the next latent states. Finally, the latent states generated by the Phy-SSM Unit are fed into the decoder to produce the final output. Below, we elaborate on each component in the proposed framework. + +Encoder for Posterior Probability Estimation. We first adopt a sequential encoder $\varphi$ to estimate the posterior distribution of the latent system states $z(t)$ based on observations $\pmb{x}(t)$ . The sequential encoder is a simplified structured SSM that can handle irregular data while introducing a memory variable $h(t)$ to capture long sequence correlations. Specifically, the approximate posterior $z(t_{i})$ at each time step depends not only on $\pmb{x}(t_{i})$ but also on the memory from the previous time step, $h(t_{i-1})$ . Mathematically, we have + +$$ +\left. \boldsymbol {z} \left(t _ {i}\right) \mid \boldsymbol {x} \left(t _ {i}\right) \sim \mathcal {N} \left(\hat {\mu} _ {z} \left(t _ {i}\right), \operatorname {d i a g} \left(\hat {\sigma} _ {z} ^ {2} \left(t _ {i}\right)\right)\right), \right. \tag {5} +$$ + +where + +$$ +\hat {\boldsymbol {\mu}} _ {z} (t _ {i}), \hat {\boldsymbol {\sigma}} _ {z} (t _ {i}) = \varphi (\boldsymbol {x} (t _ {i}), \boldsymbol {h} (t _ {i - 1})) +$$ + +and $\hat{\mu}_z(t),\hat{\sigma}_z^2 (t)$ respectively represent the mean and variance of the learned posterior distribution. The process is stochastically approximated using the reparameterization trick (Kingma, 2013). + +Next, we need to approximate the posterior distribution $q(\pmb{z}(t_{\leq n}) \mid \pmb{x}(t_{\leq n}))$ based on the above Eq. (5). To reduce computational costs, inspired by prior work (Girin et al., 2020), the posterior distribution can be simplified as + +$$ +q \left(\boldsymbol {z} \left(t _ {\leq n}\right) \mid \boldsymbol {x} \left(t _ {\leq n}\right)\right) \approx \prod_ {i = 0} ^ {n} q \left(\boldsymbol {z} _ {i} \mid \boldsymbol {x} \left(t _ {\leq i}\right)\right). \tag {6} +$$ + +Phy-SSM Unit. The primary role of the Phy-SSM Unit is to enforce known physical laws while simultaneously learning unknown dynamics from sequential data. Assuming that the latent system states conform to certain physical dynamics, the Phy-SSM Unit leverages the latent states and control input from the previous time step as input for generating physics-consistent predictions. However, developing the Phy-SSM unit poses two key challenges: 1) incorporating partial physics knowledge into model design, and 2) accurately modeling the unknown dynamics for long-term predictions. + +To address the first challenge, we enforce known physics knowledge through dynamics decomposition. Specifically, consider the system dynamics in Eq. (2), we decompose it into known and unknown parts as follows: + +$$ +\begin{array}{l} \frac {\mathrm {d} \boldsymbol {z} (t)}{\mathrm {d} t} = \boldsymbol {f} (\boldsymbol {z} (t), \boldsymbol {u} (t)) \tag {7} \\ = \boldsymbol {f} _ {\mathrm {k n w}} (\boldsymbol {z} (t), \boldsymbol {u} (t)) + \boldsymbol {f} _ {\mathrm {u n k}} (\boldsymbol {z} (t), \boldsymbol {u} (t)). \\ \end{array} +$$ + +Inspired by prior work (Brunton et al., 2016), we transform the system dynamics into a linear SSM by extending the state $\mathbf{z}$ to a new state $\bar{\mathbf{z}}$ , which includes $\mathbf{z}$ and can additionally incorporate nonlinear terms or constants. This method can help to represent nonlinear systems in a linear manner. By doing this, it enables us to: (i) use matrix calculation to improve computing efficiency, and (ii) embed knowledge into matrices directly. + +Based on this motivation, we convert the above Eq. (7) into the following linear SSM formula. + +$$ +\begin{array}{l} \frac {\mathrm {d} \bar {z} (t)}{\mathrm {d} t} = \boldsymbol {A} (t) \bar {z} (t) + \boldsymbol {B} (t) \boldsymbol {u} (t) \tag {8} \\ = \left(\boldsymbol {A} _ {\mathrm {k n w}} (t) + \boldsymbol {A} _ {\mathrm {u n k}} (t)\right) \bar {z} (t) + \boldsymbol {B} _ {\mathrm {u n k}} (t) \boldsymbol {u} (t), \\ \end{array} +$$ + +where $\mathbf{A}$ is the state matrix, and $\pmb{B}$ is the input matrix. The extended state is defined as $\bar{z} = [z^{\top},\psi (z)^{\top}]^{\top}\in \mathbb{R}^{d_{\bar{z}}}$ , where $\psi (z)\in \mathbb{R}^{d_{\psi}}$ represents additional extended terms. Here, $A_{\mathrm{knw}}\in \mathbb{R}^{d_{\bar{z}}\times d_{\bar{z}}}$ , $A_{\mathrm{unk}}\in \mathbb{R}^{d_{\bar{z}}\times d_{\bar{z}}}$ , and $B_{\mathrm{unk}}\in \mathbb{R}^{d_{\bar{z}}\times d_u}$ . Specifically, $A_{\mathrm{knw}}(t)\bar{z} (t)$ denotes the known physical dynamics, while $A_{\mathrm{unk}}(t)\bar{z} (t)$ represents the unknown system dynamics. $B_{\mathrm{unk}}(t)\pmb {u}(t)$ models the influence of control inputs. In Eq. (8), we omit $B_{\mathrm{knw}}$ since the influence + +of control inputs is often unknown; otherwise, it can be treated in the similar way as $A_{\mathrm{knw}}$ . After decomposition, it becomes straightforward to enforce explicit physical knowledge into the model. A detailed example of illustrating this transformation process is provided in Sec. 4.3. + +To address the second challenge, inspired by the powerful HiPPO memory mechanism (Gu et al., 2020), we utilize multi-layer structured SSMs to model continuous unknown dynamics. The structured SSMs enable the Phy-SSM unit to memorize long-term historical patterns and accurately estimate unknown dynamics. + +Based on the above ideas, we present the detailed structure of the Phy-SSM Unit, as illustrated in Fig. 1(b). Specifically, the Phy-SSM Unit involves the following three key steps for physics-based latent state prediction. + +1) Learning unknown continuous functions $\tilde{A}_{\mathrm{unk}}(t)$ and $\tilde{B}_{\mathrm{unk}}(t)$ using structured SSMs. Multi-layer structured SSMs take $z$ and $\pmb{u}$ as input to approximate the unknown continuous functions $A_{\mathrm{unk}}(t,\bar{z},\pmb {u};\pmb {\theta}_A)$ and $B_{\mathrm{unk}}(t,\bar{z},\pmb {u};\pmb{\theta}_B)$ . The outputs of the structured SSMs are passed through a fully connected layer and reshaped into $\mathbb{R}^{d_{\bar{z}}\times d_{\bar{z}}}$ . + +2) Knowledge mask to encode physics as hard constraints. To constrain the model to learn only unknown terms, we implement a simple yet effective knowledge mask mechanism. Specifically, we introduce a binary knowledge mask $M \in \{0,1\}^{d_z \times d_z}$ that is applied via the Hadamard product to the learned unknown terms. The positions with a value of 1 in the mask indicate that the corresponding dynamic item is permitted to be updated, while positions with a value of 0 block the influence of the item. The learned unknown dynamics are then refined as follows: + +$$ +\boldsymbol {A} _ {\mathrm {u n k}} (t) = \boldsymbol {M} _ {A} \odot \tilde {\boldsymbol {A}} _ {\mathrm {u n k}} (t), \tag {9} +$$ + +$$ +\boldsymbol {B} _ {\mathrm {u n k}} (t) = \boldsymbol {M} _ {B} \odot \boldsymbol {B} _ {\mathrm {u n k}} (t). +$$ + +For detailed knowledge mask design for different dynamical systems, we provide a guideline in Appendix I. + +3) Discretizing continuous dynamics to compute the next latent state. After obtaining $A_{\mathrm{knw}}(t)$ and $A_{\mathrm{unk}}(t)$ , we can compute the full system dynamics matrix $A$ in Eq. (8). To discretize the continuous-time model for generating latent states, we use the bilinear method (Tustin, 1947), which converts the continuous state matrix $A$ into its discrete approximation $\bar{A}$ . Notably, our model retains the continuous parameter $A$ , enabling it to handle irregularly sampled data. After discretization, the Phy-SSM unit generates the next time-step output: + +$$ +\bar {z} \left(t _ {i + 1}\right) = \bar {\boldsymbol {A}} \left(t _ {i}\right) \bar {z} \left(t _ {i}\right) + \bar {\boldsymbol {B}} \left(t _ {i}\right) \boldsymbol {u} \left(t _ {i}\right). \tag {10} +$$ + +Prior Physics State Prediction for Decoder. Unlike a standard VAE, where latent variables typically follow a + +standard Gaussian distribution, we directly embed physics knowledge into a latent space. Consequently, the prior probability of the latent $z(t)$ is defined as: + +$$ +\boldsymbol {z} (t _ {i}) \sim \mathcal {N} \left(\boldsymbol {\mu} _ {z} (t _ {i}), \operatorname {d i a g} \left(\boldsymbol {\sigma} _ {z} ^ {2} (t _ {i})\right)\right), +$$ + +where $\mu_z(t_i)$ and $\sigma_z^2 (t_i)$ represent the mean and variance of the physics-based prior distribution. To respect the physical dynamics, we use the Phy-SSM Unit to generate $\mu_z(t_i)$ and $\sigma_z^2 (t_i)$ . Specifically, the outputs of the Phy-SSM unit are passed through a linear map to compute $\mu_z(t_i)$ and $\sigma_z^2 (t_i)$ . + +During the interpolation stage, the continuous Phy-SSM unit dynamically refines its predictions using the posterior from the preceding time step within the observation window. This approach effectively reduces prediction error stemming from potentially inaccurate initial conditions. During the extrapolation stage, Phy-SSM leverages accurate initial conditions and well-learned physics to perform predictions through autoregression. Once the full trajectory of physics latent states is obtained, according to (Girin et al., 2020), the decoder maps these latent states to the output, yielding + +$$ +p \left(\boldsymbol {x} \left(t _ {\leq n}\right), \boldsymbol {z} \left(t _ {\leq n}\right)\right) = \prod_ {i = 0} ^ {n} p \left(\boldsymbol {x} \left(t _ {i}\right) \mid \boldsymbol {z} \left(t _ {i}\right)\right) p \left(\boldsymbol {z} \left(t _ {i}\right) \mid \boldsymbol {z} \left(t _ {i - 1}\right)\right). \tag {11} +$$ + +Overall Objective. The objective function comprises the negative time step-wise variational lower bound (Chung et al., 2015) and the physics state regularization term below: + +$$ +\mathcal {L} = \mathcal {L} _ {\mathrm {V A E}} + \lambda \mathcal {L} _ {\mathrm {r e g}}, \tag {12} +$$ + +where + +$$ +\mathcal {L} _ {\mathrm {V A E}} = - \sum_ {i = 0} ^ {n} \mathbb {E} _ {q (\boldsymbol {z} (t _ {\le i}) | \boldsymbol {x} (t _ {\le i}))} [ \mathcal {L} _ {\mathrm {r e c o n}} ^ {(i)} - \beta \mathcal {L} _ {\mathrm {K L}} ^ {(i)} ], +$$ + +$$ +\mathcal {L} _ {\text {r e c o n}} ^ {(i)} = \log p (\boldsymbol {x} (t _ {i}) \mid \boldsymbol {z} (t _ {i})), +$$ + +$$ +\mathcal {L} _ {\mathrm {K L}} ^ {(i)} = \mathrm {K L} \left(q (\boldsymbol {z} (t _ {i}) \mid \boldsymbol {x} (t _ {\leq i})) \parallel p (\boldsymbol {z} (t _ {i}) \mid \boldsymbol {z} (t _ {i - 1})))\right), +$$ + +$$ +\mathcal {L} _ {\mathrm {r e g}} = \frac {1}{n + 1} \sum_ {i = 0} ^ {n} \| z (t _ {i}) - z ^ {*} (t _ {i}) \| _ {2} ^ {2}. +$$ + +Here, the first term $\mathcal{L}_{\mathrm{recon}}$ in $\mathcal{L}_{\mathrm{VAE}}$ represents the reconstruction loss, capturing how well the model reconstructs the observations. The second term, $\mathcal{L}_{\mathrm{KL}}$ quantifies the Kullback-Leibler (KL) divergence between the prior and posterior distributions of the latent states. $\mathcal{L}_{\mathrm{reg}}$ represents regularization term. $z(t_{i})$ and $z^{*}(t_{i})$ are latent states sampled from the prior and posterior distributions, respectively. The hyperparameters $\beta$ and $\lambda$ control the trade-off among the reconstruction loss, KL divergence, and regularization terms in the loss function. + +Note that the physics state regularization term $\mathcal{L}_{\mathrm{reg}}$ serves two purposes. First, it constrains the output of the sequential encoder to adhere to the physical dynamics. Second, it facilitates the Phy-SSM unit learn more accurate unknown + +dynamics that align with the entire trajectory, improving performance in extrapolation tasks. In practice, this term is implemented as a Euclidean distance penalty between the sample $z(t_{i})$ from the prior distribution and the sample $z^{*}(t_{i})$ from the posterior distribution. The choice of Euclidean distance as the regularization metric is based on empirical evaluation. Detailed comparisons with alternative metrics are provided in Appendix J. The effectiveness of this regularization term is validated through following experimental results and ablation studies. + +# 4.2. Theoretical Analysis for Dynamics Decomposition + +We further offer a theoretical analysis of the proposed dynamics decomposition, illustrating the uniqueness of the solutions during model learning. Given a dynamical system with partially known terms and parameters, we have the following proposition. + +Proposition 1 (Uniqueness). For a dynamical system in the form of Eq. (7), if it can be reformulated as Eq. (8), the decomposition in Eq. (7) that minimizes Eq. (12) is unique. + +The key insight is that $A_{\mathrm{knw}}$ and $A_{\mathrm{unk}}$ have disjoint support; i.e., no overlapping entry is used by both matrices, ensuring they do not interfere with each other during training. Detailed proofs are provided in Appendix C. + +# 4.3. A Walk-Through Example + +In this section, we present an illustrative example of a video pendulum to aid in understanding the main pipeline of the Phy-SSM unit. Consider a series of videos where the underlying physics corresponds to a pendulum with unknown friction. The dynamics of the pendulum are governed by the following differential equations: + +$$ +\begin{array}{l} \frac {\mathrm {d} \theta (t)}{\mathrm {d} t} = \omega (t), \\ \frac {\mathrm {d} \omega (t)}{\mathrm {d} t} = - \underbrace {\frac {g}{l}} _ {\text {u n k n o w n}} \sin \theta (t) \underbrace {- \frac {b}{m} \omega (t)} _ {\text {u n k n o w n}}, \tag {13} \\ \end{array} +$$ + +where $\theta(t)$ represents the angular displacement of the pendulum, $\omega(t)$ denotes its angular velocity, $g$ is the gravitational acceleration, $l$ is the length of the pendulum, $b$ represents the damping coefficient, and $m$ is the mass. + +In real-world applications, it is difficult to obtain the complete system dynamics. However, it is not very hard to obtain part of system dynamics based on domain knowledge. In this example, the pendulum length $l$ and the damping force caused by friction, $\frac{b}{m}\omega(t)$ , are unknown. For simplification, the control input to the system is omitted. The unknown impact of the control input $B_{\mathrm{unk}}$ can be handled in the same manner as $A_{\mathrm{unk}}$ . A full system description, including $B_{\mathrm{unk}}$ , is provided in Appendix D.2.4, and the + +corresponding experimental results are presented in Appendix F. + +Based on the partially known system dynamics, we can perform state augmentation by extending the nonlinear state terms, such that $s(t) = \sin(\theta(t))$ and $c(t) = \cos(\theta(t))$ . Thus, the above Eq. (13) can be rewritten as the following state-space model: + +$$ +\frac {\mathrm {d}}{\mathrm {d} t} \left[ \begin{array}{l} \theta (t) \\ \omega (t) \\ s (t) \\ c (t) \end{array} \right] = \left[ \begin{array}{c c c c} 0 & 1 & 0 & 0 \\ 0 & - \frac {b}{m} & - \frac {g}{l} & 0 \\ 0 & 0 & 0 & \omega (t) \\ 0 & 0 & - \omega (t) & 0 \end{array} \right] \left[ \begin{array}{l} \theta (t) \\ \omega (t) \\ s (t) \\ c (t) \end{array} \right], \tag {14} +$$ + +where $-\frac{b}{m}$ is the unknown term, and $l$ represents the unknown parameter for the pendulum length. + +Then, $A_{\mathrm{knw}}(t)$ and $A_{\mathrm{unk}}(t)$ are denoted by: + +$$ +\begin{array}{l} \boldsymbol {A} _ {\mathrm {k n w}} (t) = \left[ \begin{array}{c c c c} 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \omega (t) \\ 0 & 0 & - \omega (t) & 0 \end{array} \right], \\ \boldsymbol {A} _ {\mathrm {u n k}} (t) = \left[ \begin{array}{c c c c} 0 & 0 & 0 & 0 \\ * & * & * & * \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array} \right], \\ \end{array} +$$ + +where the first, third, and fourth rows of $A_{\mathrm{unk}}(t)$ are trivial and thus set to zero. The second row contains $(*)$ , which represents unknown parameters or terms dependent on the state and control inputs. + +Next, we introduce the three steps of the Phy-SSM Unit for physics state prediction in our pendulum example: + +1) Learning unknown continuous functions $\tilde{A}_{\mathrm{unk}}(t)$ using structured SSMs. For the pendulum case, the output of the structured SSMs is a $4\times 4$ matrix $\tilde{A}_{\mathrm{unk}}(t)$ containing unknown elements $(*)$ , similar to $A_{\mathrm{unk}}$ . +2) Knowledge mask to encode physics as hard constraints. In this step, we apply a knowledge mask through the Hadamard product with the learned unknown dynamics to encode physics as hard constraints. In our pendulum example, the knowledge mask is defined as + +$$ +\begin{array}{l} \boldsymbol {A} _ {\mathrm {u n k}} (t) = \boldsymbol {M} _ {A} \odot \tilde {\boldsymbol {A}} _ {\mathrm {u n k}} (t), \\ \text {w h e r e} M _ {A} = \left[ \begin{array}{l l l l} 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array} \right]. \tag {15} \\ \end{array} +$$ + +3) Discretizing the continuous dynamics to generate the next latent state. After the second step, we obtain the continuous matrices $\mathbf{A}_{\mathrm{knew}}(t)$ and $\mathbf{A}_{\mathrm{unk}}(t)$ , which are combined to compute the full dynamics matrix $\mathbf{A}$ . Next, we apply the bilinear method to convert $\mathbf{A}$ in Eq. (8) into its discrete approximation $\bar{\mathbf{A}}$ , enabling the next time-step prediction as described in Eq. (10). + +Table 1. Performance comparison of different methods in terms of interpolation and extrapolation using drone dataset. The data is high-frequency and irregularly sampled, recorded at nearly ${1010}\mathrm{\;{Hz}}$ (minimum: ${573.05}\mathrm{\;{Hz}}$ ,maximum: ${1915.86}\mathrm{\;{Hz}}$ ). The results are averaged over three random seeds. The lower is the better. + +
MethodInterpolation TaskExtrapolation Task
MAE ↓ (×10-1)MSE ↓ (×10-1)MAE ↓ (×10-1)MSE ↓ (×10-1)
Latent ODE (RNN Enc.)3.180±0.0692.584±0.1173.610±0.0413.425±0.146
Latent ODE (ODE-RNN Enc.)3.304±0.0662.779±0.1424.437±0.2125.551±0.421
ContiFormer1.446±0.1280.374±0.0484.059±0.0245.092±0.138
S51.059±0.1220.309±0.0768.426±1.35117.333±4.854
GOKU3.293±0.3372.738±0.5903.456±0.2893.130±0.578
PI-VAE3.061±0.0362.371±0.0763.627±0.0473.589±0.071
SDVAE3.701±0.1033.542±0.2113.808±0.0983.921±0.199
ODE2VAE3.412±0.0122.942±0.0243.461±0.0123.115±0.020
Ours1.002±0.0340.222±0.0202.733±0.0591.798±0.079
+ +Table 2. Performance comparison of different methods in terms of interpolation and extrapolation using Covid-19 dataset. The data contains ${10}\%$ missing daily records. The results are averaged over three random seeds. The lower is the better. + +
MethodInterpolation TaskExtrapolation Task
MAE ↓ (×10-1)MSE ↓ (×10-2)MAE ↓ (×10-1)MSE ↓ (×10-1)
Latent ODE (RNN Enc.)1.148±0.0472.642±0.2056.605±0.1758.370±0.616
Latent ODE (ODE-RNN Enc.)0.991±0.0971.983±0.4106.846±0.2959.304±1.322
ContiFormer0.830±0.1561.059±0.3906.882±0.1589.147±0.337
S50.861±0.1511.057±0.3255.212±0.5544.560±0.717
GOKU1.019±0.1381.667±0.1576.140±0.6517.918±0.653
PI-VAE1.186±0.3532.454±1.1866.292±1.2638.775±2.203
SDVAE2.290±0.2127.908±1.5946.811±0.2069.584±0.473
ODE2VAE1.391±0.2034.008±0.7627.420±0.7248.051±1.680
Ours0.795±0.2081.032±0.5381.998±0.7530.692±0.486
+ +# 5. Experiments + +We first conduct extensive experiments to evaluate the performance of Phy-SSM using three real-world applications. Then, we conduct ablation studies to explore the impact of key components on model performance. The experimental settings and system dynamics are detailed in Appendix D. + +Real-World Datasets. We evaluate the performance of the proposed method on three real-world applications with irregularly sampled data: drone state prediction (Eschmann et al., 2024), COVID-19 epidemiology forecasting (Takaya & Team, 2020), and vehicle motion prediction (Caesar et al., 2020). In particular, we will assess our method in long-term extrapolation tasks ranging from 60 to 200 timesteps. The detailed descriptions of these real-world datasets are presented in Appendix E. + +Baseline Methods. For drone and COVID-19 modeling tasks, we compare our approach against state-of-the-art (SOTA) methods in continuous-time modeling and physics-enhanced machine learning. Continuous-Time Models: 1) Latent ODE (RNN Encoder) (Chen et al., 2018), 2) Latent ODE (ODE-RNN Encoder) (Rubanova et al., 2019), 3) Contformer (Chen et al., 2024), 4) Simplified Structured State Space Model (S5) (Smith et al.). Physics-Enhanced Machine Learning Methods: 1) GOKU (Linial et al., 2021), 2) Physics-Integrated VAE (Takeishi & Kalousis, 2021), + +3) Symplectic DVAE (Bacsa et al., 2023), 4) ODE2VAE (Yildiz et al., 2019) + +For vehicle motion prediction, in addition to the above physics-enhanced baselines, we include three additional SOTA data-driven methods specifically designed for this task: 1) Wayformer (Nayakanti et al., 2023), 2) AutoBot (Girgis et al., 2022), and 3) G2LTraj (Zhang et al., 2024). + +# 5.1. Evaluation on Drone State Prediction + +We first evaluate the performance of our method on the state prediction for a quadrotor drone, a nonlinear system exhibiting complex oscillatory trajectories. Mean Absolute Error (MAE) and Mean Squared Error (MSE) metrics are used to assess interpolation and extrapolation results. + +As shown Table 1, our method achieves the best performance in both interpolation and extrapolation tasks. For interpolation, this improvement is attributed to our method's ability to capture sequence correlations by adjusting trajectories based on posterior estimation. For extrapolation, our Phy-SSM unit effectively learns generalizable physical dynamics from historical information using memory mechanisms, enabling precise predictions. Conversely, data-driven continuous-time models perform relatively poorly on extrapolation tasks, as they struggle to extract physics-consistent + +Table 3. Performance comparison between our method and the baselines for In-Domain task using nuScenes dataset. All methods are evaluated at $5\%$ missing agent observations. The results are averaged over three random seeds. The best result is highlighted in bold black and the second best is highlighted in green. + +
MethodExtrapolation (In domain) Task
ADE ↓FDE ↓Speed Error ↓Acceleration Error ↓ (×10^1)Jerk Error ↓ (×10^2)
Wayformer1.899±0.1144.954±0.08631.396±3.76357.080±5.69136.783±1.650
AutoBot2.474±0.9546.322±1.6582.291±0.9852.432±0.6102.346e±0.536
G2LTraj2.425±0.5535.847±1.4431.678±0.1602.234±0.0532.178±0.081
GOKU2.822±0.8166.394±0.8411.772±0.5392.439±0.0191.888±0.002
PIVAE2.811±0.4646.463±0.5381.757±0.4652.460±0.0181.889±0.007
SDVAE2.129±0.0555.706±0.2201.589±0.0612.390±0.0421.904±0.031
ODE2VAE3.318±0.2696.988±0.1272.254±0.0832.414±0.0241.889±0.001
Ours1.884±0.0645.100±0.1601.336±0.0732.399±0.0321.884±0.001
+ +Table 4. Performance comparison of different methods for Out-of-Domain task using nuScenes dataset. All methods are evaluated at $5\%$ missing agent observations. The results are averaged over three random seeds. The best result is highlighted in bold black and the second best is highlighted in green. + +
MethodExtrapolation (Out-of-domain) Task
ADE ↓FDE ↓Speed Error ↓Acceleration Error ↓ (×101)Jerk Error ↓ (×102)
Wayformer8.842±0.9798.810±0.18046.233±17.91476.267±30.86744.729±26.141
AutoBot11.366±5.08311.683±4.3353.780±1.8133.366±2.4842.716±1.366
G2LTraj10.755±2.07412.471±2.87125.286±4.76050.890±8.2359.190±1.401
GOKU7.691±1.1148.872±1.4742.788±0.9952.063±0.0671.550±0.007
PIVAE7.569±0.5048.519±0.4662.381±0.2542.081±0.0291.552±0.003
SDVAE7.050±0.5438.235±0.8352.689±0.8382.065±0.0341.549±0.003
ODE2VAE8.411±0.2269.694±0.5823.222±0.8232.075±0.0281.550±0.003
Ours6.206±0.2297.197±0.3052.398±0.5322.043±0.0781.548±0.007
+ +![](images/fd98d0beb70e1f798842a47b78b73ba17ba054039f5d72672a0917e8fbb5ec3a.jpg) +(a) S5 + +![](images/ed8c7c94aca51729e9c4f199eb00735b5452624bb3fe59aa31aa5bdc9fe8e33b.jpg) +(b) GOKU + +![](images/3ac3837a8e795e1906fb23721c2c187553428627c6852a34f495559e74583ceb.jpg) +(c) Ours +Figure 2. Trajectory plots of our method and top two baseline models for drone angular velocity state prediction along the x-axis. The performance is evaluated in both interpolation and extrapolation tasks, including (a) S5, (b) GOKU and (c) Ours. The left of the gray dashed line represents interpolation task (Interp.) while the right represents the extrapolation task (Extra.). + +representations without inductive biases. While physics-enhanced baselines learn physics-consistent representations, their inability to fully utilize subsequent observations hinders their capacity to accurately model complex, oscillatory trajectories. + +As shown in Figure 2, we visualize interpolation and extrapolation results for our method and the top two baselines. + +Additional full trajectory plots for all methods are provided in Appendix G. + +# 5.2. Evaluation on COVID-19 Epidemiology Modeling + +For the COVID-19 prediction task, we also use MAE and MSE as metrics to assess the performance of our model. The results are presented in Table 2. It can be observed + +Table 5. Ablation studies using the drone dataset. Lower values indicate better performance. The results are averaged over three random seeds. The best result is highlighted in bold black and the second best is highlighted in green. + +
Phy-SSM unitRegularizationInterpolation TaskExtrapolation Task
MAE↓ (×10-1)MSE↓ (×10-2)MAE↓ (×10-1)MSE↓ (×10-1)
××1.059±0.1223.091±0.7648.426±1.35117.333±4.854
×0.927±0.0571.860±0.1553.008±0.0532.176±0.079
Ours including both1.002±0.0342.228±0.2032.733±0.0591.798±0.079
+ +that our approach achieves the best performance in both interpolation and extrapolation tasks. The baselines do not perform well because they lack an effective mechanism to dynamically refine predicted trajectories for time-varying dynamical systems. In real-world epidemiology, some external factors such as temperature may influence the underlying dynamics of COVID-19 over time. In contrast, our method can dynamically refine predictions based on subsequent observations and learn more accurate time-varying dynamics. Besides, we present the trajectory plots for our method and the baselines in Appendix G. + +# 5.3. Evaluation on Vehicle Motion Prediction + +In motion prediction task, we follow standard settings and evaluate performance using Average Displacement Error (ADE), Final Displacement Error (FDE), Speed Acceleration Error, and Jerk Error (Feng et al., 2025; Xu et al., 2023). Here, ADE and FDE measure the accuracy of the predicted positions, while Speed, Acceleration and Jerk Error evaluate the physical plausibility of predictions. Detailed metric calculations can be found in Appendix D.2.3. + +For a fair comparison, all state-of-the-art (SOTA) methods predict a single trajectory in this task. Moreover, we categorize the predictions into two scenarios: 1) In-domain extrapolation predictions: Predictions spanning from 0 to 5 seconds, aligning with the temporal window observed during training. 2) Out-of-domain predictions: Predictions spanning from 5 to 6 seconds, exceeding the time range during training and thus evaluating the model's generalization ability to unseen temporal domains. + +The experimental results for these two scenarios are reported in Tables 3 and 4. Our method achieves slightly better performance than the baselines in in-domain tasks. Moreover, it demonstrates significantly better performance in out-of-domain predictions, where SOTA data-driven methods perform poorly. All PEML methods achieve better results than purely data-driven SOTA methods in extrapolation tasks, particularly in physics-related metrics (Speed, Acceleration, and Jerk Error), showcasing the effectiveness of physics-enhanced mechanisms. Among them, our method achieves the best results in ADE and FDE metrics, highlighting its ability to capture sequence correlations effectively. + +In summary, based on the three real-world applications dis + +cussed above, our Phy-SSM demonstrates superior performance in long-term dynamics forecasting. + +# 5.4. Ablation Studies + +Effect of the Phy-SSM Unit. We first study the impact of the Phy-SSM Unit on prediction performance by removing it, transforming the model into a purely data-driven SSM. The results, shown in Table 5, demonstrate that excluding the Phy-SSM Unit significantly degrades extrapolation performance. In contrast, incorporating the Phy-SSM Unit significantly improves extrapolation performance compared to data-driven SSM alone. + +Effect of the Physics State Regularization Term. We also investigate the impact of physics state regularization term on model performance. In our experiment, we remove it in the overall objective in Eq. (12). As shown in Table 5, without it, the resulting model tends to overly learn the latent states from observed trajectories. As a result, the model seems to improve interpolation performance but degrade its extrapolation ability significantly. In contrast, our Phy-SSM can enhance the long-term extrapolation performance since the physics state regularization term can guide the model to learn generalized physical dynamics. + +# 5.5. Sensitivity Analysis + +We also study how the hyperparameters in the loss function in Eq. (12) affect the performance of Phy-SSM in Appendix H. + +# 6. Conclusion + +We proposed a generalizable method, called Phy-SSM, that incorporates partially known physics into state space models for long-term dynamics forecasting in complex environments. Specifically, we developed a novel Phy-SSM unit to improve the learning of more generalized physics representations from observations. Then, a physics state regularization is introduced to further enhance long-term prediction performance. Extensive experiments on three real-world application demonstrated the superiority of the proposed method over baselines in long-term interpolation and extrapolation tasks. + +# Acknowledgments + +Research reported in this paper was sponsored in part by NSF CPS 2311086, NSF CIRC 716152, and Faculty Research Grant at William & Mary 141446. We would also like to thank Yizhuo Chen for helpful discussions on dynamics VAE. + +# Impact Statement + +This paper aims to facilitate the application of machine learning in healthcare, physics, and cyber-physical systems while fostering interdisciplinary development. We believe this work holds significant potential to improve societal wellbeing, enhance the generalization ability of learning-enabled cyber-physical systems, and promote collaboration across diverse fields. We foresee no negative societal implications arising from this research and consider its broader impact to be highly positive. + +# References + +Anderson, R. M. Discussion: the kermack-mckendrick epidemic threshold theorem. Bulletin of mathematical biology, 53(1):1-32, 1991. +Bacsa, K., Lai, Z., Liu, W., Todd, M., and Chatzi, E. Symplectic encoders for physics-constrained variational dynamics inference. Scientific Reports, 13(1):2643, 2023. +Baydin, A. G., Pearlmutter, B. A., Radul, A. A., and Siskind, J. M. Automatic differentiation in machine learning: a survey. Journal of machine learning research, 18(153): 1-43, 2018. +Bonfanti, A., Santana, R., Ellero, M., and Gholami, B. On the generalization of pinns outside the training domain and the hyperparameters influencing it. Neural Computing and Applications, 36(36):22677-22696, 2024. +Brockman, G. Openai gym. arXiv preprint arXiv:1606.01540, 2016. +Brunton, S. L., Proctor, J. L., and Kutz, J. N. Sparse identification of nonlinear dynamics with control (sindyc). IFAC-PapersOnLine, 49(18):710-715, 2016. +Caesar, H., Bankiti, V., Lang, A. H., Vora, S., Liong, V. E., Xu, Q., Krishnan, A., Pan, Y., Baldan, G., and Beijbom, O. nuscenes: A multimodal dataset for autonomous driving. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 11621-11631, 2020. +Champion, K., Lusch, B., Kutz, J. N., and Brunton, S. L. Data-driven discovery of coordinates and governing equations. Proceedings of the National Academy of Sciences, 116(45):22445-22451, 2019. + +Chen, R. T., Rubanova, Y., Bettencourt, J., and Duvenaud, D. K. Neural ordinary differential equations. Advances in neural information processing systems, 31, 2018. +Chen, Y., Lu, L., Karniadakis, G. E., and Dal Negro, L. Physics-informed neural networks for inverse problems in nano-optics and metamaterials. Optics express, 28(8): 11618-11633, 2020. +Chen, Y., Ren, K., Wang, Y., Fang, Y., Sun, W., and Li, D. Contformer: Continuous-time transformer for irregular time series modeling. Advances in Neural Information Processing Systems, 36, 2024. +Chung, J., Kastner, K., Dinh, L., Goel, K., Courville, A. C., and Bengio, Y. A recurrent latent variable model for sequential data. Advances in neural information processing systems, 28, 2015. +Cicirello, A. Physics-enhanced machine learning: a position paper for dynamical systems investigations. arXiv preprint arXiv:2405.05987, 2024. +Cranmer, M., Greydanus, S., Hoyer, S., Battaglia, P., Spergel, D., and Ho, S. Lagrangian neural networks. arXiv preprint arXiv:2003.04630, 2020. +Dabrowski, J. J. and Rahman, A. Sequence-to-sequence imputation of missing sensor data. In AI 2019: Advances in Artificial Intelligence: 32nd Australasian Joint Conference, Adelaide, SA, Australia, December 2-5, 2019, Proceedings 32, pp. 265-276. Springer, 2019. +Eschmann, J., Albani, D., and Loianno, G. Data-driven system identification of quadrotors subject to motor delays. arXiv preprint arXiv:2404.07837, 2024. +Faroughi, S. A., Pawar, N., Fernandes, C., Raissi, M., Das, S., Kalantari, N. K., and Mahjour, S. K. Physics-guided, physics-informed, and physics-encoded neural networks in scientific computing. arXiv preprint arXiv:2211.07377, 2022. +Feng, L., Bahari, M., Amor, K. M. B., Zablocki, É., Cord, M., and Alahi, A. Unitraj: A unified framework for scalable vehicle trajectory prediction. arXiv preprint arXiv:2403.15098, 2024. +Feng, L., Bahari, M., Amor, K. M. B., Zablocki, É., Cord, M., and Alahi, A. Unitraj: A unified framework for scalable vehicle trajectory prediction. In European Conference on Computer Vision, pp. 106-123. Springer, 2025. +Gentine, P., Pritchard, M., Rasp, S., Reinaudi, G., and Yacalis, G. Could machine learning break the convection parameterization deadlock? Geophysical Research Letters, 45(11):5742-5751, 2018. + +Girgis, R., Golemo, F., Codevilla, F., Weiss, M., D'Souza, J. A., Kahou, S. E., Heide, F., and Pal, C. J. Latent variable sequential set transformers for joint multi-agent motion prediction. International Conference on Learning Representations (ICLR), 2022. +Girin, L., Leglaive, S., Bie, X., Diard, J., Hueber, T., and Alameda-Pineda, X. Dynamical variational autoencoders: A comprehensive review. arXiv preprint arXiv:2008.12595, 2020. +Greydanus, S., Dzamba, M., and Yosinski, J. Hamiltonian neural networks. Advances in neural information processing systems, 32, 2019. +Gu, A. and Dao, T. Mamba: Linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752, 2023. +Gu, A., Dao, T., Ermon, S., Rudra, A., and Ré, C. Hippo: Recurrent memory with optimal polynomial projections. Advances in neural information processing systems, 33: 1474-1487, 2020. +Gu, A., Goel, K., and Ré, C. Efficiently modeling long sequences with structured state spaces. arXiv preprint arXiv:2111.00396, 2021. +Gu, A., Goel, K., and Ré, C. Efficiently modeling long sequences with structured state spaces, 2022. URL https://arxiv.org/abs/2111.00396. +Huang, Z., Sun, Y., and Wang, W. Generalizing graph ode for learning complex system dynamics across environments. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 798-809, 2023. +Ionides, E. L., Bretó, C., and King, A. A. Inference for nonlinear dynamical systems. Proceedings of the National Academy of Sciences, 103(49):18438-18443, 2006. +Kaufmann, E., Bauersfeld, L., Loquercio, A., Müller, M., Koltun, V., and Scaramuzza, D. Champion-level drone racing using deep reinforcement learning. Nature, 620 (7976):982-987, 2023. +Kidger, P., Morrill, J., Foster, J., and Lyons, T. Neural controlled differential equations for irregular time series. Advances in Neural Information Processing Systems, 33: 6696-6707, 2020. +Kim, J., Lee, K., Lee, D., Jhin, S. Y., and Park, N. Dpm: A novel training method for physics-informed neural networks in extrapolation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pp. 8146-8154, 2021. + +Kingma, D. P. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. +Kong, J., Pfeiffer, M., Schildbach, G., and Borrelli, F. Kinematic and dynamic vehicle models for autonomous driving control design. In 2015 IEEE intelligent vehicles symposium (IV), pp. 1094-1099. IEEE, 2015. +Li, Q., Peng, Z. M., Feng, L., Liu, Z., Duan, C., Mo, W., and Zhou, B. ScenarioNet: Open-source platform for largescale traffic scenario simulation and modeling. Advances in neural information processing systems, 36, 2024. +Linial, O., Ravid, N., Eytan, D., and Shalit, U. Generative ode modeling with known unknowns. In Proceedings of the Conference on Health, Inference, and Learning, pp. 79-94, 2021. +Lu, L., Pestourie, R., Yao, W., Wang, Z., Verdugo, F., and Johnson, S. G. Physics-informed neural networks with hard constraints for inverse design. SIAM Journal on Scientific Computing, 43(6):B1105-B1132, 2021. +Lu, Y. and Lu, J. A universal approximation theorem of deep neural networks for expressing probability distributions. Advances in neural information processing systems, 33: 3094-3105, 2020. +Lutter, M., Ritter, C., and Peters, J. Deep lagrangian networks: Using physics as model prior for deep learning. In International Conference on Learning Representations, 2018. +Mao, Y., Gu, Y., Sha, L., Shao, H., Wang, Q., and Abdelzaher, T. Phy-taylor: Partially physics-knowledge-enhanced deep neural networks via nn editing. IEEE Transactions on Neural Networks and Learning Systems, 2023. +Nayakanti, N., Al-Rfou, R., Zhou, A., Goel, K., Refaat, K. S., and Sapp, B. Wayformer: Motion forecasting via simple & efficient attention networks. In 2023 IEEE International Conference on Robotics and Automation (ICRA), pp. 2980-2987. IEEE, 2023. +Nicho, J. The sir epidemiology model in predicting herd immunity. Undergraduate Journal of Mathematical Modeling: One+ Two, 2(2):8, 2010. +O'Driscoll, P., Lee, J., and Fu, B. Physics enhanced artificial intelligence. arXiv preprint arXiv:1903.04442, 2019. +Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., et al. Pytorch: An imperative style, high-performance deep learning library. Advances in neural information processing systems, 32, 2019. + +Raissi, M., Perdikaris, P., and Karniadakis, G. E. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational physics, 378:686-707, 2019. +Raissi, M., Yazdani, A., and Karniadakis, G. E. Hidden fluid mechanics: Learning velocity and pressure fields from flow visualizations. Science, 367(6481):1026-1030, 2020. +Rajamani, R. Vehicle dynamics and control. Springer Science & Business Media, 2011. +Rubanova, Y., Chen, R. T., and Duvenaud, D. K. Latent ordinary differential equations for irregularly-sampled time series. Advances in neural information processing systems, 32, 2019. +Smith, J. T., Warrington, A., and Linderman, S. Simplified state space layers for sequence modeling. In The Eleventh International Conference on Learning Representations. +Sohn, K., Lee, H., and Yan, X. Learning structured output representation using deep conditional generative models. Advances in neural information processing systems, 28, 2015. +Takaya, H. and Team, C. D. Covsirphy version [version number]: Python library for Covid-19 analysis with phase-dependent sir-derived ode models, 2020. URL https://github.com/lisphilar/covid19-sir. Accessed: 2025-1-1. +Takeishi, N. and Kalousis, A. Physics-integrated variational autoencoders for robust and interpretable generative modeling. Advances in Neural Information Processing Systems, 34:14809-14821, 2021. +Tustin, A. A method of analysing the behaviour of linear systems in terms of time series. Journal of the Institution of Electrical Engineers-Part IIA: Automatic Regulators and Servo Mechanisms, 94(1):130-142, 1947. +Wang, Y., Xiong, C., Wang, Y., Xu, P., Ju, C., Shi, J., Yang, G., and Chu, J. Temperature state prediction for lithium-ion batteries based on improved physics informed neural networks. Journal of Energy Storage, 73:108863, 2023. +Wehenkel, A., Behrmann, J., Hsu, H., Sapiro, G., Louppe, G., and Jacobsen, J.-H. Robust hybrid learning with expert augmentation. Transactions on Machine Learning Research, 2023. +Xu, D., Chen, Y., Ivanovic, B., and Pavone, M. Bits: Bi-level imitation for traffic simulation. In 2023 IEEE International Conference on Robotics and Automation (ICRA), pp. 2929-2936. IEEE, 2023. + +Yang, T.-Y., Rosca, J., Narasimhan, K., and Ramadge, P. J. Learning physics constrained dynamics using autoencoders. Advances in Neural Information Processing Systems, 35:17157-17172, 2022. +Yildiz, C., Heinonen, M., and Lahdesmaki, H. Ode2vae: Deep generative second order odes with bayesian neural networks. Advances in Neural Information Processing Systems, 32, 2019. +Yin, Y., Le Guen, V., Dona, J., de Bezenac, E., Ayed, I., Thome, N., and Gallinari, P. Augmenting physical models with deep networks for complex dynamics forecasting. Journal of Statistical Mechanics: Theory and Experiment, 2021(12):124012, 2021. +Yu, J., Lu, L., Meng, X., and Karniadakis, G. E. Gradient-enhanced physics-informed neural networks for forward and inverse pde problems. Computer Methods in Applied Mechanics and Engineering, 393:114823, 2022. +Zhang, Z., Hua, Z., Chen, M., Lu, W., Lin, B., Cai, D., and Wang, W. G2lraj: A global-to-local generation approach for trajectory prediction. arXiv preprint arXiv:2404.19330, 2024. +Zhong, Y. D., Dey, B., and Chakraborty, A. Symplectic ode-net: Learning hamiltonian dynamics with control. In International Conference on Learning Representations. + +# A. COVID-19 Visualization Example + +In this section, we compare the performance of three methods on COVID-19 dataset: purely data-driven deep state space models (SSMs) (Smith et al.), the physics-enhanced neural ordinary differential equation (NODE) method (Linial et al., 2021), and our proposed method. The first 160 irregularly recorded days of infectious population data are fed into the model to predict results for the subsequent 0 to 240 time steps. + +As shown in Fig. 3, the physics-enhanced NODE performs relatively well during the first 50 time steps. However, its performance declines significantly in the subsequent predictions due to its heavy dependence on initial conditions, lacking a mechanism to refine predictions using subsequent observations. The purely data-driven state space model can capture input sequence correlations and performs well in interpolation tasks. However, it produces physics-irrational outputs in extrapolation tasks. + +In contrast, our proposed method effectively captures long-term input sequence correlations while integrating partially known physics knowledge to learn more generalized representations. This enables it to excel in long-term dynamical prediction tasks, even under noisy and irregular conditions. + +![](images/66f5d1ee02f2bcf607835b139300399ca0c4e459b6ef80a1ebe3f5bbea889a61.jpg) +(a) Purely data-driven model + +![](images/2f620a844f498d5b65f863bb289dc3f10409eef3b198c6c99b074c09bca80bfb.jpg) +(b) Physics-enhanced NODE + +![](images/13ac6d19ae1cc1af9a4afa55c4bf96ea458cb1e7c51956e7a7ea2c91a99a3342.jpg) +(c) Our Phy-SSM +Figure 3. An illustrative example of predicting infectious COVID-19 population in Spain (Takaya & Team, 2020). Data from 160 irregularly recorded days are used as inputs for models to predict 0 to 240 days of infectious population. (a) Purely data-driven SSMs (Smith et al.) capture sequence correlations effectively and perform well on interpolation tasks but struggle with extrapolation tasks. (b) Physics-enhanced NODE (Linial et al., 2021)) can enhance prediction performance but still suffers from error accumulation for extrapolation tasks. (c) Our method captures long-term sequence correlations and performs well in both interpolation and extrapolation tasks. + +# B. Notations + +In this section, we present the main notations used throughout the paper in the following table. Scalars are represented by lowercase letters (e.g., $x$ ), vectors by boldface lowercase letters (e.g., $x$ ), and matrices by boldface uppercase letters (e.g., $A, B$ ). + +Table 6. Summary of notations + +
NotationDefinition
nnumber of data points
xNoisy observations
Predicted observations
zLatent system state
Extended latent system state
uControl input
hMemory hidden states
ψ(z)Extended system states
fSystem dynamics
fknwKnown system dynamics
funkUnknown system dynamics
gEmission function
φSequential encoder
φDecoder
dxDimension of observations
dzDimension of system states
duDimension of control inputs
X = {x : [0, T] → Rdx}Observed trajectory set
U = {u : [0, T] → Rdu}Control input signal set
FBanach space
f ∈ FSet of all system dynamics functions
ASystem dynamics matrix
System dynamics matrix in discretized form
AknwKnown system dynamics matrix
AunkUnknown system dynamics matrix
BControl input matrix
Control input matrix in discretized form
BunkUnknown control input matrix
MKnowledge mask
Hadamard product
+ +# C. Proofs for Proposition 1 + +In this section, we theoretically analyze the uniqueness of the decomposition of the dynamical system in Eq. (7) by solving the objective function $\min \mathcal{L}$ in Eq. (12). Before that, we make the following assumptions: + +Assumption 1. Based on the universal approximation theorem for probability distributions by neural networks (Lu & Lu, 2020), we assume that the encoder $\varphi(\cdot)$ and decoder $\phi(\cdot)$ , parameterized by neural networks, are well-approximated or that the approximation error is at least bounded. + +Assumption 2. There exists one and only one underlying dynamics $\pmb{f}$ in Eq. (7) that minimizes the loss function $\mathcal{L}$ in Eq. (12) + +Under these assumptions, we provide the detailed proofs for Proposition 1. + +Proofs of Proposition 1. For the dynamical system in Eq. (7), we obtain the following equation (same as Eq.(8)) by extending the original state as + +$$ +\frac {\mathrm {d} \bar {z} (t)}{\mathrm {d} t} = \boldsymbol {A} (t) \bar {z} (t) + \boldsymbol {B} (t) \boldsymbol {u} (t) = (\boldsymbol {A} _ {\mathrm {k n w}} (t) + \boldsymbol {A} _ {\mathrm {u n k}} (t)) \bar {z} (t) + \boldsymbol {B} _ {\mathrm {u n k}} (t) \boldsymbol {u} (t), +$$ + +where $\bar{\pmb{z}} = [z^{\top},\psi (z)^{\top}]^{\top}\in \mathbb{R}^{d_{\bar{z}}}$ is the extended state, and $\psi (z)\in \mathbb{R}^{d_{\psi}}$ denotes the additional extended terms. On the right hand side, $A_{\mathrm{kwn}}(t)$ captures known physical dynamics, whereas $A_{\mathrm{unk}}(t)$ and $B_{\mathrm{unk}}(t)$ models unknown dynamics. + +First, we try to define the element-wise form of the state matrix $A(t)$ . By construction, no entry appears in both $A_{\mathrm{knw}}(t)$ and $A_{\mathrm{unk}}(t)$ simultaneously; in other words, they separate the nonzero entries of $A(t)$ . Formally, for the $i$ -th rows in $A_{\mathrm{knw}}(t)$ and $A_{\mathrm{unk}}(t)$ ( $i \in \{1, \dots, d_{\bar{z}}\}$ ), they can be defined as + +$$ +[ \boldsymbol {A} _ {\mathrm {k n w}} (t) ] _ {i, j} = \left\{ \begin{array}{l l} a _ {i, j} ^ {(\mathrm {k n w})}, & \text {i f} j \in \mathcal {J} _ {\mathrm {k n w}} ^ {(i)}, \\ 0, & \text {i f} j \in \mathcal {J} _ {\mathrm {u n k}} ^ {(i)}, \end{array} \right. [ \boldsymbol {A} _ {\mathrm {u n k}} (t) ] _ {i, j} = \left\{ \begin{array}{l l} 0, & \text {i f} j \in \mathcal {J} _ {\mathrm {k n w}} ^ {(i)}, \\ a _ {i, j} ^ {(\mathrm {u n k})}, & \text {i f} j \in \mathcal {J} _ {\mathrm {u n k}} ^ {(i)}, \end{array} \right. \tag {16} +$$ + +where $\mathcal{J}_{\mathrm{knw}}^{(i)}$ and $\mathcal{J}_{\mathrm{unk}}^{(i)}$ are disjoint index sets for the $i$ -th row: + +$$ +\mathcal {J} _ {\mathrm {k n w}} ^ {(i)} = \left\{j _ {1} ^ {(i)}, j _ {2} ^ {(i)}, \dots , j _ {m} ^ {(i)} \right\}, j _ {k} ^ {(i)} \in \left\{1, \dots , d _ {\bar {z}} \right\}, \quad (k = 1, \dots , m, \text {a n d} m < d _ {\bar {z}}), +$$ + +$$ +\mathcal {J} _ {\mathrm {u n k}} ^ {(i)} = \{1, \dots , d _ {\bar {z}} \} \backslash \mathcal {J} _ {\mathrm {u n k}} ^ {(i)}. +$$ + +As a result, the $i$ -th row of the state matrix $\mathbf{A}(t)$ can be expressed as + +$$ +[ \boldsymbol {A} (t) ] _ {i, j} = \left\{ \begin{array}{l l} a _ {i, j} ^ {(\mathrm {k n w})}, & \text {i f} j \in \mathcal {J} _ {\mathrm {k n w}} ^ {(i)}, \\ a _ {i, j} ^ {(\mathrm {u n k})}, & \text {i f} j \in \mathcal {J} _ {\mathrm {u n k}} ^ {(i)}. \end{array} \right. \tag {17} +$$ + +Then, we try to demonstrate the uniqueness of the decomposition using proof of contradiction. More specifically, suppose that there exist another way to decompose $\mathbf{A}(t)$ into $\hat{\mathbf{A}}_{\mathrm{knw}}(t)$ and $\hat{\mathbf{A}}_{\mathrm{unk}}(t)$ . Similar to Eq. (17), the $i$ -th row of $\mathbf{A}(t)$ can be expressed as + +$$ +[ \boldsymbol {A} (t) ] _ {i, j} = \left\{ \begin{array}{l l} \hat {a} _ {i, j} ^ {(\mathrm {k n w})}, & \text {i f} j \in \mathcal {J} _ {\mathrm {k n w}} ^ {(i)}, \\ \hat {a} _ {i, j} ^ {(\mathrm {u n k})}, & \text {i f} j \in \mathcal {J} _ {\mathrm {u n k}} ^ {(i)}, \end{array} \right. +$$ + +where $\hat{a}_{i,j}^{(\mathrm{knw})}\neq a_{i,j}^{(\mathrm{knw})}$ and $\hat{a}_{i,j}^{(\mathrm{unk})}\neq a_{i,j}^{(\mathrm{unk})}$ are entries in $\hat{A}_{\mathrm{knw}}$ and $\hat{A}_{\mathrm{unk}}$ respectively. According to Assumption 2, there only exists one state matrix $A(t)$ and input matrix $B(t) = B_{\mathrm{unk}}(t)$ that minimizes the loss function $\mathcal{L}$ in Eq. (12). Thus, for each element in the extended state $\bar{z}$ , we can obtain + +$$ +\sum_ {j \in \mathcal {J} _ {\mathrm {k n w}}} \left(a _ {i, j} ^ {(\mathrm {k n w})} (t) - \hat {a} _ {i, j} ^ {(\mathrm {k n w})} (t)\right) \bar {z} _ {j} + \sum_ {j \in \mathcal {J} _ {\mathrm {u n k}}} \left(a _ {i, j} ^ {(\mathrm {u n k})} (t) - \hat {a} _ {i, j} ^ {(\mathrm {u n k})} (t)\right) \bar {z} _ {j} = 0, \quad i = 1, \dots , d _ {\bar {z}}. +$$ + +Since $\hat{a}_{i,j}^{(\mathrm{knw})}\neq a_{i,j}^{(\mathrm{knw})}$ and $\hat{a}_{i,j}^{(\mathrm{unk})}\neq a_{i,j}^{(\mathrm{unk})}$ , the above equation holds only when $\bar{\pmb{z}} (t)\equiv \mathbf{0}$ . This contradicts the fact that $\bar{\pmb{z}}$ represents the extended states, which cannot be zero all the time. Thus, the assumption that there exists two different ways to decompose $\pmb {A}(t)$ yields a contradiction, proving the uniqueness of the solution. + +# D. Detailed Experimental Settings + +We present the detailed experimental settings in this Section. All experiments are conducted on a server equipped with 4 NVIDIA A6000 GPUs, utilizing the PyTorch framework (Paszke et al., 2019). + +# D.1. Hyperparameters for Models + +This subsection provides details about the hyperparameters used for all the models. + +To evaluate the performance of Phy-SSM on the drone state prediction, COVID-19 modeling task, and video pendulum prediction, we compared it with state-of-the-art continuous-time models and physics-enhanced machine learning methods. For the vehicle motion prediction task, in addition to physics-enhanced machine learning baselines, we included three additional state-of-the-art data-driven methods specifically designed for this task. + +The baselines are listed as follows: + +Continuous-Time Models: 1) Latent ODE (RNN Encoder) (Chen et al., 2018), 2) Latent ODE (ODE-RNN Encoder) (Rubanova et al., 2019), 3) Contformer (Chen et al., 2024), 4) Simplified Structured State Space Model (S5) (Smith et al.). + +Physics-Enhanced Machine Learning Methods: 1) GOKU (Linial et al., 2021), 2) Physics-Integrated VAE (Takeishi & Kalousis, 2021), 3) Symplectic DVAE (Bacsa et al., 2023). 4) ODE2VAE (Yildiz et al., 2019) + +Data-driven Vehicle Motion Prediction Models:1) Wayformer (Nayakanti et al., 2023), 2) AutoBot (Girgis et al., 2022), and 3) G2LTraj (Zhang et al., 2024). + +For fair comparisons, we controlled the number of parameters across all models to be equivalent. For all NODE-based baselines, to model the influence of time-varying control inputs on certain tasks, we concatenated the output of an additional control encoder with the NODE solutions to produce the final output, similar to the operation in conditional VAE (Sohn et al., 2015). Furthermore, the Dopri5 method was selected as the ODE solver for all experiments. For Latent ODE (ODE-RNN Encoder), Contiformer, and data-driven vehicle motion prediction models, we used the hyperparameters from their original papers due to their specific architectural designs. + +Below, we list the detailed hyperparameters used for the rest of the models in each experiment: + +# Drone State Prediction: + +- Latent ODE (RNN Encoder): The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 5-layer RNN with 32 hidden states. The decoder is a 4-layer MLP with 200 hidden units per layer. The unknown dynamics are parameterized by a 3-layer MLP with 200 hidden units per layer. The control input encoder is a 2-layer MLP with 200 hidden units per layer. +- S5: The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 5-layer SSM with 128 hidden states. The decoder is a 4-layer MLP with 200 hidden units per layer. The control input encoder is a 2-layer MLP with 200 hidden units per layer. +- GOKU: The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 5-layer RNN with 16 hidden states. The unknown parameters are obtained by a 5-layer bidirectional LSTM with 32 hidden units per layer. The decoder is a 4-layer MLP with 200 hidden units per layer. The unknown dynamics are parameterized by a 3-layer MLP with 200 hidden units per layer. The control input encoder is a 2-layer MLP with 200 hidden units per layer. +- Physics-Integrated VAE: The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 5-layer RNN with 16 hidden states. The unknown parameters are obtained by a 5-layer bidirectional LSTMs with 32 hidden units per layer. The decoder is a 4-layer MLP with 200 hidden units per layer. The unknown dynamics are parameterized by a 3-layer MLP with 200 hidden units per layer. The control input encoder is a 2-layer MLP with 200 hidden units per layer. The regularization loss hyperparameters follow the settings specified in the original paper. +- Symplectic DVAE: The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 5-layer RNN with 128 hidden states. The energy conservation dynamics are parameterized by a 5-layer MLP with 128 hidden units per layer. The decoder is a 4-layer MLP with 200 hidden units per layer. The control input encoder is a 2-layer MLP with 200 hidden units per layer. + +- ODE2VAE: The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 5-layer RNN with 128 hidden states. The latent ODE dimensionality is set to 10. The Bayesian neural network (BNN) comprises two layers with 50 hidden units each. The decoder is a 4-layer MLP with 200 hidden units per layer. The control input encoder is a 2-layer MLP with 200 hidden units per layer. +- Phy-SSM: The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 5-layer SSM with 128 hidden states. The unknown dynamics are parameterized by a 4-layer SSM with 128 hidden units per layer. The decoder is a 4-layer MLP with 200 hidden units per layer. The hyperparameters are set as $\beta = 1$ and $\lambda = 100$ . + +# COVID-19 Modeling: + +- Latent ODE (RNN Encoder): The encoder consists of a 3-layer MLP with 200 hidden units per layer, followed by a 4-layer RNN with 32 hidden states. The decoder is a 2-layer MLP with 200 hidden units per layer. The unknown dynamics are parameterized by a 3-layer MLP with 200 hidden units per layer. +- S5: The encoder consists of a 3-layer MLP with 200 hidden units per layer, followed by a 4-layer SSM with 128 hidden states. The decoder is a 2-layer MLP with 200 hidden units per layer. +- GOKU: The encoder consists of a 3-layer MLP with 200 hidden units per layer, followed by a 4-layer RNN with 16 hidden states. The unknown parameters are obtained by a 4-layer bidirectional LSTM with 32 hidden units per layer. The decoder is a 2-layer MLP with 200 hidden units per layer. The unknown dynamics are parameterized by a 3-layer MLP with 200 hidden units per layer. +- Physics-Integrated VAE: The encoder consists of a 3-layer MLP with 200 hidden units per layer, followed by a 4-layer RNN with 16 hidden states. The unknown parameters are obtained by a 4-layer bidirectional LSTM with 32 hidden units per layer. The decoder is a 2-layer MLP with 200 hidden units per layer. The unknown dynamics are parameterized by a 3-layer MLP with 200 hidden units per layer. The regularization loss hyperparameters follow the settings specified in the original paper. +- Symplectic DVAE: The encoder consists of a 3-layer MLP with 200 hidden units per layer, followed by a 4-layer RNN with 128 hidden states. The energy conservation dynamics are parameterized by a 4-layer MLP with 128 hidden units per layer. The decoder is a 2-layer MLP with 200 hidden units per layer. +- ODE2VAE: The encoder consists of a 3-layer MLP with 200 hidden units per layer, followed by a 4-layer RNN with 128 hidden states. The latent ODE dimensionality is set to 10. The BNN comprises two layers with 50 hidden units each. The decoder is a 2-layer MLP with 200 hidden units per layer. +- Phy-SSM: The encoder consists of a 3-layer MLP with 200 hidden units per layer, followed by a 4-layer SSM with 128 hidden states. The unknown dynamics are parameterized by a 3-layer SSM with 128 hidden units per layer. The decoder is a 2-layer MLP with 200 hidden units per layer. The hyperparameters are set as $\beta = 1 \times 10^{-4}$ and $\lambda = 1 \times 10^{-4}$ . + +# Vehicle Motion Prediction: + +- GOKU: The encoder consists of a 2-layer RNN with 256 hidden states. The unknown dynamics are parameterized by a 4-layer MLP with 200 hidden units per layer. The decoder is a 2-layer MLP with 256 hidden units per layer. The control embedding is extracted using an off-the-shelf scene encoder (Nayakanti et al., 2023) and fused with latent states through cross-attention. +- Physics-Integrated VAE: The encoder consists of a 2-layer RNN with 256 hidden states. The unknown dynamics are parameterized by a 4-layer MLP with 200 hidden units per layer. The decoder is a 2-layer MLP with 256 hidden units per layer. The control embedding is extracted using an off-the-shelf scene encoder (Nayakanti et al., 2023) and fused with latent states through cross-attention. The regularization loss hyperparameters follow the settings specified in the original paper. +- Symplectic DVAE: The encoder consists of a 2-layer RNN with 256 hidden states. The energy conservation dynamics are parameterized by a 2-layer MLP with 256 hidden units per layer. The decoder is a 2-layer MLP with 256 hidden units per layer. The control embedding is extracted using an off-the-shelf scene encoder (Nayakanti et al., 2023) and fused with latent states through cross-attention. + +- ODE2VAE: The encoder consists of a 2-layer RNN with 256 hidden states. The latent ODE dimensionality is set to 10. The BNN comprises two layers with 50 hidden units each. The decoder is a 2-layer MLP with 256 hidden units per layer. The control embedding is extracted using an off-the-shelf scene encoder (Nayakanti et al., 2023) and fused with latent states through cross-attention. +- Phy-SSM: The encoder consists of a 2-layer SSM with 256 hidden states. The unknown dynamics are parameterized by a 4-layer SSM with 256 hidden units per layer. The decoder is a 2-layer MLP with 256 hidden units per layer. The control embedding is extracted using an off-the-shelf scene encoder (Nayakanti et al., 2023) and fused with latent states through cross-attention. The hyperparameters are set as $\beta = 1$ and $\lambda = 1 \times 10^4$ . + +# Video Pendulum Prediction: + +- Latent ODE (RNN Encoder): The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 4-layer RNN with 32 hidden states. The decoder is a 4-layer MLP with 200 hidden units per layer. The unknown dynamics are parameterized by a 3-layer MLP with 200 hidden units per layer. The control input encoder is a 3-layer MLP with 200 hidden units per layer. +- S5: The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 4-layer SSM with 128 hidden states. The decoder is a 4-layer MLP with 200 hidden units per layer. The control input encoder is a 3-layer MLP with 200 hidden units per layer. +- GOKU: The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 4-layer RNN with 16 hidden states. The unknown parameters are obtained by a 4-layer bidirectional LSTM with 32 hidden units per layer. The decoder is a 4-layer MLP with 200 hidden units per layer. The unknown dynamics are parameterized by a 3-layer MLP with 200 hidden units per layer. The control input encoder is a 3-layer MLP with 200 hidden units per layer. +- Physics-Integrated VAE: The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 4-layer RNN with 16 hidden states. The unknown parameters are obtained by a 4-layer bidirectional LSTM with 32 hidden units per layer. The decoder is a 4-layer MLP with 200 hidden units per layer. The unknown dynamics are parameterized by a 3-layer MLP with 200 hidden units per layer. The control input encoder is a 3-layer MLP with 200 hidden units per layer. The regularization loss hyperparameters follow the settings specified in the original paper. +- Symplectic DVAE: The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 4-layer RNN with 128 hidden states. The energy conservation dynamics are parameterized by a 4-layer MLP with 128 hidden units per layer. The decoder is a 4-layer MLP with 200 hidden units per layer. The control input encoder is a 3-layer MLP with 200 hidden units per layer. +- Phy-SSM: The encoder consists of a 4-layer MLP with 200 hidden units per layer, followed by a 4-layer SSM with 128 hidden states. The unknown dynamics are parameterized by a 3-layer SSM with 128 hidden units per layer. The unknown control influences are parameterized by a 2-layer SSM with 128 hidden units per layer. The decoder is a 4-layer MLP with 200 hidden units per layer. The hyperparameters are set as $\beta = 1 \times 10^{-1}$ and $\lambda = 1$ . + +# D.2. Settings for Dynamical System + +In this subsection, we provide details about the partially known physics equations for the quadrotor drone system, the SIR model for COVID-19, vehicle dynamics and video pendulum dynamics used in the experiments. + +# D.2.1. QUADROTOR DRONE SYSTEM + +The real-world quadrotor drone dataset was collected by (Eschmann et al., 2024). The raw dataset includes three-axis angular velocity, angular acceleration, linear acceleration, and the four motor RPMs of the drone state. We preprocessed the data following the methodology outlined in (Eschmann et al., 2024), setting thrust (z-axis), geometric torque (x, y axes), and four motor RPMs as control-related inputs. All preprocessed data were normalized using z-score normalization. In this task, our objective is to predict the three-axis angular velocity, angular acceleration, and linear acceleration of the drone. + +We use the standard dynamics equations (Kaufmann et al., 2023) for a quadrotor, which are as follows: + +$$ +\dot {\boldsymbol {p}} = \boldsymbol {v}, +$$ + +$$ +\dot {\boldsymbol {q}} = \boldsymbol {q} \odot \left[ \begin{array}{c} 0 \\ \omega_ {b} / 2 \end{array} \right], +$$ + +$$ +\dot {\boldsymbol {v}} = \frac {1}{m} \boldsymbol {R} (\boldsymbol {q}) \left(\sum_ {i = 1} ^ {4} \boldsymbol {r} _ {f _ {i}} f _ {i}\right) + \boldsymbol {g}, +$$ + +$$ +\dot {\boldsymbol {v}} = \boldsymbol {R} (\boldsymbol {q}) \dot {\boldsymbol {v}} _ {b}, \tag {18} +$$ + +$$ +\dot {\boldsymbol {v}} _ {b} = \boldsymbol {o} _ {\text {a c c}} + \boldsymbol {R} (\boldsymbol {q}) ^ {- 1} \boldsymbol {g}, \tag {19} +$$ + +$$ +f _ {i} = \sum_ {j = 0} ^ {2} \underbrace {K _ {f _ {i j}}} _ {\text {u n k n o w n}} \omega_ {m _ {i}} ^ {j}, \tag {20} +$$ + +$$ +\dot {\boldsymbol {\omega}} _ {b} = \underbrace {\boldsymbol {J} ^ {- 1}} _ {\text {u n k n o w n}} \left(\boldsymbol {\tau} + \left(\underbrace {\boldsymbol {J}} _ {\text {u n k n o w n}} \boldsymbol {\omega} _ {b}\right) \times \boldsymbol {\omega} _ {b}\right), \tag {21} +$$ + +$$ +\boldsymbol {\tau} = \sum_ {i = 1} ^ {4} \left(\boldsymbol {r} _ {p _ {i}} \times \boldsymbol {r} _ {f _ {i}}\right) f _ {i} + \boldsymbol {r} _ {\tau_ {i}} \underbrace {K _ {\tau_ {i}}} _ {\text {u n k n o w n}} f _ {i}, \tag {22} +$$ + +$$ +\dot {\boldsymbol {\omega}} _ {m} = \underbrace {T _ {m} ^ {- 1}} _ {\text {u n k n o w n}} \left(\omega_ {s p} - \boldsymbol {\omega} _ {m}\right). \tag {23} +$$ + +Here, $\pmb{p}$ and $\pmb{v}$ represent the global position and velocity, respectively. $\pmb{q}$ and $\pmb{R}(\pmb{q})$ denote the orientation quaternion and the rotation matrix. $f_{i}$ represents the thrust produced by motor $i$ , while $\omega_{m}$ and $\omega_{sp}$ are the motor RPMs: state and setpoints, respectively. $\omega_{b}$ and $\mathbf{o}_{\mathrm{acc}}$ denote the angular rate and body-frame acceleration, respectively. $m$ and $g$ are the mass and gravitational acceleration. $\boldsymbol{r}_{p_i},\boldsymbol{r}_{f_i}$ , and $\boldsymbol{r}_{\tau_i}$ represent the position, force, and torque of the motor, respectively. $\boldsymbol{J}$ is the inertia matrix, $T_{m}$ is the motor delay time constant, $K_{\tau_i}$ is the torque coefficient of motor $i$ , and $K_{f_{ij}}$ is the thrust coefficient (with exponent $j$ ) of motor $i$ . The $\boldsymbol{J}, T_{m}, K_{\tau_{i}}$ , and $K_{f_{ij}}$ are unknown in the system. + +Following (Eschmann et al., 2024), we express the thrust curve using known variables, leading to Eq. (24): + +$$ +\boldsymbol {R} (\boldsymbol {q}) \dot {\boldsymbol {v}} _ {b} = \frac {1}{m} \boldsymbol {R} (\boldsymbol {q}) \left(\sum_ {i = 1} ^ {4} \boldsymbol {r} _ {f _ {i}} f _ {i}\right) + \boldsymbol {g}, +$$ + +$$ +\dot {\boldsymbol {v}} _ {b} = \frac {1}{m} \left(\sum_ {i = 1} ^ {4} \boldsymbol {r} _ {f _ {i}} f _ {i}\right) + \boldsymbol {R} (\boldsymbol {q}) ^ {- 1} \boldsymbol {g}, \tag {24} +$$ + +$$ +\dot {\boldsymbol {v}} _ {b} - \boldsymbol {R} (\boldsymbol {q}) ^ {- 1} \boldsymbol {g} = \frac {1}{m} \sum_ {i = 1} ^ {4} \boldsymbol {r} _ {f _ {i}} f _ {i}. +$$ + +Substituting Eq. (24) into Eqs. (18) and (19), we derive the following body-frame acceleration equation. + +$$ +\boldsymbol {o} _ {\mathrm {a c c}} = \frac {1}{m} \sum_ {i = 1} ^ {4} \sum_ {j = 0} ^ {2} K _ {f _ {i j}} \boldsymbol {r} _ {f _ {i}} \omega_ {m _ {i}} ^ {j}. \tag {25} +$$ + +Considering the practical assumption that body-frame acceleration depends on velocity and force across three axes, we perform state augmentation by adding a constant bias. Finally, the physics knowledge used in our work can be represented as: + +$$ +\frac {\mathrm {d} \boldsymbol {z}}{\mathrm {d} t} = \boldsymbol {A} \boldsymbol {z}, \tag {26} +$$ + +where: + +$$ +\boldsymbol {z} = \left[ \boldsymbol {v} _ {b} ^ {\top}, \boldsymbol {\omega} _ {b} ^ {\top}, \boldsymbol {\omega} _ {m} ^ {\top}, 1 \right] ^ {\top}, +$$ + +$$ +\boldsymbol {A} = \left[ \begin{array}{c c c c c c c c c c c c c} * & * & * & 0 & 0 & 0 & \frac {\boldsymbol {r} _ {f _ {1}}}{m} \cdot (*) & \frac {\boldsymbol {r} _ {f _ {2}}}{m} \cdot (*) & \frac {\boldsymbol {r} _ {f _ {3}}}{m} \cdot (*) & \frac {\boldsymbol {r} _ {f _ {4}}}{m} \cdot (*) & 0 \\ * & * & * & 0 & 0 & 0 & \frac {\boldsymbol {r} _ {f _ {1}}}{m} \cdot (*) & \frac {\boldsymbol {r} _ {f _ {2}}}{m} \cdot (*) & \frac {\boldsymbol {r} _ {f _ {3}}}{m} \cdot (*) & \frac {\boldsymbol {r} _ {f _ {4}}}{m} {\cdot} (*) & 0 \\ * & * & * & 0 & 0 & 0 & \frac {\boldsymbol {r} _ {f _ {1}}}{m} \cdot (*) & \frac {\boldsymbol {r} _ {f _ {2}}}{m} \cdot (*) & \frac {\boldsymbol {r} _ {f _ {3}}}{m} \cdot (*) & \frac {\boldsymbol {r} _ {f _ {5}}}{m} \cdot (*) & 0 \\ 0 & 0 & 0 & * & * & * & * & * & * & * & * & 0 \\ 0 & 0 & 0 & * & * & * & * & * & * & * & * & 0 \\ 0 & 0 & 0 & * & * & * & * & * & * & * & * & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & * & 0 & 0 & 0 & 0 & \omega_ {s p} \cdot (*) \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & * & 0 & 0 & 0 & \omega_ {s p} \cdot (*) \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & * & 0 & 0 & \omega_ {s p} \cdot (*) \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & * & \omega_ {s p} \cdot (*) \end{array} \right] +$$ + +$(*)$ denotes unknown parameters or terms dependent on the state and control inputs. + +# D.2.2. COVID-19 MODEL + +The COVID-19 real-world dataset contains daily records of Confirmed $(C)$ , Infected $(I)$ , Fatal $(F)$ , and Recovered $(Re)$ cases for each country. The number of Infected $(I)$ cases is derived as $I = C - F - Re$ . Additionally, we utilized the 2020 population data $(N)$ for each country from the Covsirphy library to compute the following metrics: + +Susceptible (S) = Population (N) - Confirmed (C) + +Infected (I) = Infected (I) (27) + +Removed $(\mathbf{R}) =$ Fatal (F) $^+$ Recovered (Re) + +Using the calculated $S$ , $I$ , and $R$ variables, we first processed the data for each country by dividing all values by the total population $N$ to ensure the value range is between 0 and 1. Subsequently, we applied z-score normalization to the processed input data. + +To incorporate physics knowledge, we embed the SIR model (Anderson, 1991) into all models. The SIR model is a foundational compartmental model in epidemiology used to simulate the spread of infectious diseases. It categorizes a closed population into three compartments: Susceptible $(S)$ , Infectious $(I)$ , and Removed $(R)$ . The dynamics of these interacting groups are governed by the following equations: + +$$ +\frac {\mathrm {d} S}{\mathrm {d} t} = - \overbrace {\beta} ^ {\text {u n k n o w n}} S I +$$ + +$$ +\frac {\mathrm {d} I}{\mathrm {d} t} = \overbrace {\widehat {\beta}} ^ {\text {u n k n o w n}} S I - \underbrace {\gamma I} _ {\text {u n k n o w n}} +$$ + +$$ +\frac {\mathrm {d} R}{\mathrm {d} t} = \underbrace {\gamma} _ {\text {u n k o n w n}} I, +$$ + +where $S, I$ , and $R$ denote the populations of the susceptible, infected, and removed groups (due to recovery or death), + +respectively. The total population, represented by the constant $N = S + I + R$ , remains unchanged. Here, $\beta$ represents the contact rate between susceptible and infected individuals, while $\gamma$ denotes the removal rate of the infected population. Both parameters are unknown, time-varying functions in real-world cases. As a result, the following incomplete knowledge is used in the experiment. + +$$ +\frac {\mathrm {d}}{\mathrm {d} t} \left[ \begin{array}{l} S \\ I \\ R \end{array} \right] = \left[ \begin{array}{c c c} - \frac {I}{N} \cdot (*) & 0 & 0 \\ \frac {I}{N} \cdot (*) & * & * \\ 0 & * & 0 \end{array} \right] \left[ \begin{array}{l} S \\ I \\ R \end{array} \right]. \tag {28} +$$ + +# D.2.3. VEHICLE DYNAMICS + +Based on Newton's second law of motion, the vehicle dynamics along the longitudinal and lateral axes are described as follows (Rajamani, 2011): + +$$ +\ddot {p} = \frac {1}{\tilde {m}} \left(\underbrace {F _ {f} + F _ {r} - F _ {\text {a e r o}} - R _ {p f} - R _ {p r}} _ {\text {u n k n o w n}}\right), \tag {29} +$$ + +$$ +\tilde {m} \left(\ddot {y} + \dot {\psi} v _ {p}\right) = \underbrace {F _ {y f} + F _ {y r}} _ {\text {u n k n o w n}}, \tag {30} +$$ + +where $p$ and $y$ denote the vehicle's longitudinal and lateral positions, respectively, and $\psi$ is the yaw angle. The vehicle's mass is represented by $\tilde{m}$ , and $v_{p} = \dot{p}$ is the longitudinal velocity. The forces $F_{f}$ and $F_{r}$ are the longitudinal tire forces generated by the front and rear tires, respectively. The terms $R_{pf}$ and $R_{pr}$ represent the rolling resistance at the front and rear tires, while $F_{\mathrm{aero}}$ accounts for aerodynamic drag along the longitudinal axis. Similarly, $F_{yf}$ and $F_{yr}$ are the lateral tire forces exerted by the front and rear tires. + +By defining the lateral velocity as $v_{y} \triangleq \dot{y}$ and the yaw rate as $v_{\psi} \triangleq \dot{\psi}$ , we derive the following state-space representation of the system: + +$$ +\frac {d}{d t} \left[ \begin{array}{c} p \\ y \\ \psi \\ v _ {p} \\ v _ {y} \\ v _ {\psi} \end{array} \right] = \left[ \begin{array}{l l l l l l} 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & * & 0 & 0 \\ 0 & 0 & 0 & 0 & * & * \\ 0 & 0 & 0 & 0 & * & * \end{array} \right] \left[ \begin{array}{c} p \\ y \\ \psi \\ v _ {p} \\ v _ {y} \\ v _ {\psi} \end{array} \right] + \left[ \begin{array}{c} 0 \\ 0 \\ 0 \\ * \\ 0 \\ 0 \end{array} \right] \theta + \left[ \begin{array}{c} 0 \\ 0 \\ 0 \\ * \\ * \end{array} \right] \delta , \tag {31} +$$ + +where the entries marked with $(\ast)$ denote state- or time-dependent terms that are unknown. The control inputs $\theta$ and $\delta$ represent throttle and steering, respectively. + +Following (Mao et al., 2023), we adopt the practical assumption that throttle primarily depends on the longitudinal velocity and position, while the influence of steering remains less understood. Incorporating this prior knowledge, the state-space model is refined into the following form: + +$$ +\dot {z} = \left[ \begin{array}{c c c c c c} 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 \\ * & 0 & 0 & * & 0 & 0 \\ * & * & * & * & * & * \\ * & * & * & * & * & * \end{array} \right] z, \tag {32} +$$ + +where the unknown terms $(*)$ are assumed to be related to variations in control inputs and state dynamics. + +Evaluation Metric in Vehicle Motion Prediction To evaluate the performance of our proposed method, we utilize the following evaluation metrics in addition to MAE and MSE: + +- Average Displacement Error (ADE): The Average Displacement Error calculates the average Euclidean distance between the predicted trajectory and the ground truth trajectory over all time steps: + +$$ +\mathrm {A D E} = \frac {1}{T} \sum_ {t = 1} ^ {T} \| \hat {\mathbf {p}} _ {t} - \mathbf {p} _ {t} \| _ {2}, +$$ + +where $T$ is the trajectory length, $\hat{\mathbf{p}}_t$ is the predicted position at time $t$ , and $\mathbf{p}_t$ is the ground truth position at time $t$ . + +- Final Displacement Error (FDE): The Final Displacement Error calculates the Euclidean distance between the final predicted position and the ground truth final position: + +$$ +\mathrm {F D E} = \left\| \hat {\mathbf {p}} _ {T} - \mathbf {p} _ {T} \right\| _ {2}. +$$ + +- Speed Error: The L1 error of speed measures the average absolute difference between the predicted and ground truth speeds over all time steps: + +$$ +\text {S p e e d E r r o r} = \frac {1}{T} \sum_ {t = 1} ^ {T} \left| \hat {v} _ {t} - v _ {t} \right|, +$$ + +where $\hat{v}_t$ and $v_t$ represent the predicted and ground truth speeds at time $t$ , respectively. + +- Acceleration Error: The L1 error of acceleration measures the average absolute difference between the predicted and ground truth accelerations over all time steps: + +$$ +\text {A c c e l e r a t i o n E r r o r} = \frac {1}{T} \sum_ {t = 1} ^ {T} | \hat {a} _ {t} - a _ {t} |, +$$ + +where $\hat{a}_t$ and $a_{t}$ represent the predicted and ground truth accelerations at time $t$ , respectively. + +- Jerk Error: The L1 error of jerk measures the average absolute difference between the predicted and ground truth jerks (rates of change of acceleration) over all time steps: + +$$ +\text {J e r k E r r o r} = \frac {1}{T} \sum_ {t = 1} ^ {T} | \hat {j} _ {t} - j _ {t} |, +$$ + +where $\hat{j}_t$ and $j_t$ represent the predicted and ground truth jerks at time $t$ , respectively. + +These metrics comprehensively evaluate the spatial accuracy of the predicted trajectories (ADE and FDE) and the dynamic properties of motion predictions (speed, acceleration, and jerk errors). + +# D.2.4.VIDEO PENDULUM DYNAMICS + +In this toy experiment, we consider a general case where the pendulum system is affected by unknown friction and an unknown control input. Specifically, the system dynamics follow the equation: + +$$ +\begin{array}{l} \frac {\mathrm {d} \theta (t)}{\mathrm {d} t} = \omega (t), \\ \frac {\mathrm {d} \omega (t)}{\mathrm {d} t} = - \underbrace {\frac {g}{l}} _ {\text {u n k n o w n}} \sin \theta (t) \underbrace {- \frac {b}{m} \omega (t)} _ {\text {u n k n o w n}} + \underbrace {\frac {1}{m l ^ {2}}} _ {\text {u n k n o w n}} A \cos (2 \pi \alpha t), \tag {33} \\ \end{array} +$$ + +where $\theta(t)$ represents the angular displacement of the pendulum, $\omega(t)$ denotes its angular velocity, $g$ is the gravitational acceleration, $l$ is the length of the pendulum, $b$ is the damping coefficient, and $m$ is the mass. $A$ and $\alpha$ denote the amplitude and frequency of the control input, respectively. + +In this equation, the pendulum length $l$ , the damping force caused by friction $\frac{b}{m}\omega(t)$ , and the influence of the control input $\frac{1}{ml^2}$ are all unknown. Next, we perform state augmentation by extending the nonlinear state terms such that $s(t) = \sin(\theta(t))$ and $c(t) = \cos(\theta(t))$ . This yields the following state-space model: + +$$ +\frac {\mathrm {d}}{\mathrm {d} t} \left[ \begin{array}{l} \theta (t) \\ \omega (t) \\ s (t) \\ c (t) \end{array} \right] = \left[ \begin{array}{c c c c} 0 & 1 & 0 & 0 \\ * & * & * & * \\ 0 & 0 & 0 & \omega (t) \\ 0 & 0 & - \omega (t) & 0 \end{array} \right] \left[ \begin{array}{l} \theta (t) \\ \omega (t) \\ s (t) \\ c (t) \end{array} \right] + \left[ \begin{array}{l} 0 \\ * \\ 0 \\ 0 \end{array} \right] A \cos (2 \pi \alpha t), \tag {34} +$$ + +which serves as the physical knowledge used in this experiment. + +For this dataset, we use the Pendulum-v0 environment from OpenAI Gym (Brockman, 2016) to generate video data of the pendulum. We simulate 405 trajectories for training, 45 for validation, and 50 for testing. Each trajectory starts with a different initial condition and contains 300 time points with a time step of 0.05. The observed data are preprocessed such that each frame is resized to $28 \times 28$ pixels and normalized to the range [0, 1] using min-max normalization. + +To further increase the task's difficulty, we add noise and introduce irregularly sampled settings. Specifically, zero-mean Gaussian noise with a standard deviation of 0.3 is added to each pixel, and $20\%$ of the data in each trajectory is randomly dropped. As a result, each sequence contains 240 time steps, with the first 160 time steps used as model input for evaluating interpolation and the remaining 80 time steps used for evaluating extrapolation. + +For the detailed parameter settings, we set $m = 1.0$ , $g = 10.0$ , and the damping coefficient $b = 0.7$ . Additionally, for each trajectory, the pendulum length $l$ was uniformly sampled from [1, 2], and the control input amplitude $A$ was uniformly sampled from $[-5, 5]$ , where negative values indicate a control input in the opposite direction. These varying parameters, instead of being constant, make the task significantly more challenging. + +# D.3. Training Settings + +For all experiments, the known dynamics $A_{\mathrm{knw}}$ in our Phy-SSM unit is initialized using known physical parameters. The unknown dynamics $A_{\mathrm{unk}}$ is initialized based on the output of the deep SSM layer. For S5, we adopt the default HiPPO initialization as described in (Gu et al., 2020). + +Below, we provide the detailed training settings for each experiment: + +**Drone State Prediction:** For all methods, we use the Adam optimizer with a learning rate of $1 \times 10^{-4}$ to train for a maximum of 20 epochs with a batch size of 64. + +COVID-19 Modeling: For all methods, we use the Adam optimizer with a learning rate of $1 \times 10^{-3}$ to train for a maximum of 400 epochs with a batch size of 32. + +Vehicle Motion Prediction: For all baseline data-driven models, we strictly follow the training procedures and architectural configurations specified in the original works. For our method and the physics-enhanced machine learning models, we implement the AdamW optimizer with a cosine one-cycle learning rate schedule. Specifically, we set the maximum learning rate to 0.002 over 80 epochs with a batch size of 64. The scheduler parameters include a peak learning rate of 0.01, a percentage start of 0.01, a division factor of 10, and a final division factor of 100. + +Video Pendulum Prediction: For all methods, we use the Adam optimizer with a learning rate of $1 \times 10^{-3}$ to train for a maximum of 150 epochs with a batch size of 64. + +# E. Real-World Datasets + +We detail the three real-world datasets in our experiments as follows. + +(i) Drone state prediction: We use the real-world quadrotor drone dataset collected by (Eschmann et al., 2024). The dataset includes three-axis angular velocity, angular acceleration, linear acceleration, and the four motor RPMs of the drone state. The data is irregularly and high-frequency recorded, nearly at $1010\mathrm{Hz}$ (minimum: $573.05\mathrm{Hz}$ , maximum: $1915.86\mathrm{Hz}$ ). We split the data into $70\%$ , $10\%$ , and $20\%$ for training, validation, and testing, respectively. The task is to use 800 timesteps of data to predict the states in the next 200 timesteps. +(ii) COVID-19 epidemiology modeling: We use the real-world COVID-19 dataset from Johns Hopkins University (JHU) provided by the Covsirphy Python library (Takaya & Team, 2020). The dataset contains daily records of the Susceptible, Infected, and Removed populations from various countries. For model training, we use the data from Armenia, Brazil, France, Germany, and Gabon. The United Kingdom dataset is used for validation while the data collected from Ireland and Spain are used for testing. Notably, each country exhibits different unknown time-varying system dynamics, increasing the complexity of the task. + +Additionally, we randomly dropped $10\%$ of the recorded daily data to simulate missing records in real-world scenarios. A total of 160 irregular data samples are used as the input of the model for predicting the next 80 irregularly required future days. + +(iii) Vehicle motion prediction: For the vehicle motion prediction task, we utilize nuScenes dataset (Caesar et al., 2020) in the autonomous driving. This real-world dataset provides 2 seconds of past trajectories and 6 seconds of future trajectories, with $5\%$ missing agent observations. It includes detailed annotations such as velocity, heading, and position in a 2D coordinate system. Additionally, this dataset offers high-definition (HD) maps containing lane boundaries, road centers, and traffic signals. We use an off-the-shelf scene encoder (Nayakanti et al., 2023) to extract environmental context as the control input for our model. + +Before training, we preprocess and standardize the data at $10\mathrm{Hz}$ using ScenarioNet (Li et al., 2024), following the approach in (Feng et al., 2024). The dataset is split into $80\%$ for training and $20\%$ for validation, while the nuScenes test file is used to evaluate the model performance. During training, the model takes the first 2 seconds of data as input to predict the subsequent 5 seconds. During testing, the prediction horizon is extended to 6 seconds to further evaluate the model generalization. + +# F. Additional Experimental Results on Video Pendulum + +In addition, we present the evaluation results of different methods using video pendulum data. MAE and MSE are used as metrics to measure the performance of each method by comparing predicted frames with ground truth frames. The first 160 irregularly sampled frames are provided as input to the models to predict frames 0 to 240. + +The results are shown in Table 7. For interpolation, our method effectively captures sequence correlations by adjusting trajectories based on subsequent observations, achieving competitive results. For extrapolation, our Phy-SSM unit learns generalizable physical dynamics and shows the best extrapolation performance. + +In contrast, data-driven continuous-time models such as S5 and Contformer perform well in interpolation tasks due to their ability to capture sequence correlations. However, they perform poorly in extrapolation tasks because they struggle to extract physics-consistent representations without inductive biases. Physics-enhanced baselines, on the other hand, learn physics-consistent representations but fail to fully utilize subsequent observations. This limits their ability to learn generalized physical dynamics, resulting in poor long-term predictions under noisy and irregular data conditions. + +Table 7. Performance comparison of different methods in terms of interpolation and extrapolation using pendulum dataset. The results are averaged over three random seeds. The lower the better. The best result is highlighted in bold black and the second best is highlighted in green. + +
MethodInterpolation TaskExtrapolation Task
MAE ↓ (×10-1)MSE ↓ (×10-2)MAE ↓ (×10-1)MSE ↓ (×10-2)
Latent ODE (RNN Enc.)1.395±0.0182.713±0.0531.188±0.0331.627±0.079
Latent ODE (ODE-RNN Enc.)1.410±0.0462.745±0.1231.185±0.0341.622±0.081
ContiFormer1.136±0.0221.350±0.0541.632±0.0515.165±0.146
S51.156±0.0181.444±0.0781.663±0.1345.476±1.167
GOKU1.384±0.0222.694±0.1341.229±0.0171.740±0.056
PI-VAE1.399±0.0142.804±0.0341.262±0.0191.826±0.036
SDVAE1.338±0.0332.755±0.0641.199±0.0361.679±0.087
Ours1.142±0.0021.409±0.0221.145±0.0071.417±0.052
+ +# G. Trajectory Plots for Different Methods + +In this section, we provide detailed trajectory plots for all methods across each experiment. In the following subsections, we provide detailed trajectory plots for each method in each experiment. + +# G.1. Visualization Results of Drone State Prediction + +The trajectory plots for all methods on the drone state prediction task are provided in Fig. 4. + +![](images/a66f6bcb03e56f7dbd7603cbd1eb13b77932be3ec3636a3748a83095d850b6ff.jpg) + +![](images/7c8273af810c98c7096fd989c0610c477bd2c85c1090513ed98081c0715677a4.jpg) + +![](images/67034ed6a5eb57fe7478f3fac42066cb028597b908252a70a8c82a15980ec23f.jpg) + +![](images/6abf901fa7167f0e186f88550a68418eaba7cb12157a3ab1e17559ee5f364251.jpg) + +![](images/9c1c387ad91a5c4245de0acbff7a4a19809606c5d29cc49c19c5137e4dae5ceb.jpg) + +![](images/b4e87b408c71adf7ef40e28c1e1e04d42402318d753315613df02844938884e4.jpg) + +![](images/38eba0c7eaeca326d5a5b7426059ceac51e1bd1a90070ef33c7e86ebc13f6d80.jpg) +Figure 4. Trajectory plots of our method and all baseline models for drone angular velocity state prediction along the x-axis. The performance is evaluated in both interpolation and extrapolation tasks, including (a) LatentODE (RNN Enc.), (b) LatentODE (ODE-RNN Enc.), (c) Contformer, (d) S5, (e) GOKU, (f) PIVAE, (g) SDVAE, and (h) Ours. The left of the gray dashed line represents interpolation task (Interp.) while the right represents the extrapolation task (Extra.). + +![](images/b7493a44e50960f561bcfb48a11bf05aba7cc945d95afc5cfda46320bea865e6.jpg) + +# G.2. Visualization Results of COVID-19 + +The trajectory plots for all methods on the COVID-19 epidemiology modeling task are provided in Fig. 5. + +![](images/ee15c2698a1bcdad1c5d3e4baa8c5287331194cb92b9cad2b326e46b112ccee8.jpg) +(a) LatentODE (RNN Enc.) + +![](images/9e8871e02d3a3ed4a1a4f5c5ef6b6356d15429485a74bf761b7c8457bc85bb7f.jpg) +(b) LatentODE (ODE-RNN Enc.) + +![](images/b5413d8da45203b886137eda7c8e608b4d233d7bdc7523b4f20ac5deeadc5e1e.jpg) +(c) Contformer + +![](images/d9723ac7580189f32b5fa4dcdaca73d160abf358f37a15cf6588b385e370c828.jpg) +(d) S5 + +![](images/2ae6261e0d92099a8a0763f87409a09d634e40bd3dc0c46a77a5bd9c0728f1bd.jpg) +(e) GOKU + +![](images/58af842dc92ac025ab3e5dff5fc013a33c7e8d0c9afb36bf693e50ef2f46b660.jpg) +(f) PIVAE + +![](images/f654913953cba5ecb28e7f797a8f7ce4be05fc2053545a6a4abf1fa112e53ac0.jpg) +(g) SDVAE + +![](images/e0778ed8cfedd329b903047563260336295ec495ffafc460b7efa183cbdc7f2f.jpg) +(h) Ours +Figure 5. Trajectory plots of our method and all baseline models for COVID-19 susceptible population prediction in Spain. The performance is evaluated in both interpolation and extrapolation tasks, including (a) LatentODE (RNN Enc.), (b) LatentODE (ODE-RNN Enc.), (c) Contformer, (d) S5, (e) GOKU, (f) PIVAE, (g) SDVAE, and (h) Ours. The left of the gray dashed line represents interpolation task (Interp.) while the right represents the extrapolation task (Extra.). + +# G.3. Visualization Results of Vehicle Motion Prediction + +The trajectory plots for all methods on the vehicle motion prediction task are provided in Fig. 6. + +![](images/4d853f4d39e21eda4c2824a28c272858cdb5e58cdbc853386fe3972d68d08cb9.jpg) + +![](images/0d1a50deac2bc6c6c78ada6520f5ee52d155c2f63324ea3fd41e24d3615a8641.jpg) + +![](images/7159b61b0756515fd55d2876da1c60360f1a061e681707627503c6797afc0956.jpg) +(a) Wayformer + +![](images/33a81f88a28f0d6b1d8bbdcc692ae62a3571696738b9583bb62edf1a375988a4.jpg) +(b) Autobot + +![](images/8662c2690d08fb0a5c256682ba5e5269b23aa3a6456c620b57d3ea48b5176ac2.jpg) + +![](images/ddaf901669037ebac2482706538b5cd4fc0af64d7b0ce6cc0b0475761753a0b6.jpg) + +![](images/1614b41d55e31dd6e323c8becb210409637b053f60bdb13bec5bf0a48f120551.jpg) +(c) G2LTraj + +![](images/1111a35b4700540ac52d28dcebdd078d5ba3050974843db8b81f3c21830b9d75.jpg) + +![](images/23f0f744e3f1f33aa50665831f494ca33cb4ab0e8f288170da54c52eed1ce32e.jpg) + +![](images/dd447b53535a94bce93858e51f08f0fe34330ab07f2d0e2ceb68f0038f2bf8dc.jpg) +(d) GOKU + +![](images/4c7b27e89f72b9183092bdaadce5569b3ea6e2bbd3c1b783671afbe12794dcab.jpg) + +![](images/36852c26c78df5c149c904f5319dc77cfb319957ebf91e8d3d8a69d6afa13f5e.jpg) +(e) PIVAE + +![](images/7ef7a160a37b1181cdad35c16f532e7c5965725a5f47c85a019c57cb79e51ce5.jpg) +(f) SDVAE + +![](images/6d829823658adde4b58dbe7e9be417d979c291ee14551c20a2f301a74460516b.jpg) +(g) Ours +Figure 6. Trajectory plots of our method and all baseline models for vehicle motion prediction. The performance is evaluated in both in-domain and out-of-domain extrapolation tasks, including (a) Wayformer, (b) Autobot, (c) G2LTraj, (d) GOKU, (e) PIVAE, (f) SDVAE, and (g) Ours. The left of the gray dashed line represents in-domain extrapolation task (In-D Ext.) while the right represents the out-of-domain extrapolation task (Out-D Ext.). + +# H. Sensitivity Analysis + +Lastly, we study how the hyperparameters in the loss function in Eq. 12 affect the performance of Phy-SSM using the drone dataset. Our method involves two hyperparameters, $\beta$ and $\lambda$ . As shown in Table 8, the results demonstrate that our method achieves consistently good performance when these hyperparameters are within an appropriate range, indicating that it is insensitive to variations in hyperparameter settings. + +Table 8. Sensitivity analysis using drone dataset. All experiments were conducted using a fixed random seed to ensure consistency. + +
HyperparameterInterpolation TaskExtrapolation Task
MAE ↓ (×10-2)MSE ↓ (×10-2)MAE ↓ (×10-1)MSE ↓ (×10-1)
β = 0.1,λ = 18.8041.6962.7151.832
β = 0.1,λ = 109.3091.8782.7871.872
β = 0.1,λ = 10010.2262.3712.7701.862
β = 1,λ = 19.0911.8252.7571.888
β = 1,λ = 108.9761.7712.7851.887
β = 1,λ = 1009.6412.0242.6921.745
β = 10,λ = 19.2151.8462.8411.933
β = 10,λ = 109.5381.9152.8541.977
β = 10,λ = 10010.5402.4772.8221.938
+ +# I. Guideline for Knowledge Mask Design + +The knowledge mask is designed to distinguish which components of the system dynamics should be learned (unknown) and which are predefined (known). This allows the model to focus its learning capacity on unknown physical terms while preserving known physical laws as hard constraints. Formally, the knowledge mask is a binary matrix $M \in \{0,1\}^{d_{\Xi} \times d_{\Xi}}$ applied via Hadamard product to the learned dynamics components. The refined unknown dynamics are computed as: + +$$ +\boldsymbol {A} _ {\mathrm {u n k}} (t) = \boldsymbol {M} _ {A} \odot \tilde {\boldsymbol {A}} _ {\mathrm {u n k}} (t), +$$ + +$$ +\boldsymbol {B} _ {\mathrm {u n k}} (t) = \boldsymbol {M} _ {B} \odot \tilde {\boldsymbol {B}} _ {\mathrm {u n k}} (t), \tag {35} +$$ + +where $\tilde{A}_{\mathrm{unk}}(t)$ and $\tilde{B}_{\mathrm{unk}}(t)$ are the raw outputs from the unknown dynamics learner. We categorize the dynamics terms in a general system into three cases, and describe how the knowledge mask should be applied in each: + +- Fully known terms: These terms are derived from physical laws with known parameters (e.g., gravity). Their corresponding mask entries are set to 0, preventing the model from updating them during training. +- Fully unknown terms: These dynamics are not governed by any known physical law. Their corresponding mask entries are set to 1, allowing them to be freely learned by the model. +- Partially known (overlapping) terms: These contain both known and unknown components. In this case, the entire term is treated as "unknown" during learning (i.e., mask entry set to 1), and the known part is reintroduced in post-processing. + +For example, in the COVID-19 model in Eq. (28), the first term can be expressed as $-\frac{I}{N} \cdot (*)$ , where $-\frac{I}{N}$ is known and $(*)$ is unknown. We model the unknown component using the deep SSM, and multiply it by the known factor $-\frac{I}{N}$ afterward to obtain the final expression. + +# J. Regularization Metric Experiments + +We conduct experiments comparing different distance metrics for the regularization penalty, including Chebyshev distance, cosine distance, and Euclidean distance. The results, presented in Table 9, show that the Euclidean distance achieves the best performance in extrapolation tasks. Chebyshev distance emphasizes worst-case deviations, while cosine distance captures directional similarity, which may not fully penalize magnitude differences. Since our objective is to measure the overall discrepancy between two physical state trajectories, Euclidean distance is not only empirically effective but also conceptually the most appropriate choice. + +Table 9. Performance comparison of different metrics used in regularization term using drone dataset. The results are averaged over three random seeds. The lower is the better. The best result is highlighted in bold black and the second best is highlighted in green. Our method, which adopts Euclidean distance, achieves the best performance in extrapolation tasks. + +
MethodInterpolation TaskExtrapolation Task
MAE ↓ (×10-1)MSE ↓ (×10-1)MAE ↓ (×10-1)MSE ↓ (×10-1)
Chebyshev distance3.957±0.0723.361±0.1994.342±0.0504.440±0.223
Cosine Distance0.997±0.0290.208±0.0123.019±0.1082.152±0.144
Euclidean distance1.002±0.0340.222±0.0202.733±0.0591.798±0.079
\ No newline at end of file diff --git a/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/images.zip b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..feaf6fe69740eba456b0d0fb5e97efe3452a14c7 --- /dev/null +++ b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:840c2332f14a04e08fa3e0772cd1ee20108ebc1e3180266d6d6c713a3be31891 +size 1666126 diff --git a/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/layout.json b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..03ed2310c5bc4773aa70c02cff138337c404bada --- /dev/null +++ b/ageneralizablephysicsenhancedstatespacemodelforlongtermdynamicsforecastingincomplexenvironments/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eec7b45439734aa68c5045f4f7136cc4410863c5152439db280caf8db2da92a2 +size 1077234 diff --git a/ageneralizationresultforconvergenceinlearningtooptimize/9c00d8d7-1f31-4af0-a2b3-555e7aa1da76_content_list.json b/ageneralizationresultforconvergenceinlearningtooptimize/9c00d8d7-1f31-4af0-a2b3-555e7aa1da76_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..3b814f1b4ebc697b7598fe220a7463e8053780c3 --- /dev/null +++ b/ageneralizationresultforconvergenceinlearningtooptimize/9c00d8d7-1f31-4af0-a2b3-555e7aa1da76_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa2cd9e7b6062c3d40b70c8bbb4fb8a3483da1fa215752e3ae8034a398b7ee22 +size 156886 diff --git a/ageneralizationresultforconvergenceinlearningtooptimize/9c00d8d7-1f31-4af0-a2b3-555e7aa1da76_model.json b/ageneralizationresultforconvergenceinlearningtooptimize/9c00d8d7-1f31-4af0-a2b3-555e7aa1da76_model.json new file mode 100644 index 0000000000000000000000000000000000000000..98578f8d88c612d8dde789ce16f4896bcc5064b6 --- /dev/null +++ b/ageneralizationresultforconvergenceinlearningtooptimize/9c00d8d7-1f31-4af0-a2b3-555e7aa1da76_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84d682e83750419f07d24460f25981135d8c9e3770a3c723aee7d5faf67321eb +size 189411 diff --git a/ageneralizationresultforconvergenceinlearningtooptimize/9c00d8d7-1f31-4af0-a2b3-555e7aa1da76_origin.pdf b/ageneralizationresultforconvergenceinlearningtooptimize/9c00d8d7-1f31-4af0-a2b3-555e7aa1da76_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..55c9eac110f0f0d3d6e2f36c6e1ca9f84df2fdd4 --- /dev/null +++ b/ageneralizationresultforconvergenceinlearningtooptimize/9c00d8d7-1f31-4af0-a2b3-555e7aa1da76_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14dfd79e1b818cefafa3a36286ab96f9e7d05d0d0604876e5b838d2f71834fa1 +size 995571 diff --git a/ageneralizationresultforconvergenceinlearningtooptimize/full.md b/ageneralizationresultforconvergenceinlearningtooptimize/full.md new file mode 100644 index 0000000000000000000000000000000000000000..cd6c2e4db52bb3527c14690d714a0f1125e0933d --- /dev/null +++ b/ageneralizationresultforconvergenceinlearningtooptimize/full.md @@ -0,0 +1,696 @@ +# A Generalization Result for Convergence in Learning-to-Optimize + +Michael Sucker1 Peter Ochs2 + +# Abstract + +Learning-to-optimize leverages machine learning to accelerate optimization algorithms. While empirical results show tremendous improvements compared to classical optimization algorithms, theoretical guarantees are mostly lacking, such that the outcome cannot be reliably assured. Especially, convergence is hardly studied in learning-to-optimize, because conventional convergence guarantees in optimization are based on geometric arguments, which cannot be applied easily to learned algorithms. Thus, we develop a probabilistic framework that resembles classical optimization and allows for transferring geometric arguments into learning-to-optimize. Based on our new proof-strategy, our main theorem is a generalization result for parametric classes of potentially non-smooth, non-convex loss functions and establishes the convergence of learned optimization algorithms to critical points with high probability. This effectively generalizes the results of a worst-case analysis into a probabilistic framework, and frees the design of the learned algorithm from using safeguards. + +# 1. Introduction + +Learning-to-optimize utilizes machine learning techniques to tailor an optimization algorithm to a concrete family of optimization problems with similar structure. While this often leads to enormous gains in performance for problems similar to the ones during training, the learned algorithm might completely fail for others. Thus, to have trustworthy algorithms, guarantees are needed. In optimization, the best way to show that the algorithm behaves correctly is by proving its convergence to a critical point. In learning-to-optimize, + +$^{1}$ Department of Mathematics, University of Tübingen, Tübingen, Germany $^{2}$ Department of Mathematics and Computer Science, Saarland University, Saarbrücken, Germany. Correspondence to: Michael Sucker , Peter Ochs . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +however, proving convergence is a hard and long-standing problem. This is due to the fact that the problem instances are functions, which cannot be observed globally. Rather, the region explored during training is strongly influenced by the chosen initialization and the maximal number of iterations. This begs a fundamental problem for the theoretical analysis: + +It typically prevents the usage of both limits and the mathematical argument of induction. + +As convergence is, by definition, tied to the notion of limits, this subtlety prevents proving that the learned algorithm converges. A way to mitigate this problem rather easily is the usage of safeguards: The update step of the algorithm is restricted to such an extent that it can be analyzed similar to a hand-crafted algorithm, independently of the training. Yet, this comes at a price: + +Not only the analysis of the learned algorithm, also its performance is restricted and eventually similar to hand-crafted algorithms. + +Intuitively, the degradation in performance can be explained by the fact that this approach attempts to directly apply traditional convergence results, which are not well-suited for learning-to-optimize. Instead, we advocate for taking a new perspective, in which we make more use of our greatest advantage compared to traditional optimization: + +We can actually observe the algorithm during training. + +Thus, we present a new proof-strategy that allows us to derive convergence in learning-to-optimize by means of generalization. The core idea is to show that the properties of the trajectory, which are needed to deduce convergence of the algorithm, actually generalize to unseen problems (test cases). To demonstrate this, we combine a general convergence result from variational analysis with a PAC-Bayesian generalization theorem. This results in our main theorem, which is applicable in a (possibly) non-smooth non-convex optimization setup, and lower bounds the probability to observe a trajectory, generated by the learned algorithm, that converges to a critical point of the loss function. Here, we want to emphasize that, while we derive a convergence result for learning-to-optimize, the idea is not restricted to + +optimization. Rather, it applies more generally to sequential prediction models that exhibit a Markovian structure. + +# 2. Related Work + +This work draws on the fields of learning-to-optimize, the PAC-Bayesian learning approach, and convergence results based on the Kurdyka-Lojasiewicz property. For an introduction to learning-to-optimize, Chen et al. (2022) provide a good overview about the variety of approaches. Similarly, for the PAC-Bayesian approach, good introductory references are given by Guedj (2019), Alquier (2024), and Hellström et al. (2025), and for the usage of the Kurdyka-Lojasiewicz property, we refer to Attouch et al. (2013). + +Learning-to-Optimize with Guarantees. To date, learned optimization methods show impressive performance, yet lack theoretical guarantees (Chen et al., 2022). However, in some applications convergence guarantees are indispensable: It was shown that learning-based methods might fail to reconstruct the crucial details in a medical image (Möller et al., 2019). In the same work, the authors prove convergence of their learned method by restricting the update to descent directions. Similar safeguarding techniques were employed by Prémont-Schwarz et al. (2022) and Heaton et al. (2023). The basic idea is to constrain the learned object in such a way that known convergence results are applicable, and it has been applied successfully for different schemes and under different assumptions (Sreehari et al., 2016; Chan et al., 2017; Teodoro et al., 2017; Tirer & Giryes, 2019; Buzzard et al., 2018; Ryu et al., 2019; Sun et al., 2019; Terris et al., 2021; Cohen et al., 2021). A major advantage of these "constrained" methods is the fact that the number of iterations is not restricted a priori and that, often, some convergence guarantees can be provided. A major drawback, however, is their severe restriction: Typically, the update-step has to satisfy certain geometric properties, and the results only apply to specific algorithms and/or problems. Another approach, pioneered by Gregor & LeCun (2010), is unrolling, which limits the number of iterations, yet can be applied to any iterative algorithm. Here, the IHT algorithm is studied by Xin et al. (2016) while Chen et al. (2018) consider the unrolled ISTA. However, in the theoretical analysis of unrolled algorithms, the notion of convergence itself is difficult, and one rather has to consider the generalization performance: This has been done by means of Rademacher complexity (Chen et al., 2020), by using a stability analysis (Kobler et al., 2022), or in terms of PAC-Bayesian generalization guarantees (Sucker & Ochs, 2023; Sucker et al., 2024). Recently, generalization guarantees based on the whole trajectory of the algorithm, for example, the expected time to reach the stopping criterion, have been proposed (Sucker & Ochs, 2024). The main drawback of generalization + +guarantees is their reliance on a specific distribution. To solve this, another line of work studies the design of learned optimization algorithms and their training, and how it affects the possible guarantees (Wichrowska et al., 2017; Metz et al., 2019; 2022). Here, Liu et al. (2023) identify common properties of basic optimization algorithms and propose a math-inspired architecture. Similarly, Castera & Ochs (2024) analyze widely used optimization algorithms, extract common geometric properties from them, and provide design-principles for learning-to-optimize. + +PAC-Bayesian Generalization Bounds. The PAC-Bayesian framework allows for giving high probability bounds on the risk. The key ingredient is a change-of-measure inequality, which determines the divergence or distance in the resulting bound. While most bounds involve the Kullback-Leibler divergence as measure of proximity (McAllester, 2003a;b; Seeger, 2002; Langford & Shawe-Taylor, 2002; Catoni, 2004; 2007; Germain et al., 2009), more recently other divergences have been used (Honorio & Jaakkola, 2014; London, 2017; Bégin et al., 2016; Alquier & Guedj, 2018; Ohnishi & Honorio, 2021; Amit et al., 2022; Haddouche & Guedj, 2023). In doing so, the PAC-bound relates the true risk to other terms such as the empirical risk. Yet, it does not directly say anything about the absolute numbers. Therefore, one typically aims to minimize the provided upper bound (Langford & Caruana, 2001; Dziugaite & Roy, 2017; Pérez-Ortiz et al., 2021; Thiemann et al., 2017). Nevertheless, a known difficulty in PAC-Bayesian learning is the choice of the prior distribution, which strongly influences the performance of the learned models and the theoretical guarantees (Catoni, 2004; Dziugaite et al., 2021; Pérez-Ortiz et al., 2021). In part, this is due to the fact that the divergence term can dominate the bound, such that the posterior is close to the prior. Especially, this applies to the Kullback-Leibler divergence, and lead to the idea of choosing a data- or distribution-dependent prior (Seeger, 2002; Parrado-Hernández et al., 2012; Lever et al., 2013; Dziugaite & Roy, 2018; Pérez-Ortiz et al., 2021). + +The Kurdyka-Lojasiewicz inequality. Single-point convergence of the trajectory of an algorithm is a challenging problem, especially in non-smooth non-convex optimization. For example, Absil et al. (2005) show that this might fail even for simple algorithms like gradient descent on highly smooth functions. Further, they show that a remedy is provided by the Lojasiewicz inequality, which holds for real analytic functions (Bierstone & Milman, 1988). The large class of tame functions or definable functions excludes many pathological failure cases, and extensions of the Lojasiewicz inequality to smooth definable functions are provided by Kurdyka (1998). Similarly, extensions to the nonsmooth subanalytic or definable setting are shown by Bolte et al. (2007b), Bolte et al. (2007a), and Attouch & Bolte (2009), + +which yields the Kurdyka-Lojasiewicz inequality. It is important to note that most functions in practice are definable and thus satisfy the Kurdyka-Lojasiewicz inequality automatically. Using this, several algorithms have been shown to converge even for nonconvex functions (Attouch & Bolte, 2009; Attouch et al., 2010; 2013; Bolte et al., 2014; Ochs et al., 2014; Ochs, 2019). + +# 3. Contributions + +- We present a novel approach for deducing the convergence of a generic learned algorithm with high probability. In doing so, we effectively generalize the results of a worst-case convergence analysis into a probabilistic setting. Furthermore, the methodology does not restrict the design of the algorithm and is widely applicable, that is, it can also be used for other sequential prediction models that exhibit a Markovian structure. +- To showcase the idea, we combine the PAC-Bayesian generalization theorem provided by Sucker & Ochs (2024) with the abstract convergence theorem provided by Attouch et al. (2013) to derive a new convergence result for our learned optimization algorithm on (possibly) non-smooth non-convex loss-functions. In doing so, we bring together highly advanced tools from non-smooth non-convex optimization, stochastic process theory, and PAC-Bayesian learning theory, and effectively solve a long-standing problem of learning-to-optimize, namely how to obtain convergence guarantees without limiting the design of the algorithm. +- We conduct two experiments to show the validity of our claims: We use a neural-network based iterative optimization algorithm to a) solve quadratic problems and b) to train another neural network. In both cases, the learned algorithm outperforms the baseline and converges to a critical point with high probability. + +# 4. Simplified Key Idea + +Before detailing the setup for learning-to-optimize, we shortly (and informally) present the main underlying idea of our proof-strategy, which otherwise might be obscured by the details: Given an object $x$ and properties $a, b$ , and $c$ , we are interested in the implication + +$$ +x \text {s a t i s f i e s} a \wedge b \Longrightarrow x \text {s a t i s f i e s} c. +$$ + +Whenever a single object $x$ has properties $a$ and $b$ , we are sure that $x$ also possesses $c$ . However, given a collection of objects $\{x_1, x_2, \ldots\}$ , if the properties $a$ and $b$ only hold for some of these objects, the traditional "implication" is invalid for the collection, and the language of probability theory seems more appropriate: Here, $a$ , $b$ and $c$ have to be rephrased as sets $A := \{x : x \text{ has property } a\}$ , $B := \{x :$ + +$x$ has property $b\}$ , and $\mathsf{C} := \{x : x \text{ has property } c\}$ , such that the implication translates into an inclusion: + +$$ +\mathsf {A} \cap \mathsf {B} = \{x: x \text {s a t i s f i e s} a \wedge b \} \subset \{x: x \text {s a t i s f i e s} c \} = \mathsf {C}. +$$ + +This enables a more fine-grained result: If we are given a probability measure $\mu$ over objects $x$ , we can always conclude that $\mu\{\mathsf{A} \cap \mathsf{B}\} \leq \mu\{\mathsf{C}\}$ , that is, it is more likely to observe an object $x$ with property $c$ than to observe an object with properties $a$ and $b$ . Furthermore, if $\mu\{\mathsf{A} \cap \mathsf{B}\} = 1$ , we deduce that $c$ holds almost surely. + +Most of the time, however, calculating $\mu \{\mathsf{A}\cap \mathsf{B}\}$ is infeasible, so that it needs to be estimated on a data set. In this case, two questions arise: + +(i) Is the estimate representative for unseen data? +(ii) Why do we not simply estimate $\mu \{\mathsf{C}\}$ directly? + +The first question can be answered in terms of a generalization result. By contrast, the second question can be more subtle: If the property $c$ is observable, estimating $\mu\{\mathsf{C}\}$ should be preferred. However, this is not always possible. In our case, for example, the objects $x$ will be whole sequences, the property $c$ will be convergence to a critical point, and $\mu$ will be the distribution of a Markov process generated by the algorithm. Thus, without further assumptions it is practically impossible to observe property $c$ directly, because convergence of a sequence is a so-called asymptotic event, which belongs to the tail- $\sigma$ -algebra, that is, it does not depend on any finite number of iterates and therefore cannot be observed. + +To summarize: Ultimately, we are interested in how likely it is to observe an object $x$ that possesses property $c$ (here: a sequence generated by the learned algorithm that converges to a stationary point). For this, we need at least the distribution $\mu$ of the objects $x$ under consideration (see Theorem 6.3). Additionally, since property $c$ is unobservable, we resort to properties $a$ and $b$ , which imply $c$ (see Theorem 6.5). Then, to be able to assign probabilities to these properties, we need to translate them into measurable sets in the appropriate space (see Section 7.1). This allows for estimating the probability to observe objects $x$ that possess $a$ and $b$ , which in turn is a lower bound on how many objects possess $c$ . Finally, since this estimate depends on the training data, we need to make sure that it also generalizes to unseen problems (see Theorem 7.6). + +# 5. Notation + +We write generic sets in type-writer font, for example, $\mathsf{A} \subset \mathbb{R}^d$ , and generic spaces in script-font, for example, $\mathcal{X}$ . Given a metric space $\mathcal{X}$ , $\mathsf{B}_{\varepsilon}(x)$ denotes the open ball + +around $x \in \mathfrak{X}$ with radius $\varepsilon > 0$ , and we assume every metric space to be endowed with the metric topology and corresponding Borel $\sigma$ -field $\mathfrak{B}(\mathfrak{X})$ . Similarly, given a product space $\mathfrak{X} \times \mathcal{Y}$ , the product $\sigma$ -algebra is denoted by $\mathfrak{B}(\mathfrak{X}) \otimes \mathfrak{B}(\mathcal{Y})$ . We consider the space $\mathbb{R}^d$ with Euclidean norm $\|\cdot\|$ and, for notational simplicity, abbreviate $\mathfrak{X} := \mathbb{R}^d$ and $\mathcal{P} := \mathbb{R}^q$ . The space of sequences in $\mathfrak{X}$ is denoted by $\mathfrak{X}^{\mathbb{N}_0}$ , and we endow it with the product $\sigma$ -algebra, which is the smallest $\sigma$ -algebra, such that all canonical projections $\pi_i: \mathfrak{X}^{\mathbb{N}_0} \to \mathfrak{X}$ , $(z^{(t)})_{t \in \mathbb{N}_0} \mapsto z^{(i)}$ , are measurable. For notions from non-smooth analysis, we follow Rockafellar & Wets (1998). In short, a function $f: \mathfrak{X} \to \mathbb{R} \cup \{+\infty\}$ is called proper, if $f(z) < +\infty$ for at least one $z \in \mathfrak{X}$ , and we denote its effective domain by $\operatorname{dom} f$ . Further, it is called lower semi-continuous, if $\lim \inf_{z \to \bar{z}} f(z) \geq f(\bar{z})$ for all $\bar{z} \in \mathfrak{X}$ . Furthermore, for $z \in \operatorname{dom} f$ , the (limiting) subdifferential of $f$ at $z$ is denoted by $\partial f(z)$ . Similarly, for $f: \mathfrak{X} \times \mathcal{P} \to \mathbb{R} \cup \{+\infty\}$ , $\partial_1 f(z_1, z_2)$ denotes the (partial) subdifferential of $f(\cdot, z_2)$ at $z_1$ . In general, $\partial f: \mathfrak{X} \Rightarrow \mathfrak{X}$ is a set-valued mapping, and we denote its domain and graph by $\operatorname{dom} \partial f$ and $\operatorname{gph} \partial f$ , respectively. Here, a set-valued mapping $T: \mathbb{R}^k \Rightarrow \mathbb{R}^l$ is said to be outer semi-continuous at $\bar{x}$ , if $\lim \sup_{x \to \bar{x}} T(x) \subset T(\bar{x})$ , where the outer limit is defined as $\lim \sup_{x \to \bar{x}} T(x) = \{u | \exists x^{(t)} \to \bar{x}, \exists u^{(t)} \to u$ with $u^{(t)} \in T(x^{(t)})\}$ . For convenience of the reader, we have collected more details in Appendix A. Also, the exact definition of a Kurdyka-Lojasiewicz (KL) function can be found there, as it is quite intricate. However, for the following, it is actually sufficient to understand that these are functions that are "sharp up to reparametrization" (Atouch et al., 2013), and that many functions encountered in real-world problems are KL-functions. Finally, the space of measures on $\mathfrak{X}$ is denoted by $\mathcal{M}(\mathfrak{X})$ , and all probability measures that are absolutely continuous w.r.t. a reference measure $\mu \in \mathcal{M}(\mathfrak{X})$ are denote by $\mathcal{M}_1(\mu) := \{\nu \in \mathcal{M}(\mathfrak{X}) : \nu \ll \mu$ and $\nu[\mathfrak{X}] = 1\}$ . Here, the Kullback-Leibler divergence between two measures $\mu$ and $\nu$ is defined as $D_{\mathrm{KL}}(\nu \| \mu) = \nu[\log(f)] = \int_{\mathfrak{X}} \log(f(x)) \nu(dx)$ , if $\nu \ll \mu$ with density $f$ , and $+\infty$ otherwise. + +# 6. Problem Setup + +Instead of considering a whole class of problems, we assume that we are given a parametric loss-function $\ell : \mathcal{X} \times \mathcal{P} \to [0, \infty]$ and a random variable $P$ taking values in the parameter space $\mathcal{P} = \mathbb{R}^q$ . Here, $\mathcal{Z} = \mathbb{R}^d$ is the optimization space and the ultimate goal would be to solve + +$$ +\min _ {z \in \mathfrak {X}} \ell (z, p) +$$ + +for every realization $P = p$ . Since we include non-convex optimization problems, finding the global minimum is infeasible, and we focus on finding a critical point instead. For this, we apply an algorithmic update $\mathcal{A}:\mathcal{H}\times \mathcal{P}\times \mathcal{E}\times \mathcal{R}\to$ + +$\mathcal{E}$ iteratively to the initial state $z^{(0)} \in \mathcal{E}$ : + +$$ +z ^ {(t + 1)} = \mathcal {A} (h, p, z ^ {(t)}, r ^ {(t + 1)}), \quad t \in \mathbb {N} _ {0}. \tag {1} +$$ + +Here, the hyperparameters $h \in \mathcal{H}$ allow for adjusting the algorithm, the parameters $p \in \mathcal{P}$ specify the loss function $\ell(\cdot, p)$ the algorithm is applied to, and $r^{(t+1)} \in \mathcal{R}$ models the (internal) randomness of the algorithm. To find suitable hyperparameters $h \in \mathcal{H}$ , the algorithm $\mathcal{A}$ is trained on an i.i.d. data set of problem parameters $S = (P_1, \dots, P_N)$ in such a way that its performance on $\ell$ is superior to that of traditional algorithms. However, in optimization "performance" is usually measured based on the whole sequence $(z^{(t)})_{t \in \mathbb{N}_0}$ , for example, a linear rate of convergence has to hold for all iterations. Thus, to deal with such measures of performance, one needs to access the trajectories generated by $\mathcal{A}$ . This is where the Markovian model of Sucker & Ochs (2024) comes into play: If $h$ and $p$ are fixed along the iterations, Equation (1) can be read as the functional equation of a Markov process $\xi = (z^{(t)})_{t \in \mathbb{N}_0}$ , which defines a distribution on $\mathcal{Z}^{\mathrm{No}}$ and thus allows for analyzing these trajectories. It is based on the following two assumptions: + +Assumption 6.1. The state space $(\mathcal{Z},\mathfrak{B}(\mathcal{Z}),\mathbb{P}_I)$ , the parameter space $(\mathcal{P},\mathfrak{B}(\mathcal{P}),\mathbb{P}_P)$ , the hyperparameter space $(\mathcal{H},\mathfrak{B}(\mathcal{H}),\mathbb{P}_H)$ , and the randomization space $(\mathcal{R},\mathfrak{B}(\mathcal{R}),\mathbb{P}_R)$ are Polish1 probability spaces. + +Assumption 6.2. The (possibly extended-valued) loss-function $\ell : \mathcal{E} \times \mathcal{P} \to [0, \infty]$ and the algorithmic update $\mathcal{A} : \mathcal{H} \times \mathcal{P} \times \mathcal{E} \times \mathcal{R} \to \mathcal{E}$ are both measurable. + +Then, Sucker & Ochs (2024) construct a suitable probability space $(\Omega, \mathfrak{A}, \mathbb{P})$ that correctly models the joint distribution of $(H, P, \xi)$ on $\mathcal{H} \times \mathcal{P} \times \mathcal{E}^{\mathbb{N}_0}$ , that is, the joint distribution over hyperparameters $h$ , problem parameters $p$ , and corresponding trajectories $\xi$ generated by $\mathcal{A}(h, p, \cdot, \cdot)$ . By leveraging a well-known result due to Catoni (2007), they show that properties of trajectories $\xi$ , encoded as sets $\mathsf{A} \in \mathfrak{B}(\mathcal{P}) \otimes \mathfrak{B}(\mathcal{E})^{\otimes \mathbb{N}_0}$ , generalize in a PAC-Bayesian way (Sucker & Ochs, 2024, Theorem 42): + +Theorem 6.3. Let $\mathsf{A} \subset \mathcal{P} \times \mathfrak{X}^{\mathbb{N}_0}$ be measurable, and define $\Phi_a^{-1}(p) \coloneqq \frac{1 - \exp(-ap)}{1 - \exp(-a)}$ . Then, for $\lambda \in (0,\infty)$ , it holds that: + +$$ +\begin{array}{l} \mathbb {P} _ {S} \Big \{\forall \rho \in \mathcal {M} _ {1} (\mathbb {P} _ {H}): \rho [ \mathbb {P} _ {(P, \xi) | H} \{\mathrm {A} \} ] \leq \\ \Phi_ {\frac {\lambda}{N}} ^ {- 1} \left(\frac {1}{N} \sum_ {n = 1} ^ {N} \rho \left[ \mathbb {P} _ {(P _ {n}, \xi_ {n}) | H, P _ {n}} \{\mathsf {A} \} \right] \right. \\ \left. \left. + \frac {D _ {\mathrm {K L}} \left(\rho \parallel \mathbb {P} _ {H}\right) + \log \left(\frac {1}{\varepsilon}\right)}{\lambda}\right) \right\} \geq 1 - \varepsilon . \\ \end{array} +$$ + +Here, $\mathbb{P}_H$ is the so-called prior over hyperparameters. Every $\rho \in \mathcal{M}_1(\mathbb{P}_H)$ is called a posterior, $\mathbb{P}_{(P,\xi)|H}$ is the conditional distribution of the parameters with corresponding + +trajectory, given the hyperparameters, and $\mathbb{P}_S$ is the distribution of the data set $S$ . On an intuitive level, the probability to observe a problem instance $\ell(\cdot, p)$ and a corresponding trajectory $\xi$ generated by the algorithm $\mathcal{A}(h, p, \cdot, \cdot)$ , which satisfies the properties encoded in $\mathsf{A}$ , can be bounded based on empirical estimates. It is important to note that, except for a brief remark, Sucker & Ochs (2024) do not make any further use of this result. In this paper, we observe the power of this theorem and apply it to the set of sequences that converge to a critical point of $\ell$ . + +Definition 6.4. Let $f: \mathcal{X} \to \mathbb{R} \cup \{+\infty\}$ be proper. A point $z \in \mathcal{X}$ is called critical for $f$ , if $0 \in \partial f(z)$ . + +It is crucial to realize that, usually it is impossible to observe convergence directly, as it belongs to the class of tail events, which do not depend on any finite number of iterates. Hence, to be able to apply the generalization result from above, we need abstract properties that do not depend on the implementation of the algorithm, are easily observable during training, and are sufficient to deduce convergence, which, as we discussed in the related work, is highly non-trivial in the challenging setup of non-smooth non-convex optimization. Nevertheless, such conditions are provided by the following result due to Attouch et al. (2013, Theorem 2.9): + +Theorem 6.5. Let $f: \mathcal{X} \to \mathbb{R} \cup \{+\infty\}$ be a proper lower semi-continuous function that is bounded from below. Further, suppose that $(z^{(t)})_{t \in \mathbb{N}_0} \subset \mathcal{X}$ is a sequence satisfying the following property: There exist positive scalars $a$ and $b$ , such that the following conditions hold: + +(i) Sufficient-decrease: For each $t \in \mathbb{N}_0$ , $f(z^{(t + 1)}) + a\| z^{(t + 1)} - z^{(t)}\|^2 \leq f(z^{(t)})$ . +(ii) Relative-error: For each $t \in \mathbb{N}_0$ , there exists $v^{(t+1)} \in \partial f(z^{(t+1)})$ with $\| v^{(t+1)} \| \leq b \| z^{(t+1)} - z^{(t)} \|$ . +(iii) Continuity: For any convergent subsequence $z^{(t_j)} \stackrel{j \to \infty}{\rightarrow} \hat{z}$ , we have $f(z^{(t_j)}) \stackrel{j \to \infty}{\rightarrow} f(\hat{z})$ . + +If, additionally, the sequence $(z^{(t)})_{t\in \mathbb{N}_0}$ is bounded and $f$ is a Kurdyka-Lojasiewicz function, then $(z^{(t)})_{t\in \mathbb{N}_0}$ converges to a critical point of $f$ . + +Remark 6.6. (i) The continuity condition cannot be checked in practice. Therefore, we will have to assume that $\ell (\cdot ,p)$ is continuous on its domain. + +(ii) Theorem 2.9 of Attouch et al. (2013) is stated slightly different: They assume existence of a convergent subsequence instead of boundedness. Yet, boundedness implies existence and is standard (Bolte et al., 2014). +(iii) In Appendix B, we provide examples to underline the necessity of these conditions. Especially, we show that the sufficient-descent condition alone is not sufficient + +for deducing convergence to a critical point, which appears to be a common misconception. + +Since we want to employ these results from variational calculus, we have to make the restriction to $\mathcal{X} = \mathbb{R}^d$ and $\mathcal{P} = \mathbb{R}^q$ . However, one could also consider a (finite-dimensional) state space $\mathcal{X}$ that encompasses the space of the optimization variable, that is, $\mathcal{X} = \mathbb{R}^{d_1} \times \mathbb{R}^{d_2}$ , and, by projecting onto $\mathbb{R}^{d_1}$ , the results carry over immediately. + +Assumption 6.7. We have $\mathcal{Z} = \mathbb{R}^d$ and $\mathcal{P} = \mathbb{R}^q$ , and the function $\ell : \mathcal{Z} \times \mathcal{P} \to [0, \infty]$ is proper, lower semicontinuous, and continuous on $\operatorname{dom} \ell$ . Furthermore, the map $(z, p) \mapsto \partial_1 \ell(z, p)$ is outer semi-continuous. + +# 7. Theoretical Results + +Now, we concretize our key idea from Section 4 for the setting of learning-to-optimize, and combine Theorem 6.3 with Theorem 6.5 to get a generalization result for the convergence of learned algorithms to critical points. In doing so, we bring together advanced tools from learning theory and optimization: We show that the probability to observe a parameter $p$ and a corresponding trajectory $\xi$ , which converges to a critical point of $\ell(\cdot, p)$ , generalizes. For this, we formulate the sufficient-descent condition, the relative-error condition, and the boundedness assumption as measurable sets in $\mathcal{P} \times \mathcal{X}^{\mathbb{N}_0}$ , such that their intersection is exactly the set of sequences satisfying the properties of Theorem 6.5. + +# 7.1. Measurability + +While measurability is usually dismissed as a technicality, it is absolutely necessary for the validity of employed theorems. Thus, to be able to apply Theorem 6.3, we have to show that these sets are actually measurable w.r.t. $\mathfrak{B}(\mathcal{P})\otimes \mathfrak{B}(\mathcal{Z})^{\otimes \mathbb{N}_0}$ , which, unfortunately, is not a given. Hence, denote the (parametric) set of critical points of $\ell$ by + +$$ +\mathsf {A} _ {\mathrm {c r i t}} := \left\{(p, z) \in \mathcal {P} \times \mathcal {Z}: 0 \in \partial_ {1} \ell (z, p) \right\}. +$$ + +Then, the section $\mathsf{A}_{\mathrm{crit},p} \coloneqq \{z \in \mathcal{X} : (p,z) \in \mathsf{A}_{\mathrm{crit}}\}$ is the set of critical points of $\ell(\cdot,p)$ . + +Lemma 7.1. Suppose that Assumptions 6.1, 6.2 and 6.7 hold. Define the (parametric) set of sequences that converge to a critical point of $\ell$ as + +$$ +\begin{array}{l} \mathsf {A} _ {\text {c o n v}} := \left\{\left(p, \left(z ^ {(t)}\right) _ {t \in \mathbb {N} _ {0}}\right) \in \mathscr {P} \times \mathscr {Z} ^ {\mathbb {N} _ {0}}: \right. \\ \exists z ^ {*} \in \mathsf {A} _ {\mathrm {c r i t}, p} s. t. \lim _ {t \to \infty} \| z ^ {(t)} - z ^ {*} \| = 0 \}. \\ \end{array} +$$ + +Then $\mathsf{A}_{\mathrm{conv}}$ is measurable. + +Proof. The proof is highly non-trivial and can be found in Appendix C. However, the idea is simple: $\mathsf{A}_{\mathrm{conv}}$ can be + +written as countable intersection/union of measurable sets. This is possible, because we consider Polish spaces, that is, they have a countable dense subset and they are complete, that is, limits of Cauchy sequences are inside the space. $\square$ + +Lemma 7.2. Assume that Assumptions 6.1 and 6.2 hold. Define the (parametric) set of sequences that satisfy the sufficient-descent condition as + +$$ +\begin{array}{l} \mathsf {A} _ {\text {d e s c}} := \left\{\left(p, \left(z ^ {(t)}\right) _ {t \in \mathbb {N} _ {0}}\right) \in \mathcal {P} \times \mathcal {Z} ^ {\mathbb {N} _ {0}}: \right. \\ \left(z ^ {(t)}\right) _ {t \in \mathbb {N} _ {0}} \subset \operatorname {d o m} \ell (\cdot , p) a n d \exists a > 0 s. t. \forall t \in \mathbb {N} _ {0} \\ \left. \ell (z ^ {(t + 1)}, p) + a \| z ^ {(t + 1)} - z ^ {(t)} \| ^ {2} \leq \ell (z ^ {(t)}, p) \right\}. \\ \end{array} +$$ + +Then $\mathsf{A}_{\mathrm{desc}}$ is measurable. + +Proof. The proof can be found in Appendix D. + +![](images/3afb208532509b5224a310c1a75a2bd37fc1c7c05e8b42609ad43cbf1f026eff.jpg) + +We proceed with the relative error condition. It involves a union over all subgradients, and thus might not be measurable. Hence, we have to restrict to subgradients given through a measurable selection, that is, a measurable function $v: \operatorname{dom} \partial_1\ell \to \mathfrak{X}$ , such that $v(z,p) \in \partial_1\ell (z,p)$ for every $(z,p) \in \operatorname{dom}\partial_1\ell$ . Under the given assumptions, its existence is guaranteed by Corollary E.3. + +Lemma 7.3. Suppose that Assumptions 6.1, 6.2 and 6.7 hold. Define the (parametric) set of sequences that satisfy the relative-error condition as + +$$ +\begin{array}{l} \mathsf {A} _ {\text {e r r}} := \left\{\left(p, \left(z ^ {(t)}\right) _ {t \in \mathbb {N} _ {0}}\right) \in \mathcal {P} \times \mathcal {E} ^ {\mathbb {N} _ {0}}: \right. \\ (p, z ^ {(t)}) \in \operatorname {d o m} \partial_ {1} \ell \forall t \in \mathbb {N} _ {0} a n d \exists b > 0 s. t. \forall t \in \mathbb {N} _ {0} \\ \left. \left\| v \left(z ^ {(t + 1)}, p\right) \right\| \leq b \| z ^ {(t + 1)} - z ^ {(t)} \| \right\}. \\ \end{array} +$$ + +Then $\mathsf{A}_{\mathrm{err}}$ is measurable. + +Proof. The proof can be found in Appendix E. + +![](images/350ab622affe9bfa1e175998225a1b4578cb253f24667669085ce3b38e37a848.jpg) + +Lemma 7.4. Assume that Assumption 6.1 holds. Define the set of bounded sequences as: + +$$ +\begin{array}{l} \tilde {\mathsf {A}} _ {\text {b o u n d}} = \left\{\left(z ^ {(t)}\right) _ {t \in \mathbb {N} _ {0}} \in \mathcal {E} ^ {\mathbb {N} _ {0}}: \right. \\ \left. \exists c \geq 0 \text {s . t .} \| z ^ {(t)} \| \leq c \forall t \in \mathbb {N} _ {0} \right\}. \\ \end{array} +$$ + +Then $\mathsf{A}_{\mathrm{bound}}\coloneqq \mathcal{P}\times \tilde{\mathsf{A}}_{\mathrm{bound}}$ is measurable. + +Proof. The proof can be found in Appendix F. + +![](images/af99aefadced182ce5a3840fcd1c706dc783277f52f34a44d6c8e2204ae2d777.jpg) + +# 7.2. Convergence to critical points + +We are now in a position to derive our main result. + +Corollary 7.5. Suppose that Assumptions 6.1, 6.2, and 6.7 hold. Furthermore, assume that $\ell(\cdot, p)$ is a Kurdyka-Lojasiewicz function for every $p \in \mathcal{P}$ . Then the sets $\mathsf{A}_{\mathrm{desc}} \cap \mathsf{A}_{\mathrm{err}} \cap \mathsf{A}_{\mathrm{bound}} \subset \mathcal{P} \times \mathfrak{X}^{\mathbb{N}_0}$ and $\mathsf{A}_{\mathrm{conv}} \subset \mathcal{P} \times \mathfrak{X}^{\mathbb{N}_0}$ are measurable, and it holds that: + +$$ +\mathrm {A} _ {\text {d e s c}} \cap \mathrm {A} _ {\text {e r r}} \cap \mathrm {A} _ {\text {b o u n d}} \subset \mathrm {A} _ {\text {c o n v}}. +$$ + +Proof. Let $(p, (z^{(t)})_{t \in \mathbb{N}_0}) \in \mathsf{A}_{\mathrm{desc}} \cap \mathsf{A}_{\mathrm{err}} \cap \mathsf{A}_{\mathrm{bound}}$ . Thus, $(z^{(t)})_{t \in \mathbb{N}_0}$ satisfies both the sufficient-descent and the relative-error condition for $\ell(\cdot, p)$ , and $(z^{(t)})_{t \in \mathbb{N}_0}$ stays bounded. Further, $(z^{(t)})_{t \in \mathbb{N}_0}$ also satisfies the continuity condition, since we have $(z^{(t)})_{t \in \mathbb{N}_0} \subset \operatorname{dom} \ell(\cdot, p)$ and $\ell$ is continuous on its domain. Hence, Theorem 6.5 implies that $(z^{(t)})_{t \in \mathbb{N}_0}$ converges to a critical point of $\ell(\cdot, p)$ , that is, there exists $z^* \in \mathsf{A}_{\mathrm{crit}, p}$ , such that $\lim_{t \to \infty} \| z^{(t)} - z^* \| = 0$ . Therefore, $(p, (z^{(t)})_{t \in \mathbb{N}_0}) \in \mathsf{A}_{\mathrm{conv}}$ . + +In particular, if $\mu$ is a (probability) measure on $\mathcal{P} \times \mathcal{Z}^{\mathbb{N}_0}$ , for example, $\mu = \mathbb{P}_{(P,\xi)|H = h}$ for a given $h \in \mathcal{H}$ , by the monotonicity of measures it holds that: + +$$ +\mu \left\{\mathrm {A} _ {\text {d e s c}} \cap \mathrm {A} _ {\text {e r r}} \cap \mathrm {A} _ {\text {b o u n d}} \right\} \leq \mu \left\{\mathrm {A} _ {\text {c o n v}} \right\}. +$$ + +This idea yields our main theorem: + +Theorem 7.6. Suppose that Assumptions 6.1, 6.2, and 6.7 hold. Further, assume that $\ell(\cdot, p)$ is a Kurdyka-Lojasiewicz function for every $p \in \mathcal{P}$ . Abbreviate $\mathsf{A} := \mathsf{A}_{\mathrm{desc}} \cap \mathsf{A}_{\mathrm{err}} \cap \mathsf{A}_{\mathrm{bound}}$ . Then, for $\lambda \in (0, \infty)$ , it holds that: + +$$ +\begin{array}{l} \mathbb {P} _ {S} \left\{\forall \rho \in \mathcal {M} _ {1} \left(\mathbb {P} _ {H}\right): \rho \left[ \mathbb {P} _ {(P, \xi) | H} \left\{\mathrm {A} _ {\text {c o n v}} \right\} \right] \geq 1 - \right. \\ \Phi_ {\frac {\lambda}{N}} ^ {- 1} \left(\frac {1}{N} \sum_ {n = 1} ^ {N} \rho \left[ \mathbb {P} _ {(P _ {n}, \xi_ {n}) | H, P _ {n}} \left\{\mathsf {A} ^ {c} \right\} \right] \right. \\ \left. \left. + \frac {D _ {\mathrm {K L}} (\rho \| \mathbb {P} _ {H}) + \log \left(\frac {1}{\varepsilon}\right)}{\lambda}\right) \right\} \geq 1 - \varepsilon . \\ \end{array} +$$ + +Proof. By taking the complementary events in Corollary 7.5, we have $\mathbb{P}_H$ -a.s.: + +$$ +\mathbb {P} _ {(P, \xi) | H} \left\{\mathsf {A} ^ {c} \right\} \geq 1 - \mathbb {P} _ {(P, \xi) | H} \left\{\mathsf {A} _ {\text {c o n v}} \right\}. +$$ + +By Theorem 6.3, for any measurable set $\mathsf{B} \subset \mathcal{P} \times \mathcal{E}^{\mathbb{N}_0}$ and $\lambda \in (0,\infty)$ , we have: + +$$ +\begin{array}{l} \mathbb {P} _ {S} \Big \{\forall \rho \in \mathcal {M} _ {1} (\mathbb {P} _ {H}): \rho [ \mathbb {P} _ {(P, \xi) | H} \{\mathsf {B} \} ] \leq \\ \Phi_ {\frac {\lambda}{N}} ^ {- 1} \left(\frac {1}{N} \sum_ {n = 1} ^ {N} \rho \left[ \mathbb {P} _ {\left(P _ {n}, \xi_ {n}\right) \mid H, P _ {n}} \{\mathsf {B} \} \right] \right. \\ \left. \left. + \frac {D _ {\mathrm {K L}} (\rho \| \mathbb {P} _ {H}) + \log \left(\frac {1}{\varepsilon}\right)}{\lambda}\right) \right\} \geq 1 - \varepsilon . \\ \end{array} +$$ + +Hence, using $\mathsf{B} \coloneqq \mathsf{A}^c$ , inserting the inequality above, and rearranging the terms yields the result. + +Remark 7.7. (i) The lower bound actually applies to $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}\}$ . Since the difference $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}_{\mathrm{conv}}\backslash \mathsf{A}\}$ is unknown, we do not know the tightness of this bound for $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}_{\mathrm{conv}}\}$ . + +(ii) We want to stress the following: We do not assume that the conditions of Theorem 6.5, for example, the sufficient-descent condition, do hold per se. As described in Section 4 about the underlying idea, this theorem is rather about the fact that, based on our observations during training, we can deduce how often these conditions will hold on unseen problem instances. +(iii) For large $N$ , if $\lambda$ is chosen correctly, we can approximate $\Phi_{\frac{\lambda}{N}}^{-1}(p)\approx p$ . Assuming this holds, and abbreviating the empirical approximation as $\hat{\mathbb{P}}_{(P,\xi)|H}:= \frac{1}{N}\sum_{n = 1}^{N}\mathbb{P}_{(P_n,\xi_n)|H,P_n}$ , the inequality reads: + +$$ +\begin{array}{l} \rho [ \mathbb {P} _ {(P, \xi) | H} \{\mathsf {A} _ {\mathrm {c o n v}} \} ] \geq \rho \left[ \hat {\mathbb {P}} _ {(P, \xi) | H} \{\mathsf {A} \} \right] \\ + \frac {D _ {\mathrm {K L}} (\rho \| \mathbb {P} _ {H}) + \log \left(\frac {1}{\varepsilon}\right)}{\lambda}. \\ \end{array} +$$ + +This is intuitive: For larger $N$ , we have more confidence in our estimate $\hat{\mathbb{P}}_{(P,\xi)|H}\{\mathsf{A}\}$ , so we can choose a larger $\lambda$ which dampens the last term and tightens the lower bound for $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}_{\mathrm{conv}}\}$ . + +# 8. Experiments + +In this section, we conduct two experiments: The strongly convex and smooth problem of minimizing quadratic functions with varying strong convexity, varying smoothness, and varying right-hand side, and the non-smooth non-convex problem of training a neural network on different data sets. The code to reproduce the results can be found at https://github.com/MichiSucker/COLA_2024. + +# 8.1. Quadratic Problems + +First, we train the algorithm $\mathcal{A}$ to solve quadratic problems. Thus, each optimization problem $\ell (\cdot ,p)$ is of the form + +$$ +\min _ {z \in \mathbb {R} ^ {d}} \frac {1}{2} \| A z - b \| ^ {2}, \quad A \in \mathbb {R} ^ {d \times d}, b \in \mathbb {R} ^ {d}, +$$ + +such that the parameters are given by $p = (A,b)\in$ $\mathbb{R}^{d^2 +d} = \mathcal{P}$ , and the optimization variable is $z\in$ $\mathbb{R}^d$ $d = 200$ . The strong-convexity and smoothness constants of $\ell$ are sampled randomly in the intervals $[m_{-},m_{+}],[L_{-},L_{+}]\subset (0, + \infty)$ , and we define the matrix $A_{j}$ $j = 1,\dots,N$ as diagonal matrix with entries $a_{ii}^{j} = \sqrt{m_{j}} +i(\sqrt{L_{j}} -\sqrt{m_{j}}) / d,i = 1,\dots,d.$ In principle, this is a severe restriction. However, we do not use this knowledge explicitly in the design of our algorithm $\mathcal{A}$ + +that is, if the algorithm "finds" this structure during learning by itself, it can leverage on it. Like this, the given class of functions is $L_{+}$ -smooth and $m_{-}$ -strongly convex, such that we use heavy-ball with friction (HBF) (Polyak, 1964) as worst-case optimal baseline. Its update is given by $z^{(t + 1)} = z^{(t)} - \beta_1\nabla f(z^{(t)}) + \beta_2\left(z^{(t)} - z^{(t - 1)}\right)$ , where the optimal worst-case convergence rate is attained for $\beta_{1} = \left(\frac{2}{\sqrt{L_{+}} + \sqrt{\mu_{-}}}\right)^{2}, \beta_{2} = \left(\frac{\sqrt{L_{+}} - \sqrt{\mu_{-}}}{\sqrt{L_{+}} + \sqrt{\mu_{-}}}\right)^{2}$ (Nesterov, 2018). Similarly, the learned algorithm $\mathcal{A}$ performs an update of the form $z^{(t + 1)} = z^{(t)} + \beta^{(t)}d^{(t)}$ , where $\beta^{(t)}$ and $d^{(t)}$ are predicted by separate blocks of a neural network. Here, we stress that the update is not constrained in any way. For more details on the architecture we refer to Appendix G. Since the functions are smooth and strongly convex, we only have to check the sufficient-descent condition and the relative-error condition. Obviously, in practice it is impossible to check them for all $t \in \mathbb{N}_0$ . Thus, we restrict to $t_{\mathrm{train}} = 500$ iterations. Then, given a measurable selection $v(z,p) \in \partial_1\ell (z,p)$ , the relative-error condition is trivially satisfied with $b := \max_{t \leq t_{\mathrm{train}}} \left\{ \| v(z^{(t)},p)\| \right\} / \min_{t \leq t_{\mathrm{train}}} \| z^{(t)} - z^{(t - 1)}\|$ , such that we only have to check the sufficient-descent condition during training. Finally, we consider $\xi$ to be converged, if the loss is smaller than $10^{-16}$ . For more details we refer again to Appendix G. The results are shown in Figure 1: The left plot shows the distance to the minimizer $z^*$ over the iterations, where HBF is shown in blue and the learned algorithm in pink, and we can see that the learned algorithm is clearly superior. The right plot shows the estimated probabilities $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}\}$ (yellow dashed line), $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}_{\mathrm{conv}}\}$ (purple dashed line), and the PAC-bound (orange dotted line) on 250 test sets of size $N = 250$ . We can see that the PAC-bound is quite tight for $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}\}$ , while there is a substantial gap $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}_{\mathrm{conv}}\setminus \mathsf{A}\}$ . Nevertheless, it guarantees convergence of the learned algorithm in about $75\%$ of the test problems. + +# 8.2. Training a Neural Network + +As second experiment, we train the algorithm $\mathcal{A}$ to train a neural network $\mathbb{N}$ on a regression problem. Thus, the algorithm $\mathcal{A}$ predicts parameters $\beta \in \mathbb{R}^d$ , such that $\mathbb{N}(\beta, \cdot)$ estimates a function $g: \mathbb{R} \to \mathbb{R}$ from noisy observations $y_{i,j} = g_i(x_j) + \varepsilon_{i,j}$ , $i = 1, \dots, N$ , $j = 1, \dots, K$ ( $K = 50$ ), with $\varepsilon_{i,j} \stackrel{i,d}{\sim} \mathbb{N}(0,1)$ . Here, we use the mean square error as loss for the neural network, and for $\mathbb{N}$ we use a fully-connected two layer neural network with ReLU-activation functions. Then, by using the data sets as parameters, that is, $\mathcal{P} = \mathbb{R}^{K \times 2}$ and $p_i = \{(x_{i,j}, y_{i,j})\}_{j=1}^K$ , the loss functions for the algorithm are given by $\ell(\beta, p_i) := \frac{1}{K} \sum_{j=1}^{K} (\mathbb{N}(\beta, x_{i,j}) - y_{i,j})^2$ , which are non-smooth and non-convex in $\beta$ . Here, the input $x$ is transformed into the vector $(x, x^2, \dots, x^5)$ , such that the parameters $\beta \in \mathbb{R}^d$ are given by the weights $A_1 \in \mathbb{R}^{50 \times 5}$ , $A_2 \in \mathbb{R}^{1 \times 50}$ and + +![](images/e693aaa14c1918b180a486c0cf99c5b240c2141cc52a002498cb9eb1a703c327.jpg) +Figure 1. Quadratic problems: The left figure shows the distance to the minimizer over the iterations, where heavy-ball with friction (HBF) is shown in blue and the learned algorithm in pink. The mean and median are shown as dashed and dotted lines, respectively, while the shaded region represents $95\%$ of the test data. One can see that the learned algorithm converges way faster than HBF. The right plot shows the estimates (dashed lines) for $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}\}$ (orange), $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}_{\mathrm{conv}}\}$ (purple), and the PAC-bound (dark orange). One can see that the predicted chain of inequalities $1 - \Phi^{-1}(\ldots)\leq \mathbb{P}_{(P,\xi)|H}\{\mathsf{A}\} \leq \mathbb{P}_{(P,\xi)|H}\{\mathsf{A}_{\mathrm{conv}}\}$ does hold true. + +![](images/894e155fb54987a63fed9fe58b146482f591701338f056bfdff97bf1d9603ad3.jpg) + +biases $b_{1} \in \mathbb{R}^{50}, b_{2} \in \mathbb{R}$ of the two fully-connected layers. Thus, the optimization space is of dimension $p = 351$ . For the functions $g_{i}$ we use polynomials of degree $d = 5$ , where we sample the coefficients $(c_{i,0}, \ldots, c_{i,5})$ uniformly in $[-5, 5]$ . Similarly, we sample the points $\{x_{i,j}\}_{j=1}^{K}$ uniformly in $[-2, 2]$ . As baseline we use Adam (Kingma & Ba, 2015) as it is implemented in PyTorch (Paszke et al., 2019), and we tune its step-size with a simple grid search over 100 values in $[10^{-4}, 10^{-2}]$ , such that its performance is best for the given $t_{\mathrm{train}} = 250$ iterations. This yields the value $\kappa = 0.008$ . Note that we use Adam in the "full-batch setting" here, while, originally, it was introduced for the stochastic case. On the other hand, the learned algorithm performs the update $z^{(t+1)} = z^{(t)} + d^{(t)} / \sqrt{t}$ , where $d^{(t)}$ is predicted by a neural network. Again, we stress that $d^{(t)}$ is not constrained in any way. For more details on the architecture, we refer to Appendix I. As we cannot access the critical points directly, we approximate them by running gradient descent for $5 \cdot 10^{4}$ iterations with a step-size of $1 \cdot 10^{-6}$ , starting for each problem and algorithm from the last iterate ( $t = 500$ ). Similarly, we cannot estimate the convergence probability in this case, only the probability for the event A. The results of this experiment are shown in Figure 2: The left plot shows the distance to the critical point and the plot in the middle shows the loss. Here, Adam is shown in blue, while the learned algorithm is shown in pink. Finally, the right plot shows the estimate for $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}\}$ and the predicted PAC-bound. We can see that the learned algorithm does indeed seem to converge to a critical point and it minimizes the loss faster than Adam. Further, the PAC-bound is quite tight, and it guarantees that the learned algorithm will converge in about $92\%$ of the problems. + +# 9. Conclusion + +We presented a novel method for deducing convergence of generic learned algorithms that exhibit a Markovian structure with high probability. To showcase the idea, we derived a new convergence result for learned optimization algorithms on (possibly) non-smooth non-convex loss-functions based on generalization. This was based on the fundamental insight that, contrary to traditional optimization, in learning-to-optimize we can actually observe the algorithm during training. While the approach is theoretically sound, practically it has at least four drawbacks, on which we shortly want to comment: First, and foremost, one simply cannot observe the whole trajectory in practice. Thus, one can only obtain an approximation to this result, that is, whether the used conditions do hold up to a certain number of iterations. Nevertheless, by using sufficiently many iterations, one can guarantee that the algorithm gets sufficiently close to a critical point. Second, instead of verifying the conditions used here, one could alternatively try to observe the final result directly, for example by looking at the norm of the gradient. However, when checking the proposed conditions one is guaranteed to get arbitrary close to a critical point, while, in the other case, one could end up with a small gradient norm that is arbitrary far away from a critical point. Especially, this applies in the non-smooth setting, where the subdifferential does not necessarily tell anything about the distance to a critical point3, or to applications where one simply cannot access critical points during training. Third, for now, training the algorithm in such a way that it actually does satisfy the proposed properties on a majority of problems + +![](images/00dd709da4700eed7063782f457b9780df710af5eaa079af35bbe18257992b8e.jpg) +Figure 2. Training a neural network: The left figure shows the distance to the estimated critical point and the figure in the middle shows the loss. Adam is shown in blue and the learned algorithm in pink. The mean and median are shown as dashed and dotted lines, respectively, while the shaded region represents $95\%$ of the test data. We see that the learned algorithm minimizes the loss faster than Adam, and seems to converge to a critical point. The right plot shows the estimate for $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}\}$ (orange dashed line) and the PAC-bound (dark orange). + +![](images/2ea735b8c3a7c69fbcc7e632b2a7b9a0a33d7f806e82de40b526022a95f90f44.jpg) + +![](images/b2fac39e714b8ca359b360dfec23c23105db37c0bba3d5702c4f14771a47377f.jpg) + +is quite difficult and time-consuming. Lastly, due to the sufficient-descent condition, Theorem 6.5 is not well-suited for stochastic optimization. Nevertheless, Theorem 6.3 and the proposed approach can directly be transferred to the stochastic setting, which we leave for future work. + +# Acknowledgements + +M. Sucker and P. Ochs acknowledge funding by the German Research Foundation under Germany's Excellence Strategy - EXC number 2064/1 - 390727645. + +# Impact Statement + +We do not see any negative impact of our presented work. + +# References + +Absil, P.-A., Mahony, R., and Andrews, B. Convergence of the Iterates of Descent Methods for Analytic Cost Functions. SIAM Journal on Optimization, 16(2):531-547, 2005. +Alquier, P. User-friendly Introduction to PAC-Bayes Bounds. Foundations and Trends® in Machine Learning, 17(2):174-303, 2024. +Alquier, P. and Guedj, B. Simpler PAC-Bayesian bounds for hostile data. Machine Learning, 107(5):887-902, 2018. doi: 10.1007/s10994-017-5690-0. +Amit, R., Epstein, B., Moran, S., and Meir, R. Integral Probability Metrics PAC-Bayes Bounds. In Advances in Neural Information Processing Systems, volume 35, pp. 3123-3136, 2022. + +Attouch, H. and Bolte, J. On the convergence of the proximal algorithm for nonsmooth functions involving analytic features. Mathematical Programming, 116:5-16, 2009. +Attouch, H., Bolte, J., Redont, P., and Soubeyran, A. Proximal Alternating Minimization and Projection Methods for Nonconvex Problems: An Approach Based on the Kurdyka-Lojasiewicz Inequality. Mathematics of Operations Research, 35(2):438-457, 2010. +Attouch, H., Bolte, J., and Svaiter, B. F. Convergence of descent methods for semi-algebraic and tame problems: proximal algorithms, forward-backward splitting, and regularized Gauss-Seidel methods. Mathematical Programming, 137:91-129, 2013. +Bégin, L., Germain, P., Laviolette, F., and Roy, J.-F. PAC-Bayesian Bounds based on the Rényi Divergence. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, volume 51 of Proceedings of Machine Learning Research, pp. 435-444. PMLR, 2016. +Bierstone, E. and Milman, P. D. Semianalytic and subanalytic sets. *Publications Mathématiques de l'Institut des Hautes Études Scientifiques*, 67:5-42, 1988. +Bolte, J., Daniilidis, A., and Lewis, A. The Lojasiewicz Inequality for Nonsmooth Subanalytic Functions with Applications to Subgradient Dynamical Systems. SIAM Journal on Optimization, 17(4):1205-1223, 2007a. +Bolte, J., Daniilidis, A., Lewis, A., and Shiota, M. Clarke Subgradients of Stratifiable Functions. SIAM Journal on Optimization, 18(2):556-572, 2007b. + +Bolte, J., Sabach, S., and Teboulle, M. Proximal alternating linearized minimization for nonconvex and nonsmooth problems. Mathematical Programming, 146(1):459-494, 2014. +Buzzard, G. T., Chan, S. H., Sreehari, S., and Bouman, C. A. Plug-and-play Unplugged: Optimization-Free Reconstruction Using Consensus Equilibrium. SIAM Journal on Imaging Sciences, 11(3):2001-2020, 2018. +Castera, C. and Ochs, P. From Learning to Optimize to Learning Optimization Algorithms. arXiv preprint arXiv:2405.18222, 2024. +Catoni, O. Statistical Learning Theory and Stochastic Optimization. Springer Berlin, Heidelberg, 2004. +Catoni, O. PAC-Bayesian Supervised Classification: The Thermodynamics of Statistical Learning. Lecture Notes-Monograph Series, 56, 2007. +Chan, S. H., Wang, X., and Elgendy, O. A. Plug-and-Play ADMM for Image Restoration: Fixed-Point Convergence and Applications. IEEE Transactions on Computational Imaging, 3(1):84–98, 2017. +Chen, T., Chen, X., Chen, W., Heaton, H., Liu, J., Wang, Z., and Yin, W. Learning to Optimize: A Primer and A Benchmark. Journal of Machine Learning Research, 23 (189):1-59, 2022. +Chen, X., Liu, J., Wang, Z., and Yin, W. Theoretical Linear Convergence of Unfolded ISTA and Its Practical Weights and Thresholds. In Advances in Neural Information Processing Systems, volume 31, 2018. +Chen, X., Zhang, Y., Reisinger, C., and Song, L. Understanding Deep Architecture with Reasoning Layer. In Advances in Neural Information Processing Systems, volume 33, pp. 1240-1252, 2020. +Cohen, R., Elad, M., and Milanfar, P. Regularization by Denoising via Fixed-Point Projection (RED-PRO). SIAM Journal on Imaging Sciences, 14(3):1374–1406, 2021. doi: 10.1137/20M1337168. +Dziugaite, G. K. and Roy, D. M. Computing Nonvacuous Generalization Bounds for Deep (Stochastic) Neural Networks with Many More Parameters than Training Data. In Proceedings of the Thirty-Third Conference on Uncertainty in Artificial Intelligence. AUAI Press, 2017. +Dziugaite, G. K. and Roy, D. M. Data-dependent PAC-Bayes priors via differential privacy. In Advances in Neural Information Processing Systems, volume 31, 2018. +Dziugaite, G. K., Hsu, K., Gharbieh, W., Arpino, G., and Roy, D. On the Role of Data in PAC-Bayes Bounds. + +In Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, volume 130 of Proceedings of Machine Learning Research, pp. 604-612. PMLR, 2021. +Germain, P., Lacasse, A., Laviolette, F., and Marchand, M. PAC-Bayesian Learning of Linear Classifiers. In Proceedings of the 26th Annual International Conference on Machine Learning, pp. 353-360, 2009. +Gregor, K. and LeCun, Y. Learning Fast Approximations of Sparse Coding. In Proceedings of the 27th International Conference on Machine Learning, pp. 399-406, 2010. +Guedj, B. A Primer on PAC-Bayesian Learning. In Proceedings of the Second Congress of the French Mathematical Society, volume 33, 2019. +Haddouche, M. and Guedj, B. Wasserstein PAC-Bayes Learning: Exploiting Optimisation Guarantees to Explain Generalisation. arXiv preprint arXiv:2304.07048, 2023. +Heaton, H., Chen, X., Wang, Z., and Yin, W. Safeguarded Learned Convex Optimization. Proceedings of the AAAI Conference on Artificial Intelligence, 37(6):7848-7855, 2023. +Hellström, F., Durisi, G., Guedj, B., and Raginsky, M. Generalization Bounds: Perspectives from Information Theory and PAC-Bayes. Foundations and Trends® in Machine Learning, 18(1):1-223, 2025. +Honorio, J. and Jaakkola, T. Tight Bounds for the Expected Risk of Linear Classifiers and PAC-Bayes Finite-Sample Guarantees. In Proceedings of the Seventeenth International Conference on Artificial Intelligence and Statistics, volume 33 of Proceedings of Machine Learning Research, pp. 384-392. PMLR, 2014. +Kingma, D. P. and Ba, J. Adam: A Method for Stochastic Optimization. In 3rd International Conference on Learning Representations, ICLR 2015, 2015. +Kobler, E., Effland, A., Kunisch, K., and Pock, T. Total Deep Variation: A Stable Regularization Method for Inverse Problems. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(12):9163-9180, 2022. +Kurdyka, K. On gradients of functions definable in o-minimal structures. In Annales de l'instit Fourier, volume 48, pp. 769-783, 1998. +Langford, J. and Caruana, R. (Not) Bounding the True Error. In Advances in Neural Information Processing Systems, volume 14, 2001. +Langford, J. and Shawe-Taylor, J. PAC-Bayes & Margins. In Advances in Neural Information Processing Systems, volume 15, 2002. + +Lever, G., Laviolette, F., and Shawe-Taylor, J. Tighter PAC-Bayes bounds through distribution-dependent priors. Theoretical Computer Science, 473:4-28, 2013. +Liu, J., Chen, X., Wang, Z., Yin, W., and Cai, H. Towards Constituting Mathematical Structures for Learning to Optimize. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 21426-21449. PMLR, 2023. +London, B. A PAC-Bayesian Analysis of Randomized Learning with Application to Stochastic Gradient Descent. In Advances in Neural Information Processing Systems, volume 30, 2017. +McAllester, D. A. Simplified PAC-Bayesian Margin Bounds. In Learning Theory and Kernel Machines, pp. 203-215. Springer Berlin, Heidelberg, 2003a. +McAllester, D. A. PAC-Bayesian Stochastic Model Selection. Machine Learning, 51(1):5-21, 2003b. +Metz, L., Maheswaranathan, N., Nixon, J., Freeman, D., and Sohl-Dickstein, J. Understanding and correcting pathologies in the training of learned optimizers. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 4556-4565. PMLR, 2019. +Metz, L., Freeman, C. D., Harrison, J., Maheswaranathan, N., and Sohl-Dickstein, J. Practical Tradeoffs between Memory, Compute, and Performance in Learned Optimizers. In Proceedings of The 1st Conference on Lifelong Learning Agents, volume 199 of Proceedings of Machine Learning Research, pp. 142-164. PMLR, 2022. +Möller, M., Möllenhoff, T., and Cremers, D. Controlling Neural Networks via Energy Dissipation. In 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 3255-3264, 2019. +Nesterov, Y. Lectures on Convex Optimization. Springer Cham, 2018. +Ochs, P. Unifying Abstract Inexact Convergence Theorems and Block Coordinate Variable Metric iPiano. SIAM Journal on Optimization, 29(1):541-570, 2019. +Ochs, P., Chen, Y., Brox, T., and Pock, T. iPiano: Inertial Proximal Algorithm for Nonconvex Optimization. SIAM Journal on Imaging Sciences, 7(2):1388-1419, 2014. +Ohnishi, Y. and Honorio, J. Novel Change of Measure Inequalities with Applications to PAC-Bayesian Bounds and Monte Carlo Estimation. In Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, volume 130 of Proceedings of Machine Learning Research, pp. 1711-1719. PMLR, 2021. + +Parrado-Hernández, E., Ambroladze, A., Shawe-Taylor, J., and Sun, S. PAC-Bayes Bounds with Data Dependent Priors. Journal of Machine Learning Research, 13(112): 3507-3531, 2012. +Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., Desmaison, A., Kopf, A., Yang, E., DeVito, Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B., Fang, L., Bai, J., and Chintala, S. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In Advances in Neural Information Processing Systems, volume 32, 2019. +Pérez-Ortiz, M., Rivasplata, O., Shawe-Taylor, J., and Szepesvári, C. Tighter Risk Certificates for Neural Networks. Journal of Machine Learning Research, 22(227): 1-40, 2021. +Polyak, B. T. Some methods of speeding up the convergence of iteration methods. USSR Computational Mathematics and Mathematical Physics, 4(5):1-17, 1964. +Prémont-Schwarz, I., Vítkù, J., and Feyereisl, J. A Simple Guard for Learned Optimizers. In Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pp. 17910-17925. PMLR, 2022. +Rockafellar, R. T. and Wets, R. J.-B. Variational Analysis. Springer Berlin, Heidelberg, 1998. +Ryu, E., Liu, J., Wang, S., Chen, X., Wang, Z., and Yin, W. Plug-and-Play Methods Provably Converge with Properly Trained Denoisers. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 5546-5557. PMLR, 2019. +Seeger, M. PAC-Bayesian Generalisation Error Bounds for Gaussian Process Classification. Journal of Machine Learning Research, 3:233-269, 2002. +Sreehari, S., Venkatakrishnan, S. V., Wohlberg, B., Buzzard, G. T., Drummy, L. F., Simmons, J. P., and Bouman, C. A. Plug-and-Play Priors for Bright Field Electron Tomography and Sparse Interpolation. IEEE Transactions on Computational Imaging, 2(4):408-423, 2016. +Sucker, M. and Ochs, P. PAC-Bayesian Learning of Optimization Algorithms. In Proceedings of The 26th International Conference on Artificial Intelligence and Statistics, volume 206 of Proceedings of Machine Learning Research, pp. 8145-8164. PMLR, 2023. +Sucker, M. and Ochs, P. A Markovian Model for Learning-to-Optimize. arXiv preprint arXiv:2408.11629, 2024. + +Sucker, M., Fadili, J., and Ochs, P. Learning-to-Optimize with PAC-Bayesian Guarantees: Theoretical Considerations and Practical Implementation. arXiv preprint arXiv:2404.03290, 2024. +Sun, Y., Wohlberg, B., and Kamilov, U. S. An Online Plug-and-Play Algorithm for Regularized Image Reconstruction. IEEE Transactions on Computational Imaging, 5(3):395-408, 2019. +Teodoro, A. M., Bioucas-Dias, J. M., and Figueiredo, M. A. T. Scene-Adapted plug-and-play algorithm with convergence guarantees. In 2017 IEEE 27th International Workshop on Machine Learning for Signal Processing (MLSP), pp. 1-6. IEEE, 2017. +Terris, M., Repetti, A., Pesquet, J.-C., and Wiaux, Y. Enhanced Convergent PNP Algorithms For Image Restoration. In 2021 IEEE International Conference on Image Processing (ICIP), pp. 1684-1688. IEEE, 2021. +Thiemann, N., Igel, C., Wintenberger, O., and Seldin, Y. A Strongly Quasiconvex PAC-Bayesian Bound. In Proceedings of the 28th International Conference on Algorithmic Learning Theory, volume 76 of Proceedings of Machine Learning Research, pp. 466-492. PMLR, 2017. +Tirer, T. and Giryes, R. Image Restoration by Iterative Denoising and Backward Projections. IEEE Transactions on Image Processing, 28(3):1220-1234, 2019. +Wichrowska, O., Maheswaranathan, N., Hoffman, M. W., Colmenarejo, S. G., Denil, M., Freitas, N., and Sohl-Dickstein, J. Learned Optimizers that Scale and Generalize. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 3751-3760. PMLR, 2017. +Xin, B., Wang, Y., Gao, W., Wipf, D., and Wang, B. Maximal Sparsity with Deep Networks? In Advances in Neural Information Processing Systems, volume 29, 2016. + +# A. Missing Definitions + +The following definitions can be found in the book of Rockafellar & Wets (1998). A function $f: \mathbb{R}^d \to \mathbb{R} \cup \{\pm \infty\}$ is called proper, if $f(x) < +\infty$ for at least one point $x \in \mathbb{R}^d$ and $f(x) > -\infty$ for all $x \in \mathbb{R}^d$ . In this case, the effective domain of $f$ is the set + +$$ +\operatorname {d o m} f := \left\{x \in \mathbb {R} ^ {d}: f (x) < + \infty \right\}. +$$ + +Similarly, for a set-valued mapping $T: \mathcal{X} \Rightarrow \mathcal{Y}$ the graph is defined as + +$$ +\operatorname {g p h} T := \left\{(x, y) \in \mathcal {X} \times \mathcal {Y}: y \in T (x) \right\}, +$$ + +while its domain is defined as + +$$ +\operatorname {d o m} T := \{x \in \mathcal {X}: T (x) \neq \emptyset \}. +$$ + +The outer limit of a set-valued map $T: \mathbb{R}^k \to \mathbb{R}^l$ is defined as: + +$$ +\limsup_{x\to \bar{x}}T(x):= \left\{y\mid \exists x^{(t)}\to \bar{x},\exists y^{(t)}\to y\text{with} y^{(t)}\in T(x^{(t)})\right\} . +$$ + +Based on this, $T$ is said to be outer semi-continuous at $\bar{x}$ , if + +$$ +\limsup_{x\to \bar{x}}T(x)\subset T(\bar{x}). +$$ + +Definition A.1. Consider a function $f: \mathbb{R}^d \to \mathbb{R} \cup \{\pm \infty\}$ and a point $\bar{x} \in \operatorname{dom} f$ . For a vector $v \in \mathbb{R}^d$ , one says that + +(i) $v$ is a regular subgradient of $f$ at $\bar{x}$ , if + +$$ +f (x) \geq f (\bar {x}) + \langle v, x - \bar {x} \rangle + o \left(\| x - \bar {x} \|\right). +$$ + +The set of regular subgradients of $f$ at $\bar{x}$ , denoted by $\hat{\partial} f(\bar{x})$ , is called the regular subdifferential of $f$ at $\bar{x}$ . + +(ii) $v$ is a (general) subgradient of $f$ at $\bar{x}$ , if there are sequences $x^{(t)}\to \bar{x}$ and $v^{(t)}\rightarrow v$ with $f(x^{(t)})\to f(\bar{x})$ and $v^{(t)}\in \hat{\partial} f(x^{(t)})$ . The set of subgradients of $f$ at $\bar{x}$ , denoted by $\partial f(\bar{x})$ , is called the (limiting) subdifferential of $f$ at $\bar{x}$ . + +Finally, the following definition can be found in Attouch et al. (2013, Definition 2.4, p.7). + +Definition A.2. a) The function $f: \mathbb{R}^d \to \mathbb{R} \cup \{+\infty\}$ is said to have the Kurdyka-Lojasiewicz property at $\bar{x} \in \operatorname{dom} \partial f$ , if there exist $\eta \in (0, +\infty]$ , a neighborhood $U$ of $\bar{x}$ , and a continuous concave function $\varphi: [0, \eta) \to [0, \infty)$ , such that + +(i) $\varphi (0) = 0$ +(ii) $\varphi$ is $C^1$ on $(0,\eta)$ +(iii) for all $s\in (0,\eta)$ , $\varphi^{\prime}(s) > 0$ +(iv) for all $x$ in $U\cap \{f(\bar{x}) < f < f(\bar{x}) + \eta \}$ , the Kurdyka-Lojasiewicz inequality holds + +$$ +\varphi^ {\prime} (f (x) - f (\bar {x})) \cdot \operatorname {d i s t} (0, \partial f (x)) \geq 1. +$$ + +b) Proper lower semi-continuous functions which satisfy the Kurdyka-Lojasiewicz property at each point of $\operatorname{dom} \partial f$ are called Kurdyka-Lojasiewicz functions. + +# B. Counterexamples + +Example B.1 (Violation of boundedness assumption). Starting from $z^{(1)} \coloneqq 1$ , define the sequence for $2 \leq t \in \mathbb{N}$ by $z^{(t)} \coloneqq z^{(t-1)} + \frac{1}{t}$ , and consider the positive and convex function $f(z) \coloneqq \exp(-z)$ . We show that the sequence $(z^{(t)})_{t \in \mathbb{N}}$ does satisfy the sufficient-descent condition for $f$ : By definition, we have the recursive formula $f(z^{(t+1)}) = f(z^{(t)}) \exp\left(-\frac{1}{t+1}\right)$ , which allows for rewriting the sufficient-descent condition as: + +$$ +\frac {a}{(t + 1) ^ {2}} \leq \left(1 - \exp \left(- \frac {1}{t + 1}\right)\right) f (z ^ {(t)}). +$$ + +Then, we have to find $a > 0$ satisfying this inequality for all $t \in \mathbb{N}$ . For $t = 1$ , the right-hand side is greater than $\frac{1}{9}$ , such that we can choose any $a \in (0, \frac{4}{9}]$ (rough estimate). Thus, take $a \in (0, \frac{4}{9}]$ , such that $\tilde{a} := a \cdot 2e \in (0, \frac{4}{9}]$ , and proceed by induction (note that $\tilde{a}$ satisfies the stated condition for $t = 1$ ). Assuming that the inequality holds true for up to time $t$ , we get by the induction hypothesis: + +$$ +\frac {\tilde {a}}{(t + 2) ^ {2}} \leq \left(\frac {t + 1}{t + 2}\right) ^ {2} \left(1 - \exp \left(- \frac {1}{t + 1}\right)\right) f (z ^ {(t)}) +$$ + +By inserting a trivial 1 three-times, the right-hand side can be written as: + +$$ +\left(\frac {t + 1}{t + 2}\right) ^ {2} \cdot \exp \left(\frac {1}{t + 2}\right) \cdot \frac {\exp \left(\frac {1}{t + 1}\right) - 1}{\exp \left(\frac {1}{t + 2}\right) - 1} \cdot \left(1 - \exp \left(- \frac {1}{t + 2}\right)\right) f (z ^ {(t + 1)}). +$$ + +Here, the first term is bounded by 1, the second by $e$ , and the third by 2. Hence, dividing both sides by $2e$ , we get: + +$$ +\frac {a}{(t + 2) ^ {2}} \leq \left(1 - \exp \left(- \frac {1}{t + 2}\right)\right) f (z ^ {(t + 1)}), +$$ + +such that $\left(z^{(t)}\right)_{t\in \mathbb{N}}$ satisfies the sufficient-descent condition for $f$ . Nevertheless, we have $z^{(t)} = z^{(t - 1)} + \frac{1}{t} = \ldots = \sum_{k = 1}^{t}\frac{1}{k}$ , such that $|z^{(t)}|\stackrel {t\to \infty}{\longrightarrow}\infty$ , that is, the sequence is unbounded and does not converge. + +Example B.2 (Violation of relative-error condition). Consider the smooth and strongly convex function $f(z_{1},z_{2}) \coloneqq \frac{1}{2} z_{1}^{2} + \frac{1}{2} z_{2}^{2}$ , and define the sequence $((z^{(t)},z_2^{(t)}))_{t\in \mathbb{N}_0}\subset \mathbb{R}^2$ through + +$$ +\left(z _ {1} ^ {(t + 1)}, z _ {2} ^ {(t + 1)}\right) := \left(z _ {1} ^ {(t)} - 0. 1 z _ {1} ^ {(t)}, z _ {2} ^ {(t)}\right). +$$ + +Then we have $\| (z_1^{(t + 1)},z_2^{(t + 1)}) - (z_1^{(t)},z_2^{(t)})\| ^2 = (0.1z_1^{(t)})^2$ , and it holds: + +$$ +\begin{array}{l} f \left(z _ {1} ^ {(t + 1)}, z _ {2} ^ {(t + 1)}\right) = \frac {1}{2} \left(z _ {1} ^ {(t)} - 0. 1 z _ {1} ^ {(t)}\right) ^ {2} + \frac {1}{2} \left(z _ {2} ^ {(t)}\right) ^ {2} \\ = f \left(z _ {1} ^ {(t)}, z _ {2} ^ {(t)}\right) - 0. 1 \left(z _ {1} ^ {(t)}\right) ^ {2} + \frac {1}{2} \left(0. 1 z _ {1} ^ {(t)}\right) ^ {2} \\ = f \left(z _ {1} ^ {(t)}, z _ {2} ^ {(t)}\right) - 9. 5 \| \left(z _ {1} ^ {(t + 1)}, z _ {2} ^ {(t + 1)}\right) - \left(z _ {1} ^ {(t)}, z _ {2} ^ {(t)}\right) \| ^ {2}, \\ \end{array} +$$ + +such that $(z_{1}^{(t + 1)},z_{2}^{(t + 1)})$ satisfies the sufficient-descent condition. However, for $z_{2}^{(0)}\neq 0$ , the sequence converges to $(0,z_2^{(0)})$ , which is not a critical point of $f$ . + +# C. Proof of Lemma 7.1 + +Lemma C.1. Suppose Assumption 6.7 holds. Then, $\mathsf{A}_{\mathrm{crit}}$ is closed. + +Proof. Take $(p^{(t)},z^{(t)})_{t\in \mathbb{N}}\subset \mathsf{A}_{\mathrm{crit}}$ with $(p^{(t)},z^{(t)})\to (\bar{p},\bar{z})\in \mathcal{P}\times \mathcal{Z}$ . We need to show that $(\bar{p},\bar{z})\in \mathsf{A}_{\mathrm{crit}}$ . Since $(z,p)\mapsto \partial_1\ell (z,p)$ is outer semi-continuous, we have: + +$$ +\limsup_{(z,p)\to (\bar{z},\bar{p})}\partial_{1}\ell (z,p)\subset \partial_{1}\ell (\bar{z},\bar{p}). +$$ + +By definition of the outer limit, this is the same as: + +$$ +\left\{u \in \mathcal {Z} \mid \exists (z ^ {(t)}, p ^ {(t)}) \rightarrow (\bar {z}, \bar {p}), \exists u ^ {(t)} \rightarrow u \text {w i t h} u ^ {(t)} \in \partial_ {1} \ell (z ^ {(t)}, p ^ {(t)}) \right\} \subset \partial_ {1} \ell (\bar {z}, \bar {p}). +$$ + +In particular, we have that $(z^{(t)},p^{(t)})_{t\in \mathbb{N}}\to (\bar{z},\bar{p})$ , and it holds $0\in \partial_1\ell (z^{(t)},p^{(t)})$ for all $t\in \mathbb{N}$ . Thus, setting $u^{(t)}\coloneqq 0$ for all $t\in \mathbb{N}$ and $u\coloneqq 0$ , we conclude that $0\in \partial_1\ell (\bar{z},\bar{p})$ . Hence, $(\bar{p},\bar{z})\in \mathsf{A}_{\mathrm{crit}}$ , and $\mathsf{A}_{\mathrm{crit}}$ is closed. + +Now, we can prove Lemma 7.1: + +Proof. To show measurability of $\mathsf{A}_{\mathrm{conv}}$ , we adopt the notation of the limes inferior for sets from probability theory: If $d$ is a metric on $\mathcal{P} \times \mathcal{E}$ and $\varepsilon > 0$ , define the set + +$$ +\left\{\mathrm {B} _ {\varepsilon} (p, z) \operatorname {u l t.} \right\} := \left\{(p ^ {\prime}, z ^ {(t)}) \in \mathrm {B} _ {\varepsilon} (p, z) \operatorname {u l t.} \right\} := \bigcup_ {n \in \mathbb {N} _ {0}} \bigcap_ {t \geq n} \left\{(p ^ {\prime}, z ^ {(t)}) \in \mathrm {B} _ {\varepsilon} (p, z) \right\}. +$$ + +Here, $\{(p', z^{(t)}) \in \mathsf{B}_{\varepsilon}(p, z)\}$ is a short-hand notation for $\{(p', (z^{(t)})_{t \in \mathbb{N}_0}) \in \mathcal{P} \times \mathcal{E}^{\mathbb{N}_0} : (p', z^{(t)}) \in \mathsf{B}_{\varepsilon}(p, z)\}$ . Thus, $\{\mathsf{B}_{\varepsilon}(p, z) \text{ ult.}\}$ is the (parametric) set of all sequences in $\mathcal{X}$ that ultimately lie in the ball with radius $\varepsilon$ around $(p, z)$ . Note that $\{\mathsf{B}_{\varepsilon}(p, z) \text{ ult.}\}$ is measurable w.r.t. to the product $\sigma$ -algebra on $\mathcal{P} \times \mathcal{E}^{\mathbb{N}_0}$ , since it is the countable union/intersection of measurable sets, where $\{(p', z^{(t)}) \in \mathsf{B}_{\varepsilon}(p, z)\}$ is measurable, since it can be written as $\{d((p', z^{(t)}), (p, z)) < \varepsilon\} = (g \circ (id, \pi_t))^{-1}[0, \varepsilon)$ . Here, $id$ is the identity on $\mathcal{P}$ , and $g(p', z') := d((p', z'), (p, z))$ is continuous. + +Since the proof does not get more complicated by considering general Polish space $\mathcal{P}$ , $\mathcal{X}$ instead of $\mathbb{R}^q$ and $\mathbb{R}^d$ , we prove the result in this more general setting. For this, denote the complete metric on $\mathcal{P}$ by $d_{\mathcal{P}}$ , and the one on $\mathcal{X}$ by $d_{\mathcal{X}}$ . Then we have that $d_{\mathcal{P} \times \mathcal{X}} := d_{\mathcal{P}} + d_{\mathcal{X}}$ is a metric on $\mathcal{P} \times \mathcal{X}$ that metrizes the product-topology, that is, it yields the same $\sigma$ -algebra. Similarly, denote the countable dense subset in $\mathcal{P}$ by $\mathcal{P}$ , and the one in $\mathcal{X}$ by $\mathcal{Z}$ . Then we have that $\mathcal{D} := \mathcal{P} \times \mathcal{Z}$ is a countable and dense subset of $\mathcal{P} \times \mathcal{X}$ . + +If $A_{\mathrm{crit}}$ is empty, we get that $A_{\mathrm{conv}} = \emptyset$ , which is measurable. Hence, w.l.o.g. assume that $A_{\mathrm{crit}} \neq \emptyset$ . We claim that: + +$$ +\mathsf{A}_{\mathrm{conv}} = \mathsf{C}:= \bigcap_{k\in \mathbb{N}}\bigcup_{\substack{(p,z)\in \mathcal{D}\\ \mathsf{A}_{\mathrm{crit}}\cap \mathsf{B}_{1 / k}(p,z)\neq \emptyset}}\left\{\mathsf{B}_{1 / k}(p,z) \mathrm{ult.}\right\} . +$$ + +If this equality holds, $\mathsf{A}_{\mathrm{conv}}$ is measurable as a countable intersection/union of measurable sets. Thus, it remains to show the equality $\mathsf{A}_{\mathrm{conv}} = \mathsf{C}$ , which we do by showing both inclusions. Therefore, first, take $(p,(z^{(t)})_{t\in \mathbb{N}_0})\in \mathsf{A}_{\mathrm{conv}}$ . Then there exists $z^{*}\in \mathcal{E}$ , such that $(p,z^{*})\in \mathsf{A}_{\mathrm{crit}}$ and $\lim_{t\to \infty}d_{\mathcal{E}}(z^{(t)},z^{*}) = 0$ . Hence, for any $k\in \mathbb{N}$ , there exists $t_k\in \mathbb{N}$ , such that $z^{(t)}\in \mathsf{B}_{1 / 3k}(z^{*})$ for all $t\geq t_k$ . Now, take $(p_k,z_k)\in \mathcal{D}$ , such that $p_k\in \mathsf{B}_{1 / 3k}(p)$ and $z_{k}\in \mathsf{B}_{1 / 3k}(z^{*})$ , which exists, since $\mathcal{D}$ is dense. Then, for all $t\geq t_k$ we have: + +$$ +d _ {\mathcal {P} \times \mathcal {E}} ((p, z ^ {(t)}), (p _ {k}, z _ {k})) = d _ {\mathcal {P}} (p, p _ {k}) + d _ {\mathcal {E}} (z ^ {(t)}, z _ {k}) \leq d _ {\mathcal {P}} (p, p _ {k}) + d _ {\mathcal {E}} (z ^ {(t)}, z ^ {*}) + d _ {\mathcal {E}} (z ^ {*}, z _ {k}) < \frac {1}{k}, +$$ + +that is, $(p,(z^{(t)})_{t\in \mathbb{N}_0})\in \{\mathsf{B}_{1 / k}(p_k,z_k)\mathrm{ult.}\}$ . Further, we have: + +$$ +d _ {\mathcal {P} \times \mathcal {E}} ((p, z ^ {*}), (p _ {k}, z _ {k})) < \frac {2}{3 k} < \frac {1}{k}. +$$ + +Hence, $(p_k,z_k)\in \mathcal{D}$ with $\mathsf{A}_{\mathrm{crit}}\cap \mathsf{B}_{1 / k}(p_k,z_k)\neq \emptyset$ . Since such a tuple $(p_k,z_k)\in \mathcal{D}$ can be found for any $k\in \mathbb{N}$ , we get: + +$$ +(p,(z^{(t)})_{t\in \mathbb{N}_{0}})\in \bigcup_{\substack{(p^{\prime},z^{\prime})\in \mathcal{D}\\ \mathsf{A}_{\mathrm{crit}}\cap \mathsf{B}_{1 / k}(p^{\prime},z^{\prime})\neq \emptyset}}\{\mathsf{B}_{1 / k}(p^{\prime},z^{\prime}) \mathrm{ult.}\} ,\quad \forall k\in \mathbb{N}. +$$ + +Then, however, this implies $(p,(z^{(t)})_{t\in \mathbb{N}_0})\in \mathbb{C}$ , which shows the inclusion $\mathsf{A}_{\mathrm{conv}}\subset \mathsf{C}$ . Now, conversely, let $(p,(z^{(t)})_{t\in \mathbb{N}_0})\in \mathbb{C}$ . Then, for every $k\in \mathbb{N}$ there exists $(p_k,z_k)\in \mathcal{D}$ with $\mathsf{A}_{\mathrm{crit}}\cap \mathsf{B}_{1 / k}(p_k,z_k)\neq \emptyset$ , and a $t_k\in \mathbb{N}$ such that + +$$ +(p, z ^ {(t)}) \in \mathsf {B} _ {1 / k} (p _ {k}, z _ {k}), \quad \forall t \geq t _ {k}. +$$ + +The resulting sequence of midpoints $(p_k, z_k)_{k \in \mathbb{N}}$ is Cauchy in $\mathcal{P} \times \mathcal{L}$ , because: For $k, l \in \mathbb{N}$ , we have that $(p, z^{(t)}) \in \mathsf{B}_{1/k}(p_k, z_k)$ for all $t \geq t_k$ , and $(p, z^{(t)}) \in \mathsf{B}_{1/l}(p_l, z_l)$ for all $t \geq t_l$ . Thus, for $t \geq T := \max\{t_k, t_l\}$ , we get $(p, z^{(t)}) \in \mathsf{B}_{1/k}(p_k, z_k) \cap \mathsf{B}_{1/l}(p_l, z_l)$ , which allows for the following bound: + +$$ +\begin{array}{l} d _ {\mathcal {P} \times \mathfrak {L}} ((p _ {k}, z _ {k}), (p _ {l}, z _ {l})) \leq d _ {\mathcal {P} \times \mathfrak {L}} ((p _ {k}, z _ {k}), (p, z ^ {(t _ {k})})) + d _ {\mathcal {P} \times \mathfrak {L}} ((p, z ^ {(t _ {k})}), (p, z ^ {(T)})) \\ + d _ {\mathcal {P} \times \mathfrak {X}} ((p, z ^ {(T)}), (p, z ^ {(t _ {l})})) + d _ {\mathcal {P} \times \mathfrak {X}} ((p, z ^ {(t _ {l})}), (p _ {l}, z _ {l})) \\ \leq \frac {1}{k} + \frac {2}{k} + \frac {2}{l} + \frac {1}{l} \leq \frac {3}{k} + \frac {3}{l} \stackrel {k, l \rightarrow \infty} {\rightarrow} 0. \\ \end{array} +$$ + +Hence, by completeness of $\mathcal{P} \times \mathcal{Z}$ , the sequence $(p_k, z_k)_{k \in \mathbb{N}}$ has a limit $(p^*, z^*)$ in $\mathcal{P} \times \mathcal{Z}$ . First, we show that $p^* = p$ : Since $(p, z^{(t_k)}) \in \mathsf{B}_{1/k}(p_k, z_k)$ for all $k \in \mathbb{N}$ , we have by continuity of the metric: + +$$ +d _ {\mathcal {P}} (p, p ^ {*}) = \lim _ {k \rightarrow \infty} d _ {\mathcal {P}} (p, p _ {k}) \leq \lim _ {k \rightarrow \infty} d _ {\mathcal {P} \times \mathfrak {Z}} ((p, z ^ {(t _ {k})}), (p _ {k}, z _ {k})) \leq \lim _ {k \rightarrow \infty} \frac {1}{k} = 0. +$$ + +Thus, actually, $(p_k,z_k)\to (p,z^*)$ . Second, we show that $(p,z^{*})\in \mathsf{A}_{\mathrm{crit}}$ , that is, $z^{*}\in \mathsf{A}_{\mathrm{crit},p}$ : Assume the contrary, that is, $(p,z^{*})\in \mathsf{A}_{\mathrm{crit}}^{c}$ . By Lemma C.1, the set $\mathsf{A}_{\mathrm{crit}}$ is closed. Thus, its complement $\mathsf{A}_{\mathrm{crit}}^{c}$ is open, and there exists $\varepsilon >0$ with $\mathsf{B}_{\varepsilon}(p,z^{*})\subset \mathsf{A}_{\mathrm{crit}}^{c}$ , that is, $\mathsf{B}_{\varepsilon}(p,z^{*})\cap \mathsf{A}_{\mathrm{crit}} = \emptyset$ . Since $(p_k,z_k)\to (p,z^*)$ , there exists $N\in \mathbb{N}$ , such that $d_{\mathcal{P}\times \mathcal{T}}((p_k,z_k),(p,z^*)) < \frac{\varepsilon}{3}$ for all $k\geq N$ . Then, however, taking $k\geq N$ with $\frac{1}{k} < \frac{\varepsilon}{3}$ , we conclude that + +$$ +\mathsf {B} _ {1 / k} \left(p _ {k}, z _ {k}\right) \cap \mathsf {A} _ {\text {c r i t}} = \emptyset . +$$ + +By definition of the sequence $(p_k, z_k)_{k \in \mathbb{N}}$ , this is a contradiction. Hence, we have $(p, z^*) \in \mathsf{A}_{\mathrm{crit}}$ , and it remains to show that also the sequence $(z^{(t)})_{t \in \mathbb{N}_0}$ converges to $z^*$ . For this, assume the contrary again. Then there exists an $\varepsilon > 0$ with the property that for all $T \in \mathbb{N}$ , one can find a $\tilde{t} \geq T$ , such that $d_{\mathcal{E}}(z^{(\tilde{t})}, z^*) \geq \varepsilon$ . Now, choose $k \in \mathbb{N}$ large enough, such that $d_{\mathcal{E}}(z_k, z^*) \leq \frac{\varepsilon}{3}$ and $\frac{1}{k} < \frac{\varepsilon}{3}$ . Then, since $(p, z^{(t)}) \in \mathsf{B}_{1/k}(p_k, z_k)$ for all $t \geq t_k$ , we have: + +$$ +d _ {\mathcal {E}} (z ^ {(t)}, z ^ {*}) \leq d _ {\mathcal {E}} (z ^ {(t)}, z _ {k}) + d _ {\mathcal {E}} (z _ {k}, z ^ {*}) \leq \frac {2 \varepsilon}{3} < \varepsilon , \quad \forall t \geq t _ {k}. +$$ + +Again, this is a contradiction and such an $\varepsilon > 0$ cannot exist. Thus, $(z^{(t)})_{t \in \mathbb{N}_0}$ converges to $z^* \in \mathsf{A}_{\mathrm{crit},p}$ , and we have $(p, (z^{(t)})_{t \in \mathbb{N}_0}) \in \mathsf{A}_{\mathrm{conv}}$ , which concludes the proof. + +# D. Proof of Lemma 7.2 + +Proof. Since $\mathbb{Q}$ is dense in $\mathbb{R}$ , we can restrict to $a\in (0,\infty)\cap \mathbb{Q} = : \mathbb{Q}_{+}$ . Then $\mathsf{A}_{\mathrm{desc}}$ can be written as + +$$ +\left(\bigcup_ {a \in \mathbb {Q} _ {+}} \bigcap_ {t \in \mathbb {N} _ {0}} \mathsf {A} _ {a, t}\right) \cap \left(\bigcap_ {t \in \mathbb {N} _ {0}} \left\{\ell (z ^ {(t)}, p) < \infty \right\}\right), +$$ + +where $A_{a,t}$ is given by: + +$$ +\left\{\ell (z ^ {(t + 1)}, p) + a \| z ^ {(t + 1)} - z ^ {(t)} \| ^ {2} \leq \ell (z ^ {(t)}, p) \right\}. +$$ + +Since $\sigma$ -algebras are stable under countable unions/intersection, it suffices to show that the sets $\{\ell(z^{(t)}, p) < \infty\}$ and $\mathsf{A}_{a,t}$ are measurable. Here, the set $\{\ell(z^{(t)}, p) < \infty\}$ can be written as: + +$$ +\left\{\ell (z ^ {(t)}, p) < \infty \right\} = (\ell \circ \Phi \circ (i d, \pi_ {t})) ^ {- 1} [ 0, \infty), +$$ + +where $\Phi : \mathcal{P} \times \mathcal{E} \to \mathcal{E} \times \mathcal{P}$ just interchanges the coordinates (which is measurable), and $id$ is the identity on $\mathcal{P}$ . Since $[0, \infty)$ is a measurable set and $\ell$ is assumed to be measurable, we have that $\{\ell(z^{(t)}, p) < \infty\}$ is measurable for each $t \in \mathbb{N}_0$ . To show that $\mathsf{A}_{a,t}$ is measurable, we define the function $g_a : (\mathrm{dom} \ell)^2 \to \mathbb{R}$ through $((z_1, p_1), (z_2, p_2)) \mapsto \ell(z_2, p_2) - \ell(z_1, p_1) + a \| z_2 - z_1 \|^2$ . Then, $g_a$ is measurable and $\mathsf{A}_{a,t}$ can be written as: + +$$ +\begin{array}{l} \mathsf {A} _ {a, t} = \left\{g _ {a} (z ^ {(t)}, p, z ^ {(t + 1)}, p) \leq 0 \right\} \\ = \left\{\left(g _ {a} \circ \left(\pi_ {t}, i d, \pi_ {t + 1}, i d\right) \circ \iota\right) \left(p, \left(z ^ {(t)}\right) _ {t \in \mathbb {N} _ {0}}\right) \leq 0 \right\} \\ = \left(g _ {a} \circ (\pi_ {t}, i d, \pi_ {t + 1}, i d) \circ \iota)\right) ^ {- 1} (- \infty , 0 ], \\ \end{array} +$$ + +where $\iota : \mathcal{P} \times \mathcal{X}^{\mathbb{N}_0} \to (\mathcal{X}^{\mathbb{N}_0} \times \mathcal{P})^2$ is the diagonal inclusion $(p, z) \mapsto ((z, p), (z, p))$ , which is measurable w.r.t. to the product- $\sigma$ -algebra on $(\mathcal{X}^{\mathbb{N}_0} \times \mathcal{P})^2$ , since $\iota^{-1}(\mathsf{B}_1 \times \mathsf{B}_2) = \mathsf{B}_1 \cap \mathsf{B}_2$ . Thus, the set $\mathsf{A}_{a,t}$ is measurable, which concludes the proof. + +# E. Existence of Measurable Selection and Proof of Lemma 7.3 + +Definition E.1. A set-valued mapping $T: \mathcal{X} \Rightarrow \mathbb{R}^d$ is measurable, if for every open set $\mathrm{O} \subset \mathbb{R}^d$ the set $T^{-1}(\mathrm{O}) \subset \mathcal{X}$ is measurable. In particular, $\operatorname{dom} T$ has to be measurable. + +Lemma E.2. Suppose Assumption 6.7 holds. Then $(z,p)\mapsto \partial_1\ell (z,p)$ is closed-valued and measurable. + +Proof. Since $\partial_1\ell (z,p)$ is the subdifferential of $\ell (\cdot ,p)$ at $z$ , by Rockafellar & Wets (1998, Theorem 8.6, p.302) we have that the set $\partial_1\ell (z,p)$ is closed for every $p\in \mathcal{P}$ and every $z\in \operatorname {dom}\ell (\cdot ,p)$ . Hence, we have that $\partial_1\ell (z,p)$ is closed for every $(z,p)\in \mathrm{dom}\ell$ . Further, for $(z,p)\notin \mathrm{dom}\ell$ , we have $\partial_1\ell (z,p) = \emptyset$ , which is closed, too. Therefore, $(z,p)\mapsto \partial_{1}\ell (z,p)$ is closed-valued. Finally, since $(z,p)\mapsto \partial_1\ell (z,p)$ is also outer semi-continuous, Rockafellar & Wets (1998, Exercise 14.9, p.649) implies that $\partial_1\ell$ is measurable w.r.t. $\mathcal{B}(\mathcal{X}\times \mathcal{P})$ + +Corollary E.3. Suppose Assumption 6.7 holds. Then there exists a measurable selection for $\partial_1\ell$ , that is, a measurable map $v:\mathrm{dom}\partial_1\ell \to \mathcal{X}$ , such that $v(z,p)\in \partial_1\ell (z,p)$ for all $(z,p)\in \mathcal{X}\times \mathcal{P}$ . + +Proof. By Lemma E.2, the map $(z,p)\mapsto \partial_1\ell (z,p)$ is closed-valued and measurable. Hence, the result follows directly from Rockafellar & Wets (1998, Corollary 14.6, p.647). + +Now, we can prove Lemma 7.3: + +Proof. Again, we can restrict to $b \in \mathbb{Q} \cap (0, \infty) =: \mathbb{Q}_+$ . Thus, $A_{\mathrm{err}}$ can be written as: + +$$ +\mathsf {A} _ {\mathrm {e r r}} = \left(\bigcup_ {b \in \mathbb {Q} _ {+}} \bigcap_ {t \in \mathbb {N} _ {0}} \mathsf {B} _ {b, t}\right) \cap \left(\bigcap_ {t \in \mathbb {N} _ {0}} \left\{\left(z ^ {(t)}, p\right) \in \operatorname {d o m} \partial \ell \right\}\right), +$$ + +where $\mathsf{B}_{b,t}$ is given by: + +$$ +\mathsf {B} _ {b, t} := \left\{(p, (z ^ {(t)}) _ {t \in \mathbb {N} _ {0}}) \in \mathcal {P} \times \mathcal {Z} ^ {\mathbb {N} _ {0}}: \| v (z ^ {(t + 1)}, p) \| \leq b \| z ^ {(t + 1)} - z ^ {(t)} \| \right\}. +$$ + +Hence, since $\sigma$ -algebras are stable under countable unions/intersections, we only have to show measurability of the sets $\mathsf{B}_{b,t}$ and $\{(z^{(t)},p)\in \mathrm{dom}\partial_1\ell \}$ . Here, it holds that: + +$$ +\left\{\left(z ^ {(t)}, p\right) \in \operatorname {d o m} \partial_ {1} \ell \right\} = \left(\Phi \circ (i d, \pi_ {t})\right) ^ {- 1} \left(\operatorname {d o m} \partial_ {1} \ell\right), +$$ + +where $id$ is the identity on $\mathcal{P}$ , and $\Phi : \mathcal{P} \times \mathfrak{X} \to \mathfrak{X} \times \mathcal{P}$ just interchanges the coordinates. By Lemma E.2, $\operatorname{dom} \partial_1\ell$ is measurable, such that $\{(z^{(t)},p)\in \operatorname {dom}\partial_1\ell \}$ is measurable for each $t\in \mathbb{N}_0$ . Thus, it remains to show the measurability of the set $B_{b,t}$ . For this, introduce the function $g_{b}:(\operatorname {dom}\partial_{1}\ell)^{2}\to \mathbb{R}$ , $((z_{1},p_{1}),(z_{2},p_{2}))\mapsto \| v(z_{2},p_{2})\| -b\| z_{2} - z_{1}\|$ . Since $v$ is measurable, and the norm is continuous, we have that $g_{b}$ is measurable. With this, we can write the set $B_{b,k}$ as: + +$$ +\begin{array}{l} \mathsf {B} _ {b, t} = \left\{g _ {b} \left(z ^ {(t)}, p, z ^ {(t + 1)}, p\right) \leq 0 \right\} \\ = \left\{\left(g _ {b} \circ \left(\pi_ {t}, i d, \pi_ {t + 1}, i d\right) \circ \iota\right) \left(p, \left(z ^ {(t)}\right) _ {t \in \mathbb {N} _ {0}}\right) \leq 0 \right\} \\ = \left(g _ {b} \circ \left(\pi_ {t}, i d, \pi_ {t + 1}, i d\right) \circ \iota\right) ^ {- 1} (- \infty , 0 ], \\ \end{array} +$$ + +where $\iota : \mathcal{P} \times \mathcal{Z}^{\mathbb{N}_0} \to (\mathcal{Z}^{\mathbb{N}_0} \times \mathcal{P})^2$ is the diagonal inclusion $(z_1, z_2) \mapsto ((z_2, z_1), (z_2, z_1)$ , which again is measurable. Thus, $\mathsf{B}_{b,t}$ is measurable for each $t \in \mathbb{N}_0$ and $b \in \mathbb{Q}_+$ , which concludes the proof. + +# F. Proof of Lemma 7.4 + +Proof. By definition of the product $\sigma$ -algebra on $\mathcal{P} \times \mathcal{Z}^{\mathbb{N}_0}$ , it suffices to show that $\tilde{A}_{\mathrm{bound}}$ is measurable. Then, as it suffices to consider $c \in [0,\infty) \cap \mathbb{Q} =: \mathbb{Q}_+$ , one can write $\tilde{A}_{\mathrm{bound}}$ as: + +$$ +\tilde {\mathsf {A}} _ {\mathrm {b o u n d}} = \bigcup_ {c \in \mathbb {Q} _ {+}} \bigcap_ {t \in \mathbb {N} _ {0}} \underbrace {\{(z ^ {(t)}) _ {t \in \mathbb {N} _ {0}} \in \mathcal {X} ^ {\mathbb {N} _ {0}} : \| z ^ {(t)} \| \leq c \}} _ {=: \mathcal {C} _ {c, t}}. +$$ + +Thus, by the properties of a $\sigma$ -algebra, it suffices to show that the sets $C_{c,t}$ with $c \in \mathbb{Q}_+$ and $t \in \mathbb{N}_0$ are measurable. By defining $g(z) = \|z\|$ , this follows directly from the identity $C_{c,t} = (g \circ \pi_t)^{-1}[0,c]$ . + +# G. Architecture of the Algorithm for Quadratic Problems + +![](images/38d53848f2fb91c18aad20ee9f9ab762a58ae2e4cb4859cf9d009b9b27a11751.jpg) +Figure 3. Update step of $\mathcal{A}$ : The directions $d_1^{(t)}$ , $d_2^{(t)}$ and $d_1^{(t)} \odot d_2^{(t)}$ are inserted as different channels into the Conv2d-block, which performs $1 \times 1$ "convolutions", that is, the algorithm acts coordinate-wise on the input. The scales $s_1^{(t)}, \ldots, s_4^{(t)}$ get transformed separately by the fully-connected block. + +The algorithmic update is adopted from Sucker & Ochs (2024) and consists of two blocks: + +1) The first block consists of $1 \times 1$ -convolutional layers with ReLU-activation functions and computes the update direction $d^{(t)}$ . As features, we use the normalized gradient $d_1^{(t)} := \frac{\nabla\ell(z^{(t)},p)}{\|\nabla\ell(z^{(t)},p)\|}$ , the normalized momentum term $d_2^{(t)} := \frac{z^{(t)} - z^{(t-1)}}{\|z^{(t)} - z^{(t-1)}\|}$ , and their coordinate-wise product $d_1^{(t)} \odot d_2^{(t)}$ . The normalization is done to stabilize the training. +2) The second block consists of linear layers with ReLU-activation functions and computes the step-size $\beta^{(t)}$ . As features, we use the (logarithmically transformed) gradient norm $s_1^{(t)} \coloneqq \log \left(1 + \|\nabla \ell(z^{(t)}, p)\|\right)$ , the (logarithmically transformed) norm of the momentum term $s_2^{(t)} \coloneqq \log \left(1 + \|z^{(t)} - z^{(t-1)}\|\right)$ , and the current and previous (logarithmically transformed) losses $s_3^{(t)} \coloneqq \log \left(1 + \ell(z^{(t)}, p)\right)$ , $s_4^{(t)} \coloneqq \log \left(1 + \ell(z^{(t-1)}, p)\right)$ . Again, the logarithmic scaling is done to stabilize training. Here, the term “+1” is added to map zero onto zero. + +Importantly, we want to stress that the algorithmic update is not constrained in any way: the algorithm just predicts a direction and a step-size, and we do not enforce them to have any specific properties. + +# H. Training of the Algorithm + +For training, we mainly use the procedure proposed (and described in detail) by Sucker et al. (2024); Sucker & Ochs (2024). For completeness, we briefly summarize it here: In the outer loop, we sample a loss-function $\ell(\cdot, p)$ randomly from the training set. Then, in the inner loop, we train the algorithm on this loss-function with $\ell_{\mathrm{train}}$ given by + +$$ +\ell_ {\mathrm {t r a i n}} (h, p, z ^ {(t)}) = \mathbb {1} \{\ell (z ^ {(t)}, p) > 0 \} \frac {\ell (z ^ {(t + 1)} , p)}{\ell (z ^ {(t)} , p)} \cdot \mathbb {1} _ {\mathbb {C} ^ {c}} (p, z ^ {(t)}), +$$ + +where $\mathsf{C} := \{(p, z) \in \mathcal{P} \times \mathcal{E} : \ell(z, p) < 10^{-16}\}$ is the convergence set. That is, in each iteration the algorithm computes a new point and observes the loss $\ell_{\mathrm{train}}$ , which is used to update its hyperparameters. We run this procedure for $150 \cdot 10^{3}$ iterations. This yields hyperparameters $h^{(0)} \in \mathcal{H}$ , such that $\mathcal{A}(h^{(0)}, \cdot, \cdot)$ has a good performance. However, typically, it is not a descent method yet, that is, $\mathbb{P}_{(P, \xi)|H = h^{(0)}}\{\mathsf{A}\}$ is small, such that the PAC-bound would be useless. Therefore, we employ the probabilistic constraining procedure proposed (and described in detail) by (Sucker et al., 2024) in a progressive way: Starting from $h^{(0)}$ , we try to find a sequence of hyperparameters $h^{(1)}, h^{(2)}, \ldots$ , such that + +$$ +\mathbb {P} _ {(P, \xi) | H = h ^ {(0)}} \left\{\mathsf {A} \right\} < \mathbb {P} _ {(P, \xi) | H = h ^ {(1)}} \left\{\mathsf {A} \right\} < \mathbb {P} _ {(P, \xi) | H = h ^ {(2)}} \left\{\mathsf {A} \right\} < \dots . +$$ + +Remark H.1. The notation $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}\}$ is not entirely correct and is rather to be understood suggestively, as the final prior distribution $\mathbb{P}_H$ is yet to be constructed. However, we think that it is easier to understand this way and therefore allow for this inaccuracy. + +For this, we test the probabilistic constraint every 1000 iterations, that is: Given $h^{(i)}$ , we train the algorithm (as before) for another 1000 iterations, which yields a candidate $\tilde{h}^{(i + 1)}$ . If $\mathbb{P}_{(P,\xi)|H = h^{(i)}}\{\mathsf{A}\} < \mathbb{P}_{(P,\xi)|H = \tilde{h}^{(i + 1)}}\{\mathsf{A}\}$ , we accept $h^{(i + 1)} \coloneqq \tilde{h}^{(i + 1)}$ , otherwise we reject it and start again from $h^{(i)}$ . This finally yields some hyperparameters $h_0$ that have a good performance and such that $\mathbb{P}_{(P,\xi)|H = h_0}\{\mathsf{A}\}$ is large enough (here: about $90\%$ ). Then, starting from $h_0$ , we construct the actual discrete prior distribution $\mathbb{P}_H$ over points $h_1, \ldots, h_{n_{\mathrm{sample}}} \in \mathcal{H}$ , by a sampling procedure. Finally, we perform the (closed-form) PAC-Bayesian optimization step, which yields the posterior $\rho^* \in \mathcal{M}_1(\mathbb{P}_H)$ . In the end, for simplicity, we set the hyperparameters to + +$$ +h^{*} = \operatorname *{arg max}_{i = 1,\ldots ,n_{\text{sample}}}\rho^{*}\bigl\{h_{i}\bigr \} . +$$ + +For the construction of the prior, we use $N_{\mathrm{prior}} = 500$ functions, for the probabilistic constraint we use $N_{\mathrm{val}} = 500$ functions, and for the PAC-Bayesian optimization step we use $N_{\mathrm{train}} = 250$ functions, all of which are sampled i.i.d., that is, the data sets are independent of each other. + +Remark H.2. Training the algorithm to yield a good performance is comparably easy. On the other hand, turning it into an algorithm, such that $\mathbb{P}_{(P,\xi)|H}\{\mathsf{A}\}$ is large enough (in our case: a descent method without enforcing it geometrically) is challenging and, unfortunately, not guaranteed to work. Nevertheless, it is key to get a meaningful guarantee. + +# I. Architecture of the Algorithm for Training the Neural Network + +![](images/434d05ddcdca219c5a1463917b8d2c3cf089e6e30514b8649aac16268218fba6.jpg) +Figure 4. Algorithmic update for training the neural network: Based on the given six features, the first block computes four weights $w_{1}, \ldots, w_{4}$ , which are used to perform a weighting of the different directions $g \odot d_{1}^{(t)}, d_{1}^{(t)}, d_{2}^{(t)}, m \odot d_{2}^{(t)}$ , which are used in the second block. This second block consists of a 1x1-convolutional blocks, which compute an update direction $d_{\mathrm{out}}^{(t)}$ . Then, we update $z^{(t + 1)} \coloneqq z^{(t)} + d_{\mathrm{out}}^{(t)} / \sqrt{t}$ . + +The algorithmic update is adopted from Sucker & Ochs (2024) and consists of two blocks: + +1) The first block consists of linear layers with ReLU-activation functions and computes four weights $w_{1}, \ldots, w_{4}$ . As features, we use the (logarithmically transformed) gradient norm $s_{1}^{(t)} := \log \left( 1 + \| \nabla \ell(z^{(t)}, p) \| \right)$ , the (logarithmically transformed) norm of the momentum term $s_{2}^{(t)} := \log \left( 1 + \| z^{(t)} - z^{(t-1)} \| \right)$ , the difference between the current and previous loss $s_{3}^{(t)} := \ell(z^{(t)}, p) - \ell(z^{(t-1)}, p)$ , the scalar product between the (normalized) gradient and the (normalized) momentum term $s_{4}^{(t)}$ , the maximal absolute value of the coordinates of the gradient $s_{5}^{(t)}$ , and the iteration counter $t$ . +2) The second block consists of $1 \times 1$ -convolutional layers with ReLU-activation functions and computes the update direction $d_{\mathrm{out}}^{(t)}$ . As features, we use the normalized gradient $d_1^{(t)} := \frac{\nabla \ell(z^{(t)}, p)}{\|\nabla \ell(z^{(t)}, p)\|}$ , the normalized momentum term $d_2^{(t)} := \frac{z^{(t)} - z^{(t-1)}}{\|z^{(t)} - z^{(t-1)}\|}$ , and their "preconditioned" versions $g \odot d_1^{(t)}$ and $m \odot d_2^{(t)}$ , where the weights $m, d \in \mathbb{R}^d$ are learned, too. + +Again, we want to stress that the algorithmic update is not constrained in any way: the algorithm just predicts a direction, and we do not enforce them to have any specific properties. \ No newline at end of file diff --git a/ageneralizationresultforconvergenceinlearningtooptimize/images.zip b/ageneralizationresultforconvergenceinlearningtooptimize/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..59bde730c648e2f5e62af4c308164c89afe55ab5 --- /dev/null +++ b/ageneralizationresultforconvergenceinlearningtooptimize/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cb5f0d660fa4f2a7c27e9ac2fa6eff3b096fbc78bf43d6feaf291caecb03352 +size 622664 diff --git a/ageneralizationresultforconvergenceinlearningtooptimize/layout.json b/ageneralizationresultforconvergenceinlearningtooptimize/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..47a920d93aeb5a09b02035952704d4a339e8b0fa --- /dev/null +++ b/ageneralizationresultforconvergenceinlearningtooptimize/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b96e332d30937f6a3ed75e9575062fadc768dd975389595c6a1ada29374adae +size 1162901 diff --git a/ageneralizationtheoryforzeroshotprediction/a8f36c8f-02d0-4231-8e83-7384510cbce9_content_list.json b/ageneralizationtheoryforzeroshotprediction/a8f36c8f-02d0-4231-8e83-7384510cbce9_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f914f7162de0a67cbedef0a94be744da846031cc --- /dev/null +++ b/ageneralizationtheoryforzeroshotprediction/a8f36c8f-02d0-4231-8e83-7384510cbce9_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ba099f564bb3b1194af1b6b3b9fe9ab36c29299bd6c5143981c68424e682964 +size 471345 diff --git a/ageneralizationtheoryforzeroshotprediction/a8f36c8f-02d0-4231-8e83-7384510cbce9_model.json b/ageneralizationtheoryforzeroshotprediction/a8f36c8f-02d0-4231-8e83-7384510cbce9_model.json new file mode 100644 index 0000000000000000000000000000000000000000..190a1927c98754caf616b6d4b72a8d858127e2ff --- /dev/null +++ b/ageneralizationtheoryforzeroshotprediction/a8f36c8f-02d0-4231-8e83-7384510cbce9_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a55ada23f5b3166fae877c99f97f9713ccea1bfb694ca6f85adc5fe20cccb0d6 +size 548940 diff --git a/ageneralizationtheoryforzeroshotprediction/a8f36c8f-02d0-4231-8e83-7384510cbce9_origin.pdf b/ageneralizationtheoryforzeroshotprediction/a8f36c8f-02d0-4231-8e83-7384510cbce9_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1598a0fd6595c4e8b0fb2f3e2a17b525031c8479 --- /dev/null +++ b/ageneralizationtheoryforzeroshotprediction/a8f36c8f-02d0-4231-8e83-7384510cbce9_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdd0d246192c8b1a9e14c3a61e814c9eab55f0d864f13c17cbc3f661d754a48a +size 4496075 diff --git a/ageneralizationtheoryforzeroshotprediction/full.md b/ageneralizationtheoryforzeroshotprediction/full.md new file mode 100644 index 0000000000000000000000000000000000000000..99945ea7c5b8fad2d76f89de7bce8e96ad44c1dd --- /dev/null +++ b/ageneralizationtheoryforzeroshotprediction/full.md @@ -0,0 +1,2331 @@ +# Ronak Mehta1 Zaid Harchaoui1 + +# Abstract + +A modern paradigm for generalization in machine learning and AI consists of pre-training a task-agnostic foundation model, generally obtained using self-supervised and multimodal contrastive learning. The resulting representations can be used for prediction on a downstream task for which no labeled data is available. We present a theoretical framework to better understand this approach, called zero-shot prediction. We identify the target quantities that zero-shot prediction aims to learn, or learns in passing, and the key conditional independence relationships that enable its generalization ability. + +# 1. Introduction + +In 2021, OpenAI shocked the world by improving the zero-shot classification accuracy on ImageNet from $11.5\%$ to $76.2\%$ via the CLIP series of models (Radford et al., 2021). This event redefined the goal of zero-shot prediction from producing models that generalized to unseen classes to those that generalized to unseen tasks entirely. Two fundamental drivers of CLIP's success were 1) the use of natural language as a medium for representing arbitrary classes (as in the previous state-of-the-art Visual N-grams (Li et al., 2017)), and 2) a massive, yet carefully designed pre-training set which significantly impacted downstream performance (Radford et al., 2021; Fang et al., 2023; Xu et al., 2024). Despite the remarkable success of these foundation model-based pipelines (Bommasani et al., 2022), there are unique components of zero-shot prediction that warrant investigation from a theoretical point of view. + +To clarify these gaps, we contrast zero-shot prediction (ZSP) with the related setting of few-shot learning (FSL). Let $\pmb{x} \in \mathcal{X}$ denote an input (often an image) that accompanies a discrete value $\pmb{y} \in \mathcal{Y}$ (often a class label). Common to both ZSP and FSL is a pre-training procedure in which a + +$^{1}$ Department of Statistics, University of Washington, Seattle. Correspondence to: Ronak Mehta . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +large unlabeled dataset $\pmb{x}_1, \dots, \pmb{x}_N \in \mathcal{X}$ is used to produce an encoder $\alpha: \mathcal{X} \to \mathbb{R}^d$ . The embedding $\alpha(\pmb{x})$ is thought to contain information that is relevant for predicting $\pmb{y}$ from $\pmb{x}$ . Pre-training typically occurs through the process of self-supervised learning (SSL), using a pretext task that can be solved with only instances of $\pmb{x}$ (e.g. filling in a blank image patch). In FSL, the user may then access a labeled dataset $(\pmb{x}_1^{\mathrm{lab}}, \pmb{y}_1^{\mathrm{lab}}), \dots, (\pmb{x}_n^{\mathrm{lab}}, \pmb{y}_n^{\mathrm{lab}})$ from which a predictor can be trained inexpensively. This often takes the form of a linear classifier $\pmb{x} \mapsto \mathbf{W}\pmb{\alpha}(\pmb{x}) + \pmb{b}$ for $\mathbf{W} \in \mathbb{R}^{|\mathcal{Y}| \times d}$ and $\pmb{b} \in \mathbb{R}^{|\mathcal{Y}|}$ . Where ZSP departs from FSL is the additional challenge of being given no directly labeled training data. + +At first glance, ZSP seems impossible. Yet, the ingenuity of practitioners has yielded the following solution; if 1) each pre-training example $\boldsymbol{x}_i$ is paired with another "view" $\boldsymbol{z}_i \in \mathcal{Z}$ (e.g. a caption in natural language) and 2) if each label $\boldsymbol{y} \in \mathcal{Y}$ can intelligently be embedded into $\mathcal{Z}$ , then the relationship between each $\boldsymbol{x}_i$ and $\boldsymbol{z}_i$ could provide the means to perform prediction. Concretely, one learns a complementary encoder $\beta : \mathcal{Z} \to \mathbb{R}^d$ during pre-training and designs prompts $\boldsymbol{z}_k^y$ for $\boldsymbol{y} \in \mathcal{Y}$ and $k = 1, \ldots, m$ . Then, + +$$ +\boldsymbol {x} \mapsto \underset {\boldsymbol {y} \in \mathcal {Y}} {\arg \max } \frac {1}{m} \sum_ {k = 1} ^ {m} \left\langle \boldsymbol {\alpha} (\boldsymbol {x}), \boldsymbol {\beta} \left(\boldsymbol {z} _ {k} ^ {y}\right) \right\rangle \tag {1} +$$ + +is employed for prediction. An example of a prompt is the template text "photo of a _.", where the blank can be filled by the textual representation of the class (e.g. "cat" or "dog"). The ZSP pipeline, from pre-training to prompt selection, is clearly a wild departure from what is explained by statistical learning theory. Moreover, while some components of these systems have been studied in the context of FSL (such as the reasons why various pre-training objectives result in encoders that provably accelerate learning), unique aspects of ZSP, such as the role of prompting and the cost of "translating" modalities, have not yet received theoretical treatment. Herein lies our question. + +Through what decomposition of downstream task performance can we compare zero-shot prediction to the direct supervised learner, with a transparent dependence on the 1) pre-training distribution, 2) evaluation distribution, and 3) prompting strategy? + +Contributions. In Sec. 2, we present a learning theoretic framework for the pre-training/evaluation/prompting data and propose two expressions for the population counterpart of (1). These expressions, while equivalent at the population level, reflect two classes of learning methods which we call the "conditional mean" and the "information density" approaches. In Sec. 3, we prove a generic decomposition of the prediction error on the downstream task, which furnishes three components: prompt bias measures the compatibility of the prompt strategy with the pre-training and evaluation distributions, residual dependence measures the information-theoretic cost of using one modality to make predictions on another, and estimation error quantifies the effect of the finite number of pre-training examples and prompts. The estimation error decomposes further depending on whether the conditional mean or information density approaches are taken. To provide insight and demonstrate the usefulness of the decomposition, we analyze the performance of nonparametric regression methods for each approach by way of finite-sample bounds in high probability. Our framework arms practitioners with a means to imbue existing SSL-to-ZSP pipelines with theoretical guarantees, depending on the approach with which they best align. In Sec. 4, we illustrate our theoretical claims by empirically evaluating prompt bias and residual dependence on zero-shot prediction tasks with simulated and image data. + +Related Work. One can argue that precursors to both FSL and ZSP in machine learning can be found in the literature of meta-learning, or "learning to learn" (Thrun and Pratt, 1998; Andrychowicz et al., 2016; Finn et al., 2017). There, the downstream evaluation tasks are given to the user upfront, so that pre-training an encoder and training a predictor for all of the evaluation tasks can be performed in one step. On the other hand, FSL and ZSP both involve fully task-agnostic pre-training phases. Seminal work in computer vision on matching words and pictures is also worth mentioning (Barnard et al., 2003; Forsyth et al., 2009). + +Two complementary bodies of work studied phenomena common to FSL and ZSP. The first considers which properties of learned encoders can provably improve downstream performance (Wang and Isola, 2020; HaoChen et al., 2021; Atzmon et al., 2020; Wang and Jordan, 2024; Du and Xiang, 2024). The other is dedicated to explaining how otherwise mysterious SSL objectives achieve these properties (Wen and Li, 2021; Li et al., 2021; Pokle et al., 2022; Kiani et al., 2022; Johnson et al., 2023; Shwartz-Ziv et al., 2023). In particular, Balestriero and LeCun (2022) and Tan et al. (2024) relate various SSL objectives to spectral clustering. One FSL-specific line of work studies when linear mappings of pre-trained encoders can achieve optimal downstream performance (Saunshi et al., 2019; HaoChen et al., 2021; Tosh et al., 2021; Lee et al., 2021). + +While informative representations are essential, the core of ZSP is the remarkable ability of models to make predictions without any task-specific data, a challenge even for the perfect encoder. For context, we avoid the historical term "zero-shot learning" (Larochelle et al., 2008; Akata et al., 2015), which refers to a setting in which pre-training data is not only labeled, but contains metadata-based features associated with each class. In general, this only handles unseen classes, and only if the same features are observed at inference time. To our knowledge, the only work studying ZSP based on self-supervised pre-training is Chen et al. (2024). In particular, Chen et al. (2024, Theorem 4.2 and Corollary 5.1) provides bounds on the top- $k$ accuracy of ZSP for CLIP-based encoders. However, the bound increases with the batch size, may not decay to zero even if the pre-training loss is fully optimized and upstream and downstream data distributions are the same, and does not seem to explicitly depend on the prompt quality. The independent and concurrent work of Oko et al. (2025) develops a statistical analysis based on sufficiency notions, with the aim of capturing the predictive performance in the downstream task. Their work is complementary to ours, in that they determine the distributional parameter learned by the CLIP objective, but also assume that the prompting strategy and downstream data distribution are "idealized", in that the prompt bias and residual dependence quantities alluded to in the contributions are zero. + +On the applied side, we are inspired by the number of works that use diverse, class-specific prompts generated using large language models (LLMs) for enhancing ZSP performance (Pratt et al., 2023; Yang et al., 2023; Maniparambil et al., 2023) and interpretability (Menon and Vondrick, 2023; Esfandiarpoor et al., 2024). While these empirical methods, such as the customized prompts via language models method (CuPL, Pratt et al. (2023)), are often designed using intuition from human understanding of natural language, we aim to offer a theoretical explanation for their success from a statistical learning theory and probabilistic graphical modeling perspective. Despite this particular application of LLMs, we also acknowledge that "prompting" in ZSP has a different meaning than in the growing field of prompt engineering, in which inputs are designed for large language models (Pryzant et al., 2023; Wang et al., 2024; Guo et al., 2024; Sclar et al., 2024). + +# 2. Theoretical Framework + +We introduce the mathematical objects that connect the empirically-motivated predictor (1) to its theoretical counterpart analyzed in Sec. 3. For the reader's convenience, a global notation table is provided in Appx. A. + +![](images/411dd4e1d7439d9ab2679660e05cf687179a199da5269f50bc5d3e44cb6f2a1b.jpg) +Unimodal Contrastive + +![](images/9782f05cd9f62cd6b8edfc03f0fad992b9a34d4d523c23d1501c68aa4a142b41.jpg) +Reconstructive +Figure 1. Graphical Models of Prediction Paths. Each directed graphical model corresponds to the data types and dependence structures for various SSL pre-training approaches. The variable $C$ represents an unobserved context that determines the observed data-generating distribution. Dotted lines indicate the possibility of presence or absence of the arrow. Methods compatible with ZSP may learn the relationship between $X$ and $Z$ directly, whereas the relationship between $Z$ and $Y$ is learned via prompting. Methods that are compatible with FSL learn the label $Y$ as a latent variable in the process of solving the pretext task. + +![](images/22d56c54f45523ca10aef7d4378e207da816c2fe982b9252118e959731dac64f.jpg) +Multimodal Contrastive + +Prediction Setups. Consider random variables $X, Y$ , and $Z$ observed in $\mathcal{X}, \mathcal{Y}$ , and $\mathcal{Z}$ , respectively. We interpret $\mathcal{X}$ as the space of images, $\mathcal{Y}$ as the (not necessarily discrete) space of labels, and $\mathcal{Z}$ as the space of text captions. + +Consider a probability measure $P_{X,Y}$ on $\mathcal{X} \times \mathcal{Y}$ , called the evaluation distribution. We specify a collection of downstream tasks, with which we may evaluate predictors on data drawn from $P_{X,Y}$ (e.g. CIFAR-10). Consider a function $r: \mathcal{Y} \to \mathbb{R}$ , and the least squares prediction problem + +$$ +\min _ {\eta : \mathcal {X} \rightarrow \mathbb {R}} \mathbb {E} _ {P _ {X, Y}} \left[ (\eta (X) - r (Y)) ^ {2} \right] \tag {2} +$$ + +The function $r$ serves only to handle multiple task formats such as regression $(r(\pmb{y}) = \pmb{y})$ or binary classification $(r(\pmb{y}) = \mathbb{1}\{\pmb{y} = 1\})$ in a unified manner. We discuss formulations of multi-class classification and structured prediction in Sec. 3. The optimizer of (2) over $\eta \in \mathbf{L}^2(P_X)^1$ , or all measurable, square-integrable functions on $\mathcal{X}$ , is + +$$ +\eta_ {\star} (\boldsymbol {x}) := \mathbb {E} _ {P _ {Y, X}} [ r (Y) | X ] (\boldsymbol {x}). \tag {3} +$$ + +We will call this the direct predictor throughout this paper, which will contrast our viewpoint of ZSP as an indirect, multi-stage prediction procedure. Indeed, the prompting step in (1) resembles an empirical average of draws from a probability distribution on $\mathcal{Z}$ based on the class label $Y = y$ (especially when considering the LLM-based generation methods mentioned in Sec. 1), whereas the encoders capture a dependence relation between $X$ and $Z$ . Accordingly, we introduce a probability measure $Q_{X,Z}$ on + +$\mathcal{X} \times \mathcal{Z}$ , called the pre-training distribution, and the prompt distribution $\rho_{Y,Z}$ on $\mathcal{Y} \times \mathcal{Z}$ which represents the user-defined strategy for generating prompts. As a theoretical model for ZSP, we propose the function + +$$ +\eta_ {\rho} (\boldsymbol {x}) = \mathbb {E} _ {Q _ {X, Z}} [ g _ {\rho} (Z) | X ] (\boldsymbol {x}), \tag {4} +$$ + +called the indirect predictor, where + +$$ +g _ {\rho} (\boldsymbol {z}) = \mathbb {E} _ {\rho_ {Y, Z}} [ r (Y) | Z ] (\boldsymbol {z}). \tag {5} +$$ + +Notice that $\eta_{\star}$ relies only on $P_{X,Y}$ while $\eta_{\rho}$ is a two-stage predictor relying only on the pair $(Q_{X,Z},\rho_{Y,Z})$ . The pre-training, evaluation, and prompt distributions represent pairwise dependencies between the random variables $X$ , $Y$ , and $Z$ , as well as the observable data of the problem. Intuitively, our analysis of the performance gap between the direct and indirect predictors will quantify the "compatibility" of these three fundamental distributions as a possible joint distribution on $\mathcal{X} \times \mathcal{Y} \times \mathcal{Z}$ . + +Prediction Paths of FSL and ZSP. For context, we contrast our setup with previous theoretical analyses of FSL, aiming to 1) highlight the fundamental differences between SSL-for-FSL and SSL-for-ZSP, 2) describe assumptions we make (and do not make) to best align with applications. First, we consider two common SSL tasks that precede FSL. In unimodal contrastive learning, $X$ and $Z$ are augmented/corrupted images, and the pretext task is to identify examples derived from the same (“+”) or different (“-”) underlying image (Chen et al., 2020). In reconstructive SSL, the encoder is pre-trained to predict a hidden portion of the raw/embedded image (Assran et al., 2023). Foundational works such as Saunshi et al. (2019) + +and Wang and Isola (2020) explain the success of these SSL-for-FSL pipelines by the following mechanism: the labels $\mathcal{Y}$ used in the downstream task form a latent variable mixture model for the pre-training set, i.e. $Q_{X,Z} = \sum_{\boldsymbol{y} \in \mathcal{Y}} Q_{X,Z|Y = \boldsymbol{y}} \cdot Q_Y(\boldsymbol{y})$ . Thus, generalization guarantees hinge upon the fact that learning parameters of the pre-training distribution must inherently capture its latent variables (the downstream labels). This theory is visualized in Fig. 1 (left & center); observe that if the dotted arrows were absent, the only path to solve the pretext task is through the label. This FSL "prediction path" motivates another prevalent assumption of exact/approximate conditional independence of $X$ and $Z$ given $Y$ (e.g., as in Lee et al. (2021)). We avoid this assumption, which is unrealistic in the multimodal context as the dependence between an image and its caption is unlikely to be fully explained by a coarse label such as "cat". Moreover, this latent label model assumes equality of the marginals $P_X = Q_X$ on $\mathcal{X}$ . As a concrete example, this amounts to assuming that the marginal distribution of images on the Internet ( $Q_X$ ) is equal to that of CIFAR-10 images ( $P_X$ ). We explicitly track this mismatch in our generalization bounds. + +For ZSP, the prevailing SSL pretext task is multimodal contrastive learning (Fig. 1, right), wherein the foundation model learns a similarity function $(\pmb{x},\pmb{z})\mapsto \langle \pmb {\alpha}(\pmb {x}),\pmb {\beta}(\pmb {z})\rangle$ To discuss a joint distribution $P\equiv P_{X,Y,Z}$ , we adopt a latent caption model that associates $X\sim P_X$ with an unobserved $\mathcal{Z}$ -valued latent variable $Z$ (i.e. an unobserved caption). Because pre-training connects $X$ to $Z$ and prompting then connects $Y$ to $Z$ , the ideal dependence structure for ZSP is fundamentally different from FSL; if $X$ and $Y$ are conditionally independent given $Z$ , the direct and indirect predictors are in fact equivalent. Indeed, the tower property of conditional expectation gives the identity + +$$ +\begin{array}{l} \eta_ {\star} (\boldsymbol {x}) = \mathbb {E} _ {P} [ r (Y) | X ] (\boldsymbol {x}) \\ = \mathbb {E} _ {P} \left[ \mathbb {E} _ {P} [ r (Y) | Z, X ] | X \right] (\boldsymbol {x}) \\ = \mathbb {E} _ {P} \left[ \mathbb {E} _ {P} [ r (Y) | Z ] | X \right] (\boldsymbol {x}). \quad (X \perp Y | Z) \\ \end{array} +$$ + +The final expression is not equal to (4) because of the difference between $(Q_{X,Z},\rho_{Y,Z})$ and $(P_{X,Z},P_{Y,Z})$ . Additionally, $X$ and $Y$ are not necessarily conditionally independent given $Z$ . These discrepancies are precisely exposed in our analysis via a measure of distribution mismatch and a measure of the conditional dependence of $X$ and $Y$ given $Z$ . The latter formalizes the information-theoretic cost of using natural language as a proxy for image classification. + +Representations of the Indirect Predictor. We establish several central identities involving the indirect predictor (4). These expressions will strengthen the justification for $\eta_{\rho}$ as the target function of ZSP and naturally lead to two classes of learning methods that we analyze in Sec. 3. + +As a preview, consider the example of balanced binary classification $(r(\pmb{y}) = \mathbb{1}\{\pmb{y} = 1\})$ and the classifier that returns 1 when $\eta_{\rho}(\pmb{x}) \geq 1/2$ and 0 otherwise. We will show that there exist encoders $\alpha : \mathcal{X} \to \mathbb{R}^d$ and $\beta : \mathcal{Z} \to \mathbb{R}^d$ , and a sequence of scalars $\sigma_1 \geq \ldots \geq \sigma_d \geq 0$ such that if $\rho_Z \approx Q_Z$ and $d$ is sufficiently large, then this classifier is equivalent to + +$$ +\boldsymbol {x} \mapsto \arg \max _ {\boldsymbol {y} \in \mathcal {Y}} \left\langle \boldsymbol {\alpha} (\boldsymbol {x}), \mathbb {E} _ {\rho_ {Y, Z}} [ \beta (Z) | Y = \boldsymbol {y} ] \right\rangle_ {\sigma}, \tag {6} +$$ + +where $\langle \pmb{u},\pmb{v}\rangle_{\sigma}:= \sum_{i = 1}^{d}\sigma_{i}u_{i}v_{i}$ . This expression mirrors (1) down to a rescaling of the inner product. We now present the expressions that are used to derive (6). + +For the first, let $Q_{X}$ and $Q_{Z}$ be the marginals of $Q_{X,Z}$ on $\mathcal{X}$ and $\mathcal{Z}$ , respectively. We introduce the fundamental conditional mean operator $\mathbf{M}_{Z|X} : \mathbf{L}^2(Q_Z) \to \mathbf{L}^2(Q_X)$ , which assigns to any $g \in \mathbf{L}^2(Q_Z)$ the function $x \mapsto \mathbb{E}_{Q_{X,Z}}[g(Z)|X](x)$ . Then, it holds by definition that + +$$ +\eta_ {\rho} (\boldsymbol {x}) = \left[ \mathbf {M} _ {Z | X} g _ {\rho} \right] (\boldsymbol {x}). \tag {7} +$$ + +For the second, consider the case in which $Q_{X,Z} \ll Q_{X}Q_{Z}^{2}$ , where $Q_{X}Q_{Z}$ denotes the probability distribution of the pair $(X,Z)$ drawn independently as $X \sim Q_{X}$ and $Z \sim Q_{Z}$ . Then, we define the Radon-Nikodym derivative $\mathsf{R} \coloneqq \frac{\mathrm{d}Q_{X,Z}}{\mathrm{d}Q_XQ_Z} : \mathcal{X} \times \mathcal{Z} \to \mathbb{R}_{\geq 0}$ . The function $\mathsf{R}$ , called the information density has a long history in statistics and information theory. Using $\mathsf{R}$ (Lem. 6, Appx. B.3), the indirect predictor writes as + +$$ +\begin{array}{l} \eta_ {\rho} (\boldsymbol {x}) = \mathbb {E} _ {Q _ {Z}} \left[ g _ {\rho} (Z) \mathrm {R} (\boldsymbol {x}, Z) \right] \\ = \mathbb {E} _ {\rho_ {Y, Z}} [ r (Y) \mathrm {R} (\boldsymbol {x}, Z) ] + \operatorname {e r r} \left(Q _ {Z}, \rho_ {Z}\right), \tag {8} \\ \end{array} +$$ + +where $\mathrm{err}(Q_Z,\rho_Z)$ term measures the discrepancy between the marginal distributions of the captions generated during pre-training and prompting, respectively. The expressions (7) and (8), while equal at the population level, motivate two categories of approaches for learning/estimation that have different statistical properties. The "conditional mean" approach uses pre-training data to learn the operator $\mathbf{M}_{Z|X}$ and prompts to approximate the function $g_{\rho}$ . On the other hand, the "information density" approach learns the function $\mathsf{R}$ during pre-training, and approximates the expectation over $\rho_{Y,Z}$ using prompts. The information density approach is particularly reflective of the prompting aspect of (1), as one may perceive $z_k^y$ for $k = 1,\dots,m$ and $\pmb {y}\in \mathcal{V}$ as $M = m|\mathcal{V}|$ as samples from + +$\rho_{Y,Z}$ with $\rho_{Y}$ chosen to be uniform on $\mathcal{Y}$ . These are then used to replace the expectation in (8). + +Finally, we tie back to (6) and describe the formal connection between $\mathbf{M}_{Z|X}$ and $\mathsf{R}$ . In Prop. 2 (Appx. B.3), we prove the decomposition of the form + +$$ +\mathsf {R} (\boldsymbol {x}, \boldsymbol {z}) = \left\langle \boldsymbol {\alpha} (\boldsymbol {x}), \boldsymbol {\beta} (\boldsymbol {z}) \right\rangle_ {\sigma} + \varepsilon_ {d}, \tag {9} +$$ + +where $\sigma_d, \varepsilon_d \to 0$ as $d \to \infty$ . Then, (6) follows under the given conditions by plugging (9) into (8). + +The encoders $\alpha = (\alpha_{1},\ldots ,\alpha_{d})$ and $\beta = (\beta_{1},\dots,\beta_{d})$ and constants $(\sigma_i)_{i = 1}^d$ are none other than the components of the truncated singular value decomposition (SVD) of $\mathbf{M}_{Z|X}$ (Prop. 1, Appx. B.3). The SVD of $\mathbf{M}_{Z|X}$ and the information density $\mathsf{R}$ characterize the full dependence structure of $Q_{X,Z}$ ; because $\mathsf{R}$ is identically 1 when $Q_{X,Z} = Q_{X}Q_{Z}$ , we may define the (squared) mean square contingency dependence measure + +$$ +\begin{array}{l} I (X; Z) = \mathbb {E} _ {Q _ {X} Q _ {Z}} \left[ (\mathsf {R} (X, Z) - 1) ^ {2} \right] (10) \\ = \left\| \mathbf {M} _ {Z | X} \right\| _ {\mathrm {H S}} ^ {2} - 1 \\ = \sum_ {i = 2} ^ {\infty} \sigma_ {i} ^ {2}, (11) \\ \end{array} +$$ + +where $\| \cdot \|_{\mathrm{HS}}$ denotes the Hilbert-Schmidt norm (see Definition 7, Appx. B.2), and the identities are proven in Prop. 2. The right-hand side of (10) can also be interpreted as the $\chi^2$ -divergence $D_{\chi^2}(Q_{X,Z}\| Q_XQ_Z)\coloneqq \mathbb{E}_{Q_XQ_Z}[(\frac{\mathrm{d}Q_{X,Z}}{\mathrm{d}Q_XQ_Z})(X,Z) - 1)^2 ]$ between the joint distribution and the product of the marginals (see Definition 8). + +# 3. Generalization Guarantees for ZSP + +In this section, we prove generalization guarantees for ZSP methods by comparing $\eta_{\star}$ to $\eta_{\rho}$ and $\eta_{\rho}$ to an estimator $\hat{\eta}_{\rho}$ , based on an $N$ -sized pre-training set and $M$ -sized prompt set (recall that $M = m|\mathcal{Y}|$ in (1)). While there are some subtleties in the sampling models between various methods, one can consider $(X_1,Z_1),\ldots ,(X_N,Z_N)\stackrel {\mathrm{i.i.d}}{\sim}Q_{X,Z}$ and $(Y_{1},Z_{1}^{\prime}),\ldots ,(Y_{M},Z_{M}^{\prime})\stackrel {\mathrm{i.i.d}}{\sim}\rho_{Y,Z}$ for intuition purposes (see Appx. D.5 for a detailed description). We consider specific instances of both the conditional mean and information density approaches, based on learning theory in reproducing kernel Hilbert space (RKHS); our arguments do not intend to interpret foundation modeling as a kernel method, but to use the detailed analysis of the statistical errors in kernel methods to gain insight. In particular, we aim to expose two key dependences for the random triple $(X,Y,Z)$ : the dependence between $X$ and $Z$ (which governs pre-training) and the conditional dependence between $X$ and $Y$ given $Z$ (which governs downstream prediction). Similar statistical guarantees for other function classes (reviewed in Appx. E) can be plugged into our framework, + +which intends to capture the end-to-end performance from pre-training to downstream prediction. + +For $h\in \mathbf{L}^2 (P_X)$ , we define the norm $\| h\|_{\mathbf{L}^2 (P_X)}^2\coloneqq$ $\int_{X}h^{2}(\pmb {x})\mathrm{d}P_{X}(\pmb {x})$ , using analogous notation for other probability distributions. We will assume throughout the paper that $r$ is bounded by $B_{r}$ with probability one under $P_Y$ and $\rho_{Y}$ , so that $\eta_{\rho},\eta_{\star}\in \mathbf{L}^{2}(P_{X})$ . Given a square-integrable $\hat{\eta}_{\rho}$ , we first control the mean squared error (MSE) via $\| \eta_{\star} - \hat{\eta}_{\rho}\|_{\mathbf{L}^2 (P_X)}^2\leq$ + +$$ +2 \underbrace {\left\| \eta_ {\star} - \eta_ {\rho} \right\| _ {\mathbf {L} ^ {2} \left(P _ {X}\right)} ^ {2}} _ {\text {i n f o r m a t i o n - t h e o r e t i c e r r o r}} + 2 \underbrace {\left\| \eta_ {\rho} - \hat {\eta} _ {\rho} \right\| _ {\mathbf {L} ^ {2} \left(P _ {X}\right)} ^ {2}} _ {\text {e s t i m a t i o n e r r o r}}. \tag {12} +$$ + +The information-theoretic error captures the prompt bias and residual dependence that differentiates indirect and direct prediction, whereas the estimation error is a familiar term in statistical analysis. We discuss in Appx. D.4 how to convert the MSE bounds to risk bounds for classification. + +Prompt Bias and Residual Dependence. Here, we control the information-theoretic error term in (12). We state our assumptions regarding conditional probability informally and defer the formal descriptions using the language of regular conditional distributions to Appx. C. We work within the latent caption model from Sec. 2, for which we consider a joint distribution $P_{X,Y,Z}$ on $\mathcal{X} \times \mathcal{Y} \times \mathcal{Z}$ which equals the evaluation distribution $P_{X,Y}$ when marginalized over $\mathcal{Z}$ . Similar to the information density $\mathsf{R}$ from Sec. 2, we introduce the conditional information density + +$$ +\mathrm {S} _ {z} := \frac {\mathrm {d} P _ {X , Y \mid z}}{\mathrm {d} \left(P _ {X \mid z} P _ {Y \mid z}\right)}: \mathcal {X} \times \mathcal {Y} \rightarrow \mathbb {R} _ {\geq 0}, \tag {13} +$$ + +where $P_{X,Y|z}$ denotes the conditional distribution of $(X,Y)$ given $Z = z$ , and $P_{X|z}P_{Y|z}$ is defined analogously. This naturally motivates the conditional dependence measure given by + +$$ +I (X; Y | \boldsymbol {z}) = \mathbb {E} _ {P _ {X | \boldsymbol {z}} P _ {Y | \boldsymbol {z}}} \left[ (\mathsf {S} _ {\boldsymbol {z}} (X, Y) - 1) ^ {2} \right], \tag {14} +$$ + +called the conditional mean square contingency. Finally, consider the following regularity assumption on the joint distribution $P_{X,Y,Z}$ , also discussed in Appx. C. + +Assumption 1. $P_{X,Y,Z}$ on $\mathcal{X} \times \mathcal{Y} \times \mathcal{Z}$ satisfies the following: 1) Agreement of caption distribution: $P_{X}$ -almost all $\pmb{x} \in \mathcal{X}$ , $P_{Z|\pmb{x}}$ exists and $P_{Z|\pmb{x}} = Q_{Z|\pmb{x}}$ . 2) Regularity of conditional distributions: For $P_{Z}$ -almost all $\pmb{z} \in \mathcal{Z}$ , $P_{X,Y|\pmb{z}}$ exists, $P_{X,Y|\pmb{z}} \ll P_{X|\pmb{z}} P_{Y|\pmb{z}}$ , and the conditional information density (13) satisfies $\mathbb{E}_{P_{X,Y|\pmb{z}}}[\mathbb{S}_{\pmb{z}}(X,Y)] < +\infty$ and $\mathbb{E}_{P_{X,Y,Z}}[\mathbb{S}_{Z}(X,Y)] < +\infty$ . + +To measure the bias of the prompt distribution $\rho_{Y,Z}$ , we + +denote the analog of (5) under $P_{Y,Z}$ as + +$$ +g _ {P _ {Y, Z}} (\boldsymbol {z}) = \mathbb {E} _ {P _ {Y, Z}} \left[ r (Y) | Z \right] (\boldsymbol {z}). +$$ + +We may now state the main result, proved in Appx. C. + +Theorem 1. Under Asm. 1, $\| \eta_{\rho} - \eta_{\star}\|_{\mathbf{L}^2 (P_X)}^2\lesssim$ + +$$ +\underbrace {\mathbb {E} _ {P _ {Z}} \left[ I (X ; Y | Z) \right]} _ {\text {r e s i d u a l d e p e n d e n c e}} + \underbrace {\left\| g _ {\rho} - g _ {P _ {Y , Z}} \right\| _ {\mathbf {L} ^ {2} \left(P _ {Z}\right)} ^ {2}} _ {\text {p r o m p t b i a s}}. \tag {15} +$$ + +To give context to Thm. 1, conditional independence relations have previously been used to describe the performance of multimodal contrastive SSL for FSL. We are particularly inspired by the multi-view redundancy theory of Tosh et al. (2021), which states informally that the population FSL predictor can approach the performance of the idealized direct predictor that is given both $X$ and $Z$ at test time, if $X \perp Y|Z$ and $Z \perp Y|X$ approximately hold. However, the theory of graphical models (Lauritzen, 1996, Proposition 3.1) asserts that both conditional independence relations hold only if $(X,Z) \perp Y$ , that is, neither view has information predictive of the label. This can be seen intuitively from Fig. 1 by breaking the arrows $X \to Y$ and $Z \to Y$ . Notice that we compare only to the direct predictor (3) given $X$ (which is reflective of practice), so that we need only that $X \perp Y|Z$ (i.e. $X$ depends on $Y$ through $Z$ ) to close the gap. The prompt bias term (15) captures the possible incompatibility of the prompt distribution $\rho_{Y,Z}$ with $(P_{X,Y}, Q_{X,Z})$ -we call prompt strategies unbiased (see Appx. D.5) when this term is zero. + +Sample Complexity and Distribution Mismatch. The first step in our estimation error analysis is to pass the $\mathbf{L}^2 (P_X)$ -norm term $\| \eta_{\rho} - \hat{\eta}_{\rho}\|_{\mathbf{L}^2 (P_X)}^2$ from (12) to the $\mathbf{L}^2 (Q_X)$ -norm counterpart $\| \eta_{\rho} - \hat{\eta}_{\rho}\|_{\mathbf{L}^2 (Q_X)}^2$ . We then establish high-probability bounds on the $\mathbf{L}^2 (Q_X)$ -norm term, with respect to the random sampling of the pre-training and prompting data. Because this initial step follows from a standard distribution shift argument (based on either a bounded likelihood ratio assumption or an additive error in total variation distance), we defer it to Appx. D (see Lem. 14). Conceptually, the two examples below are derived from estimating the component of either (7) or (8) that involves $Q_{X,Z}$ using the pre-training set and the one that involves $\rho_{Y,Z}$ using the prompt strategy. In both cases, we discuss the convergence rates of state-of-the-art RKHS-based methods. As we review Appx. B.4, these rates are typically expressed in terms of two quantities: source condition constants, which measure the smoothness of the target function being learned, and eigendecay exponents of covariance operators, which measure the effective dimension of the data. It will serve our purposes to interpret the rates in terms of the dependence between $X$ and $Z$ under + +$Q_{X,Z}$ , under the following assumption. + +Assumption 2. The pre-training distribution satisfies $Q_{X,Z} \ll Q_X Q_Z$ , and the information density $R$ is contained in $\mathbf{L}^2(Q_X Q_Z)$ (i.e. $I(X;Z)$ is well-defined). + +Due to the technical overhead of each method (especially regarding mis-specified function classes), we provide high-level descriptions below and defer detailed descriptions of the specific estimation procedures and formal assumptions to Appx. D.1 (conditional mean) and Appx. D.2 (information density). We denote by $\delta \in (0,1]$ a failure probability, and $\mathrm{plog}(\cdot)$ a term that is poly-logarithmic in its input. + +Example 1: Nonparametric Regression. This approach, based on (7), uses the pre-training set to produce an estimate $\widehat{\mathbf{M}}_{Z|X}$ of the conditional mean operator and the prompts to produce an approximation $\hat{g}_{\rho}:\mathcal{Z}\to \mathbb{R}$ of $g_{\rho}$ . For the former, we use as an example the spectral regularization learning method of Meunier et al. (2024), which produces a conditional mean embedding function $\widehat{F}:\mathcal{X}\rightarrow \mathcal{G}$ , for an RKHS $\mathcal{G}$ of real-valued functions of $\mathcal{Z}$ . For any $g\in \mathcal{G}$ , we then define $[\widehat{\mathbf{M}}_{Z|X}g](\pmb {x}) = \langle g,\widehat{F} (\pmb {x})\rangle_{\mathcal{G}}$ . Note that $\widehat{F}$ predicts a target that is itself a function-such methods are therefore referred to as "vector-valued" regression. By the Reisz representation theorem, a similar function $F_{\star}$ can be constructed such that $[\mathbf{M}_{Z|X}g](\pmb {x}) =$ $\langle g,F_{\star}(\pmb {x})\rangle_{\mathcal{G}}$ . For $\hat{g}_{\rho}$ , we consider standard kernel regularized least-squares (e.g., Smale and Zhou (2007)) applied to $M$ i.i.d. draws from $\rho_{Y,Z}$ . Assuming that $g_{\rho}\in \mathcal{G}$ , one can then pass the problem to controlling $\| \hat{g}_{\rho} - g_{\rho}\|_{\mathcal{G}}^{2}$ and $\| \widehat{F} -F_{\star}\|_{\mathbf{L}^2 (Q_X;\mathcal{G})}^2$ , where $\mathbf{L}^2 (Q_X;\mathcal{G})$ denotes a Bochner space (reviewed in Appx. B.4). + +To derive the convergence rates below, we show in Appx. D.1 that the source condition on $F_{\star}$ can be expressed in terms of the singular decay exponent of $\mathbf{M}_{Z|X}$ (i.e. $\sigma_i \sim i^{-\gamma_X, Z}$ from (11)), and the eigendecay exponents $\gamma_X$ and $\gamma_Z$ of the covariance operators of $Q_X$ and $Q_Z$ , respectively. Additionally, $\omega_{\rho} > 1/2$ is a parameter controlling the convergence rate of the prompt-based estimate of $g_{\rho}$ . The parametrization below is chosen so that one may interpret $\omega_{\rho}$ as a similar source condition for the target function $g_{\rho}$ . In the well-specified case (when $F_{\star}$ is contained in the hypothesis class), we describe the convergence rate with the aggregated exponent + +$$ +q (t) = \left(2 \gamma_ {X, Z} + \gamma_ {Z} - 1\right) ^ {t} \gamma_ {X} ^ {1 - t} \geq 1, \quad t \in [ 0, 1) +$$ + +where $t$ depends on $F_{\star}$ . The result below corresponds to Thm. 10 in Appx. D.1, which relies on a basis alignment assumption to aggregate the singular/eigendecays. + +Theorem 2 (Informal). For $\hat{\eta}_{\rho}(\pmb{x}) = \langle \hat{g}_{\rho}, \widehat{F}(\pmb{x}) \rangle_{\mathcal{G}}$ , there exist $t \in [0,1)$ and $C(Q_{X,Z}) \geq 0$ (independent of + +$$ +\begin{array}{l} (N, M, \delta)) \text {s u c h t h a t} \| \hat {\eta} _ {\rho} - \eta_ {\rho} \| _ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2} \lesssim \\ \operatorname {p l o g} (1 / \delta) \left[ N ^ {- \frac {q (t)}{q (t) + 1}} + C (Q _ {X, Z}) M ^ {- \frac {2 \omega_ {\rho} - 1}{2 \omega_ {\rho} + 1}} \right] \tag {16} \\ \end{array} +$$ + +with probability at least $1 - \delta$ for $N$ sufficiently large. + +Let us interpret the constant $q(t)$ . First, the dependence on $N$ ranges between $O(N^{-1/2})$ and the parametric rate $O(N)$ . Convergence is faster when $\gamma_{X,Z} \gg 1$ or $\gamma_Z \gg 1$ . The first case implies near-independence of $X$ and $Z$ , for which learning is easy as $\widehat{F}(\boldsymbol{x})$ is essentially constant over $\boldsymbol{x} \in \mathcal{X}$ . The second case indicates that the $Z$ variable is near-finite dimensional, or that the vector-valued nature of the problem has been reduced to standard univariate regression. Convergence is slower if $\gamma_X \gg 1$ , or if the effective dimension of $\mathcal{X}$ is small relative to the effective dimension of $Z$ . The balancing constant $C(Q_{X,Z})$ (shown explicitly in Thm. 10) decays with $\gamma_{X,Z}$ and $\gamma_Z$ , so as $(X,Z)$ becomes more independent or $Z$ approaches finite dimensions, the variance from prompt sampling decreases. We also discuss the mis-specified case in Appx. D.1. + +# Example 2: Radon-Nikodym Derivative Estimation. + +This approach, based on (8), considers pre-training to return a learned information density $\widehat{\mathsf{R}}:\mathcal{X}\times \mathcal{Z}\to \mathbb{R}_{\geq 0}$ . By approximating the prompt distribution $\rho_{Y,Z}$ with $\hat{\rho}_{Y,Z}$ (e.g. the empirical measure in the result below), one may define the estimator $\hat{\eta}_{\rho}(\pmb {x}) = \mathbb{E}_{\hat{\rho}_{Y,Z}}[r(Y)\widehat{\mathsf{R}} (\pmb {x},Z)]$ . Similar in spirit to the previous example, we consider the kernel Radon-Nikodym derivative estimation with the spectral regularization procedure of Nguyen et al. (2024). The convergence rate of $\widehat{\mathsf{R}}$ to $\mathsf{R}$ is governed by a source condition constant $\beta \geq 1$ associated to $\mathsf{R}$ (see Appx. D.2). We interpret this constant analogously to $q(t)$ , in that we prove a relationship to the singular decay exponent $\gamma_{X,Z}$ , but is not directly expressible in terms of the latter. The following result corresponds to Thm. 11 in Appx. D.2. + +Theorem 3 (Informal). For $\hat{\eta}_{\rho}(\pmb{x}) = \mathbb{E}_{\hat{\rho}_{Y,Z}}[r(Y)\widehat{\mathsf{R}} (\pmb{x},Z)]$ and $\rho_Z\ll Q_Z$ , there exists $C_{\mathsf{R},\rho}(Q_X)\geq 0$ (independent of $(N,M,\delta)$ ) such that $\| \hat{\eta}_{\rho} - \eta_{\rho}\|_{\mathbf{L}^2 (Q_X)}^2\lesssim$ + +$$ +\operatorname {p l o g} (1 / \delta) \left[ N ^ {- \frac {\beta}{\beta + 1}} + C _ {\mathsf {R}, \rho} (Q _ {X}) M ^ {- 1} \right] + D _ {\chi^ {2}} (\rho_ {Z} \| Q _ {Z}) +$$ + +with probability at least $1 - \delta$ for all $N$ sufficiently large. + +Notice that the bound of Thm. 3 includes a divergence term between $\rho_Z$ (the captions generated by prompting) and $Q_{Z}$ (the captions of the pre-training set). This term comes precisely from the error term in (8). This elucidates the fact that the conditional mean approach and the information density are not equivalent representations of the pre-training distribution, as one needs both R and $Q_{Z}$ in order to identify the conditional mean. The parametric + +rate $M^{-1}$ reflects that samples are used to learn a joint expectation over $\rho_{Y,Z}$ , which is an easier statistical problem than estimating the regression function of $Y$ on $Z$ that appears in Thm. 2. Thus, the information density approach may enjoy faster statistical convergence, at the expense of bias from the distribution mismatch on $\mathcal{Z}$ . The constant $C_{\mathsf{R},\rho}(Q_X)$ relates to the $\mathbf{L}^2 (Q_X)$ -norm of the random function $\pmb {x}\mapsto r(Y)\mathsf{R}(\pmb {x},Z)$ for $(Y,Z)\sim \rho_{Y,Z}$ ; the error from finite prompts decays when this norm is light-tailed. + +In both Thm. 2 and Thm. 3, we aim to highlight not particular convergence rates of the chosen methods, but the framework that leads to proving them. Similar results can also be leveraged in our framework. SSL procedures such as noise contrastive estimation have been related to the estimation of R (Gutmann and Hyvarinen, 2012). For example, Tosh et al. (2021, Theorem 11) upper bounds $\| \widehat{\mathsf{R}} -\mathsf{R}\|_{\mathbf{L}^2 (Q_XQ_Z)}^2$ using the suboptimality of the population risk, allowing for empirical risk minimization-style analysis. + +# 4. Experiments + +In Sec. 1, we asked how the downstream task performance depends on the pre-training distribution $Q_{X,Z}$ , evaluation distribution $P_{X,Y}$ , and prompting strategy $\rho_{Y,Z}$ . At the population level, we captured the dependence on $Q_{X,Z}$ and $P_{X,Y}$ using the residual dependence $\mathbb{E}_{P_Z}[I(X;Z)]$ and incorporated $\rho_{Y,Z}$ via the prompt bias (Thm. 1). In the first experiment, we create a simulated setting in which the residual dependence can be controlled and investigate whether it is indeed a determining factor for the empirical performance of CLIP (Radford et al., 2021) and VICReg (Bardes et al., 2022) models in practice. In the second experiment, we solve an image classification task in which the images have both captions and labels (i.e., we may sample from a true joint distribution $P_{X,Y,Z}$ ). This allows us to understand the effect of prompt bias by comparing template-based prompting strategies to the unbiased setting $\rho_{Y,Z} = P_{Y,Z}$ . To understand the dependence on $\rho_{Y,Z}$ at a sample level, we explore how downstream performance scales with the number of prompts $M$ in both the second experiment (unbiased prompting) and third experiment (LLM-based prompting). We are particularly interested in verifying the dependence on $M$ (which is the dominant error when $N \gg M$ ) derived in Thm. 3). Appx. F contains further details of the experiments, and code for reproduction can be found at github.com/ronakdm/zeroshot. + +Models, Datasets, and Evaluation. For foundation models, we use three publicly available CLIP models from the OpenCLIP repository (Ilharco et al., 2022): ResNet50 pre-trained on YFCC15M (Thomee et al., 2016), NLLB-CLIP pre-trained on a subset of LAION COCO (Visheratin, 2023), and ViT-B/32 pre-trained on the DataComp + +![](images/c839fadb99c1a26d88380b647612ae938d81b0fbab95ea15deec6638566bb5e9.jpg) +Figure 2. Results: Residual Dependence Simulation. Simulation for $(X,Z,Y)$ described in Appx. F.4. Left: The $y$ -axis is the accuracy of classifying $Y$ given $X$ and the $x$ -axis is the parameter $\theta$ controlling the residual dependence $I(X;Y|Z)$ as in (103). Right: The $y$ -axis shows $\mathbb{E}_{P_Z}[I(X;Y|Z)]$ as computed in Appx. F.4. Error bars indicate standard errors from 10 seeds, which govern the data used for estimating expected values and randomness in the training procedures for CLIP and VICReg. + +![](images/b59c067de4cc90c254f7a35a729797eb1556134a9065b8b6536ac540c820eb23.jpg) + +medium pool (Gadre et al., 2023). Our evaluation datasets include five standard benchmarks: the Describable Textures Dataset or DTD (Cimpoi et al., 2014), Flowers 102 (Nilsback and Zisserman, 2008), FGVC Aircraft (Maji et al., 2013), SUN397 (Xiao et al., 2010), and ImageNet-1k (Deng et al., 2009). For some experiments, we make use of the ImageNet-Captions dataset (Fang et al., 2023), which pairs a subset of ImageNet images collected from Flickr with their original captions. Evaluation occurs via zero-shot classification top- $k$ accuracy, in which a test example is considered to be classified correctly if the true class is contained within the elements of $\mathcal{Y}$ with the $k$ largest scores as computed by (1). Evaluation is done using tools from the CLIP Benchmark repository. In Fig. 3 and Fig. 4, "templates" refers to using all default community-curated prompts available in CLIP Benchmark. Finally, detailed descriptions of the prompt sampling schemes are collected and compared to the theory in Appx. D.5. + +Classification Accuracy and Residual Dependence. We consider a simulated binary classification task in which all distributions are compatible (i.e. $Q_{X,Z} = P_{X,Z}$ and $\rho_{Y,Z} = P_{Y,Z}$ for some $P_{X,Y,Z}$ ) and the predictors (3) and (4) can be computed analytically. We also include the zero-shot predictor (1) learned by both the CLIP and VI-CReg objectives. Our goals are two-fold in this simulation: 1) to empirically observe that as $\mathbb{E}_{P_Z}[I(X;Y|Z)]\to 0$ , the predictive performance of the indirect predictor $\eta_{\rho}$ does indeed approach that of $\eta_{\star}$ , and 2) that the predictors generated by common SSL methods used in practice have similar performance trends as $\eta_{\rho}$ . As for the data-generating process, we consider $\mathcal{X} = \mathcal{Z} = \mathbb{R}^d$ and a pair of Gaussian + +![](images/2a2cab397765e9038f742867519fcf77515a63e93a3d95518d4be90892682d27.jpg) +Figure 3. Results: Unbiased Prompting. Pre-trained models are varied along the rows and sub-tasks (subsets of 50 ImageNet-1k classes) are varied along columns. In all plots, the $x$ -axis denotes the number of prompts sampled for each class embedding and the $y$ -axis denotes top- $k$ zero-shot classification accuracy. Error bars indicate standard deviations across 10 seeds for prompt sampling. + +distributions $(P_{X,Z|Y = 0},P_{X,Z|Y = 1})$ , where given $Y = y$ + +$$ +\left[ \begin{array}{c} X \\ Z \end{array} \right] \sim \mathcal {N} \left(\left[ \begin{array}{c} \boldsymbol {\mu} _ {X | \boldsymbol {y}} \\ \boldsymbol {\mu} _ {Z | \boldsymbol {y}} \end{array} \right], \left[ \begin{array}{c c} \mathbf {C} _ {X X | \boldsymbol {y}} & \mathbf {C} _ {X Z | \boldsymbol {y}} \\ \mathbf {C} _ {Z X | \boldsymbol {y}} & \mathbf {C} _ {Z Z | \boldsymbol {y}} \end{array} \right]\right) +$$ + +with class-conditional mean vectors $\mu_{X|y},\mu_{Z|y}\in \mathbb{R}^d$ and covariance matrices $\mathbf{C}_{XX|y},\mathbf{C}_{ZX|y},\mathbf{C}_{ZZ|y}\in \mathbb{R}^{d\times d}$ . In order to control the conditional dependence between $X$ and $Y$ given $Z$ , we fix all parameters except for $\mu_{Z|y}$ and $\mathbf{C}_{ZX|y}$ (for $y = 0,1$ ), and define them using a tunable parameter $\theta \in [0,1]$ in a way such that the conditional distribution of $Y$ given $X = x$ stays constant. We make it so that as $\theta \to 1$ , $I(X;Y|z)\to 0$ . Finally, to measure classification accuracy, we directly draw samples from $P_{Y,Z}$ to simulate unbiased prompting. The full mathematical details are given in Appx. F.4. We observe both of the intended effects; the left panel of Fig. 2 demonstrates that as $\theta$ approaches 1, the indirect, CLIP, and VICReg predictors approach the performance of the direct predictor in terms of classification performance. The right panel confirms that $\theta$ indeed controls $\mathbb{E}_{P_Z}[I(X;Y|Z)]$ in an approximately monotonic fashion. + +Prompting without Bias with Observations from $P_{Z,Y}$ . Next, we illustrate the importance of the prompt bias term in Thm. 1 by considering an ImageNet-Captions dataset, in which we may observe the joint sample $(X,Y,Z)$ . We compare the standard prompting technique using predefined templates to the unbiased strategy that draws samples directly from $P_{Y,Z}$ . We design three sub-tasks by + +![](images/67b389b533f472d442401bb6338a1701597406aa12a341897cc54bc08657e069.jpg) + +![](images/2d3173b9e7cb1002d7708229872336ff74b70171be40c21c5b0056d01da34836.jpg) + +![](images/dd618e63446c5f451cf29200bf64a9c22650be89a3a22925014868694e35a138.jpg) + +![](images/b4e061062a9a790f8a068b1a7849ae8a2abf5e328f8ea8a60abf7ccd98eb3a5d.jpg) + +![](images/0db356fb8c6d021fc4dcce120c3e8c4da3240a5ad211c76dade5d4908851e76a.jpg) + +![](images/014de374e547db80c1bdf527ed4e76ac84bfb9a16958e5bef79e0d0d875939c1.jpg) + +![](images/c55aca57510779b9227fba3e59561a138a75826667b6cd95b269cdbd39017010.jpg) + +![](images/d4d86ee3f613a44fb962cd53bfc06554cd8662c51514a1ca42cddc635ccdac48.jpg) + +![](images/969dc5028226369d19aa9c1c07c77680faae8353a08aa2e517ff55e840f50702.jpg) + +![](images/b1fe9d2313d59973d7e6077a089b60be068d519e8e4c513db9adfc6ae97d916a.jpg) + +Figure 4. Results: Class-Conditional Prompting. Pre-trained models are varied along the rows and evaluation datasets are varied along columns. In all plots, the $x$ -axis denotes the number of prompts sampled for each class embedding and the $y$ -axis denotes top- $k$ zero-shot classification accuracy. Error bars indicate standard deviations across 10 seeds for prompt sampling. +![](images/44a0c07a4457b8bcab0f884a83a22665e121256110b53d6bcd30c4443585f29d.jpg) +Top-1 (Templates) Top-5 (Templates) Top-1 (CuPL) Top-5 (CuPL) + +![](images/841b6a78d63875140e3a1558ecfcf5def0acc922b08a1010fe3b2a9520c76997.jpg) + +![](images/e237579cbc2381e2c88b908ea3022cd0c635eccdb7d8862efcd5bb6b5cfc358a.jpg) + +![](images/22cc8cd8710d376cdc838ea8aba4fd7674799f698fc1eb78fe8d69d014385d8d.jpg) + +![](images/9fc93caa2dac9fbf8ba368da11d377405f0866762e7157facc5e963fdb8fc65d.jpg) + +randomly selecting collections of 50 classes from each of 998 classes, reserving held-out prompting examples for which we can draw from $P_{Z|Y = y}$ for each $y \in \mathcal{Y}$ (see the additional details in Appx. F). The zero-shot classification accuracy on a held-out evaluation set is plotted in Fig. 3. Observe that the threshold at which unbiased prompting outperforms the 18 default templates is approximately $M = 10$ across tasks. However, the performance of the unbiased approach only saturates at $M = 100$ and can have enormous benefits (almost $15\%$ absolute increase in top-1 accuracy for the ResNet50 on Sub-Task 1) in performance. Thus, for models that have not yet been saturated from pre-training, prompting can close surprisingly wide gaps in zero-shot classification accuracy. + +Class-Conditional Prompting with Language Models. As mentioned in Sec. 1, we investigate CuPL as a means to implement class-conditional prompting (sampling from $\rho_{Z|Y = y}$ for each $y\in \mathcal{V}$ ) with LLMs. Our experimental setup and scientific goals differ from those used in Pratt et al. (2023): 1) we use lightweight encoders that have not saturated their performance during pre-training, as opposed to the large-scale ViT-L/14 architecture, 2) we quantify the variability of classification accuracy with respect to prompting by generating up to fifty times as many prompts per experiment, and 3) we employ LlaMA 3 (Llama Team, Meta AI, 2024), which is free and accessible to other, as opposed to GPT-3 (Brown et al., 2020). The results are shown in Fig. 4, where we order the datasets in increasing + +number of classes per task: 47, 100, 102, 397, and 998. Similar phenomena as in Fig. 3 are observed, although the approximate saturation threshold varies per dataset from 20 for Flowers 102 and FGVC Aircraft up to 60 for DTD. Note that the choice of defaults heavily influences the baseline performance. Surprisingly, the Flowers 102 dataset uses a single default: "a photo of a _, a type of flower", and is often able to outperform the class-conditional LLM approach on average. On the other hand, the DTD templates of the form "a photo of a _ {texture, pattern, thing, object}" are dramatically outperformed by our LLM-generated captions , with a nearly $20\%$ increase in top-5 accuracy on the ResNet50 and ViT-B/32 architectures. + +# 5. Conclusion + +We showed how zero-shot prediction (ZSP) can be theoretically understood as an indirect prediction path from another modality to the label. We presented two viewpoints on categorizing ZSP methods—the conditional mean approach and the information density approach—and framed a decomposition formula for their generalization abilities. Our theoretical results and experiments highlighted the role of residual dependence and prompt bias in defining the fundamental limits of ZSP. Interesting venues for future work include the extension of our analysis to classes of distribution shifts between the pre-training distribution and the downstream distribution, and to causal generative modeling (Scetbon et al., 2024; Zhang et al., 2024). + +# Impact Statement + +As the capabilities of foundation models become increasingly universal, we feel that a comprehensive understanding of their underlying mechanisms is crucial. Complementing the community's empirical work on the evaluating the impact of pre-training data and mitigating bias, we aim to spark an equally rigorous line of research that rethinks theoretical analysis for the purpose of modern learning paradigms that greatly affect humanity. + +# Acknowledgements + +The authors are grateful to D. Hsu, E. Perković, and N. Srebro for fruitful discussions related to this work. The authors also thank the reviewers and the area chair for valuable comments. This work was supported by NSF DMS-2023166, CCF-2019844, DMS-2134012, NIH, and IARPA 2022-22072200003. Part of this work was performed while R. Mehta and Z. Harchaoui were visiting the Simons Institute for the Theory of Computing. + +# References + +Z. Akata, Z. Harchaoui, and C. Schmid. Label-Embedding for Image Classification. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2015. +M. Andrychowicz, M. Denil, S. Gómez, M. W. Hoffman, D. Pfau, T. Schaul, B. Shillingford, and N. de Freitas. Learning to learn by gradient descent by gradient descent. In NeurIPS, 2016. +M. Assran, Q. Duval, I. Misra, P. Bojanowski, P. Vincent, M. Rabbat, Y. LeCun, and N. Ballas. Self-Supervised Learning from Images with a Joint-Embedding Predictive Architecture. In CVPR, 2023. +Y. Atzmon, F. Kreuk, U. Shalit, and G. Chechik. A causal view of compositional zero-shot recognition. In NeurIPS, 2020. +J.-P. Aubin. Applied Functional Analysis. Wiley, 2nd edition, 2000. +F. Bach. Learning Theory from First Principles. The MIT Press, 2024. +C. R. Baker. Joint Measures and Cross-Covariance Operators. Transactions of the American Mathematical Society, 1973. +R. Balestriero and Y. LeCun. Contrastive and Non-Contrastive Self-Supervised Learning Recover Global and Local Spectral Embedding Methods. In NeurIPS, 2022. + +R. Balestriero, M. Ibrahim, V. Sobal, A. Morcos, S. Shekhar, T. Goldstein, F. Bordes, A. Bardes, G. Mialon, Y. Tian, et al. A cookbook of self-supervised learning. arXiv Technical Report, 2023. +A. Bardes, J. Ponce, and Y. LeCun. VICReg: Variance-Invariance-Covariance Regularization for Self-Supervised Learning. In ICLR, 2022. +K. Barnard, P. Duygulu, D. Forsyth, N. d. Freitas, D. M. Blei, and M. I. Jordan. Matching words and pictures. JMLR, 2003. +F. Bartolucci, E. De Vito, L. Rosasco, and S. Vigogna. Understanding neural networks with reproducing kernel Banach spaces. Applied and Computational Harmonic Analysis, 2023. +F. Bauer, S. Pereverzev, and L. Rosasco. On regularization algorithms in learning theory. Journal of Complexity, 2007. +P. J. Bickel, C. A. Klaassen, P. J. Bickel, Y. Ritov, J. Klaassen, J. A. Wellner, and Y. Ritov. Efficient and Adaptive Estimation for Semiparametric Models. Johns Hopkins University Press Baltimore, 1993. +R. Bommasani, D. A. Hudson, E. Adeli, R. Altman, S. Arora, S. von Arx, M. S. Bernstein, J. Bohg, A. Bosse-lut, E. Brunskill, et al. On the opportunities and risks of foundation models. arXiv Technical Report, 2022. +L. Breiman and J. H. Friedman. Estimating optimal transformations for multiple regression and correlation. Journal of the American Statistical Association, 80(391): 580-598, 1985. +T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-Voss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Berner, S. McCandlish, A. Radford, I. Sutskever, and D. Amodei. Language Models are Few-Shot Learners. In NeurIPS, 2020. +A. Buja. Remarks on Functional Canonical Variates, Alternating Least Squares Methods and ACE. The Annals of Statistics, 1990. +V. A. Cabannnes, F. Bach, and A. Rudi. Fast Rates for Structured Prediction. In COLT, 2021. +T. Chen, S. Kornblith, M. Norouzi, and G. Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020. + +Z. Chen, Y. Deng, Y. Li, and Q. Gu. Understanding Transferable Representation Learning and Zero-shot Transfer in CLIP. In ICLR, 2024. +A. Christmann and I. Steinwart. Support vector machines. Springer, 2008. +M. Cimpoi, S. Maji, I. Kokkinos, S. Mohamed, and A. Vedaldi. Describing Textures in the Wild. In CVPR, 2014. +F. Cucker and D. X. Zhou. Learning theory: an approximation theory viewpoint, volume 24. Cambridge UP, 2007. +J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A large-scale hierarchical image database. In CVPR, 2009. +R. DeVore, R. D. Nowak, R. Parhi, and J. W. Siegel. Weighted variation spaces and approximation by shallow ReLU networks. Applied and Computational Harmonic Analysis, 2025. +K. Du and Y. Xiang. Low-Rank Approximation of Structural Redundancy for Self-Supervised Learning. In CLeaR, 2024. +R. Durrett. Probability: Theory and Examples. Cambridge University Press, 2019. +A. Dytso, M. Cardone, and I. Zieder. Meta Derivative Identity for the Conditional Expectation. IEEE Transactions on Information Theory, 2023. +R. Esfandiarpoor, C. Menghini, and S. H. Bach. If CLIP Could Talk: Understanding Vision-Language Model Representations Through Their Preferred Concept Descriptions. In EMNLP, 2024. +A. Fang, G. Ilharco, M. Wortsman, Y. Wan, V. Shankar, A. Dave, and L. Schmidt. Data determines distributional robustness in contrastive language-image pre-training (CLIP). In ICML, 2023. +C. Finn, P. Abbeel, and S. Levine. Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks. In ICML, 2017. +S. Fischer and I. Steinwart. Sobolev Norm Learning Rates for Regularized Least-Squares Algorithms. JMLR, 2020. +D. A. Forsyth, T. Berg, C. O. Alm, A. Farhadi, J. Hockenmaier, N. Loeff, and G. Wang. Words and pictures: Categories, modifiers, depiction, and iconography. Object categorization: Computer and human vision perspectives, 2009. + +K. Fukumizu, A. Gretton, and F. Bach. Statistical Convergence of Kernel CCA. In NeurIPS, 2005. +K. Fukumizu, F. R. Bach, and A. Gretton. Statistical Consistency of Kernel Canonical Correlation Analysis. JMLR, 2007a. +K. Fukumizu, A. Gretton, X. Sun, and B. Schölkopf. Kernel Measures of Conditional Dependence. In NeurIPS, 2007b. +S. Y. Gadre, G. Ilharco, A. Fang, J. Hayase, G. Smyrnis, T. Nguyen, R. Marten, M. Wortsman, D. Ghosh, J. Zhang, E. Orgad, R. Entezari, G. Daras, S. M. Pratt, V. Ramanujan, Y. Bitton, K. Marathe, S. Mussmann, R. Vencu, M. Cherti, R. Krishna, P. W. Koh, O. Saukh, A. Ratner, S. Song, H. Hajishirzi, A. Farhadi, R. Beaumont, S. Oh, A. Dimakis, J. Jitsev, Y. Carmon, V. Shankar, and L. Schmidt. DataComp: In search of the next generation of multimodal datasets. In NeurIPS, 2023. +I. Gohberg, S. Goldberg, and M. Kaashoek. Classes of Linear Operators Vol. 1. Springer, 1990. +I. Gohberg, S. Goldberg, and M. Kaashoek. *Basic Classes of Linear Operators Vol. 1*. Springer, 2003. +S. Goyal, A. Kumar, S. Garg, Z. Kolter, and A. Raghunathan. Finetune like you pretrain: Improved finetuning of zero-shot vision models. In CVPR, 2023. +Q. Guo, R. Wang, J. Guo, B. Li, K. Song, X. Tan, G. Liu, J. Bian, and Y. Yang. Connecting Large Language Models with Evolutionary Algorithms Yields Powerful Prompt Optimizers. In ICLR, 2024. +M. U. Gutmann and A. Hyvarinen. Noise-Contrastive Estimation of Unnormalized Statistical Models, with Applications to Natural Image Statistics. JMLR, 2012. +J. Z. HaoChen, C. Wei, A. Gaidon, and T. Ma. Provable Guarantees for Self-Supervised Deep Learning with Spectral Contrastive Loss. In NeurIPS, 2021. +D. Hendrycks and T. Dietterich. Benchmarking Neural Network Robustness to Common Corruptions and Perturbations. In ICLR, 2019. +G. Ilharco, M. Wortsman, R. Wightman, C. Gordon, N. Carlini, R. Taori, A. Dave, V. Shankar, H. Namkoong, J. Miller, H. Hajishirzi, A. Farhadi, and L. Schmidt. OpenCLIP. GitHub Repository, 2022. +D. D. Johnson, A. E. Hanchi, and C. J. Maddison. Contrastive Learning Can Find An Optimal Basis For Approximately View-Invariant Functions. In ICLR, 2023. + +B. T. Kiani, R. Balestriero, Y. Chen, S. Lloyd, and Y. Le-Cun. Joint Embedding Self-Supervised Learning in the Kernel Regime. arXiv Technical Report, 2022. +I. Klebanov, I. Schuster, and T. J. Sullivan. A Rigorous Theory of Conditional Mean Embeddings. SIAM Journal on Mathematics of Data Science, 2020. +I. Klebanov, B. Sprungk, and T. Sullivan. The linear conditional expectation in Hilbert space. Bernoulli, 2021. +H. O. Lancaster. The Structure of Bivariate Distributions. The Annals of Mathematical Statistics, 1958. +H. Larochelle, D. Erhan, and Y. Bengio. Zero-data Learning of New Tasks. In AAAI, 2008. +S. L. Lauritzen. Graphical Models. Oxford University Press, 1996. +J. D. Lee, Q. Lei, N. Saunshi, and J. Zhuo. Predicting What You Already Know Helps: Provable Self-Supervised Learning. In NeurIPS, 2021. +A. Li, A. Jabri, A. Joulin, and L. van der Maaten. Learning Visual N-Grams from Web Data. In ICCV, 2017. +Y. Li, R. Pogodin, D. J. Sutherland, and A. Gretton. Self-Supervised Learning with Kernel Dependence Maximization. In NeurIPS, 2021. +Z. Li, D. Meunier, M. Mollenhauer, and A. Gretton. Towards Optimal Sobolev Norm Rates for the Vector-Valued Regularized Least-Squares Algorithm. JMLR, 2024. +Llama Team, Meta AI. The Llama 3 Herd of Models. arXiv Technical Report, 2024. +S. Maji, E. Rahtu, J. Kannala, M. Blaschko, and A. Vedaldi. Fine-Grained Visual Classification of Aircraft. arXiv Technical Report, 2013. +M. Maniparambil, C. Vorster, D. Molloy, N. Murphy, K. McGuinness, and N. E. O'Connor. Enhancing CLIP with GPT-4: Harnessing Visual Descriptions as Prompts. In ICCV, 2023. +S. Menon and C. Vondrick. Visual Classification via Description from Large Language Models. In ICLR, 2023. +D. Meunier, Z. Shen, M. Mollenhauer, A. Gretton, and Z. Li. Optimal Rates for Vector-Valued Spectral Regularization Learning Algorithms. In NeurIPS, 2024. +T. Michaeli, W. Wang, and K. Livescu. Nonparametric Canonical Correlation Analysis. In ICML, 2016. +D. H. Nguyen, W. Zellinger, and S. Pereverzyev. On Regularized Radon-Nikodym Differentiation. JMLR, 2024. + +M.-E. Nilsback and A. Zisserman. Automated Flower Classification over a Large Number of Classes. In Indian Conference on Computer Vision, Graphics and Image Processing, 2008. +K. Oko, L. Lin, Y. Cai, and S. Mei. A Statistical Theory of Contrastive Pre-training and Multimodal Generative AI. arXiv Technical Report, 2025. +R. Parhi and R. D. Nowak. Banach Space Representer Theorems for Neural Networks and Ridge Splines. JMLR, 2021. +I. F. Pinelis and A. I. Sakhanenko. Remarks on Inequalities for Large Deviation Probabilities. Theory of Probability & Its Applications, 1986. +A. Pokle, J. Tian, Y. Li, and A. Risteski. Contrasting the landscape of contrastive and non-contrastive learning. In AISTATS, 2022. +S. Pratt, I. Covert, R. Liu, and A. Farhadi. What does a platypus look like? generating customized prompts for zero-shot image classification. In ICCV, 2023. +R. Pryzant, D. Iter, J. Li, Y. Lee, C. Zhu, and M. Zeng. Automatic Prompt Optimization with "Gradient Descent" and Beam Search. In EMNLP, 2023. +A. Radford, J. W. Kim, C. Hallacy, A. Ramesh, G. Goh, S. Agarwal, G. Sastry, A. Askell, P. Mishkin, J. Clark, et al. Learning transferable visual models from natural language supervision. In ICML, 2021. +B. Recht, R. Roelofs, L. Schmidt, and V. Shankar. Do ImageNet Classifiers Generalize to ImageNet? In ICML, 2019. +A. Rényi. On measures of dependence. Acta Mathematica Academiae Scientiarum Hungarica, 1959. +N. Saunshi, O. Plevrakis, S. Arora, M. Khodak, and H. Khandeparkar. A Theoretical Analysis of Contrastive Unsupervised Representation Learning. In ICML, 2019. +M. Scetbon and Z. Harchaoui. Harmonic Decompositions of Convolutional Networks. In ICML, 2020. +M. Sctbon, J. Jennings, A. Hilmkil, C. Zhang, and C. Ma. A fixed-point approach for causal generative modeling. In ICML, 2024. +R. Schilling. Measures, Integrals, and Martingales. Springer, 2nd edition, 2017. +J. Schmidt-Hieber. Rejoinder: Nonparametric regression using deep neural networks with ReLU activation function. The Annals of Statistics, 2020. + +M. Sclar, Y. Choi, Y. Tsvetkov, and A. Suhr. Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting. In *ICLR*, 2024. +G. R. Shorack. Probability for Statisticians, volume 951. Springer, 2000. +R. Shwartz-Ziv, R. Balestriero, K. Kawaguchi, T. G. J. Rudner, and Y. LeCun. An Information Theory Perspective on Variance-Invariance-Covariance Regularization. In NeurIPS, 2023. +J. W. Siegel and J. Xu. Characterization of the Variation Spaces Corresponding to Shallow Neural Networks. Constructive Approximation, 2023. +S. Smale and D.-X. Zhou. Learning Theory Estimates via Integral Operators and Their Approximations. Constructive Approximation, 2007. +I. Steinwart and C. Scovel. Mercer's Theorem on General Domains: On the Interaction between Measures, Kernels, and RKHSs. Constructive Approximation, 2012. +Z. Tan, Y. Zhang, J. Yang, and Y. Yuan. Contrastive Learning is Spectral Clustering on Similarity Graph. In ICLR, 2024. +B. Thomee, D. A. Shamma, G. Friedland, B. Elizalde, K. Ni, D. Poland, D. Borth, and L.-J. Li. YFCC100M: the New Data in Multimedia Research. Communications of the ACM, 2016. +S. Thrun and L. Pratt. Learning to Learn. Springer, 1998. +C. Tosh, A. Krishnamurthy, and D. Hsu. Contrastive learning, multi-view redundancy, and linear models. In ALT, 2021. +M. Unser. Ridges, Neural Networks, and the Radon Transform. JMLR, 2023. +A. Visheratin. NLLB-CLIP - train performant multilingual image retrieval model on a budget. In NeurIPS Workshop: ENLSP-III, 2023. +G. Wahba. Spline models for observational data. SIAM, 1990. +T. Wang and P. Isola. Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere. In ICML, 2020. +X. Wang, C. Li, Z. Wang, F. Bai, H. Luo, J. Zhang, N. Jojic, E. Xing, and Z. Hu. PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimization. In ICLR, 2024. + +Y. Wang and M. I. Jordan. Desiderata for Representation Learning: A Causal Perspective. JMLR, 2024. +Z. Wen and Y. Li. Toward Understanding the Feature Learning Process of Self-supervised Contrastive Learning. In ICML, 2021. +L. Wu and J. Long. A spectral-based analysis of the separation between two-layer neural networks and linear methods. JMLR, 2022. +J. Xiao, J. Hays, K. A. Ehinger, A. Oliva, and A. Torralba. SUN database: Large-scale scene recognition from abbey to zoo. In CVPR, 2010. +H. Xu, S. Xie, X. Tan, P.-Y. Huang, R. Howes, V. Sharma, S.-W. Li, G. Ghosh, L. Zettlemoyer, and C. Feichtenhofer. Demystifying CLIP data. In ICLR, 2024. +Y. Yang, A. Panagopoulou, S. Zhou, D. Jin, C. Callison-Burch, and M. Yatskar. Language in a bottle: Language model guided concept bottlenecks for interpretable image classification. In CVPR, 2023. +J. Zbontar, L. Jing, I. Misra, Y. LeCun, and S. Deny. Barlow Twins: Self-Supervised Learning via Redundancy Reduction. In ICML, 2021. +J. Zhang, J. Jennings, A. Hilkmil, N. Pawlowski, C. Zhang, and C. Ma. Towards causal foundation model: on duality between optimal balancing and attention. In ICML, 2024. + +# Appendix + +# Table of Contents + +A Notation 15 +B Technical Background 16 + +B.1 Conditional Expectation and the Hilbert Space $\mathbf{L}^2$ 16 +B.2 Compact Operators 18 +B.3 The Conditional Mean Operator 20 +B.4 Reproducing Kernel Hilbert Spaces 25 + +C Prompt Bias and Residual Dependence 31 +D Sample Complexity and Distribution Mismatch 34 + +D.1 Conditional Mean Approach 35 +D.2 Information Density Approach 41 +D.3 Distribution Shift 46 +D.4 From Regression to Classification 47 +D.5 Prompting Strategies 49 + +E Self-Supervised Objectives and Cross Covariance Operators 50 +F Experimental Details 55 + +F.1 Compute Environment 55 +F.2 Evaluation Datasets 55 +F.3 Model Specification and Hyperparameters 56 +F.4 Derivation of Simulation Setting 57 + +# A. Notation + +
SymbolDescription
x ∈ X, y ∈ Y, z ∈ ZInstances and sample spaces for data modalities/view, often images, labels, and captions.
α,β(X,Y,Z)Encoders α : X → Rd and β : Z → Rd.
PX,YRandom variable realized in X × Y × Z.
QX,ZEvaluation distribution over X × Y.
ρY,ZPre-training distribution over X × Z.
rA function r : Y → R.
η*(x)Direct predictor EPx,y [r(Y)|X] (x).
gρ(z)Prediction function EPz,y [★(Y)|Z] (z).
ηρ(x)Indirect predictor EQx,z [gρ(Z)|X] (x).
NSample size of pre-training set (X1, Z1), ..., (XN, ZN) i.i.d ~ QX,Z.
MNumber of prompts (Y1, Z1), ..., (YM, ZM) i.i.d ~ ρY,Z.
L2(PX)Set containing equivalence classes of measurable functions h : X → R satisfying ||h||2(L2(PX)) = ∫ h2(x)dPx(x) < +∞.
MZ|XConditional mean operator [MZ|Xg](z) = EQx,z [g(Z)|X] (x).
RInformation density dQx,z/dQxQz : X × Z → R≥0.
Dχ2(P||Q)χ2-divergence EU~Q[(dP(U)-1)2].
I(X;Z)Mean square contingency Dχ2(QX,Z||QXQZ).
(σi)i=1Singular values of MZ|X.
(αi,βi)i=1Left and right singular functions of MZ|X.
SzConditional information density dPx,Y|z/dPx|zQx|z : X × Y → R≥0.
I(X;Y|z)Conditional mean square contingency Dχ2(PX,Y|z||PXDy|z).
||·||HS(G,H)Hilbert-Schmidt norm of a linear operator from G to H.
+ +Table 1. Notation used throughout the main text. + +In the appendix, we use slightly more explicit notation. For example, the product measure of $Q_{X}$ and $Q_{Z}$ on $\mathcal{X} \times \mathcal{Z}$ is denoted $Q_{X} \otimes Q_{Z}$ . The bracket notation $[\cdot]_{X}$ and $[\cdot]_{Z}$ are used to indicate equivalence classes in $\mathbf{L}^2(Q_X)$ and $\mathbf{L}^2(Q_Z)$ , respectively. Such changes are marked as they are introduced. + +# B. Technical Background + +In this section, we review the necessary background and construct any theoretical tools used in our analyses in a self-contained manner. Appx. B.1 describes the broadest function class we consider and gives a rigorous description of the conditional means that we employ in this work. Appx. B.2 reviews the basic classes of linear operators (trace class, Hilbert-Schmidt, etc.) that we consider. Appx. B.3 contains central tools regarding the structure of bivariate distributions. Finally, Appx. B.4 contains a brief introduction to reproducing kernel Hilbert spaces and some recent statistical results used in the proofs of Thm. 2 and Thm. 3. + +# B.1. Conditional Expectation and the Hilbert Space $\mathbf{L}^2$ + +Consider a common probability space $(\Omega, \mathcal{F}, \mathbb{P})$ and a topological space $\mathcal{X}$ equipped with its Borel $\sigma$ -algebra $\mathcal{B}(\mathcal{X})$ . Given a random variable $X: \Omega \to \mathcal{X}$ representing some observable data, we consider $P_X$ to be the law of $X$ , i.e. $P_X(B) = \mathbb{P}(X^{-1}(B))$ for every Borel set $B \in \mathcal{B}(\mathcal{X})$ . Our goal is to define $\mathbf{L}^2(P_X)$ , a Hilbert space containing equivalence classes of functions that are square integrable under $P_X$ . As an intermediate step, we will also construct a Hilbert space $\mathsf{L}^2(\mathcal{G})$ for the $\sigma$ -algebra $\mathcal{G} \subseteq \mathcal{F}$ , which contains equivalence classes of $\mathcal{G}$ -measurable functions that are square integrable under $\mathbb{P}$ . Having both of these constructions will be helpful in working with conditional mean operators in a rigorous manner. + +Quotient Space. As a starting point, consider the set + +$$ +\mathsf {L} _ {+} ^ {2} (\mathcal {F}) := \left\{\mathcal {F} \text {- m e a s u r a b l e f u n c t i o n s} u: \Omega \to \mathbb {R} \text {s a t i s f y i n g} \| u \| _ {\mathsf {L} _ {+} ^ {2} (\mathcal {F})} ^ {2} := \int_ {\Omega} u ^ {2} (\omega) \mathrm {d} \mathbb {P} (\omega) < \infty \right\}. +$$ + +For any $u,v\in \mathsf{L}_+^2 (\mathcal{F})$ , consider the equivalence relation $\sim$ defined by + +$$ +u \sim v \iff \exists \Omega_ {1} \in \mathcal {F} \text {s u c h} u (\omega) = v (\omega) \forall \omega \in \Omega_ {1} \text {a n d} \mathbb {P} (\Omega_ {1}) = 1. \tag {17} +$$ + +For any $u_{+} \in \mathsf{L}_{+}^{2}(\mathcal{F})$ , we define $[u_{+}]_{\sim} \in \mathsf{L}^{2}(\mathcal{F})$ as indexing the equivalence class containing all functions that differ from $u_{+}$ only on a set of $\mathbb{P}$ -measure zero. The global Hilbert space will be defined using the quotient of $\mathsf{L}_{+}^{2}(\mathcal{F})$ under this equivalence relation. + +Lemma 1. The quotient space $\mathsf{L}^2 (\mathcal{F}) = \mathsf{L}_+^2 (\mathcal{F}) / \sim$ is a Hilbert space with the addition and scalar multiplication rules + +$$ +(u, v) \mapsto a u + b v := \left[ a u _ {+} + b v _ {+} \right] _ {\sim} f o r s o m e u _ {+} \in u a n d v _ {+} \in v, +$$ + +for scalars $a, b \in \mathbb{R}$ and the inner product + +$$ +(u, v) \mapsto \langle u, v \rangle_ {\mathrm {L} ^ {2} (\mathcal {F})} := \int_ {\Omega} u _ {+} (\omega) v _ {+} (\omega) \mathrm {d} \mathbb {P} (\omega) f o r s o m e u _ {+} \in u a n d v _ {+} \in v, +$$ + +where the definitions are independent of the choice of $u_{+}$ and $v_{+}$ . + +Proof. It is easy to verify that the addition, scalar multiplication, and inner product operations are well-defined (i.e. are invariant to the choice of $u_{+}$ and $v_{+}$ ). Define the norm $u \mapsto \| u \|_{\mathsf{L}^2(\mathcal{F})} \coloneqq \sqrt{\langle u, u \rangle_{\mathsf{L}^2(\mathcal{F})}}$ , and consider a Cauchy sequence $(u^{(n)})_{n=1}^{\infty}$ in $\mathsf{L}^2(\mathcal{F})$ . To confirm completeness, we identify a limit of this sequence as an element of $\mathsf{L}^2(\mathcal{F})$ . First, consider an arbitrary sequence $u_{+}^{(1)}, u_{+}^{(2)}, \ldots$ where $u_{+}^{(n)} \in u^{(n)}$ for all $n \geq 1$ . Then, we have by the Riesz-Fischer theorem (Schilling, 2017, Theorem 13.7), there exists a limit $u_{+} \in \mathsf{L}_{+}^{2}(\mathcal{F})$ such that + +$$ +\lim _ {n \rightarrow \infty} \| u _ {+} ^ {(n)} - u _ {+} \| _ {\mathrm {L} _ {+} ^ {2} (\mathcal {F})} \rightarrow 0. \tag {18} +$$ + +We then define $\lim_{n\to \infty}u^{(n)}\coloneqq [u_+]_{\sim}$ , and see that + +$$ +\left\| u ^ {(n)} - \left[ u _ {+} \right] _ {\sim} \right\| _ {\mathrm {L} ^ {2} (\mathcal {F})} = \left\| u _ {+} ^ {(n)} - u _ {+} \right\| _ {\mathrm {L} _ {+} ^ {2} (\mathcal {F})} \rightarrow 0 \text {a s} n \rightarrow \infty , +$$ + +where the last step follows by (18) and completes the proof. + +Next, we construct closed subspaces of $\mathsf{L}^2(\mathcal{F})$ which contain random variables that are measurable functions of another + +random variable. Notice that for $u, v \in \mathsf{L}^2(\mathcal{F})$ , the statement $u = v$ indicates equality of two partitions, namely collections of random variables that differ pairwise on sets of measure zero. Letting $\sigma(X)$ denote the $\sigma$ -algebra generated by $X$ , define the set + +$$ +\mathsf {L} _ {+} ^ {2} (\sigma (X)) := \left\{u \in \mathsf {L} _ {+} ^ {2} (\mathcal {F}) \text {s . t .} u \text {i s} \sigma (X) \text {- m e a s u r a b l e} \right\}. \tag {19} +$$ + +Then, using the equivalence relation (17), we define the space + +$$ +\mathsf {L} ^ {2} (\sigma (X)) := \mathsf {L} _ {+} ^ {2} (\sigma (X)) / \sim . +$$ + +In the upcoming Cor. 1, we will confirm that $\mathsf{L}^2 (\sigma (X))$ is indeed a closed subspace of $\mathsf{L}^2 (\mathcal{F})$ for any random variable $X$ . Before doing so, we consider the induced probability space $(\mathcal{X},\mathcal{B}(\mathcal{X}),P_X)$ . Then, we define the related linear space + +$$ +\mathbf {L} _ {+} ^ {2} \left(P _ {X}\right) := \left\{\text {m e a s u r a b l e f u n c t i o n s} f: \mathcal {X} \rightarrow \mathbb {R} \text {s a t i s f y i n g} \| f \| _ {\mathbf {L} _ {+} ^ {2} \left(P _ {X}\right)} ^ {2} := \int_ {\mathcal {X}} f ^ {2} (\boldsymbol {x}) \mathrm {d} P _ {X} (\boldsymbol {x}) < \infty \right\}. +$$ + +We define an analogous equivalence relation $\sim_{X}$ defined as + +$$ +f \sim_ {X} g \Longleftrightarrow \exists \mathcal {X} _ {1} \in \mathcal {B} (\mathcal {X}) \text {s u c h t h a t} f (\boldsymbol {x}) = g (\boldsymbol {x}) \forall \boldsymbol {x} \in \mathcal {X} _ {1} \text {a n d} P _ {X} \left(\mathcal {X} _ {1}\right) = 1, \tag {20} +$$ + +and the quotient $\mathbf{L}^2 (P_X)\coloneqq \mathbf{L}_+^2 (P_X) / \sim_X$ . These sets are related to one another in the following lemma. + +Corollary 1. The set $\mathsf{L}^2 (\sigma (X))$ is a Hilbert space with respect to the inner product used in Lem. 1, whereas $\mathbf{L}^2 (P_X)$ is a Hilbert space with respect to the analogous inner product for $(\mathcal{X},\mathcal{B}(\mathcal{X}),P_X)$ . Furthermore, $\mathsf{L}^2 (\sigma (X))$ is a closed subspace of $\mathsf{L}^2 (\mathcal{F})$ , and it holds that + +$$ +\mathsf {L} ^ {2} (\sigma (X)) = \mathbf {L} ^ {2} (P _ {X}) \circ X := \left\{\left[ f _ {+} (X (\cdot)) \right] _ {\sim}: f _ {+} \in \mathbf {L} _ {+} ^ {2} (P _ {X}) \right\}. \tag {21} +$$ + +Proof. That $\mathsf{L}^2 (\sigma (X))$ and $\mathbf{L}^2 (P_X)$ are Hilbert spaces follows by identical arguments to Lem. 1. Additionally, we may invoke Schilling (2017, Lemma 27.1) to assert that $\mathsf{L}^2 (\sigma (X))$ is a closed subspace of $\mathsf{L}^2 (\mathcal{F})$ . Finally, to show (21), we will show that + +$$ +\mathsf {L} _ {+} ^ {2} (\sigma (X)) = \mathbf {L} _ {+} ^ {2} (P _ {X}) \circ X := \left\{f _ {+} (X (\cdot)): f _ {+} \in \mathbf {L} _ {+} ^ {2} (P _ {X}) \right\} +$$ + +and take the quotient with respect to “ $\sim$ ” on either side to complete the proof. First, $\mathbf{L}_{+}^{2}(P_{X}) \circ X \subseteq \mathsf{L}_{+}^{2}(\sigma(X))$ holds because $f_{+}(X)$ is clearly $\sigma(X)$ -measurable and + +$$ +\left\| f _ {+} (X) \right\| _ {\mathbf {L} _ {+} ^ {2} (\mathcal {F})} ^ {2} = \int_ {\Omega} \left(f _ {+} \left(X (\omega)\right)\right) ^ {2} \mathrm {d} \mathbb {P} (\omega) \overset {P _ {X} = X _ {\#} \mathbb {P}} {=} \int_ {\mathcal {X}} f _ {+} ^ {2} (\boldsymbol {x}) \mathrm {d} P _ {X} (\boldsymbol {x}) = \left\| f _ {+} \right\| _ {\mathbf {L} _ {+} ^ {2} \left(P _ {X}\right)} ^ {2} < \infty . \tag {22} +$$ + +To show that $\mathsf{L}_+^2 (\sigma (X))\subseteq \mathbf{L}_+^2 (P_X)\circ A$ , first note that for any $\sigma (X)$ -measurable random variable $U$ , there exists a measurable function $g_{+}:\mathcal{X}\to \mathbb{R}$ such that $U = g_{+}(X)$ (Durrett, 2019, Exercise 1.3.8). Applying (22) gives $\| g_{+}\|_{\mathbf{L}_{+}^{2}(P_{X})}^{2} = +\infty \Rightarrow \| g_{+}(X)\|_{\mathsf{L}_{+}^{2}(\mathcal{F})}^{2} = +\infty$ , which yields a contradiction as $\| g_{+}(X)\|_{\mathsf{L}_{+}^{2}(\mathcal{F})}^{2} = \| U\|_{\mathsf{L}_{+}^{2}(\mathcal{F})}^{2} < + \infty .$ Thus, $\| g_{+}\|_{\mathbf{L}_{+}^{2}(P_{X})}^{2} < + \infty$ , completing the proof. + +Conditional Expectation. Using Cor. 1, for any collection of random variables $(X,Z,Y)$ , we can now construct the Hilbert subspaces $\mathbf{L}^2 (P_{X,Y})$ , $\mathbf{L}^2 (P_X)$ , $\mathbf{L}^2 (P_Z)$ . We can then identify them with conditional expectations, i.e. projections onto $\mathsf{L}^2 (\sigma (X,Y))$ , $\mathsf{L}^2 (\sigma (X))$ , $\mathsf{L}^2 (\sigma (Z))$ , respectively. This is done in the definition below. + +Definition 3 (Conditional Expectation). For any random variable $U \in \mathsf{L}^2(\mathcal{F})$ , we define the conditional expectation $\mathbb{E}[U|\sigma(X)]$ as the orthogonal projection of $U$ onto $\mathsf{L}^2(\sigma(X))$ , or + +$$ +\mathbb{E}\left[U|\sigma (X)\right]:= \operatorname *{arg min}_{u\in \mathsf{L}^{2}(\sigma (X))}\| u - U\|_{\mathsf{L}^{2}(\mathcal{F})}^{2}, +$$ + +which uniquely exists due to the closedness of $\mathsf{L}^2 (\sigma (X))$ and the projection theorem (Schilling, 2017, Theorem 26.13). + +Owing to Cor. 1, we will also define the conditional expectation function + +$$ +\mathbb {E} \left[ U | X \right]: \mathcal {X} \rightarrow \mathbb {R} +$$ + +as any measurable function satisfying the conditions $[\mathbb{E}[U|X]]_{\sim} \in \mathbf{L}^2(P_X)$ and $\mathbb{E}[U|\sigma(X)](\omega) = \mathbb{E}[U|X](X(\omega))$ for $\mathbb{P}$ -almost every $\omega \in \Omega$ . The specific function choice will not affect any of the forthcoming arguments. + +Here, we defined the conditional expectation as an element of $\mathsf{L}^2 (\sigma (X))$ and associated it with a function in $\mathbf{L}^2 (P_X)$ . Without the squared-integrability requirement, the conditional expectation may also be defined using the familiar tower property. We include the tower property below for completeness. + +Lemma 2. (Schilling, 2017, Theorem 27.12) Consider $U \in \mathsf{L}^2(\mathcal{F})$ and $X: \Omega \to \mathbb{X}$ . Then, for every measurable set $A \in \sigma(X)$ , it holds that + +$$ +\int_ {A} U (\omega) \mathrm {d} \mathbb {P} (\omega) = \int_ {A} \mathbb {E} [ U | \sigma (X) ] (\omega) \mathrm {d} \mathbb {P} (\omega) = \int_ {X (A)} \mathbb {E} [ U | X ] (\boldsymbol {x}) \mathrm {d} P _ {X} (\boldsymbol {x}). +$$ + +We will make use of both the projection property and tower property throughout this manuscript. While conditional expectation may be defined for specific integrable functions, we may wish to define probability measures whose integrals can produce all conditional expectations simultaneously—this ideal is captured by regular conditional distributions (r.c.d.'s) (Shorack, 2000), which we recall below. + +Definition 4. Consider random variables $(U,V):\Omega \to \mathcal{U}\times \mathcal{V}$ . Let $\mathcal{B}(\mathcal{U})$ denote the Borel $\sigma$ -algebra on $\mathcal{U}$ . A map: $\mu :\mathcal{V}\times \mathcal{B}(\mathcal{U}):= [0,1]$ is called a regular conditional distribution (r.c.d.) if the following two properties hold: + +1. For each $A \in \mathcal{B}(\mathcal{U})$ and $\pmb{v} \in \mathcal{V}$ , it holds that + +$$ +\mu (\boldsymbol {v}, A) = \mathbb {E} _ {P _ {U, V}} \left[ \mathbb {1} _ {A} (U) | V \right] (\boldsymbol {v}), +$$ + +for the conditional expectation defined in Definition 3. + +2. For $P_V$ -almost every $\pmb{v} \in \mathcal{V}$ , $\mu(\pmb{v}, \cdot)$ is a probability measure on $\mathcal{B}(\mathcal{U})$ . + +This will primarily be used for the conditional dependence arguments in Appx. C. + +# B.2. Compact Operators + +We collect several generalities about Hilbert spaces and linear operators (hereafter, simply "operators") between them. Many computations will require expanding an element of a separable Hilbert space onto an orthonormal basis. + +Definition 5 (Separability, Orthonormal Basis, Complete Orthonormal System). For a Hilbert space $(\mathcal{H},\langle \cdot ,\cdot \rangle_{\mathcal{H}})$ over $\mathbb{R}$ , the orthonormal system $e_1,e_2,\ldots \in \mathcal{H}$ of vectors is called an orthonormal basis (ONB) or complete orthonormal system (CONS) of $\mathcal{H}$ if any of the following properties hold, which are equivalent by Schilling (2017, Theorem 26.21). + +1. For every $h \in \mathcal{H}$ , $\langle h, e_i \rangle_{\mathcal{H}} = 0$ for all $i \geq 1$ implies that $h \equiv 0$ . +2. $\bigcup_{n = 1}^{\infty}$ span $\{e_1,\ldots ,e_n\}$ is dense in $\mathcal{H}$ +3. For every $h \in \mathcal{H}$ , it holds that $h = \sum_{i=1}^{\infty} \langle h, e_i \rangle_{\mathcal{H}} e_i$ . +4. For every $h \in \mathcal{H}$ , it holds that $\sum_{i=1}^{\infty} |\langle h, e_i \rangle_{\mathcal{H}}|^2 = \|h\|_{\mathcal{H}}^2$ . +5. For every $h, h' \in \mathcal{H}$ , it holds that $\sum_{i=1}^{\infty} \langle h, e_i \rangle_{\mathcal{H}} \langle h', e_i \rangle_{\mathcal{H}} = \langle h, h' \rangle_{\mathcal{H}}$ . + +If there exists a countable orthonormal basis, then $\mathcal{H}$ is called separable (Schilling, 2017, Definition 26.23 & Theorem 26.24). + +When linear operators are compact, then we may decompose them in a way that generalizes the eigendecomposition and singular value decomposition for matrices. + +Definition 6 (Compact Operator). A linear operator $\mathbf{M}:\mathcal{G}\to \mathcal{H}$ between Hilbert spaces $\mathcal{G}$ and $\mathcal{H}$ is called compact if for every totally bounded subset $B\subseteq \mathcal{G}$ , the image $\mathbf{M}(B)$ is relatively compact (i.e. the closure of $\mathbf{M}(B)$ is compact) in $\mathcal{H}$ . + +Compact operators are bounded, and every bounded linear operator $\mathbf{M}$ admits a unique adjoint operator $\mathbf{M}^*$ satisfying $\langle h,\mathbf{M}g\rangle_{\mathcal{H}} = \langle \mathbf{M}^{*}h,g\rangle_{\mathcal{G}}$ for all $g\in \mathcal{G}$ and $h\in \mathcal{H}$ . An operator $\mathbf{T}:\mathcal{H}\to \mathcal{H}$ is called self-adjoint if $\mathbf{T} = \mathbf{T}^*$ . Next, we collect two operator decompositions that will be used repeatedly. We refer the reader to Gohberg et al. (2003, Chapter IV) and Gohberg et al. (2003, Chapter X) for further discussion on these topics. Just as their analogs for matrices, we refer to them as the eigendecomposition and singular value decomposition, respectively. + +Theorem 4. (Gohberg et al., 2003, Chapter IV, Theorem 5.1) Let $\mathbf{T}:\mathcal{H}\to \mathcal{H}$ be a compact, self-adjoint operator on a separable Hilbert space $\mathcal{H}$ on $\mathbb{R}$ . Then, there exists a countable orthonormal basis $\{e_j\}_{j\in J}$ of $\mathcal{H}$ and a sequence of non-zero real numbers $\{\lambda_i\}_{i\in I}$ with $\lambda_{i}\rightarrow 0$ , $I\subseteq J$ , and for all $h\in \mathcal{H}$ , we have that + +$$ +\mathrm {T h} = \sum_ {i \in I} \lambda_ {i} \left\langle h, e _ {i} \right\rangle_ {\mathcal {H}} e _ {i}. \tag {23} +$$ + +Furthermore, if $\langle h,\mathbf{T}h\rangle_{\mathcal{H}}\geq 0$ for all $h\in \mathcal{H}$ (i.e. $\mathbf{T}$ is positive semidefinite), then we may take $\lambda_{i} > 0$ for all $i\in I$ , and order them in a non-increasing sequence.. We call $\{\lambda_i\}_{i\in I}$ the non-zero eigenvalues of $\mathbf{T}$ . + +Theorem 5. (Gohberg et al., 2003, Chapter X, Theorem 4.2) Let $\mathbf{M}:\mathcal{G}\to \mathcal{H}$ be a compact operator between separable Hilbert spaces $\mathcal{G}$ and $\mathcal{H}$ on $\mathbb{R}$ . Then, there exists an orthonormal basis $\{u_j\}_{j\in J}$ of $\mathcal{H}$ , an orthonormal basis $\{v_{k}\}_{k\in K}$ of $\mathcal{G}$ , and a sequence of positive real numbers $\{s_i\}_{i\in I}$ with $s_i\rightarrow 0$ such that the following statements hold. + +- All collections are at most countable, i.e. $I, J, K \subseteq \mathbb{N}$ , and $I \subseteq J \cap K$ . +- For all $g \in \mathcal{G}$ and $h \in \mathcal{H}$ , we have that + +$$ +\mathbf {M} g = \sum_ {i \in I} s _ {i} \langle g, v _ {i} \rangle_ {\mathcal {G}} u _ {i} a n d \mathbf {M} ^ {*} h = \sum_ {i \in I} s _ {i} \langle h, u _ {i} \rangle_ {\mathcal {H}} v _ {i}. \tag {24} +$$ + +We call $\{s_i\}_{i\in I}$ the non-zero singular values of $\mathbf{M}$ , which can be ordered in a non-increasing sequence. + +The sets $J$ and $K$ are used to index the bases of $\mathcal{H}$ and $\mathcal{G}$ , so they may be larger in cardinality than $I$ , which only indexes the non-zero eigenvalue and singular values, respectively. We will also consider more specific classes of compact operators. + +Definition 7. A compact operator $\mathbf{M}$ with singular values $\{s_i\}_{i\in I}$ (Thm. 5) is called trace class if $\sum_{i\in I}s_i < +\infty$ (the singular values are summable) and Hilbert-Schmidt if $\sum_{i\in I}s_i^2 < +\infty$ (the singular values are square summable). + +Using the singular value decomposition, we see that if $\mathbf{M}$ is Hilbert-Schmidt, then $\mathbf{MM}^*$ and $\mathbf{M}^*\mathbf{M}$ are self-adjoint trace class operators. The set of all Hilbert-Schmidt operators $\mathbf{M}:\mathcal{G}\to \mathcal{H}$ between Hilbert spaces $(\mathcal{G},\langle \cdot ,\cdot \rangle_{\mathcal{G}})$ and $(\mathcal{H},\langle \cdot ,\cdot \rangle_{\mathcal{H}})$ will be denoted by $\mathrm{HS}(\mathcal{G},\mathcal{H})$ . This is itself a Hilbert space with the inner product + +$$ +\langle \mathbf {A}, \mathbf {B} \rangle_ {\mathrm {H S} (\mathcal {G}, \mathcal {H})} = \sum_ {j \in J} \langle \mathbf {A} g _ {j}, \mathbf {B} g _ {j} \rangle_ {\mathcal {H}} +$$ + +where $\{g_j\}_{j\in J}$ can be taken to be any orthonormal basis of $\mathcal{G}$ . Similarly, let $\{h_k\}_{k\in K}$ be an arbitrary orthonormal basis of $\mathcal{H}$ . Then, the Hilbert-Schmidt norm $\| \mathbf{A}\|_{\mathrm{HS}(\mathcal{G},\mathcal{H})}$ will be defined as + +$$ +\begin{array}{l} \| \mathbf {A} \| _ {\mathrm {H S} (\mathcal {G}, \mathcal {H})} ^ {2} = \langle \mathbf {A}, \mathbf {A} \rangle_ {\mathrm {H S} (\mathcal {G}, \mathcal {H})} \\ = \sum_ {j \in J} \left\langle \mathbf {A} g _ {j}, \mathbf {A} g _ {j} \right\rangle_ {\mathcal {H}} \\ = \sum_ {j \in J} \sum_ {k \in K} \sum_ {l \in K} \langle \mathbf {A} g _ {j}, h _ {k} \rangle_ {\mathcal {H}} \langle \mathbf {A} g _ {j}, h _ {l} \rangle_ {\mathcal {H}} \langle h _ {k}, h _ {l} \rangle_ {\mathcal {H}} \\ = \sum_ {j \in J} \sum_ {k \in K} \left\langle h _ {k}, \mathbf {A} g _ {j} \right\rangle_ {\mathcal {H}} ^ {2} = \sum_ {j \in J} \sum_ {k \in K} \left\langle \mathbf {A} ^ {*} h _ {k}, g _ {j} \right\rangle_ {\mathcal {G}} ^ {2}. \tag {25} \\ \end{array} +$$ + +Using the singular value decomposition, we see that (25) is equal to the sum of the squared singular values referenced in Definition 7. For $h \in \mathcal{H}$ and $g \in \mathcal{G}$ , we define the rank-one operator $h \otimes g : \mathcal{G} \to \mathcal{H}$ via $(h \otimes g)g' = \langle g, g' \rangle_{\mathcal{G}}h$ for all $g' \in \mathcal{G}$ . For an operator $\mathbf{A} \in \mathrm{HS}(\mathcal{G}, \mathcal{H})$ , the following identity regarding rank-one operators will be useful for norm computations: + +$$ +\langle h, \mathbf {A} g \rangle_ {\mathcal {H}} = \langle \mathbf {A} ^ {*} h, g \rangle_ {\mathcal {G}} = \langle \mathbf {A}, h \otimes g \rangle_ {\mathrm {H S} (\mathcal {G}, \mathcal {H})} = \langle \mathbf {A} ^ {*}, g \otimes h \rangle_ {\mathrm {H S} (\mathcal {H}, \mathcal {G})}. +$$ + +Finally, we will often compute Hilbert-Schmidt norms using assumptions on the singular decays of the operator in question. + +Lemma 3. Let $\mathbf{M}:\mathcal{G}\to \mathcal{H}$ be a Hilbert-Schmidt operator with singular values $\{s_i\}_{i\in I}$ (Thm. 5). Assume that $I = \mathbb{N}$ and that there exist constants $c,C,\gamma >0$ such that $ci^{-\gamma}\leq s_i\leq Ci^{-\gamma}$ for all $i\in \mathbb{N}$ . Then, $\gamma >1 / 2$ , and it holds that + +$$ +\frac {c ^ {2}}{2 \gamma - 1} \leq \| \mathbf {M} \| _ {\mathrm {H S} (\mathcal {G}, \mathcal {H})} ^ {2} \leq \frac {2 \gamma C ^ {2}}{2 \gamma - 1}. +$$ + +Proof. The requirement that $\gamma > 1/2$ follows from the square summability of $\{s_i\}_{i=1}^{\infty}$ and the bound $s_i \geq c i^{-\gamma}$ . For the upper bound, write + +$$ +\sum_ {i = 1} ^ {\infty} s _ {i} ^ {2} \leq C ^ {2} \sum_ {i = 1} ^ {\infty} i ^ {- 2 \gamma} = C ^ {2} \sum_ {i = 1} ^ {\infty} \int_ {i - 1} ^ {i} \lceil x \rceil^ {- 2 \gamma} \mathrm {d} x \leq C ^ {2} \left(1 + \int_ {1} ^ {\infty} x ^ {- 2 \gamma} \mathrm {d} x\right) = \frac {2 \gamma C ^ {2}}{2 \gamma - 1}. +$$ + +For the lower bound, write + +$$ +\sum_ {i = 1} ^ {\infty} s _ {i} ^ {2} \geq c ^ {2} \sum_ {i = 1} ^ {\infty} i ^ {- 2 \gamma} = c ^ {2} \sum_ {i = 1} ^ {\infty} \int_ {i} ^ {i + 1} \lfloor x \rfloor^ {- 2 \gamma} \mathrm {d} x \geq c ^ {2} \int_ {1} ^ {\infty} x ^ {- 2 \gamma} \mathrm {d} x = \frac {c ^ {2}}{2 \gamma - 1}, +$$ + +the result as desired. + +# B.3. The Conditional Mean Operator + +This section contains key properties of the conditional mean operator $\mathbf{M}_{Z|X}$ and the information density $\mathsf{R}$ from Sec. 2, based on the foundations of Appx. B.1 and Appx. B.2. As we shall show, owing to a particular Lancaster decomposition (Prop. 2), both operators enjoy convenient spectral representations and relate to a measure of dependence—the mean-squared contingency. + +Recall the probability space $(\Omega, \mathcal{F}, \mathbb{P})$ . Consider Borel measurable spaces $(\mathcal{X}, \mathcal{B}(\mathcal{X}))$ and $(\mathcal{Z}, \mathcal{B}(\mathcal{Z}))$ , and a random variable $(X,Z): \Omega \to \mathcal{X} \times \mathcal{Z}$ . We denote by $Q_{X,Z}$ the law of $(X,Z)$ , i.e. $Q_{X,Z}(B) = \mathbb{P}\left((X,Z)^{-1}(B)\right)$ for every $B \in \mathcal{B}(\mathcal{X} \times \mathcal{Z})$ . Note that by Schilling (2017, Corollary 27.24), the Hilbert spaces $\mathbf{L}^2(Q_X)$ , $\mathbf{L}^2(Q_Z)$ , $\mathbf{L}^2(Q_{X,Z})$ , and $\mathbf{L}^2(Q_X \otimes Q_Z)$ are separable, a fact we will maintain in this section. We use the notation $[\cdot]_X$ and $[\cdot]_Z$ to index equivalence classes in $\mathbf{L}^2(Q_X)$ and $\mathbf{L}^2(Q_Z)$ , respectively. In other words, for a measurable function $h: \mathcal{X} \to \mathbb{R}$ , we will write $[h]_X \in \mathbf{L}^2(Q_X)$ to indicate that $\int_{\mathcal{X}} h^2(\boldsymbol{x}) \mathrm{d}Q_X(\boldsymbol{x}) < +\infty$ . Recall the conditional mean function introduced in Definition 3. We define the conditional mean operator + +$$ +\mathbf {M} _ {Z | X}: \mathbf {L} ^ {2} (Q _ {Z}) \rightarrow \mathbf {L} ^ {2} (Q _ {X}) +$$ + +$$ +\mathbf {M} _ {Z \mid X} [ g ] _ {Z} = \left[ \mathbb {E} _ {Q _ {X, Z}} [ g (Z) | X ] (\cdot) \right] _ {X}. \tag {26} +$$ + +The specific function $g \in [g]_Z$ chosen for the output conditional expectation is not relevant, as all choices will result in the same equivalence class. We define $\mathbf{M}_{X|Z}$ as the analogous operator for the conditional mean of $h(X)$ given $Z$ for $[h]_X \in \mathbf{L}^2(Q_X)$ . + +Spectral Representation. In the case that $\mathbf{M}_{Z|X}$ is compact, the conditional mean operator admits a singular value decomposition, which will be instrumental in obtaining several important properties. + +Proposition 1 (Singular Value Decomposition of the Conditional Mean Operator). Let $\mathbf{M}_{Z|X}:\mathbf{L}^2(Q_Z)\to \mathbf{L}^2(Q_X)$ be compact. There exists a countable orthonormal basis $\{\alpha_j\}_{j\in J}$ of $\mathbf{L}^2(Q_X)$ , a countable orthonormal basis $\{\beta_k\}_{k\in K}$ of $\mathbf{L}^2(Q_Z)$ , and a countable sequence of positive real numbers $\{\sigma_i\}_{i\in I}$ satisfying $\sigma_i\searrow 0$ , $I\subseteq J\cap K$ , and the following statements in addition: + +- We may take $\sigma_{1} = 1$ , $\mathbf{1}_{\mathcal{X}} \in \alpha_{1}$ , and $\mathbf{1}_{\mathcal{Z}} \in \beta_{1}$ , where $\mathbf{1}_{\mathcal{X}}$ is identically 1 on $\mathcal{X}$ and $\mathbf{1}_{\mathcal{Z}}$ is identically 1 on $\mathcal{Z}$ . +- For all $[g]_Z \in \mathbf{L}^2(Q_Z)$ and $[h]_X \in \mathbf{L}^2(Q_X)$ , we have that + +$$ +\mathbf {M} _ {Z \mid X} [ g ] _ {Z} = \sum_ {i \in I} \sigma_ {i} \langle [ g ] _ {Z}, \beta_ {i} \rangle_ {\mathbf {L} ^ {2} (Q _ {Z})} \alpha_ {i} a n d \mathbf {M} _ {X \mid Z} [ h ] _ {X} = \sum_ {i \in I} \sigma_ {i} \langle [ h ] _ {X}, \alpha_ {i} \rangle_ {\mathbf {L} ^ {2} (Q _ {X})} \beta_ {i}. \tag {27} +$$ + +Proof. Beyond the direct application of Thm. 5, we must prove the statement regarding $(\sigma_{1},\alpha_{1},\beta_{1})$ and that $\mathbf{M}_{Z|X}^{*} = \mathbf{M}_{X|Z}$ (which relates (24) to (27)) to achieve the desired result. For the first, we appeal to the variational representation of the first singular value $\sigma_{1}$ (Gohberg et al., 1990, Section IV.1, Eq. (2)), which states that + +$$ +\sigma_ {1} = \sup \left\{\| \mathbf {M} _ {Z | X} g \| _ {\mathbf {L} ^ {2} \left(Q _ {X}\right)}: g \in \mathbf {L} ^ {2} \left(Q _ {Z}\right), \| g \| _ {\mathbf {L} ^ {2} \left(Q _ {Z}\right)} = 1 \right\}. \tag {28} +$$ + +We will show that $\beta_{1} = [\mathbf{1}_{\mathbb{Z}}]_{Z}$ achieves the supremum. Then, it will hold that $\sigma_{1} = 1$ and $\alpha_{1} = \mathbf{M}_{Z|X}\beta_{1} = [\mathbf{1}_{\mathbb{X}}]_{X}$ , because any version of the conditional expectation $\mathbb{E}_{Q_{X,Z}}[1|X]$ is $Q_{X}$ -almost surely equal to 1. Consider any $[g]_{Z} \in \mathbf{L}^{2}(Q_{Z})$ satisfying $\| g\|_{\mathbf{L}^2 (Q_Z)} = 1$ . Then, we apply Jensen's inequality and the tower property (Lem. 2) to achieve + +$$ +\begin{array}{l} \left\| \mathbf {M} _ {Z | X} [ g ] _ {Z} \right\| _ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} ^ {2} = \int_ {\mathcal {X}} \left(\mathbb {E} _ {Q _ {X, Z}} [ g (Z) | X ] (\boldsymbol {x})\right) ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x}) \\ \leq \int_ {\mathcal {X}} \mathbb {E} _ {Q _ {X, Z}} \left[ g ^ {2} (Z) | X \right] (\boldsymbol {x}) \mathrm {d} Q _ {X} (\boldsymbol {x}) \\ = \mathbb {E} _ {Q _ {Z}} \left[ g ^ {2} (Z) \right] = \| g \| _ {\mathbf {L} ^ {2} (Q _ {Z})} ^ {2} = 1. \\ \end{array} +$$ + +Setting $g(z) = \mathbf{1}_{\mathcal{Z}}(z) \equiv 1$ achieves the upper bound, hence also achieving the supremum in (28). Next, to prove that $\mathbf{M}_{Z|X}^{*} = \mathbf{M}_{X|Z}$ , we similarly consider $[h]_X \in \mathbf{L}^2(Q_X)$ and write + +$$ +\begin{array}{l} \left\langle [ h ] _ {X}, \mathbf {M} _ {Z | X} [ g ] _ {Z} \right\rangle_ {\mathbf {L} ^ {2} (Q _ {X})} = \mathbb {E} _ {Q _ {X}} \left[ h (X) \mathbb {E} _ {Q _ {X, Z}} [ g (Z) | X ] \right] \\ = \mathbb {E} _ {Q _ {X, Z}} [ h (X) g (Z) ] \\ = \mathbb {E} _ {Q _ {Z}} \left[ \mathbb {E} _ {Q _ {X, Z}} [ h (X) | Z ] g (Z) \right] \\ = \left\langle \mathbf {M} _ {X | Z} [ h ] _ {X}, [ g ] _ {Z} \right\rangle_ {\mathbf {L} ^ {2} (Q _ {Z})}, \\ \end{array} +$$ + +which satisfies the adjoint relationship and completes the proof. + +Lancaster Decomposition. In the remaining proofs of this section, we do not differentiate an equivalence class in an $\mathbf{L}^2$ -space with its component functions, as the distinction will be clear from context. First, using the orthonormal bases defined in Prop. 1, we may form a convenient orthonormal basis of $\mathbf{L}^2(Q_X \otimes Q_Z)$ . + +Lemma 4. The collection $\{\alpha_j\beta_k\}_{j\in J,k\in K}$ from Prop. 1, where $\{\alpha_{j}\}_{j\in J}$ is a countable orthonormal basis of $\mathbf{L}^2 (Q_X)$ and $\{\beta_k\}_{k\in K}$ is a countable orthonormal basis of $\mathbf{L}^2 (Q_Z)$ , forms an orthonormal basis of $\mathbf{L}^2 (Q_X\otimes Q_Z)$ . + +Proof. We first show that $\{\alpha_j\beta_k\}_{j\in J,k\in K}$ is an orthonormal system. For any indices $i,i^{\prime}\in I$ and $j,j^{\prime}\in J$ , it holds via independence that + +$$ +\begin{array}{l} \langle \alpha_ {j} \beta_ {j}, \alpha_ {j ^ {\prime}} \beta_ {k ^ {\prime}} \rangle_ {\mathbf {L} ^ {2} (Q _ {X} \otimes Q _ {Z})} = \langle \alpha_ {j}, \alpha_ {j ^ {\prime}} \rangle_ {\mathbf {L} ^ {2} (Q _ {X})} \langle \beta_ {k}, \beta_ {k ^ {\prime}} \rangle_ {\mathbf {L} ^ {2} (Q _ {Z})} \\ = \left\{ \begin{array}{l l} 1 & \text {i f} j = j ^ {\prime} \text {a n d} k = k ^ {\prime} \\ 0 & \text {o t h e r w i s e} \end{array} \right.. \\ \end{array} +$$ + +To establish that this orthonormal system is now complete, we use the first equivalent condition in Definition 5. Consider $s \in \mathbf{L}^2(Q_X \otimes Q_Z)$ such that $\langle s, \alpha_j \beta_k \rangle_{\mathbf{L}^2(Q_X \otimes Q_Z)} = 0$ for all $j \in J$ and $k \in K$ . Then, via Fubini's theorem (Schilling, + +2017, Corollary 14.9), it holds that + +$$ +0 = \int_ {\mathbb {Z}} \underbrace {\left(\int_ {\mathbb {X}} s (\boldsymbol {x} , \boldsymbol {z}) \alpha_ {j} (\boldsymbol {x}) \mathrm {d} Q _ {X} (\boldsymbol {x})\right)} _ {g _ {j} (\boldsymbol {z})} \beta_ {k} (\boldsymbol {z}) \mathrm {d} Q _ {Z} (\boldsymbol {z}) = \langle g _ {j}, \beta_ {k} \rangle_ {\mathbf {L} ^ {2} (Q _ {Z})}. +$$ + +Because $\{\beta_k\}_{k\in K}$ forms an ONB, it holds that the equivalence class of $g_{j}$ is the zero element in $\mathbf{L}^2 (Q_Z)$ , or in other words, $g_{j}(z) = 0$ for $Q_{Z}$ -almost all $z\in \mathbb{Z}$ . Due to the fact that $J$ is countable, we have that + +$$ +\mathcal {Z} _ {1} := \bigcap_ {j \in J} \left\{\boldsymbol {z} \in \mathcal {Z}: g _ {j} (\boldsymbol {z}) = 0 \right\} = \left\{\boldsymbol {z} \in \mathcal {Z}: g _ {j} (\boldsymbol {z}) = 0 \forall j \in J \right\} +$$ + +is a probability one set under $Q_{Z}$ . Because $\{\alpha_{j}\}_{j\in J}$ is an ONB of $\mathbf{L}^2 (Q_X)$ , it also holds that + +$$ +\left\{\boldsymbol {z} \in \mathcal {Z}: g _ {j} (\boldsymbol {z}) = 0 \forall j \in J \right\} \subseteq \mathcal {Z} _ {1} ^ {\prime} = \left\{\boldsymbol {z} \in \mathcal {Z}: s (\boldsymbol {x}, \boldsymbol {z}) = 0 \text {f o r} Q _ {X} \text {- a l m o s t a l l} \boldsymbol {x} \in \mathcal {X} \right\}, +$$ + +indicating that the right-hand side is also a probability one set under $Q_{Z}$ . Then, applying again the iterated integral, + +$$ +\begin{array}{l} \int_ {\mathcal {X} \times \mathcal {Z}} s ^ {2} (\boldsymbol {x}, \boldsymbol {z}) \mathrm {d} \left(Q _ {X} \otimes Q _ {Z}\right) (\boldsymbol {x}, \boldsymbol {z}) = \int_ {\mathcal {Z}} \left(\int_ {\mathcal {X}} s ^ {2} (\boldsymbol {x}, \boldsymbol {z}) \mathrm {d} Q _ {X} (\boldsymbol {x})\right) \mathrm {d} Q _ {Z} (\boldsymbol {z}) \\ = \int_ {\mathcal {Z} _ {1} ^ {\prime}} \left(\int_ {\mathcal {X}} s ^ {2} (\boldsymbol {x}, \boldsymbol {z}) \mathrm {d} Q _ {X} (\boldsymbol {x})\right) \mathrm {d} Q _ {Z} (\boldsymbol {z}) \\ = 0, \\ \end{array} +$$ + +indicating the $s(\pmb{x},\pmb{z}) = 0$ for $(Q_X \otimes Q_Z)$ -almost all $(\pmb{x},\pmb{z}) \in \mathcal{X} \times \mathcal{Z}$ . This completes the proof. + +This basis allows us to relate the conditional mean operator to a particular Radon-Nikodym derivative. As a result, both can be used to measure the dependence between $X$ and $Z$ (Lancaster, 1958). + +Proposition 2 (Lancaster Decomposition). Assume that $Q_{X,Z} \ll Q_X \otimes Q_Z$ , in which case there exists a Radon-Nikodym derivative $R = \frac{\mathrm{d}Q_{X,Z}}{\mathrm{d}(Q_X \otimes Q_Z)}$ . Then, the following identity holds: + +$$ +R = \sum_ {i \in I} \sigma_ {i} \alpha_ {i} \beta_ {i}. \tag {29} +$$ + +In particular, the operator $\mathbf{M}_{Z|X}$ is Hilbert-Schmidt if and only if $\mathsf{R} \in \mathbf{L}^2(Q_X \otimes Q_Z)$ , with the equality + +$$ +\| \mathbf {M} _ {Z | X} \| _ {\mathrm {H S} (\mathbf {L} ^ {2} (Q _ {Z}), \mathbf {L} ^ {2} (Q _ {X}))} ^ {2} = \| \mathsf {R} \| _ {\mathbf {L} ^ {2} (Q _ {X} \otimes Q _ {Z})} ^ {2} = \sum_ {i \in I} \sigma_ {i} ^ {2}. +$$ + +Proof. Using Lem. 4, we represent $\mathsf{R}$ on the ONB $\{\alpha_j\beta_k\}_{j\in J,k\in K}$ . For any $j\in J$ and $k\in K$ , use the definition of the Radon-Nikodym derivative (Schilling, 2017, Theorem 20.2) to write + +$$ +\begin{array}{l} \langle \mathsf {R}, \alpha_ {j} \beta_ {k} \rangle_ {\mathbf {L} ^ {2} (Q _ {X} \otimes Q _ {Z})} = \mathbb {E} _ {Q _ {X} \otimes Q _ {Z}} [ \mathsf {R} (X, Z) \alpha_ {j} (X) \beta_ {k} (Z) ] \\ = \mathbb {E} _ {Q _ {X, Z}} [ \alpha_ {j} (X) \beta_ {k} (Z) ] \\ = \mathbb {E} _ {Q _ {X}} \left[ \alpha_ {j} (X) \mathbb {E} _ {Q _ {X, Z}} \left[ \beta_ {k} (Z) | X \right] \right] \\ = \left\langle \alpha_ {j}, \mathbf {M} _ {Z | X} \beta_ {k} \right\rangle_ {\mathbf {L} ^ {2} (Q _ {X})} \\ = \left\{ \begin{array}{l l} \sigma_ {i} & \text {i f} j = k = i \in I \\ 0 & \text {o t h e r w i s e} \end{array} \right., \\ \end{array} +$$ + +where we recall $I$ as the set indexing the non-zero singular values of $\mathbf{M}_{Z|X}$ (see Prop. 1). This proves (29), the first claim. + +For the second claim, we use the orthonormality of $\{\alpha_j\beta_k\}_{j\in J,k\in K}$ in $\mathbf{L}^2 (Q_X\otimes Q_Z)$ , so that + +$$ +\| \mathsf {R} \| _ {\mathbf {L} ^ {2} (Q _ {X} \otimes Q _ {Z})} ^ {2} = \sum_ {i \in I} \sigma_ {i} ^ {2} = \| \mathbf {M} _ {Z | X} \| _ {\mathrm {H S} (\mathbf {L} ^ {2} (Q _ {Z}), \mathbf {L} ^ {2} (Q _ {X}))}, +$$ + +so that square-summability of $\{\sigma_i\}_{i\in I}$ implies finiteness and equality of the left-hand and right-hand sides above. + +The formulas in Sec. 2 simply equated $I = \mathbb{N} = \{1,2,\dots\}$ for ease of presentation. For completeness, the $\varepsilon_{d}$ term in (9) represents the tail of (29), i.e., + +$$ +\varepsilon_ {d} = \sum_ {i = d + 1} ^ {\infty} \sigma_ {i} \alpha_ {i} \beta_ {i}, +$$ + +which vanishes as $d\to \infty$ because $\sigma_{i}\rightarrow 0$ and $\alpha_{i}\beta_{i}$ is unit-norm in $\mathbf{L}^2 (Q_X\times Q_Z)$ . + +The Radon-Nikodym derivative $\mathsf{R} = \frac{\mathrm{d}Q_{X,Z}}{\mathrm{d}(Q_X\otimes Q_Z)}$ is also useful for converting conditional expectation computations into marginal expectation computations. In this sense, we may say that $\mathsf{R}$ acts as a kernel for an integral operator representation of $\mathbf{M}_{Z|X}$ , where the integral is taken with respect to $Q_{Z}$ . The following identity is referenced by Buja (1990, Section 3) and Dytso et al. (2023, Lemma 1, Eq. (14)). We provide a self-contained proof below. + +Lemma 5. Adopt the setting of Prop. 2. Then, for all $g \in \mathbf{L}^2(Q_Z)$ and $h \in \mathbf{L}^2(Q_X)$ , it holds that + +$$ +\mathbb {E} _ {Q _ {X, Z}} [ g (Z) | X ] (\boldsymbol {x}) = \mathbb {E} _ {Q _ {Z}} [ g (Z) \mathrm {R} (\boldsymbol {x}, Z) ] f o r Q _ {X} - a l m o s t a l l \boldsymbol {x} \in \mathcal {X}, +$$ + +$$ +\mathbb {E} _ {Q _ {X, Z}} [ h (X) | Z ] (\boldsymbol {z}) = \mathbb {E} _ {Q _ {X}} [ h (X) \mathrm {R} (X, \boldsymbol {z}) ] f o r Q _ {Z} - a l m o s t a l l \boldsymbol {z} \in \mathcal {Z}. +$$ + +Proof. We prove the first identity, whereas the second follows by a symmetric argument. To confirm that the two functions are equal almost surely, it is sufficient to prove that for any measurable set $A \in \sigma(X)$ (the $\sigma$ -algebra generated by $X$ ), the relation + +$$ +\int_ {A} \mathbb {E} _ {Q _ {X, Z}} [ g (Z) | X ] (\boldsymbol {x}) \mathrm {d} Q _ {X} (\boldsymbol {x}) = \int_ {A} \mathbb {E} _ {Q _ {Z}} [ g (Z) \mathrm {R} (\boldsymbol {x}, Z) ] \mathrm {d} Q _ {X} (\boldsymbol {x}). \tag {30} +$$ + +By the definition of conditional expectation, we have that + +$$ +\begin{array}{l} \int_ {A} \mathbb {E} _ {Q _ {X, Z}} [ g (Z) | X ] (\boldsymbol {x}) \mathrm {d} Q _ {X} (\boldsymbol {x}) = \int_ {\mathcal {X}} \mathbb {E} _ {Q _ {X, z}} [ g (Z) | X ] (\boldsymbol {x}) \mathbb {1} _ {A} (\boldsymbol {x}) \mathrm {d} Q _ {X} (\boldsymbol {x}) \\ = \mathbb {E} _ {Q _ {X, Z}} [ g (Z) \mathbb {1} _ {A} (X) ] \\ = \mathbb {E} _ {Q _ {X} \otimes Q _ {Z}} \left[ g (Z) \mathbb {1} _ {A} (X) R (X, Z) \right], \\ \end{array} +$$ + +where the last step follows from the Radon-Nikodym theorem (Schilling, 2017, Theorem 20.2). Next, we compute the expectation, taken under the product measure, using Fubini's theorem (Schilling, 2017, Corollary 14.9). That is, + +$$ +\begin{array}{l} \int_ {A} \mathbb {E} _ {Q _ {X, Z}} [ g (Z) | X ] (\boldsymbol {x}) \mathrm {d} Q _ {X} (\boldsymbol {x}) = \mathbb {E} _ {Q _ {X} \otimes Q _ {Z}} [ g (Z) \mathbb {1} _ {A} (X) \mathsf {R} (X, Z) ] \\ = \int_ {A} \left(\int_ {\mathbb {Z}} g (\boldsymbol {z}) \mathrm {R} (\boldsymbol {x}, \boldsymbol {z}) \mathrm {d} Q _ {Z} (\boldsymbol {z})\right) \mathrm {d} Q _ {X} (\boldsymbol {x}) \\ = \int_ {A} \mathbb {E} _ {Q _ {Z}} [ g (Z) \mathsf {R} (\boldsymbol {x}, Z) ] \mathrm {d} Q _ {X} (\boldsymbol {x}). \\ \end{array} +$$ + +This achieves (30) and completes the proof. + +While Lem. 5 applies for a general function $g$ , the function $g_{\rho}$ from (5) is itself a conditional mean. This can be leveraged to produce yet another identity, which acts as a technical lemma for the proof of Thm. 3. + +Lemma 6. Recall that $g_{\rho}(\pmb {z})\coloneqq \mathbb{E}_{\rho_{Y,Z}}[r(Y)|Z](\pmb {z})$ for $r\in \mathbf{L}^2 (P_Y)$ . Assume in addition that $r\in \mathbf{L}^2 (\rho_Y)$ . Then, + +$$ +\eta_ {\rho} (\boldsymbol {x}) = \mathbb {E} _ {\rho_ {Y, Z}} [ r (Y) \mathrm {R} (\boldsymbol {x}, Z) ] + \int_ {\mathcal {Z}} g _ {\rho} (\boldsymbol {z}) \mathrm {R} (\boldsymbol {x}, \boldsymbol {z}) \left(\mathrm {d} Q _ {Z} (\boldsymbol {z}) - \mathrm {d} \rho_ {Z} (\boldsymbol {z})\right). +$$ + +for $Q_{X}$ almost all $\pmb {x}\in \mathcal{X}$ + +Proof. By Lem. 5, we already have that for $Q_{X}$ -almost all $\pmb{x} \in \mathcal{X}$ , the identity + +$$ +\begin{array}{l} \eta_ {\rho} (\boldsymbol {x}) = \mathbb {E} _ {Q _ {Z}} \left[ g _ {\rho} (Z) \mathrm {R} (\boldsymbol {x}, Z) \right] \\ = \mathbb {E} _ {\rho_ {Z}} \left[ g _ {\rho} (Z) \mathsf {R} (\pmb {x}, Z) \right] + \mathbb {E} _ {Q _ {Z}} \left[ g _ {\rho} (Z) \mathsf {R} (\pmb {x}, Z) \right] - \mathbb {E} _ {\rho_ {Z}} \left[ g _ {\rho} (Z) \mathsf {R} (\pmb {x}, Z) \right] \\ = \mathbb {E} _ {\rho_ {Z}} \left[ g _ {\rho} (Z) \mathsf {R} (\boldsymbol {x}, Z) \right] + \int_ {\mathcal {Z}} g _ {\rho} (\boldsymbol {z}) \mathsf {R} (\boldsymbol {x}, \boldsymbol {z}) \left(\mathrm {d} Q _ {Z} (\boldsymbol {z}) - \mathrm {d} \rho_ {Z} (\boldsymbol {z})\right). \\ \end{array} +$$ + +Now, unpacking the first term on the right-hand side above, we recognize that for fixed $\pmb{x} \in \mathcal{X}$ , the random variable $\mathsf{R}(\pmb{x}, Z)$ is $\sigma(Z)$ -measurable, so via the properties of conditional expectation (Schilling, 2017, Theorem 27.11 (vii)) in $\mathbf{L}^1(\rho_Z)$ , we may write + +$$ +\mathbb {E} _ {\rho_ {Z}} \left[ g _ {\rho} (Z) \mathsf {R} (\pmb {x}, Z) \right] = \mathbb {E} _ {\rho_ {Z}} \left[ \mathbb {E} _ {\rho_ {Y, Z}} \left[ r (Y) | Z \right] \mathsf {R} (\pmb {x}, Z) \right] = \mathbb {E} _ {\rho_ {Z}} \left[ \mathbb {E} _ {\rho_ {Y, Z}} \left[ r (Y) \mathsf {R} (\pmb {x}, Z) | Z \right] \right]. +$$ + +Using the expression above and the tower property of the conditional expectation (Lem. 2), we write + +$$ +\mathbb {E} _ {\rho_ {Z}} \left[ g _ {\rho} (Z) \mathrm {R} (\boldsymbol {x}, Z) \right] = \mathbb {E} _ {\rho_ {Z}} \left[ \mathbb {E} _ {\rho_ {Y, Z}} \left[ r (Y) \mathrm {R} (\boldsymbol {x}, Z) | Z \right] \right] = \mathbb {E} _ {\rho_ {Y, Z}} \left[ r (Y) \mathrm {R} (\boldsymbol {x}, Z) \right], +$$ + +completing the proof. + +Mean Square Contingency. Both singular value decomposition from Prop. 1 and the Radon-Nikodym derivative $\mathsf{R}$ from Prop. 2 can be used to calculate a dependence measure between $X$ and $Z$ (Buja, 1990). This dependence measure arises in nonlinear canonical correlation analysis and alternating conditional expectations (Breiman and Friedman, 1985; Bickel et al., 1993). + +Definition 8 (Mean Square Contingency). Assume that $\mathbf{M}_{Z|X}$ is Hilbert-Schmidt. Assume that $I = \mathbb{N}$ (Prop. 1), where we may append zeros if $I$ is finite. Recalling that $\sigma_{1} = 1$ , define the mean square contingency $I(X;Z)$ as any of the expressions + +$$ +I (X; Z) := \| \mathbf {M} _ {Z | X} \| _ {\mathrm {H S} (\mathbf {L} ^ {2} (Q _ {Z}), \mathbf {L} ^ {2} (Q _ {X}))} ^ {2} - 1 = \sum_ {i = 2} ^ {\infty} \sigma_ {i} ^ {2}. +$$ + +Our definition of the mean square contingency is in fact the square of the quantity that was originally introduced as such by Rényi (1959), which is shown below. + +Definition 9. Assume that $Q_{X,Z} \ll Q_X \otimes Q_Z$ , so that $\mathsf{R}$ exists, and that $\mathsf{R} \in \mathbf{L}^2(Q_X \otimes Q_Z)$ . Define the Rényi mean squared contingency Rényi (1959, Eq. (13)) as + +$$ +I _ {\text {R e n y i}} (X; Z) := \| R - 1 \| _ {\mathbf {L} ^ {2} \left(Q _ {X} \otimes Q _ {Z}\right)} = \sqrt {\int_ {\mathcal {X} \times \mathcal {Z}} \left(\mathrm {R} (\boldsymbol {x} , \boldsymbol {z}) - 1\right) ^ {2} \mathrm {d} \left(Q _ {X} \otimes Q _ {Z}\right) (\boldsymbol {x} , \boldsymbol {z})}. +$$ + +If $Q_{X,Z}$ is absolutely continuous with respect to a measure $\nu$ on $\mathcal{X} \times \mathcal{Z}$ , with joint density $q_{X,Z}$ and marginal densities $(q_X, q_Z)$ , we have that + +$$ +I _ {\mathrm {R e n y i}} (X; Z) = \sqrt {\int_ {\mathcal {X} \times \mathcal {Z}} \left(\mathsf {R} (\pmb {x} , \pmb {z}) - 1\right) ^ {2} q _ {X} (\pmb {x}) q _ {Z} (\pmb {z}) \mathrm {d} \nu (\pmb {x} , \pmb {z})}. +$$ + +Written in the form above, $I_{\text{Renyi}}(X; Z)$ may also be called the $\chi^2$ -functional (Buja, 1990). + +We apply $I(X;Z) = I_{\text{Renyi}}(X;Z)^2$ to achieve the sequence of identities following (10). Using the singular decay computations from Lem. 3 with $c = C = 1$ , we have that if $\sigma_i = i^{-\gamma}$ , then + +$$ +\frac {1}{2 \gamma - 1} - 1 \leq I (X; Z) \leq \frac {1}{2 \gamma - 1} \iff \frac {1}{2} \frac {I (X ; Z) + 2}{I (X ; Z) + 1} \leq \gamma \leq \frac {1}{2} \frac {I (X ; Z) + 1}{I (X ; Z)}. \tag {31} +$$ + +For simplicity, we will use the upper bounds to describe the order of the quantities, that is, + +$$ +I (X; Z) \sim \frac {1}{2 \gamma - 1} \Longleftrightarrow \gamma \sim \frac {I (X ; Z) + 1}{2 I (X ; Z)}. \tag {32} +$$ + +We employ this relation in the sample complexity calculations in Appx. D. + +# B.4. Reproducing Kernel Hilbert Spaces + +In this section, we review facts about the interplay between reproducing kernel Hilbert spaces (RKHSs), the $\mathbf{L}^2$ -spaces defined in Appx. B.1, the Hilbert-Schmidt spaces from Appx. B.2, and Bochner spaces (introduced below). The goal is to provide the necessary background in order to understand the results regarding kernel-based estimation methods that are used in other parts of the manuscript. The analyses in Appx. D rely on being able to decompose some target function (related to the dependence between $X$ and $Z$ ) so that it may be estimated in multiple ways. One method involves estimating the Radon-Nikodym derivative $\mathbb{R}$ introduced in Prop. 2. The second technique relies on vector-valued regression, with a target function denoted by $F_{\star}$ . Most of the setup below is in service of the vector-valued regression estimation portion. + +We maintain the Borel spaces $(\mathcal{X},\mathcal{B}(\mathcal{X}))$ and $(\mathcal{Z},\mathcal{B}(\mathcal{Z}))$ from Appx. B.3, with the topological assumption that $\mathcal{X}$ and $\mathcal{Z}$ are second countable, locally compact, and Hausdorff. In addition, $\mathcal{H}$ and $\mathcal{G}$ each denote a separable reproducing kernel Hilbert space (RKHS) containing real-valued functions of $\mathcal{X}$ and real-valued functions of $\mathcal{Z}$ , respectively. We let $\phi :\mathcal{X}\to \mathcal{H}$ and $\psi :\mathcal{Z}\rightarrow \mathcal{G}$ be the canonical feature maps and let $k:\mathcal{X}\times \mathcal{X}\to \mathbb{R}$ and $l:\mathcal{Z}\times \mathcal{Z}\to \mathbb{R}$ be the reproducing kernels for $\mathcal{H}$ and $\mathcal{G}$ . The boundedness assumptions $\sup_{\boldsymbol {x},\boldsymbol{x}'\in \mathcal{X}}k(\boldsymbol {x},\boldsymbol{x}')\leq k_{\max} < \infty$ and $\sup_{\boldsymbol {z},\boldsymbol{z}'\in \mathcal{Z}}l(\boldsymbol {z},\boldsymbol{z}')\leq l_{\max} < \infty$ are maintained throughout the paper. + +Bochner Space. We will adopt the equivalence class notation first introduced in Appx. B.1, with respect to probability measures $Q_{X}$ and $Q_{Z}$ . That is, for any two real-valued measurable functions $f: \mathcal{X} \to \mathbb{R}$ and $h: \mathcal{X} \to \mathbb{R}$ , we say that $f \sim_{X} h$ if + +$$ +Q _ {X} \left(\left\{\boldsymbol {x} \in \mathcal {X}: f (\boldsymbol {x}) \neq h (\boldsymbol {x}) \right\}\right) = 0. +$$ + +The notation $[f]_X$ denotes an equivalence class with respect to the equivalence relation $\sim_X$ , with representative $f$ . We say that $[f]_X \in \mathbf{L}^2(Q_X)$ if + +$$ +\int_ {\mathcal {X}} h ^ {2} (\boldsymbol {x}) \mathrm {d} Q _ {X} (\boldsymbol {x}) < \infty \text {f o r s o m e , o r e q u i v a l e n t l y a l l} h \in [ f ] _ {X}. +$$ + +We define $\sim_Z$ , $[\cdot]_Z$ , and $\mathbf{L}^2(Q_Z)$ similarly. We introduce a similar construction to $\mathbf{L}^2(Q_X)$ for vector-valued functions, i.e., those whose outputs lie in a Hilbert space. For measurable functions $F: \mathcal{X} \to \mathcal{G}$ and $H: \mathcal{X} \to \mathcal{G}$ , we will define the equivalence relation $F \sim_X H$ via $Q_X$ ( $\{\pmb{x} \in \mathcal{X}: F(\pmb{x}) \neq H(\pmb{x})\}) = 0$ , and corresponding equivalence classes will be denoted $[F]_X$ . We define the Bochner space $\mathbf{L}^2(Q_X; \mathcal{G})$ via $[F]_X \in \mathbf{L}^2(Q_X; \mathcal{G})$ if + +$$ +\int_ {\mathcal {X}} \| H (\boldsymbol {x}) \| _ {\mathcal {G}} ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x}) < \infty \text {f o r s o m e , o r e q u i v a l e n t l y a l l} H \in [ F ] _ {X}. +$$ + +Analogous to $\mathbf{L}^2 (Q_X)$ , this is a set of equivalence classes of vector-valued functions. Recall from Appx. B.2 and Appx. B.3 that we use $\mathrm{HS}(\mathcal{U},\mathcal{V})$ to denote the space of Hilbert-Schmidt operators mapping from a Hilbert space $\mathcal{U}$ to another Hilbert space $\mathcal{V}$ . The following result allows us to relate elements of the Bochner space $\mathbf{L}^2 (Q_X;\mathcal{G})$ to elements of a space of Hilbert-Schmidt operators $\mathrm{HS}(\mathbf{L}^2 (Q_X),\mathcal{G})$ . For $[f]_X\in \mathbf{L}^2 (Q_X)$ and $g\in \mathcal{G}$ , the notation $f(\cdot)g$ refers to the function mapping $\pmb {x}\in \mathcal{X}$ to $f(\pmb {x})g\in \mathcal{G}$ . + +Theorem 6. (Aubin, 2000, Theorem 12.6.1) There exists a function $\Phi : \mathrm{HS}(\mathbf{L}^2(Q_X), \mathcal{G}) \to \mathbf{L}^2(Q_X; \mathcal{G})$ that is a bijective linear transformation satisfying + +$$ +\| \mathbf {C} \| _ {\mathrm {H S} (\mathbf {L} ^ {2} (Q _ {X}), \mathcal {G})} = \| \Phi (\mathbf {C}) \| _ {\mathbf {L} ^ {2} (Q _ {X}; \mathcal {G})} f o r a l l \mathbf {C} \in \mathrm {H S} (\mathbf {L} ^ {2} (Q _ {X}), \mathcal {G}), +$$ + +and for every $[f]_X \in \mathbf{L}^2(Q_X)$ and $g \in \mathcal{G}$ , associates + +$$ +\Phi (g \otimes [ f ] _ {X}) = [ f (\cdot) g ] _ {X} \Longleftrightarrow g \otimes [ f ] _ {X} = \Phi^ {- 1} ([ f (\cdot) g ] _ {X}) \tag {33} +$$ + +for the rank-one operator $g\otimes [f]_X\in \mathrm{HS}(\mathbf{L}^2 (Q_X),\mathcal{G})$ + +Based on the definition of the Hilbert-Schmidt norm in (25) (Appx. B.2, Thm. 6 will make computation of $\mathbf{L}^2(Q_X; \mathcal{G})$ -norms more convenient by relating them to $\mathrm{HS}(\mathbf{L}^2(Q_X), \mathcal{G})$ -norms. The following technical lemma can be used to simplify computations regarding the inverse of this isomorphism. + +Lemma 7. Let $(g_j)_{j\in J}$ be any countable orthonormal basis of $\mathcal{G}$ , and let $\mathbf{C} = \Phi^{-1}([F]_X)$ for some $F:\mathcal{X}\to \mathcal{G}$ such that $[F]_X\in \mathbf{L}^2 (Q_X;\mathcal{G})$ . Define the functions $(f_j)_{j\in J}$ via $f_{j}(\pmb {x})\coloneqq \langle g_{j},F(\pmb {x})\rangle_{\mathcal{G}}$ . Then, $[f_j]_X\in \mathbf{L}^2 (Q_X)$ for all $j\in J$ , and we have the identity + +$$ +\mathbf {C} = \sum_ {j \in J} g _ {j} \otimes [ f _ {j} ] _ {X}, +$$ + +where the convergence is interpreted in terms of $\mathrm{HS}(\mathbf{L}^2 (Q_X),\mathcal{G})$ + +Proof. First, consider the case in which we can write the equivalence class of $F$ in $\mathbf{L}^2(Q_X, \mathcal{G})$ in the form + +$$ +[ F ] _ {X} = \sum_ {j \in J} [ f _ {j} (\cdot) g _ {j} ] _ {X}, \tag {34} +$$ + +for some sequence of functions $f_{1}, f_{2}, \ldots \in \mathbf{L}^{2}(Q_{X})$ . Then, because $\Phi^{-1}$ is a linear isometry, it is a bounded (hence continuous) operator with respect to the norm on $\mathbf{L}^2(Q_X, \mathcal{G})$ . This implies via continuity + +$$ +\mathbf {C} = \Phi^ {- 1} ([ F ] _ {X}) = \Phi^ {- 1} \left(\sum_ {j \in J} [ f _ {j} (\cdot) g _ {j} ] _ {X}\right) = \sum_ {j \in J} \Phi^ {- 1} \left([ f _ {j} (\cdot) g _ {j} ] _ {X}\right) = \sum_ {j \in J} g _ {j} \otimes [ f _ {j} ] _ {X}, +$$ + +where the last step follows because $\Phi^{-1}$ satisfies the relation (33). To achieve the identity (34), we fix any $\pmb{x} \in \mathcal{X}$ , we expand $F(\pmb{x}) \in \mathcal{G}$ onto the basis $(g_j)_{j \in J}$ to write + +$$ +F(\boldsymbol {x}) = \sum_{j\in J}\underbrace{\langle g_{j},F(\boldsymbol{x})\rangle_{\mathcal{G}}}_{f_{j}(\boldsymbol {x})}g_{j}. +$$ + +To pass this pointwise equality to (34), consider any sequence of $\mathcal{G}$ -valued functions $(H_j)_{j\in J}$ such that $H_{j}(\pmb {x}) = f_{j}(\pmb {x})g_{j}$ for all $\pmb {x}\in \mathcal{X}_j\subseteq \mathcal{X}$ , where $Q_{X}(\mathcal{X}_{j}) = 1$ . Similarly, consider $H_0:\mathcal{X}\to \mathcal{G}$ such that $H_0(\pmb {x}) = F(\pmb {x})$ for all $\pmb {x}\in \mathcal{X}_0$ with $Q_{X}(\mathcal{X}_{0}) = 1$ . Thus, we have that + +$$ +H _ {0} (\boldsymbol {x}) = \sum_ {j \in J} H _ {j} (\boldsymbol {x}) \text {f o r a l l} \boldsymbol {x} \in \mathcal {X} _ {0} \cap \left(\bigcap_ {j \in J} \mathcal {X} _ {j}\right), +$$ + +and because $J$ is countable, this implies that $H_0(\pmb{x}) = \sum_{j\in J}H_j(\pmb{x})$ for $Q_{X}$ -almost all $\pmb{x}\in \mathfrak{X}$ , granting (34). It remains to be shown that $[f_j]_X\in \mathbf{L}^2 (Q_X)$ . This follows by the Bochner-square integrability of $F$ , as + +$$ +\int_ {\mathcal {X}} f _ {j} ^ {2} (\boldsymbol {x}) \mathrm {d} Q _ {X} (\boldsymbol {x}) = \int_ {\mathcal {X}} \langle g _ {j}, F (\boldsymbol {x}) \rangle_ {\mathcal {G}} ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x}) \leq \| g _ {j} \| _ {\mathcal {G}} ^ {2} \int_ {\mathcal {X}} \| F (\boldsymbol {x}) \| _ {\mathcal {G}} ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x}) < \infty , +$$ + +which completes the proof. + +In the sequel, we will define a statistical learning problem in which the target function $F_{\star}$ is an element of $\mathbf{L}^2 (Q_X;\mathcal{G})$ + +For the kernel-based estimation approach, the estimation function $\widehat{F} \equiv \widehat{F}_{\lambda}$ (where $\lambda$ is a to-be-specified regularization parameter) will live in a particular vector-valued RKHS that will be isometrically isomorphic to $\mathrm{HS}(\mathcal{H},\mathcal{G})$ . Using Thm. 6, $F_{\star}$ will be associated to an element $\mathbf{C}_{\star} \in \mathrm{HS}(\mathbf{L}^2(Q_X),\mathcal{G})$ via an isometric isomorphism. We introduce the concept of embeddings and interpolation spaces to describe exactly where $\mathbf{C}_{\star}$ lies in between $\mathrm{HS}(\mathcal{H},\mathcal{G})$ and $\mathrm{HS}(\mathbf{L}^2(Q_X),\mathcal{G})$ (via a source condition). + +**Embedding Operator.** See Appx. B.2 for a review of the terminology surrounding compact operators. Consider the embedding operator $\mathbf{I}_X: \mathcal{H} \to \mathbf{L}^2(Q_X)$ , which identifies a function $h \in \mathcal{H}$ with its equivalence class $[h]_X \in \mathbf{L}^2(Q_X)$ . Under the bounded kernel assumption, we have that $\mathbf{I}_X$ is compact, and moreover Hilbert-Schmidt, with norm bounded as $\| \mathbf{I}_X \|_{\mathrm{HS}(\mathcal{G}, \mathbf{L}^2(Q_X))} \leq \sqrt{k_{\max}}$ (Steinwart and Scovel, 2012, Lemma 2.3). We denote its adjoint by $\mathbf{S}_X := \mathbf{I}_X^*$ , and finally, construct the self-adjoint, trace class operator + +$$ +\mathbf {T} _ {X} := \mathbf {I} _ {X} \mathbf {S} _ {X}: \mathbf {L} ^ {2} \left(Q _ {X}\right)\rightarrow \mathbf {L} ^ {2} \left(Q _ {X}\right). \tag {35} +$$ + +Applying the eigendecomposition Thm. 4, there exists an orthonormal basis of $\operatorname{cl}(\operatorname{range}(\mathbf{I}_X)) \subseteq \mathbf{L}^2(Q_X)$ , denoted $([e_{X,i}]_X)_{i \in I}$ , and a sequence of positive, non-increasing eigenvalues $(\mu_{X,i})_{i \in I}$ such that + +$$ +\mathbf {T} _ {X} = \sum_ {i \in I} \mu_ {X, i} \langle [ e _ {X, i} ] _ {X}, \cdot \rangle_ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} [ e _ {X, i} ] _ {X}. \tag {36} +$$ + +Note that we have only used the index set $I$ from Thm. 4, as opposed to the larger set $J$ for which we can define an ONB for the entirety of $\mathbf{L}^2(Q_X)$ , not only $\operatorname{cl}(\operatorname{range}(\mathbf{I}_X))$ . Analogous to $\mathbf{T}_X$ , we can also define the uncentered covariance operator + +$$ +\mathbf {C} _ {X} = \mathbf {S} _ {X} \mathbf {I} _ {X}: \mathcal {H} \rightarrow \mathcal {H}. +$$ + +Similar to (36), $\mathbf{C}_X$ enjoys an eigendecomposition + +$$ +\mathbf {C} _ {X} = \sum_ {i \in I} \mu_ {Z, i} \langle \cdot , \mu_ {X, i} ^ {1 / 2} e _ {X, i} \rangle_ {\mathcal {G}} \mu_ {X, i} ^ {1 / 2} e _ {X, i}. \tag {37} +$$ + +The equation above implicitly contains another fact, which is that the equivalence classes in (36) all contain representatives that are in $\mathcal{H}$ . This defines the collection $\{e_{X,i}\}_{i\in I}$ , which forms an ONB of $\mathrm{null}(\mathbf{I}_X)^\perp \subseteq \mathcal{H}$ . Combining (36) and (37), the embedding can be described using a singular value decomposition + +$$ +\mathbf {I} _ {X} = \sum_ {i \in I} \mu_ {X, i} ^ {1 / 2} \left(\left[ e _ {X, i} \right] _ {Z} \otimes \left(\mu_ {X, i} ^ {1 / 2} e _ {X, i}\right)\right). \tag {38} +$$ + +Lastly, we define $(\mathbf{I}_Z,\mathbf{S}_Z,\mathbf{T}_Z,\mathbf{C}_Z)$ as the analogous operators for $\mathbf{L}^2 (Q_Z)$ and $\mathcal{G}$ . + +Interpolation Spaces and the Inclusion Map. For any $\alpha \geq 0$ , we define the operator + +$$ +\mathbf {T} _ {X} ^ {\alpha / 2} = \sum_ {i \in I} \mu_ {X, i} ^ {\alpha / 2} \langle [ e _ {X, i} ] _ {X}, \cdot \rangle_ {\mathbf {L} ^ {2} (Q _ {X})} [ e _ {X, i} ] _ {X}, \tag {39} +$$ + +$$ +\mathrm {d o m} (\mathbf {T} _ {X} ^ {\alpha / 2}) = \left\{[ f ] _ {X} \in \mathbf {L} ^ {2} (Q _ {X}): \sum_ {i \in I} \mu_ {X, i} ^ {\alpha / 2} \langle [ f ] _ {X}, [ e _ {X, i} ] _ {X} \rangle_ {\mathbf {L} ^ {2} (Q _ {X})} < \infty \right\}, +$$ + +which is considered to be well-defined when $\mathrm{dom}(\mathbf{T}_X^{\alpha /2})\neq \varnothing$ . Then, we define the $\alpha$ -interpolation space $[\mathcal{H}]^\alpha$ via + +$$ +[ \mathcal {H} ] ^ {\alpha} = \left\{\sum_ {i \in I} a _ {i} \mu_ {X, i} ^ {\alpha / 2} [ e _ {X, i} ] _ {X}: (a _ {i}) _ {i \in I} \in \ell_ {2} (I) \right\} \subseteq \mathbf {L} ^ {2} (Q _ {X}), +$$ + +where $(a_{i})_{i\in I}\in \ell_{2}(I)$ indicates that $\sum_{i\in I}a_i^2 < + \infty$ . When $\alpha = 0$ , we recover $[\mathcal{H}]^{0} = \mathrm{cl}(\mathrm{range}(\mathbf{I}_{X}))$ , whereas for $\alpha = 1$ $[\mathcal{H}]^{1}$ is isometrically isomorphic to $\mathrm{null}(\mathbf{I}_X)^\perp \subseteq \mathcal{H}$ (Fischer and Steinwart, 2020). Thus, for $\alpha \in (0,1)$ , we interpret $[\mathcal{H}]^{\alpha}$ as an "interpolation" between the well-behaved functions in the RKHS $\mathcal{H}$ and the elements of $\mathbf{L}^2 (Q_X)$ . Associated to each + +$[\mathcal{H}]^\alpha$ is the inclusion map $\mathbf{I}_X^{\alpha,\infty}$ , which simply views an element $[h]_X \in [\mathcal{H}]^\alpha$ as an element of $\mathbf{L}^\infty(Q_X)$ (this requires the boundedness of the kernel). Here, $\mathbf{L}^\infty(Q_X)$ denotes equivalence classes of real-valued functions on $\mathcal{X}$ that have a finite essential supremum under $Q_X$ . We write $\mathbf{I}_X^{\alpha,\infty}: [\mathcal{H}]^\alpha \hookrightarrow \mathbf{L}^\infty(Q_X)$ when the inclusion map is continuous (see Asm. 10). + +We use the standard generalization of these notions onto spaces of vector-valued functions (Li et al., 2024; Meunier et al., 2024): for any $\beta \geq 0$ , we define the $\beta$ -interpolation norm for $\mathbf{C} \in \mathrm{HS}(\mathbf{L}^2(Q_X), \mathcal{G})$ via the formula + +$$ +\left\| \mathbf {C} \right\| _ {\beta} := \left\| \mathbf {C T} _ {X} ^ {- \beta / 2} \right\| _ {\mathrm {H S} \left(\mathbf {L} ^ {2} \left(Q _ {X}\right), \mathcal {G}\right)} \in [ 0, + \infty ]. \tag {40} +$$ + +This norm, when finite, will be used to define the source condition of the target function $F_{\star}$ alluded to in Sec. 3, as we may compute $\| \mathbf{C}_{\star}\|_{\beta}$ for $\mathbf{C}_{\star} \coloneqq \Phi^{-1}([F_{\star}]_X)$ (see Thm. 6). While we phrase the condition in terms of the constant $\beta$ above in order to relate it to the kernel methods and inverse problem literature below, we will use the constructions of Appx. B.3 to phrase the finiteness of (40) for $\mathbf{C}_{\star}$ in terms of the mean square contingency (Definition 8) in Appx. D. + +Vector-Valued Spectral Regularization Learning. We may now describe estimation techniques for an $\mathbf{L}^2(Q_X; \mathcal{G})$ -valued target function that fall into the category of vector-valued spectral regularization learning. We give only a brief overview in order to state the statistical convergence guarantees; see Meunier et al. (2024) for a detailed description, including computational properties of the estimator. As we prove in Lem. 8, there exists a function $F_\star: \mathcal{X} \to \mathcal{G}$ such that $[F_\star]_X \subseteq \mathbf{L}^2(Q_X; \mathcal{G})$ and for every $g \in \mathcal{G}$ , + +$$ +\mathbb {E} _ {Q _ {X, Z}} [ g (Z) | X ] (\boldsymbol {x}) = \langle g, F _ {\star} (\boldsymbol {x}) \rangle_ {\mathcal {G}}. \tag {41} +$$ + +For each $\pmb{x} \in \mathcal{X}$ , we also refer to $F_{\star}(\pmb{x})$ as the conditional mean embedding of $Z$ given $X = \pmb{x}$ . Note that for a fixed $g \in \mathcal{G}$ , we do not assume that $\pmb{x} \mapsto \langle g, F_{\star}(\pmb{x}) \rangle$ is an element of an RKHS $\mathcal{H}$ . This avoids some of the technical challenges raised, for instance, in Klebanov et al. (2020; 2021), where this requirement places strong implicit restrictions on the chosen kernel and RKHS. Instead, the mis-specified case is handled using vector-valued interpolation spaces. + +Next, using Thm. 6, we associate to $F_{\star}$ the element $\mathbf{C}_{\star} = \Phi^{-1}(F_{\star}) \in \mathrm{HS}(\mathbf{L}^2(Q_X), \mathcal{G})$ . Given independent and identically distributed pre-training data $(X_1, Z_1), \ldots, (X_N, Z_N)$ drawn from $Q_{X,Z}$ , define the empirical (uncentered) auto-covariance and cross-covariance operator + +$$ +\widehat {\mathbf {C}} _ {X X} = \frac {1}{N} \sum_ {i = 1} ^ {N} \phi (X _ {i}) \otimes \phi (X _ {i}) \text {a n d} \widehat {\mathbf {C}} _ {Z X} = \frac {1}{N} \sum_ {i = 1} ^ {N} \psi (Z _ {i}) \otimes \phi (X _ {i}). +$$ + +Let $f_{\lambda}:\mathbb{R}_{\geq 0}\to \mathbb{R}_{\geq 0}$ denote the spectral cutoff function + +$$ +f _ {\lambda} (x) = \left\{ \begin{array}{l l} x ^ {- 1} & \text {i f} x \geq \lambda \\ 0 & \text {o t h e r w i s e} \end{array} . \right. \tag {42} +$$ + +We can interpret $f_{\lambda}(x)$ as a regularized inverse that behaves in a reasonable manner near $x = 0$ . A similar function corresponding to the more familiar Tikhonov regularization is $f_{\lambda}(x) = (x + \lambda)^{-1}$ . While other options for $f_{\lambda}$ (i.e. filter functions) exist owing to the tools of regularization theory (Bauer et al., 2007), the spectral cutoff function will be sufficient for our purposes, as it allows for the simplest statement of the upcoming results. For a self-adjoint positive semidefinite operator $\mathbf{C}$ , we define $f_{\lambda}(\mathbf{C})$ as replacing each eigenvalue $\mu_i \geq 0$ of $\mathbf{C}$ with $f_{\lambda}(\mu_i)$ in the eigendecomposition (see Thm. 4). For regularization parameter $\lambda > 0$ , we define the estimator + +$$ +\widehat {F} _ {\lambda} (\cdot) := \widehat {\mathbf {C}} _ {\lambda} \phi (\cdot) \text {f o r} \widehat {\mathbf {C}} _ {\lambda} := \widehat {\mathbf {C}} _ {Z X} f _ {\lambda} \left(\widehat {\mathbf {C}} _ {X X}\right): \mathcal {H} \rightarrow \mathcal {G}. \tag {43} +$$ + +Now, consider the following assumptions, which include the source condition. + +Assumption 10. (Meunier et al., 2024, Assumptions (SRC), (MOM), (EVD), (EMB)) + +1. There exist positive constants $\beta > 0$ and $B > 0$ such that $\| F_{\star} \|_{\beta} \coloneqq \| \mathbf{C}_{\star} \|_{\beta} \leq B$ . + +2. For positive constants $\sigma^2, c > 0$ the Bernstein moment condition + +$$ +\mathbb {E} _ {Q _ {X, Z}} \left[ \| \psi (Z) - F _ {\star} (X) \| _ {\mathcal {G}} ^ {2} | X \right] (\boldsymbol {x}) \leq \frac {1}{2} q! \sigma^ {2} c ^ {q - 2} +$$ + +is satisfied for $Q_{X}$ -almost all $\pmb{x} \in \mathcal{X}$ and all $q \geq 2$ . + +3. There exist constants $D > 0$ and $p < 1$ such that + +$$ +\mu_ {X, i} \leq D i ^ {- 1 / p}. +$$ + +4. For $\alpha \in [p,1]$ , the inclusion map $\mathbf{I}_X^{\alpha,\infty}:[\mathcal{H}]^\alpha \hookrightarrow \mathbf{L}^\infty(Q_X)$ is bounded, with operator norm $\| I_X^{\alpha,\infty}\|_{\mathrm{op}} \leq A$ . + +Note that the first assumption is always satisfied for $\alpha = 1$ , due to boundedness of the kernel (as the $[\mathcal{H}]^1$ norm can be associated to the RKHS norm of an element of $\mathcal{H}$ ). We pay particular attention to the constant $\beta$ which defines the aforementioned source condition. In Appx. D.1, we translate this condition into one regarding the dependence between $X$ and $Z$ , using the tools from Appx. B.3. We refer to the case when $\beta \geq 1$ as the well-specified case. We also employ one additional assumption to state the result. + +Assumption 11 (Sub-Gaussian Tail). There exists a positive constant $\tau >0$ such that the following holds: + +$$ +\mathbb {P} _ {Q _ {X}} \left[ \| F _ {\star} (X) \| _ {\mathcal {G}} > t \right] \leq 2 e ^ {- \frac {t ^ {2}}{2 \nu^ {2}}}. +$$ + +Asm. 11 is only used to replace a statement of the form "for $N \geq 1$ sufficiently large" from Meunier et al. (2024, Theorem 4) with a quantitative condition on $N$ . It is used to control the probability that $\| F_{\star}(X_i)\|_{\mathcal{G}} > t$ for any $i = 1,\dots,N$ for the choices of $t$ specified in the proof of Meunier et al. (2024, Theorem 8). + +Theorem 7. (Meunier et al., 2024, Theorem 4) Consider a failure probability $\delta \in (0,1]$ , the estimate $\widehat{F}_{\lambda}$ defined in (43), and the target function $F_{\star}$ defined in (41). Under Asm. 10 and Asm. 11, there exists a constant $C > 0$ (independent of $N$ and $\delta$ ) such that the following statements hold. + +- Case 1: $\beta + p > \alpha$ . If $N^{\left(\frac{1}{2}\left(1 + \frac{p - \alpha}{p + \beta}\right) + \frac{\alpha - \beta}{2\alpha}\right)} \geq 2\nu^{2} \log (N / \delta)$ and $\lambda = \Theta (N^{-\frac{1}{\beta + p}})$ , then + +$$ +\| [ \widehat {F} _ {\lambda} ] _ {X} - F _ {\star} \| _ {\mathbf {L} ^ {2} (Q _ {X}; \mathcal {G})} ^ {2} \leq C \mathrm {p l o g} (1 / \delta) N ^ {- \frac {\beta}{\beta + p}} +$$ + +with probability at least $1 - \delta / 4$ . + +- Case 2: $\beta + p \leq \alpha$ . If $N^{\frac{\alpha - \beta}{\alpha}} \geq 2\nu^{2} \operatorname{plog}(N / \delta)$ and $\lambda = \Theta((N / \operatorname{plog}(N))^{-\frac{1}{\alpha}})$ , then + +$$ +\| \left[ \widehat {F} _ {\lambda} \right] _ {X} - F _ {\star} \| _ {\mathbf {L} ^ {2} \left(Q _ {X}; \mathcal {G}\right)} ^ {2} \leq C \operatorname {p l o g} (1 / \delta) (N / \log^ {2} (N)) ^ {- \frac {\beta}{\alpha}} +$$ + +with probability at least $1 - \delta / 4$ . + +This result is applied in Appx. D.1 and provides an example of the "conditional mean" approach outlined in Sec. 2 and Sec. 3. Regarding the setting of $\lambda$ in Thm. 7, the argument follows the typical recipe of defining an element $F_{\lambda} \in \mathbf{L}^{2}(Q_{X};\mathcal{G})$ which represents the population version of the regularized predictor. Let $\| \cdot \|_{\gamma}$ denote the $\gamma$ -interpolation norm for $\gamma \in [0,1]$ , which is equal to $\| \cdot \|_{\mathbf{L}^2 (Q_X;\mathcal{G})}$ when $\gamma = 0$ . Then, the approximation error $\| [F_{\lambda}]_X - F_{\star}\|_{\gamma}^2$ decays according to $\lambda^{\beta -\gamma}$ when using the spectral cutoff regularizer, which reflects the classical analyses of Smale and Zhou (2007). In the well-specified case, the estimation error, $\| [\widehat{F}_{\lambda}]_{X} - [F_{\lambda}]_{X}\|_{\gamma}$ decomposes into multiple terms which include irreducible noise terms of order $N^{-1}\lambda^{-\alpha /2}$ and additional approximation terms of order $N^{-1 / 2}\lambda^{(\beta -\alpha) / 2}$ . By using $\lambda = \Theta (N^{-\frac{1}{\beta + p}})$ and the condition $\beta +p > \alpha$ from Case 1, the irreducible noise error converges at rate $N^{-1 / 2}$ whereas the approximation term converges at rate $N^{-\beta /2(\beta +p)}$ . Note that these rates will be squared in Thm. 7. The argument for Case 2 follows similarly. + +Radon-Nikodym Derivative Estimation. To set the stage for this technique, we describe a function class in which $\widehat{\mathbb{R}}:\mathcal{X}\times \mathcal{Z}\to \mathbb{R}_{\geq 0}$ will live. Let $S$ denote a separable reproducing kernel Hilbert space (RKHS) of real-valued functions + +on $\mathcal{X} \times \mathcal{Z}$ , with canonical feature map $\varphi: \mathcal{X} \times \mathcal{Z} \to \mathbb{R}$ and reproducing kernel $\kappa: (\mathcal{X} \times \mathcal{Z}) \times (\mathcal{X} \times \mathcal{Z}) \to \mathbb{R}$ . As before, we first assume boundedness of the kernel, i.e., $\sup \{\kappa(\boldsymbol{x}, \boldsymbol{z}, \boldsymbol{x}', \boldsymbol{z}') : (\boldsymbol{x}, \boldsymbol{z}), (\boldsymbol{x}', \boldsymbol{z}') \in \mathcal{X} \times \mathcal{Z}\} \leq \kappa_{\max}$ . + +Let us describe the estimation procedure, which relies on a similar spectral regularization technique as the one described for vector-valued regression. Because the Radon-Nikodym derivative being estimated is $\frac{\mathrm{d}Q_{X,Z}}{\mathrm{d}(Q_X\otimes Q_Z)}$ , we consider having samples from both distributions available. In particular, we observe $N_{\mathrm{p}}$ paired examples $(X_{1},Z_{1}),\ldots ,(X_{N_{\mathrm{p}}},Z_{N_{\mathrm{p}}})\sim$ $Q_{X,Z}$ and $N_{\mathrm{u}}$ unpaired examples $(X_1',Z_1')$ , ..., $(X_{N_{\mathrm{u}}}^{\prime},Z_{N_{\mathrm{u}}}^{\prime})\sim Q_{X}\otimes Q_{Z}$ . Define the uncentered covariance operators + +$$ +\widehat {\mathbf {C}} _ {\mathrm {p}} = \frac {1}{N _ {\mathrm {p}}} \sum_ {i = 1} ^ {N _ {\mathrm {p}}} \varphi \left(X _ {i}, Z _ {i}\right) \otimes \varphi \left(X _ {i}, Z _ {i}\right), \quad \widehat {\mathbf {C}} _ {\mathrm {u}} = \frac {1}{N _ {\mathrm {u}}} \sum_ {i = 1} ^ {N _ {\mathrm {u}}} \varphi \left(X _ {i} ^ {\prime}, Z _ {i} ^ {\prime}\right) \otimes \varphi \left(X _ {i} ^ {\prime}, Z _ {i} ^ {\prime}\right), \tag {44} +$$ + +representing the paired and unpaired examples, respectively. Then, using the spectral cutoff function $f_{\lambda}$ (see (42)), we define the estimate + +$$ +\widehat {\mathsf {R}} \equiv \widehat {\mathsf {R}} _ {\lambda} = f _ {\lambda} \left(\widehat {\mathbf {C}} _ {\mathrm {u}}\right) \widehat {\mathbf {C}} _ {\mathrm {p}} \mathbf {1}, \tag {45} +$$ + +where $\mathbf{1}(\pmb{x},\pmb{z}) = 1$ for all $(\pmb{x},\pmb{z})\in \mathcal{X}\times \mathcal{Z}$ . Because $f_{\lambda}$ can be viewed as a regularized inverse, $\widehat{\mathsf{R}}$ can readily be interpreted as the "ratio" of the covariance operator of the paired sample over that of the unpaired sample. + +To state the assumptions for the analysis, we require an analogous operator to $\mathbf{I}_X$ and $\mathbf{I}_Z$ introduced earlier in this section. We then define the embedding operator $\mathbf{I}_{X,Z}:S\to \mathbf{L}^2 (Q_X\otimes Q_Z)$ , which takes an element $S\in S$ and indexes its equivalence class in $\mathbf{L}^2 (Q_X\otimes Q_Z)$ . We will not need to define an explicit notation for the equivalence class for this discussion, but will do so in Appx. D.2. Due to Steinwart and Scovel (2012, Lemma 2.3), the bounded kernel assumption implies that $\mathbf{I}_{X,Z}$ is Hilbert-Schmidt with norm bounded as $\| \mathbf{I}_{X,Z}\|_{\mathrm{HS}(S,\mathbf{L}^2 (Q_X\otimes Q_Z))} < \sqrt{\kappa_{\max}}$ . + +Recall the powers of operators introduced in (39). We will use a similar construction for this technique as well. Define the (compact) adjoint operator $\mathbf{S}_{X,Z} = \mathbf{I}_{X,Z}^{*}: \mathbf{L}^{2}(Q_{X} \otimes Q_{Z}) \to \mathcal{S}$ . Via Thm. 4, let $(\mu_i)_{i \in I}$ denote the non-zero eigenvalues of the compact, trace class operator $\mathbf{S}_{X,Z} \mathbf{I}_{X,Z}$ , where we consider $I = \mathbb{N}$ for simplicity. Let the degrees of freedom function be defined as + +$$ +\mathrm {d f} (\lambda) := \sum_ {i = 1} ^ {\infty} \frac {\mu_ {i}}{\mu_ {i} + \lambda}. +$$ + +Consider the following assumption. + +Assumption 12. (Nguyen et al., 2024, Eq. (9) and Remark 13) There exists an absolute constant $C_{\mathrm{df}}$ and a constant $\alpha > 1$ such that $\mathrm{df}(\lambda) \leq C_{\mathrm{df}} \lambda^{-1 / \alpha}$ . There exists a $\beta \geq 1$ , along with an element $\mathsf{S}_{Q_{X,Z}} \in \mathrm{null}(\mathbf{I}_{X,Z})^{\perp}$ , such that + +$$ +\mathsf {R} = \left(\mathbf {S} _ {X, Z} \mathbf {I} _ {X, Z}\right) ^ {\beta} \mathsf {S} _ {Q _ {X, Z}}. +$$ + +The upper bound on $\mathrm{df}(\lambda)$ reflects a polynomial eigendecay of order $\mu_i\sim i^{-\alpha}$ (see Bach (2024, Section 7.6.6)). Asm. 12 is more specific than the one stated in the referenced work, in that we use the specific index function $x\mapsto x^{\beta}$ , growing at least linearly. Furthermore, their result may achieve faster convergence rates than the one stated in Cor. 2 using an additional source condition on the feature map $\varphi$ . However, our intention is not necessarily to provide convergence rates that are optimal in a particular parameter regime, but ones that are informative with regard to the dependence structure of $Q_{X,Z}$ . To this end, we do not incorporate the additional condition. + +To state the result, we define $\lambda_{\star}$ as the solution of + +$$ +\frac {\mathrm {d f} (\lambda)}{\lambda} = N _ {\mathrm {u}}, +$$ + +which is guaranteed to exist as $\frac{\mathrm{df}(\lambda)}{\lambda}$ is decreasing from $+\infty$ to 0 on the interval $(0, +\infty)$ . Observe the following. + +Theorem 8. (Nguyen et al., 2024, Proposition 10 and Lemma 11) Consider a failure probability $\delta \in (0,1]$ and constant $\beta$ + +from Asm. 12. Consider the estimate $\widehat{\mathsf{R}}\equiv \widehat{\mathsf{R}}_{\lambda}$ defined in (45) and the target function $\mathsf{R}$ defined in (2). Finally, define + +$$ +K _ {\mathrm {m a x}} := 1 + \left(4 \kappa_ {\mathrm {m a x}} ^ {2} + \kappa_ {\mathrm {m a x}}\right) ^ {2}. +$$ + +There exists a constant $C > 0$ (independent of $N$ and $\delta$ ) such that for all $\lambda \in [\lambda_{\star}, \kappa_{\max}]$ , + +$$ +\left\| \widehat {R} - R \right\| _ {\mathcal {S}} \leq C \operatorname {p l o g} (1 / \delta) \left[ K _ {\max } \lambda^ {\beta} + \frac {K _ {\max } ^ {1 / 2}}{\lambda} \left(N _ {\mathrm {p}} ^ {- 1 / 2} + N _ {\mathrm {u}} ^ {- 1 / 2}\right) \right] \tag {46} +$$ + +with probability at least $1 - \delta / 2$ . + +By optimizing the bound appearing in (46) in $\lambda$ , we get that + +$$ +\lambda \equiv \lambda_ {N _ {\mathrm {p}}, N _ {\mathrm {u}}} = \left(\frac {N _ {\mathrm {p}} ^ {- 1 / 2} + N _ {\mathrm {u}} ^ {- 1 / 2}}{K _ {\operatorname* {m a x}} ^ {1 / 2}}\right) ^ {\frac {1}{\beta + 1}}. \tag {47} +$$ + +If the expression from (47) falls within $[\lambda_{\star},\kappa_{\max}]$ , this yields the upper bound + +$$ +\left\| \widehat {R} - R \right\| _ {\mathcal {S}} \leq C \operatorname {p l o g} (1 / \delta) \left[ K _ {\max } ^ {\frac {\beta + 2}{2 (\beta + 1)}} \left(N _ {\mathrm {p}} ^ {- 1 / 2} + N _ {\mathrm {u}} ^ {- 1 / 2}\right) ^ {\frac {\beta}{\beta + 1}} \right]. \tag {48} +$$ + +The condition $\lambda_{N_{\mathrm{p}},N_{\mathrm{u}}}\leq \kappa_{\mathrm{max}}$ can be satisfied by taking $(N_{\mathrm{p}},N_{\mathrm{u}})$ sufficiently large. For the condition that $\lambda_{N_{\mathrm{p}},N_{\mathrm{u}}}\geq \lambda_{\star}$ , we find an upper bound on $\lambda_{\star}$ by first deriving an upper bound on $\mathrm{df}(\lambda) / \lambda$ , and then solving the resulting equation in $\lambda$ . By Asm. 12, we have that + +$$ +\frac {\mathrm {d f} (\lambda)}{\lambda} \leq C _ {\mathrm {d f}} \lambda^ {- (\alpha + 1) / \alpha} \Rightarrow \lambda_ {\star} \leq \left(\frac {C _ {\mathrm {d f}}}{N _ {\mathrm {u}}}\right) ^ {\frac {\alpha}{\alpha + 1}}. \tag {49} +$$ + +Viewing the dependence of (47) on $N_{\mathrm{u}}$ , we see that if $\beta \geq (1 - \alpha) / (2\alpha)$ , then there exists $N_{\mathrm{u}}$ large enough such that (47) is greater than the right-hand side of (49). This is always satisfied, as $\alpha > 1$ is required for $\mathbf{S}_{X,Z}\mathbf{I}_{X,Z}$ to be trace class. Thus, we have the following convergence rate. + +Corollary 2. Adopt the setting of Thm. 8. Let $N_{\mathrm{u}}$ be large enough such that (47) is upper bounded by $\kappa_{\max}$ and lower bounded by the right-hand side of (49). Then, for the choice (47), it holds that + +$$ +\left\| \widehat {R} - R \right\| _ {\mathcal {S}} ^ {2} \leq C \operatorname {p l o g} (1 / \delta) \left[ K _ {\max } ^ {\frac {\beta + 2}{\beta + 1}} \left(N _ {\mathrm {p}} ^ {- 1 / 2} + N _ {\mathrm {u}} ^ {- 1 / 2}\right) ^ {\frac {2 \beta}{\beta + 1}} \right]. \tag {50} +$$ + +This result is applied in Appx. D.2 and provides an example of the "information density" approach outlined in Sec. 2 and Sec. 3. In the sequel, we will simply assume that $N_{\mathrm{p}} = N_{\mathrm{u}} = N / 2$ to simplify the statement of the result. Finally, note that the source condition Asm. 12 does not have any implications for the mis-specified case (R $\notin S$ ). This aspect of Radon-Nikodym estimation methodology is still an active area of research in statistical learning. + +# C. Prompt Bias and Residual Dependence + +This appendix is dedicated to the proof of Thm. 1, which controls the population quantity $\| \eta_{\star} - \eta_{\rho}\|_{\mathbf{L}^2 (P_X)}^2$ . The result will follows from Thm. 9, which is a more mathematically precise version of Thm. 1 from the main text. + +We recall the problem setting of Sec. 3. We consider the three central probability measures $P_{X,Y}$ (evaluation distribution), $Q_{X,Z}$ (pre-training distribution), and $\rho_{Y,Z}$ (prompt distribution). We notice that $\eta_{\star}$ (from (3)) depends on $P_{X,Y}$ , while $\eta_{\rho}$ (from (4)) depends on the pair $(Q_{X,Z}, \rho_{Y,Z})$ . Neither component of this term depends on a joint probability over $\mathcal{X} \times \mathcal{Y} \times \mathcal{Z}$ . Thus, in order to relate them on common ground, we consider a joint probability measure $P_{X,Y,Z}$ , which satisfies certain constraints that make it compatible with the distributions that have observable data. We call this the latent caption model. + +To proceed, we will need to make several mild regularity conditions on $P_{X,Y,Z}$ . We use the notion of regular conditional distribution, or r.c.d. (Definition 4), introduced in Appx. B.1. We use more explicit notation in this section (e.g. $Z = z$ ) as + +compared to Sec. 3 to emphasize the random variable being conditioned on. The assumption below provides a more formal description of Asm. 1 from Sec. 3. + +Assumption 13. The joint probability $P_{X,Y,Z}$ on $\mathcal{X} \times \mathcal{Y} \times \mathcal{Z}$ satisfies the following constraints. + +- Agrees jointly with the evaluation distribution: For all measurable sets $A \subseteq \mathcal{X} \times \mathcal{Y}$ , we have that $P_{X,Y,Z}(A \times \mathcal{Z}) = P_{X,Y}(A)$ (i.e. $P_{X,Y,Z}$ agrees with the given marginal $P_{X,Y}$ ). +- Agrees conditionally with the pre-training distribution: There exists a measurable set $\mathcal{X}_1 \subseteq \mathcal{X}$ with $P_X(\mathcal{X}_1) = 1$ such that the regular conditional distributions $Q_{Z|X = x}$ and $P_{Z|X = x}$ on $\mathcal{Z}$ exist. Furthermore, these satisfy $Q_{Z|X = x} = P_{Z|X = x}$ for all $x \in \mathcal{X}_1$ . +- Regularity of conditional distributions: There exists a measurable set $\mathcal{Z}_1 \subseteq \mathcal{Z}$ with $P_Z(\mathcal{Z}_1) = 1$ such that the regular conditional distributions $P_{X,Y|Z = z}$ on $\mathcal{X} \times \mathcal{Y}$ exists for all $z \in \mathcal{Z}_1$ . Furthermore, we have the absolute continuity relation $P_{X,Y|Z = z} \ll P_{X|Z = z} \otimes P_{Y|Z = z}$ with Radon-Nikodym derivative + +$$ +\mathrm {S} _ {z} := \frac {\mathrm {d} P _ {X , Y \mid Z = z}}{\mathrm {d} \left(P _ {X \mid Z = z} \otimes P _ {Y \mid Z = z}\right)}, \tag {51} +$$ + +that satisfies $\mathbb{E}_{P_{X,Y|Z = z}}[\mathsf{S}_z(X,Y)] < +\infty$ for each $z \in \mathcal{Z}_1$ and $\mathbb{E}_{P_{X,Y,Z}}[\mathsf{S}_Z(X,Y)] < +\infty$ . + +That $P_{X,Y,Z}$ marginalizes to $P_{X,Y}$ is more of an axiomatic property than an assumption, but we phrase it as so to emphasize that $P_{X,Y,Z}$ is meant to describe the evaluation distribution. The assumption that the conditionals $Q_{Z|X}$ and $P_{Z|X}$ match almost surely represents the viewpoint that, after fixing an image $\pmb{x}$ , the latent caption $Z|X = \pmb{x}$ follows the same relationship to $\pmb{x}$ as seen during pre-training. Importantly, this does not require or imply that $P_{X} = Q_{X}$ or that $P_{Z} = Q_{Z}$ . The marginal distribution $P_{X}$ is supplied entirely by the evaluation distribution $P_{X,Y}$ , as for any measurable set $A \subseteq \mathcal{X}$ , we have by definition that $P_{X}(A) = P_{X,Y}(A \times \mathcal{Y})$ . On the other hand, the marginal $P_{Z}$ can be defined using the Markov kernel $P_{Z|X = x}$ , in that for any measurable $B \subseteq \mathcal{Z}$ , it holds that + +$$ +P _ {Z} (B) := \int_ {\mathcal {X} _ {1}} P _ {Z | X = \boldsymbol {x}} (B) \mathrm {d} P _ {X} (\boldsymbol {x}) = \int_ {\mathcal {X} _ {1}} Q _ {Z | X = \boldsymbol {x}} (B) \mathrm {d} P _ {X} (\boldsymbol {x}). +$$ + +Finally, the absolute continuity condition, i.e., the existence of (51), rules out degeneracies such as $Y$ being a deterministic function of $X$ given $Z = z$ (outside of a set of $P_Z$ -measure zero). It is also worth pointing out that the first two conditions Asm. 13 do not contradict one another. For example, one can consider $P_{X,Y,Z}$ that satisfies the Markov chain $Y \to X \to Z$ where $(X,Y)$ is drawn according to $P_{X,Y}$ , and $Z$ and $Y$ are conditionally independent given $X$ . Then, informally, we have that $P_{Z|X,Y} = P_{Z|X} = Q_{Z|X}$ , so $P_{X,Y,Z}$ is uniquely determined. While this example implies the existence of a valid joint probability measure $P_{X,Y,Z}$ , it is also, in a sense, showcasing the "least desirable" distribution for zero-shot prediction, as the dependence between $X$ and $Z$ does not provide any additional information about $Y$ . + +We recall some notation from Sec. 3. Let + +$$ +g _ {P _ {Y, Z}} (\boldsymbol {z}) = \mathbb {E} _ {P _ {Y, Z}} \left[ r (Y) | Z \right] (\boldsymbol {z}). +$$ + +Note that $g_{P_{Y,Z}}$ is simply a conditional expectation constructed via Definition 3, and does not require the existence of an r.c.d. $P_{Y|Z = z}$ . In the bound, we will encounter a prompt bias term that compares $g_{P_{Y,Z}}$ to $g_{\rho}$ from (5). This reflects the notion that if $P_{X,Y,Z}$ agrees with two of the three fundamental distributions governing the problem, it will not be able to agree with the prompt distribution $\rho_{Y,Z}$ in general. Finally, the r.c.d. $P_{X,Y|Z = z}$ allows us to measure conditional dependence using the conditional mean squared contingency, defined by the formula + +$$ +I (X; Y | Z = \boldsymbol {z}) = \mathbb {E} _ {P _ {X | Z = \boldsymbol {z}} \otimes P _ {Y | Z = \boldsymbol {z}}} \left[ (1 - \mathsf {S} _ {\boldsymbol {z}} (Y, X)) ^ {2} \right]. +$$ + +As is shown in the proof, $I(X;Y|Z = z)$ and its expectation over $P_Z$ are well-defined under Asm. 13. We are now ready to state the result. + +Theorem 9. Assume that $r$ is bounded in absolute value by $B_r$ . Under Asm. 13, it holds that Then, it holds that + +$$ +\left\| \eta_ {\rho} - \eta_ {\star} \right\| _ {\mathbf {L} ^ {2} \left(P _ {X}\right)} ^ {2} \leq 2 \underbrace {\left\| g _ {\rho} - g _ {P _ {Y , Z}} \right\| _ {\mathbf {L} ^ {2} \left(P _ {Z}\right)} ^ {2}} _ {\text {p r o m p t b i a s}} + 2 B _ {r} ^ {2} \underbrace {\mathbb {E} _ {P _ {Z}} [ I (X ; Y | Z) ]} _ {\text {r e s i d u a l d e p e n d e n c e}}. \tag {52} +$$ + +Proof. We first establish a useful representation of the conditional mean of $r(Y)$ given $X = x$ , in terms of the (conditional) information density from Lem. 5. Fix $x \in \mathcal{X}_1$ and $z \in \mathcal{Z}_1$ , the sets on which the regular conditional distributions $P_{Z|X = x}$ and $P_{X,Y|Z = z}$ are defined (see Asm. 13). Because of the existence the Radon-Nikodym derivative $S_z$ from (51), we may apply Lem. 5 with $U = Y$ , $V = X$ , and $h = r$ to write + +$$ +\mathbb{E}_{P_{X,Y|Z = z}}\left[r(Y)|X\right](\boldsymbol {x}) = \underbrace{\mathbb{E}_{P_{Y|Z = z}}\left[r(Y)\mathsf{S}_{\boldsymbol{z}}(Y,\boldsymbol{x})\right]}_{=: f(\boldsymbol {x},\boldsymbol {z})}\text{for all} (\boldsymbol {x},\boldsymbol {z})\in \mathcal{X}_{1}\times \mathcal{Z}_{1}. +$$ + +The chosen notation $\mathbb{E}_{P_{X,Y|Z = z}}[r(Y)|X](\pmb {x})$ indicates that after fixing the probability measure $P_{X,Y|Z = z}$ , we take the conditional expectation of the function $r\in \mathbf{L}^2 (P_{Y|Z = z})$ via Definition 3, which does not necessarily posit the existence of the r.c.d. $P_{Y|X = x,Z = z}$ .4 We have denoted the right-hand side by the function $f(\pmb {x},\pmb {z})$ . Integrate both sides over $P_{Z|X = x}$ then use the tower property of conditional expectation (Lem. 2) to achieve + +$$ +\begin{array}{l} \eta_ {\star} (\boldsymbol {x}) = \mathbb {E} _ {P _ {X, Y}} [ r (Y) | X ] (\boldsymbol {x}) = \int_ {\mathbb {Z}} \mathbb {E} _ {P _ {X, Y \mid Z = \boldsymbol {z}}} [ r (Y) | X ] (\boldsymbol {x}) \mathrm {d} P _ {Z \mid X = \boldsymbol {x}} (\boldsymbol {z}) \\ = \int_ {\mathbb {Z}} f (\boldsymbol {x}, \boldsymbol {z}) \mathrm {d} P _ {Z | X = \boldsymbol {x}} (\boldsymbol {z}) \\ = \mathbb {E} _ {P _ {Z \mid X = x}} [ f (\boldsymbol {x}, Z) ]. \tag {53} \\ \end{array} +$$ + +Using the identity (53) and $Q_{Z|X = x} = P_{Z|X = x}$ on $x \in \mathcal{X}_1$ (Asm. 13), we write + +$$ +\begin{array}{l} \eta_ {\rho} (\boldsymbol {x}) - \eta_ {\star} (\boldsymbol {x}) \\ = \mathbb {E} _ {Q _ {Z | X = x}} \left[ g _ {\rho} (Z) \right] - \mathbb {E} _ {P _ {Z | X = x}} \left[ f (\boldsymbol {x}, Z) \right] \\ = \mathbb {E} _ {P _ {Z | X = x}} \left[ g _ {\rho} (Z) \right] - \mathbb {E} _ {P _ {Z | X = x}} \left[ f (\boldsymbol {x}, Z) \right] \\ = \mathbb {E} _ {P _ {Z | X = \boldsymbol {x}}} \left[ \left(g _ {\rho} (Z) - g _ {P _ {Y, Z}} (Z)\right) \right] + \mathbb {E} _ {P _ {Z | X = \boldsymbol {x}}} \left[ \left(g _ {P _ {Y, Z}} (Z) - f (\boldsymbol {x}, Z)\right) \right]. \\ \end{array} +$$ + +Taking the integral over $P_{X}$ , we have by the decomposition above that + +$$ +\begin{array}{l} \left\| \eta_ {\rho} - \eta_ {\star} \right\| _ {\mathbf {L} ^ {2} \left(P _ {X}\right)} ^ {2} = \int_ {\mathcal {X}} \left(\eta_ {\rho} (\boldsymbol {x}) - \eta_ {\star} (\boldsymbol {x})\right) ^ {2} \mathrm {d} P _ {X} (\boldsymbol {x}) \\ \leq 2 \int_ {\mathcal {X} _ {1}} \left(\mathbb {E} _ {P _ {Z | X = x}} \left[ g _ {\rho} (Z) - g _ {P _ {Y, Z}} (Z) \right]\right) ^ {2} \mathrm {d} P _ {X} (\boldsymbol {x}) (54) \\ + 2 \int_ {\mathcal {X} _ {1}} \left(\mathbb {E} _ {P _ {Z | X = x}} \left[ g _ {P _ {Y, Z}} (Z) - f (\boldsymbol {x}, Z) \right]\right) ^ {2} \mathrm {d} P _ {X} (\boldsymbol {x}). (55) \\ \end{array} +$$ + +To handle (54), we apply Jensen's inequality for each r.c.d. $P_{Z|X = x}$ to achieve + +$$ +\begin{array}{l} \int_ {\mathcal {X} _ {1}} \left(\mathbb {E} _ {P _ {Z | X = x}} \left[ \left(g _ {\rho} (Z) - g _ {P _ {Y, Z}} (Z)\right) \right]\right) ^ {2} \mathrm {d} P _ {X} (\boldsymbol {x}) \leq \int_ {\mathcal {X} _ {1}} \mathbb {E} _ {P _ {Z | X = x}} \left[ \left(g _ {\rho} (Z) - g _ {P _ {Y, Z}} (Z)\right) ^ {2} \right] \mathrm {d} P _ {X} (\boldsymbol {x}) \\ = \mathbb {E} _ {P _ {Z}} \left[ \left(g _ {\rho} (Z) - g _ {P _ {Y, Z}} (Z)\right) ^ {2} \right] \\ = \left\| g _ {\rho} - g _ {P _ {Y, Z}} \right\| _ {\mathbf {L} ^ {2} (P _ {Z})} ^ {2}. \\ \end{array} +$$ + +It remains to control (55). Applying Jensen's inequality for each r.c.d. $P_{Z|X = x}$ once again, we have that + +$$ +\begin{array}{l} \int_ {\mathcal {X} _ {1}} \left(\mathbb {E} _ {P _ {Z | X = \boldsymbol {x}}} \left[ \left(g _ {P _ {Y, Z}} (Z) - f (\boldsymbol {x}, Z)\right) \right]\right) ^ {2} \mathrm {d} P _ {X} (\boldsymbol {x}) \leq \int_ {\mathcal {X} _ {1}} \left(\mathbb {E} _ {P _ {Z | X = \boldsymbol {x}}} \left[ \left(g _ {P _ {Y, Z}} (Z) - f (\boldsymbol {x}, Z)\right) ^ {2} \right]\right) \mathrm {d} P _ {X} (\boldsymbol {x}) \\ = \mathbb {E} _ {P _ {X, Z}} \left[ \left(g _ {P _ {Y, Z}} (Z) - f (X, Z)\right) ^ {2} \right] \\ = \int_ {\mathcal {Z} _ {1}} \mathbb {E} _ {P _ {X \mid Z = z}} \left[ \left(g _ {P _ {Y, Z}} (\boldsymbol {z}) - f (X, \boldsymbol {z})\right) ^ {2} \right] \mathrm {d} P _ {Z} (\boldsymbol {z}), \tag {56} \\ \end{array} +$$ + +where the last step follows due to the existence of the r.c.d. $P_{X|Z = z}$ for $\pmb {z}\in \mathcal{Z}_1$ , as $P_{X|Z = z}(A)\coloneqq P_{X,Y|Z = z}(A\times \mathcal{Y})$ for every measurable $A\subseteq \mathfrak{X}$ , and the latter exists by assumption. Using the definition of $g_{P_{Y,Z}}$ , write + +$$ +g _ {P _ {Y, Z}} (\boldsymbol {z}) - f (\boldsymbol {x}, \boldsymbol {z}) = \mathbb {E} _ {P _ {Y \mid Z = \boldsymbol {z}}} [ r (Y) (1 - \mathsf {S} _ {\boldsymbol {z}} (Y, \boldsymbol {x})) ]. +$$ + +We may substitute this expression into the integrand of (56) and apply Jensen's inequality to $P_{Y|Z = z}$ to achieve + +$$ +\begin{array}{l} \mathbb {E} _ {P _ {X \mid Z = z}} \left[ \left(g _ {P _ {Y, Z}} (\boldsymbol {z}) - f (X, \boldsymbol {z})\right) ^ {2} \right] = \mathbb {E} _ {P _ {X \mid Z = z}} \left[ \left(\mathbb {E} _ {P _ {Y \mid Z = z}} [ r (Y) (1 - \mathsf {S} _ {\boldsymbol {z}} (Y, X)) ]\right) ^ {2} \right] \\ \leq \mathbb {E} _ {P _ {X | Z = z}} \left[ \mathbb {E} _ {P _ {Y | Z = z}} \left[ (r (Y) (1 - \mathsf {S} _ {z} (Y, X))) ^ {2} \right] \right] \\ \leq \| r \| _ {\infty} ^ {2} \mathbb {E} _ {P _ {X \mid Z = z}} \left[ \mathbb {E} _ {P _ {Y \mid Z = z}} \left[ (1 - \mathsf {S} _ {z} (Y, X)) ^ {2} \right] \right] \\ = \| r \| _ {\infty} ^ {2} \mathbb {E} _ {P _ {X \mid Z = z} \otimes P _ {Y \mid Z = z}} \left[ (1 - \mathrm {S} _ {z} (Y, X)) ^ {2} \right], \\ \end{array} +$$ + +where the final step follows by applying Fubini's theorem (Schilling, 2017, Corollary 14.9) to the product measure $P_{X|Z = z} \otimes P_{Y|Z = z}$ for fixed $z \in \mathcal{Z}_1$ . By the definition of mean squared contingency (Definition 8), it holds that + +$$ +\mathbb {E} _ {P _ {X \mid Z = z} \otimes P _ {Y \mid Z = z}} \left[ (1 - \mathrm {S} _ {z} (Y, X)) ^ {2} \right] = I (X; Y \mid Z = z). \tag {57} +$$ + +After confirming that (57) is $P_Z$ -integrable, substituting this expression back into (56) achieves the desired result. Expand the quadratic term and apply the Radon-Nikodym theorem (Schilling, 2017, Theorem 20.1) to achieve + +$$ +\begin{array}{l} I (X; Y | Z = \boldsymbol {z}) = 1 - 2 \mathbb {E} _ {P _ {X | Z = \boldsymbol {z}} \otimes P _ {Y | Z = \boldsymbol {z}}} \left[ \mathsf {S} _ {\boldsymbol {z}} (Y, X) \right] + \mathbb {E} _ {P _ {X | Z = \boldsymbol {z}} \otimes P _ {Y | Z = \boldsymbol {z}}} \left[ \mathsf {S} _ {\boldsymbol {z}} ^ {2} (Y, X) \right] \\ = 1 - 2 \mathbb {E} _ {P _ {X, Y \mid Z = z}} [ 1 ] + \mathbb {E} _ {P _ {X, Y \mid Z = z}} [ \mathrm {S} _ {z} (Y, X) ] \\ = \mathbb {E} _ {P _ {X, Y \mid Z = z}} \left[ \mathbb {S} _ {z} (Y, X) \right] - 1. \\ \end{array} +$$ + +Thus, by integrating against $P_Z$ , we see that + +$$ +\mathbb {E} _ {P _ {Z}} [ I (X; Y | Z) ] = \mathbb {E} _ {P _ {X, Y, Z}} [ \mathsf {S} _ {Z} (Y, X) ] - 1, +$$ + +where the expectation term is finite by Asm. 13. The proof is complete. + +# D. Sample Complexity and Distribution Mismatch + +This appendix provides the proofs of Thm. 2 and Thm. 3 by way of Thm. 10 and Thm. 11, respectively. To recall the bigger picture, we first applied the decomposition (12), which exposed the estimation error term + +$$ +\left\| \hat {\eta} _ {\rho} - \eta_ {\rho} \right\| _ {\mathbf {L} ^ {2} \left(P _ {X}\right)} ^ {2}, \tag {58} +$$ + +where $P_{X}$ is the $\mathcal{X}$ -marginal of the evaluation distribution $P_{X,Y}$ , $\eta_{\rho}$ is defined by $\eta_{\rho}(\pmb{x}) \coloneqq \mathbb{E}_{Q_{X,Z}}[g_{\rho}(Z)|X](\pmb{x})$ (see (5)), and $\hat{\eta}_{\rho}$ is one of two estimation procedures that is based on either (7) or (8). By using standard change of measure arguments (collected in Appx. D.3), we pass the problem of controlling (58) in high probability to controlling $\| \hat{\eta}_{\rho} - \eta_{\rho}\|_{\mathbf{L}^2(Q_X)}^2$ (i.e. the mean squared error with respect to the pre-training marginal $Q_{X}$ ). Thus, the format of both Thm. 10 and Thm. 11 will be an upper bound on $\| \hat{\eta}_{\rho} - \eta_{\rho}\|_{\mathbf{L}^2(Q_X)}^2$ that holds with an arbitrary failure probability $\delta \in (0,1]$ . + +The identities (7) and (8) from Sec. 2 can be summarized with the equality + +$$ +\mathbf {M} _ {Z \mid X} g _ {\rho} = \eta_ {\rho} = \mathbb {E} _ {\rho_ {Y, Z}} [ r (Y) \mathrm {R} (\cdot , Z) ] + \operatorname {e r r} \left(Q _ {Z}, \rho_ {Z}\right), \tag {59} +$$ + +where the $\mathrm{err}(Q_Z,\rho_Z)$ is elaborated on in Appx. D.2. In Appx. D.1, we consider the left-hand side of (59), and define $\hat{\eta}_{\rho}$ by constructing an estimate $\widehat{\mathbf{M}}_{Z|X}$ of $\mathbf{M}_{Z|X}$ using pre-training data and $\hat{g}_{\rho}$ of $g_{\rho}$ using prompts. This will be referred to as the conditional mean approach. In Appx. D.2, we consider the right-hand side of (59) and define $\hat{\eta}_{\rho}$ by using an estimate $\widehat{\mathbf{R}}$ of $\mathsf{R}$ using pre-training data and $\hat{\rho}_{Y,Z}$ of $\rho_{Y,Z}$ using prompts. This will be referred to as the information density approach. For both approaches, we adopt a parallel structure and break the analysis into the following steps. + +1. Decomposing the Global Error: We first provide a generic upper bound on the mean squared error + +$$ +\left\| \hat {\eta} _ {\rho} - \eta_ {\rho} \right\| _ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} ^ {2} \tag {60} +$$ + +in terms of the individual estimators defined by the pre-training and prompting data. While some additional structure may be employed in these bounds (e.g. the estimate lives in a reproducing kernel Hilbert space), the decomposition is generally agnostic to the choice of method and can accommodate multiple estimation/learning strategies. + +2. Interpreting the Source Condition: The error term related to the pre-training data refers to the distance between the conditional mean operators $\widehat{\mathbf{M}}_{Z|X}$ and $\mathbf{M}_{Z|X}$ or the information densities $\widehat{\mathsf{R}}$ and $\mathsf{R}$ measured in an appropriate sense. This is initially controlled by substituting a particular estimation method among those reviewed in Appx. B. As mentioned in Sec. 3, the convergence rates of these methods rely on source conditions that describe the regularity of the target function. We derive expressions that relate the source conditions to measures of dependence between $X$ and $Z$ , so that, in turn, the rate can also be expressed in terms of these fundamental quantities. +3. Controlling the Prompting Term: The error term related to the prompting data will have a high probability bound, which is stated in the form of an assumption. This generality is maintained because the estimation based on the prompting data usually relies on simple primitives such as real-valued regression or finite-dimensional parameter estimation. Statistically, these problems are easier than the vector-valued regression or Radon-Nikodym derivative estimation problems that arise in the pre-training step. Thus, many possible methods can be used, and we provide examples in each case. +4. Completing the Proof: We combine the steps above to state the final bounds on (60). They are stated in Thm. 10 and Thm. 11, respectively. + +The steps above comprise the subsections of Appx. D.1 and Appx. D.2 below. The bounds on mean square error on $Q_{X}$ are tied to misclassification risk on $P_{X,Y}$ via Appx. D.3 and Appx. D.4 to produce end-to-end performance guarantees. We compare the sampling schemes used for prompting that are employed in the theoretical analysis to the sampling schemes used empirically in Appx. D.5. + +# D.1. Conditional Mean Approach + +This approach is based on the LHS of (59) yielding the result of Thm. 2. The exposition relies heavily on the background introduced in Appx. B.4. In particular, we maintain the reproducing kernel Hilbert spaces $\mathcal{H}$ and $\mathcal{G}$ containing real-valued functions on $\mathcal{X}$ and $\mathcal{Z}$ , respectively. We denote by $\mathbf{L}^2(Q_X; \mathcal{G})$ the Bochner space containing equivalence classes of functions mapping from $\mathcal{X}$ to $\mathcal{G}$ . We also use the bracket notation $[\cdot]_X$ to index a function's equivalence class in $\mathbf{L}^2(Q_X)$ (or $\mathbf{L}^2(Q_X; \mathcal{G})$ for $\mathcal{G}$ -valued functions). + +Setup. We first introduce an element $F_{\star}$ of $\mathbf{L}^2 (Q_X;\mathcal{G})$ which can be used to represent the function $\pmb {x}\mapsto [\mathbf{M}_{Z|X}g_{\rho}](\pmb {x})$ We then describe how an estimator $\widehat{F}$ of $F_{\star}$ and an approximation $\hat{g}_{\rho}$ of $g_{\rho}$ can be used to define an estimated predictor $\hat{\eta}_{\rho}$ Recall the boundedness assumptions $\sup_{\pmb {x},\pmb{x}'\in \mathbb{X}}k(\pmb {x},\pmb{x}')\leq k_{\max} < \infty$ and $\sup_{\pmb {z},\pmb{z}'\in \mathbb{Z}}l(\pmb {z},\pmb{z}')\leq l_{\max} < \infty$ + +Lemma 8. It holds that 1) $[\eta_{\rho}]_X \in \mathbf{L}^2(Q_X)$ , and 2) there exists a function $F_{\star}: \mathcal{X} \to \mathcal{G}$ such that $[F_{\star}]_X \in \mathbf{L}^2(Q_X; \mathcal{G})$ and + +$$ +\left[ \mathbb {E} _ {Q _ {X, Z}} [ g (Z) | X ] (\cdot) \right] _ {X} = \left[ \langle g, F _ {\star} (\cdot) \rangle_ {\mathcal {G}} \right] _ {X} f o r a l l g \in \mathcal {G}. \tag {61} +$$ + +In particular, $[\eta_{\rho}]_X = [\langle g_{\rho}, F_{\star}(\cdot) \rangle_{\mathcal{G}}]_X$ . + +Proof. Using the notation from Appx. B.1, if we show that the random variable $\omega \mapsto g_{\rho}(Z(\omega))$ is contained in $\mathsf{L}^2 (\mathcal{F})$ , then the first claim holds by the definition of conditional expectation in $\mathbf{L}^2 (Q_X)$ (see Definition 3). Using the reproducing property of the RKHS $\mathcal{G}$ , we have that + +$$ +\mathbb {E} _ {Q _ {Z}} \left[ g _ {\rho} ^ {2} (Z) \right] = \mathbb {E} _ {Q _ {Z}} \left[ \langle g _ {\rho}, \psi (Z) \rangle_ {\mathcal {G}} ^ {2} \right] \leq \| g _ {\rho} \| _ {\mathcal {G}} ^ {2} \cdot \mathbb {E} _ {Q _ {Z}} \| \psi (Z) \| _ {\mathcal {G}} ^ {2} \leq l _ {\max } \| g _ {\rho} \| _ {\mathcal {G}} ^ {2}, \tag {62} +$$ + +granting the claim that $[\eta_{\rho}]_X \in \mathbf{L}^2(Q_X)$ . Next, fix any $x \in \mathcal{X}$ , and define the map + +$$ +g \mapsto T _ {\boldsymbol {x}} (g) = \left[ \mathbf {M} _ {Z | X} g \right] (\boldsymbol {x}) = \mathbb {E} _ {Q _ {X, Z}} [ g (Z) | X ] (\boldsymbol {x}). +$$ + +By the same argument as (62), we have that $|T_{\pmb{x}}(g)| \leq \sqrt{l_{\max}} \| g \|_{\mathcal{G}}$ , indicating that $T_{\pmb{x}}$ is a bounded linear functional. By the Riesz representation theorem, there exists an element of $\mathcal{G}$ , denoted as $\mathbb{E}_{Q_{X,Z}}[\psi(Z)|X](\pmb{x})$ , that satisfies + +$$ +\mathbb {E} _ {Q _ {X, Z}} [ g (Z) | X ] (\boldsymbol {x}) = \left\langle g, \mathbb {E} _ {Q _ {X, Z}} [ \psi (Z) | X ] (\boldsymbol {x}) \right\rangle_ {\mathcal {G}} \text {f o r a l l} g \in \mathcal {G}. +$$ + +Next, given the collection of Riesz representatives $\{\mathbb{E}_{Q_{X,Z}}[\psi (Z)|X](\pmb {x}): \pmb {x} \in \mathfrak{X}\}$ , one may construct the mapping + +$$ +F _ {\star}: \mathcal {X} \rightarrow \mathcal {G}, \text {d e f i n e d b y} \boldsymbol {x} \mapsto F _ {\star} (\boldsymbol {x}) = \mathbb {E} _ {Q _ {X, Z}} [ \psi (Z) | X ] (\boldsymbol {x}) \in \mathcal {G}. +$$ + +It only remains to show that $[F_{\star}]_X \in \mathbf{L}^2(Q_X; \mathcal{G})$ . By Jensen's inequality and the tower property (Lem. 2), we have that + +$$ +\int_ {\mathcal {X}} \| F _ {\star} (\boldsymbol {x}) \| _ {\mathcal {G}} ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x}) \leq \mathbb {E} _ {Q _ {Z}} \| \psi (Z) \| _ {\mathcal {G}} ^ {2} \leq l _ {\max } < \infty , +$$ + +completing the proof. + +Now that we have identified the vector-valued function of interest, $F_{\star}$ , we can consider an estimation procedure that will return $\widehat{F} \equiv \widehat{F}_{\lambda}$ , with $[\widehat{F}]_X \in \mathbf{L}^2(Q_X; \mathcal{G})$ and regularization parameter $\lambda > 0$ . Then, we may define the estimator $\hat{\eta}_{\rho}$ of $\eta_{\rho}$ via the inner product + +$$ +\hat {\eta} _ {\rho} (\boldsymbol {x}) = \left\langle \hat {g} _ {\rho}, \widehat {F} (\boldsymbol {x}) \right\rangle_ {\mathcal {G}}, \tag {63} +$$ + +where $\hat{g}_{\rho}$ satisfies some approximation bound with respect to $g_{\rho}$ . Our decomposition will expose an error term for which we can apply Thm. 7, which describes the convergence rate of spectral regularization learning. + +# D.1.1. DECOMPOSING THE GLOBAL ERROR + +Returning to the original quantity we wish to control from (58), we apply the following decomposition. + +Lemma 9 (Error Decomposition). For any choice of $\widehat{F} \in \mathbf{L}^2(Q_X; \mathcal{G})$ it holds that + +$$ +\begin{array}{l} \| \hat {\eta} _ {\rho} - \eta_ {\rho} \| _ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2} \leq 3 \| g _ {\rho} \| _ {\mathcal {G}} ^ {2} \cdot \| \widehat {F} - F _ {\star} \| _ {\mathbf {L} ^ {2} (Q _ {X}; \mathcal {G})} ^ {2} + 3 \| F _ {\star} \| _ {\mathbf {L} ^ {2} (Q _ {X}; \mathcal {G})} ^ {2} \cdot \| \hat {g} _ {\rho} - g _ {\rho} \| _ {\mathcal {G}} ^ {2} \\ + 3 \| \hat {g} _ {\rho} - g _ {\rho} \| _ {\mathcal {G}} ^ {2} \cdot \| \widehat {F} - F _ {\star} \| _ {\mathbf {L} ^ {2} (Q _ {X}; \mathcal {G})} ^ {2}, \\ \end{array} +$$ + +Proof. Using the reproducing property of the RKHS $\mathcal{G}$ and Young's inequality we have that + +$$ +\begin{array}{l} \| \hat {\eta} _ {\rho} - \eta_ {\rho} \| _ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2} \\ = \int_ {\mathcal {X}} (\hat {\eta} _ {\rho} (\pmb {x}) - \eta_ {\rho} (\pmb {x})) ^ {2} \mathrm {d} Q _ {X} (\pmb {x}) \\ \leq 3 \int_ {\mathcal {X}} \left\langle g _ {\rho}, \widehat {F} (\boldsymbol {x}) - F _ {\star} (\boldsymbol {x}) \right\rangle_ {\mathcal {G}} ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x}) + 3 \int_ {\mathcal {X}} \left\langle \widehat {F} (\boldsymbol {x}), \hat {g} _ {\rho} - g _ {\rho} \right\rangle_ {\mathcal {G}} ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x}) \\ + 3 \int_ {\mathcal {X}} \langle \widehat {F} (\pmb {x}) - F _ {\star} (\pmb {x}), \hat {g} _ {\rho} - g _ {\rho} \rangle_ {\mathcal {G}} ^ {2} \mathrm {d} Q _ {X} (\pmb {x}). \\ \end{array} +$$ + +Then, applying the Cauchy-Schwarz inequality in $\mathcal{G}$ , we have that + +$$ +\begin{array}{l} \left\| \hat {\eta} _ {\rho} - \eta_ {\rho} \right\| _ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} ^ {2} \\ \leq 3 \| g _ {\rho} \| _ {\mathcal {G}} ^ {2} \cdot \int_ {\mathcal {X}} \| \widehat {F} (\boldsymbol {x}) - F _ {\star} (\boldsymbol {x}) \| _ {\mathcal {G}} ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x}) + 3 \left(\int_ {\mathcal {X}} \| F _ {\star} (\boldsymbol {x}) \| _ {\mathcal {G}} ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x})\right) \cdot \| \hat {g} _ {\rho} - g _ {\rho} \| _ {\mathcal {G}} ^ {2} \\ + 3 \| \hat {g} _ {\rho} - g _ {\rho} \| _ {\mathcal {G}} ^ {2} \int_ {\mathcal {X}} \| \widehat {F} (\boldsymbol {x}) - F _ {\star} (\boldsymbol {x}) \| _ {\mathcal {G}} ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x}) \\ = 3 \| g _ {\rho} \| _ {\mathcal {G}} ^ {2} \cdot \| \widehat {F} - F _ {\star} \| _ {\mathbf {L} ^ {2} \left(Q _ {X}; \mathcal {G}\right)} ^ {2} + 3 \| F _ {\star} \| _ {\mathbf {L} ^ {2} \left(Q _ {X}; \mathcal {G}\right)} ^ {2} \cdot \| \hat {g} _ {\rho} - g _ {\rho} \| _ {\mathcal {G}} ^ {2} \tag {64} \\ + 3 \| \hat {g} _ {\rho} - g _ {\rho} \| _ {\mathcal {G}} ^ {2} \cdot \| \widehat {F} - F _ {\star} \| _ {\mathbf {L} ^ {2} (Q _ {X}; \mathcal {G})} ^ {2}, \\ \end{array} +$$ + +the result as desired. + +In the decomposition of Lem. 9, we observe the dominating terms $\| g_{\rho}\|_{\mathcal{G}}^{2}\cdot \| \widehat{F} -F_{\star}\|_{\mathbf{L}^{2}(Q_{X};\mathcal{G})}^{2}$ and $\| F_{\star}\|_{\mathbf{L}^{2}(Q_{X};\mathcal{G})}^{2}\cdot \| \hat{g}_{\rho} - g_{\rho}\|_{\mathcal{G}}^{2}$ , along with the higher order term $\| \hat{g}_{\rho} - g_{\rho}\|_{\mathcal{G}}^{2}\cdot \| \widehat{F} -F_{\star}\|_{\mathbf{L}^{2}(Q_{X};\mathcal{G})}^{2}$ . We consider estimators $\widehat{F}$ and $\hat{g}_{\rho}$ based on kernel regularized learning techniques in order to bound the dominating terms, as a function of $N$ and $M$ . The bounds are optimized individually with respect to the regularization parameters of each learning objective. + +# D.1.2. INTERPRETING THE SOURCE CONDITION + +To approach this, we associate our function of interest $F_{\star} \in \mathbf{L}^{2}(Q_{X};\mathcal{G})$ to an object $\mathbf{C}_{\star} \in \mathrm{HS}(\mathbf{L}^{2}(Q_{X}),\mathcal{G})$ by way of an isometric isomorphism introduced in Thm. 6. This then allows us to derive a convenient formula for the quantity $\| F_{\star}\|_{\beta}$ , which appears in Asm. 10, and relies on the interplay between $\mathcal{H}$ and $\mathbf{L}^2 (Q_X)$ described in Appx. B.4. + +Lemma 10. Let $(g_j)_{j\in J}$ be any orthonormal basis (ONB) of $\mathcal{G}$ and recall the eigenfunctions $([e_{X,i}]_X)_{i\in I}$ from (36). Assuming that $\| F_{\star}\|_{\beta}$ is finite, it holds that + +$$ +\| F _ {\star} \| _ {\beta} ^ {2} = \sum_ {i \in I} \sum_ {j \in J} \mu_ {X, i} ^ {- \beta} \left\langle \mathbf {M} _ {Z | X} [ g _ {j} ] _ {Z}, [ e _ {X, i} ] _ {X} \right\rangle_ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2}. +$$ + +Proof. By the definition of $\| \cdot \|_{\beta}$ , we have that + +$$ +\left\| F _ {\star} \right\| _ {\beta} = \left\| \mathbf {C} _ {\star} \right\| _ {\beta} = \left\| \mathbf {C} _ {\star} \mathbf {T} _ {X} ^ {- \beta / 2} \right\| _ {\mathrm {H S} \left(\mathbf {L} ^ {2} (Q _ {X}), \mathcal {G}\right)} \tag {65} +$$ + +Then, notice that by the eigendecomposition (36), we have that + +$$ +\mathbf {T} _ {X} ^ {- \beta / 2} [ f ] _ {X} = 0 \text {f o r a l l} [ f ] _ {X} \in (\operatorname {c l} (\operatorname {r a n g e} (\mathbf {I} _ {X}))) ^ {\perp} +$$ + +Thus, when computing the (65), we may restrict $\mathrm{HS}(\mathbf{L}^2(Q_X), \mathcal{G})$ to $\mathrm{HS}(\operatorname{cl}(\operatorname{range}(\mathbf{I}_X)), \mathcal{G})$ . This allows us to employ the eigenvectors $([e_{X,i}]_X)_{i \in I}$ as a basis of $\operatorname{cl}(\operatorname{range}(\mathbf{I}_X))$ when computing the norm. We have that + +$$ +\begin{array}{l} \left\| F _ {\star} \right\| _ {\beta} ^ {2} \\ = \| \mathbf {C} _ {\star} \mathbf {T} _ {X} ^ {- \beta / 2} \| _ {\mathrm {H S} (\operatorname {c l} (\operatorname {r a n g e} (\mathbf {I} _ {X})), \mathcal {G})} ^ {2} \\ = \sum_ {i \in I} \sum_ {j \in J} \left\langle g _ {j}, \mathbf {C} _ {\star} \mathbf {T} _ {X} ^ {- \beta / 2} \left[ e _ {X, i} \right] _ {X} \right\rangle_ {\mathcal {G}} ^ {2} \quad (\text {b y}) \\ = \sum_ {i \in I} \sum_ {j \in J} \mu_ {X, i} ^ {- \beta} \left\langle g _ {j}, \mathbf {C} _ {\star} \left[ e _ {X, i} \right] _ {X} \right\rangle_ {\mathcal {G}} ^ {2} (by(36)) \\ = \sum_ {i \in I} \sum_ {j \in J} \mu_ {X, i} ^ {- \beta} \langle \mathbf {C} _ {\star}, g _ {j} \otimes [ e _ {X, i} ] _ {X} \rangle_ {\mathrm {H S} (\mathbf {L} ^ {2} (Q _ {X}), \mathcal {G})} ^ {2} \\ = \sum_ {i \in I} \sum_ {j \in J} \sum_ {k \in J} \sum_ {l \in J} \mu_ {X, i} ^ {- \beta} \left\langle g _ {k} \otimes [ f _ {k} ] _ {X}, g _ {j} \otimes [ e _ {X, i} ] _ {X} \right\rangle_ {\mathrm {H S} \left(\mathbf {L} ^ {2} \left(Q _ {X}\right), \mathcal {G}\right)} \cdot \left\langle g _ {l} \otimes [ f _ {l} ] _ {X}, g _ {j} \otimes [ e _ {X, i} ] _ {X} \right\rangle_ {\mathrm {H S} \left(\mathbf {L} ^ {2} \left(Q _ {X}\right), \mathcal {G}\right)}, (Lem.7) \\ \end{array} +$$ + +where $f_{k}(\pmb {x}) = \langle F_{\star}(\pmb {x}),g_{k}\rangle_{\mathcal{G}} = \mathbb{E}_{Q_{X,Z}}[g_{k}(Z)|X](\pmb {x})$ . Phrased in terms of the conditional mean operator $\mathbf{M}_{Z|X}$ .. + +$\mathbf{L}^2 (Q_Z)\to \mathbf{L}^2 (Q_X)$ , we have that + +$$ +\left[ f _ {k} \right] _ {X} = \mathbf {M} _ {Z \mid X} \left[ g _ {k} \right] _ {Z}. +$$ + +Plugging this into the display above, we have that + +$$ +\begin{array}{l} \left\| F _ {\star} \right\| _ {\beta} ^ {2} \\ = \sum_ {i \in I} \sum_ {j \in J} \sum_ {k \in J} \sum_ {l \in J} \mu_ {X, i} ^ {- \beta} \left\langle g _ {k} \otimes \left(\mathbf {M} _ {Z | X} [ g _ {k} ] _ {Z}\right), g _ {j} \otimes [ e _ {X, i} ] _ {X} \right\rangle_ {\mathrm {H S} \left(\mathbf {L} ^ {2} \left(Q _ {X}\right), \mathcal {G}\right)} \left\langle g _ {l} \otimes \left(\mathbf {M} _ {Z | X} [ g _ {l} ] _ {Z}\right), g _ {j} \otimes [ e _ {X, i} ] _ {X} \right\rangle_ {\mathrm {H S} \left(\mathbf {L} ^ {2} \left(Q _ {X}\right), \mathcal {G}\right)} \\ = \sum_ {i \in I} \sum_ {j \in J} \sum_ {k \in J} \sum_ {l \in J} \mu_ {X, i} ^ {- \beta} \langle g _ {k}, g _ {j} \rangle_ {\mathcal {G}} \langle g _ {l}, g _ {j} \rangle_ {\mathcal {G}} \cdot \left\langle \mathbf {M} _ {Z | X} [ g _ {k} ] _ {Z}, [ e _ {X, i} ] _ {X} \right\rangle_ {\mathbf {L} ^ {2} (Q _ {X})} \left\langle \mathbf {M} _ {Z | X} [ g _ {l} ] _ {Z}, [ e _ {X, i} ] _ {X} \right\rangle_ {\mathbf {L} ^ {2} (Q _ {X})} \\ = \sum_ {i \in I} \sum_ {j \in J} \mu_ {X, i} ^ {- \beta} \left\langle \mathbf {M} _ {Z | X} [ g _ {j} ] _ {Z}, [ e _ {X, i} ] _ {X} \right\rangle_ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2}, \\ \end{array} +$$ + +where the last step follows from the fact that $g_{1}, g_{2}, \ldots$ is an ONB of $\mathcal{G}$ . This completes the proof. + +![](images/4e914b33615b9856f54401086ae35a7d5da7d565f5be17cca9af673e45a41368.jpg) + +It remains to select a choice of the collection $(g_j)_{j\in J}$ . Note that $\left([g_j]_Z\right)_{j\in J}$ does not form an orthonormal system in $\mathbf{L}^2 (Q_Z)$ , due to the distortion of the embedding. However, by explicitly writing the embedding $\mathbf{I}_Z$ (analogous to $\mathbf{I}_X$ introduced in (35)), we can derive one. Consider the singular value decomposition + +$$ +\mathbf {I} _ {Z} = \sum_ {k \in K} \mu_ {Z, k} ^ {1 / 2} \left(\left[ e _ {Z, k} \right] _ {Z} \otimes \left(\mu_ {Z, k} ^ {1 / 2} e _ {Z, k}\right)\right), \tag {66} +$$ + +which is analogous to the one introduced for $\mathbf{I}_X$ in (38). The index set $K$ is smaller in cardinality than $J$ , as the collection $(e_{Z,k})_{k\in K}$ forms an ONB of $\mathrm{null}(\mathbf{I}_Z)^\perp \subseteq \mathcal{G}$ , whereas $(g_j)_{j\in J}$ should be an ONB for all of $\mathcal{G}$ . Thus, we can expand the embedding $[g_j]_Z\in \mathbf{L}^2 (Q_Z)$ into + +$$ +\left[ g _ {j} \right] _ {Z} = \mathbf {I} _ {Z} g _ {j} = \sum_ {k \in K} \mu_ {Z, k} ^ {1 / 2} \left\langle g _ {j}, \mu_ {Z, k} ^ {1 / 2} e _ {Z, k} \right\rangle_ {\mathcal {G}} \left[ e _ {Z, k} \right] _ {Z}. +$$ + +This decomposition allows us to simplify the equality in Lem. 10 further. + +Proposition 3. In the setting of Lem. 10, it holds that + +$$ +\begin{array}{l} \left\| F _ {\star} \right\| _ {\beta} ^ {2} = \sum_ {i \in I} \sum_ {j \in J} \mu_ {X, i} ^ {- \beta} \mu_ {Z, j} \left\langle \mathbf {M} _ {Z | X} [ e _ {Z, j} ] _ {Z}, [ e _ {X, i} ] _ {X} \right\rangle_ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} ^ {2} (67) \\ = \left\| \mathbf {T} _ {X} ^ {- \beta / 2} \mathbf {M} _ {Z | X} \mathbf {T} _ {Z} ^ {1 / 2} \right\| _ {\mathrm {H S} (\mathbf {L} ^ {2} (Q _ {Z}), \mathbf {L} ^ {2} (Q _ {X}))} ^ {2}. (68) \\ \end{array} +$$ + +In particular, $\| F_{\star} \|_0^2 = \| F_{\star} \|_{\mathbf{L}^2(Q_X; \mathcal{G})}^2 = \| \mathbf{M}_{Z|X} \mathbf{T}_Z^{1/2} \|_{\mathrm{HS}(\mathbf{L}^2(Q_Z), \mathbf{L}^2(Q_X))}^2$ . + +Proof. The sequence of functions $(\mu_{Z,k}^{1/2}e_{Z,k})_{k\in K}$ form an ONB of $\mathrm{null}(\mathbf{I}_Z)^\perp \subseteq \mathcal{G}$ . Because $J$ indexes a basis of $\mathcal{G}$ , we have that $K \subseteq J$ . Then, we may complete $(\mu_{Z,k}^{1/2}e_{Z,k})_{k\in K}$ to form the basis $(g_j)_{j\in J}$ of $\mathcal{G}$ , where $g_j = \mu_{Z,j}^{1/2}e_{Z,j}$ for all $j \in K$ and $g_j$ is defined arbitrarily for $j \notin K$ . Plug $(g_j)_{j\in J}$ into the right-hand side of the formula given in Lem. 10 gives (67), the first part of the claim. + +For the second equality, we note that $([e_{X,i}]_X)_{i\in I}$ and $([e_{Z,j}]_Z)_{j\in J}$ form orthonormal bases of $\operatorname{cl}(\operatorname{range}(\mathbf{I}_X))$ and $\operatorname{cl}(\operatorname{range}(\mathbf{I}_Z))$ , respectively. We complete them (using the index sets $\bar{I}$ and $\bar{J}$ ) to form (possibly uncountable) orthonormal bases of $\mathbf{L}^2(Q_X)$ and $\mathbf{L}^2(Q_Z)$ . Then, by the definition of the Hilbert-Schmidt norm, it holds that + +$$ +\begin{array}{l} \| \mathbf {T} _ {X} ^ {- \beta / 2} \mathbf {M} _ {Z | X} \mathbf {T} _ {Z} ^ {1 / 2} \| _ {\mathrm {H S} (\mathbf {L} ^ {2} (Q _ {Z}), \mathbf {L} ^ {2} (Q _ {X}))} ^ {2} = \sum_ {i \in \bar {I}} \sum_ {j \in \bar {J}} \left\langle \mathbf {T} _ {X} ^ {- \beta / 2} \mathbf {M} _ {Z | X} \mathbf {T} _ {Z} ^ {1 / 2} [ e _ {Z, j} ] _ {Z}, [ e _ {X, i} ] _ {X} \right\rangle_ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2} \\ = \sum_ {i \in I} \sum_ {j \in J} \mu_ {X, i} ^ {- \beta} \mu_ {Z, j} \bigl \langle \mathbf {M} _ {Z | X} [ e _ {Z, j} ] _ {Z}, [ e _ {X, i} ] _ {X} \bigr \rangle_ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2}, \\ \end{array} +$$ + +where we used in the second line that $[e_{X,i}]_X\in \mathrm{null}(\mathbf{T}_X^{-\beta /2})$ for $i\in \bar{I}\backslash I$ and $[e_{Z,j}]_Z\in \mathrm{null}(\mathbf{T}_Z^{1 / 2})$ for $j\in \bar{J}\backslash J$ . This gives the (68) and completes the proof. + +It remains to interpret the equality in Prop. 3 to complete the analysis. + +# D.1.3. CONTROLLING THE PROMPTING TERM + +From the decomposition given in Lem. 9, the estimate $\hat{g}_{\rho}$ will be designed as to control the RKHS-norm error $\| \hat{g}_{\rho} - g_{\rho}\|_{\mathcal{G}}^2$ . We phrase the assumption generically, but in a way that is reflective of the convergence rates seen in real-valued nonparametric regression. Recall the probability space $(\Omega ,\mathcal{F},\mathbb{P})$ introduced in Appx. B.1. + +Assumption 14. For constants $\delta \in (0,1], M \geq 1$ , and $\omega_{\rho} \in (1/2,1]$ , there is an event $\mathcal{E}(\delta, M, \omega_{\rho})$ that is independent of the pre-training data $(X_1, Z_1), \ldots, (X_N, Z_N)$ , such that on $\mathcal{E}(\delta, M, \omega_{\rho})$ , + +$$ +\left\| \hat {g} _ {\rho} - g _ {\rho} \right\| _ {\mathcal {G}} ^ {2} \leq C B _ {r} ^ {2} \operatorname {p l o g} (1 / \delta) M ^ {- \frac {2 \omega_ {\rho} - 1}{2 \omega_ {\rho} + 1}}. \tag {69} +$$ + +for a constant $C$ independent of $\delta$ and $M$ . On $(\Omega, \mathcal{F}, \mathbb{P})$ , the event $\mathcal{E}(\delta, M, \omega_{\rho})$ occurs with probability at least $1 - \delta / 2$ . + +The notation $\omega_{\rho}$ is chosen for the constant that determines the convergence rate, because it can be interpreted itself as a source condition constant for a real-valued nonparametric regression framework. Indeed, consider the case in which $\hat{g}_{\rho}$ is computed using kernel ridge regression with parameter $\lambda$ . Via the proof of their Theorem 2, Smale and Zhou (2007) show that with probability at least $1 - \delta / 2$ , + +$$ +\left\| \hat {g} _ {\rho} - g _ {\rho} \right\| _ {\mathcal {G}} \leq C \left(\rho_ {Y, Z}\right) \log (4 / \delta) \left[ \underbrace {B _ {r} M ^ {- 1 / 2} \lambda^ {- 1}} _ {\text {e s t i m a t i o n}} + \underbrace {\lambda^ {\omega_ {\rho} - 1 / 2}} _ {\text {a p p r o x i m a t i o n}} \right], \tag {70} +$$ + +where $C(\rho_{Y,Z})$ is a constant that depends on the prompting measure $\rho_{Y,Z}$ and the choice of kernel. Optimizing the bound yields $\lambda \equiv \lambda_M \sim M^{-1/(2\omega_\rho + 1)}$ , which ultimately leads to the convergence rate (notice the square) in (69). We comment that the choice to control the error in $\hat{g}_\rho$ in $\mathcal{G}$ -norm comes from the vector-valued regression framework, in which the output space of the target function always lies in $\mathbf{L}^2(Q_X; \mathcal{G})$ . In isolation, the mean squared error of $\hat{g}_\rho$ can be controlled both in $\mathbf{L}^2(\rho_Z)$ -norm as well as interpolation norms in between $\mathbf{L}^2(\rho_Z)$ and $\mathcal{G}$ (see Fischer and Steinwart (2020), for instance). Indeed, when applying the decomposition (70) in $\mathbf{L}^2(\rho_Z)$ -norm, Smale and Zhou (2007, Lemma 3) show that the approximation error decays as $\lambda^{\omega_\rho}$ (instead of $\lambda^{\omega_\rho - 1/2}$ ). In this case, the optimum is achieved at $\lambda_M \sim M^{-1/(2\omega_\rho + 2)}$ , so that $\| \hat{g}_\rho - g_\rho \|_{\mathbf{L}^2(\rho_Z)}^2$ enjoys a convergence rate of $M^{-\omega_\rho / (\omega_\rho + 1)}$ . + +# D.1.4. COMPLETING THE PROOF + +We may now prove Thm. 2. Next, we place the requisite conditions on $\beta$ , given eigendecay assumptions on $\mathbf{T}_X$ and $\mathbf{T}_Z$ , and singular decay assumptions on $\mathbf{M}_{Z|X}$ (see Appx. B.2 for a review of these operator decompositions). Under these assumptions, we will have that all operators will have a countably infinite number of non-zero eigenvalues/singular values. + +Assumption 15 (Eigendecay and Singular Decay). Let the eigenvalues of $\mathbf{T}_X$ , eigenvalues of $\mathbf{T}_Z$ , and singular values of $\mathbf{M}_{Z|X}$ be given by $\{\mu_{X,i}\}_{i = 1}^{\infty}$ , $\{\mu_{Z,i}\}_{i = 1}^{\infty}$ , and $\{\sigma_i\}_{i = 1}^{\infty}$ , respectively. There exist positive constants $c, C, \gamma_X, \gamma_Z$ , and $\gamma_{X,Z}$ such that for all $i = 1,2,\ldots$ , we have the inclusions + +$$ +\mu_ {X, i} \in \left[ c i ^ {- \gamma_ {X}}, C i ^ {- \gamma_ {X}} \right], \mu_ {Z, i} \in \left[ c i ^ {- \gamma_ {Z}}, C i ^ {- \gamma_ {Z}} \right], \text {a n d} \sigma_ {i} \in \left[ c i ^ {- \gamma_ {X, Z}}, C i ^ {- \gamma_ {X, Z}} \right]. +$$ + +Assumption 16 (Basis Alignment). There exists a finite index $m \in \mathbb{N}$ and a permutation $\pi : [m] \to [m]$ such that the operator $\mathbf{M}_{Z|X}$ admits the singular value decomposition + +$$ +\mathbf {M} _ {Z | X} = \sum_ {i = 1} ^ {m} \sigma_ {\pi (i)} [ e _ {Z, i} ] _ {Z} \otimes [ e _ {X, i} ] _ {Z} + \sum_ {j = m + 1} ^ {\infty} \sigma_ {i} [ e _ {Z, i} ] _ {Z} \otimes [ e _ {X, i} ] _ {Z}. +$$ + +Asm. 16 allows us to reason about the finiteness of the Hilbert-Schmidt norm $\| \mathbf{T}_X^{-\beta /2}\mathbf{M}_{Z|X}\mathbf{T}_Z^{1 / 2}\|_{\mathrm{HS}(\mathbf{L}^2 (Q_Z),\mathbf{L}^2 (Q_X))}^2$ based on the eigendecays of the various operators introduced in Asm. 15. These will imply a maximal value of the source + +condition constant $\beta$ + +Lemma 11. Under Asm. 15 and Asm. 16, it holds that $\| F_{\star}\|_{\beta} < + \infty$ if and only if + +$$ +\beta < \frac {2 \gamma_ {X , Z} + \gamma_ {Z} - 1}{\gamma_ {X}}. \tag {71} +$$ + +Proof. For ease of presentation, we extend the permutation $\pi$ from Asm. 16 so that $\pi(i) = i$ for all $i \geq m + 1$ . Applying the result from Prop. 3, and using the eigenbases of $\mathbf{T}_X$ and $\mathbf{T}_Z$ , we see that + +$$ +\begin{array}{l} \| F _ {\star} \| _ {\beta} ^ {2} = \| \mathbf {T} _ {X} ^ {- \beta / 2} \mathbf {M} _ {Z | X} \mathbf {T} _ {Z} ^ {1 / 2} \| _ {\mathrm {H S} (\mathbf {L} ^ {2} (Q _ {Z}), \mathbf {L} ^ {2} (Q _ {X}))} ^ {2} \\ \geq \frac {c}{C ^ {\beta}} \sum_ {i = 1} ^ {\infty} \sum_ {j = 1} ^ {\infty} j ^ {- \gamma z} i ^ {\beta \gamma_ {X}} \left\langle \mathbf {M} _ {Z | X} [ e _ {Z, j} ] _ {Z}, [ e _ {X, i} ] _ {X} \right\rangle_ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} ^ {2} (Asm.15) \\ = \frac {c}{C ^ {\beta}} \sum_ {i = 1} ^ {\infty} \sum_ {j = 1} ^ {\infty} \sum_ {k = 1} ^ {\infty} \sum_ {l = 1} ^ {\infty} j ^ {- \gamma z} i ^ {\beta \gamma_ {X}} \sigma_ {\pi (k)} ^ {2} \left\langle [ e _ {Z, k} ] _ {Z}, [ e _ {Z, j} ] _ {Z} \right\rangle_ {\mathbf {L} ^ {2} (Q _ {Z})} \left\langle [ e _ {X, k} ] _ {X}, [ e _ {X, i} ] _ {X} \right\rangle_ {\mathbf {L} ^ {2} (Q _ {X})} \\ \times \langle [ e _ {Z, l} ] _ {Z}, [ e _ {Z, j} ] _ {Z} \rangle_ {\mathbf {L} ^ {2} (Q _ {Z})} \langle [ e _ {X, l} ] _ {X}, [ e _ {X, i} ] _ {X} \rangle_ {\mathbf {L} ^ {2} (Q _ {X})} \\ = \frac {c}{C ^ {\beta}} \left[ \sum_ {i = 1} ^ {m} i ^ {\beta \gamma_ {X} - \gamma_ {Z}} \sigma_ {\pi (i)} ^ {2} + \sum_ {i = m + 1} ^ {\infty} i ^ {\beta \gamma_ {X} - \gamma_ {Z}} \sigma_ {i} ^ {2} \right] (Asm.16) \\ \geq \frac {c}{C ^ {\beta}} \left[ \sum_ {i = 1} ^ {m} i ^ {\beta \gamma x - \gamma z} \sigma_ {\pi (i)} ^ {2} + c \sum_ {i = m + 1} ^ {\infty} i ^ {\beta \gamma x - \gamma z - 2 \gamma x, z} \right], (Asm.15) \\ \end{array} +$$ + +where the rightmost term is finite only if (71) holds. Arguing similarly for the upper bound, we have that + +$$ +\| F _ {\star} \| _ {\beta} ^ {2} \leq \frac {C}{c ^ {\beta}} \left[ \sum_ {i = 1} ^ {m} i ^ {\beta \gamma_ {X} - \gamma_ {Z}} \sigma_ {\pi (i)} ^ {2} + C \sum_ {i = m + 1} ^ {\infty} i ^ {\beta \gamma_ {X} - \gamma_ {Z} - 2 \gamma_ {X, Z}} \right], +$$ + +where we may claim that $\| F_{\star}\|_{\beta}^{2} < + \infty$ if (71) holds. + +We can now wrap together the results of this section. Recalling the estimator $\widehat{F} \equiv \widehat{F}_{\lambda}$ based on vector-valued spectral regularization learning, described in Appx. B.4. The well-specified case refers to the condition that $\beta \geq 1$ , indicating that the RKHS in which $\widehat{F}$ is learned does indeed contain $F_{\star}$ . When $\beta < 1$ , we require more sophisticated tools, namely, vector-valued interpolation spaces. In both cases, after establishing the results above, we capture the sample complexity via Thm. 7 from Appx. B.4. + +Well-Specified Case. Under Asm. 15 and Asm. 16, this implies via Lem. 11 that + +$$ +1 \leq \beta = \left(\frac {2 \gamma_ {X , Z} + \gamma_ {Z} - 1}{\gamma_ {X}}\right) ^ {t} < \frac {2 \gamma_ {X , Z} + \gamma_ {Z} - 1}{\gamma_ {X}}, \text {f o r} t \in [ 0, 1). \tag {72} +$$ + +Thus, we may use the parameter $t \in [0,1)$ to measure the degree to which the upper bound is saturated. This yields the following result, which reflects Thm. 2 from the main text. To state the result, define the quantity + +$$ +q (t) = \left(2 \gamma_ {X, Z} + \gamma_ {Z} - 1\right) ^ {t} \gamma_ {X} ^ {1 - t} \tag {73} +$$ + +and observe the following, which is an immediate consequence of Lem. 9, Thm. 7, and the formula (72). Note that the constant $p$ in Thm. 7 refers to $1 / \gamma_{X}$ in the notation of this section. + +Theorem 10. Consider failure probability $\delta \in (0,1]$ . Let Asm. 14, Asm. 15, Asm. 16, and the conditions of Thm. 7 hold with $\| \mathbf{T}_X^{-1 / 2}\mathbf{M}_{Z|X}\mathbf{T}_Z^{1 / 2}\|_{\mathrm{HS}(\mathbf{L}^2 (Q_Z),\mathbf{L}^2 (Q_X))}^2 < + \infty$ . Then, for $\hat{\eta}_{\rho}$ defined via (63), there exist a constants $t\in [0,1)$ and + +$C \geq 0$ such that with probability at least $1 - \delta$ , + +$$ +\| \hat {\eta} _ {\rho} - \eta_ {\rho} \| _ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2} \lesssim \mathrm {p l o g} (1 / \delta) \left[ N ^ {- \frac {q (t)}{q (t) + 1}} + B _ {r} ^ {2} \| \mathbf {M} _ {Z | X} \mathbf {T} _ {Z} ^ {1 / 2} \| _ {\mathrm {H S}} ^ {2} M ^ {- \frac {2 \omega_ {\rho} - 1}{2 \omega_ {\rho} + 1}} \right] +$$ + +for all $N\geq C\mathrm{plog}(N / \delta)$ . where $\| \cdot \|_{\mathrm{HS}} = \| \cdot \|_{\mathrm{HS}(\mathbf{L}^2 (Q_Z),\mathbf{L}^2 (Q_X))}$ + +The term $\| \mathbf{M}_{Z|X}\mathbf{T}_{Z}^{1 / 2}\|_{\mathrm{HS}}^2$ is equal (via Prop. 3) to the $\| F_{\star}\|_{\mathbf{L}^2 (Q_X;\mathcal{G})}^2$ term from Lem. 9, and is rendered (along with $B_r^2$ as the constant $C(Q_{X,Z})$ in Thm. 2. + +Mis-Specified Case. The first inequality of (72) holds only when $F_{\star}$ is well-specified, or contained in the vector-valued RKHS used in the estimation procedure that defines (43). We may employ the interpolation space machinery from Appx. B.4 to achieve a convergence guarantee in this setting. Recall the constant $\alpha \in [1 / \gamma_X, 1]$ shown in Asm. 10, which is associated to the continuous embedding $\mathbf{I}_X^{\alpha, \infty} : [\mathcal{H}]^\alpha \hookrightarrow \mathbf{L}^\infty(Q_X)$ . This constant describes the RKHS itself, and not the specific target function $F_{\star}$ . The rate of Thm. 10 may still be achieved for function classes that are "not too mis-specified" in the sense of Case 1 from Thm. 7. The inequality (71) provides a sufficient condition for Case 2, that is, when $\beta + 1 / \gamma_X \leq \alpha$ . Indeed, + +$$ +\frac {2 \gamma_ {X , Z} + \gamma_ {Z}}{\gamma_ {X}} \leq \alpha \Rightarrow \beta + 1 / \gamma_ {X} < \frac {(7 1)}{\gamma_ {X}} \leq \alpha . \tag {74} +$$ + +The left-hand side may also be phrased differently as $2\gamma_{X,Z} + \gamma_Z \leq \alpha \gamma_X$ . Thus, we may interpret $\alpha \gamma_X \in [1, \gamma_X]$ as a parameter that controls the mis-specification threshold. Concretely, it becomes easier for $F_\star$ to be mis-specified when: $\gamma_{X,Z}$ is low $((X,Z)$ are highly dependent), $\gamma_Z$ is low (the effective dimension of $Z$ is large), or $\gamma_X$ is high (the effective dimension of the input $X$ is small). Under the sufficient condition (74), along with Asm. 15 and Asm. 16, the best upper bound on the convergence rate in the current mis-specification model (see Thm. 7, Case 2), is then + +$$ +\| \hat {\eta} _ {\rho} - \eta_ {\rho} \| _ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2} \lesssim \mathrm {p l o g} (1 / \delta) \left[ N ^ {- \frac {2 \gamma_ {X , Z} + \gamma_ {Z} - 1}{\alpha \gamma_ {X}}} + B _ {r} ^ {2} \| \mathbf {M} _ {Z | X} \mathbf {T} _ {Z} ^ {1 / 2} \| _ {\mathrm {H S}} ^ {2} M ^ {- \frac {2 \omega_ {\rho} - 1}{2 \omega_ {\rho} + 1}} \right] +$$ + +for $N$ sufficiently large. + +# D.2. Information Density Approach + +This approach is based on the RHS of (59) and yields the result of Thm. 3. Here, we assume that during the pre-training phase, the user produces an estimated function $\widehat{\mathbb{R}}$ , which is an element of a reproducing kernel Hilbert space (RKHS). Unlike in Appx. D.1, where we approximated $g_{\rho}$ using a function $\hat{g}_{\rho}$ (which aligns with the conditional mean viewpoint), the information density viewpoint in this section warrants estimating the mean of a function under $\rho_{Y,Z}$ directly, using samples $(Y_1,Z_1),\ldots ,(Y_M,Z_M)\stackrel {\mathrm{i.i.d}}{\sim}\rho_Z$ . It is also important to point out a slight difference in the sampling model for the pre-training data. In order to define the estimate (45) for our method of choice (and similar Radon-Nikodym derivative estimation techniques), it is typically assumed that we observe data from both distributions in the ratio. In the case of $Q_{X,Z}$ and $Q_{X}\otimes Q_{Z}$ , this corresponds to observing $N_{\mathrm{p}}$ paired examples and $N_{\mathrm{u}}$ unpaired examples such that $N = N_{\mathrm{p}} + N_{\mathrm{u}}$ . For simplicity, we assume that $N_{\mathrm{p}} = N_{\mathrm{u}} = N / 2$ , but remark that the regime in which $N_{\mathrm{u}}\gg N_{\mathrm{p}}$ is an interesting and practically relevant model for future investigations. + +Setup. Let $S$ denote a separable reproducing kernel Hilbert space (RKHS) of real-valued functions on $\mathcal{X} \times \mathcal{Z}$ , with canonical feature map $\varphi: \mathcal{X} \times \mathcal{Z} \to \mathbb{R}$ and reproducing kernel $\kappa: (\mathcal{X} \times \mathcal{Z}) \times (\mathcal{X} \times \mathcal{Z}) \to \mathbb{R}$ . We will express the error in terms of the RKHS norm difference $\|\widehat{\mathsf{R}} - \mathsf{R}\|_S^2$ , among other terms that capture a notion of "distribution mismatch" between the prompting marginal $\rho_Z$ and the pre-training marginal $Q_Z$ . This may also be interpreted as another instance of prompt bias. This error occurs because at prompting time, the user does not necessarily have any data drawn from $Q_Z$ . As before, we maintain $\sup \left\{\kappa(\boldsymbol{x}, \boldsymbol{z}, \boldsymbol{x}', \boldsymbol{z}') : (\boldsymbol{x}, \boldsymbol{z}), (\boldsymbol{x}', \boldsymbol{z}') \in \mathcal{X} \times \mathcal{Z}\right\} \leq \kappa_{\max}$ . + +Recall that the true $\mathsf{R}$ is a kernel for the conditional mean operator when integrated under $Q_{Z}$ (see Lem. 5), but can also be + +related via Lem. 6 to the marginal distribution $\rho_Z$ : + +$$ +\eta_ {\rho} (\boldsymbol {x}) = \mathbb {E} _ {\rho_ {Y, Z}} [ r (Y) \mathsf {R} (\boldsymbol {x}, Z) ] + \int_ {\mathcal {Z}} g _ {\rho} (\boldsymbol {z}) \mathsf {R} (\boldsymbol {x}, \boldsymbol {z}) \left(\mathrm {d} Q _ {Z} (\boldsymbol {z}) - \mathrm {d} \rho_ {Z} (\boldsymbol {z})\right). +$$ + +This motivates the approximation $\hat{\rho}_{Y,Z}$ expressed directly in terms of the prompt distribution, and the estimator + +$$ +\hat {\eta} _ {\rho} (\boldsymbol {x}) = \mathbb {E} _ {\hat {\rho} _ {Y, Z}} [ r (Y) \widehat {\mathrm {R}} (\boldsymbol {x}, Z) ]. \tag {75} +$$ + +Below, we consider the empirical measure + +$$ +\hat {\rho} _ {Y, Z} = \frac {1}{M} \sum_ {j = 1} ^ {M} \delta_ {\left(Y _ {j}, Z _ {j}\right)} \tag {76} +$$ + +so that for fixed $\pmb{x} \in \mathcal{X}$ , (75) reduces to a sample mean. + +# D.2.1. DECOMPOSING THE GLOBAL ERROR + +The estimation error decomposition below will take the two differences into account: between the marginal distributions $Q_{Z}$ and $\rho_{Z}$ and between the joint distribution $\hat{\rho}_{Y,Z}$ and $\rho_{Y,Z}$ . For the latter, we will define random variables that take values in a Hilbert space (specifically, $\mathbf{L}^2(Q_X)$ ). This will allow for controlling deviations between $\hat{\rho}_{Y,Z}$ and $\rho_{Y,Z}$ directly for the test functions being integrated. Define the independent and identically random variables $W_1, \ldots, W_M$ by + +$$ +W _ {j} := r (Y _ {j}) \mathsf {R} (\cdot , Z _ {j}), +$$ + +and the element of $\mathbf{L}^2 (Q_X)$ (interpreted as the expectation) $\mathbb{E}_{\rho_{Y,Z}}[W_1]:\pmb {x}\mapsto \mathbb{E}_{\rho_{Y,Z}}[r(Y_1)\mathsf{R}(\pmb {x},Z_1)]$ + +Lemma 12 (Error Decomposition). Assume the following conditions. + +- $\rho_Z \ll Q_Z$ with $Q_Z$ -square integrable Radon-Nikodym derivative (i.e. $\chi^2(\rho_Z \| Q_Z) < +\infty$ ). +- $\mathsf{R}$ is contained in $\mathbf{L}^2(Q_X \otimes \rho_Z)$ and $\mathbf{L}^2(Q_X \otimes Q_Z)$ . + +Then, it holds that + +$$ +\begin{array}{l} \left\| \hat {\eta} _ {\rho} - \eta_ {\rho} \right\| _ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} ^ {2} \leq 3 B _ {r} ^ {2} \left(\kappa_ {\max } ^ {2} \| \widehat {\mathsf {R}} - \mathsf {R} \| _ {\mathcal {S}} ^ {2} + \| \mathsf {R} \| _ {\mathbf {L} ^ {2} \left(Q _ {X} \otimes Q _ {Z}\right)} ^ {2} \chi^ {2} \left(\rho_ {Z} \| Q _ {Z}\right)\right) \tag {77} \\ + 3 \| \frac {1}{M} \sum_ {j = 1} ^ {M} W _ {j} - \mathbb {E} _ {\rho_ {Y, Z}} [ W _ {1} ] \| _ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2}. \\ \end{array} +$$ + +Proof. Using Lem. 6, we have that for $Q_{X}$ -almost all $\pmb{x} \in \mathcal{X}$ + +$$ +\begin{array}{l} \hat {\eta} _ {\rho} (\boldsymbol {x}) - \eta_ {\rho} (\boldsymbol {x}) = \mathbb {E} _ {\hat {\rho} _ {Y, Z}} [ r (Y) \widehat {\mathsf {R}} (\boldsymbol {x}, Z) ] - \mathbb {E} _ {\rho_ {Y, Z}} [ r (Y) \mathsf {R} (\boldsymbol {x}, Z) ] \\ + \int_ {\mathcal {Z}} g _ {\rho} (\pmb {z}) \mathsf {R} (\pmb {x}, \pmb {z}) \left(\mathrm {d} Q _ {Z} (\pmb {z}) - \mathrm {d} \rho_ {Z} (\pmb {z})\right) \\ = \mathbb {E} _ {\hat {\rho} _ {Y, Z}} [ r (Y) \langle \varphi (\boldsymbol {x}, Z), \widehat {R} - R \rangle ] \\ + \int_ {\mathcal {Y} \times \mathcal {Z}} r (\boldsymbol {y}) \mathsf {R} (\boldsymbol {x}, \boldsymbol {z}) \left(\mathrm {d} \hat {\rho} _ {Y, Z} (\boldsymbol {y}, \boldsymbol {z}) - \mathrm {d} \rho_ {Y, Z} (\boldsymbol {y}, \boldsymbol {z})\right) \\ + \int_ {\mathbb {Z}} g _ {\rho} (\boldsymbol {z}) \mathsf {R} (\boldsymbol {x}, \boldsymbol {z}) \left(\mathrm {d} Q _ {Z} (\boldsymbol {z}) - \mathrm {d} \rho_ {Z} (\boldsymbol {z})\right). \\ \end{array} +$$ + +Then, we have that + +$$ +\begin{array}{l} \left\| \hat {\eta} _ {\rho} - \eta_ {\rho} \right\| _ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} ^ {2} \leq 3 \mathbb {E} _ {Q _ {X}} \left[ \left(\mathbb {E} _ {\hat {\rho} _ {Y, Z}} [ r (Y) \langle \varphi (X, Z), \widehat {\mathrm {R}} - \mathrm {R} \rangle ] ^ {2}\right) \right] (78) \\ + 3 \int_ {\mathcal {X}} \left(\int_ {\mathcal {Y} \times \mathcal {Z}} r (\boldsymbol {y}) \mathrm {R} (\boldsymbol {x}, \boldsymbol {z}) \left(\mathrm {d} \hat {\rho} _ {Y, Z} (\boldsymbol {y}, \boldsymbol {z}) - \mathrm {d} \rho_ {Y, Z} (\boldsymbol {y}, \boldsymbol {z})\right)\right) ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x}) (79) \\ + 3 \int_ {\mathcal {X}} \left(\int_ {\mathcal {Z}} g _ {\rho} (\boldsymbol {z}) \mathrm {R} (\boldsymbol {x}, \boldsymbol {z}) \left(\mathrm {d} Q _ {Z} (\boldsymbol {z}) - \mathrm {d} \rho_ {Z} (\boldsymbol {z})\right)\right) ^ {2} \mathrm {d} Q _ {X} (\boldsymbol {x}). (80) \\ \end{array} +$$ + +To control (78), apply boundedness to achieve + +$$ +\mathbb {E} _ {Q _ {X}} \left[ \left(\mathbb {E} _ {\hat {\rho} _ {Y, Z}} [ r (Y) \langle \varphi (X, Z), \widehat {\mathsf {R}} - \mathsf {R} \rangle ] ^ {2}\right) \right] \leq B _ {r} ^ {2} \kappa_ {\max} ^ {2} \| \widehat {\mathsf {R}} - \mathsf {R} \| _ {\mathcal {S}} ^ {2}. +$$ + +For (79), the term is equal to $\| \frac{1}{M}\sum_{j = 1}^{M}W_{j} - \mathbb{E}_{\rho_{Y,Z}}[W_{1}]\|_{\mathbf{L}^{2}(Q_{X})}^{2}$ by definition of $W_{1},\ldots ,W_{M}$ . For (80), we use that $\rho_Z\ll Q_Z$ and $\| g_{\rho}\|_{\infty}\leq B_r$ and apply the Cauchy-Schwarz inequality on $\mathbf{L}^2 (Q_Z)$ so that + +$$ +\begin{array}{l} \left(\int_ {\mathcal {Z}} g _ {\rho} (\boldsymbol {z}) \mathsf {R} (\boldsymbol {x}, \boldsymbol {z}) \left(\mathrm {d} Q _ {Z} (\boldsymbol {z}) - \mathrm {d} \rho_ {Z} (\boldsymbol {z})\right)\right) ^ {2} \\ = \left(\int_ {\mathcal {Z}} g _ {\rho} (\boldsymbol {z}) \mathsf {R} (\boldsymbol {x}, \boldsymbol {z}) \left(1 - \frac {\mathrm {d} \rho_ {Z}}{\mathrm {d} Q _ {Z}} (\boldsymbol {z})\right) \mathrm {d} Q _ {Z} (\boldsymbol {z})\right) ^ {2} \\ \leq \| r \| ^ {2} \| \mathrm {R} (\boldsymbol {x}, \cdot) \| _ {\mathbf {L} ^ {2} (Q _ {Z})} ^ {2} \underbrace {\int_ {Z} \left(1 - \frac {\mathrm {d} \rho_ {Z}}{\mathrm {d} Q _ {Z}} (\boldsymbol {z})\right) ^ {2} \mathrm {d} Q _ {Z} (\boldsymbol {z})} _ {\chi^ {2} (\rho_ {Z} \| Q _ {Z})}. \\ \end{array} +$$ + +Taking the expectation over $Q_{X}$ gives $\mathbb{E}_{Q_X}\| \mathsf{R}(X,\cdot)\|_{\mathbf{L}^2 (Q_Z)}^2 = \| \mathsf{R}\|_{\mathbf{L}^2 (Q_X\otimes Q_Z)}^2$ and completes the proof. + +Given the decomposition shown in Lem. 12, it remains to bound both the error term $\| \widehat{\mathsf{R}} -\mathsf{R}\| _S^2$ regarding the estimated Radon-Nikodym derivative $\widehat{\mathsf{R}}$ , and the approximation term $\| \frac{1}{M}\sum_{j = 1}^{M}W_{j} - \mathbb{E}_{\rho_{Y,Z}}[W_1]\|_{\mathbf{L}^2 (Q_X)}^2$ . We will employ Cor. 2 to this end. Unlike the arguments of Appx. D.1, there is only a single kernel regularized learning algorithm at play, that is, for the estimation of $\widehat{\mathsf{R}}$ . We proceed to interpret the source condition Asm. 12. + +# D.2.2. INTERPRETING THE SOURCE CONDITION + +To proceed, we introduce some notation related to $\mathbf{L}^2(Q_X \otimes Q_Z)$ and the RKHS $\mathcal{S}$ . These objects are also introduced in Appx. B.4, so we review their properties briefly. Let $[h]_{\sim}$ index the equivalence class in $\mathbf{L}^2(Q_X \otimes Q_Z)$ for a square-integrable function $h: \mathcal{X} \times \mathcal{Z} \to \mathbb{R}$ . This indexing can also be identified with an embedding operator $\mathbf{I}_{X,Z}: \mathcal{S} \to \mathbf{L}^2(Q_X \otimes Q_Z)$ , which is Hilbert-Schmidt under the boundedness of the kernel $\kappa$ by $\kappa_{\max}$ . Letting $\mathbf{S}_{X,Z} = \mathbf{I}_{X,Z}^{*}: \mathbf{L}^2(Q_X \otimes Q_Z) \to \mathcal{S}$ be its adjoint, we have that $\mathbf{I}_{X,Z}\mathbf{S}_{X,Z}: \mathbf{L}^2(Q_X \otimes Q_Z) \to \mathbf{L}^2(Q_X \otimes Q_Z)$ and $\mathbf{S}_{X,Z}\mathbf{I}_{X,Z}: \mathcal{S} \to \mathcal{S}$ are compact, trace class operators. These form the analogs of $(\mathbf{T}_X, \mathbf{T}_Z)$ and $(\mathbf{C}_X, \mathbf{C}_Z)$ , respectively, from Appx. B.4. Via Thm. 4, we write the eigendecomposition + +$$ +\mathbf {I} _ {X, Z} \mathbf {S} _ {X, Z} = \sum_ {i \in I} \mu_ {i} \langle \cdot , [ e _ {i} ] _ {\sim} \rangle_ {\mathbf {L} ^ {2} \left(Q _ {X} \otimes Q _ {Z}\right)} [ e _ {i} ] _ {\sim}, \tag {81} +$$ + +where we may take each representative $e_i$ as an element of $\mathcal{S}$ (Steinwart and Scovel, 2012, Lemma 2.12). Then, we also have that + +$$ +\mathbf {S} _ {X, Z} \mathbf {I} _ {X, Z} = \sum_ {i \in I} \mu_ {i} \langle \cdot , \mu_ {i} ^ {1 / 2} e _ {i} \rangle_ {\mathcal {S}} \mu_ {i} ^ {1 / 2} e _ {i}, \tag {82} +$$ + +These constructions (along with Prop. 2) give us the following relationship between the Hilbert-Schmidt norm of the conditional mean operator $\mathbf{M}_{Z|X}$ and the Radon-Nikodym derivative under the condition Asm. 12. In fact, finiteness follows from the source condition itself and boundedness of the kernel. + +Lemma 13. Under Asm. 12, it holds that + +$$ +\| \mathbf {M} _ {Z | X} \| _ {\mathrm {H S} (\mathbf {L} ^ {2} (Q _ {Z}), \mathbf {L} ^ {2} (Q _ {X}))} ^ {2} = \| \mathbf {I} _ {X, Z} \mathsf {R} \| _ {\mathbf {L} ^ {2} (Q _ {X} \otimes Q _ {Z})} ^ {2} = \sum_ {i \in I} \mu_ {i} ^ {2 \beta + 1} \langle \mathsf {S} _ {Q _ {X, Z}}, \mu_ {i} ^ {1 / 2} e _ {i} \rangle_ {\mathcal {S}} ^ {2}. +$$ + +Proof. Without loss of generality, assume that $\mathsf{R} \in \mathrm{null}(\mathbf{I}_{X,Z})^\top$ (as the component in $\mathrm{null}(\mathbf{I}_{X,Z})$ will be excluded from the norm calculation anyway). We expand the expression for $\mathsf{R}$ appearing in Asm. 12 on an ONB of $\mathrm{null}(\mathbf{I}_{X,Z})^\top$ . To do so, combine (81) and (82) to introduce the singular value decomposition + +$$ +\mathbf {I} _ {X, Z} = \sum_ {i \in I} \mu_ {i} ^ {1 / 2} \langle \cdot , \mu_ {i} ^ {1 / 2} e _ {i} \rangle_ {\mathcal {S}} [ e _ {i} ] _ {\sim}. +$$ + +Then, it holds under Asm. 12 that + +$$ +\mathsf {R} = \sum_ {i \in I} \mu_ {i} ^ {\beta} \langle \mathsf {S} _ {Q _ {X, Z}}, \mu_ {i} ^ {1 / 2} e _ {i} \rangle_ {\mathcal {S}} \mu_ {i} ^ {1 / 2} e _ {i} \text {a n d} \mathbf {I} _ {X, Z} \mathsf {R} = \sum_ {i \in I} \mu_ {i} ^ {\beta + 1 / 2} \langle \mathsf {S} _ {Q _ {X, Z}}, \mu_ {i} ^ {1 / 2} e _ {i} \rangle_ {\mathcal {S}} [ e _ {i} ] _ {\sim}. +$$ + +Using that $([e_i]_{\sim})_{i\in I}$ is an orthonormal system, we may use the second expression to perform the computation. + +![](images/ccee9accece8f7fed780c89360288b98838da45575f9040ad4df29ba039c86a5.jpg) + +To make use of Lem. 13, we now interpret $\beta$ in terms of eigendecay exponents of the operators in question. + +Assumption 17 (Eigendecay and Singular Decay). Let the eigenvalues of $\mathbf{I}_{X,Z}\mathbf{S}_{X,Z}$ and singular values of $\mathbf{M}_{Z|X}$ be given by $\{\mu_i\}_{i=1}^{\infty}$ and $\{\sigma_i\}_{i=1}^{\infty}$ , respectively. There exist positive constants $c, C, \alpha > 1$ , and $\gamma_{X,Z} > 1/2$ such that for all $i = 1, 2, \ldots$ , we have the inclusions + +$$ +\mu_ {i} \leq \left[ c i ^ {- \alpha}, C i ^ {- \alpha} \right]. \text {a n d} \sigma_ {i} \in \left[ c i ^ {- \gamma_ {X, Z}}, C i ^ {- \gamma_ {X, Z}} \right]. +$$ + +The following relationship holds over an interval in $\beta$ . We explicitly account for the dependence of $S_{Q_{X,Z}}$ on $\beta$ when it comes to satisfying Asm. 12. + +Proposition 4. Let Asm. 17 be satisfied. Let Asm. 12 be satisfied for all $0 \leq \beta \leq \bar{\beta} < +\infty$ , where $\mathsf{S}_{Q_{X,Z}} \equiv \mathsf{S}_{Q_{X,Z}}(\beta)$ is bounded in $\mathcal{S}$ -norm by $\bar{B}$ for all $\beta \in [0, \bar{\beta}]$ . Then, we have that + +$$ +\gamma_ {X, Z} \geq \frac {1}{2} \left[ \frac {\left(\bar {B} ^ {2} C ^ {2 \beta + 1} + c ^ {2}\right) \alpha (2 \beta + 1) - 1}{\bar {B} ^ {2} C ^ {2 \beta + 1} \alpha (2 \beta + 1)} \right]. +$$ + +Proof. Write + +$$ +\begin{array}{l} \| \mathbf {M} _ {Z | X} \| _ {\mathrm {H S} (\mathbf {L} ^ {2} (Q _ {Z}), \mathbf {L} ^ {2} (Q _ {X}))} ^ {2} = \sum_ {i \in 1} ^ {\infty} \sigma_ {i} ^ {2} = \sum_ {i = 1} ^ {\infty} \mu_ {i} ^ {2 \beta + 1} \langle \mathsf {S} _ {Q _ {X, Z}}, \mu_ {i} ^ {1 / 2} e _ {i} \rangle_ {\mathcal {S}} ^ {2} \\ = \| \mathsf {S} _ {Q _ {X, Z}} \| _ {\mathcal {S}} ^ {2} \sum_ {i = 1} ^ {\infty} \mu_ {i} ^ {2 \beta + 1} \langle \mathsf {S} _ {Q _ {X, Z}} / \| \mathsf {S} _ {Q _ {X, Z}} \| _ {\mathcal {S}}, \mu_ {i} ^ {1 / 2} e _ {i} \rangle_ {\mathcal {S}} ^ {2} \\ \leq \bar {B} ^ {2} \sum_ {i = 1} ^ {\infty} \mu_ {i} ^ {2 (\beta + 1 / 2)}. \tag {83} \\ \end{array} +$$ + +The right-hand side is finite, for all $\beta \geq 0$ , as the $(\mu_i)_{i=1}^{\infty}$ sequence is associated to a trace class operator. Next, using that $\mu_i^{\beta+1/2} \leq C^{2\beta+1} i^{-(\beta+1/2)\alpha}$ , we use Lem. 3 to upper bound (83) via + +$$ +\sum_ {i = 1} ^ {\infty} \mu_ {i} ^ {2 (\beta + 1 / 2)} \leq \frac {C ^ {2 \beta + 1} (2 \beta + 1) \alpha}{(2 \beta + 1) \alpha - 1} = \frac {C ^ {2 \beta + 1}}{1 - (2 \beta + 1) ^ {- 1} \alpha^ {- 1}}. +$$ + +On the other hand, using Definition 8 and Lem. 3, the Hilbert-Schmidt norm is lower bounded via + +$$ +\| \mathbf {M} _ {Z | X} \| _ {\mathrm {H S} (\mathbf {L} ^ {2} (Q _ {Z}), \mathbf {L} ^ {2} (Q _ {X}))} ^ {2} \geq \frac {c ^ {2}}{2 \gamma_ {X , Z} - 1}. +$$ + +Combining both bounds, we have + +$$ +\frac {c ^ {2}}{2 \gamma_ {X , Z} - 1} \leq \frac {\bar {B} ^ {2} C ^ {2 \beta + 1}}{1 - (2 \beta + 1) ^ {- 1} \alpha^ {- 1}}. +$$ + +Inverting the bound gives the condition + +$$ +\begin{array}{l} \gamma_ {X, Z} \geq \frac {1}{2} \left[ \frac {c ^ {2}}{\bar {B} ^ {2} C ^ {2 \beta + 1}} \left(1 - \frac {1}{\alpha (2 \beta + 1)}\right) + 1 \right] \\ = \frac {1}{2} \left[ \frac {(\bar {B} ^ {2} C ^ {2 \beta + 1} + c ^ {2}) \alpha (2 \beta + 1) - 1}{\bar {B} ^ {2} C ^ {2 \beta + 1} \alpha (2 \beta + 1)} \right], \\ \end{array} +$$ + +the result as desired. + +![](images/59fe576553ceeba34f48b72f68221c009298ec0e248e604fd1ec70710ae052d1.jpg) + +From Prop. 4, we consider the case in which $\alpha \rightarrow \infty$ (the data is finite-rank under independence), and derive the singular decay condition + +$$ +\gamma_ {X, Z} \geq \frac {1}{2} \left(\frac {\bar {B} ^ {2} C ^ {2 \beta + 1} + c ^ {2}}{\bar {B} ^ {2} C ^ {2 \beta + 1}}\right) > \frac {1}{2} +$$ + +for $c > 0$ . While the relationship is not as direct as in the case of (72), we may still observe some regimes in which a "maximally smooth" target function boils down to an independence assumption. This holds intuitively as well, in the sense that $\mathsf{R} \equiv 1$ holds $(Q_{X} \otimes Q_{Z})$ -almost surely if and only if $X$ and $Z$ are independent. + +# D.2.3. CONTROLLING THE PROMPTING TERM + +The term that relates $\hat{\rho}_{Y,Z}$ to $\rho_{Y,Z}$ is simply a measurement of the deviation of a sample mean from its population counterpart, within a Hilbert space. Thus, it is reasonable to assume an $O(1 / M)$ scaling on this term. Below, we use the notation $(X_i', Z_i')$ to indicate a sample drawn from $Q_X \otimes Q_Z$ , i.e., an unpaired example. + +Assumption 18. For constants $\delta \in (0,1]$ and $M\geq 1$ , there is an event $\mathcal{E}(\delta ,M)$ , which is independent of the pre-training data $\{(X_i,Z_i)\}_{i = 1}^{N / 2}$ , $\{(X_i',Z_i')\}_{i = 1}^{N / 2}$ , such that on $\mathcal{E}(\delta ,M)$ , + +$$ +\left\| \frac {1}{M} \sum_ {j = 1} ^ {M} W _ {j} - \mathbb {E} _ {\rho_ {Y, Z}} \left[ W _ {1} \right] \right\| _ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} ^ {2} \leq C _ {\mathsf {R}, \rho} \left(Q _ {X}\right) \operatorname {p l o g} (1 / \delta) M ^ {- 1}, \tag {84} +$$ + +where $C_{\mathsf{R},\rho}(Q_X)$ depends only on its arguments and $r$ , and is independent of $M$ and $\delta$ . On $(\Omega, \mathcal{F}, \mathbb{P})$ , the event $\mathcal{E}(\delta, M)$ occurs with probability at least $1 - \delta / 2$ . + +The scaling shown in Asm. 18 can be satisfied by placing a Bernstein-type condition on the random variable $W_{1}$ and applying, for instance, the Pinelis-Sahanenko inequality (Pinelis and Sakhanenko, 1986). Specifically, consider the case in which there are positive constants $\sigma, c > 0$ such that + +$$ +\sum_ {j = 1} ^ {M} \mathbb {E} _ {\rho_ {Y, z}} \| \frac {1}{M} W _ {j} - \frac {1}{M} \mathbb {E} _ {\rho_ {Y, z}} [ W _ {1} ] \| _ {\mathbf {L} ^ {2} (Q _ {X})} ^ {q} \leq \frac {q !}{2} \sigma^ {2} c ^ {q - 2} +$$ + +for all $q \geq 2$ . Then, (84) is satisfied, wherein the scalars $\sigma$ and $c$ will scale as $1 / M$ , and have additional constants that depend on $r$ , $\mathsf{R}$ , $\rho_{Y,Z}$ , and $Q_{X}$ (but not $Q_{Z}$ or $Q_{X,Z}$ ). This generates the constant $C_{\mathsf{R},\rho}(Q_X)$ above. + +# D.2.4. COMPLETING THE PROOF + +Well-Specified Case. Because Prop. 4 yields an inexact relationship between the singular decay exponent $\gamma_{X,Z}$ and the source condition constant $\beta$ , we maintain the statement of the result in terms of this constant. The following result comes as an immediate consequence of Lem. 12 and Cor. 2. + +Theorem 11. Consider failure probability $\delta \in (0,1]$ . Assume that the conditions of Lem. 12 are satisfied and that $N$ is large enough such that the conditions of Cor. 2 are satisfied, in addition to Asm. 18. Define + +$$ +K _ {\mathrm {m a x}} := 1 + \left(4 \kappa_ {\mathrm {m a x}} ^ {2} + \kappa_ {\mathrm {m a x}}\right) ^ {2}. +$$ + +Then, with probability at least $1 - \delta$ , it holds that + +$$ +\| \hat {\eta} _ {\rho} - \eta_ {\rho} \| _ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2} \lesssim \mathrm {p l o g} (1 / \delta) \left[ K _ {\max} ^ {\frac {\beta + 2}{\beta + 1}} N ^ {- \frac {\beta}{\beta + 1}} + C _ {\mathsf {R}, \rho} (Q _ {X}) M ^ {- 1} \right] + \chi^ {2} (\rho_ {Z} \| Q _ {Z}), +$$ + +where $C_{\mathsf{R},\rho}(Q_X)$ depends only on its arguments and $r$ , and not $M$ or $\delta$ . + +The constant $C_{\mathbb{R},\rho}(Q_X)$ appears directly from Asm. 18. + +Mis-Specified Case. As mentioned in Appx. B.4, the mis-specified case $(\mathsf{R} \notin S)$ for Radon-Nikodym derivative estimation problems is less understood than the mis-specified case for real-valued and vector-valued nonparametric regression. We intend here to highlight the overall decomposition of error, for which such results could be plugged in as well. + +# D.3. Distribution Shift + +The results of the previous two subsections provided bounds in high probability on the term $\| \hat{\eta}_{\rho} - \eta_{\rho}\|_{\mathbf{L}^2 (Q_X)}^2$ . Returning to the original error decomposition of (12), we would like to relate this to a similar bound on $\| \hat{\eta}_{\rho} - \eta_{\rho}\|_{\mathbf{L}^2 (P_X)}^2$ . We collect two general techniques for performing this change of measure, which lead to either a multiplicative or additive error depending on the assumptions the user is willing to make. + +Lemma 14 (Distribution Shift). Assume that $P_X$ and $Q_X$ have densities $p_X$ and $q_X$ with respect to a common dominating measure $\nu_X$ on the measurable space $(\mathcal{X}, \mathcal{B}(\mathcal{X}))$ , and define the total variation metric + +$$ +\operatorname {T V} \left(P _ {X}, Q _ {X}\right) := \int_ {\mathcal {X}} \left| p _ {X} (\boldsymbol {x}) - q _ {X} (\boldsymbol {x}) \right| \mathrm {d} \nu_ {X} (\boldsymbol {x}). +$$ + +Then, for any $\eta : \mathcal{X} \to \mathbb{R}$ such that $[\eta]_X \in \mathbf{L}^2(P_X) \cap \mathbf{L}^2(Q_X)$ (see Appx. B.1), the following holds. + +- If the essential supremum $\| \eta \|_{\infty} \coloneqq \inf \left\{\sup_{A \in \mathcal{B}(\mathcal{X})} \sup_{\boldsymbol{x} \in A} |\eta(\boldsymbol{x})| : \nu_X(A^c) = 0\right\}$ is finite, then we have the additive relation + +$$ +\left\| \eta \right\| _ {\mathbf {L} ^ {2} \left(P _ {X}\right)} ^ {2} \leq \left\| \eta \right\| _ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} ^ {2} + \left\| \eta \right\| _ {\infty} ^ {2} \operatorname {T V} \left(P _ {X}, Q _ {X}\right). \tag {85} +$$ + +- If $Q_X \ll P_X$ , and $\frac{\mathrm{d}Q_X}{\mathrm{d}P_X}(\pmb{x}, \pmb{z}) \leq B_{P,Q}$ for $P_X$ -almost all $\pmb{x} \in \mathcal{X}$ , then we have the multiplicative relation + +$$ +\left\| \eta \right\| _ {\mathbf {L} ^ {2} \left(P _ {X}\right)} ^ {2} \leq B _ {P, Q} \left\| \eta \right\| _ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} ^ {2}. \tag {86} +$$ + +Proof. In the case of (85), we apply Hölder's inequality to achieve + +$$ +\begin{array}{l} \| \eta \| _ {\mathbf {L} ^ {2} (P _ {X})} ^ {2} = \mathbb {E} _ {P _ {X}} [ \eta^ {2} (X) ] = \mathbb {E} _ {Q _ {X}} [ \eta^ {2} (X) ] + \int_ {\mathcal {X}} \eta^ {2} (\boldsymbol {x}) (p _ {X} (\boldsymbol {x}) - q _ {X} (\boldsymbol {x})) \mathrm {d} \nu_ {X} (\boldsymbol {x}) \\ \leq \| \eta \| _ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2} + \| \eta \| _ {\infty} ^ {2} \int_ {\mathcal {X}} | p _ {X} (\boldsymbol {x}) - q _ {X} (\boldsymbol {x}) | \mathrm {d} \nu_ {X} (\boldsymbol {x}) \\ = \| \eta \| _ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2} + \| \eta \| _ {\infty} ^ {2} \operatorname {T V} (P _ {X}, Q _ {X}), \\ \end{array} +$$ + +which proves the first claim. For (86), on the other hand, write + +$$ +\| \eta \| _ {\mathbf {L} ^ {2} (P _ {X})} ^ {2} = \mathbb {E} _ {P _ {X}} \left[ \eta^ {2} (X) \right] = \mathbb {E} _ {Q _ {X}} \left[ \eta^ {2} (X) \frac {\mathrm {d} Q _ {X}}{\mathrm {d} P _ {X}} (X) \right] \leq B _ {P, Q} \| \eta \| _ {\mathbf {L} ^ {2} (Q _ {X})} ^ {2}, +$$ + +proving the second claim and completing the proof. + +![](images/0aff6236722a2ea1935b0c2d18d1af329d767795d01978bf95784db02f070c9e.jpg) + +From Lem. 14 and the boundedness assumption $|r(\cdot)| \leq B_r$ , we alter (12) slightly to read + +$$ +\left\| \eta_ {\star} - \hat {\eta} _ {\rho} \right\| _ {\mathbf {L} ^ {2} \left(P _ {X}\right)} ^ {2} \leq 2 \left\| \eta_ {\star} - \eta_ {\rho} \right\| _ {\mathbf {L} ^ {2} \left(P _ {X}\right)} ^ {2} + 2 \left\| \eta_ {\rho} - \hat {\eta} _ {\rho} \right\| _ {\mathbf {L} ^ {2} \left(Q _ {X}\right)} ^ {2} + 4 B _ {r} ^ {2} \operatorname {T V} \left(P _ {X}, Q _ {X}\right), \tag {87} +$$ + +and plug in the previous bounds on the $\| \eta_{\rho} - \hat{\eta}_{\rho}\|_{\mathbf{L}^2 (Q_X)}^2$ term for an overall result. + +# D.4. From Regression to Classification + +Throughout this appendix, we evaluated the quality of an estimated map $\hat{\eta}_{\rho}:\mathcal{X}\to \mathbb{R}$ via its $\mathbf{L}^2 (Q_X)$ distance to some target predictor $\eta_{\rho}$ . This goal was based on the error decomposition (87), which feeds into ultimate upper bound for $\| \hat{\eta}_{\rho} - \eta_{\star}\|_{\mathbf{L}^2 (P_X)}^2$ , where each term was controlled using the techniques of Appx. C, Appx. D.1, and Appx. D.2. In the case that $r:\mathcal{Y}\rightarrow \mathbb{R}$ represents a classification or structured prediction problem (e.g. $r(\pmb {y}) = 1$ $\{\pmb {y} = c\}$ for class $c\in \mathcal{Y}$ ), it is of clear interest whether the control of mean squared error translates to risk guarantees for classification error. Establishing these guarantees, using the notion of a structure encoding loss function (SELF) described in Bach (2024, Section 13.2), is the subject of this section. + +Assume that $\mathcal{Y}$ is discrete, or that $|\mathcal{Y}| < \infty$ . We consider a loss function $\ell: \mathcal{Y} \times \mathcal{Y} \to \mathbb{R}$ and a regular conditional distribution $P_{Y|X}(\cdot | \boldsymbol{x})$ (see Definition 4), under which $\ell(\cdot, \boldsymbol{y})$ is integrable for all $(\boldsymbol{x}, \boldsymbol{y}) \in \mathcal{X} \times \mathcal{Y}$ . The corresponding risk of any map $h: \mathcal{X} \to \mathcal{Y}$ will be denoted + +$$ +\mathcal {R} (h) = \mathbb {E} _ {P _ {X, Y}} [ \ell (Y, h (X)) ]. \tag {88} +$$ + +There are a number of assumptions that mark the SELF framework. + +Assumption 19 (SELF Loss for Structured Prediction). Consider the existence of a Hilbert space $\mathcal{F}$ , and two mappings $\chi : \mathcal{Y} \to \mathcal{F}$ and $\xi : \mathcal{Y} \to \mathcal{F}$ which act as embeddings of objects in $\mathcal{Y}$ . Then, assume that $\ell$ satisfies the equality + +$$ +\ell (\pmb {y}, \pmb {y} ^ {\prime}) = \langle \chi (\pmb {y}), \xi (\pmb {y} ^ {\prime}) \rangle_ {\mathcal {F}}. +$$ + +As of yet, no assumptions (such as being an RKHS) have been placed on $\mathcal{F}$ . Under Asm. 19, the Bayes optimal predictor (with respect to (88), and not mean squared error) is given by + +$$ +h_{\star}(\boldsymbol {x})\in \operatorname *{arg min}_{\boldsymbol{y}^{\prime}\in \mathcal{Y}}\sum_{\boldsymbol {y}\in \mathcal{Y}}\ell (\boldsymbol {y},\boldsymbol{y}^{\prime})P_{Y|X}(\boldsymbol {y}|\boldsymbol {x}), +$$ + +where ties can be broken arbitrarily. In other words, $h_\star \in \arg \min_h \mathcal{R}(h)$ . Additionally, because $\mathcal{Y}$ is finite, we may take the expectation + +$$ +\begin{array}{l} \sum_ {\boldsymbol {y} \in \mathcal {Y}} \ell (\boldsymbol {y}, \boldsymbol {y} ^ {\prime}) P _ {Y | X} (\boldsymbol {y} | \boldsymbol {x}) = \sum_ {\mathcal {Y}} \left\langle \chi (\boldsymbol {y}), \xi (\boldsymbol {y} ^ {\prime}) \right\rangle_ {\mathcal {F}} P _ {Y | X} (\boldsymbol {y} | \boldsymbol {x}) \\ = \left\langle \mathbb {E} _ {P _ {X, Y}} \left[ \chi (Y) | X \right] (\boldsymbol {x}), \xi (\boldsymbol {y} ^ {\prime}) \right\rangle_ {\mathcal {F}}, \\ \end{array} +$$ + +which is only based on finite sums of vectors in $\mathcal{F}$ . Next, we define the notation of a surrogate loss. To construct a predictor (e.g. classifier), we consider a function $s: \mathcal{X} \to \mathcal{F}$ called the score function and a map $\operatorname{dec}: \mathcal{F} \to \mathcal{Y}$ known as a decoder. We will then define an integrable surrogate loss $L: \mathcal{Y} \times \mathcal{F} \to \mathbb{R}$ , for which we can define the risk + +$$ +\mathcal {R} ^ {L} (s) = \mathbb {E} _ {P _ {X, Y}} [ L (Y, s (X)) ]. \tag {89} +$$ + +We can then define the Bayes surrogate risk as + +$$ +\mathcal {R} _ {\star} ^ {L} = \mathbb {E} _ {P _ {X}} \left[ \inf _ {h \in \mathcal {F}} \mathbb {E} _ {P _ {X, Y}} [ L (Y, h) | X ] \right]. +$$ + +The relationship between the surrogate risk (89) and the true risk (88) for squared surrogates is given in the following result. + +Proposition 5. (Bach, 2024, Section 13.4.2) Consider the surrogate loss and decoder given by + +$$ +L(\boldsymbol {y},s(\boldsymbol {x})):= \| \xi (\boldsymbol {y}) - s(\boldsymbol {x})\|_{\mathcal{F}}^{2} and \operatorname *{dec}(h)\in \operatorname *{arg min}_{\boldsymbol {y}\in \mathcal{Y}}\left\langle \chi (\boldsymbol {y}),h\right\rangle_{\mathcal{F}}. +$$ + +Then, for any score function $s:\mathcal{X}\to \mathcal{F}$ , it holds that + +$$ +\mathcal {R} (\operatorname {d e c} \circ s) - \mathcal {R} (h _ {\star}) \leq 2 \sup _ {\boldsymbol {y} \in \mathcal {Y}} \| \chi (\boldsymbol {y}) \| _ {\mathcal {F}} \cdot \sqrt {\mathcal {R} ^ {L} (s) - \mathcal {R} _ {\star} ^ {L}}. +$$ + +We stated Prop. 5 generally; we now map it to classification, the prototypical task associated with zero-shot prediction. Let $\mathcal{Y} = \{1,\dots ,C\}$ , where $C$ denotes the number of classes (in contrast to the absolute constants in Thm. 2 and Thm. 3). Then, we have that $\chi (\pmb {y})$ is the one-hot encoding in $\mathbb{R}^C$ , whereas $\xi (\pmb {y})$ is the complement, that is, $\xi_{j}(\pmb {y}) = 1 - \chi_{j}(\pmb {y})$ for $c = 1,\ldots ,C$ . Thus, their inner product generates the 0-1 loss + +$$ +\ell (\boldsymbol {y}, \boldsymbol {y} ^ {\prime}) = \mathbb {1} \left\{\boldsymbol {y} \neq \boldsymbol {y} ^ {\prime} \right\} = \langle \chi (\boldsymbol {y}), \xi (\boldsymbol {y} ^ {\prime}) \rangle_ {\mathbb {R} ^ {C}}. +$$ + +Then, we immediately have that $\sup_{\boldsymbol{y} \in \mathcal{Y}} \| \chi(\boldsymbol{y}) \|_{\mathcal{F}} = 1$ . It remains to determine the score function $s: \mathcal{X} \to \mathbb{R}^C$ . Note that we used a function $r$ to define (3) and (4); we will now use $C$ such functions $r^{(1)}, \ldots, r^{(C)}$ each defined by + +$$ +r ^ {(c)} (\boldsymbol {y}) = \xi_ {j} (\boldsymbol {y}) = \mathbb {1} \left\{\boldsymbol {y} = j \right\} \tag {90} +$$ + +which in turn gives us the individual mean squared error minimizers + +$$ +\eta_ {\star} ^ {(c)} (\boldsymbol {x}) = \mathbb {E} _ {P _ {Y, X}} \left[ r ^ {(c)} (Y) | X \right] (\boldsymbol {x}) = \mathbb {P} _ {P _ {Y, X}} \left[ Y = j | X \right] (\boldsymbol {x}). +$$ + +Finally, we may use any of the estimation strategies developed in Appx. D.1 or Appx. D.2 to produce estimators $\hat{\eta}_{\rho}^{(1)}, \dots, \hat{\eta}_{\rho}^{(C)}$ (i.e. the predicted probability per class) to give the score function + +$$ +s (\boldsymbol {x}) := \left(\hat {\eta} _ {\rho} ^ {(1)} (\boldsymbol {x}), \dots , \hat {\eta} _ {\rho} ^ {(C)} (\boldsymbol {x})\right) \in \mathbb {R} ^ {C}. \tag {91} +$$ + +Each $\hat{\eta}_{\rho}^{(c)}$ is then associated to the conditional mean given by the prompt distribution, which we denote $g_{\rho}^{(c)}$ . As a final step, we use the classical relationship between mean squared prediction error and mean squared integrated error, as seen below. + +Corollary 3. For the score function given in (91) and decoder given in Prop. 5, it holds that + +$$ +\mathcal {R} (\mathrm {d e c} \circ s) - \mathcal {R} (h _ {\star}) \leq 2 \sqrt {\sum_ {j = 1} ^ {C} \| \hat {\eta} _ {\rho} ^ {(c)} - \eta_ {\star} ^ {(c)} \| _ {\mathbf {L} ^ {2} (P _ {X})} ^ {2}}. +$$ + +Proof. Given Prop. 5, we need only show that + +$$ +\mathcal {R} ^ {L} (s) - \mathcal {R} _ {\star} ^ {L} = \sum_ {j = 1} ^ {C} \| \hat {\eta} _ {\rho} ^ {(c)} - \eta_ {\star} ^ {(c)} \| _ {\mathbf {L} ^ {2} \left(P _ {X}\right)} ^ {2}. \tag {92} +$$ + +First, note that for the score function $s$ given in (91), it holds by (90) that + +$$ +L (\boldsymbol {y}, s (\boldsymbol {x})) := \| \xi (\boldsymbol {y}) - s (\boldsymbol {x}) \| _ {\mathbb {R} ^ {C}} ^ {2} = \sum_ {j = 1} ^ {C} \left(r ^ {(c)} (\boldsymbol {y}) - \hat {\eta} _ {\rho} ^ {(c)} (\boldsymbol {x})\right) ^ {2}, +$$ + +![](images/09936fd312436c6a7fb7e093b23dd6e07f871db061fbcc8f19ddce07bba5b6f3.jpg) +Figure 5. Illustration of Prompting Strategies. A hypothetical distribution of embeddings $\beta(Z)$ parametrized by two classes ("cat" and "dog"). Three prompting strategies (template-based, class-conditional, and unbiased) are shown with example text and resulting embeddings in $\mathbb{R}^d$ . Colors represent the probability of each class given the embedding. + +and after taking the expectation over $P_{X,Y}$ + +$$ +\mathcal {R} ^ {L} (s) = \mathbb {E} _ {P _ {X, Y}} \left[ L (Y, s (X)) \right] = \sum_ {j = 1} ^ {C} \mathbb {E} _ {P _ {X, Y}} \left[ \left(r ^ {(c)} (Y) - \hat {\eta} _ {\rho} ^ {(c)} (X)\right) ^ {2} \right]. +$$ + +Then, by the bias-variance decomposition for each $c = 1,\ldots ,C$ , it holds that + +$$ +\underbrace {\sum_ {j = 1} ^ {C} \mathbb {E} _ {P _ {X , Y}} \left[ (r ^ {(c)} (Y) - \hat {\eta} _ {\rho} ^ {(c)} (X)) ^ {2} \right]} _ {\mathcal {R} ^ {L} (s)} = \underbrace {\sum_ {j = 1} ^ {C} \| \hat {\eta} _ {\rho} ^ {(c)} - \eta_ {\star} ^ {(c)} \| _ {\mathbf {L} ^ {2} (P _ {X})} ^ {2}} _ {\mathcal {R} _ {\star} ^ {L}} + \underbrace {\sum_ {j = 1} ^ {C} \mathbb {E} _ {P _ {X , Y}} \left[ (r ^ {(c)} (Y) - \eta_ {\star} ^ {(c)} (X)) ^ {2} \right]} _ {\mathcal {R} _ {\star} ^ {L}}. +$$ + +Rearranging terms gives (92) and completes the proof. + +![](images/7e5f390ef6b6edae9c0f241db2b324c09c638b36377914ce0abd159aff2fab97.jpg) + +In particular, when applying the bound above to results of Thm. 1, Thm. 2, and Thm. 3, we derive a bound of the form + +$$ +\begin{array}{l} \mathcal {R} (\operatorname {d e c} \circ s) - \mathcal {R} (h _ {\star}) \lesssim \sqrt {C \mathbb {E} _ {P _ {Z}} [ I (X ; Y | Z) ] + \sum_ {j = 1} ^ {C} \| g _ {\rho} ^ {(c)} - g _ {P _ {Y , Z}} ^ {(c)} \| _ {\mathbf {L} ^ {2} (P _ {Z})} ^ {2} + C \operatorname {T V} (P _ {X} , Q _ {X})} \\ + \left\{ \begin{array}{l l} \sqrt {C} \operatorname {p l o g} (C / \delta) \left(N ^ {- \frac {q (t)}{2 (q (t) + 1)}} + M ^ {- \frac {2 \omega_ {\rho} - 1}{4 \omega_ {\rho} + 2}}\right) & (\text {c o n d i t i o n a l m e a n}) \\ \sqrt {C} \operatorname {p l o g} (C / \delta) \left(N ^ {- \frac {\beta}{2 (\beta + 1)}} + M ^ {- 1 / 2}\right) + \sqrt {D _ {\chi^ {2}} (\rho_ {Z} \| Q _ {Z})} & (\text {i n f o r m a t i o n d e n s i t y}) \end{array} , \right. \\ \end{array} +$$ + +which holds with probability at least $1 - \delta$ . While generalization bounds for classification and structured prediction can have sharper dependences on the number of examples and number of classes for supervised learning (e.g., via the techniques of Cabannnes et al. (2021) and references therein), the conversion from regression to classification is a remarkably general way to account for the residual dependence, prompt bias, and multiple stages of estimation that mark our problem. + +# D.5. Prompting Strategies + +We have stated upper bounds on the statistical error in this section that depend on the size of the pre-training set $N$ and the number of prompts $M$ . To state them more precisely, however, we must also specify the sampling schemes that lead to these examples/prompts. Sampling of the pre-training data falls into fixed and well-understood categories, boiling down to whether only paired examples or a combination of paired and unpaired examples are available. We describe + +these as part of the background (Appx. B.4), alongside the method to which they apply. However, the interpretation of prompting (the empirical procedure used in (1)) formally as a sampling scheme from a probability measure $\rho_{Y,Z}$ is itself a contribution of this paper. In the results of Appx. D.1 and Appx. D.2, we considered simple random sampling $(Y_1,Z_1),\ldots ,(Y_M,Z_M)\sim \rho_{Y,Z}$ i.i.d. to provide examples of scenarios in which Asm. 14 and Asm. 18 can be satisfied. However, multiple practical and idealized strategies exist for prompting (such as the ones explored in Sec. 4). Below, we represent them in our framework below, as ways to define $\rho_{Y,Z}$ and approximate it with $\hat{\rho}_{Y,Z}$ . + +- Template-Based: This technique reflects the earlier iterations of representing labels in natural language. Examples include "photo of a ", "realistic photo of a ", "drawing of a ", etc. Notice that the prompt templates have no relationship with the class label. One way this can be understood is by representing the caption via the structural equation $Z = f(Y, U)$ , where $U$ represents the text of the caption with the label left blank (drawn according to a probability measure $\rho_U$ ), and $f$ represents the action of inserting the natural language label. Then, we have that under the template-based prompting distribution, $U \perp Y$ . This does not imply that $Z \perp Y$ , but instead that the dependence is governed fully by the function $f$ . To sample, a fixed number of $m$ examples $\mathbf{u}_1, \ldots, \mathbf{u}_m$ are drawn directly from $\rho_U$ . We then use the empirical measure $\hat{\rho}_{Y,Z}(\mathbf{y}, \mathbf{z}) = \frac{1}{m} \sum_{k=1}^{m} \rho_Y(\mathbf{y}) \mathbb{1}\{f(\mathbf{y}, \mathbf{u}_k) = \mathbf{z}\}$ , where $\rho_Y$ is fixed as the uniform distribution on the discrete set $\mathcal{Y}$ . Here, $M = m|\mathcal{Y}|$ . +- Class Conditional: This technique reflects the modern LLM-based techniques, such as CuPL (Pratt et al., 2023). We parameterize the joint distribution using the conditional distributions $\rho_{Y,Z} = \sum_{\boldsymbol{y} \in \mathcal{Y}} \rho_{Z|Y = \boldsymbol{y}} \cdot \rho_{Y}(\boldsymbol{y})$ for each class $\boldsymbol{y} \in \mathcal{Y}$ . Sampling from each $\rho_{Z|Y = \boldsymbol{y}}$ occurs by meta-prompting the LLM (such as the one we use in Appx. F), which generates samples $z_1^{\boldsymbol{y}}, \ldots, z_1^{\boldsymbol{y}}$ and empirical measures $\hat{\rho}_{Z|Y = \boldsymbol{y}} = \frac{1}{m} \sum_{k=1}^{m} \delta_{z_k^{\boldsymbol{y}}}$ . Our final approximation is $\hat{\rho}_{Y,Z} = \sum_{\boldsymbol{y} \in \mathcal{Y}} \hat{\rho}_{Z|Y = \boldsymbol{y}} \cdot \rho_{Y}(\boldsymbol{y})$ , with $M = m|\mathcal{Y}|$ . +- Unbiased: This techniques reflects the setting of Fig. 3, where the user may drawn samples from a joint distribution $P_{X,Y,Z}$ , where the marginal $P_{X,Y}$ is in fact the data on which the zero-shot classifier will be evaluated. Then, the prompt distribution can be constructed, as we do, by drawing samples $(\pmb{y}_1,\pmb{z}_1),\dots,(\pmb{y}_M,\pmb{z}_M)$ directly from $P_{Y,Z}$ and defining $\hat{\rho}_{Y,Z} = \frac{1}{M}\sum_{j = 1}^{M}\delta_{(\pmb{y}_j,\pmb{z}_j))}$ . We call this "unbiased", because the prompt bias term in Thm. 1 is zero for this example. It is worth pointing out that even if $P_{Y|Z = z}$ can be matched by the prompt distribution, the distribution mismatch term from Thm. 3 will be zero if and only if $\rho_Z = Q_Z$ (or the prompt captions match the pre-training captions in distribution). In this sense, $P_{Y,Z}$ may not be the ideal prompting distribution, but instead, $P_{Y|Z}Q_Z$ . + +# E. Self-Supervised Objectives and Cross Covariance Operators + +In Sec. 3, we considered specific instances of both the conditional mean and information density approaches based on nonparametric regression in reproducing kernel Hilbert space (RKHS). This reflected the statistical goals of Thm. 2 and Thm. 3. In this appendix, we aim to draw relationships with other approaches based on optimizing self-supervised learning (SSL) objectives, in order to align with practice. In particular, we focus on the relationship between such objectives and the mean square contingency $I(X;Z)$ introduced in Sec. 2. To do so, we make explicit the intuition that SSL objectives (such as CLIP and VICReg) are implicit forms of dependence maximization between the representations $\alpha(X)$ and $\beta(Z)$ . Some of the arguments below have previously appeared in the literature—we do not claim originality for them, but instead aim to consolidate them together in a single vignette. + +When it comes to specific SSL objectives, we describe here their properties as functions acting on a batch of encoded data $(\alpha(x_1), \beta(z_1)), \ldots, (\alpha(x_n), \beta(z_n))$ . This abstract description is agnostic to the function class used for the encoder. Reproducing kernel Hilbert space theory has been frequently used, in the recent literature, to define the function classes involved in contrastive and non-contrastive self-supervised foundation modeling (Li et al., 2021; Balestriero and LeCun, 2022; Kiani et al., 2022; Johnson et al., 2023; Tan et al., 2024). We also mention that the precise characterization of the function classes of various deep neural networks is an active area of research (Schmidt-Hieber, 2020; Sctbon and Harchaoui, 2020; Parhi and Nowak, 2021; Wu and Long, 2022; Bartolucci et al., 2023; Unser, 2023; Siegel and Xu, 2023; Shwartz-Ziv et al., 2023; DeVore et al., 2025). However, these exciting yet still burgeoning theories of deep neural networks have not yet reached a maturity level comparable to the one of RKHS theory (Wahba, 1990; Cucker and Zhou, 2007; Christmann and Steinwart, 2008; Bach, 2024) needed for the theoretical analysis we develop in this paper. For more practical details on self-supervised learning, we point the reader to the recent survey (Balestriero et al., 2023). + +Covariance Operators. To relate our theory (which centers around the mean square contingency measure of dependence) to SSL objectives, we first draw the relationship to covariance operators of $Q_{X,Z}$ on particular function spaces. Let $\mathcal{H}$ be an RKHS of real-valued functions $\mathcal{X}$ and $\mathcal{G}$ be an RKHS of real-valued functions on $\mathcal{Z}$ . Then, define the cross-covariance operator $\mathbf{C}_{XZ}: \mathcal{G} \to \mathcal{H}$ by + +$$ +\langle h, \mathbf {C} _ {X Z} g \rangle_ {\mathcal {H}} = \mathbb {C} \operatorname {C o v} _ {Q _ {X, Z}} (h (X), g (Z)), +$$ + +and the analogously defined auto-covariance operators $\mathbf{C}_{XX}:\mathcal{H}\to \mathcal{H}$ and $\mathbf{C}_{ZZ}:\mathcal{G}\rightarrow \mathcal{G}$ . When $\mathbf{C}_{XX}$ and $\mathbf{C}_{ZZ}$ are compact, we define the powers $\mathbf{C}_{XX}^{1 / 2}$ and $\mathbf{C}_{ZZ}^{1 / 2}$ in the sense of (39). It then holds by Baker (1973, Theorem 1) that there exists a unique bounded linear operator $\mathbf{V}_{XZ}:\mathcal{G}\rightarrow \mathcal{H}$ , so that + +$$ +\mathbf {C} _ {X Z} = \mathbf {C} _ {X X} ^ {1 / 2} \mathbf {V} _ {X Z} \mathbf {C} _ {Z Z} ^ {1 / 2}. \tag {93} +$$ + +The operator $\mathbf{V}_{XZ}$ is called the normalized cross-covariance operator, or NOCCO for short (Fukumizu et al., 2005). As an abuse of notation, the NOCCO (93) is sometimes communicated as $\mathbf{V}_{XZ} = \mathbf{C}_{XX}^{-1/2}\mathbf{C}_{XZ}\mathbf{C}_{ZZ}^{-1/2}$ , though it is uniquely defined without necessarily constructing the square-root inverses. To rigorously use the formula $\mathbf{C}_{XX}^{-1/2}\mathbf{C}_{XZ}\mathbf{C}_{ZZ}^{-1/2}$ with a well-defined adjoint, we must make assumptions on the closure of the range of $\mathbf{C}_{XZ}$ and $\mathbf{C}_{ZX}$ being contained within the closure of the range of $\mathbf{C}_{XX}$ and $\mathbf{C}_{ZZ}$ , respectively. The Hilbert-Schmidt norm of the population NOCCO, when finite, is equal to the mean square contingency + +$$ +\left\| \mathbf {V} _ {X, Z} \right\| _ {\operatorname {H S} (\mathcal {G}, \mathcal {H})} ^ {2} = I (X; Z), \tag {94} +$$ + +as shown in Fukumizu et al. (2007b, Theorem 4). The relation (94) requires a few additional technical conditions, such as $(\mathcal{H}\otimes \mathcal{G}) + \mathbb{R}$ being dense in $\mathbf{L}^2 (Q_X\otimes Q_Z)$ and $Q_{X,Z}$ having joint and marginal densities6. + +Variational Characterization of the Hilbert-Schmidt Norm. This operator is an essential component of the kernel canonical correlations analysis (CCA) problem, which (with (94)) will be the common bridge that ties together SSL and the mean square contingency. From the nonparametric CCA perspective, the singular values $(\sigma_i)_{i=1}^{\infty}$ refer precisely to the canonical correlations and the singular functions $((\alpha_i, \beta_i))_{i=1}^{\infty}$ refer to the canonical variates (Lancaster, 1958; Buja, 1990; Michaeli et al., 2016). Returning to (94), this operator is estimated with a regularization scheme, i.e. + +$$ +\widehat {\mathbf {V}} _ {X, Z} := (\widehat {\mathbf {C}} _ {X X} + \lambda \mathbf {I}) ^ {- 1 / 2} \widehat {\mathbf {C}} _ {X Z} (\widehat {\mathbf {C}} _ {Z Z} + \lambda \mathbf {I}) ^ {- 1 / 2}, +$$ + +where $\widehat{\mathbf{C}}_{XX}$ , $\widehat{\mathbf{C}}_{XZ}$ , and $\widehat{\mathbf{C}}_{ZZ}$ are the standard empirical covariance estimates (see Appx. B.4) and $\lambda > 0$ is a regularization parameter. Then, one solves the empirical CCA problem + +$$ +\max _ { \begin{array}{c} h _ {1}, \dots , h _ {d} \in \mathcal {H} \\ g _ {1}, \dots , g _ {d} \in \mathcal {G} \end{array} } \sum_ {i = 1} ^ {d} \langle h _ {i}, \widehat {\mathbf {V}} _ {X, Z} g _ {i} \rangle_ {\mathcal {H}}. \tag {95} +$$ + +where o.n.b denotes an orthonormal basis. Setting aside matters of estimation, we consider how the norm quantity $\| \mathbf{V}_{X,Z}\|_{\mathrm{HS}(\mathcal{G},\mathcal{H})}^2$ relates to the actual encoders returned by the CCA problem (95) (assuming that $\widehat{\mathbf{V}}_{X,Z}\approx \mathbf{V}_{X,Z}$ ). Let $(s_i)_{i = 1}^{\infty}$ be ordered singular values of the Hilbert-Schmidt operator $\mathbf{V}_{X,Z}$ . In this case, denoting $h_1,\ldots ,h_d\in \mathcal{H}$ and + +$g_{1},\ldots ,g_{d}\in \mathcal{G}$ the orthonormal bases of $\mathcal{H}$ and $\mathcal{G}$ resp. maximizing the criterion ((95)), we have + +$$ +\begin{array}{l} \sum_ {i = 1} ^ {d} \left\langle h _ {i}, \mathbf {V} _ {X, Z} g _ {i} \right\rangle_ {\mathcal {H}} = \sum_ {i = 1} ^ {d} s _ {i} \leq \sqrt {d \sum_ {i = 1} ^ {d} s _ {i} ^ {2}} (96) \\ = \sqrt {d \left(\| \mathbf {V} _ {X , Z} \| _ {\mathrm {H S} (\mathcal {G} , \mathcal {H})} ^ {2} - \sum_ {i = d + 1} ^ {\infty} s _ {i} ^ {2}\right)} \\ = \sqrt {d \left(I (X ; Z) - \sum_ {i = d + 1} ^ {\infty} s _ {i} ^ {2}\right)} (97) \\ \end{array} +$$ + +The two orthonormal bases maximizing the criterion (95) are actually the left and right singular functions of $\mathbf{V}_{XY}$ associated to the leading $d$ singular values (see Thm. 5). The larger the truncation level $d$ , the closer the quantity is to the mean-square contingency, up to the truncation level factor $d$ . + +In either the population (96) or empirical (95) problems, the functions are maximizing an objective that is a measure of covariance with a constraint on variance. The constraint on variance is imposed by the norm condition on $h_1, \ldots, h_d \in \mathcal{H}$ and $g_1, \ldots, g_d \in \mathcal{G}$ , respectively); see (Fukumizu et al., 2007a). This norm condition is relaxed into a penalization term in popular SSL objectives. + +Indeed, several SSL objectives can be written in an analogous variance-regularized covariance form. This may offer one intuitive viewpoint as to why estimators based on these objectives might exhibit similar statistical properties to those analyzed in Sec. 3. We first describe a format for these variance-regularized covariance objectives and show that a number of popular SSL objectives can be expressed in this form. + +Variance-Regularized Covariance Objectives. Recall that $\alpha : \mathcal{X} \to \mathbb{R}^d$ and $\beta : \mathcal{Z} \to \mathbb{R}^d$ denote encoders for $\mathcal{X}$ -valued and $\mathcal{Z}$ -valued objects (often images and text, respectively). We denote the standard Euclidean inner product by $\langle \pmb{u}, \pmb{v} \rangle = \sum_{j=1}^{d} u_j v_j$ in $\mathbb{R}^d$ . In either case, we consider a batch of data points $(\pmb{x}_1, \pmb{z}_1), \dots, (\pmb{x}_n, \pmb{z}_n)$ which are thought to be $n$ independent and identically distributed realizations of $(X, Z)$ from the probability distribution $Q_{X,Z}$ over $\mathcal{X} \times \mathcal{Z}$ . Let us then define the design matrices induced by the embeddings, written as + +$$ +\mathbf {A} := \left[ \begin{array}{c} - \boldsymbol {\alpha} (\boldsymbol {x} _ {1}) - \\ \vdots \\ - \boldsymbol {\alpha} (\boldsymbol {x} _ {n}) - \end{array} \right] \in \mathbb {R} ^ {n \times d} \text {a n d} \mathbf {B} := \left[ \begin{array}{c} - \boldsymbol {\beta} (\boldsymbol {z} _ {1}) - \\ \vdots \\ - \boldsymbol {\beta} (\boldsymbol {z} _ {n}) - \end{array} \right] \in \mathbb {R} ^ {n \times d}. +$$ + +Let $\mathbf{J} := \mathbf{I} - \frac{1}{n}\mathbf{1}\mathbf{1}^{\top} \in \mathbb{R}^{n \times n}$ be the centering matrix and construct the empirical auto-covariance and cross-covariance matrices + +$$ +\hat {\boldsymbol {\Sigma}} _ {A A} := (\mathbf {J} \mathbf {A}) ^ {\top} (\mathbf {J} \mathbf {A}), \quad \hat {\boldsymbol {\Sigma}} _ {B B} := (\mathbf {J} \mathbf {B}) ^ {\top} (\mathbf {J} \mathbf {B}), \quad \text {a n d} \quad \hat {\boldsymbol {\Sigma}} _ {A B} := (\mathbf {J} \mathbf {A}) ^ {\top} (\mathbf {J} \mathbf {B}). +$$ + +We aim to write the upcoming objectives in the form + +$$ +\mathcal {L} (\pmb {\alpha}, \pmb {\beta}) = - \mathbf {T r} \left(\hat {\pmb {\Sigma}} _ {A B}\right) + \kappa \| \bar {\pmb {\Sigma}} _ {A B} \| _ {\mathrm {F}} ^ {2} + V (\pmb {\alpha}, \pmb {\beta}), +$$ + +for hyperparameter $\kappa \geq 0$ , matrix $\bar{\Sigma}_{AB}$ (which is $\hat{\Sigma}_{AB}$ with its diagonal components set to zero), and variance-regularization term $V(\alpha, \beta)$ . The term $V(\alpha, \beta)$ may explicitly include the regularized inverses of $\hat{\Sigma}_{XX}$ and $\hat{\Sigma}_{ZZ}$ , or may penalize variance or non-smoothness more implicitly. + +Example 1: Multimodal InfoNCE (CLIP). Consider the empirical objective for the contrastive language-image pretraining (CLIP) model (Radford et al., 2021) with batch size $n$ , + +$$ +\hat {\mathcal {L}} _ {\mathrm {C L I P}} (\boldsymbol {\alpha}, \boldsymbol {\beta}) := - \frac {1}{n} \sum_ {i = 1} ^ {n} \left\langle \boldsymbol {\alpha} \left(\boldsymbol {x} _ {i}\right), \boldsymbol {\beta} \left(\boldsymbol {z} _ {i}\right) \right\rangle + \frac {1}{2} \log \sum_ {j = 1} ^ {n} e ^ {\left\langle \boldsymbol {\alpha} \left(\boldsymbol {x} _ {i}\right), \boldsymbol {\beta} \left(\boldsymbol {z} _ {j}\right) \right\rangle} + \frac {1}{2} \log \sum_ {j = 1} ^ {n} e ^ {\left\langle \boldsymbol {\alpha} \left(\boldsymbol {x} _ {j}\right), \boldsymbol {\beta} \left(\boldsymbol {z} _ {i}\right) \right\rangle} + \log n, +$$ + +where the $\log n$ factor is appended to normalize the sums in the logarithmic terms and does not change the minimizer. Following arguments used (e.g. by Li et al. (2021)) for the SimCLR objective—the single-modality counterpart to CLIP—we analyze the logarithmic terms via Tayler expansion. To simplify the analysis, take the large-sample limit to define the population objective + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {C L I P}} (\boldsymbol {\alpha}, \boldsymbol {\beta}) := - \mathbb {E} _ {P} \langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle \\ + \frac {1}{2} \mathbb {E} _ {P _ {X}} \left[ \log \mathbb {E} _ {P} \left[ e ^ {\langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle} | X \right] \right] + \frac {1}{2} \mathbb {E} _ {P _ {Z}} \left[ \log \mathbb {E} _ {P} \left[ e ^ {\langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle} | Z \right] \right]. \tag {98} \\ \end{array} +$$ + +Next, define the quantity $c(\pmb{x}) \coloneqq \mathbb{E}_{P_{XZ}}[\langle \pmb{\alpha}(X),\pmb{\beta}(Z)\rangle |X](\pmb{x})$ and apply a second-order Taylor expansion for every $\pmb{x} \in \mathcal{X}$ , the approximation + +$$ +\begin{array}{l} e ^ {\langle \boldsymbol {\alpha} (\boldsymbol {x}), \boldsymbol {\beta} (Z) \rangle} = e ^ {c (\boldsymbol {x})} e ^ {\langle \boldsymbol {\alpha} (\boldsymbol {x}), \boldsymbol {\beta} (Z) \rangle - c (\boldsymbol {x})} \\ \approx e ^ {c (\boldsymbol {x})} \left(1 + \langle \boldsymbol {\alpha} (\boldsymbol {x}), \boldsymbol {\beta} (Z) \rangle - c (\boldsymbol {x}) + \frac {1}{2} \left(\langle \boldsymbol {\alpha} (\boldsymbol {x}), \boldsymbol {\beta} (Z) \rangle - c (\boldsymbol {x})\right) ^ {2}\right). \\ \end{array} +$$ + +Plugging this approximation into the first term of (98) yields + +$$ +\log \mathbb {E} _ {P _ {Z}} \left[ e ^ {\langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle} | X \right] (\boldsymbol {x}) \approx c (\boldsymbol {x}) + \log \left(1 + \frac {1}{2} \mathbb {V} \operatorname {a r} \left(\langle \boldsymbol {\alpha} (\boldsymbol {x}), \boldsymbol {\beta} (Z) \rangle | X\right) (\boldsymbol {x})\right) +$$ + +Using the Taylor expansion $\log (1 + y) = y + o(y)$ centered at $y = 0$ , and evaluate the first-order approximation at $y = \frac{1}{2}\mathbb{Var}(\langle \pmb {\alpha}(\pmb {x}),\pmb {\beta}(Z)\rangle |X)(\pmb {x})$ , we finally have that + +$$ +\frac {1}{2} \mathbb {E} _ {P _ {X}} \left[ \log \mathbb {E} _ {P _ {Z}} \left[ e ^ {\langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle} | X \right] \right] \approx \frac {1}{2} \mathbb {E} _ {P} [ \langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle ] + \frac {1}{4} \mathbb {E} _ {P _ {X}} [ \operatorname {V a r} (\langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle | X) ]. +$$ + +Applying an identical argument to the second term of (98) gives + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {C L I P}} (\boldsymbol {\alpha}, \boldsymbol {\beta}) \approx - \left(\mathbb {E} _ {P} \langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle - \langle \mathbb {E} _ {P _ {X}} [ \boldsymbol {\alpha} (X) ], \mathbb {E} _ {P _ {Z}} [ \boldsymbol {\beta} (Z) ] \rangle\right) \\ + \frac {1}{4} \mathbb {E} _ {P _ {X}} [ \operatorname {V a r} (\langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle | X) ] + \frac {1}{4} \mathbb {E} _ {P _ {Z}} [ \operatorname {V a r} (\langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle | Z) ] \\ = - \operatorname {T r} \left(\operatorname {C o v} (\boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z))\right) + \frac {1}{4} \mathbb {E} _ {P _ {X}} \left[ \operatorname {V a r} \left(\langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle | X\right) \right] + \frac {1}{4} \mathbb {E} _ {P _ {Z}} \left[ \operatorname {V a r} \left(\langle \boldsymbol {\alpha} (X), \boldsymbol {\beta} (Z) \rangle | Z\right) \right]. \\ \end{array} +$$ + +which is the desired form for the population. Now, to rewrite the empirical version, we have + +$$ +\hat{\mathcal{L}}_{\text{CLIP}}(\boldsymbol {\alpha},\boldsymbol {\beta}) = \underbrace{-\operatorname{Tr}\left(\hat{\boldsymbol{\Sigma}}_{AB}\right)}_{\text{covariance}} + \underbrace{\frac{1}{4N}\sum_{i = 1}^{N}\widehat{\operatorname{Var}}_{N}\left(\langle\boldsymbol{\alpha}(X),\boldsymbol{\beta}(Z)\rangle |X\right)(\boldsymbol{x}_{i}) + \frac{1}{4N}\sum_{i = 1}^{N}\widehat{\operatorname{Var}}_{N}\left(\langle\boldsymbol{\alpha}(X),\boldsymbol{\beta}(Z)\rangle |Z\right)(\boldsymbol {z}_{i})}_{\text{variance regularization}}, +$$ + +where $\widehat{\mathbb{Var}}_N$ denotes the variance with respect to the empirical measure $\frac{1}{N}\sum_{i=1}^{N}\delta_{(\boldsymbol{x}_i,\boldsymbol{z}_i)}$ . + +Example 2: BarlowTwins. The BarlowTwins objective (Zbontar et al., 2021) has already been interpreted as an instance of kernel canonical correlations analysis (CCA) by previous work (e.g. by Balestriero and LeCun (2022)). This objective is usually defined in terms of the cross-correlation and auto-correlation matrices. To be consistent with other objectives in this section, we handle this by enforcing a constraint on the variance. Let $\iota_S: \mathbb{R}^{d \times d} \to \{0, +\infty\}$ denote the convex analytic indicator function such that $\iota(\bar{\Sigma}) = 0$ if $\bar{\Sigma} \in S$ and equals $+\infty$ otherwise. Let $\mathbf{I}$ be the identity matrix in $\mathbb{R}^{d \times d}$ . + +Given hyperparameter $\kappa > 0$ , the objective can be written + +$$ +\begin{array}{l} \hat {\mathcal {L}} _ {\mathrm {B T}} (\boldsymbol {\alpha}, \boldsymbol {\beta}) := \frac {1}{2} \sum_ {i = 1} ^ {d} \left((\hat {\boldsymbol {\Sigma}} _ {A B}) _ {i, i} - 1\right) ^ {2} + \kappa \| \bar {\boldsymbol {\Sigma}} _ {A B} \| _ {\mathrm {F}} ^ {2} + \iota_ {\{\mathbf {I} \}} (\bar {\boldsymbol {\Sigma}} _ {A A}) + \iota_ {\{\mathbf {I} \}} (\bar {\boldsymbol {\Sigma}} _ {B B}) \\ = \underbrace {- \mathbf {T r} (\hat {\boldsymbol {\Sigma}} _ {A B}) + \kappa \| \bar {\boldsymbol {\Sigma}} _ {A B} \| _ {\mathrm {F}} ^ {2}} _ {\text {c o v a r i a n c e}} + \underbrace {\sum_ {i = 1} ^ {d} (\hat {\boldsymbol {\Sigma}} _ {A B}) _ {i , i} ^ {2} + \frac {d}{2} + \iota_ {\{\mathbf {I} \}} (\bar {\boldsymbol {\Sigma}} _ {A A}) + \iota_ {\{\mathbf {I} \}} (\bar {\boldsymbol {\Sigma}} _ {B B})} _ {\text {v a r i a n c e r e g u l a r i z a t i o n}}. \\ \end{array} +$$ + +Thus, this objective falls into the class as well, as the penalties enforce a particular variance structure akin to the regularizers above. + +Example 3: Spectral Contrastive Loss. Finally, we consider the spectral contrastive loss from the pioneering work of HaoChen et al. (2021). This relates to similar viewpoints of contrastive learning as spectral methods found in the literature, such as the Laplacian eigenmap viewpoint of VICReg (Balestriero and LeCun, 2022, Section 3), the multidimensional scaling viewpoint of InfoNCE (Balestriero and LeCun, 2022, Section 4), or the recent spectral clustering viewpoint of SimCLR/CLIP (Tan et al., 2024, Sections 3 and 4). Recall that $\bar{\alpha} := \frac{1}{n}\sum_{i=1}^{n}\alpha(\boldsymbol{x}_i)$ and $\bar{\beta} := \frac{1}{n}\sum_{i=1}^{n}\beta(\boldsymbol{z}_i)$ . In the multimodal setting, this loss (HaoChen et al., 2021, Eq. (6)) can be written as + +$$ +\begin{array}{l} \hat {\mathcal {L}} _ {\mathrm {S C}} (\boldsymbol {\alpha}, \boldsymbol {\beta}) := - \frac {1}{n} \sum_ {i = 1} ^ {n} \langle \boldsymbol {\alpha} (\boldsymbol {x} _ {i}), \boldsymbol {\beta} (\boldsymbol {z} _ {i}) \rangle + \frac {1}{n (n - 1)} \sum_ {i \neq j} \left(\langle \boldsymbol {\alpha} (\boldsymbol {x} _ {i}), \boldsymbol {\beta} (\boldsymbol {z} _ {j}) \rangle\right) ^ {2} \\ = - \frac {1}{n} \sum_ {i = 1} ^ {n} \left\langle \boldsymbol {\alpha} (\boldsymbol {x} _ {i}) - \bar {\boldsymbol {\alpha}}, \boldsymbol {\beta} (\boldsymbol {z} _ {i}) - \bar {\boldsymbol {\beta}} \right\rangle - \left\langle \bar {\boldsymbol {\alpha}}, \bar {\boldsymbol {\beta}} \right\rangle \\ + \frac {1}{n (n - 1)} \sum_ {i \neq j} \left(\left\langle \boldsymbol {\alpha} (\boldsymbol {x} _ {i}) - \bar {\boldsymbol {\alpha}}, \boldsymbol {\beta} (\boldsymbol {z} _ {j}) - \bar {\boldsymbol {\beta}} \right\rangle\right) ^ {2} + \left(\left\langle \bar {\boldsymbol {\alpha}}, \bar {\boldsymbol {\beta}} \right\rangle\right) ^ {2} \\ = - \mathbf {T r} (\hat {\pmb {\Sigma}} _ {A B}) + \frac {1}{n - 1} \| \bar {\pmb {\Sigma}} _ {A B} \| _ {\mathrm {F}} ^ {2} - \left\langle \bar {\pmb {\alpha}}, \bar {\pmb {\beta}} \right\rangle + \left(\left\langle \bar {\pmb {\alpha}}, \bar {\pmb {\beta}} \right\rangle\right) ^ {2} \\ = \underbrace {- \mathbf {T r} (\hat {\mathbf {\Sigma}} _ {A B}) + \frac {1}{n - 1} \| \bar {\mathbf {\Sigma}} _ {A B} \| _ {\mathrm {F}} ^ {2}} _ {\text {c o v a r i a n c e}} + \underbrace {\left(\langle \bar {\boldsymbol {\alpha}}, \bar {\boldsymbol {\beta}} \rangle - \frac {1}{2}\right) ^ {2} - \frac {1}{4}} _ {\text {v a r i a n c e r e g u l a r i z a t i o n}} \\ \end{array} +$$ + +where we set $\kappa \coloneqq 1 / (n - 1)$ to complete the argument. + +Example 4: Multimodal VICReg. We use a variant of the VICReg objective shown in Shwartz-Ziv et al. (2023, Equation 1). Note that this method is typically designed for one encoder being applied to two augmentations of the same object; however, it naturally generalizes to the multimodal case. The similarity graph simply connects paired observations, leading to the invariance term below. The multimodal VICReg objective has hyperparameters $(c_{1}, c_{2}, c_{3}, \kappa)$ . To state it, define the real-valued function $r(x) := \max \{0, c_{1} - \sqrt{x + c_{2}}\}$ for $x \in \mathbb{R}$ . We will also apply $r$ to a matrix, which returns the matrix of element-wise applications of the function. The objective is written + +$$ +\hat {\mathcal {L}} _ {\mathrm {V I C R e g}} (\boldsymbol {\alpha}, \boldsymbol {\beta}) = \frac {c _ {3}}{2 d} \underbrace {\left[ \mathbf {T r} \left(r (\hat {\boldsymbol {\Sigma}} _ {A A})\right) + \mathbf {T r} \left(r (\hat {\boldsymbol {\Sigma}} _ {B B})\right) \right]} _ {\text {v a r i a n c e}} + \frac {1}{2 n} \underbrace {\| \mathbf {A} - \mathbf {B} \| _ {\mathrm {F}} ^ {2}} _ {\text {i n v a r i a n c e}} + \underbrace {\kappa \| \bar {\boldsymbol {\Sigma}} _ {A B} \| _ {\mathrm {F}} ^ {2}} _ {\text {c o v a r i a n c e}}. +$$ + +While usually thought of as capturing a separate property, we will incorporate the invariance term into the other two terms, which crucially relies on having an extra degree of freedom via the second encoder (as opposed to the single-modality + +setting). Define $\bar{\alpha} := \frac{1}{n}\sum_{i=1}^{n}\alpha(\boldsymbol{x}_i)$ and $\bar{\beta} := \frac{1}{n}\sum_{i=1}^{n}\beta(\boldsymbol{z}_i)$ , then write + +$$ +\begin{array}{l} \frac {1}{2 n} \| \mathbf {A} - \mathbf {B} \| _ {\mathrm {F}} ^ {2} = \frac {1}{n} \sum_ {i = 1} ^ {n} \| \boldsymbol {\alpha} (\boldsymbol {x} _ {i}) - \boldsymbol {\beta} (\boldsymbol {z} _ {i}) \| _ {2} ^ {2} \\ = \frac {1}{2 n} \sum_ {i = 1} ^ {n} \| \boldsymbol {\alpha} (\boldsymbol {x} _ {i}) - \bar {\boldsymbol {\alpha}} - \boldsymbol {\beta} (\boldsymbol {z} _ {i}) + \bar {\boldsymbol {\beta}} \| _ {2} ^ {2} + \frac {1}{2} \| \bar {\boldsymbol {\alpha}} - \bar {\boldsymbol {\beta}} \| _ {2} ^ {2} \\ = \frac {1}{2} \mathbf {T r} (\hat {\boldsymbol {\Sigma}} _ {A A}) + \frac {1}{2} \mathbf {T r} (\hat {\boldsymbol {\Sigma}} _ {B B}) - 2 \mathbf {T r} (\hat {\boldsymbol {\Sigma}} _ {A B}) + \frac {1}{2} \| \bar {\alpha} - \bar {\beta} \| _ {2} ^ {2}. \\ \end{array} +$$ + +The final term $\| \bar{\alpha} -\bar{\beta}\| _2^2$ can harmlessly be dropped in the objective, as all other terms do not depend on the individual means. Thus, we can redefine our VICReg objective as + +$$ +\begin{array}{l} \hat {\mathcal {L}} _ {\mathrm {V I C R e g}} (\boldsymbol {\alpha}, \boldsymbol {\beta}) = \underbrace {- \mathbf {T r} \left(\hat {\boldsymbol {\Sigma}} _ {A B}\right) + \kappa \| \bar {\boldsymbol {\Sigma}} _ {A B} \| _ {\mathrm {F}} ^ {2}} _ {\text {c o v a r i a n c e}} \\ + \underbrace {\frac {1}{2} \left(\mathbf {T r} \left(\hat {\boldsymbol {\Sigma}} _ {A A}\right) + \mathbf {T r} \left(\hat {\boldsymbol {\Sigma}} _ {B B}\right)\right) + \frac {c _ {3}}{2 d} \left[ \mathbf {T r} \left(r (\hat {\boldsymbol {\Sigma}} _ {A A})\right) + \mathbf {T r} \left(r (\hat {\boldsymbol {\Sigma}} _ {B B})\right) \right]} _ {\text {v a r i a n c e r e g u l a r i z a t i o n}}, \\ \end{array} +$$ + +as intended. + +# F. Experimental Details + +This appendix accompanies Sec. 4 with further details of the study. Before describing the experiments, we comment one quantity appearing in the risk bounds that is not analyzed experimentally is the distribution shift error that passes $\mathbf{L}^2 (P_X)$ -norm to the $\mathbf{L}^2 (Q_X)$ -norm from Sec. 3. For this, we refer the reader to the host of empirical work at the intersection of FSL, attribute-based and prompting-based ZSP, and distribution shift (see Recht et al. (2019); Hendrycks and Dietterich (2019); Goyal et al. (2023) and references therein). + +# F.1. Compute Environment + +Experiments were run on a CPU/GPU workstation with 12 virtual cores, 126G of memory, and four NVIDIA Titan Xp GPUs with 12G memory each. The code was written in Python 3.10 with the environment given by the YAML file in the supplement. The OpenCLIP and CLIP Benchmark repositories were either used directly or adapted in our codebase. + +# F.2. Evaluation Datasets + +We use the following datasets as evaluation benchmarks for zero-shot image classification. Note that the following standard statistics describe their test sets. + +- Describable Textures Dataset (DTD): 1,880 examples labeled with 47 classes (Cimpoi et al., 2014). +- Flowers 102: 6,149 examples labeled with 102 classes. (Nilsback and Zisserman, 2008). +- FGVC Aircraft: 3,333 examples labeled with 100 classes (Maji et al., 2013). +- SUN397: 21,750 examples labeled with 397 classes (Xiao et al., 2010). +- ImageNet-1k: 100,000 examples labeled with 998 classes. (Deng et al., 2009). + +The ImageNet-Captions dataset (Fang et al., 2023) is also used for evaluation using a subset of 134,593 examples, whereas a 40,000 held-out subset is used to estimate the conditional means of the text embeddings. For the subsets of ImageNet-Captions, the exact filenames of the ImageNet-1k subsets are provided along with their captions. Image preprocessing for evaluation was done using the transformations in the PyTorch transforms module that were associated with each OpenCLIP model. + +For the experiment behind Fig. 3, we design three in-distribution sub-tasks by randomly selecting collections of 50 classes $(\mathcal{Y}_1,\mathcal{Y}_2,\mathcal{Y}_3)$ from each of 998 classes, reserving held-out prompting examples $(Z_{1},Y_{1}),\ldots ,(Z_{15,000},Y_{15,000})$ , 100 for each of 150 classes. Then, for task $i$ , using $M$ examples $j_{1}(\pmb {y}),\dots ,j_{M}(\pmb {y})$ selected randomly without replacement for $\pmb {y}\in \mathcal{Y}_i$ , we use the vector $\frac{1}{M}\sum_{m = 1}^{M}\beta (Z_{j_m(\pmb {y})})$ as the class embedding (projected to unit norm). Using an evaluation set of approximately 25,000 examples from each sub-task, we compute the classification accuracy of this approach. + +# F.3. Model Specification and Hyperparameters + +CLIP Architectures First, we specify which OpenCLIP models and pre-training sets were used. These models were chosen due to their range of top-1 zero-shot accuracies on the ImageNet-1k benchmark (as shown below). As opposed to already highly performant models ( $\geq 50\%$ on ImageNet-1k), these models benefited more from optimized prompting techniques in our initial experiments. + +
ModelOpenCLIP Model TagPre-Training Set TagImageNet-1k Top-1 Acc.
ResNet-50RN50yfcc15m28.11%
NLLB-CLIPnllb-clip-basev133.51%
ViT-B/32ViT-B-32datacomp_m_s128m_b4k32.81%
+ +Prompt-Generating Model We employed the meta-llama/Llama-3.2-1B-Instruct model publicly available on HuggingFace. For the purpose of generation, we used a top- $p$ hyperparameter of 0.9 and temperature hyperparameter of 0.99 for more diverse responses. Meta-prompting was based on the following instructions per dataset, which are slight variations of those used in Pratt et al. (2023): + +- Describable Textures Dataset (DTD): + +- "What does material look like?", +- "What does a surface look like?" +- "What does a ________________ texture look like?". +- "What does a ____ object look like?", +- "What does a _ pattern look like?" + +Flowers 102: + +- "Describe how to identify $a(n)$ —, a type of flower", +- "What does $a(n)$ _____flower looks like?" + +FGVC Aircraft: + +- "Describe $a(n)$ _ aircraft." +"Describe the _ aircraft." + +SUN397: + +- "Describe what $a(n)$ looks like." +- "How can you identify $a(n)$ ?" +- "Describe a photo of $a(n)$ ". +- "Describe the scene of $a(n)$ ." + +- ImageNet-1k: + +- "Describe what $a(n)$ looks like." +- "How can you identify $a(n)$ ?" +- "What does $a(n)$ look like?", +- "Describe an image from the Internet of $a(n)$ ", +- "Write a caption of an image of $a(n)$ + +The following additional instruction was appended for better-formatted responses: "Please format your response as one that contains only lower case letters and no special characters (including new lines, bold, and any markdown artifacts) other than a period ('') or commas (''). The response should be a single sentence ending in a period that is directed toward the final instruction in this message. Your sentence should be a minimum of three words and a maximum of thirty". + +Our reproducibility effort includes not only the full list of all 164,400 prompts generated from LlaMA 3, but the subset of prompts used for each class and each seed used to generate the figures in Sec. 4. + +# F.4. Derivation of Simulation Setting + +The data-generating process for $(X,Z,Y)$ in the simulation from Sec. 4 is as follows. Because we isolate the effect residual dependence in this simulation, we construct a joint distribution $P_{X,Y,Z}$ that satisfies Asm. 1, and moreover, such that $Q_{X,Z} = P_{X,Z}$ and $\rho_{Y,Z} = P_{Y,Z}$ . Let $\mathcal{Y} = \{0,1\}$ , indicating binary classification. We consider $\mathcal{X} = \mathcal{Z} = \mathbb{R}^d$ and a pair of Gaussian distributions $(P_{X,Z|Y=0}, P_{X,Z|Y=1})$ , where + +$$ +\left[ \begin{array}{l} X \\ Z \end{array} \right] \sim \mathcal {N} \left(\left[ \begin{array}{l} \boldsymbol {\mu} _ {X | y} \\ \boldsymbol {\mu} _ {Z | y} \end{array} \right], \left[ \begin{array}{l l} \mathbf {C} _ {X X | y} & \mathbf {C} _ {X Z | y} \\ \mathbf {C} _ {Z X | y} & \mathbf {C} _ {Z Z | y} \end{array} \right]\right) \text {g i v e n} Y = y. \tag {99} +$$ + +Then, the distribution is fully specified by mean vectors and covariance matrices along with the parameter $p = \mathbb{P} [Y = 1]$ . Letting $\mathcal{N}(\cdot ;\boldsymbol {\mu},\mathbf{C})$ indicate the density function of the $\mathcal{N}(\boldsymbol {\mu},\mathbf{C})$ distribution, the direct predictor is equal to + +$$ +p (\boldsymbol {x}) := \mathbb {E} _ {P _ {X, Y}} [ Y | X ] (\boldsymbol {x}) = \frac {p \mathcal {N} (\boldsymbol {x} ; \boldsymbol {\mu} _ {X \mid 1})}{p \mathcal {N} (\boldsymbol {x} ; \boldsymbol {\mu} _ {X \mid 1}) + (1 - p) \mathcal {N} (\boldsymbol {x} ; \boldsymbol {\mu} _ {X \mid 0})}. \tag {100} +$$ + +Similarly, the indirect predictor is given by + +$$ +\eta_ {\rho} (\boldsymbol {x}) = \mathbb {E} _ {P _ {X, Z}} \left[ \mathbb {E} _ {P _ {Z, Y}} [ Y | Z ] \mid X \right] (\boldsymbol {x}) = \mathbb {E} _ {P _ {X, Z}} [ p (Z) | X ] (\boldsymbol {x}), \tag {101} +$$ + +$$ +p (\boldsymbol {z}) = \frac {p \mathcal {N} (Z ; \boldsymbol {\mu} _ {Z \mid 1})}{p \mathcal {N} (Z ; \boldsymbol {\mu} _ {Z \mid 1}) + (1 - p) \mathcal {N} (Z ; \boldsymbol {\mu} _ {Z \mid 0})}. \tag {102} +$$ + +The expectation in (101) over $Z$ given $X = x$ can be evaluated via simulation based on the mixture model $P_{Z|X = x} = (1 - p(\pmb{x}))P_{Z|X = \pmb{x},Y = 0} + p(\pmb{x})P_{Z|X = \pmb{x},Y = 1}$ and the exact calculation + +$$ +Z \sim \mathcal {N} \left(\boldsymbol {\mu} _ {Z | \boldsymbol {y}} + \mathbf {C} _ {Z X | \boldsymbol {y}} \mathbf {C} _ {X X | \boldsymbol {y}} ^ {- 1} (\boldsymbol {x} - \boldsymbol {\mu} _ {X | \boldsymbol {y}}), \mathbf {C} _ {Z Z | \boldsymbol {y}} - \mathbf {C} _ {Z X | \boldsymbol {y}} \mathbf {C} _ {X X | \boldsymbol {y}} ^ {- 1} \mathbf {C} _ {X Z | \boldsymbol {y}}\right) \text {g i v e n} X = \boldsymbol {x}, Y = \boldsymbol {y}. +$$ + +Finally, the residual dependence $\mathbb{E}_{P_Z}\left[I(X;Y|Z)\right]$ can be computed by the following steps. First, notice that the conditional distribution of $X$ given $Z = z$ and $Y = y$ is given by + +$$ +X \sim \mathcal {N} \left(\boldsymbol {\mu} _ {X | \boldsymbol {y}} + \mathbf {C} _ {X Z | \boldsymbol {y}} \mathbf {C} _ {Z Z | \boldsymbol {y}} ^ {- 1} (\boldsymbol {z} - \boldsymbol {\mu} _ {Z | \boldsymbol {y}}), \mathbf {C} _ {X X | \boldsymbol {y}} - \mathbf {C} _ {X Z | \boldsymbol {y}} \mathbf {C} _ {Z Z | \boldsymbol {y}} ^ {- 1} \mathbf {C} _ {Z X | \boldsymbol {y}}\right). +$$ + +The likelihood ratio $S_{z}$ from (13) can be computed (where the evaluation at $x$ refers to the density) via + +$$ +\begin{array}{l} \mathrm {S} _ {\boldsymbol {z}} (\boldsymbol {x}, \boldsymbol {y}) = \frac {P _ {X \mid Y = \boldsymbol {y} , Z = \boldsymbol {z}} (\boldsymbol {x}) [ \boldsymbol {y} p (\boldsymbol {z}) + (1 - \boldsymbol {y}) (1 - p (\boldsymbol {z})) ]}{P _ {X \mid Z = \boldsymbol {z}} (\boldsymbol {x}) [ \boldsymbol {y} p (\boldsymbol {z}) + (1 - \boldsymbol {y}) (1 - p (\boldsymbol {z})) ]} \\ = \frac {P _ {X \mid Y = y , Z = z} (\boldsymbol {x})}{P _ {X \mid Z = z} (\boldsymbol {x})} \\ = \frac {P _ {X | Y = \boldsymbol {y} , Z = \boldsymbol {z}} (\boldsymbol {x})}{(1 - p (\boldsymbol {z})) P _ {X | Y = 0 , Z = \boldsymbol {z}} (\boldsymbol {x}) + p (\boldsymbol {z}) P _ {X | Y = 1 , Z = \boldsymbol {z}} (\boldsymbol {x})}. \\ \end{array} +$$ + +To simulate from the marginal $P_Z$ , we use the mixture $pP_{Z|Y = 1} + (1 - p)P_{Z|Y = 0}$ , after which (14) can be directly applied. To interpolate between the setting in which $X \perp Z|Y$ (the indirect predictor performs at chance) and $X \perp Y|Z$ (the + +indirect predictor is equivalent to the direct one), we use the setting + +$$ +\boldsymbol {\mu} _ {X | 0} = \frac {1}{2} \mathbf {1}, \quad \boldsymbol {\mu} _ {X | 1} = - \frac {1}{2} \mathbf {1}. +$$ + +Let $a, b > 0$ be constants and let $\theta \in [0,1]$ be a parameter. Then, we define + +$$ +\boldsymbol {\mu} _ {Z \mid 0} = 2 \theta a \boldsymbol {\mu} _ {X \mid 0}, \quad \boldsymbol {\mu} _ {Z \mid 1} = 2 \theta b \boldsymbol {\mu} _ {X \mid 1} +$$ + +$$ +\mathbf {C} _ {Z Z | 0} = a \mathbf {I}, \quad \mathbf {C} _ {Z X | 0} = \frac {\theta a}{2} \mathbf {I}, \quad \mathbf {C} _ {Z Z | 1} = b \mathbf {I}, \quad \mathbf {C} _ {Z X | 1} = \frac {\theta b}{2} \mathbf {I} +$$ + +and finally $\mathbf{C}_{XX|0} = (1 + \frac{a}{4})\mathbf{I}$ and $\mathbf{C}_{XX|1} = (1 + \frac{b}{4})\mathbf{I}$ . Due to Gaussianity, it is clear that + +$$ +\theta = 0 \Rightarrow \mathbf {C} _ {Z X | 0} = \mathbf {C} _ {Z X | 1} = \mathbf {0} \Rightarrow X \perp Z | Y = y \forall y. +$$ + +On the other hand, using the distribution of $X$ given $(Z,Y)$ , that is, + +$$ +X \sim \mathcal {N} \left(\boldsymbol {\mu} _ {X | y} + \mathbf {C} _ {X Z | y} \mathbf {C} _ {Z Z | y} ^ {- 1} (\boldsymbol {z} - \boldsymbol {\mu} _ {Z | y}), \mathbf {C} _ {X X | y} - \mathbf {C} _ {X Z | y} \mathbf {C} _ {Z Z | y} ^ {- 1} \mathbf {C} _ {Z X | y}\right) \text {g i v e n} Z = \boldsymbol {z}, Y = \boldsymbol {y}, +$$ + +we have that + +$$ +\theta = 1 \Rightarrow \left\{ \begin{array}{l} \boldsymbol {\mu} _ {X | 0} - \mathbf {C} _ {X Z | 0} \mathbf {C} _ {Z Z | 0} ^ {- 1} \boldsymbol {\mu} _ {Z | 0} = \boldsymbol {\mu} _ {X | 1} - \mathbf {C} _ {X Z | 1} \mathbf {C} _ {Z Z | 1} ^ {- 1} \boldsymbol {\mu} _ {Z | 1} \\ \mathbf {C} _ {X Z | 0} \mathbf {C} _ {Z Z | 0} ^ {- 1} = \mathbf {C} _ {X Z | 1} \mathbf {C} _ {Z Z | 1} ^ {- 1} \\ \mathbf {C} _ {X X | 0} - \mathbf {C} _ {X Z | 0} \mathbf {C} _ {Z Z | 0} ^ {- 1} \mathbf {C} _ {Z X | 0} = \mathbf {C} _ {X X | 1} - \mathbf {C} _ {X Z | 1} \mathbf {C} _ {Z Z | 1} ^ {- 1} \mathbf {C} _ {Z X | 1} \end{array} \right. \quad \Longrightarrow X \perp Y | Z = z \forall z, \tag {103} +$$ + +as the distribution of $X$ remains the same given either $Z = z, Y = 0$ or $Z = z, Y = 1$ . Thus, in the simulation, we interpolate between 0 and 1 for the value of $\theta$ . We set the parameters $a = 5$ and $b = 6$ simply to be different numbers for which $\mathbb{E}_{P_Z} [I(X;Y|Z)]$ can be computed in a numerically stable manner. We set $p = \frac{1}{2}$ and $d = 2$ . + +Finally, the lines labeled $CLIP$ and $VICReg$ in Fig. 2 indicate the predictors generated by training two MLP encoders using the corresponding objective on observations $\{(X_i,Z_i)\}_{i = 1}^N$ for $N = 10,000$ pre-training observations. The encoder had a single hidden layer of 16 units and an output dimension of $d$ . When performing classification, the prompting distribution used for the methods based on self-supervised learning is the true distribution of $Z|Y = y$ with $M = 500$ samples, allowing us to isolate residual dependence while incurring no prompt bias and negligible prompt variance. Each model was trained for 30 epochs with the AdamW optimizer at a learning rate of 0.01. In the case of the VICReg objective, we used the parameterization of the original paper (Bardes et al., 2022) with the settings $(\gamma ,\lambda ,\mu ,\nu ,\epsilon) = (1,25,25,1,0.0001)$ as per the authors' recommendations (see their Eq. (6)). \ No newline at end of file diff --git a/ageneralizationtheoryforzeroshotprediction/images.zip b/ageneralizationtheoryforzeroshotprediction/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..393c9b4e7d746ce75ad7d04de5c97d1be3a9e0c5 --- /dev/null +++ b/ageneralizationtheoryforzeroshotprediction/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48d30ea466fd2a5d0adfe523bbaa2f27f9b9c61234c32297e193bd30e4cd361d +size 2894069 diff --git a/ageneralizationtheoryforzeroshotprediction/layout.json b/ageneralizationtheoryforzeroshotprediction/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a3e05379ff67beadf12af802c31bd386b557d21b --- /dev/null +++ b/ageneralizationtheoryforzeroshotprediction/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a541a942be2f245ace91fdac80f6d525d69f4f93a886ee9595d3b64c4374bbc3 +size 3259439 diff --git a/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/537b1765-c226-4f2c-9ee6-97770f926cf1_content_list.json b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/537b1765-c226-4f2c-9ee6-97770f926cf1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..bac9d234a9ebd595647ab67dc0aa4b762078f15c --- /dev/null +++ b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/537b1765-c226-4f2c-9ee6-97770f926cf1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72568fb421376211644a44793616855bc6b6b6ce6cbb336ad605a5d098256a27 +size 181645 diff --git a/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/537b1765-c226-4f2c-9ee6-97770f926cf1_model.json b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/537b1765-c226-4f2c-9ee6-97770f926cf1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6f2113929e64d6287d23d3a39dc9856c2711e9f1 --- /dev/null +++ b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/537b1765-c226-4f2c-9ee6-97770f926cf1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e45165405359d65b1cff63b8e25dd6c3d1e3727ca5dec22d7c0501385263558 +size 224647 diff --git a/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/537b1765-c226-4f2c-9ee6-97770f926cf1_origin.pdf b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/537b1765-c226-4f2c-9ee6-97770f926cf1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e6e388f87d6d7d5ed7250f51783ce87d67485f9b --- /dev/null +++ b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/537b1765-c226-4f2c-9ee6-97770f926cf1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:436e3e17bf9b371af0ed8e2dab48bf983f15d3ee6a3842cf29d91423e047b390 +size 979057 diff --git a/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/full.md b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e89d32a2a8b7a50f16aaa2e899434fd39ff22748 --- /dev/null +++ b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/full.md @@ -0,0 +1,755 @@ +# A General Representation-Based Approach to Multi-Source Domain Adaptation + +Ignavier $\mathbf{Ng}^{*1}$ Yan Li $^{*2}$ Zijian Li $^{12}$ Yujia Zheng $^{1}$ Guangyi Chen $^{12}$ Kun Zhang $^{12}$ + +# Abstract + +A central problem in unsupervised domain adaptation is determining what to transfer from labeled source domains to an unlabeled target domain. To handle high-dimensional observations (e.g., images), a line of approaches use deep learning to learn latent representations of the observations, which facilitate knowledge transfer in the latent space. However, existing approaches often rely on restrictive assumptions to establish identifiability of the joint distribution in the target domain, such as independent latent variables or invariant label distributions, limiting their real-world applicability. In this work, we propose a general domain adaptation framework that learns compact latent representations to capture distribution shifts relative to the prediction task and address the fundamental question of what representations should be learned and transferred. Notably, we first demonstrate that learning representations based on all the predictive information, i.e., the label's Markov blanket in terms of the learned representations, is often underspecified in general settings. Instead, we show that, interestingly, general domain adaptation can be achieved by partitioning the representations of Markov blanket into those of the label's parents, children, and spouses. Moreover, its identifiability guarantee can be established. Building on these theoretical insights, we develop a practical, nonparametric approach for domain adaptation in a general setting, which can handle different types of distribution shifts. + +# 1. Introduction + +Unsupervised domain adaptation aims to transfer knowledge from labeled source domains to an unlabeled target domain, particularly in scenarios where the training and + +*Equal contribution ¹Carnegie Mellon University ²Mohamed bin Zayed University of Artificial Intelligence. + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +testing data distributions differ substantially. In a multi-source domain adaptation (MSDA) setup, each source domain $u \in \{1, \dots, M\}$ provides access to a labeled dataset $(\mathbf{x}^{(u)}, \mathbf{y}^{(u)}) = \{(\mathbf{x}_k^{(u)}, y_k^{(u)})\}_{k=1}^{m_u}$ , where $m_u$ represents the number of samples in domain $u$ . Here, the $i$ -th dimension of the feature vector $X$ is denoted as $X_i$ , and $x_{ik}^{(u)}$ corresponds to the value of the $i$ -th feature for the $k$ -th sample in domain $u$ . The goal is to train a classifier that generalizes to an unlabeled target domain, where only the feature vectors $\mathbf{x}^{\tau} = \{\mathbf{x}_k^\tau\}_{k=1}^m$ are available. + +Determining the joint distribution $P_{X,Y}^{\tau}$ in the target domain based solely on the marginal distribution $P_{X}^{\tau}$ is a fundamentally underdetermined problem. In the absence of additional assumptions, there are infinitely many possible joint distributions $P_{X,Y}^{\tau}$ that can align with the observed marginal distribution. Therefore, assumptions that connect the source and target domain distributions are essential for identifying the target joint distribution. Common approaches impose constraints to ensure a degree of similarity across these distributions. A widely adopted assumption is covariate shift (Pan & Yang, 2009), which asserts that the conditional distribution $P_{Y|X}$ remains consistent across domains while the marginal feature distribution $P_{X}$ varies. Alternatively, other frameworks account for variations in $P_{Y}$ or assume that transformations between the source and target features are linear (Zhang et al., 2015), offering additional ways to model domain relationships. + +To avoid restrictive parametric assumptions about the relationships between domains, the principle of minimal changes is often considered (Scholkopf et al., 2012; Zhang et al., 2013). This perspective is particularly effective when analyzed through the lens of the data generating process. For instance, when the underlying process is $Y \rightarrow X$ , the conditional distributions $P_{Y}$ and $P_{X|Y}$ can vary independently across domains. By factoring the joint distribution in this way, domain shifts can be represented in a parsimonious and structured manner. Moreover, changes in $P_{X|Y}$ are often constrained to lie on a low-dimensional manifold, further simplifying the problem (Stojanov et al., 2019). Advances in domain adaptation frameworks, particularly those leveraging multiple-domain data, have demonstrated the feasibility of uncovering the data-generating process and capturing these domain shifts (Huang et al., 2020; Zhang et al., 2020). + +With the increasing capabilities of deep learning, another prominent line of work leverages neural architectures to map high-dimensional features into a latent representation space, ensuring that the latent variables $Z$ are marginally invariant across domains. This approach is motivated by efficiency: by working in a lower-dimensional latent space, it aligns with the principle of minimal changes, as it only models the essential domain shifts while discarding irrelevant variations. A classifier can then be trained on the labeled source data to ensure that the latent space retains predictive information about the labels (Ben-David et al., 2010; Ganin & Lempitsky, 2015; Zhao et al., 2018; Li et al., 2024a). While this strategy enables domain alignment in the latent space, the joint distributions $P_{Z,Y}$ may still vary significantly across domains, potentially degrading performance in the target domain. To address this, several works employ generative models or disentanglement techniques for the latent representations (Cai et al., 2019a; Lu et al., 2021; Yin et al., 2025). However, these methods typically rely on assumptions on the data distributions such as exponential family, or lack guarantees of identifiability for the target joint distribution $P_{X,Y}^{\tau}$ or the learned representations, limiting their ability to recover the true data generating process. The lack of identifiability raises concerns about the trustworthiness and reliability of these approaches, particularly when applied to real-world scenarios involving complex domain shifts. + +Recent works by Kong et al. (2022) and Li et al. (2024b) have introduced theoretical frameworks that establish different types of identifiability results for latent representations in domain adaptation. They partition the latent space into different subspaces according to its connection with domains or labels. Although different types of identifiability results have been provided for identifying the latent representations and joint distribution in the target domain, these works often rely on restrictive assumptions such as independent latent variables or invariant label distributions, limiting their real-world applicability. + +In this work, we propose a general domain adaptation framework that learns compact latent representations to capture distribution shifts relative to the prediction task and address the fundamental question of what representations should be learned and transferred. Notably, we first demonstrate that learning representations based on all the predictive information, such as the label's Markov blanket in terms of the learned representations, is often underspecified for domain adaptation in general settings. Instead, we show that, interestingly, general domain adaptation can be achieved by partitioning the representations of Markov blanket into those of the label's parents, children, and spouses. Accordingly, we establish identifiability of the joint distribution in the target domain, by learning low-dimensional representations of the changing distributions. Building on these theoretical insights, we develop a practical, nonparametric framework + +for domain adaptation in a general setting, which can handle different types of distribution shifts. Finally, we validate our framework on real-world datasets, demonstrating that it outperforms existing methods. + +# 2. Related Works + +# 2.1. Domain Adaptation + +Domain adaptation (Patel et al., 2015; Wilson & Cook, 2020; Farahani et al., 2021) aims to transfer knowledge from labeled source domains to an unlabeled target domain, such that the model can generalize to the target domain. A classical approach is to learn domain-invariant representations (Ganin & Lempitsky, 2015; Bousmalis et al., 2016), which are extracted by aligning the features across different domains. For instance, Long et al. (2017; 2018) applied maximum mean pseudo-labels and kernel methods for domain alignment, while Tzeng et al. (2014) adopt an adaptation layer and domain confusion loss to learn domain-invariant representations. + +A different line of works relies on the assumption that conditional distributions $P(Z \mid Y)$ remain stable across domains, enabling the extraction of domain-invariant representations for each class (Chen et al., 2019b; a; Kang et al., 2020). For instance, Xie et al. (2018) minimize inter-class domain discrepancy, while Shu et al. (2018) constrains boundaries to avoid high-density regions via virtual adversarial domain adaptation. Target shift, where $P_{Y}$ varies across domains, has also been widely studied (Zhang et al., 2013; Lipton et al., 2018; Wen et al., 2020; Garg et al., 2020; Roberts et al., 2022). For instance, Tchet des Combes et al. (2020) developed theoretical guarantees for the transfer performance under generalized label shift, while Shui et al. (2021) proposed selecting relevant source domains based on conditional distribution similarity. + +Recent works incorporate causality into domain adaptation (Kong et al., 2022; Magliacane et al., 2018; Teshima et al., 2020; Chen & Buhlmann, 2021; Gong et al., 2016; Stojanov et al., 2019). For instance, Zhang et al. (2013; 2015) investigated target shift, conditional shift, and generalized target shift by assuming independent change for $P(Y)$ and $P(X \mid Y)$ . Cai et al. (2019a) learned disentangled semantic representations by leveraging causal generation process, while Stojanov et al. (2021) showed that domain-invariant features require domain knowledge, giving rise to their proposed domain-specific adversarial networks. These methods typically require restrictive assumptions and are not able to identify the latent variables with theoretical guarantees. + +# 2.2. Identification of Latent Variables + +The identifiability of latent variables remains a fundamental challenge, as they are generally unidentifiable without addi + +tional assumptions (Hyvärinen & Pajunen, 1999; Locatello et al., 2019). In the case of a linear mapping from latent to observed variables—known as independent component analysis (ICA)—identifiability can be achieved by assuming non-Gaussian latent variables (Comon, 1994; Hyvarinen et al., 2002). However, relaxing the linearity assumption leads to the ill-posed problem of nonlinear ICA (Hyvärinen & Pajunen, 1999; Hyvärinen et al., 2023). + +To address this, existing nonlinear ICA methods typically rely on sufficient variations in the latent variable distribution, often introduced through auxiliary variables such as time or domain indices (Hyvarinen & Morioka, 2016; 2017; Hyvarinen et al., 2019; Khemakhem et al., 2020). Alternative approaches constrain the mixing function, either by restricting it to specific function classes (Hyvarinen & Pajunen, 1999; Taleb & Jutten, 1999; Gresele et al., 2021; Buchholz et al., 2022) or enforcing sparsity (Zheng et al., 2022). + +More recently, causal representation learning has extended beyond ICA by considering causally-related latent variables instead of independent ones (Scholkopf et al., 2021). Similar to nonlinear ICA, many approaches in this area leverage sufficient variations in the latent variable distributions, typically induced by interventions (Ahuja et al., 2023; Squires et al., 2023; von Kugelgen et al., 2023; Jiang & Aragam, 2023; Zhang et al., 2023; Varici et al., 2023; Varici et al., 2024a,b; Jin & Syrgkanis, 2023; Bing et al., 2024; Zhang et al., 2024), temporal data (Yao et al., 2022a,b; Lippe et al., 2022; 2023), or both (Lachapelle et al., 2022; 2024). Other approaches rely on counterfactual view (Brehmer et al., 2022), multi-view data (Yao et al., 2024; Xu et al., 2024), more supervision information (Yang et al., 2021; Shen et al., 2022; Liang et al., 2023), causal ordering prior (Kori et al., 2023), constraint on the latent support (Ahuja et al., 2023; Wang & Jordan, 2021), or structural constraints (Silva et al., 2006; Xie et al., 2020; Cai et al., 2019b; Xie et al., 2022; Adams et al., 2021; Huang et al., 2022; Dong et al., 2023; Kivva et al., 2021). + +# 3. A Generative Model with Distribution Shift + +We assume that the $d$ -dimensional feature vector $X$ (e.g., image pixels) is generated from latent variables $Z = (Z_{1}, \ldots, Z_{n})$ via an unknown, smooth, and invertible mixing function $g: \mathbb{R}^n \to \mathbb{R}^d$ . Also, the label $Y$ is a categorical value that takes values from $v_{1}, \ldots, v_{C}$ . In each domain, the latent variables $Z$ and the label $Y$ are governed by a structural equation model (SEM) that shares the same but unknown directed acyclic graph (DAG) $\mathcal{G}$ . The data-generating process can be summarized as follows: + +$$ +\begin{array}{l} \text {(M i x i n g)} \quad X = g (Z), \end{array} +$$ + +$$ +\begin{array}{l} Z _ {i} = f _ {i} \left(\mathrm {P A} \left(Z _ {i}; \mathcal {G}\right), \epsilon_ {i}; \theta_ {i} ^ {(u)}\right), i \in [ n ], \tag {SEM} \\ Y = f _ {Y} (\mathrm {P A} (Y; \mathcal {G}), \epsilon_ {Y}; \theta_ {Y} ^ {(u)}). \\ \end{array} +$$ + +![](images/5143fd9f7bcb682969c39d64ae70fc80b32c185c4d9f82fda3c648a69d28194b.jpg) +Figure 1: An example of the generative process considered in our work. The feature vector $X$ is generated from latent variables $Z$ , which, along with the label $Y$ , follow a structural equation model. The causal mechanisms, governed by parameters $\theta_{i}^{(u)}$ and $\theta_{Y}^{(u)}$ , may shift across domains. Here, $X$ and the domain index $u$ are observable. Furthermore, the label $Y$ is available in the source domains but remains unobserved in the target domain. For this example, we have $Z_{\mathrm{mb}} = \{Z_2,Z_3,Z_4\}$ , $Z_{\mathrm{pa}} = \{Z_2\}$ , $Z_{\mathrm{ch}} = \{Z_3\}$ , $Z_{\mathrm{sps}} = \{Z_4\}$ , and $Z_{\mathrm{mb}}^{\mathcal{C}} = \{Z_1\}$ . To illustrate these latent variables, consider an example from PACS benchmark (Li et al., 2017): $Y$ represents whether it is a horse, while $Z_{2}$ captures key defining features (e.g., a horse's head or horseshoes), and $Z_{3}$ represents attributes influenced by the horse (e.g., a saddle). Meanwhile, $Z_{1}$ and $Z_{4}$ can represent background elements. + +Here, $\mathrm{PA}(Z_i; \mathcal{G})$ and $\mathrm{PA}(Y; \mathcal{G})$ represent the parents of $Z_i$ and $Y$ , respectively, in the DAG $\mathcal{G}$ . The $\epsilon_i$ 's are mutually independent exogenous noise variables, and $\theta_i^{(u)}$ denotes the effective parameters (or latent factors) associated with each structural equation in the $u$ -th domain. The generative process of each latent variable $Z_i$ may vary across domains, with the variation being determined by the corresponding parameters $\theta_i^{(u)}$ . Such variability is common in practice, e.g., arising from heterogeneous datasets, where the causal mechanisms may shift. An example of the generative process is depicted in Figure 1. + +Let $P_{X,Y}(X,Y;\theta^{(u)})$ and $P_{Z,Y}(Z,Y;\theta^{(u)})$ represent the joint distributions of $X,Y$ and $Z,Y$ , respectively, in the $u$ -th domain. When the context is clear, we omit the subscript for simplicity, and write $P^{(u)}(X,Y)$ and $P^{(u)}(Z,Y)$ , respectively. We also assume that $P_{Z,Y}$ and $\mathcal{G}$ satisfy the faithfulness assumption (Spirtes et al., 2001), and that $P_Z$ is third-order differentiable and positive everywhere on $\mathbb{R}^n$ . + +Furthermore, we denote by $Z_{\mathrm{mb}}$ , $Z_{\mathrm{pa}}$ , $Z_{\mathrm{ch}}$ , and $Z_{\mathrm{sps}}$ the Markov blanket1, parents, children, and spouses of label $Y$ , respectively. Also, let $Z_{\mathrm{mb}}^{\mathbb{C}}$ denote the remaining latent + +variables outside the Markov blanket of $Y$ , and $\mathcal{M}$ be the Markov network over latent variables $Z$ and label $Y$ , whose edges are denoted by $\mathcal{E}(\mathcal{M})$ . We define $\theta_{\mathrm{mb}} = (\theta_i)_{Z_i \in Z_{\mathrm{mb}}}$ and similarly for $\theta_{\mathrm{pa}}$ , $\theta_{\mathrm{ch}}$ , and $\theta_{\mathrm{sps}}$ . We also denote by $\hat{Z}$ , $\hat{\mathcal{G}}$ , and $\hat{\mathcal{M}}$ the learned latent variables, learned DAG, and learned Markov networks, respectively. + +# 4. Identifiability Theory + +We present the identifiability theory for domain adaptation in a universal setting, where changes are allowed to occur anywhere in the latent space without restrictions. It is worth noting that specific types of domain shifts can be captured by imposing constraints on where changes occur. For instance: + +- Restricting changes to the parents of $Y$ can be viewed as the covariate shift setting (Shimodaira, 2000). +- Restricting changes to $Y$ itself can be viewed as the target shift (Zhang et al., 2013) or prior probability shift (Storkey, 2009) problem. +- Restricting changes to the children of $Y$ can be viewed as the conditional shift (Zhang et al., 2013) problem. + +In contrast, our work considers the most general scenario, where changes may occur anywhere in the latent space, without imposing any specific restrictions. + +In Section 4.1, we discuss how learning latent representations of the label's Markov blanket enables adaptation to certain types of domain shifts, while highlighting why this approach is often insufficient for domain adaptation. We then propose an alternative approach in Section 4.2 that involves learning latent representations of the label's parents, children, and spouses. Finally, in Section 4.3, we provide the identifiability guarantee for this approach. + +# 4.1. Subspace Identifiability of Latent Representations for Label's Markov Blanket + +With the advent of deep learning and its widespread adoption, many approaches leverage deep learning to learn compact latent representations of observations (Ganin & Lempitsky, 2015). These representations facilitate knowledge transfer in the latent space, enabling more efficient and effective transfer. The critical goal is then to learn latent representations that retain predictive information about $Y$ . A traditional view is that the Markov blanket contains all information sufficient for predicting the target variable. Building on this perspective, a natural approach is to learn representations that correspond to the Markov blanket of the label $Y$ . + +More specifically, the aim is to learn a representation $\hat{Z}_{\mathrm{mb}}$ that is an invertible transformation of the label's Markov + +blanket $Z_{\mathrm{mb}}$ , ensuring that $\hat{Z}_{\mathrm{mb}}$ contains all and only the information in $Z_{\mathrm{mb}}$ . If such a representation can be recovered, we say that $Z_{\mathrm{mb}}$ is subspace identifiable. With such a representation, the label $Y$ becomes conditionally independent of all other variables $Z_{\mathrm{mb}}^{\mathbb{C}}$ , given $\hat{Z}_{\mathrm{mb}}$ . This implies that $\hat{Z}_{\mathrm{mb}}$ captures all essential information required to predict $Y$ . Notably, this approach aligns with the feature selection literature (Yu et al., 2020), where the Markov blanket is recognized as the minimal predictive set for the target variable. + +However, recovering such a Markov blanket representation $\hat{Z}_{\mathrm{mb}}$ is challenging without additional assumptions, as latent variable modeling often admits many spurious solutions (Hyvärinen & Pajunen, 1999; Locatello et al., 2019). Fortunately, access to multi-domain data makes this recovery feasible. To achieve this, we rely on specific assumptions that require the distribution of latent variables to vary sufficiently across the source domains, formally described below. + +Assumption 1 (Sufficient changes for $Z$ ). For each value of $Z$ , there exist $2n + |\mathcal{M}| + 1$ values of $u$ , i.e., $u_{k}$ with $k = 0, \ldots, 2n + |\mathcal{M}|$ , such that the vectors $w(Z, u_{k}) - w(Z, u_{0})$ with $k = 1, \ldots, 2n + |\mathcal{M}|$ are linearly independent, where vector $w(Z, u)$ is defined as + +$$ +\begin{array}{l} w (Z, u) = \left(\frac {\partial \log P ^ {(u)} (Z , Y)}{\partial Z _ {i}}\right) _ {i \in [ n ]} \\ \oplus \left(\frac {\partial^ {2} \log P ^ {(u)} (Z , Y)}{\partial Z _ {i} ^ {2}}\right) _ {i \in [ n ]} \\ \oplus \left(\frac {\partial^ {2} \log P ^ {(u)} (Z , Y)}{\partial Z _ {i} \partial Z _ {j}}\right) _ {\{Z _ {i}, Z _ {j} \} \in \mathcal {E} (\mathcal {M}), i < j}. \\ \end{array} +$$ + +Assumption 2 (Sufficient changes for $Y$ ). For each value of $Z$ , there exist $|Z_{\mathrm{mb}}| + 1$ values of $(u, c)$ such that the vectors $\tau(Z, u_k, c_r) - \tau(Z, u_k, c_1)$ with $c_r \neq c_1$ are linearly independent, where vector $\tau(Z, u, c)$ is defined as + +$$ +\tau (Z, u, c) = \left(\frac {\partial \log P ^ {(u)} (Z , Y = v _ {c})}{\partial Z _ {i}}\right) _ {Z _ {i} \in Z _ {\mathrm {m b}}}. +$$ + +It is worth noting that different forms of sufficient change conditions have been adopted in nonlinear ICA (Hyvärinen et al., 2023) and causal representation learning (Schölkopf et al., 2021). These distribution changes, along with the invariant mixing function, offer valuable information for inferring the latent variables and their relations. We now provide identifiability theory to learn the latent representations for the label's Markov blanket. The proof is provided in Appendix A and is inspired by Zhang et al. (2024). Although we state the faithfulness assumption (Spirtes et al., 2001) in the theorem above and Theorem 2, it suffices to adopt the single adjacency-faithfulness (SAF) and single unshielded-collar-faithfulness (SUCF) assumptions (Ng et al., 2021; Zhang et al., 2024). These assumptions are + +considerably weaker than the faithfulness assumption and ensure that the Markov network $\mathcal{M}$ is the same as the normalized graph of the DAG $\mathcal{G}$ (Zhang et al., 2024, Proposition 2). + +Theorem 1 (Subspace identifiability of Markov blanket). Consider the generative process in Equation (1). Suppose that Assumptions 1 and 2, as well as the faithfulness assumption, hold. By modeling the same generative process with minimal number of edges for the learned Markov network $\hat{\mathcal{M}}$ , the learned Markov blanket $\hat{Z}_{\mathrm{mb}}$ is an invertible transformation of the true Markov blanket $Z_{\mathrm{mb}}$ . + +However, learning latent representations that correspond to the subspace of the label's Markov blanket is insufficient for domain adaptation in many scenarios. For instance, consider the factorization of the joint distribution $P(Z_{\mathrm{mb}},Y) = P(Y\mid Z_{\mathrm{mb}})P(Z_{\mathrm{mb}})$ . If $P(Z_{\mathrm{mb}})$ changes across domains while $P(Y\mid Z_{\mathrm{mb}})$ remains invariant, domain adaptation can be achieved by using the same classifier (with $Z_{\mathrm{mb}}$ or $\hat{Z}_{\mathrm{mb}}$ as input) trained on the source domains in the target domain. This corresponds to a scenario where the conditional distributions $P(Z_{\mathrm{pa}}\mid \mathrm{PA}(Z_{\mathrm{pa}};\mathcal{G}))$ or $P(Z_{\mathrm{sps}}\mid \mathrm{PA}(Z_{\mathrm{sps}};\mathcal{G}))$ change across domains, while $P(Y\mid Z_{\mathrm{ch}})$ and $P(Z_{\mathrm{ch}}\mid \mathrm{PA}(Z_{\mathrm{ch}};\mathcal{G}))$ remain invariant, which is clearly restrictive. + +Now consider an alternative scenario where the factorization is given by $P(Z_{\mathrm{mb}}, Y) = P(Z_{\mathrm{mb}} \mid Y)P(Y)$ , where $P(Z_{\mathrm{mb}} \mid Y)$ remains invariant across domains while $P(Y)$ changes. This is known as the target shift (Zhang et al., 2013) or prior probability shift (Storkey, 2009) problem. However, with subspace identifiability of the label's Markov blanket indicated by Theorem 1, we do not know which parts of the learned representations correspond to the label's children, spouses, or parents. In this case, one may also factorize the distribution as $P(Z_{\mathrm{mb}}, Y) = P(Y \mid Z_{\mathrm{mb}})P(Z_{\mathrm{mb}})$ , where both conditional distributions are allowed to change. Since $Y$ is not available in the target domain and $P(Y \mid Z_{\mathrm{mb}})$ changes, one no longer has identifiability of distribution $P(Z_{\mathrm{mb}}, Y)$ in the target domain. + +This motivates us to separate the representations of $Z_{\mathrm{mb}}$ into three different subspaces in the next subsection, allowing us to improve the identifiability and to have a more parsimonious representation of the changes. + +# 4.2. Subspace Identifiability of Latent Representations for Label's Parents, Children, and Spouses + +In the previous subsection, we demonstrated that learning latent representations corresponding to the subspace of the label's Markov blanket is often insufficient for domain adaptation. This limitation arises, in part, because such representations are overly coarse-grained. To address this issue, we propose a more fine-grained approach that involves learn- + +ing latent representations corresponding to three distinct subspaces of the label's Markov blanket: its parents, children, and spouses. Conceptually, this can be viewed as partitioning the Markov blanket into these three subspaces and focusing on recovering each subspace separately. In Section 4.3, we will show how such representations enable domain adaptation with identifiability guarantee in a universal setting. + +Before presenting the assumptions and identifiability theory, we first introduce the notion of an intimate neighbor. Specifically, a latent variable $Z_{i}$ is said to be an intimate neighbor of $Z_{j}$ if $Z_{i}$ is adjacent to $Z_{j}$ and to all other neighbors of $Z_{j}$ in $\mathcal{M}$ . Based on this, we introduce the following structural assumption on the latent DAG $\mathcal{G}$ : + +Assumption 3 (Group-specific intimate neighbors). The intimate neighbors of label $Y$ 's parents, children, and spouses can only have intimate neighbors—excluding $Y$ itself—within their respective groups, i.e., other parents, children, or spouses of $Y$ . + +This assumption is rather mild as it permits edges among the parents, children, and spouses of $Y$ , but restricts edges between intimate neighbors belonging to different groups. In practice, intimate neighbors may be relatively rare. This assumption is necessary because, without additional conditions, it is generally not possible to disentangle $Z_{i}$ from $Z_{j}$ if $Z_{i}$ is an intimate neighbor of $Z_{j}$ , as supported by the theory in Zhang et al. (2024). + +Next, we present the identifiability theory for learning representations of the subspaces corresponding to parents, children, and spouses. The proof is given in Appendix B. + +Theorem 2 (Subspace identifiability of parents, children, and spouses). Consider the generative process in Equation (1). Suppose that Assumptions 1, 2 and 3, as well as the faithfulness assumption, hold. By modeling the same generative process with minimal number of edges for the learned Markov network $\hat{\mathcal{M}}$ , there exists a partition of the learned Markov blanket $\hat{Z}_{\mathrm{mb}}$ , denoted as $\hat{Z}_{S_1}$ , $\hat{Z}_{S_2}$ , and $\hat{Z}_{S_3}$ , such that they are invertible transformations of the true parents $Z_{\mathrm{pa}}$ , children $Z_{\mathrm{ch}}$ , and spouses $Z_{\mathrm{sps}}$ , respectively. + +The above theorem implies that the latent representations of parents, children, and spouses can be disentangled, allowing for the recovery of their respective subspaces. In the next subsection, we explain how these representations facilitate domain adaptation in a universal setting with identifiability guarantee. + +# 4.3. Identifiability of Joint Distribution in Target Domain + +Building on the identifiability of latent representations established in Section 4.2, we now demonstrate how this facilitates domain adaptation with identifiability guarantees in a + +general setting. Specifically, the objective is to identify the joint distribution $P^{\tau}(X,Y)$ in the unlabeled target domain, or equivalently, $P^{\tau}(Y\mid X)$ , since $P^{\tau}(X)$ is already known in the target domain. + +To relate the conditional distribution $P^{\tau}(Y \mid X)$ at the level of raw observations $X$ to the latent representations, we first state the following proposition and provide the proof in Appendix C.1. + +Proposition 1. Consider the generative process in Equation (1). We have + +$$ +\begin{array}{l} P ^ {\tau} (Y = v _ {k} \mid X) \\ = \frac {P ^ {\tau} (Z _ {\mathrm {c h}} \mid Y = v _ {k} , Z _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {k} \mid Z _ {\mathrm {p a}})}{\sum_ {c = 1} ^ {C} P ^ {\tau} (Z _ {\mathrm {c h}} \mid Y = v _ {c} , Z _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {c} \mid Z _ {\mathrm {p a}})}. \\ \end{array} +$$ + +The above proposition implies that, to identify $P^{\tau}(Y \mid X)$ , it suffices to identify $P^{\tau}(Z_{\mathrm{ch}} \mid Y = v_c, Z_{\mathrm{sps}})$ and $P^{\tau}(Y \mid Z_{\mathrm{pa}})$ in the target domain. These conditional distributions are often simpler to model. However, the underlying latent variables $Z_{\mathrm{pa}}, Z_{\mathrm{ch}}$ , and $Z_{\mathrm{sps}}$ are not directly observable and cannot be exactly recovered. + +Fortunately, the identifiability theory developed in Section 4.2 shows that the subspaces corresponding to latent variables $Z_{\mathrm{pa}}$ , $Z_{\mathrm{ch}}$ , and $Z_{\mathrm{sps}}$ can be disentangled. Specifically, if one can learn representations $\hat{Z}_{\mathrm{pa}}$ , $\hat{Z}_{\mathrm{ch}}$ , and $\hat{Z}_{\mathrm{sps}}$ that are invertible transformations of $Z_{\mathrm{pa}}$ , $Z_{\mathrm{ch}}$ , and $Z_{\mathrm{sps}}$ , respectively, then we have the following result. + +Corollary 1. Consider the generative process in Equation (1). Let $\hat{Z}_{\mathrm{pa}}$ , $\hat{Z}_{\mathrm{ch}}$ , and $\hat{Z}_{\mathrm{sps}}$ be invertible transformations of $Z_{\mathrm{pa}}$ , $Z_{\mathrm{ch}}$ , and $Z_{\mathrm{sps}}$ , respectively. We have + +$$ +\begin{array}{l} P ^ {\tau} (Y = v _ {k} \mid X) \\ = \frac {P ^ {\tau} (\hat {Z} _ {\mathrm {c h}} \mid Y = v _ {k} , \hat {Z} _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {k} \mid \hat {Z} _ {\mathrm {p a}})}{\sum_ {c = 1} ^ {C} P ^ {\tau} (\hat {Z} _ {\mathrm {c h}} \mid Y = v _ {c} , \hat {Z} _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {c} \mid \hat {Z} _ {\mathrm {p a}})}. \\ \end{array} +$$ + +The proof is available in Appendix C.2. From the corollary above, it suffices to identify the subspaces of the latent variables $Z_{\mathrm{pa}}$ , $Z_{\mathrm{ch}}$ , and $Z_{\mathrm{sps}}$ up to invertible transformations, e.g., by leveraging the identifiability theory developed in Section 4.2. Furthermore, the corollary implies that it suffices to establish the identifiability of the conditional distributions $P^{\tau}(\hat{Z}_{\mathrm{ch}} \mid Y, \hat{Z}_{\mathrm{sps}})$ and $P^{\tau}(Y \mid \hat{Z}_{\mathrm{pa}})$ in the target domain. + +To ensure identifiability, we adopt the minimal change principle, which posits that the distributional changes across domains are confined to a low-dimensional manifold (Stojanov et al., 2019). Specifically, we assume that the conditional distributions are governed by a small number of identifiable changing parameters, inspired by Stojanov et al. (2019). This enables us to identify these parameters by learning low-dimensional representations of the conditional distributions that vary across the source domains. + +Assumption 4 (Low-dimensional changes). For each value of $v_{c}$ , the conditional distribution $P(Z_{\mathrm{ch}} \mid Y = v_{c}, Z_{\mathrm{sps}})$ contains only a finite number of identifiable parameters that vary across domains. Furthermore, there is a sufficiently large number of source domains. + +Similar to Stojanov et al. (2019), Assumption 4 implies the existence of a bijective transformation $h: \mathcal{P}_{\mathcal{Z}_{\mathrm{ch}}|Y,\mathcal{Z}_{\mathrm{sps}}} \to \mathbb{R}^q$ , where $q$ denotes the dimensionality of the effective changing parameters. Under this transformation, the conditional distribution in each domain $u$ can be expressed as a linear combination of the conditional distributions in the other source domains, i.e., $h(P_{Z_{\mathrm{ch}}|Y = v_c,Z_{\mathrm{sps}}}^{(u)}) = \sum_{i=1,i \neq u}^{M}\alpha_{ic}^{(u)}h(P_{Z_{\mathrm{ch}}|Y = v_c,Z_{\mathrm{sps}}}^{(i)})$ for some mixture weights $\alpha_{1c}^{(u)}, \ldots, \alpha_{Mc}^{(u)}$ . Similarly, for the target domain $\tau$ , there exist weights $\alpha_{1c}^{\tau}, \ldots, \alpha_{Mc}^{\tau}$ such that $h(P_{Z_{\mathrm{ch}}|Y = v_c,Z_{\mathrm{sps}}}^{\tau}) = \sum_{i=1}^{M}\alpha_{ic}^{\tau}h(P_{Z_{\mathrm{ch}}|Y = v_c,Z_{\mathrm{sps}}}^{(i)})$ . More intuitively, Assumption 4 indicates that all domain-specific conditional distributions (including source and target domains) for the label $v_c$ are confined to a $q$ -dimensional manifold. Therefore, each conditional distribution for domain $u$ can be characterized by the mixture weights $\alpha_{1c}^{(u)}, \ldots, \alpha_{Mc}^{(u)}$ . We denote the conditional distribution associated with weights $\alpha_c$ as $P^{\alpha_c}(Z_{\mathrm{ch}} | Y = v_c, Z_{\mathrm{sps}})$ . + +We also adopt the following assumption, which ensures that the changes in conditional distributions are linearly independent. This is a rather mild assumption which requires that the conditional distribution varies sufficiently when their parameters change; otherwise, such parameter changes will not leave a sufficient footprint on the distribution shifts. + +Assumption 5 (Linear independence). The elements in the set $\{\beta_c P^{\alpha_c}(Z_{\mathrm{ch}} \mid Y = v_c, Z_{\mathrm{sps}}) + \beta_c' P^{\alpha_c'}(Z_{\mathrm{ch}} \mid Y = v_c, Z_{\mathrm{sps}}); c = 1, \ldots, C\}$ are linearly independent for all $\alpha_c, \alpha_c', \beta_c, \beta_c', \beta_c + \beta_c' \neq 0$ , if they are not zero. + +With the assumptions above, we provide the identifiability result for the conditional distributions in the target domain. + +Theorem 3 (Identifiability of target distribution). Suppose that Assumptions 4 and 5 hold. Let $\hat{Z}_{\mathrm{pa}}$ , $\hat{Z}_{\mathrm{ch}}$ , and $\hat{Z}_{\mathrm{sps}}$ be invertible transformations of $Z_{\mathrm{pa}}$ , $Z_{\mathrm{ch}}$ , and $Z_{\mathrm{sps}}$ , respectively. Suppose that we learn $P^{new}$ to match $P^{\tau}(\hat{Z}_{\mathrm{ch}} \mid \hat{Z}_{\mathrm{pa}}, \hat{Z}_{\mathrm{sps}})$ in the target domain, i.e., $P^{new}(\hat{Z}_{\mathrm{ch}} \mid \hat{Z}_{\mathrm{pa}}, \hat{Z}_{\mathrm{sps}}) = P^{\tau}(\hat{Z}_{\mathrm{ch}} \mid \hat{Z}_{\mathrm{pa}}, \hat{Z}_{\mathrm{sps}})$ while constraining $P^{new}(\hat{Z}_{\mathrm{ch}} \mid Y, \hat{Z}_{\mathrm{sps}})$ to satisfy Assumption 4. Then, we have $P^{\tau}(\hat{Z}_{\mathrm{ch}} \mid Y, \hat{Z}_{\mathrm{sps}}) = P^{new}(\hat{Z}_{\mathrm{ch}} \mid Y, \hat{Z}_{\mathrm{sps}})$ and $P^{\tau}(Y \mid \hat{Z}_{\mathrm{pa}}) = P^{new}(Y \mid \hat{Z}_{\mathrm{pa}})$ . + +The proof is given in Appendix D and is inspired by Stojanov et al. (2019). The core idea is that the learned low-dimensional representations allow us to reconstruct the conditional distribution in the target domain using unlabeled data in the target domain. Combined with the linear independence assumption, this further facilitates label prediction + +![](images/02055d7ae895310f953b41490ffbd1b3fcb6ef66e0807a58b58803f06a23896f.jpg) +Figure 2: Overview of the General Approach for Multi-source Domain Adaptation (GAMA). The model first maps input images $X$ to a latent space $Z$ using a VAE framework. The latent variables $Z$ are partitioned into several components: $Z_{\mathrm{mb}}$ , $Z_{\mathrm{pa}}$ , $Z_{\mathrm{ch}}$ , and $Z_{\mathrm{sps}}$ . Two additional VAEs are employed to capture the relationships among the latent variables and label, which aids in estimating $\theta$ for improved predictions. For the three VAEs in total, we have the following losses: $\mathcal{L}_{\mathrm{vae}, Z} = \mathcal{L}_{\mathrm{KL}_1} + \mathcal{L}_{\mathrm{R}_1}$ , $\mathcal{L}_{\mathrm{vae}, Y} = \mathcal{L}_{\mathrm{R}_2}$ and $\mathcal{L}_{\mathrm{vae}, Z_{\mathrm{ch}}} = \mathcal{L}_{\mathrm{KL}_3} + \mathcal{L}_{\mathrm{R}_3}$ . Cross-entropy loss $\mathcal{L}_Y$ and mean squared error (MSE) loss $\mathcal{L}_{\mathrm{ch}}$ are also used in the source domains to encourage better encoding. The final prediction is made by training a classifier on the inputs $(Z_{\mathrm{pa}}, Z_{\mathrm{sps}}, Z_{\mathrm{ch}}, \theta_{Y}^{(u)}, \theta_{\mathrm{ch}}^{(u)})$ . + +in the target domain. It is worth noting that the result can be straightforwardly extended to multi-target domain adaptation by learning distinct $P^{\mathrm{new}}$ for each target domain. + +Remark 1. In summary, one can first utilize Theorem 2 to learn a demixing function $\hat{g}^{-1}$ (i.e., an encoder) that extracts latent representations of the label's parents, children, and spouses, up to certain indeterminacies. This same demixing function can then be applied to the target domain, where Theorem 3 guarantees the identifiability of the distributions $P^{\tau}(\hat{Z}_{\mathrm{ch}}\mid Y,\hat{Z}_{\mathrm{sps}})$ and $P^{\tau}(Y\mid \hat{Z}_{\mathrm{pa}})$ in the target domain. Finally, applying Corollary 1 ensures the identifiability of $P^{\tau}(Y\mid X)$ in the target domain. + +# 5. Domain Adaptation Approach + +Building on the theoretical insights established in the previous section, we propose a General Approach for Multisource domain Adaptation (GAMA) that systematically learns and identifies both latent variable structures and label information in all domains. Our approach incorporates + +representation learning to characterize distributional shifts across domains, drawing inspiration partly from the framework presented by Zhang et al. (2020). The approach operates through a principled multi-stage process grounded in identifiability theory and the necessity of isolating different components in the Markov blanket for accurate prediction of the target variable $Y$ . + +First, we use variational autoencoders (VAEs) to match the distributions across source and target domains, extracting the required latent representations. Subsequently, we employ additional VAE (Kingma & Welling, 2014) modules to explicitly model inter-variable dependencies within the latent space, enabling systematic decomposition into block-level components while simultaneously estimating domain-specific parameters $\theta$ . This design ensures that our framework effectively captures all variables constituting the Markov blanket of $Y$ , thereby facilitating robust cross-domain generalization and achieving accurate predictions in the target domain. Note that we use VAEs because they provide a convenient way to model the distribution of latent variables, and make it easier to incorporate prior structural information (e.g., parent-child relationships) into our method. + +We now describe the specific model architecture. We first take an input image $X$ and pass it through a backbone network (e.g., ResNet-50 (He et al., 2016)) to obtain a feature representation $E$ . An encoder $F_{Z}$ then maps $E$ into a latent space $Z$ . Since we adopt a VAE framework (Kingma & Welling, 2014), a decoder $G_{Z}$ is also introduced to reconstruct $E$ from $Z$ . The reconstruction loss from the VAE enforces consistency between the original feature representation $E$ and its reconstructed version, preserving essential information. Here, we have the loss $\mathcal{L}_{\mathrm{vae}, Z} = \mathcal{L}_{\mathrm{KL}_1} + \mathcal{L}_{\mathrm{R}_1}$ . Note that $\mathcal{L}_{\mathrm{R}}$ denotes reconstruction loss, while $\mathcal{L}_{\mathrm{KL}}$ denotes Kullback-Leibler (KL) divergence; the index indicates loss for different VAEs. For example, $\mathcal{L}_{\mathrm{KL}_1}$ denotes the KL divergence of the VAE from $X$ to $Z$ . + +We partition the latent variable $Z$ as + +$$ +Z = \left(Z _ {\mathrm {m b}} ^ {\complement}, Z _ {\mathrm {p a}}, Z _ {\mathrm {c h}}, Z _ {\mathrm {s p s}}\right) \in \mathbb {R} ^ {n}. +$$ + +According to Figure 1, we observe that, given $Z_{\mathrm{mb}}$ , the elements relevant to $Y$ still include $\theta_{Y}^{(u)}$ and $\theta_{\mathrm{ch}}^{(u)}$ . Once $\theta_{Y}^{(u)}$ and $\theta_{\mathrm{ch}}^{(u)}$ are accurately identified, combining them with $Z_{\mathrm{mb}}$ yields a stable prediction (since all relevant information is then obtained). + +Consider the data generation process involving $\theta_{Y}^{(u)}$ and $\theta_{\mathrm{ch}}^{(u)}$ : + +$$ +\left(\theta_ {Y} ^ {(u)}, Z _ {\mathrm {p a}}\right) \mapsto Y \quad \text {a n d} \quad \left(\theta_ {\mathrm {c h}} ^ {(u)}, Y, Z _ {\mathrm {s p s}}\right) \mapsto Z _ {\mathrm {c h}}. +$$ + +In each domain, these $\theta$ values are fixed parameters. Thus, we aim to learn $\theta$ and $Y$ so as to maximize $P(Z\mid \theta)$ and + +$P(Z,Y\mid \theta)$ in the target domain. Formally, it is given by + +$$ +\begin{array}{l} \max _ {\theta_ {Y} ^ {(u)}, \theta_ {\mathrm {c h}} ^ {(u)}, q _ {1}, q _ {2}} \left(\mathbb {E} _ {Y \sim q _ {1} (Y | Z _ {\mathrm {p a}}, \theta_ {Y} ^ {(u)})} \log p _ {1} (Z _ {\mathrm {p a}}, \theta_ {Y} ^ {(u)} \mid Y) \right. \\ - \beta_ {1} \operatorname {K L} \left(q _ {1} \left(Y \mid Z _ {\mathrm {p a}}, \theta_ {Y} ^ {(u)}\right) \| P (Y)\right) \\ + \mathbb {E} _ {Z _ {\mathrm {c h}} \sim q _ {2} (Z _ {\mathrm {c h}} | Z _ {\mathrm {s p s}}, Y, \theta_ {\mathrm {c h}} ^ {(u)})} \log p _ {2} (Z _ {\mathrm {s p s}}, Y, \theta_ {\mathrm {c h}} ^ {(u)} \mid Z _ {\mathrm {c h}}) \\ \left. - \beta_ {2} \operatorname {K L} \left(q _ {2} \left(Z _ {\mathrm {c h}} \mid Z _ {\mathrm {s p s}}, Y, \theta_ {\mathrm {c h}} ^ {(u)}\right) \| p (Z _ {\mathrm {c h}})\right)\right). \\ \end{array} +$$ + +Two VAEs are used here. Specifically, $(\theta_{Y}^{(u)}, Z_{\mathrm{pa}}) \mapsto Y$ involves an encoder $F_{Y}$ and a decoder $G_{Y}$ , while $(\theta_{\mathrm{ch}}^{(u)}, Y, Z_{\mathrm{sps}}) \mapsto Z_{\mathrm{ch}}$ involves an encoder $F_{Z_{\mathrm{ch}}}$ and a decoder $G_{Z_{\mathrm{ch}}}$ . We set $\beta_{1}$ and $\beta_{2}$ to 1. These lead to the losses $\mathcal{L}_{\mathrm{vae},Y}$ and $\mathcal{L}_{\mathrm{vae},Z_{\mathrm{ch}}}$ . Note that since $Y$ is discrete, we cannot assume that $P(Y)$ is a Gaussian distribution (which is commonly done in VAE estimation), and thus we use a Gumbel-Softmax VAE (Jang et al., 2017) which can convert the logit of $Y$ into continuous variables for further calculation. In the training stage, we treat $F_{Y}$ as the encoder producing $\hat{Y}$ . Since we have access to the ground truth labels $Y$ in the source domains, we simply calculate the cross-entropy between $Y$ and $\hat{Y}$ , giving rise to the losses $\mathcal{L}_Y$ and $\mathcal{L}_{\mathrm{vae},Y} = \mathcal{L}_{\mathrm{R}_2}$ . + +Furthermore, in the source domains, since we have access to the ground truth $Z_{\mathrm{ch}}$ , we have the following MSE loss based on the encoded values $\hat{Z}_{\mathrm{ch}}$ to better capture the relationships between variables and the ground truth: $\mathcal{L}_{\mathrm{ch}} = \mathrm{MSE}(Z_{\mathrm{ch}},\hat{Z}_{\mathrm{ch}})$ , where $\mathrm{MSE}(\cdot)$ denotes the mean squared error. Also, for the other VAE, we have $\mathcal{L}_{\mathrm{vae},Z_{\mathrm{ch}}} = \mathcal{L}_{\mathrm{KL}_3} + \mathcal{L}_{\mathrm{R}_3}$ . + +Finally, we can make the final prediction by using $\left(Z_{\mathrm{pa}},Z_{\mathrm{sps}},Z_{\mathrm{ch}},\theta_Y^{(u)},\theta_{\mathrm{ch}}^{(u)}\right)$ with loss $\mathcal{L}_{\mathrm{cls}}$ . In conclusion, we have the following loss during training, where $\lambda_1,\lambda_2,\lambda_3,\lambda_4$ and $\lambda_{5}$ are hyperparameters: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {a l l}} = \mathcal {L} _ {\text {c l s}} + \lambda_ {1} \mathcal {L} _ {\text {v a e}, Z} + \lambda_ {2} \mathcal {L} _ {\text {v a e}, Y} \\ + \lambda_ {3} \mathcal {L} _ {\text {v a e}, Z _ {\text {c h}}} + \lambda_ {4} \mathcal {L} _ {\text {c h}} + \lambda_ {5} \mathcal {L} _ {Y}. \\ \end{array} +$$ + +# 6. Experiments + +We show the effectiveness of our method compared with existing ones on widely used datasets in domain adaptation. Further details and empirical studies can be found in Appendix E. + +# 6.1. Datasets and Baselines + +Datasets. We validate our method on two well-known benchmarks for domain adaptation: OfficeHome (Venkateswara et al., 2017) and PACS (Li et al., 2017). In each dataset, a single domain is designated as the target, and the remaining domains serve as sources. For OfficeHome, we extract features using a pretrained ResNet50, + +then apply MLP-based VAEs alongside a classifier. Meanwhile, for PACS, we employ ResNet18 as the backbone and similarly integrate MLP-based VAEs and a classifier. All metrics are computed by averaging over three random seeds. + +Baselines. To assess performance, we compare against several baselines, including the Source Only (He et al., 2016) approach and single-source domain adaptation methods such as DAN (Long et al., 2015), MCD (Saito et al., 2018), and DANN+BSP (Chen et al., 2019c). We further evaluate our model against leading multi-source domain adaptation techniques, including M3SDA (Peng et al., 2019), CMSS (Yang et al., 2020), LtC-MSDA (Wang et al., 2020), and T-SVDNet (Li et al., 2021). Additionally, we incorporate comparisons with WADN (Shui et al., 2021), which handles target shift in multi-source scenarios, as well as iMSDA (Kong et al., 2022), a recent framework that leverages component-wise identification for MSDA. + +# 6.2. Numerical Results + +The results for Office-Home and PACS datasets are provided in Table 1. + +Office-Home dataset. GAMA achieves the best performance in most sub-tasks. On average, GAMA surpasses the strongest baseline (iMSDA) by a margin of $1\%$ . This is because our model tries to learn the pattern in the target domain while training. By effectively predicting $\theta$ , our method is able to make more accurate inferences, leading to better performance. + +PACS dataset. GAMA performs well for this dataset and achieves better accuracy than the best baseline on average. In particular, in the Photo domain, where the accuracy is already high, we have achieved an accuracy of $98.8\%$ , which means that we have further explored the potential of the data. + +# 6.3. Ablation Study + +To evaluate the effectiveness of our special design to capture $\theta$ in the target domain, we design two model variants: (1) GAMA-vae: we remove all the VAE related losses; (2) GAMA-theta: we remove the losses brought by $\theta$ -related VAEs: $\mathcal{L}_{\mathrm{vae},Y}$ , $\mathcal{L}_{\mathrm{vae},Z_{\mathrm{ch}}}$ , we also remove $\mathcal{L}_{\mathrm{ch}}$ , and $\mathcal{L}_Y$ as some items for calculating these losses are related to $\theta$ . Experiment results on the Office-Home dataset are shown in Table 2. It shows that the VAEs are essential for capturing information to perform adaptation. Moreover, with the $\theta$ -related VAEs, one observes an improved accuracy. + +# 7. Conclusion + +We develop a general, representation-based domain adaptation framework that can handle different types of distribution + +Table 1: Results on Office-Home (Ar, Cl, Pr, Rw) and PACS (P, A, C, S). A dash “-” indicates no reported result. Baseline results are taken from Kong et al. (2022). + +
MethodOffice-HomePACS
ArClPrRwAvgPACSAvg
DAN (Long et al., 2015)68.357.978.581.971.6-----
Source Only (He et al., 2016)64.652.377.680.768.894.574.972.164.776.6
DANN (Ganin et al., 2016)64.358.076.478.869.491.881.977.574.681.5
DCTN (Xu et al., 2018)66.961.879.277.871.4-----
MDAN (Zhao et al., 2018)-----91.479.176.072.079.6
WBN (Mancini et al., 2018)-----97.489.989.758.083.8
MCD (Saito et al., 2018)67.859.979.280.972.096.488.788.973.987.0
DANN+BSP (Chen et al., 2019c)66.161.078.179.971.3-----
M3SDA (Peng et al., 2019)66.258.679.581.471.497.389.389.976.788.3
CMSS (Yang et al., 2020)-----96.988.690.482.089.5
LtC-MSDA (Wang et al., 2020)-----97.290.290.581.589.8
T-SVDNet (Li et al., 2021)-----98.590.490.685.591.3
GeNRT (Deng et al., 2023)-----98.593.691.485.792.3
iLCC-LCS (Liu et al., 2022)-----95.986.481.186.087.4
WADN (Shui et al., 2021)75.261.083.584.476.1-----
CASR (Wang et al., 2023)72.261.182.882.874.7-----
TFFN (Li et al., 2023b)72.262.981.783.575.1-----
SSD (Li et al., 2023a)72.564.581.283.275.4-----
MIAN-γ (Park & Lee, 2021)69.964.280.981.574.1-----
iMSDA (Kong et al., 2022)75.461.483.584.576.298.593.892.589.293.5
GAMA (Ours)76.662.684.984.977.398.893.792.889.393.7
+ +Table 2: Ablation study on Office-Home comparing GAMA, GAMA-vae, and GAMA-theta. + +
MethodArClPrRwAvg
GAMA76.662.684.984.977.3
GAMA-vae74.960.583.484.875.9
GAMA-theta75.361.783.484.876.0
+ +shifts. Specifically, we show that learning subspace of the label's Markov blanket representations is often underspecified for domain adaptation in many scenarios. To achieve general domain adaptation, we show that one should partition the subspace of Markov blanket into the subspace of the label's parents, children, and spouses. We then establish identifiability of the joint distribution in the target domain. Our resulting method provides a practical solution to domain adaptation in general settings and outperforms existing methods on various benchmark datasets, highlighting its potential for broader applications. Future works include evaluating the method on larger-scale datasets and extending its application to diverse tasks, such as video, speech, and text. + +# Impact Statement + +Our paper presents a method for improving unsupervised domain adaptation to help AI models better transfer knowl- + +edge across different domains. The goal is to make models more efficient, especially in situations where labeled data is scarce. Our work does not introduce new ethical risks, as it focuses purely on enhancing the ability of AI systems to generalize across domains without affecting sensitive areas. This research aims to advance the field of machine learning, making it more practical and effective. + +# Acknowledgments + +The authors would like to thank the reviewers for their helpful comments. We would like to acknowledge the support from NSF Award No. 2229881, AI Institute for Societal Decision Making (AI-SDM), the National Institutes of Health (NIH) under Contract R01HL159805, and grants from Quris AI, Florin Court Capital, and MBZUAI-WIS Joint Program. IN acknowledges the support of the Natural Sciences and Engineering Research Council of Canada (NSERC) Postgraduate Scholarships – Doctoral program. + +# References + +Adams, J., Hansen, N., and Zhang, K. Identification of partially observed linear causal models: Graphical conditions for the non-gaussian and heterogeneous cases. Advances in Neural Information Processing Systems, 34: 22822-22833, 2021. + +Ahuja, K., Mahajan, D., Wang, Y., and Bengio, Y. Interventional causal representation learning. In International Conference on Machine Learning, 2023. +Ben-David, S., Blitzer, J., Crammer, K., Kulesza, A., Pereira, F., and Vaughan, J. W. A theory of learning from different domains. Machine learning, 79:151-175, 2010. +Bing, S., Ninad, U., Wahl, J., and Runge, J. Identifying linearly-mixed causal representations from multi-node interventions. In Conference on Causal Learning and Reasoning, 2024. +Bousmalis, K., Trigeorgis, G., Silberman, N., Krishnan, D., and Erhan, D. Domain separation networks. Advances in neural information processing systems, 29, 2016. +Brehmer, J., De Haan, P., Lippe, P., and Cohen, T. S. Weakly supervised causal representation learning. Advances in Neural Information Processing Systems, 35:38319-38331, 2022. +Buchholz, S., Besserve, M., and Schölkopf, B. Function classes for identifiable nonlinear independent component analysis. In Advances in Neural Information Processing Systems, 2022. +Cai, R., Li, Z., Wei, P., Qiao, J., Zhang, K., and Hao, Z. Learning disentangled semantic representation for domain adaptation. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, 2019a. +Cai, R., Xie, F., Glymour, C., Hao, Z., and Zhang, K. Triad constraints for learning causal structure of latent variables. Advances in neural information processing systems, 32, 2019b. +Chen, C., Chen, Z., Jiang, B., and Jin, X. Joint domain alignment and discriminative feature learning for unsupervised deep domain adaptation. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pp. 3296-3303, 2019a. +Chen, C., Xie, W., Huang, W., Rong, Y., Ding, X., Huang, Y., Xu, T., and Huang, J. Progressive feature alignment for unsupervised domain adaptation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 627-636, 2019b. +Chen, X., Wang, S., Long, M., and Wang, J. Transferability vs. discriminability: Batch spectral penalization for adversarial domain adaptation. In International conference on machine learning, pp. 1081-1090. PMLR, 2019c. +Chen, Y. and Buhlmann, P. Domain adaptation under structural causal models. The Journal of Machine Learning Research, 22(1):11856-11935, 2021. + +Comon, P. Independent component analysis - a new concept? Signal Processing, 36:287-314, 1994. +Deng, Z., Li, D., He, J., Song, Y.-Z., and Xiang, T. Generative model based noise robust training for unsupervised domain adaptation. arXiv preprint arXiv:2303.05734, 2023. +Dong, X., Huang, B., Ng, I., Song, X., Zheng, Y., Jin, S., Legaspi, R., Spirtes, P., and Zhang, K. A versatile causal discovery framework to allow causally-related hidden variables. In The Twelfth International Conference on Learning Representations, 2023. +Farahani, A., Voghoei, S., Rasheed, K., and Arabnia, H. R. A brief review of domain adaptation. In Stahlbock, R., Weiss, G. M., Abou-Nasr, M., Yang, C.-Y., Arabnia, H. R., and Deligiannidis, L. (eds.), Advances in Data Science and Information Engineering, pp. 877-894, Cham, 2021. Springer International Publishing. ISBN 978-3-030-71704-9. +Ganin, Y. and Lempitsky, V. Unsupervised domain adaptation by backpropagation. In International conference on machine learning, pp. 1180-1189. PMLR, 2015. +Ganin, Y., Ustinova, E., Ajakan, H., Germain, P., Larochelle, H., Laviolette, F., March, M., and Lempitsky, V. Domain-adversarial training of neural networks. Journal of machine learning research, 17(59):1-35, 2016. +Garg, S., Wu, Y., Balakrishnan, S., and Lipton, Z. A unified view of label shift estimation. Advances in Neural Information Processing Systems, 33:3290-3300, 2020. +Gong, M., Zhang, K., Liu, T., Tao, D., Glymour, C., and Schölkopf, B. Domain adaptation with conditional transferable components. In International conference on machine learning, pp. 2839-2848. PMLR, 2016. +Gresele, L., Von Kugelgen, J., Stimper, V., Schölkopf, B., and Besserve, M. Independent mechanism analysis, a new concept? Advances in neural information processing systems, 34:28233-28248, 2021. +He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778, 2016. +Huang, B., Zhang, K., Zhang, J., Ramsey, J., Sanchez-Romero, R., Glymour, C., and Scholkopf, B. Causal discovery from heterogeneous/nonstationary data. Journal of Machine Learning Research, 21(89):1-53, 2020. +Huang, B., Low, C. J. H., Xie, F., Glymour, C., and Zhang, K. Latent hierarchical causal structure discovery with rank constraints. Advances in Neural Information Processing Systems, 35:5549-5561, 2022. + +Hyvarinen, A. and Morioka, H. Unsupervised feature extraction by time-contrastive learning and nonlinear ica. Advances in neural information processing systems, 29, 2016. +Hyvarinen, A. and Morioka, H. Nonlinear ica of temporally dependent stationary sources. In Artificial Intelligence and Statistics, pp. 460-469. PMLR, 2017. +Hyvärinen, A. and Pajunen, P. Nonlinear independent component analysis: Existence and uniqueness results. Neural networks, 12(3):429-439, 1999. +Hyvarinen, A., Karhunen, J., and Oja, E. Independent component analysis. Studies in informatics and control, 11(2):205-207, 2002. +Hyvarinen, A., Sasaki, H., and Turner, R. Nonlinear ICA using auxiliary variables and generalized contrastive learning. In International Conference on Artificial Intelligence and Statistics, 2019. +Hyvärinen, A., Khemakhem, I., and Morioka, H. Nonlinear independent component analysis for principled disentanglement in unsupervised deep learning. *Patterns*, 4(10): 100844, 2023. ISSN 2666-3899. +Jang, E., Gu, S., and Poole, B. Categorical reparameterization with gumbel-softmax. In International Conference on Learning Representations, 2017. +Jiang, Y. and Aragam, B. Learning nonparametric latent causal graphs with unknown interventions. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. +Jin, J. and Syrgkanis, V. Learning causal representations from general environments: Identifiability and intrinsic ambiguity. arXiv preprint arXiv:2311.12267, 2023. +Kang, G., Jiang, L., Wei, Y., Yang, Y., and Hauptmann, A. Contrastive adaptation network for single-and multi-source domain adaptation. IEEE transactions on pattern analysis and machine intelligence, 44(4):1793-1804, 2020. +Khemakhem, I., Kingma, D., Monti, R., and Hyvarinen, A. Variational autoencoders and nonlinear ica: A unifying framework. In International conference on artificial intelligence and statistics, pp. 2207-2217. PMLR, 2020. +Kingma, D. P. and Welling, M. Auto-encoding variational Bayes. In International Conference on Learning Representations, 2014. +Kivva, B., Rajendran, G., Ravikumar, P., and Aragam, B. Learning latent causal graphs via mixture oracles. Advances in Neural Information Processing Systems, 34: 18087-18101, 2021. + +Kong, L., Xie, S., Yao, W., Zheng, Y., Chen, G., Stojanov, P., Akinwande, V., and Zhang, K. Partial disentanglement for domain adaptation. In International conference on machine learning, pp. 11455-11472. PMLR, 2022. +Kori, A., Sanchez, P., Vilouras, K., Glocker, B., and Tsaftaris, S. A. A causal ordering prior for unsupervised representation learning. arXiv preprint arXiv:2307.05704, 2023. +Lachapelle, S., López, P. R., Sharma, Y., Everett, K., Priol, R. L., Lacoste, A., and Lacoste-Julien, S. Disentangle-ment via mechanism sparsity regularization: A new principle for nonlinear ICA. Conference on Causal Learning and Reasoning, 2022. +Lachapelle, S., López, P. R., Sharma, Y., Everett, K., Priol, R. L., Lacoste, A., and Lacoste-Julien, S. Nonparametric partial disentanglement via mechanism sparsity: Sparse actions, interventions and sparse temporal dependencies. arXiv preprint arXiv:2401.04890, 2024. +Li, D., Yang, Y., Song, Y.-Z., and Hospedales, T. M. Deeper, broader and artier domain generalization. In Proceedings of the IEEE international conference on computer vision, pp. 5542-5550, 2017. +Li, K., Lu, J., Zuo, H., and Zhang, G. Multidomain adaptation with sample and source distillation. IEEE Transactions on Cybernetics, 54(4):2193-2205, 2023a. +Li, K., Lu, J., Zuo, H., and Zhang, G. Multi-source domain adaptation handling inaccurate label spaces. Neurocomputing, 594:127824, 2024a. +Li, R., Jia, X., He, J., Chen, S., and Hu, Q. T-svdnet: Exploring high-order prototypical correlations for multi-source domain adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9991-10000, 2021. +Li, Y., Wang, S., Wang, B., Hao, Z., and Chai, H. Transferable feature filtration network for multi-source domain adaptation. Knowledge-Based Systems, 260:110113, 2023b. +Li, Z., Cai, R., Chen, G., Sun, B., Hao, Z., and Zhang, K. Subspace identification for multi-source domain adaptation. Advances in Neural Information Processing Systems, 36, 2024b. +Liang, W., Kekic, A., von Kugelgen, J., Buchholz, S., Besserve, M., Gresele, L., and Scholkopf, B. Causal component analysis. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. +Lin, J. Factorizing multivariate function classes. Advances in neural information processing systems, 10, 1997. + +Lippe, P., Magliacane, S., Löwe, S., Asano, Y. M., Cohen, T., and Gavves, S. CITRIS: Causal identifiability from temporal intervened sequences. In International Conference on Machine Learning, 2022. +Lippe, P., Magliacane, S., Löwe, S., Asano, Y. M., Cohen, T., and Gavves, E. Causal representation learning for instantaneous and temporal effects in interactive systems. In The Eleventh International Conference on Learning Representations, 2023. +Lipton, Z., Wang, Y.-X., and Smola, A. Detecting and correcting for label shift with black box predictors. In International conference on machine learning, pp. 3122-3130. PMLR, 2018. +Liu, Y., Zhang, Z., Gong, D., Gong, M., Huang, B., Hengel, A. v. d., Zhang, K., and Shi, J. Q. Identifiable latent causal content for domain adaptation under latent covariate shift. arXiv preprint arXiv:2208.14161, 2022. +Locatello, F., Bauer, S., Lucic, M., Raetsch, G., Gelly, S., Schölkopf, B., and Bachem, O. Challenging common assumptions in the unsupervised learning of disentangled representations. In International conference on machine learning, pp. 4114-4124. PMLR, 2019. +Long, M., Cao, Y., Wang, J., and Jordan, M. Learning transferable features with deep adaptation networks. In International conference on machine learning, pp. 97-105. PMLR, 2015. +Long, M., Zhu, H., Wang, J., and Jordan, M. I. Deep transfer learning with joint adaptation networks. In International conference on machine learning, pp. 2208-2217. PMLR, 2017. +Long, M., CAO, Z., Wang, J., and Jordan, M. I. Conditional adversarial domain adaptation. In Bengio, S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi, N., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. +Lu, C., Wu, Y., Hernández-Lobato, J. M., and Schölkopf, B. Invariant causal representation learning for out-of-distribution generalization. In International Conference on Learning Representations, 2021. +Magliacane, S., Van Ommen, T., Claassen, T., Bongers, S., Versteeg, P., and Mooij, J. M. Domain adaptation by using causal inference to predict invariant conditional distributions. Advances in neural information processing systems, 31, 2018. +Mancini, M., Porzi, L., Bulo, S. R., Caputo, B., and Ricci, E. Boosting domain adaptation by discovering latent domains. In Proceedings of the IEEE conference on + +computer vision and pattern recognition, pp. 3771-3780, 2018. +Ng, I., Zheng, Y., Zhang, J., and Zhang, K. Reliable causal discovery with improved exact search and weaker assumptions. In Advances in Neural Information Processing Systems, 2021. +Pan, S. J. and Yang, Q. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10): 1345-1359, 2009. +Park, G. Y. and Lee, S. W. Information-theoretic regularization for multi-source domain adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9214-9223, 2021. +Patel, V. M., Gopalan, R., Li, R., and Chellappa, R. Visual domain adaptation: A survey of recent advances. IEEE Signal Processing Magazine, 32(3):53-69, 2015. doi: 10.1109/MSP.2014.2347059. +Peng, X., Bai, Q., Xia, X., Huang, Z., Saenko, K., and Wang, B. Moment matching for multi-source domain adaptation. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 1406-1415, 2019. +Roberts, M., Mani, P., Garg, S., and Lipton, Z. Unsupervised learning under latent label shift. Advances in Neural Information Processing Systems, 35:18763-18778, 2022. +Saito, K., Watanabe, K., Ushiku, Y., and Harada, T. Maximum classifier discrepancy for unsupervised domain adaptation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3723-3732, 2018. +Schölkopf, B., Janzing, D., Peters, J., Sgouritsa, E., Zhang, K., and Mooij, J. On causal and anticausal learning. In Proceedings of the 29th International Conference on International Conference on Machine Learning, pp. 459-466, 2012. +Schölkopf, B., Locatello, F., Bauer, S., Ke, N. R., Kalchbrenner, N., Goyal, A., and Bengio, Y. Towards causal representation learning. Proceedings of the IEEE, 109(5): 612-634, 2021. +Shen, X., Liu, F., Dong, H., Lian, Q., Chen, Z., and Zhang, T. Weakly supervised disentangled generative causal representation learning. Journal of Machine Learning Research, 23(241):1-55, 2022. +Shimodaira, H. Improving predictive inference under covariate shift by weighting the log-likelihood function. Journal of statistical planning and inference, 90(2):227-244, 2000. + +Shu, R., Bui, H. H., Narui, H., and Ermon, S. A DIRT approach to unsupervised domain adaptation. arXiv preprint arXiv:1802.08735, 2018. +Shui, C., Li, Z., Li, J., Gagné, C., Ling, C. X., and Wang, B. Aggregating from multiple target-shifted sources. In International Conference on Machine Learning, pp. 9638-9648. PMLR, 2021. +Silva, R., Scheines, R., Glymour, C., and Spirtes, P. Learning the structure of linear latent variable models. Journal of Machine Learning Research, 7(8):191-246, 2006. URL http://jmlr.org/papers/v7/silva06a.html. +Spirtes, P., Glymour, C., and Scheines, R. Causation, Prediction, and Search. MIT press, 2nd edition, 2001. +Squires, C., Seigal, A., Bhate, S. S., and Uhler, C. Linear causal disentanglement via interventions. In International Conference on Machine Learning, 2023. +Stojanov, P., Gong, M., Carbonell, J., and Zhang, K. Data-driven approach to multiple-source domain adaptation. In The 22nd International Conference on Artificial Intelligence and Statistics, pp. 3487-3496. PMLR, 2019. +Stojanov, P., Li, Z., Gong, M., Cai, R., Carbonell, J., and Zhang, K. Domain adaptation with invariant representation learning: What transformations to learn? Advances in Neural Information Processing Systems, 34:24791-24803, 2021. +Storkey, A. When Training and Test Sets Are Different: Characterizing Learning Transfer, pp. 3-28. 01 2009. ISBN 9780262170055. doi: 10.7551/mitpress/9780262170055.003.0001. +Strang, G. Linear Algebra and Its Applications. Thomson, Brooks/Cole, Belmont, CA, 4th edition, 2006. +Strang, G. Introduction to Linear Algebra. Wellesley-Cambridge Press, 5th edition, 2016. +Tachet des Combes, R., Zhao, H., Wang, Y.-X., and Gordon, G. J. Domain adaptation with conditional distribution matching and generalized label shift. Advances in Neural Information Processing Systems, 33:19276-19289, 2020. +Taleb, A. and Jutten, C. Source separation in post-nonlinear mixtures. IEEE Transactions on signal Processing, 47 (10):2807-2820, 1999. +Teshima, T., Sato, I., and Sugiyama, M. Few-shot domain adaptation by causal mechanism transfer. In International Conference on Machine Learning, pp. 9458-9469. PMLR, 2020. + +Tzeng, E., Hoffman, J., Zhang, N., Saenko, K., and Darrell, T. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv:1412.3474, 2014. +Varici, B., Acarturk, E., Shanmugam, K., Kumar, A., and Tajer, A. Score-based causal representation learning with interventions. arXiv preprint arXiv:2301.08230, 2023. +Varici, B., Acartürk, E., Shanmugam, K., Kumar, A., and Tajer, A. Score-based causal representation learning: Linear and general transformations. arXiv preprint arXiv:2402.00849, 2024a. +Varici, B., Acartürk, E., Shanmugam, K., and Tajer, A. Linear causal representation learning from unknown multi-node interventions. arXiv preprint arXiv:2406.05937, 2024b. +Venkateswara, H., Eusebio, J., Chakraborty, S., and Panchanathan, S. Deep hashing network for unsupervised domain adaptation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5018-5027, 2017. +von Kugelgen, J., Besserve, M., Wendong, L., Gresele, L., Kekic, A., Bareinboim, E., Blei, D., and Scholkopf, B. Nonparametric identifiability of causal representations from unknown interventions. In Advances in Neural Information Processing Systems, 2023. +Wang, H., Xu, M., Ni, B., and Zhang, W. Learning to combine: Knowledge aggregation for multi-source domain adaptation. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part VIII 16, pp. 727-744. Springer, 2020. +Wang, S., Wang, B., Zhang, Z., Heidari, A. A., and Chen, H. Class-aware sample reweighting optimal transport for multi-source domain adaptation. Neurocomputing, 523: 213-223, 2023. +Wang, Y. and Jordan, M. I. Desiderata for representation learning: A causal perspective. arXiv preprint arXiv:2109.03795, 2021. +Wen, J., Greiner, R., and Schuurmans, D. Domain aggregation networks for multi-source domain adaptation. In International Conference on Machine Learning, pp. 10214-10224. PMLR, 2020. +Wilson, G. and Cook, D. J. A survey of unsupervised deep domain adaptation. ACM Trans. Intell. Syst. Technol., 11 (5), July 2020. ISSN 2157-6904. doi: 10.1145/3400066. URL https://doi.org/10.1145/3400066. +Xie, F., Cai, R., Huang, B., Glymour, C., Hao, Z., and Zhang, K. Generalized independent noise condition for estimating latent variable causal graphs. In Advances in Neural Information Processing Systems, 2020. + +Xie, F., Huang, B., Chen, Z., He, Y., Geng, Z., and Zhang, K. Identification of linear non-gaussian latent hierarchical structure. In International Conference on Machine Learning, pp. 24370-24387. PMLR, 2022. +Xie, S., Zheng, Z., Chen, L., and Chen, C. Learning semantic representations for unsupervised domain adaptation. In International conference on machine learning, pp. 5423-5432. PMLR, 2018. +Xu, D., Yao, D., Lachapelle, S., Taslakian, P., von Kugelgen, J., Locatello, F., and Magliacane, S. A sparsity principle for partially observable causal representation learning. In International Conference on Machine Learning, 2024. +Xu, R., Chen, Z., Zuo, W., Yan, J., and Lin, L. Deep cocktail network: Multi-source unsupervised domain adaptation with category shift. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3964-3973, 2018. +Yang, L., Balaji, Y., Lim, S.-N., and Shrivastava, A. Curriculum manager for source selection in multi-source domain adaptation. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XIV 16, pp. 608-624. Springer, 2020. +Yang, M., Liu, F., Chen, Z., Shen, X., Hao, J., and Wang, J. CausalVAE: Disentangled representation learning via neural structural causal models. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021. +Yao, D., Xu, D., Lachapelle, S., Magliacane, S., Taslakian, P., Martius, G., von Kugelgen, J., and Locatello, F. Multiview causal representation learning with partial observability. In International Conference on Learning Representations, 2024. +Yao, W., Chen, G., and Zhang, K. Temporally disentangled representation learning. In Advances in Neural Information Processing Systems, 2022a. +Yao, W., Sun, Y., Ho, A., Sun, C., and Zhang, K. Learning temporally causal latent processes from general temporal data. In International Conference on Learning Representations, 2022b. +Yin, N., Wang, H., Yu, Y., Gao, T., Dhurandhar, A., and Ji, Q. Integrating markov blanket discovery into causal representation learning for domain generalization. In Computer Vision - ECCV 2024, 2025. +Yu, K., Guo, X., Liu, L., Li, J., Wang, H., Ling, Z., and Wu, X. Causality-based feature selection: Methods and evaluations. ACM Comput. Surv., 53(5), 2020. ISSN 0360-0300. + +Zhang, J., Greenewald, K., Squires, C., Srivastava, A., Shanmugam, K., and Uhler, C. Identifiability guarantees for causal disentanglement from soft interventions. Advances in Neural Information Processing Systems, 2023. +Zhang, K., Schölkopf, B., Muandet, K., and Wang, Z. Domain adaptation under target and conditional shift. In International conference on machine learning, pp. 819-827. Pmlr, 2013. +Zhang, K., Gong, M., and Scholkopf, B. Multi-source domain adaptation: a causal view. In Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence, pp. 3150-3157, 2015. +Zhang, K., Gong, M., Stojanov, P., Huang, B., Liu, Q., and Glymour, C. Domain adaptation as a problem of inference on graphical models. Advances in neural information processing systems, 33:4965-4976, 2020. +Zhang, K., Xie, S., Ng, I., and Zheng, Y. Causal representation learning from multiple distributions: A general setting. In International Conference on Machine Learning, 2024. +Zhao, H., Zhang, S., Wu, G., Moura, J. M., Costeira, J. P., and Gordon, G. J. Adversarial multiple source domain adaptation. Advances in neural information processing systems, 31, 2018. +Zheng, Y., Ng, I., and Zhang, K. On the identifiability of nonlinear ICA: Sparsity and beyond. In Advances in Neural Information Processing Systems, 2022. +Zheng, Y., Ng, I., Fan, Y., and Zhang, K. Generalized precision matrix for scalable estimation of nonparametric Markov networks. In The Eleventh International Conference on Learning Representations, 2023. + +# Supplementary Material + +# A. Proof of Theorem 1 + +To prove the following theorem, we begin by establishing several intermediate results that are useful. We first prove Proposition 2, which is used in the proof of Proposition 3. Building upon these two propositions, we then prove Proposition 4. Using Propositions 3 and 4, we proceed to establish Proposition 5. With these results, we are ready to prove the following theorem, leveraging Propositions 3 and 5. It is worth noting that the overall proof strategy is partly inspired by Zhang et al. (2024), while ours is considerably more complex as it involves the discrete target variable $Y$ (which is observed in the source domains). + +Theorem 1 (Subspace identifiability of Markov blanket). Consider the generative process in Equation (1). Suppose that Assumptions 1 and 2, as well as the faithfulness assumption, hold. By modeling the same generative process with minimal number of edges for the learned Markov network $\hat{\mathcal{M}}$ , the learned Markov blanket $\hat{Z}_{\mathrm{mb}}$ is an invertible transformation of the true Markov blanket $Z_{\mathrm{mb}}$ . + +Proof. Recall that $\hat{Z}$ denotes the recovered latent variables, $\hat{\mathcal{M}}$ denotes the recovered Markov network, and $\Psi_{Z_i}$ denotes the intimate neighbors of $Z_{i}$ . By Propositions 3 and 5, there exists a permutation $\pi$ of $\hat{Z}$ , denoted as $\hat{Z}_{\pi}$ , such that the following statements hold: + +(a) $\hat{Z}_{\pi (i)}$ is solely a function of a subset of $\{Z_i\} \cup \Psi_{Z_i}$ +(b) $\hat{\mathcal{M}}_{\pi}$ and $\mathcal{M}$ are identical. + +By Statement (b), under the faithfulness assumption (specifically the SAF and SUCF assumptions), the moralized graphs of $\hat{\mathcal{G}}$ and $\mathcal{G}$ are identical (Zhang et al., 2024, Proposition 2). Therefore, we have $Z_{i} \in Z_{\mathrm{mb}}$ if and only if $\hat{Z}_{\pi(i)} \in \hat{Z}_{\mathrm{mb}}$ . + +Now suppose $\hat{Z}_{\pi(i)} \in \hat{Z}_{\mathrm{mb}}$ , which, by above reasoning, implies $Z_i \in Z_{\mathrm{mb}}$ . By Statement (a), $\hat{Z}_{\pi(i)}$ is solely a function of a subset of $\{Z_i\} \cup \Psi_{Z_i}$ . Here, we aim to show $\Psi_{Z_i} \subseteq Z_{\mathrm{mb}}$ . Suppose $Z_j \in \Psi_{Z_i}$ . By definition, $Z_i$ and $Y$ are adjacent in the Markov network $\mathcal{M}$ , and thus $Z_j$ is also adjacent to $Y$ in $\mathcal{M}$ (because $Z_j$ is an intimate neighbor of $Z_i$ ). This implies $Z_j \in Z_{\mathrm{mb}}$ . Therefore, we have $\{Z_i\} \cup \Psi_{Z_i} \subseteq Z_{\mathrm{mb}}$ , i.e., $\hat{Z}_{\pi(i)}$ is solely a function of a subset of $Z_{\mathrm{mb}}$ . Since this holds for every $\hat{Z}_{\pi(i)} \in \hat{Z}_{\mathrm{mb}}$ , we conclude that $\hat{Z}_{\mathrm{mb}}$ is solely a function of a subset of $Z_{\mathrm{mb}}$ . + +Clearly, we can apply the same reasoning above (and Lemma 1) in the reverse direction to show that $Z_{\mathrm{mb}}$ is solely a function of a subset of $\hat{Z}_{\mathrm{mb}}$ . Since the transformation from $Z$ to $\hat{Z}$ is a diffeomorphism, we conclude that $\hat{Z}_{\mathrm{mb}}$ is an invertible transformation of $Z_{\mathrm{mb}}$ . + +# A.1. Proof of Proposition 2 + +While the proof for the following proposition is inspired by Zhang et al. (2024, Proposition 1), ours involves a discrete target variable $Y$ (that is observed in the source domains), which requires the usage of Zheng et al. (2023, Theorem 2) to handle it. + +Proposition 2. Consider the generative process in Equation (1). Suppose that Assumptions 1 and 2 hold. Let $\hat{Z}$ and $\hat{\mathcal{M}}$ be the recovered latent variables and the recovered Markov network, respectively. By modeling the same generative process, we have the following statements: + +(a) For each $Z_{i}$ and each $\{\hat{Z}_k,\hat{Z}_l\} \notin \mathcal{E}(\hat{\mathcal{M}})$ , we have + +$$ +\frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} \frac {\partial Z _ {i}}{\partial \hat {Z} _ {l}} = 0. +$$ + +(b) For each $\{Z_i, Z_j\} \in \mathcal{E}(\mathcal{M})$ and each $\{\hat{Z}_k, \hat{Z}_l\} \notin \mathcal{E}(\hat{\mathcal{M}})$ , we have + +$$ +\frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} \frac {\partial Z _ {j}}{\partial \hat {Z} _ {l}} = 0. +$$ + +(c) For each $\{Z_i,Y\} \in \mathcal{E}(\mathcal{M})$ and each $\{\hat{Z}_k,Y\} \notin \mathcal{E}(\hat{\mathcal{M}})$ , we have + +$$ +\frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} = 0. +$$ + +Proof. By definition, we have $X = g(Z)$ and $\hat{Z} = \hat{g}^{-1}(X)$ , where $g$ and $\hat{g}$ are diffeomorphisms. Thus, the transformation from $Z$ to $\hat{Z}$ , denoted by $v^{-1}$ , is a diffeomorphism. Also, we have $\hat{Y} = Y$ . By the change-of-variables formula, we obtain + +$$ +\log P (\hat {Z}, \hat {Y}) = \log P (Z, Y) + \log | \det J _ {v} |. +$$ + +The first-order derivative is + +$$ +\frac {\partial \log P (\hat {Z} , \hat {Y})}{\partial \hat {Z} _ {k}} = \sum_ {i = 1} ^ {n} \frac {\partial \log P (Z , Y)}{\partial Z _ {i}} \frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} + \frac {\partial \log | \det J _ {v} |}{\partial \hat {Z} _ {k}}. \tag {2} +$$ + +Let $\hat{Z}_k$ and $\hat{Z}_l$ be latent variables that are not adjacent in the recovered Markov network $\hat{\mathcal{M}}$ . The second-order derivative w.r.t. $\hat{Z}_k$ and $\hat{Z}_l$ is then given by + +$$ +\begin{array}{l} 0 = \sum_ {j = 1} ^ {n} \sum_ {i = 1} ^ {n} \frac {\partial^ {2} \log P (Z , Y)}{\partial Z _ {i} \partial Z _ {j}} \frac {\partial Z _ {j}}{\partial \hat {Z} _ {l}} \frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} + \sum_ {i = 1} ^ {n} \frac {\partial \log P (Z , Y)}{\partial Z _ {i}} \frac {\partial^ {2} Z _ {i}}{\partial \hat {Z} _ {k} \partial \hat {Z} _ {l}} + \frac {\partial^ {2} \log | \det J _ {v} |}{\partial \hat {Z} _ {k} \partial \hat {Z} _ {l}} \\ = \sum_{i = 1}^{n}\frac{\partial^{2}\log P(Z,Y)}{\partial Z_{i}^{2}}\frac{\partial Z_{i}}{\partial\hat{Z}_{l}}\frac{\partial Z_{i}}{\partial\hat{Z}_{k}} +\sum_{\substack{i,j:\\ i < j,\\ \{Z_{i},Z_{j}\} \in \mathcal{E}(\mathcal{M})}}\frac{\partial^{2}\log P(Z,Y)}{\partial Z_{i}\partial Z_{j}}\left(\frac{\partial Z_{j}}{\partial\hat{Z}_{l}}\frac{\partial Z_{i}}{\partial\hat{Z}_{k}} +\frac{\partial Z_{i}}{\partial\hat{Z}_{l}}\frac{\partial Z_{j}}{\partial\hat{Z}_{k}}\right) + \\ + \sum_ {i = 1} ^ {n} \frac {\partial \log P (Z , Y)}{\partial Z _ {i}} \frac {\partial^ {2} Z _ {i}}{\partial \hat {Z} _ {k} \partial \hat {Z} _ {l}} + \frac {\partial^ {2} \log | \det J _ {v} |}{\partial \hat {Z} _ {k} \partial \hat {Z} _ {l}}. \\ \end{array} +$$ + +In the derivation above, we leveraged the following property (Lin, 1997): if $\hat{Z}_k$ and $\hat{Z}_l$ are not adjacent in the Markov network $\hat{\mathcal{M}}$ , then they are conditionally independent given the remaining variables, which implies $\frac{\partial^2 \log P(\hat{Z}, \hat{Y})}{\partial \hat{Z}_k \partial \hat{Z}_l} = 0$ . Similarly, this is also the case for $Z_i$ and $Z_j$ . + +Now consider the $u_{r}$ and $u_{0}$ domains where $r = 1,\dots ,2n + |\mathcal{M}|$ , and take the difference between the equations that correspond to them: + +$$ +\begin{array}{l} 0 = \sum_ {i = 1} ^ {n} \left(\frac {\partial^ {2} \log P ^ {(u _ {r})} (Z , Y)}{\partial Z _ {i} ^ {2}} - \frac {\partial^ {2} \log P ^ {(u _ {0})} (Z , Y)}{\partial Z _ {i} ^ {2}}\right) \frac {\partial Z _ {i}}{\partial \hat {Z} _ {l}} \frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} \\ +\sum_{\substack{i,j:\\ i < j,\\ \{Z_{i},Z_{j}\} \in \mathcal{E}(\mathcal{M})}}\left(\frac{\partial^{2}\log P^{(u_{r})}(Z,Y)}{\partial Z_{i}\partial Z_{j}} -\frac{\partial^{2}\log P^{(u_{0})}(Z,Y)}{\partial Z_{i}\partial Z_{j}}\right)\left(\frac{\partial Z_{j}}{\partial\hat{Z}_{l}}\frac{\partial Z_{i}}{\partial\hat{Z}_{k}} +\frac{\partial Z_{i}}{\partial\hat{Z}_{l}}\frac{\partial Z_{j}}{\partial\hat{Z}_{k}}\right) + \\ + \sum_ {i = 1} ^ {n} \left(\frac {\partial \log P ^ {(u _ {r})} (Z , Y)}{\partial Z _ {i}} - \frac {\partial \log P ^ {(u _ {0})} (Z , Y)}{\partial Z _ {i}}\right) \frac {\partial^ {2} Z _ {i}}{\partial \hat {Z} _ {k} \partial \hat {Z} _ {l}}. \\ \end{array} +$$ + +We collect the coefficients of the partial derivative terms in the equation above to form a vector, and consider the vectors for $r = 1,\ldots ,2n + |\mathcal{M}|$ . Assumption A2 implies that these $2n + |\mathcal{M}|$ vectors are linearly independent. Therefore, for any $\{Z_i,Z_j\} \in \mathcal{E}(\mathcal{M})$ and $\{\hat{Z}_k,\hat{Z}_l\} \notin \mathcal{E}(\hat{\mathcal{M}})$ , the following equations hold: + +$$ +\begin{array}{l} \frac {\partial Z _ {i}}{\partial \hat {Z} _ {l}} \frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} = 0, (3) \\ \frac {\partial Z _ {j}}{\partial \hat {Z} _ {l}} \frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} + \frac {\partial Z _ {i}}{\partial \hat {Z} _ {l}} \frac {\partial Z _ {j}}{\partial \hat {Z} _ {k}} = 0, (4) \\ \frac {\partial^ {2} Z _ {i}}{\partial \hat {Z} _ {k} \partial \hat {Z} _ {l}} = 0. \\ \end{array} +$$ + +Equation (3) implies that Statement (a) holds. By way of contradiction for Statement (b), suppose + +$$ +\frac {\partial Z _ {j}}{\partial \hat {Z} _ {l}} \frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} \neq 0 \quad \Longrightarrow \quad \frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} \neq 0, \tag {5} +$$ + +which, with Equation (3), implies $\frac{\partial Z_i}{\partial\hat{Z}_l} = 0$ . Substituting it into Equation (4), we have $\frac{\partial Z_j}{\partial\hat{Z}_l}\frac{\partial Z_i}{\partial\hat{Z}_k} = 0$ , which is contradictory with Equation (5). Therefore, Equation (5) must not hold, i.e., + +$$ +\frac {\partial Z _ {j}}{\partial \hat {Z} _ {l}} \frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} = 0, +$$ + +indicating that Statement (b) holds. It then remains to prove Statement (c). + +Now suppose that $\hat{Z}_k$ and $\hat{Y}$ are not adjacent in the Markov network $\hat{\mathcal{M}}$ . By Zheng et al. (2023, Theorem 2), for each $c_r \neq c_1$ , we have + +$$ +\frac {\partial \log P (\hat {Z} , \hat {Y} = v _ {c _ {r}})}{\partial \hat {Z} _ {k}} - \frac {\partial \log P (\hat {Z} , \hat {Y} = v _ {c _ {1}})}{\partial \hat {Z} _ {k}} = 0. +$$ + +With Equation (2), we obtain + +$$ +\begin{array}{l} 0 = \sum_ {i = 1} ^ {n} \left(\frac {\partial \log P ^ {(u)} (Z , Y = v _ {c _ {r}})}{\partial Z _ {i}} - \frac {\partial \log P ^ {(u)} (Z , Y = v _ {c _ {1}})}{\partial Z _ {i}}\right) \frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} \\ = \sum_ {i: \{Z _ {i}, Y \} \in \mathcal {E} (\mathcal {M})} \left(\frac {\partial \log P ^ {(u)} (Z , Y = v _ {c _ {r}})}{\partial Z _ {i}} - \frac {\partial \log P ^ {(u)} (Z , Y = v _ {c _ {1}})}{\partial Z _ {i}}\right) \frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}}, \\ \end{array} +$$ + +where the second line of the equation follows from the same property in Zheng et al. (2023, Theorem 2). Under Assumption 2, there exist $|Z_{\mathrm{mb}}|$ such equations above, and the $|Z_{\mathrm{mb}}|$ vectors formed by collecting those coefficients are linearly independent. This implies that Statement (c) holds, i.e., + +$$ +\frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} = 0. +$$ + +# A.2. Proof of Proposition 3 + +The proof for the following proposition is similar to Zhang et al. (2024, Theorem 2). + +Proposition 3 (Identifiability of Markov network). Consider the generative process in Equation (1). Suppose that Assumptions 1 and 2 hold. By modeling the same generative process, the Markov network $\mathcal{M}$ is identifiable up to isomorphism. + +Proof. Since the transformation from $\hat{Z}$ to $Z$ is a diffeomorphism, there exists a permutation such that the diagonal entries in the permuted Jacobian matrix of such transformation are nonzero (e.g., see Zhang et al. (2024, Lemma 2) or Strang (2006; 2016)), which indicates + +$$ +\frac {\partial Z _ {i}}{\partial \hat {Z} _ {\pi (i)}} \neq 0, \quad i = 1, \dots , n. \tag {6} +$$ + +Let $Z_{i}$ and $Z_{j}$ be two latent variables that are adjacent in the true Markov network $\mathcal{M}$ , but $\hat{Z}_{\pi(i)}$ and $\hat{Z}_{\pi(j)}$ are not adjacent in the recovered Markov network $\hat{\mathcal{M}}$ . With Proposition 2, we obtain + +$$ +\frac {\partial Z _ {i}}{\partial \hat {Z} _ {\pi (i)}} \frac {\partial Z _ {j}}{\partial \hat {Z} _ {\pi (j)}} = 0, +$$ + +which is contradictory with Equation (6). Now suppose $Z_{i}$ and $\hat{Y}$ are adjacent in the true Markov network $\mathcal{M}$ , but $\hat{Z}_{\pi(i)}$ and $Y$ are not adjacent in the recovered Markov network $\hat{\mathcal{M}}$ . With Proposition 2, we obtain + +$$ +\frac {\partial Z _ {i}}{\partial \hat {Z} _ {\pi (i)}} = 0, +$$ + +which is contradictory with Equation (6). Thus, we have proved that $\hat{\mathcal{M}}_{\pi}$ is a super-graph of $\mathcal{M}$ , i.e., all edges in $\mathcal{M}$ are present in $\hat{\mathcal{M}}_{\pi}$ . Since we apply sparsity constraint on $\hat{\mathcal{M}}$ during estimation such that it has smallest number of edges, we conclude that $\hat{\mathcal{M}}$ and $\mathcal{M}$ must be isomorphic. + +# A.3. Proof of Proposition 4 + +Proposition 4. Consider the generative process in Equation (1). Suppose that Assumptions 1 and 2 hold. Let $\hat{Z}$ and $\hat{\mathcal{M}}$ be the recovered latent variables and the recovered Markov network, respectively. By modeling the same generative process, we have the following statements: + +(a) For each $Z_{i}$ and each $\{\hat{Z}_k,\hat{Z}_l\} \notin \mathcal{E}(\hat{\mathcal{M}})$ , $Z_{i}$ is a function of at most one of $\hat{Z}_k$ and $\hat{Z}_l$ . +(b) For each $\{Z_i, Z_j\} \in \mathcal{E}(\mathcal{M})$ and each $\{\hat{Z}_k, \hat{Z}_l\} \notin \mathcal{E}(\hat{\mathcal{M}})$ , at most one of $Z_i$ and $Z_j$ is a function of $\hat{Z}_k$ and $\hat{Z}_l$ . +(c) For each $\{Z_i,Y\} \in \mathcal{E}(\mathcal{M})$ and each $\{\hat{Z}_k,Y\} \notin \mathcal{E}(\hat{\mathcal{M}})$ , $Z_{i}$ is not a function of $\hat{Z}_k$ . + +Sketch of proof. By Proposition 2, for each $\{Z_i,Y\} \in \mathcal{E}(\mathcal{M})$ and each $\{\hat{Z}_k,Y\} \notin \mathcal{E}(\hat{\mathcal{M}})$ , we have + +$$ +\frac {\partial Z _ {i}}{\partial \hat {Z} _ {k}} = 0, +$$ + +which implies that Statement (c) holds. Furthermore, by Statements (a) and (b) of Proposition 2, as well as Proposition 3, the same proof strategy of Zhang et al. (2024, Theorem 1) involving Intermediate Value Theorem can be used to show that Statements (a) and (b) of this proposition hold. + +# A.4. Proof of Proposition 5 + +The proof here is partly inspired by Zhang et al. (2024, Theorem 3), while ours involves a discrete target variable $Y$ (that is observed in the source domains). + +Proposition 5 (Identifiability of latent variables). Consider the generative process in Equation (1). Suppose that Assumptions 1 and 2 hold. Let $\hat{Z}$ be the recovered latent variables, and $\Psi_{Z_i}$ be the intimate neighbors of $Z_i$ . By modeling the same generative process, there exists a permutation $\pi$ of $\hat{Z}$ , denoted as $\hat{Z}_{\pi}$ , such that $\hat{Z}_{\pi(i)}$ is solely a function of a subset of $\{Z_i\} \cup \Psi_{Z_i}$ . + +Proof. We first prove the following lemma. + +Lemma 1. There exists a permutation $\pi$ of $\hat{Z}$ , denoted as $\hat{Z}_{\pi}$ , such that $Z_{i}$ is solely a function of a subset of $\hat{Z}_{\pi(i)} \cup \{\hat{Z}_{\pi(r)} \mid Z_{r} \in \Psi_{Z_{i}}\}$ . + +Using Proposition 3 and its proof, there exists a permutation $\pi$ of $\hat{Z}$ , denoted as $\hat{Z}_{\pi}$ , such that the Markov networks $\mathcal{M}$ and $\hat{\mathcal{M}}_{\pi}$ are identical, and that $Z_{i}$ is a function of $\hat{Z}_{\pi(i)}$ . + +Suppose $Z_{j}$ is not adjacent to $Z_{i}$ in Markov network $\mathcal{M}$ . This implies that $\hat{Z}_{\pi (i)}$ and $\hat{Z}_{\pi (j)}$ are not adjacent in $\hat{\mathcal{M}}$ . Using Proposition 4, $Z_{i}$ is a function of at most one of $\hat{Z}_{\pi (i)}$ and $\hat{Z}_{\pi (j)}$ . Since $Z_{i}$ is a function of $\hat{Z}_{\pi (i)}$ by definition, $Z_{i}$ must not be a function of $\hat{Z}_{\pi (j)}$ . + +Now suppose that $Z_{j}$ is adjacent to $Z_{i}$ , but not adjacent to some other neighbor of $Z_{i}$ . We consider the following two cases: + +- Case 1: $Z_{j}$ is not adjacent to $Z_{k}$ , while $Z_{k}$ is adjacent to $Z_{i}$ . This implies that $\hat{Z}_{\pi (j)}$ and $\hat{Z}_{\pi (k)}$ are not adjacent in $\hat{\mathcal{M}}$ . Using Proposition 4, at most one of $Z_{i}$ and $Z_{k}$ is a function of $\hat{Z}_{\pi (j)}$ and $\hat{Z}_{\pi (k)}$ . Since $Z_{k}$ is a function of $\hat{Z}_{\pi (k)}$ by definition, $Z_{i}$ cannot be a function of $\hat{Z}_{\pi (j)}$ . +- Case 2: $Z_{j}$ is not adjacent to $Y$ , while $Y$ is adjacent to $Z_{i}$ . This implies that $\hat{Z}_{\pi(j)}$ and $Y$ are not adjacent in $\hat{\mathcal{M}}$ . Using Proposition 4, $Z_{i}$ cannot be a function of $\hat{Z}_{\pi(j)}$ . + +Thus, we have proved Lemma 1. Suppose $Z_{r} \notin \{Z_{i}\} \cup \Psi_{Z_{i}}$ , which, by Lemma 1, implies that $Z_{i}$ cannot be a function of $\hat{Z}_{\pi (r)}$ , i.e., + +$$ +\left(\frac {\partial Z}{\partial \hat {Z} _ {\pi}}\right) _ {i r} = \frac {\partial Z _ {i}}{\partial \hat {Z} _ {\pi (r)}} = 0. +$$ + +Using Zhang et al. (2024, Proposition 3) w.r.t. $\frac{\partial Z}{\partial\hat{Z}_{\pi}}$ , we conclude that + +$$ +\left(\frac {\partial Z}{\partial \hat {Z} _ {\pi}}\right) _ {i r} ^ {- 1} = 0 +$$ + +and therefore + +$$ +\frac {\partial \hat {Z} _ {\pi (i)}}{\partial Z _ {r}} = \left(\frac {\partial \hat {Z} _ {\pi}}{\partial Z}\right) _ {i r} = \left(\frac {\partial Z}{\partial \hat {Z} _ {\pi}}\right) _ {i r} ^ {- 1} = 0. +$$ + +That is, $\hat{Z}_{\pi (i)}$ must not be a function of $Z_{r}$ . This implies that $\hat{Z}_{\pi (i)}$ is solely a function of a subset of $\{Z_i\} \cup \Psi_{Z_i}$ . + +![](images/9f2c8813e61b97df8acce79157cb08acc3719138570a94f4ccaefe3ee35994bd.jpg) + +# B. Proof of Theorem 2 + +The proof of the following theorem shares similar spirit with that of Theorem 1. + +Theorem 2 (Subspace identifiability of parents, children, and spouses). Consider the generative process in Equation (1). Suppose that Assumptions 1, 2 and 3, as well as the faithfulness assumption, hold. By modeling the same generative process with minimal number of edges for the learned Markov network $\hat{\mathcal{M}}$ , there exists a partition of the learned Markov blanket $\hat{Z}_{\mathrm{mb}}$ , denoted as $\hat{Z}_{S_1}$ , $\hat{Z}_{S_2}$ , and $\hat{Z}_{S_3}$ , such that they are invertible transformations of the true parents $Z_{\mathrm{pa}}$ , children $Z_{\mathrm{ch}}$ , and spouses $Z_{\mathrm{sps}}$ , respectively. + +Proof. Recall that $\hat{Z}$ denotes the recovered latent variables, $\hat{\mathcal{M}}$ denotes the recovered Markov network, and $\Psi_{Z_i}$ denotes the intimate neighbors of $Z_{i}$ . By Propositions 3 and 5, there exists a permutation $\pi$ of $\hat{Z}$ , denoted as $\hat{Z}_{\pi}$ , such that the following statements hold: + +(a) $\hat{Z}_{\pi (i)}$ is solely a function of a subset of $\{Z_i\} \cup \Psi_{Z_i}$ +(b) $\hat{\mathcal{M}}_{\pi}$ and $\mathcal{M}$ are identical. + +By Statement (b), under the faithfulness assumption (specifically the SAF and SUCF assumptions), the moralized graphs of $\hat{\mathcal{G}}$ and $\mathcal{G}$ are identical (Zhang et al., 2024, Proposition 2). Therefore, we have $Z_{i} \in Z_{\mathrm{mb}}$ if and only if $\hat{Z}_{\pi(i)} \in \hat{Z}_{\mathrm{mb}}$ . + +Consider a partition of $\hat{Z}_{\mathrm{mb}}$ , denoted as $\hat{Z}_{S_1}$ , $\hat{Z}_{S_2}$ , and $\hat{Z}_{S_3}$ , where + +$$ +\hat {Z} _ {S _ {1}} := \left\{\hat {Z} _ {\pi (k)} \mid Z _ {k} \in Z _ {\mathrm {p a}} \right\}, \qquad \hat {Z} _ {S _ {2}} := \left\{\hat {Z} _ {\pi (k)} \mid Z _ {k} \in Z _ {\mathrm {c h}} \right\}, \qquad \text {a n d} \qquad \hat {Z} _ {S _ {3}} := \left\{\hat {Z} _ {\pi (k)} \mid Z _ {k} \in Z _ {\mathrm {s p s}} \right\}. +$$ + +Now suppose $\hat{Z}_{\pi(i)} \in \hat{Z}_{S_1}$ , which, by definition, implies $Z_i \in Z_{\mathrm{pa}}$ . By Statement (a), $\hat{Z}_{\pi(i)}$ is solely a function of a subset of $\{Z_i\} \cup \Psi_{Z_i}$ . Under Assumption 3, we have $\Psi_{Z_i} \subseteq Z_{\mathrm{pa}}$ . This implies $\{Z_i\} \cup \Psi_{Z_i} \subseteq Z_{\mathrm{pa}}$ , i.e., $\hat{Z}_{\pi(i)}$ is solely a function of a subset of $Z_{\mathrm{pa}}$ . Since this holds for every $\hat{Z}_{\pi(i)} \in \hat{Z}_{S_1}$ , we conclude that $\hat{Z}_{S_1}$ is solely a function of a subset of $Z_{\mathrm{pa}}$ . Clearly, we can apply the same reasoning (and Lemma 1) in the reverse direction to show that $Z_{\mathrm{pa}}$ is solely a function of a subset of $\hat{Z}_{S_1}$ . Since the transformation from $Z$ to $\hat{Z}$ is a diffeomorphism, we conclude that $\hat{Z}_{S_1}$ is an invertible transformation of $Z_{\mathrm{pa}}$ . + +The same reasoning above can be used to show that $\hat{Z}_{S_2}$ and $\hat{Z}_{S_3}$ are invertible transformations of $Z_{\mathrm{ch}}$ and $Z_{\mathrm{sps}}$ , respectively. + +# C. Proof of Proposition 1 and Corollary 1 + +# C.1. Proof of Proposition 1 + +Proposition 1. Consider the generative process in Equation (1). We have + +$$ +P ^ {\tau} (Y = v _ {k} \mid X) = \frac {P ^ {\tau} (Z _ {\mathrm {c h}} \mid Y = v _ {k} , Z _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {k} \mid Z _ {\mathrm {p a}})}{\sum_ {c = 1} ^ {C} P ^ {\tau} (Z _ {\mathrm {c h}} \mid Y = v _ {c} , Z _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {c} \mid Z _ {\mathrm {p a}})}. +$$ + +Proof. We have + +$$ +\begin{array}{l} P ^ {\tau} (Y = v _ {k} \mid X) = \frac {P ^ {\tau} (Y = v _ {k} , X)}{P ^ {\tau} (X)} \\ = \frac {P ^ {\tau} (Y = v _ {k} , Z)}{P ^ {\tau} (Z)} \quad \text {(C h a n g e - o f - v a r i a b l e s)} \\ = P ^ {\tau} (Y = v _ {k} \mid Z) \\ = P ^ {\tau} (Y = v _ {k} \mid Z _ {\mathrm {m b}}, Z _ {\mathrm {m b}} ^ {\complement}) \\ = P ^ {\tau} \left(Y = v _ {k} \mid Z _ {\mathrm {m b}}\right) \quad \left(\because Y \perp Z _ {\mathrm {m b}} ^ {\complement} \mid Z _ {\mathrm {m b}}\right) \\ = \frac {P ^ {\tau} (Y = v _ {k} , Z _ {\mathrm {m b}})}{P ^ {\tau} (Z _ {\mathrm {m b}})} \\ = \frac {P ^ {\tau} (Y = v _ {k} , Z _ {\mathrm {m b}})}{\sum_ {c = 1} ^ {C} P ^ {\tau} (Y = v _ {c} , Z _ {\mathrm {m b}})} \\ = \frac {P ^ {\tau} (Y = v _ {k} , Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}} , Z _ {\mathrm {c h}})}{\sum_ {c = 1} ^ {C} P ^ {\tau} (Y = v _ {c} , Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}} , Z _ {\mathrm {c h}})} \\ = \frac {P ^ {\tau} (Z _ {\mathrm {c h}} \mid Y = v _ {k} , Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {k} \mid Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}}) P ^ {\tau} (Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}})}{\sum_ {c = 1} ^ {C} P ^ {\tau} (Z _ {\mathrm {c h}} \mid Y = v _ {c} , Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {c} \mid Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}}) P ^ {\tau} (Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}})} \\ = \frac {P ^ {\tau} \left(Z _ {\mathrm {c h}} \mid Y = v _ {k} , Z _ {\mathrm {s p s}}\right) P ^ {\tau} \left(Y = v _ {k} \mid Z _ {\mathrm {p a}}\right)}{\sum_ {c = 1} ^ {C} P ^ {\tau} \left(Z _ {\mathrm {c h}} \mid Y = v _ {c} , Z _ {\mathrm {s p s}}\right) P ^ {\tau} \left(Y = v _ {c} \mid Z _ {\mathrm {p a}}\right)}. \\ \end{array} +$$ + +In the last step, we use the conditional independence relations $Z_{\mathrm{ch}} \perp Z_{\mathrm{pa}} \mid Y, Z_{\mathrm{sps}}$ and $Y \perp Z_{\mathrm{sps}} \mid Z_{\mathrm{pa}}$ . + +# C.2. Proof of Corollary 1 + +Corollary 1. Consider the generative process in Equation (1). Let $\hat{Z}_{\mathrm{pa}}$ , $\hat{Z}_{\mathrm{ch}}$ , and $\hat{Z}_{\mathrm{sps}}$ be invertible transformations of $Z_{\mathrm{pa}}$ , $Z_{\mathrm{ch}}$ , and $Z_{\mathrm{sps}}$ , respectively. We have + +$$ +P ^ {\tau} (Y = v _ {k} \mid X) = \frac {P ^ {\tau} (\hat {Z} _ {\mathrm {c h}} \mid Y = v _ {k} , \hat {Z} _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {k} \mid \hat {Z} _ {\mathrm {p a}})}{\sum_ {c = 1} ^ {C} P ^ {\tau} (\hat {Z} _ {\mathrm {c h}} \mid Y = v _ {c} , \hat {Z} _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {c} \mid \hat {Z} _ {\mathrm {p a}})}. +$$ + +Proof. By Proposition 1 and the change-of-variables formula, we have + +$$ +\begin{array}{l} P ^ {\tau} (Y = v _ {k} \mid X) = \frac {P ^ {\tau} (Z _ {\mathrm {c h}} \mid Y = v _ {k} , Z _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {k} \mid Z _ {\mathrm {p a}})}{\sum_ {c = 1} ^ {C} P ^ {\tau} (Z _ {\mathrm {c h}} \mid Y = v _ {c} , Z _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {c} \mid Z _ {\mathrm {p a}})} \\ = \frac {\frac {P ^ {\tau} (Z _ {\mathrm {c h}} , Y = v _ {k} , Z _ {\mathrm {s p s}})}{P ^ {\tau} (Y = v _ {k} , Z _ {\mathrm {s p s}})} \frac {P ^ {\tau} (Y = v _ {k} , Z _ {\mathrm {p a}})}{P ^ {\tau} (Z _ {\mathrm {p a}})}}{\sum_ {c = 1} ^ {C} \frac {P ^ {\tau} (Z _ {\mathrm {c h}} , Y = v _ {c} , Z _ {\mathrm {s p s}})}{P ^ {\tau} (Y = v _ {c} , Z _ {\mathrm {s p s}})} \frac {P ^ {\tau} (Y = v _ {c} , Z _ {\mathrm {p a}})}{P ^ {\tau} (Z _ {\mathrm {p a}})}} \\ = \frac {\frac {P ^ {\tau} (\hat {Z} _ {\mathrm {c h}} , Y = v _ {k} , \hat {Z} _ {\mathrm {s p s}})}{P ^ {\tau} (Y = v _ {k} , \hat {Z} _ {\mathrm {s p s}})} \frac {P ^ {\tau} (Y = v _ {k} , \hat {Z} _ {\mathrm {p a}})}{P ^ {\tau} (\hat {Z} _ {\mathrm {p a}})}}{\sum_ {c = 1} ^ {C} \frac {P ^ {\tau} (\hat {Z} _ {\mathrm {c h}} , Y = v _ {c} , \hat {Z} _ {\mathrm {s p s}})}{P ^ {\tau} (Y = v _ {c} , \hat {Z} _ {\mathrm {s p s}})} \frac {P ^ {\tau} (Y = v _ {c} , \hat {Z} _ {\mathrm {p a}})}{P ^ {\tau} (\hat {Z} _ {\mathrm {p a}})}} \\ = \frac {P ^ {\tau} (\hat {Z} _ {\mathrm {c h}} \mid Y = v _ {k} , \hat {Z} _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {k} \mid \hat {Z} _ {\mathrm {p a}})}{\sum_ {c = 1} ^ {C} P ^ {\tau} (\hat {Z} _ {\mathrm {c h}} \mid Y = v _ {c} , \hat {Z} _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {c} \mid \hat {Z} _ {\mathrm {p a}})}. \\ \end{array} +$$ + +![](images/55ade1700b8d2081c7f67ef3c1e870f6adfebe3794ca75a8cc438de86d79e69d.jpg) + +# D. Proof of Theorem 3 + +The proof of the following theorem is partly inspired by Stojanov et al. (2019). + +Theorem 3 (Identifiability of target distribution). Suppose that Assumptions 4 and 5 hold. Let $\hat{Z}_{\mathrm{pa}}$ , $\hat{Z}_{\mathrm{ch}}$ , and $\hat{Z}_{\mathrm{sps}}$ be invertible transformations of $Z_{\mathrm{pa}}$ , $Z_{\mathrm{ch}}$ , and $Z_{\mathrm{sps}}$ , respectively. Suppose that we learn $P^{new}$ to match $P^{\tau}(\hat{Z}_{\mathrm{ch}} \mid \hat{Z}_{\mathrm{pa}}, \hat{Z}_{\mathrm{sps}})$ + +in the target domain, i.e., $P^{new}(\hat{Z}_{\mathrm{ch}} \mid \hat{Z}_{\mathrm{pa}}, \hat{Z}_{\mathrm{sps}}) = P^{\tau}(\hat{Z}_{\mathrm{ch}} \mid \hat{Z}_{\mathrm{pa}}, \hat{Z}_{\mathrm{sps}})$ while constraining $P^{new}(\hat{Z}_{\mathrm{ch}} \mid Y, \hat{Z}_{\mathrm{sps}})$ to satisfy Assumption 4. Then, we have $P^{\tau}(\hat{Z}_{\mathrm{ch}} \mid Y, \hat{Z}_{\mathrm{sps}}) = P^{new}(\hat{Z}_{\mathrm{ch}} \mid Y, \hat{Z}_{\mathrm{sps}})$ and $P^{\tau}(Y \mid \hat{Z}_{\mathrm{pa}}) = P^{new}(Y \mid \hat{Z}_{\mathrm{pa}})$ . + +Proof. We first have + +$$ +P ^ {\tau} \left(\hat {Z} _ {\mathrm {c h}} \mid \hat {Z} _ {\mathrm {p a}}, \hat {Z} _ {\mathrm {s p s}}\right) = P ^ {\mathrm {n e w}} \left(\hat {Z} _ {\mathrm {c h}} \mid \hat {Z} _ {\mathrm {p a}}, \hat {Z} _ {\mathrm {s p s}}\right) +$$ + +$$ +\frac {P ^ {\tau} (\hat {Z} _ {\mathrm {c h}} , \hat {Z} _ {\mathrm {p a}} , \hat {Z} _ {\mathrm {s p s}})}{P ^ {\tau} (\hat {Z} _ {\mathrm {p a}} , \hat {Z} _ {\mathrm {s p s}})} = \frac {P ^ {\mathrm {n e w}} (\hat {Z} _ {\mathrm {c h}} , \hat {Z} _ {\mathrm {p a}} , \hat {Z} _ {\mathrm {s p s}})}{P ^ {\mathrm {n e w}} (\hat {Z} _ {\mathrm {p a}} , \hat {Z} _ {\mathrm {s p s}})}. +$$ + +By the change-of-variables formula and further simplifying, we have + +$$ +\frac {P ^ {\tau} (Z _ {\mathrm {c h}} , Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}})}{P ^ {\tau} (Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}})} = \frac {P ^ {\mathrm {n e w}} (Z _ {\mathrm {c h}} , Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}})}{P ^ {\mathrm {n e w}} (Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}})} +$$ + +$$ +\frac {\sum_ {c = 1} ^ {C} P ^ {\tau} (Z _ {\mathrm {c h}} , Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}} , Y = v _ {c})}{P ^ {\tau} (Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}})} = \frac {\sum_ {c = 1} ^ {C} P ^ {\mathrm {n e w}} (Z _ {\mathrm {c h}} , Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}} , Y = v _ {c})}{P ^ {\mathrm {n e w}} (Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}})} +$$ + +$$ +\begin{array}{l} \frac {\sum_ {c = 1} ^ {C} P ^ {\tau} (Z _ {\mathrm {c h}} \mid Y = v _ {c} , Z _ {\mathrm {s p s}}) P ^ {\tau} (Y = v _ {c} \mid Z _ {\mathrm {p a}}) P ^ {\tau} (Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}})}{P ^ {\tau} (Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}})} = \frac {\sum_ {c = 1} ^ {C} P ^ {\mathrm {n e w}} (Z _ {\mathrm {c h}} \mid Y = v _ {c} , Z _ {\mathrm {s p s}}) P ^ {\mathrm {n e w}} (Y = v _ {c} \mid Z _ {\mathrm {p a}})}{P ^ {\mathrm {n e w}} (Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}}) P ^ {\mathrm {n e w}} (Z _ {\mathrm {p a}} , Z _ {\mathrm {s p s}})} \\ \sum_ {c = 1} ^ {C} P ^ {\tau} (Y = v _ {c} \mid Z _ {\mathrm {p a}}) P ^ {\tau} (Z _ {\mathrm {c h}} \mid Y = v _ {c}, Z _ {\mathrm {s p s}}) = \sum_ {c = 1} ^ {C} P ^ {\mathrm {n e w}} (Y = v _ {c} \mid Z _ {\mathrm {p a}}) P ^ {\mathrm {n e w}} (Z _ {\mathrm {c h}} \mid Y = v _ {c}, Z _ {\mathrm {s p s}}). \\ \end{array} +$$ + +Applying Assumption 4 for $P^{\tau}(Z_{\mathrm{ch}} \mid Y = v_c, Z_{\mathrm{sps}})$ and $P^{\mathrm{new}}(Z_{\mathrm{ch}} \mid Y = v_c, Z_{\mathrm{sps}})$ , we obtain + +$$ +\sum_ {c = 1} ^ {C} P ^ {\tau} (Y = v _ {c} \mid Z _ {\mathrm {p a}}) P ^ {\alpha_ {c} ^ {\tau}} (Z _ {\mathrm {c h}} \mid Y = v _ {c}, Z _ {\mathrm {s p s}}) = \sum_ {c = 1} ^ {C} P ^ {\mathrm {n e w}} (Y = v _ {c} \mid Z _ {\mathrm {p a}}) P ^ {\alpha_ {c} ^ {\mathrm {n e w}}} (Z _ {\mathrm {c h}} \mid Y = v _ {c}, Z _ {\mathrm {s p s}}), +$$ + +which implies + +$$ +\sum_ {c = 1} ^ {C} \Big (P ^ {\tau} (Y = v _ {c} | Z _ {\mathrm {p a}}) P ^ {\alpha_ {c} ^ {\tau}} (Z _ {\mathrm {c h}} | Y = v _ {c}, Z _ {\mathrm {s p s}}) - P ^ {\mathrm {n e w}} (Y = v _ {c} | Z _ {\mathrm {p a}}) P ^ {\alpha_ {c} ^ {\mathrm {n e w}}} (Z _ {\mathrm {c h}} | Y = v _ {c}, Z _ {\mathrm {s p s}}) \Big) = 0. +$$ + +By Assumption 5, we have + +$$ +P ^ {\tau} \left(Y = v _ {c} \mid Z _ {\mathrm {p a}}\right) P ^ {\alpha_ {c} ^ {\tau}} \left(Z _ {\mathrm {c h}} \mid Y = v _ {c}, Z _ {\mathrm {s p s}}\right) - P ^ {\mathrm {n e w}} \left(Y = v _ {c} \mid Z _ {\mathrm {p a}}\right) P ^ {\alpha_ {c} ^ {\mathrm {n e w}}} \left(Z _ {\mathrm {c h}} \mid Y = v _ {c}, Z _ {\mathrm {s p s}}\right) = 0, \tag {7} +$$ + +which, by taking integral w.r.t. $Z_{\mathrm{ch}}$ , indicates + +$$ +P ^ {\tau} \left(Y = v _ {c} \mid Z _ {\mathrm {p a}}\right) = P ^ {\mathrm {n e w}} \left(Y = v _ {c} \mid Z _ {\mathrm {p a}}\right). \tag {8} +$$ + +Plugging the above equation into Equation (7) yields + +$$ +P ^ {\alpha_ {c} ^ {\tau}} (Z _ {\mathrm {c h}} \mid Y = v _ {c}, Z _ {\mathrm {s p s}}) = P ^ {\alpha_ {c} ^ {\mathrm {n e w}}} (Z _ {\mathrm {c h}} \mid Y = v _ {c}, Z _ {\mathrm {s p s}}), +$$ + +or, equivalently, + +$$ +P ^ {\text {n e w}} \left(Z _ {\mathrm {c h}} \mid Y = v _ {c}, Z _ {\mathrm {s p s}}\right) = P ^ {\tau} \left(Z _ {\mathrm {c h}} \mid Y = v _ {c}, Z _ {\mathrm {s p s}}\right). \tag {9} +$$ + +Applying change-of-variables formula to Equations (9) and (8), we obtain + +$$ +P ^ {\tau} (\hat {Z} _ {\mathrm {c h}} \mid Y, \hat {Z} _ {\mathrm {s p s}}) = P ^ {\mathrm {n e w}} (\hat {Z} _ {\mathrm {c h}} \mid Y, \hat {Z} _ {\mathrm {s p s}}) \quad \mathrm {a n d} \quad P ^ {\tau} (Y \mid \hat {Z} _ {\mathrm {p a}}) = P ^ {\mathrm {n e w}} (Y \mid \hat {Z} _ {\mathrm {p a}}). +$$ + +![](images/611bb6973720460c3f467a23f65acb6fba2d859099a84be82d490b527596d726.jpg) + +# E. Experimental Details, Analysis and More Experiments + +Model details. Our proposed approach adopts a hierarchical VAE architecture with the following detailed module designs. The domain size is $M$ and the number of categories is $C$ . The primary VAE encoder consists of a fully connected layer (backbone features $\rightarrow$ hidden dimension) with batch normalization and ReLU activation, followed by two linear projections to generate mean $\mu$ and log-variance $\log \sigma^2$ for the latent space $Z \in \mathbb{R}^{d_o + d_{Z_{\mathrm{pa}}} + d_{Z_{\mathrm{ch}}} + d_{Z_{\mathrm{sps}}}}$ , where $d_o, d_{Z_{\mathrm{pa}}}, d_{Z_{\mathrm{ch}}}$ , and $d_{Z_{\mathrm{sps}}}$ denote the dimensions we set for $Z_{\mathrm{mb}}^{\complement}$ , $Z_{\mathrm{pa}}$ , $Z_{\mathrm{ch}}$ , and $Z_{\mathrm{sps}}$ , respectively. The decoder reconstructs features through a two-layer MLP (latent dimension $\rightarrow$ hidden dimension $\rightarrow$ backbone feature dimension) with batch normalization and ReLU. Domain-specific embeddings are implemented as learnable embedding layers: $\theta_Y \in \mathbb{R}^{M \times d_{\theta_Y}}$ and $\theta_{\mathrm{ch}} \in \mathbb{R}^{M \times d_{\theta_{\mathrm{ch}}}}$ , where $d_{\theta_Y}$ and $d_{\theta_{\mathrm{ch}}}$ denote the dimensions we set for $\theta_Y$ and $\theta_{\mathrm{ch}}$ , respectively. The auxiliary VAE modules use single linear layers in both the encoder and decoder, which operate on the concatenated vector $(\theta_Y, Z_{\mathrm{pa}}) \in \mathbb{R}^{d_{\theta_Y} + d_{Z_{\mathrm{pa}}}}$ to predict/reconstruct class distributions. Similarly, we use encoder and decoder with linear layers to handle $(\theta_{\mathrm{ch}}, Y, Z_{\mathrm{sps}}) \in \mathbb{R}^{d_{\theta_{\mathrm{ch}}} + C + d_{Z_{\mathrm{sps}}}}$ for $Z_{ch}$ reconstruction. The final classifier is a two-layer MLP that processes concatenated features $(Z_{\mathrm{pa}}, Z_{\mathrm{ch}}, Z_{\mathrm{sps}}, \theta_Y, \theta_{\mathrm{ch}})$ through a hidden layer with ReLU activation to output class predictions. All backbone features undergo adaptive average pooling and flattening before processing. + +Computing resources and efficiency. We train our model using a NVIDIA A100-SXM4-40GB GPU. For the Office-Home dataset, the batch size is set to 32, and the model is trained for 70 epochs, which takes approximately 160 minutes. The peak memory usage is around 35 GB. The majority of the computational cost comes from the ResNet-50 backbone, as we only add several lightweight MLP layers after it. For the PACS dataset, the batch size is set to 32, and the model is trained for 70 epochs, each epoch has 200 steps, which takes approximately 32 minutes. The peak memory usage is around 11 GB. + +Visualization and standard deviation. We have conducted visualizations of the latent space of features and VAE. Specifically, the t-SNE visualizations of the learned features on the Clipart task from the Office-Home dataset are available in Figure 3, which demonstrate the effectiveness of our method at aligning the source and target domains while preserving discriminative structures. We also report the standard deviations for Office-Home and PACS datasets in Tables 3 and 4, respectively. In particular, GAMA not only achieves the highest average accuracy but also exhibits very low variance, demonstrating its stable performance across different subtasks. + +Table 3: Office-Home dataset results (accuracy ± std). + +
MethodArClPrRwAvg
DAN (Long et al., 2015)68.3 ± 0.557.9 ± 0.778.5 ± 0.181.9 ± 0.471.6
Source Only (He et al., 2016)64.6 ± 0.752.3 ± 0.677.6 ± 0.280.7 ± 0.868.8
DANN (Ganin et al., 2016)64.3 ± 0.658.0 ± 1.676.4 ± 0.578.8 ± 0.569.4
DCTN (Xu et al., 2018)66.9 ± 0.661.8 ± 0.579.2 ± 0.677.8 ± 0.671.4
MCD (Saito et al., 2018)67.8 ± 0.459.9 ± 0.679.2 ± 0.680.9 ± 0.272.0
DANN+BSP (Chen et al., 2019c)66.1 ± 0.361.0 ± 0.478.1 ± 0.379.9 ± 0.171.3
M3SDA (Peng et al., 2019)66.2 ± 0.558.6 ± 0.679.5 ± 0.581.4 ± 0.271.4
iMSDA (Kong et al., 2022)75.4 ± 0.961.4 ± 0.783.5 ± 0.284.5 ± 0.476.2
GAMA (Ours)76.6 ± 0.162.6 ± 0.684.9 ± 0.184.9 ± 0.177.3
+ +Table 4: PACS dataset results (accuracy ± std). + +
MethodArtCartoonPhotoSketchAvg
Source Only (He et al., 2016)74.9 ± 0.8872.1 ± 0.7594.5 ± 0.5864.7 ± 1.5376.6
DANN (Ganin et al., 2016)81.9 ± 1.1377.5 ± 1.2691.8 ± 1.2174.6 ± 1.0381.5
MDAN (Zhao et al., 2018)79.1 ± 0.3676.0 ± 0.7391.4 ± 0.8572.0 ± 0.8079.6
WBN (Mancini et al., 2018)89.9 ± 0.2889.7 ± 0.5697.4 ± 0.8458.0 ± 1.5183.8
MCD (Saito et al., 2018)88.7 ± 1.0188.9 ± 1.5396.4 ± 0.4273.9 ± 3.9487.0
M3SDA (Peng et al., 2019)89.3 ± 0.4289.9 ± 1.0097.3 ± 0.3176.7 ± 2.8688.3
CMSS (Yang et al., 2020)88.6 ± 0.3690.4 ± 0.8096.9 ± 0.2782.0 ± 0.5989.5
iMSDA (Kong et al., 2022)93.75 ± 0.3292.46 ± 0.2398.48 ± 0.0789.22 ± 0.7393.48
GAMA (Ours)98.77 ± 0.1193.73 ± 0.7592.81 ± 0.4089.27 ± 0.6893.65
+ +![](images/df4fc67113d9ac01ce0d0564d23f98c276b46e61dac721dcc398efe390bb92ec.jpg) +(a) Our method. + +![](images/60dbed517b5846c39e3071de711ee408e459ee47e6d48dee68a4e8a481368493.jpg) +(b) The iMSDA method. +Figure 3: The t-SNE visualizations of the learned features on the $\rightarrow$ Clipart task in the Office-Home dataset. Specifically, red points indicate learned features form the source domains, while blue points indicate learned features from the target domain. + +Table 5: Hyperparameters for Office-Home (Ar, Cl, Pr, Rw) and PACS (P, A, C, S) datasets. + +
ParameterOffice-HomePACS
ArClPrRwPACS
λ12 × 10-36 × 10-43 × 10-36 × 10-47 × 10-43 × 10-35 × 10-39 × 10-3
λ24 × 10-42 × 10-43 × 10-31 × 10-44 × 10-41 × 10-41 × 10-41 × 10-3
λ31 × 10-48 × 10-41 × 10-34 × 10-35 × 10-42 × 10-32 × 10-47 × 10-4
λ45 × 10-36 × 10-47 × 10-31 × 10-31 × 10-32 × 10-44 × 10-45 × 10-3
λ52 × 10-34 × 10-43 × 10-44 × 10-34 × 10-39 × 10-44 × 10-35 × 10-3
\ No newline at end of file diff --git a/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/images.zip b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..acb79e4fd248f72abb280601462fe2fcf61012f6 --- /dev/null +++ b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:497e48fad3cde79a7ec009cd4ea940e91660961d5a1241aeac0996c7ed056a5a +size 1119372 diff --git a/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/layout.json b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..46e00deb2045d7f3a7d9d0e58790771f01559cbf --- /dev/null +++ b/ageneralrepresentationbasedapproachtomultisourcedomainadaptation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa9709b423d2029f3c7b4daf95d1b74b13512bd3364ded96d1e5d33bec70d214 +size 1233072 diff --git a/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/652adeb4-7610-46dd-9aa3-bc8b38fd6f34_content_list.json b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/652adeb4-7610-46dd-9aa3-bc8b38fd6f34_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ecd7243abb555b81609bced43aaff4e349628634 --- /dev/null +++ b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/652adeb4-7610-46dd-9aa3-bc8b38fd6f34_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9844879bc41c4ee0026aad4dc0e38446c9a405114a071a3eddfa408f8a13690 +size 263474 diff --git a/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/652adeb4-7610-46dd-9aa3-bc8b38fd6f34_model.json b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/652adeb4-7610-46dd-9aa3-bc8b38fd6f34_model.json new file mode 100644 index 0000000000000000000000000000000000000000..91089107c85e6daa7bef6e4b0945ab68afbdeb00 --- /dev/null +++ b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/652adeb4-7610-46dd-9aa3-bc8b38fd6f34_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8564dd8889da13014bfe88d925d9f286dcad226577a598e841c5c0c6f24385b3 +size 304280 diff --git a/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/652adeb4-7610-46dd-9aa3-bc8b38fd6f34_origin.pdf b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/652adeb4-7610-46dd-9aa3-bc8b38fd6f34_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..14b662b90f6d6dd89a3777f8a8997b1c8769b5e5 --- /dev/null +++ b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/652adeb4-7610-46dd-9aa3-bc8b38fd6f34_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f069af3b0ed368e0fcd04e308c087e3cd5a5230bf452863476d15b21dec18e26 +size 5557546 diff --git a/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/full.md b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/full.md new file mode 100644 index 0000000000000000000000000000000000000000..9747f02b3223d73fcd5d15f088d4ac77d0fd191c --- /dev/null +++ b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/full.md @@ -0,0 +1,1321 @@ +# A Generic Family of Graphical Models: Diversity, Efficiency, and Heterogeneity + +Yufei Huang*1 Changhu Wang*23 Junjie Tang23 Weichi Wu4 Ruibin Xi23 + +# Abstract + +Traditional network inference methods, such as Gaussian Graphical Models, which are built on continuity and homogeneity, face challenges when modeling discrete data and heterogeneous frameworks. Furthermore, under high-dimensionality, the parameter estimation of such models can be hindered by the notorious intractability of high-dimensional integrals. In this paper, we introduce a new and flexible device for graphical models, which accommodates diverse data types, including Gaussian, Poisson log-normal, and latent Gaussian copula models. The new device is driven by a new marginally recoverable parametric family, which can be effectively estimated without evaluating the high-dimensional integration in high-dimensional settings thanks to the marginal recoverability. We further introduce a mixture of marginally recoverable models to capture ubiquitous heterogeneous structures. We show the validity of the desirable properties of the models and the effective estimation methods, and demonstrate their advantages over the state-of-the-art network inference methods via extensive simulation studies and a gene regulatory network analysis of real single-cell RNA sequencing data. + +# 1. Introduction + +Graphical models (Lauritzen, 1996) are widely used to explore network structures and identify complex interactions between random variables. Recent research has increas + +*Equal contribution ${}^{1}$ Center for Data Science, Peking University, Beijing, China ${}^{2}$ School of Mathematical Sciences, Peking University, Beijing, China ${}^{3}$ Center for Statistical Science, Peking University, Beijing, China ${}^{4}$ Department of Statistics and Data Science, Tsinghua University, Beijing, China. Correspondence to: Ruibin Xi , Weichi Wu . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +ingly focused on high-dimensional settings, commonly encountered in applications such as microarray experiments (Amaratunga et al., 2014) and single-cell RNA sequencing (scRNA-seq) studies. However, parameter estimation in such settings poses significant challenges due to the computational intractability of high-dimensional integrals, limiting the efficiency of existing methods. This highlights the critical need for developing efficient estimation frameworks tailored to high-dimensional graphical models. + +Due to well-established theoretical properties and high interpretability, Gaussian graphical model (GGM) (Meinhausen & Buhlmann, 2006) has been extensively studied in recent years. Notable methods include $L_{1}$ -penalized log-likelihood maximization (Yuan & Lin, 2007; Banerjee et al., 2008; Friedman et al., 2008), penalized regression (Meinhausen & Buhlmann, 2006; Peng et al., 2009), adaptive thresholding (Cai & Liu, 2011), and D-trace loss (a smooth convex loss function) (Zhang & Zou, 2014), among others. To address the limitations of the Gaussian assumption, semiparametric Gaussian copula models (Liu et al., 2009; Xue & Zou, 2012; Liu et al., 2012) have been developed to handle continuous data, using monotonic univariate transformations. These methods, based on Gaussian and Gaussian copula models, are usually efficient but are only applicable to continuous data and cannot handle discrete data. + +In many applications, particularly in genomics studies, discrete data are ubiquitous. The observed data are considered to be generated from the discretization of underlying latent variables (Skrondal & Rabe-Hesketh, 2007), which naturally leads to the use of hierarchical models for data modeling. For example, in scRNA-seq data, gene expression levels are count data, often featuring numerous zero values (Islam et al., 2014; Zheng et al., 2017). To effectively model the underlying dependencies in count data, the multivariate Poisson log-normal (PLN) distribution (Aitchison & Ho, 1989) is plausible and popular, since it can capture the conditional dependencies while accommodating overdispersion in the marginal distributions. However, compared to GGM, maximizing the likelihood of the PLN model is more challenging due to the high-dimensional integrals involved, without a known closed-form solution. To address this issue, Choi et al. (2017) used Laplace's method for + +likelihood approximation and applied Alternating Direction Method of Multipliers (ADMM) to compute the penalized maximum likelihood estimator. Chiquet et al.(2019) introduced a variational approximation method to infer the network of the PLN model. However, these methods rely on approximations of the likelihood function and lack theoretical guarantees. + +In practice, samples often arise from mixed populations exhibiting heterogeneous patterns. Traditional graphical models usually assume that samples come from a single population with a shared network, which limits their ability to capture data heterogeneity. To address this, mixture models are widely utilized. For example, in scRNA-seq data, samples comprise single cells from different cell types, each with its own gene regulatory network. One of the arguably most important tools for studying the mixture and count data with different regulatory networks is the mixture Poisson lognormal (MPLN). Silva et al.(2019) employed the MPLN model for clustering count data and used Expectation-Maximization (EM) algorithms with MCMC steps to maximize the computationally intractable log-likelihood. Tang et al.(2024) adopted a variational inference approach for inferring cell-type-specific gene regulatory networks. However, both EM algorithms with MCMC and variational inference are computationally expensive. + +To address the aforementioned challenges, this paper makes the following contributions with theoretical guarantees. + +1) To accommodate diverse data types, we propose a novel class of distributions, the marginally recoverable parametric family, which unifies existing models and is not restricted to a single data type. This family includes the Gaussian, PLN, and latent Gaussian copula models introduced by Fan et al. (2017) for binary data. +2) To overcome the computational intractability of high-dimensional integration, we develop an efficient parameter estimation framework for this family based on the Maximum Marginal Likelihood Estimator (MMLE). Thanks to marginal recoverability, this method simplifies high-dimensional integrals into multiple low-dimensional integral computations. +3) To capture heterogeneous structures, we extend the framework to a mixture of marginal recoverable models by integrating the EM algorithm to update the MMLE to EM-MMLE. + +We establish the consistency of MMLE for covariance matrices and networks under mild conditions. Simulations show our method outperforms existing ones for mixture count and binary data. Furthermore, we apply the EM-MMLE to real scRNA-seq data to infer cell-type-specific gene regulatory + +networks, showcasing its practical utility. All code is available at https://github.com/XiDsLab/EMMMLE. + +Our work balances diversity, efficiency, and heterogeneity, whereas existing methods typically address at most two of these aspects. For instance, Fan et al. (2017) proposed a latent Gaussian copula model for mixed data, combining continuous and binary variables, and introduced a generalized rank-based method. While this approach ensures diversity and efficiency, it does not account for heterogeneity as it cannot handle mixture models. + +# 2. Flexible Marginally Recoverable Family + +In this section, we propose the marginally recoverable parametric family to address diversity. First, we introduce some notations. For a $p$ -dimensional vector $\mathbf{a}$ with the $i$ -th entry $a_{i}$ , $\mathbf{a}_{[j,k]} = (a_j,a_k)^\top$ represent the two-dimensional subvector for $1 \leq j < k \leq p$ . For a $p \times p$ symmetric matrix $\mathbf{A}$ with the $(i,j)$ -th entry $a_{ij}$ , the submatrix $\mathbf{A}_{[j,k]}$ is defined as: + +$$ +\mathbf {A} _ {[ j, k ]} = \left( \begin{array}{l l} a _ {j j} & a _ {j k} \\ a _ {j k} & a _ {k k} \end{array} \right) \tag {1} +$$ + +where $1 \leq j < k \leq p$ . This submatrix is constructed by selecting the entries in the $j$ -th and $k$ -th rows and columns of $\mathbf{A}$ . Let $\mathcal{M}_p$ denote the set of $p \times p$ symmetric positive semi-definite matrices. + +Our work is inspired by the properties of the Gaussian distribution (Lauritzen, 1996). For a $p$ -dimensional random vector $\mathbf{X} \sim N_p(\boldsymbol{\mu}, \boldsymbol{\Sigma})$ , any of its two-dimensional marginal distributions $\mathbf{X}_{[j,k]} \sim N_2(\boldsymbol{\mu}_{[j,k]}, \boldsymbol{\Sigma}_{[j,k]})$ for $1 \leq j < k \leq p$ . The parameters of the $p$ -dimensional distribution can be fully characterized by the parameters of all two-dimensional marginal distributions. Consequently, the model parameters can be estimated independently through marginal likelihoods. Inspired by this property, we define the marginally recoverable parametric family as follows. + +Definition 2.1 (Marginally recoverable parametric family). Let $\{H_d\}_{d=1}^{\infty}$ be a sequence of distribution functions, where for each $d \geq 1$ , any $p$ -dimensional marginal distribution $(1 \leq p \leq d)$ of $H_d$ belongs to the family + +$$ +\mathcal {H} _ {p} = \left\{H _ {p} (\boldsymbol {\mu}, \boldsymbol {\Sigma}): \boldsymbol {\mu} \in \mathbb {R} ^ {p}, \boldsymbol {\Sigma} \in \mathcal {M} _ {p} \right\}. +$$ + +For any $p$ -dimensional random vector $\mathbf{X} = (X_1, \ldots, X_p)^\top$ with $p \geq 2$ such that $\mathbf{X} \sim H_p(\boldsymbol{\mu}, \boldsymbol{\Sigma})$ where $\boldsymbol{\mu} = (\mu_1, \ldots, \mu_p)^\top$ and $\boldsymbol{\Sigma} = [\sigma_{jk}]_{1 \leq j, k \leq p}$ , we say that $\mathbf{X}$ or $H_p$ is marginally recoverable if the following conditions hold: + +- For $1 \leq j \leq p$ , $X_{j} \sim H_{1}(\mu_{j}, \sigma_{jj})$ . +For $1\leq j < k\leq p$ $\mathbf{X}_{[j,k]}\sim H_2(\pmb {\mu}_{[j,k]},\pmb{\Sigma}_{[j,k]})$ + +The marginally recoverable parametric family includes many of the most common distributions. For instance, we have the following remark. + +Remark 2.2. Elliptical distributions, including the Gaussian distribution and the multivariate $t$ -distribution, are marginally recoverable. + +The following proposition elucidates that hierarchical models with marginally recoverable inner layers also satisfy the marginally recoverable condition in Definition 2.1. + +Proposition 2.3. Let $Q(\lambda)$ be a distribution function characterized by a single parameter $\lambda$ . If $\mathbf{X}$ is marginally recoverable and $\mathbf{Y} \mid \mathbf{X} \sim \prod_{j=1}^{p} Q(X_j)$ , then $\mathbf{Y}$ is also marginally recoverable. + +Gaussian copula is a widely used semiparametric model, overcoming the drawback of the Gaussian model's reliance on exact normality (Liu et al., 2009). It is easy to verify that the Gaussian copula model is marginally recoverable. + +Definition 2.4 (Gaussian copula model). Let $\mathbf{X}$ be a random $p$ -vector. $\mathbf{X}$ is sampled from the Gaussian copula model, if there exists a monotonic transformation $f$ such that $f(\mathbf{X}) = (f(X_1),\dots ,f(X_p))^{\top} \sim N_p(\boldsymbol {\mu},\boldsymbol {\Sigma})$ . Then we denote $\mathbf{X} \sim \mathrm{NPN}(\boldsymbol {\mu},\boldsymbol {\Sigma},f)$ . + +Despite its flexibility, the Gaussian copula model cannot be directly applied to discrete data. For practical applications in network inference, we introduce two hierarchical models designed for count data, including binary data, both of which are marginally recoverable according to Proposition 2.3. + +Example 2.5 (Latent Gaussian copula model for count data). Let $\mathbf{X} = (X_{1},\ldots ,X_{p})^{\top}$ and $\mathbf{Y} = (Y_1,\dots ,Y_p)^\top$ be two random $p$ -vectors. $\mathbf{Y}$ is sampled from the latent Gaussian copula model for count data, if + +$$ +\begin{array}{l} \mathbf {Y} \mid \mathbf {X} \sim \prod_ {j = 1} ^ {p} \text {P o i s s o n} (S \exp (X _ {j})), \tag {2} \\ \mathbf {X} \sim \mathrm {N P N} (\pmb {\mu}, \pmb {\Sigma}, f). \\ \end{array} +$$ + +This distribution is commonly used to model genomic data (Sarkar & Stephens, 2021; Sinclair & Hooker, 2019). When $\mathbf{X} \sim N_p(\boldsymbol{\mu}, \boldsymbol{\Sigma})$ , we say that $\mathbf{Y}$ follows the PLN distribution, denoted as PLN $(S; \boldsymbol{\mu}, \boldsymbol{\Sigma})$ . The PLN model is widely used for single-cell RNA sequencing data, influenza-like illness dataset and purchase frequency counts (Silva et al., 2019; Wu et al., 2018; Trinh et al., 2014). In scRNA-seq data, $\mathbf{X}$ denotes the underlying expression levels of genes and $S$ represents the sequencing depth of the cell, which can be estimated by the sum of UMI counts across all genes (Sarkar & Stephens, 2021; Hafemeister & Satija, 2019). + +The binary data type is an important special class of count data and is often observed in genetic and genomic studies. A + +prominent example is DNA nucleotide data (Abbasy et al., 2012). More concretely, genes that exhibit higher levels of expression are represented as 1, whereas genes with lower levels of expression are represented as 0. The latent Gaussian copula model for binary data is proposed by Fan et al. (2017). + +Example 2.6 (Latent Gaussian copula model for binary data). Let $\mathbf{X} = (X_1, \ldots, X_p)^\top$ be a random $p$ -vector and $\mathbf{Y} = (Y_1, \ldots, Y_p)^\top$ represents $p$ -dimensional binary variables. $\mathbf{Y}$ is sampled from the latent Gaussian copula model for binary data, if + +$$ +\begin{array}{l} Y _ {j} = I \left(X _ {j} > C _ {j}\right), \\ \mathbf {X} \sim \mathrm {N P N} (\mathbf {0}, \boldsymbol {\Sigma}, f), \\ \end{array} +$$ + +(3) + +where $C_j$ is a constant, $I(\cdot)$ is the indicator function, and $\sigma_{jj} = 1$ for any $1 \leq j \leq p$ . + +In the latent Gaussian copula model for binary data, each binary component $Y_{j}$ , which takes values of 0 or 1, is generated from a latent continuous random variable $X_{j}$ truncated at an unknown threshold value $C_{j}$ . + +Examples 2.5 and 2.6 can be regarded as two specific instances of marginally recoverable distributions. In both cases, $\Sigma$ represents the covariance matrix of latent variables. In Example 2.5, $\mu$ is the mean of the Gaussian copula distributions in the inner layer, while in Example 2.6, $\mu$ represents the threshold values. The inverse of the covariance matrix $\Sigma$ , denoted as $\Theta$ , reveals the network. Specifically, in Example 2.5 and 2.6, $X_{i}$ and $X_{j}$ are independent given the remaining variables if and only if $\Theta_{ij} = 0$ . Consequently, inferring the graph structure can be achieved by estimating $\Theta$ . However, the likelihood function in hierarchical models, such as Example 2.5 and Example 2.6, involves high-dimensional integrations that pose significant computational challenges, since these integrations seldom have closed-form solutions, making the computation of maximum likelihood estimation infeasible. Fortunately, the computational issue can be circumvented by leveraging the properties of marginally recoverable distributions and simplifying the problem of estimating the parameters of a high-dimensional distribution into multiple lower-dimensional parameter estimation problems. + +# 3. Efficient Estimation + +In this section, we introduce an efficient estimation framework designed to estimate parameters, particularly $\pmb{\Sigma}$ , which is associated with the network structure in $H_{p}(\pmb{\mu},\pmb{\Sigma})$ . Then, we extend the estimation framework to accommodate mixture distributions for inferring networks. + +# 3.1. The Maximum Marginal Likelihood Estimator + +Let $h_p$ denote the density function of the distribution $H_p$ . Suppose that $\mathbf{Y}_i$ , for $i = 1, \dots, n$ , are $n$ random $p$ -dimensional vectors sampled from $H_p(\boldsymbol{\mu}, \boldsymbol{\Sigma})$ . When $p$ is large, computing the maximum likelihood estimator is infeasible due to the intractable high-dimensional integration. By leveraging the properties of the marginally recoverable component as defined in Definition 2.1, we propose an efficient estimation framework based on MMLE for parameter estimation. This framework is inspired by the pairwise likelihood method (Cox & Reid, 2004; Varin, 2008), which computes only the likelihoods of pairs of observations. Therefore, this method significantly reduces the computational cost compared to conventional likelihood. This reduction in computation relies on evaluating a limited number of sets of two-dimensional integrals instead of computing the full high-dimensional likelihood integral, i.e., + +$$ +L _ {\text {p a i r}} (\boldsymbol {\mu}, \boldsymbol {\Sigma}; \mathbf {y}) = \prod_ {j = 1} ^ {p - 1} \prod_ {k = j + 1} ^ {p} h _ {2} \left(y _ {j}, y _ {k}; \boldsymbol {\mu} _ {[ j, k ]}, \boldsymbol {\Sigma} _ {[ j, k ]}\right). \tag {4} +$$ + +Unfortunately, the pairwise maximum likelihood estimator (PMLE) is often inconsistent (Varin et al., 2011). However, for marginally recoverable distributions, the PMLE is consistent because we can estimate the parameters from the two-dimensional marginals. + +Note that when $\pmb{\mu}$ and $\sigma_{jj}(j = 1,\dots ,p)$ are known, maximizing $L_{\mathrm{pair}}(\pmb {\mu},\pmb {\Sigma};\mathbf{y})$ is equivalent to maximizing $h_2(y_j,y_k;\pmb {\mu}_{[j,k]},\pmb {\Sigma}_{[j,k]})$ for $1\leq j < k\leq p$ Motivated by this and to avoid redundant computation of $\pmb{\mu}$ and $\sigma_{jj}$ , we first estimate $\mu_{j}$ and $\sigma_{jj}$ by maximizing the one-dimensional marginal log-likelihood. Then, $\sigma_{jk}$ is estimated by maximizing the two-dimensional marginal log-likelihood. The MMLE $\hat{\Sigma} = [\hat{\sigma}_{jk}]_{1\leq j,k\leq p}$ is derived as follows: + +$$ +\hat {\sigma} _ {j j} = \arg \max _ {\sigma_ {j j}} \sum_ {i = 1} ^ {n} \log h _ {1} \left(Y _ {i j}; \mu_ {j}, \sigma_ {j j}\right), \tag {5} +$$ + +$$ +\hat {\sigma} _ {j k} = \arg \max _ {\sigma_ {j k}} \sum_ {i = 1} ^ {n} \log h _ {2} \left(\mathbf {Y} _ {i [ j, k ]}; \boldsymbol {\mu} _ {[ j, k ]}, \boldsymbol {\Sigma} _ {[ j, k ]}\right), +$$ + +where in the optimization for $\hat{\sigma}_{jk}$ , $\sigma_{jj}$ and $\sigma_{kk}$ in $\Sigma_{[j,k]}$ are fixed to $\hat{\sigma}_{jj}$ and $\hat{\sigma}_{kk}$ , respectively. + +# 3.2. Mixture for Heterogeneity + +The mixture model surpasses the limitations of the single-component model and offers additional flexibility in modeling complex data. In the following, we focus on the mixture model within the marginally recoverable family. Let $\pi = (\pi_1,\dots ,\pi_G)$ denote the mixing proportions, where $\sum_{g = 1}^{G}\pi_{g} = 1$ and $\pi_g > 0$ for $g = 1,\ldots ,G$ . Suppose + +that the distribution $H_{p}$ is marginally recoverable. A $G$ -component mixture of marginally recoverable distributions can be expressed as $H_{p}^{M}(\pi, \Omega) = \sum_{g=1}^{G} \pi_{g} H_{p}(\boldsymbol{\mu}_{g}, \boldsymbol{\Sigma}_{g})$ where $\Omega = \{\boldsymbol{\mu}_{1}, \dots, \boldsymbol{\mu}_{G}, \boldsymbol{\Sigma}_{1}, \dots, \boldsymbol{\Sigma}_{G}\}$ . + +However, due to the unknown sample categories, maximizing the marginal log-likelihood of mixed distributions is computationally intractable in practice. Therefore, we propose the EM algorithm to update the MMLE for data from mixed populations and name the estimator as EM-MMLE. + +Assume that $\mathbf{Y}_i$ , for $i = 1, \dots, n$ , are $n$ $p$ -dimensional random vectors generated from $H_p^M(\boldsymbol{\pi}, \Omega)$ . To indicate cluster membership, we introduce the indicator variable $\mathbf{Z}_i$ for the $i$ -th sample, which follows a multinomial distribution with proportion parameter $\pi$ . For $1 \leq j < k \leq p$ , let $\Phi_{jk} = \left\{\boldsymbol{\pi}, \boldsymbol{\mu}_{g[j,k]}, \boldsymbol{\Sigma}_{g[j,k]}, g = 1, \dots, G\right\}$ containing the unknown parameters of $\mathbf{Y}_{[j,k]}$ . In the $t$ -th iteration, the expected complete log-likelihood $Q(\Phi_{jk}, \Phi_{jk}^{(t-1)})$ is taken as the optimization objective, which is defined as + +$$ +Q \left(\Phi_ {j k}, \Phi_ {j k} ^ {(t - 1)}\right) = \operatorname {E} _ {p \left(\mathbf {Z} \mid \mathbf {Y}; \Phi_ {j k} ^ {(t - 1)}\right)} \left[ \log p \left(\mathbf {Y}, \mathbf {Z}; \Phi_ {j k}\right) \right]. +$$ + +We update $\hat{\Phi}_{jk}^{(t)} = \arg \max_{\Phi_{jk}} Q(\Phi_{jk}, \hat{\Phi}_{jk}^{(t-1)})$ . The iteration terminates when the change in the optimization objective between consecutive steps is negligible. The framework of EM-MMLE is summarized in Algorithm 1. + +A key application of the mixture distributions $H_{p}(\pi ,\Omega)$ is to infer networks from its parameters $\{\pmb {\Sigma}_g,g = 1,\dots ,G\}$ Therefore, with EM-MMLE $\widehat{\pmb{\Sigma}}_g$ $(g = 1,\ldots ,G)$ , we apply the D-trace method to estimate the sparse precision matrix $\Theta_g = \Sigma_g^{-1}$ , i.e., + +$$ +\widehat {\boldsymbol {\Theta}} _ {g} = \arg \min _ {\boldsymbol {\Theta} _ {g} \succeq 0} \frac {1}{2} \operatorname {t r} \left(\boldsymbol {\Theta} _ {g} ^ {2} \boldsymbol {\Sigma} _ {g}\right) - \operatorname {t r} \left(\boldsymbol {\Theta} _ {g}\right) + \lambda_ {g} \| \boldsymbol {\Theta} _ {g} \| _ {1, \text {o f f}}. \tag {6} +$$ + +where $\Theta_g\succeq 0$ indicates that $\Theta_{g}$ is positive semi-definite, and $\| \Theta_g\|_{1,\mathrm{off}} = \sum_{i\neq j}|\Theta_{gij}|$ . This optimization problem is efficiently solved using an alternating direction method as described in Zhang & Zou (2014). To ensure the convexity of the loss function, the D-trace approach requires the input covariance matrix estimator to be positive semi-definite. To satisfy this requirement, we propose the $\widetilde{\Sigma}_g$ : + +$$ +\widetilde {\boldsymbol {\Sigma}} _ {g} = \check {\boldsymbol {\Sigma}} _ {g} + \| \check {\boldsymbol {\Sigma}} _ {g} - \widehat {\boldsymbol {\Sigma}} _ {g} \| _ {\infty} \mathbf {I}, \tag {7} +$$ + +where $\mathbf{I}$ is the identity matrix and $\check{\Sigma}_g = \arg \min_{\mathbf{A} \succeq 0} \| \mathbf{A} - \widehat{\Sigma}_g \|_\infty$ is the projection of $\widehat{\Sigma}_g$ onto the space of positive semi-definite matrices, which can be solved by a splitting conic solver (Fu et al., 2020). + +The selection of the tuning parameter in Equation (6) is achieved by minimizing the approximate Bayesian informa + +# Algorithm 1 Framework of EM-MMLE + +Input: Observed data $\mathbf{Y}_1, \dots, \mathbf{Y}_n$ , the number of populations $G$ , the maximum iteration number $T$ and the convergence threshold $\epsilon_L$ . + +Output: $\widehat{\Sigma}_{1},\dots,\widehat{\Sigma}_{G}$ + +for $j = 1$ to $p - 1$ do + +for $k = j + 1$ to $p$ do + +while $t < T$ and $L > \epsilon_{L}$ do + +for $i = 1$ to $n$ do + +for $g = 1$ to $G$ do + +$$ +\hat {P} _ {g i j k} ^ {(t)} = h _ {2} \left(\mathbf {Y} _ {i [ j, k ]}; \hat {\boldsymbol {\mu}} _ {g [ j, k ]} ^ {(t - 1)}, \hat {\boldsymbol {\Sigma}} _ {g [ j, k ]} ^ {(t - 1)}\right) +$$ + +$$ +\hat {\gamma} _ {g i j k} ^ {(t)} = \frac {\hat {\pi} _ {g} ^ {(t - 1)} \hat {P} _ {g i j k} ^ {(t)}}{\sum_ {g = 1} ^ {G} \hat {\pi} _ {g} ^ {(t - 1)} \hat {P} _ {g i j k} ^ {(t)}} +$$ + +end for + +end for + +for $g = 1$ to $G$ do + +$$ +\hat {\pi} _ {g} ^ {(t)} = n ^ {- 1} \sum_ {i = 1} ^ {n} \hat {\gamma} _ {g i j k} ^ {(t)} +$$ + +Update $\hat{\mu}_{gj}^{(t)}$ and $\hat{\sigma}_{gjj}^{(t)}$ by maximizing + +$$ +\sum_ {i = 1} ^ {n} \hat {\gamma} _ {g i j k} ^ {(t)} \log h _ {1} (Y _ {i j}; \mu_ {g j}, \sigma_ {g j j}). +$$ + +Update $\hat{\mu}_{gk}^{(t)}$ and $\hat{\sigma}_{gkk}^{(t)}$ by maximizing + +$$ +\sum_ {i = 1} ^ {n} \hat {\gamma} _ {g i j k} ^ {(t)} \log h _ {1} (Y _ {i k}; \mu_ {g k}, \sigma_ {g k k}). +$$ + +Update $\hat{\sigma}_{gjk}^{(t)}$ by maximizing + +$$ +\sum_ {i = 1} ^ {n} \hat {\gamma} _ {g i j k} ^ {(t)} \log h _ {2} \left(\mathbf {Y} _ {i [ j, k ]}; \hat {\boldsymbol {\mu}} _ {g [ j, k ]} ^ {(t)}, \boldsymbol {\Sigma} _ {g [ j, k ]}\right). +$$ + +end for + +$$ +{ L } { = } { \delta \left( Q ( \hat { \Phi } _ { j k } ^ { ( t ) } , \hat { \Phi } _ { j k } ^ { ( t ) } ) , Q ( \hat { \Phi } _ { j k } ^ { ( t - 1 ) } , \hat { \Phi } _ { j k } ^ { ( t - 1 ) } ) \right) , } +$$ + +where $\delta (x,y) = |x - y| / y$ + +end while + +end for + +end for + +tion criterion + +$$ +\left\| \frac {1}{2} \left(\widehat {\boldsymbol {\Theta}} _ {g} \widehat {\boldsymbol {\Sigma}} _ {g} + \widehat {\boldsymbol {\Sigma}} _ {g} \widehat {\boldsymbol {\Theta}} _ {g}\right) - \mathbf {I} \right\| _ {\mathrm {F}} + \left(\| \widehat {\boldsymbol {\Theta}} _ {g} \| _ {0} \log n\right) / n, \tag {8} +$$ + +where $\| \widehat{\Theta}_g\| _0$ denotes the number of nonzero entries in $\widehat{\Theta}_g$ + +# 4. Theoretical Properties + +In this section, we establish theoretical results concerning the convergence rate of MMLE and the application to network estimation. We focus on the mixture of marginally recoverable distributions $H_{p}^{M}(\pi ,\Omega)$ , which reduces to the single-component model discussed in Section 3.1 when $G = 1$ . In theory, under the assumptions that the mixing proportions $\pi_g$ and means $\mu_g$ ( $g = 1,\dots,G$ ) are known, we can estimate $\{\Sigma_g,g = 1,\dots,G\}$ as $\left\{\widehat{\Sigma}_g,g = 1,\dots,G\right\}$ using the MMLE. + +Before presenting the theoretical results, we first provide + +the necessary conditions. + +Let $h_1^M (\mathbf{y};\omega_1), h_2^M (\mathbf{y};\omega_2)$ represent the one-dimensional and two-dimensional marginal density functions of $H_{p}^{M}(\pi ,\Omega)$ , respectively, with parameters $\omega_{1}\in \mathcal{O}_{1}$ and $\omega_{2}\in \mathcal{O}_{2}$ , where $\mathcal{O}_1,\mathcal{O}_2$ are parameter spaces in finite-dimensional Euclidean space. The Hellinger distance between two densities $p_1$ and $p_2$ is defined as: $d(p_{1},p_{2}) = \left[\int \left(p_{1}^{1 / 2} - p_{2}^{1 / 2}\right)^{2}d\nu \right]^{1 / 2} = \left\| p_{1}^{1 / 2} - p_{2}^{1 / 2}\right\|_{L_{2}}$ . + +Condition 4.1 (Lower boundedness condition). For $k = 1,2$ , and for any $\omega_{k},\omega_{k}^{\prime}\in \mathcal{O}_{k}$ , there exists a positive constant $c$ such that $c\| \omega_k - \omega_k^\prime \| _2\leq d(h_k^M (\mathbf{y};\omega_k),h_k^M (\mathbf{y};\omega_k'))$ + +Condition 4.2 (Upper boundedness condition). For $k = 1,2$ , and for any $\omega_{k}, \omega_{k}^{\prime} \in \mathcal{O}_{k}$ , there exist a measurable function $m(\mathbf{y})$ and a constant $c$ such that $\int m^{2}(\mathbf{y}) d\nu = c^{2} < \infty$ , and $\left| h_{k}^{M^{1/2}}(\mathbf{y}; \omega_{k}) - h_{k}^{M^{1/2}}(\mathbf{y}; \omega_{k}^{\prime}) \right| \leq m(\mathbf{y}) \| \omega_{k} - \omega_{k}^{\prime} \|_{2}$ . + +Based on these boundedness conditions, we establish a theorem that elucidates the convergence rate of MMLE $\hat{\Sigma}$ . + +Theorem 4.3 (Rate of convergence from MMLE $\widehat{\Sigma}_g$ ). For the mixture marginally recoverable model, assume that Conditions 4.1 and 4.2 hold. Then, there exists a constant $c$ such that for any $1 \leq g \leq G$ and $\epsilon > 0$ , $pr\left(\left\| \widehat{\Sigma}_g - \Sigma_g \right\|_{\infty} \geq \epsilon\right) \leq 5Gp^2 \exp(-cn\epsilon^2)$ . + +Theorem 4.3 shows that if $p < \exp(c'n)$ for some constant $c'$ , or in other words, if $p$ tends to infinity not faster than exponential of $n$ , then $\widehat{\Sigma}_g$ is a consistent estimator of $\Sigma_g$ . + +The precision matrix $\Theta_{g} = \Sigma_{g}^{-1}$ encodes the network structure. Specifically, an edge exists between vertices $i$ and $j$ in the $g$ -th group if $\Theta_{gij} \neq 0$ ; otherwise, $\Theta_{gij} = 0$ indicates no edge. With the rate of convergence for $\widehat{\Sigma}_{g}$ , we apply the Theorem 3 in Xiao et al. (2022) to each $\widetilde{\Sigma}_{g}$ and then establish the sign consistency of the estimator $\widehat{\Theta}_{g}$ . + +Theorem 4.4 (Sign consistency for $\widehat{\Theta}_g$ ). Assume that for each $g = 1, \dots, G$ , the true precision matrix $\Theta_g$ satisfies the conditions described in the Appendix A.2. Then, for some $\eta > 2$ , pr $(\mathrm{vec}(\widehat{\Theta}_g)_{G_g^c} = 0) > 1 - p^{2 - \eta}$ , if $n$ is sufficiently large (depending on $\eta$ , see Appendix A.2), where $\mathrm{vec}(\widehat{\Theta}_g)$ denotes the vector formed by stacking the columns of $\widehat{\Theta}_g$ , and $\mathrm{vec}(\widehat{\Theta}_g)_{G_g^c}$ represents the subvector indexed by $G_g^c = \{(i,j): \Theta_{gij} = 0\}$ . + +Theorem 4.4 demonstrates that the estimator $\widehat{\Theta}_g$ recovers all zeros and nonzeros in $\Theta_g$ with probability $1 - p^{2 - \eta}$ . The proof of Theorem 4.4 is similar to that of Theorem 3 in Xiao et al. (2022) and is omitted here. + +Notably, many mixture marginally recoverable distributions + +satisfy both Conditions 4.1 and 4.2. A crucial example is the MPLN distribution, well-suited for gene regulatory network inference in scRNA-seq studies. Unlike single-model approaches requiring prior knowledge of cell type labels, the MPLN model handles network inference without such prior knowledge. Additionally, it accounts for overdispersion in scRNA-seq data and supports both positive and negative correlations (Silva et al., 2019; Tunaru, 2002). Tang et al. (2024) proposed VMPLN, a variational inference-based algorithm for estimating the precision matrices of MPLN, but it is time-consuming and lacks theoretical guarantees. In contrast, our estimation method is supported by theoretical guarantees. Under mild conditions, we show the following: + +1) The MPLN distribution satisfies Conditions 4.1 and 4.2. This nontrivial proof is provided in Appendix A.3.4. +2) The binary data model in Example 2.6 also satisfies both conditions, with the proof detailed in Appendix A.4. + +Thus, Theorem 4.3 and Theorem 4.4 demonstrate broad applicability. + +# 5. Simulation + +To evaluate the performance of our method, we conduct simulations on mixed count data and binary data. + +# 5.1. Simulation for Mixed Count Data + +We generate simulation data following the MPLN distribution and compare EM-MMLE with the available network inference methods including PLNet (Xiao et al., 2022), VMPLN (Tang et al., 2024), and Glasso (Friedman et al., 2008). EM-MMLE and VMPLN are developed to directly estimate the precision matrices from the MPLN model, using K-means clustering results as initial values. For PLNet and Glasso, samples are clustered using the K-means algorithm, and then the network is inferred separately for each cluster. + +Simulation Settings. The number of populations $G$ is set as 3, and the proportion parameter $\pi$ is set as $(1/3, 1/3, 1/3)$ . The synthetic datasets vary across different network structures (random, blocked random, banded, and scale-free), dimensions $(p = 100, 300)$ , sample sizes $(n = 1800, 3000)$ , population mixing levels (low, middle, and high), and zero-proportion levels that represent the proportion of zeros in the count matrix (low and high). In each scenario, we independently repeat simulations 50 times. Details of the data generation process are provided in Appendix B.1. + +Performance Comparison. Table 1 shows the area under the precision-recall curve (AUPR) of each estimator for random graphs, calculated by varying the penalty parameters, while results for the other three graph structures + +![](images/3843e093f64231441d92b9051627e42bf306f891db12cde7c553170887fa9c42.jpg) +Figure 1. Mean networks predicted by EM-MMLE, PLNet, VM-PLN, and Glasso for the banded graph with $p = 100$ , $n = 3000$ , high mixing, and a high zero-proportion rate. False edges are colored in red and true edges are in dark blue. + +are provided in Tables 3-5 in the Appendix B.3. As expected, the AUPR decreases with an increase in the number of genes or higher zero-proportion levels. Among the four methods, EM-MMLE proves to be the most robust, consistently outperforming PLNet, VMPLN, and Glasso in AUPR across all simulated scenarios. This advantage is particularly evident in high-dimensional settings, situations with higher population mixing levels, or when zero-proportion rates are high. As the sample size increases, the AUPR of EM-MMLE improves significantly, aligning well with theoretical expectations. + +Moreover, the superiority of EM-MMLE over PLNet becomes more evident with increased population mixing. For example, in simulations with a blocked random graph ( $n = 3000$ , $p = 300$ , low zero-proportion), EM-MMLE achieves mean AUPRs of 0.84 and 0.94 in high and low mixing scenarios, respectively, approximately 15% and 8% higher than PLNet's AUPRs (0.73 and 0.87). + +Additionally, compared to VMPLN, another network inference method based on the MPLN model, EM-MMLE shows superior performance, especially in higher-dimensional settings. For instance, in random graph simulations ( $n = 3000$ , low mixing, low zero-proportion), EM-MMLE achieves mean AUPRs of $0.96$ ( $p = 300$ ) and $0.99$ ( $p = 100$ ), outperforming VMPLN by $28\%$ and $4\%$ , respectively. + +To further assess the performance of EM-MMLE, we visualize the average network predicted by the four methods across 50 simulations. We computed the relative frequency matrix $\mathbf{F}$ to capture the accuracy of network recovery. For $\Theta_{ij} \neq 0$ , $F_{ij}$ represents the proportion of simulations in which the edge was correctly recovered. Conversely, when $\Theta_{ij} = 0$ , $F_{ij}$ denotes the negative proportion of simulations in which an edge between nodes $i$ and $j$ was incorrectly + +Table 1. Comparisons of EM-MMLE with PLNet, VMPLN and Glasso in terms of AUPR on simulation results for random graphs generated by the MPLN model. The results are averages over 50 replicates with standard deviations in brackets. + +
Zero-proportion +Dimension +Mixing degreeLowp=100 +MiddleLowp=300 +MiddleHigh
HighLow
n=1800
EM-MMLE0.95 (0.013)0.94 (0.012)0.91 (0.018)0.86 (0.024)0.81 (0.022)0.72 (0.04)
PLNet0.89 (0.03)0.86 (0.046)0.81 (0.047)0.74 (0.061)0.67 (0.066)0.57 (0.085)
VMPLN0.9 (0.023)0.9 (0.022)0.89 (0.037)0.67 (0.026)0.66 (0.017)0.64 (0.022)
Glasso0.83 (0.036)0.8 (0.032)0.76 (0.047)0.72 (0.028)0.69 (0.027)0.61 (0.034)
n=3000
EM-MMLE0.99 (0.006)0.98 (0.006)0.98 (0.008)0.96 (0.008)0.94 (0.011)0.87 (0.019)
PLNet0.95 (0.047)0.95 (0.033)0.93 (0.03)0.91 (0.052)0.87 (0.063)0.75 (0.052)
VMPLN0.95 (0.028)0.95 (0.021)0.94 (0.016)0.75 (0.021)0.74 (0.013)0.72 (0.019)
Glasso0.89 (0.04)0.88 (0.033)0.85 (0.035)0.82 (0.021)0.79 (0.019)0.72 (0.024)
Zero-proportion +Dimension +Mixing degreep=100Highp=300
LowMiddleHighLowMiddleHigh
n=1800
EM-MMLE0.83 (0.026)0.8 (0.037)0.75 (0.03)0.62 (0.041)0.55 (0.028)0.49 (0.03)
PLNet0.72 (0.073)0.69 (0.059)0.61 (0.069)0.55 (0.064)0.47 (0.04)0.41 (0.031)
VMPLN0.77 (0.037)0.75 (0.034)0.72 (0.033)0.47 (0.034)0.45 (0.025)0.44 (0.021)
Glasso0.55 (0.045)0.49 (0.046)0.45 (0.045)0.47 (0.032)0.44 (0.028)0.41 (0.026)
n=3000
EM-MMLE0.95 (0.01)0.94 (0.013)0.92 (0.017)0.83 (0.028)0.79 (0.025)0.71 (0.037)
PLNet0.89 (0.037)0.87 (0.048)0.81 (0.065)0.77 (0.048)0.71 (0.039)0.62 (0.048)
VMPLN0.86 (0.038)0.84 (0.042)0.81 (0.047)0.56 (0.031)0.55 (0.026)0.54 (0.018)
Glasso0.63 (0.04)0.6 (0.06)0.55 (0.063)0.58 (0.029)0.58 (0.033)0.53 (0.043)
+ +predicted. Figure 2 shows the results for the banded graph with $p = 100$ , $n = 3000$ , high mixing, and a high zero-proportion rate. EM-MMLE closely aligns with the true network structure, detecting more true edges while maintaining the lowest false positive rate compared to other methods. + +# 5.2. Simulation for Binary Data + +To evaluate the performance of MMLE in estimating the inverse correlation matrix $\Theta$ for binary data, we follow a similar data-generating procedure as described in Fan et al. (2017). Specifically, we generate simulation data $\mathbf{Y} = (Y_1,\ldots ,Y_p)^\top$ , where $Y_{j} = I(X_{j} > C_{j})$ for $j = 1,\dots ,p$ , with $\mathbf{X}\sim N_p(\mathbf{0},\boldsymbol {\Sigma})$ . + +We then compare the performance of MMLE with three estimation methods: the rank-based estimator by Fan et al.(2017), AMLE (d'Aspremont et al., 2008), and an Oracle estimator, which utilizes the Pearson correlation of the latent variable $\mathbf{X}$ within the D-trace loss to benchmark the information loss of estimators derived from observed data $\mathbf{Y}$ . The rank-based estimator by Fan et al.(2017) is designed to estimate the correlation matrix in a latent Gaussian copula model. To estimate the precision matrix, we apply D-trace to the correlation matrix from this estimator to assess its accuracy in estimating $\Theta$ . AMLE is a graphical lasso estimator that takes the modified sample covariance matrix $\Sigma_A$ as + +its input, where $\mathbf{\Sigma}_A = \frac{1}{n}\sum_{i = 1}^n\left(\mathbf{X}_i - \bar{\mathbf{X}}\right)\left(\mathbf{X}_i - \bar{\mathbf{X}}\right)^\top +\frac{1}{3}$ and $\bar{\mathbf{X}} = \frac{1}{n}\sum_{i = 1}^{n}\mathbf{X}_{i}$ + +Simulation Settings. We set $p = 50, 200$ and evaluate the performance for three sample sizes: $n = 200, 500, 3000$ . Each simulation scenario is repeated 100 times. The data generative process is detailed in Appendix B.2 + +Performance Comparison. Table 2 presents the average estimation errors of $\widehat{\Sigma} - \Sigma$ and $\widehat{\Theta} - \Theta$ as measured by the Frobenius norm. It is seen that the estimation errors of MMLE and Fan's method remain nearly identical across different dimensions and both are significantly lower than those of AMLE. When $n$ is small, MMLE demonstrates higher accuracy in estimating $\Sigma$ compared to Fan's method. Notably, Fan's method can only handle model (3), whereas MMLE offers greater generalizability. Compared to the benchmark Oracle estimator, the results in Table 2 indicate that MMLE has almost no information loss at $n = 200$ and $n = 500$ , and only moderate information loss in the high-dimensional environment at $n = 3000$ . + +# 6. Application to a scRNA-seq Dataset + +In this section, we evaluate the performance of EM-MMLE for gene regulatory network inference using a real scRNA-seq dataset (Zheng et al., 2017), comprising 6,952 cells + +Table 2. Average estimation error of MMLE, Fan et al.'s method, Oracle, and AMLE measured by the Frobenius norm on binary data. The results are averages over 100 replicates with standard deviations in brackets. + +
p +n50200
20050030002005003000
Σ - Σ
Oracle3.599 (0.02)2.173 (0.01)0.909 (0.01)14.153 (0.03)8.911 (0.02)3.629 (0.01)
MMLE6.343 (0.15)3.978 (0.07)1.597 (0.03)25.84 (0.14)15.869 (0.11)6.529 (0.03)
Fan et al.6.375 (0.15)3.986 (0.07)1.598 (0.03)25.978 (0.14)15.901 (0.11)6.531 (0.03)
AMLE31.254 (0.11)31.247 (0.06)31.036 (0.03)125.278 (0.31)123.72 (0.36)124.367 (0.08)
Θ - Θ
Oracle2.327 (0.03)2.335 (0.03)1.12 (0.08)2.365 (0.02)2.342 (0.03)1.045 (0.03)
MMLE2.328 (0.03)2.334 (0.03)1.335 (0.06)2.365 (0.02)2.363 (0.03)2.332 (0.04)
Fan et al.2.327 (0.03)2.333 (0.03)1.336 (0.09)2.365 (0.02)2.363 (0.03)2.33 (0.04)
AMLE2.684 (0.34)2.834 (0.03)2.198 (0.03)2.365 (0.02)3.564 (0.02)2.871 (0.04)
+ +![](images/82b2636fe31dae629fb423c514569a1a6e298e999767f3c662c2c36f4e1ff8da.jpg) +Figure 2. AUPRC ratios of network inference algorithms on the scRNA-seq dataset. Algorithms are ordered by decreasing median AUPRC ratios. The color in each cell is proportional to the corresponding value (scaled between 0 and 1, with values below those of a random predictor shown as grey squares). The actual values are displayed in the boxes. + +across four cell types. The dataset includes two batches, sequenced by $3^{\prime}$ and $5^{\prime}$ scRNA-seq technologies. One batch is used to construct silver standards based on public regulatory network databases (Appendix C.1), while the other batch is reserved for algorithm testing. We infer regulatory interactions for the top 300 highly variable genes identified by Seurat (Stuart et al., 2019) and assess the results by comparison to these silver standards. + +To compare network predictions fairly, we use the AUPRC ratio, a metric from a previous benchmark (Pratapa et al., 2020) (see Appendix C.2). Algorithms are compared at a fixed network density $(5\%)$ , with AUPRC ratios calculated relative to the silver standards. Figure 2 presents the + +heatmap of AUPRC ratios for six methods (four evaluated in the simulation and two additional single-cell gene regulatory network inference methods: PPCOR (Kim, 2015) and GENIE3 (Huynh-Thu et al., 2010)). EM-MMLE achieves the highest AUPRC ratios in most cases and consistently outperforms the random predictor across all cell types. + +From a biological perspective, some interesting association patterns are identified by EM-MMLE (Figure 3). It reveals an association between the genes MYBL2 and TK1, which is predicted across the regulatory networks of three cell types. This finding is supported by the literature (Qiu et al., 2022), which links these genes to N glycan biosynthesis and p53 signaling pathways. Additionally, EM-MMLE predicts an association between the genes MYBL2 and BIRC5, supported by Li et al. (2021). Interestingly, we also identified a cell-type-specific hub gene ID3 in the gene regulatory network of $\mathrm{CD4 + }$ T cells. Gene ontology analysis of ID3 target genes (Figure 4) reveals enrichment in terms related to antigen processing and presentation, including exogenous and endogenous peptide antigens via MHC class II. The relationship between $\mathrm{CD4 + }$ T cells and MHC class II is central to adaptive immune responses in the immune system. + +# 7. Discussion + +In this paper, we introduce a new and generic family of graphical models, the marginally recoverable family, which is not limited to specific models or data types. We propose MMLE for parameter estimation with theoretical guarantees, avoiding high-dimensional integration, and introduce EM-MMLE to handle mixture distributions and capture heterogeneous structures. The effectiveness of our method is demonstrated through several specific distributions. + +To facilitate intuitive network representation, we impose certain restrictions on the form of the parameters within + +the marginally recoverable family and require that the one-dimensional and two-dimensional marginal distributions satisfy specific conditions. However, motivated by the underlying principles of the family, we can provide a more general definition that extends to distributions determined by higher moments. + +Let $\mathbf{X}$ be a $p$ -dimensional random variable, and let $d < p$ be a fixed integer. We say that $\mathbf{X}$ is $d$ -marginally recoverable if any $d$ -dimensional marginal distribution of $\mathbf{X}$ belongs to the same distribution family, and the parameters of all $d$ -dimensional marginal distributions collectively characterize the parameters of the full distribution. + +This generalization improves the flexibility of the marginally recoverable family and broadens its applicability to more general parameter estimation problems. Future work will explore additional distributions within this framework and apply the proposed estimation method to diverse real-world applications. + +# Acknowledgements + +We thank the anonymous reviewers for their valuable comments and Zihao Chen for helpful discussions. This work was supported by the National Key R&D Program of China (2024YFF0507404 to R.X.), the National Natural Science Foundation of China (12425110, 12371286 to R.X., 12271287 to W.W.), and the Sino-Russian Mathematics Center. Part of the analysis was performed on the high-performance computing platform of the Center for Life Sciences (Peking University). + +# Impact Statement + +This paper presents work whose goal is to advance the field of machine learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# References + +Abbasy, M. R., Nikfard, P., Ordi, A., and Torkaman, M. R. N. DNA base data hiding algorithm. International Journal of New Computer Architectures and their Applications (IJNCAA), 2(1):183-192, 2012. +Aitchison, J. and Ho, C. The multivariate Poisson-log normal distribution. Biometrika, 76(4):643-653, 1989. +Amaratunga, D., Cabrera, J., and Shkedy, Z. Exploration and analysis of DNA microarray and other high-dimensional data. John Wiley & Sons, 2014. +Anders, S. and Huber, W. Differential expression analysis + +for sequence count data. Nature Precedings, pp. 1-1, 2010. +Banerjee, O., El Ghaoui, L., and d'Aspremont, A. Model selection through sparse maximum likelihood estimation for multivariate gaussian or binary data. The Journal of Machine Learning Research, 9:485-516, 2008. +Cai, T. and Liu, W. Adaptive thresholding for sparse covariance matrix estimation. Journal of the American Statistical Association, 106(494):672-684, 2011. +Chiquet, J., Robin, S., and Mariadassou, M. Variational inference for sparse network reconstruction from count data. In International Conference on Machine Learning, pp. 1162-1171. PMLR, 2019. +Choi, Y., Coram, M., Peng, J., and Tang, H. Aoisson lognormal model for constructing gene covariation network using RNA-seq data. Journal of Computational Biology, 24(7):721-731, 2017. +Cox, D. R. and Reid, N. A note on pseudolikelihood constructed from marginal densities. Biometrika, 91(3):729-737, 2004. +d'Aspremont, A., Banerjee, O., and El Ghaoui, L. First-order methods for sparse covariance selection. SIAM Journal on Matrix Analysis and Applications, 30(1):56-66, 2008. +Fan, J., Liu, H., Ning, Y., and Zou, H. High dimensional semiparametric latent graphical model for mixed data. Journal of the Royal Statistical Society Series B: Statistical Methodology, 79(2):405-421, 2017. +Friedman, J., Hastie, T., and Tibshirani, R. Sparse inverse covariance estimation with the graphical lasso. *Biostatistics*, 9(3):432-441, 2008. +Fu, A., Narasimhan, B., and Boyd, S. CVXR: An R package for disciplined convex optimization. Journal of Statistical Software, 94(14):1-34, 2020. +Hafemeister, C. and Satija, R. Normalization and variance stabilization of single-cell RNA-seq data using regularized negative binomial regression. *Genome biology*, 20 (1):296, 2019. +Han, H., Cho, J.-W., Lee, S., Yun, A., Kim, H., Bae, D., Yang, S., Kim, C. Y., Lee, M., Kim, E., et al. TRRUST v2: an expanded reference database of human and mouse transcriptional regulatory interactions. *Nucleic acids research*, 46(D1):D380-D386, 2018. +Hu, H., Miao, Y.-R., Jia, L.-H., Yu, Q.-Y., Zhang, Q., and Guo, A.-Y. AnimalTFDB 3.0: a comprehensive resource for annotation and prediction of animal transcription factors. Nucleic acids research, 47(D1):D33-D38, 2019. + +Huynh-Thu, V. A., Irrthum, A., Wehenkel, L., and Geurts, P. Inferring regulatory networks from expression data using tree-based methods. *PloS one*, 5(9):e12776, 2010. +Islam, S., Zeisel, A., Joost, S., La Manno, G., Zajac, P., Kasper, M., Lönnerberg, P., and Linnarsson, S. Quantitative single-cell RNA-seq with unique molecular identifiers. Nature methods, 11(2):163-166, 2014. +Kim, S. ppcor: an R package for a fast calculation to semi-partial correlation coefficients. Communications for statistical applications and methods, 22(6):665, 2015. +Lachmann, A., Xu, H., Krishnan, J., Berger, S. I., Mazloom, A. R., and Ma'ayan, A. ChEA: transcription factor regulation inferred from integrating genome-wide ChIP-X experiments. Bioinformatics, 26(19):2438-2444, 2010. +Lauritzen, S. Graphical models. Clarendon Press, 1996. +Li, X., Zhang, X., Wu, C.-C., Li, P.-P., Fu, Y.-M., Xie, L.-H., Sun, S.-S., Zhou, Y.-Y., and Zhu, B.-L. The role of MYB proto-oncogene like 2 in tamoxifen resistance in breast cancer. Journal of Molecular Histology, 52:21-30, 2021. +Liu, H., Lafferty, J., and Wasserman, L. The nonparanormal: semiparametric estimation of high dimensional undirected graphs. Journal of Machine Learning Research, 10(10), 2009. +Liu, H., Han, F., Yuan, M., Lafferty, J., and Wasserman, L. High-dimensional semiparametric Gaussian copula graphical models. 2012. +Liu, Z.-P., Wu, C., Miao, H., and Wu, H. RegNetwork: an integrated database of transcriptional and posttranscriptional regulatory networks in human and mouse. Database, 2015:bav095, 2015. +Meinhausen, N. and Buhlmann, P. High-dimensional graphs and variable selection with the lasso. 2006. +Oki, S., Ohta, T., Shioi, G., Hatanaka, H., Ogasawara, O., Okuda, Y., Kawaji, H., Nakaki, R., Sese, J., and Meno, C. ChIP-Atlas: a data-mining suite powered by full integration of public ChIP-seq data. EMBO reports, 19 (12):e46255, 2018. +Peng, J., Wang, P., Zhou, N., and Zhu, J. Partial correlation estimation by joint sparse regression models. Journal of the American Statistical Association, 104(486):735-746, 2009. +Pratapa, A., Jalihal, A. P., Law, J. N., Bharadwaj, A., and Murali, T. Benchmarking algorithms for gene regulatory network inference from single-cell transcriptomic data. Nature methods, 17(2):147-154, 2020. + +Qiu, C.-G., Shen, B., and Sun, X.-Q. Significant biomarkers identification associated with cutaneous squamous cell carcinoma progression. International Journal of General Medicine, pp. 2347-2360, 2022. +Sarkar, A. and Stephens, M. Separating measurement and expression models clarifies confusion in single-cell RNA sequencing analysis. Nature genetics, 53(6):770-777, 2021. +Shao, J. Mathematical statistics. Springer Science & Business Media, 2003. +Silva, A., Rothstein, S. J., McNicholas, P. D., and Subedi, S. A multivariate Poisson-log normal mixture model for clustering transcriptome sequencing data. BMC bioinformatics, 20:1-11, 2019. +Sinclair, D. and Hooker, G. Sparse inverse covariance estimation for high-throughput microRNA sequencing data in the Poisson log-normal graphical model. Journal of Statistical Computation and Simulation, 89(16):3105-3117, 2019. +Skrondal, A. and Rabe-Hesketh, S. Latent variable modelling: A survey. Scandinavian Journal of Statistics, 34 (4):712-745, 2007. +Stuart, T., Butler, A., Hoffman, P., Hafemeister, C., Papalexi, E., Mauck, W. M., Hao, Y., Stoeckius, M., Smibert, P., and Satija, R. Comprehensive integration of single-cell data. cell, 177(7):1888-1902, 2019. +Szklarczyk, D., Gable, A. L., Lyon, D., Junge, A., Wyder, S., Huerta-Cepas, J., Simonovic, M., Doncheva, N. T., Morris, J. H., Bork, P., et al. STRING v11: protein-protein association networks with increased coverage, supporting functional discovery in genome-wide experimental datasets. *Nucleic acids research*, 47(D1):D607–D613, 2019. +Tang, J., Wang, C., Xiao, F., and Xi, R. Single-cell gene regulatory network analysis for mixed cell populations. Quantitative Biology, 2024. +Trinh, G., Rungie, C., Wright, M., Driesener, C., and Dawes, J. Predicting future purchases with the Poisson lognormal model. Marketing Letters, 25:219-234, 2014. +Tunaru, R. Hierarchical Bayesian models for multiple count data. Austrian Journal of statistics, 31(2&3):221-229, 2002. +Varin, C. On composite marginal likelihoods. *Asta advances in statistical analysis*, 92(1):1-28, 2008. +Varin, C., Reid, N., and Firth, D. An overview of composite likelihood methods. Statistica Sinica, pp. 5-42, 2011. + +Wong, W. H. and Shen, X. Probability inequalities for likelihood ratios and convergence rates of sieve MLEs. The Annals of Statistics, pp. 339-362, 1995. +Wu, H., Deng, X., and Ramakrishnan, N. Sparse estimation of multivariate Poisson log-normal models from count data. Statistical Analysis and Data Mining: The ASA Data Science Journal, 11(2):66-77, 2018. +Xiao, F., Tang, J., Fang, H., and Xi, R. Estimating graphical models for count data with applications to single-cell gene network. Advances in Neural Information Processing Systems, 35:29038-29050, 2022. +Xu, H., Baroukh, C., Dannenfelser, R., Chen, E. Y., Tan, C. M., Kou, Y., Kim, Y. E., Lemischka, I. R., and Ma'ayan, A. ESCAPE: database for integrating high-content published data collected from human and mouse embryonic stem cells. Database, 2013:bat045, 2013. +Xue, L. and Zou, H. Regularized rank-based estimation of high-dimensional nonparanormal graphical models. 2012. +Yakowitz, S. J. and Spragins, J. D. On the identifiability of finite mixtures. The Annals of Mathematical Statistics, 39(1):209-214, 1968. +Yuan, M. and Lin, Y. Model selection and estimation in the Gaussian graphical model. Biometrika, 94(1):19-35, 2007. +Zhang, Q., Liu, W., Zhang, H.-M., Xie, G.-Y., Miao, Y.-R., Xia, M., and Guo, A.-Y. hTFtarget: a comprehensive database for regulations of human transcription factors and their targets. Genomics, Proteomics and Bioinformatics, 18(2):120-128, 2020. +Zhang, T. and Zou, H. Sparse precision matrix estimation via lasso penalized D-trace loss. Biometrika, 101(1): 103-120, 2014. +Zheng, G. X., Terry, J. M., Belgrader, P., Ryvkin, P., Bent, Z. W., Wilson, R., Ziraldo, S. B., Wheeler, T. D., McDermott, G. P., Zhu, J., et al. Massively parallel digital transcriptional profiling of single cells. Nature communications, 8(1):14049, 2017. +Zhou, K.-R., Liu, S., Sun, W.-J., Zheng, L.-L., Zhou, H., Yang, J.-H., and Qu, L.-H. ChIPBase v2.0: decoding transcriptional regulatory networks of non-coding RNAs and protein-coding genes from ChIP-seq data. *Nucleic acids research*, pp. gkw965, 2016. + +# A. Theoretical Results and Proofs + +# A.1. Proofs for Theorem 4.3 + +In this section, we first provide some lemmas concerning the Maximum Likelihood Estimator (MLE) and subsequently prove Theorem 4.3. + +Recall that $h_1^M (\mathbf{y};\omega_1)$ , $h_2^M (\mathbf{y};\omega_2)$ denote the one-dimensional and two-dimensional marginal density functions of $H_{p}^{M}(\pi ,\Omega)$ , respectively, with parameters $\omega_{1}\in \mathcal{O}_{1}$ and $\omega_{2}\in \mathcal{O}_{2}$ , where $\mathcal{O}_1,\mathcal{O}_2$ are parameter spaces in finite-dimensional Euclidean space. For simplicity, we omit the subscripts and use $h^M (\mathbf{y};\omega)$ to represent either the one-dimensional or two-dimensional marginal density function of $H_{p}^{M}(\pi ,\Omega)$ , where $\omega \in \mathcal{O}$ is a $k$ -dimensional parameter vector. Define $\mathcal{F} = \left\{h^{M}(\mathbf{y};\boldsymbol {\omega}):\boldsymbol {\omega}\in \mathcal{O}\right\}$ . + +For any $u > 0$ , if there exists a finite set $\{(f_j^L, f_j^U), j = 1, \dots, N\}$ such that $\left\| (f_j^L)^{1/2} - (f_j^U)^{1/2} \right\|_2 \leq u$ for $j = 1, \dots, N$ and for any $h^M(\mathbf{y}; \omega) \in \mathcal{F}$ , there exists a $j$ such that $f_j^L \leq h^M(\mathbf{y}; \omega) \leq f_j^U$ , we say that $\{(f_j^L, f_j^U), j = 1, \dots, N\}$ is a Hellinger $u$ -bracketing of $\mathcal{F}$ , and $N$ is the size of the Hellinger $u$ -bracketing. Let $\mathcal{N}_u$ be the set of sizes of all Hellinger $u$ -bracketings. We define the bracketing Hellinger metric entropy of $\mathcal{F}$ as + +$$ +H (u, \mathcal {F}) = \min _ {N \in \mathcal {N} _ {u}} \log N. +$$ + +# A.1.1. LEMMAS + +Lemma A.1. There exist positive constants $c_{1}, c_{2}, c_{3}$ , such that, for any $\epsilon > 0$ , if + +$$ +\int_ {s ^ {2} / 2 ^ {8}} ^ {\sqrt {2} s} H ^ {1 / 2} \left(u / c _ {2}, \left\{p _ {1} \in \mathcal {F}: d \left(p _ {1}, h ^ {M} (\mathbf {y}; \boldsymbol {\omega})\right) \leq \sqrt {2} s \right\}\right) d u \leq c _ {3} n ^ {1 / 2} s ^ {2} \tag {9} +$$ + +for all $s \geq \epsilon$ , then for the MLE $\hat{\omega}$ of the true parameter $\omega$ using $n$ independent samples, we have + +$$ +p r \left(\left\| h ^ {M ^ {1 / 2}} (\mathbf {y}; \hat {\boldsymbol {\omega}}) - h ^ {M ^ {1 / 2}} (\mathbf {y}; \boldsymbol {\omega}) \right\| _ {L _ {2}} \geq \epsilon\right) \leq 5 \exp (- c _ {1} n \epsilon^ {2}) +$$ + +Lemma A.1 is a local version of Theorems 1 and 2 from Wong & Shen (1995). + +Lemma A.2. Let $\hat{\omega}$ be the MLE of the true parameter $\omega$ restricted on $\mathcal{O}$ . Under Condition 4.1 and Condition 4.2, there exists a positive constant $c$ independent with parameters, such that, for any $\epsilon > 0$ , we have + +$$ +p r \left(\| \hat {\boldsymbol {\omega}} - \boldsymbol {\omega} \| _ {2} \geq \epsilon\right) \leq 5 \exp \left(- c n \epsilon^ {2}\right). +$$ + +Proof. To prove Lemma A.2, we adopt a proof framework similar to that of Lemma S11 in Xiao et al. (2022). First we will show that there exist positive constants $c_{4}, c_{5}$ , such that, + +$$ +H \left(u, \left\{p _ {1} \in \mathcal {F}: d \left(p _ {1}, h ^ {M} (\mathbf {y}; \boldsymbol {\omega})\right) \leq \sqrt {2} s \right\}\right) \leq c _ {4} \log \left(c _ {5} s / u\right). \tag {10} +$$ + +According to the lower boundedness condition 4.1, the parameters whose index in $\{p_1\in \mathcal{F}:d(p_1,h^M (\mathbf{y};\omega))\leq \sqrt{2} s\}$ can be covered by $\mathcal{F}_{\omega ,s} = \{\omega^{\prime}|\| \omega^{\prime} - \omega \| _2\leq \sqrt{2}s / C_1\}$ , where $C_1$ is a constant. Using the upper boundedness condition 4.2, for any $\omega ,\omega^{\prime}\in \mathcal{O}$ , there exist a measurable function $m(\mathbf{y})$ and a constant $C_2$ such that $\int m^{2}(\mathbf{y})d\nu = C_{2}^{2} < \infty$ , and $\left|h^{M^{1 / 2}}(\mathbf{y};\omega) - h^{M^{1 / 2}}(\mathbf{y};\omega')\right|\leq m(\mathbf{y})\| \boldsymbol {\omega} - \boldsymbol{\omega}'\| _2$ . It is straightforward to verify that we can cover the set $\mathcal{F}_{\omega ,s}$ by at most $(2\sqrt{2} C_2s / C_1u)^k$ balls, while each ball has a radius of $u / 2C_2$ . For any ball $\mathcal{B}$ with radius $u / 2C_2$ , we define the centre of $\mathcal{B}$ as $\omega_0$ , then $\| \omega^{\prime} - \omega_{0}\|_{2}\leq u / 2C_{2}$ for any $\omega^{\prime}\in \mathcal{B}$ . Then, we have $\left|h^{M^{1 / 2}}(\mathbf{y};\omega^{\prime}) - h^{M^{1 / 2}}(\mathbf{y};\omega_0)\right|\leq m(\mathbf{y})u / 2C_2$ . Therefore, we can select the minimum and maximum density within each ball as follows: + +$$ +f _ {L} ^ {1 / 2} = \max \left\{h ^ {M ^ {1 / 2}} (\mathbf {y}; \boldsymbol {\omega} _ {0}) - m (\mathbf {y}) u / 2 C _ {2}, 0 \right\}, f _ {U} ^ {1 / 2} = h ^ {M ^ {1 / 2}} (\mathbf {y}; \boldsymbol {\omega} _ {0}) + m (\mathbf {y}) u / 2 C _ {2}. +$$ + +Consequently, we have $d(f_{L},f_{U})\leq (\int m^{2}(\mathbf{y})u^{2} / C_{2}^{2}d\mathbf{y})^{1 / 2} = u$ , thus we can derive (10). + +Next, to apply Lemma A.1, we aim to prove the existence of positive constants $c_2$ and $c'$ such that (9) holds for any $s \geq c'n^{-1/2}$ . The case that $s < c'n^{-1/2}$ will be discussed later. According to the Cauchy inequality $\left(\int_{a}^{b} f^{1/2} dx\right)^{2} \leq (b - a)\int_{a}^{b} f dx$ , + +$$ +\begin{array}{l} \left(\int_ {s ^ {2} / 2 ^ {8}} ^ {\sqrt {2} s} H ^ {1 / 2} \left(u / c _ {2}, \left\{p _ {1} \in \mathcal {F}: d \left(p _ {1}, h ^ {M} (\mathbf {y}; \boldsymbol {\omega})\right) \leq \sqrt {2} s \right\}\right) d u\right) ^ {2} \\ \leq \left(\sqrt {2} s - s ^ {2} / 2 ^ {8}\right) \int_ {s ^ {2} / 2 ^ {8}} ^ {\sqrt {2} s} H \left(u / c _ {2}, \left\{p _ {1} \in \mathcal {F}: d \left(p _ {1}, h ^ {M} (\mathbf {y}; \boldsymbol {\omega})\right) \leq \sqrt {2} s \right\}\right) d u \tag {11} \\ \leq \sqrt {2} s \int_ {s ^ {2} / 2 ^ {8}} ^ {\sqrt {2} s} H \left(u / c _ {2}, \left\{p _ {1} \in \mathcal {F}: d \left(p _ {1}, h ^ {M} (\mathbf {y}; \boldsymbol {\omega})\right) \leq \sqrt {2} s \right\}\right) d u \\ \leq \sqrt {2} s \int_ {s ^ {2} / 2 ^ {8}} ^ {\sqrt {2} s} c _ {4} \log (c _ {2} c _ {5} s / u) d u \\ \end{array} +$$ + +Thus, it suffices to show there exist positive constants $c_{2}$ and $c^{\prime}$ such that + +$$ +\int_ {s ^ {2} / 2 ^ {8}} ^ {\sqrt {2} s} \log \left(c _ {2} c _ {5} s / u\right) d u \leq n s ^ {3}, \tag {12} +$$ + +for all $s \geq c'n^{-1/2}$ . + +Let $c_{2} \geq c_{5}^{-1}$ . After calculating the left hand of (12), we have + +$$ +\begin{array}{l} \int_ {s ^ {2} / 2 ^ {8}} ^ {\sqrt {2} s} \log (c _ {2} c _ {5} s / u) d u = \log (c _ {2} c _ {5} s) (\sqrt {2} s - s ^ {2} / 2 ^ {8}) + [ u - u \log u ] | _ {s ^ {2} / 2 ^ {8}} ^ {\sqrt {2} s} \\ \leq - \sqrt {2} s \log (\sqrt {2}) - s ^ {2} / 2 ^ {8} \left(\log (s) - \log \left(s ^ {2} / 2 ^ {8}\right)\right) + \left(\sqrt {2} s - s ^ {2} / 2 ^ {8}\right) + \log \left(c _ {2} c _ {5}\right) \sqrt {2} s \tag {13} \\ = \sqrt {2} \log \left(c _ {2} c _ {5} e / \sqrt {2}\right) s - s ^ {2} / 2 ^ {8} \log \left(2 ^ {8} e / s\right). \\ \end{array} +$$ + +Note that $\sqrt{2} s \geq s^2 / 2^8$ implies $\log(2^8 e / s) > 0$ . Therefore, if $ns^2 \geq \sqrt{2}\log(c_2c_5e / \sqrt{2})$ , i.e., $s \geq c'n^{-1/2}$ where $c' = (\sqrt{2}\log(c_2c_5e / \sqrt{2}))^{1/2}$ , inequality (12) will hold. + +Then using Lemma A.1, there exists a positive constant $c_{1}$ such that + +$$ +p r \left(\left\| h ^ {M ^ {1 / 2}} (\mathbf {y}; \hat {\boldsymbol {\omega}}) - h ^ {M ^ {1 / 2}} (\mathbf {y}; \boldsymbol {\omega}) \right\| _ {L _ {2}} \geq \epsilon\right) \leq 5 \exp (- c _ {1} n \epsilon^ {2}), +$$ + +for any $\epsilon \geq c'n^{-1/2}$ . Notice that for $0 < \epsilon < c'n^{-1/2}$ , we can have a constant $c_0$ to satisfy + +$$ +p r \left(\left\| h ^ {M ^ {1 / 2}} (\mathbf {y}; \hat {\boldsymbol {\omega}}) - h ^ {M ^ {1 / 2}} (\mathbf {y}; \boldsymbol {\omega}) \right\| _ {L _ {2}} \geq \epsilon\right) \leq 5 \exp (- c _ {0} n \epsilon^ {2}). +$$ + +Choosing constant $c = \min \{c_0, c_1\}$ , we have for any $\epsilon > 0$ + +$$ +\left. p r \left(\left\| h ^ {M ^ {1 / 2}} (\mathbf {y}; \hat {\omega}) - h ^ {M ^ {1 / 2}} (\mathbf {y}; \omega) \right\| _ {L _ {2}} \geq \epsilon\right) \leq 5 \exp (- c n \epsilon^ {2}). \right. +$$ + +Noting that $\omega, \hat{\omega} \in \mathcal{O}$ , we apply the lower boundedness condition 4.1 to obtain + +$$ +\left\{d \left(h ^ {M} (\mathbf {y}; \hat {\boldsymbol {\omega}}), h ^ {M} (\mathbf {y}; \boldsymbol {\omega})\right) < \epsilon \right\} \subseteq \left\{\| \hat {\boldsymbol {\omega}} - \boldsymbol {\omega} \| _ {2} < \epsilon / C _ {1} \right\}, +$$ + +where $C_1$ is a constant. Thus, + +$$ +\Pr \left(\| \hat {\boldsymbol {\omega}} - \boldsymbol {\omega} \| _ {2} < \epsilon / C _ {1}\right) \geq \Pr \left(d \left(h ^ {M} (\mathbf {y}; \hat {\boldsymbol {\omega}}), h ^ {M} (\mathbf {y}; \boldsymbol {\omega})\right) < \epsilon\right) \geq 1 - 5 \exp (- c n \epsilon^ {2}), +$$ + +which implies that + +$$ +p r \left(\| \hat {\boldsymbol {\omega}} - \boldsymbol {\omega} \| _ {2} \geq \epsilon^ {\prime}\right) \leq 5 \exp \left(- C n \epsilon^ {\prime 2}\right), +$$ + +for a constant $C$ and all $\epsilon' > 0$ . Then we finish our proof. + +# A.1.2. PROOF OF THEOREM 4.3 + +Proof. Recall the definition of MMLE in Equation (5). Apply Lemma A.2 to $Y_{j}$ and $Y_{[j,k]}$ for any $1 \leq j < k \leq p$ , we have $pr\left(|\hat{\sigma}_{gjk} - \sigma_{gjk}| \geq \epsilon\right) \leq 5 \exp \left(-Cn\epsilon^{2}\right)$ for any $1 \leq j \leq k \leq p$ , $1 \leq g \leq G$ and $\epsilon > 0$ . Thus, we have $pr\left(\left\| \widehat{\pmb{\Sigma}}_g - \pmb{\Sigma}_g \right\|_{\infty} \geq \epsilon\right) \leq 5Gp^2 \exp \left(-cn\epsilon^2\right)$ for any $1 \leq g \leq G$ and $\epsilon > 0$ with a constant $c$ and finish the proof. + +# A.2. Detailed Restatement of Theorem 4.4 + +For a vector $\mathbf{a}$ with the $i$ -th entry $a_{i}$ , let $\| \mathbf{a}\| _1 = \sum_i|a_i|$ . For a matrix $\mathbf{A}$ , let $\lambda_{\mathrm{max}}(\mathbf{A})$ and $\lambda_{\mathrm{min}}(\mathbf{A})$ be the largest and smallest eigenvalues of $\mathbf{A}$ , $\operatorname{vec}(\mathbf{A})$ denote the vector formed by stacking the columns of $\mathbf{A}$ , $\| \mathbf{A}\| _0 = \sum_{i,j}I(A_{ij}\neq 0)$ denote the number of nonzero entries, $\| \mathbf{A}\|_{1,\mathrm{off}} = \sum_{i\neq j}|A_{ij}|$ and $\| \mathbf{A}\|_{1,\infty} = \max_i(\sum_j|A_{ij}|)$ . + +For each $g = 1,\dots,G$ , we introduce the following notation. Define $G_{g} = \{(i,j)|\Theta_{gij}\neq 0\}$ as the set of positions corresponding to nonzero elements in $\Theta_{g}$ and $G_{g}^{c} = \{(i,j)|\Theta_{gij} = 0\}$ . Let $d$ denote the maximum node degree in $\Theta_{g}$ , $s = \| \Theta_g\| _0$ , and $\theta_{\mathrm{min}} = \min_{(i,j)\in G_g}|\Theta_{gij}|$ be the minimal absolute value of nonzero elements of $\Theta_{g}$ . We define $\Gamma^{*} = \Gamma (\Sigma_{g}) = (\Sigma_{g}\otimes \mathbf{I} + \mathbf{I}\otimes \Sigma_{g}) / 2$ , where $\mathbf{A}\otimes \mathbf{B}$ is the Kronecker product. For two subsets $T_{1}$ and $T_{2}$ of $\{(i,j)\mid 1\leq i,j\leq p\}$ , we define $\Gamma (\mathbf{A})_{T_1,T_2}$ be the submatrix of $\Gamma (\mathbf{A})$ whose rows and columns indexed by $T_{1}$ and $T_{2}$ , respectively. Other notations are as follows, + +$$ +\gamma = 1 - \max _ {(i, j) \in G _ {g} ^ {c}} \left\| \boldsymbol {\Gamma} _ {(i, j), G _ {g}} ^ {*} (\boldsymbol {\Gamma} _ {G _ {g}, G _ {g}} ^ {*}) ^ {- 1} \right\| _ {1}, +$$ + +$$ +k _ {\Gamma} = \left\| (\boldsymbol {\Gamma} _ {G _ {g}, G _ {g}} ^ {*}) ^ {- 1} \right\| _ {1, \infty}, k _ {\Sigma} = \| \boldsymbol {\Sigma} _ {g} \| _ {1, \infty}. +$$ + +Recall that the precision matrix estimator $\widehat{\Theta}_g$ is defined as: + +$$ +\widehat {\boldsymbol {\Theta}} _ {g} = \arg \min _ {\boldsymbol {\Theta} _ {g} \succeq 0} \frac {1}{2} \operatorname {t r} \left(\boldsymbol {\Theta} _ {g} ^ {2} \boldsymbol {\Sigma} _ {g}\right) - \operatorname {t r} \left(\boldsymbol {\Theta} _ {g}\right) + \lambda_ {g} \| \boldsymbol {\Theta} _ {g} \| _ {1, \text {o f f}}. \tag {14} +$$ + +We now provide a detailed restatement of Theorem 4.4, aligning the conditions with those in Theorem 3 of Xiao et al. (2022). For each $g = 1,\dots,G$ , there exist constants $a_{g}$ and $b_{g}$ , such that for some $\eta >2$ , if the true precision matrix $\Theta_g$ satisfies the following conditions: + +$$ +n > b _ {g} ^ {- 1} (\eta \log p + \log a _ {g}) \max \left[ 1 2 d k _ {\Gamma}, 1 2 \gamma^ {- 1} (k _ {\Sigma} k _ {\Gamma} ^ {2} + k _ {\Gamma}), \left\{1 2 \gamma^ {- 1} (k _ {\Sigma} k _ {\Gamma} ^ {3} + k _ {\Gamma} ^ {2}) + 5 d k _ {\Gamma} ^ {2} \right\} \theta_ {\min} ^ {- 1}, \right. +$$ + +$$ +\min \left\{s ^ {1 / 2}, d + 1 \right\} \left\{1 2 \gamma^ {- 1} \left(k _ {\Sigma} k _ {\Gamma} ^ {3} + k _ {\Gamma} ^ {2}\right) + 5 d k _ {\Gamma} ^ {2} \right\} \lambda_ {\min} ^ {- 1} (\Theta_ {g}) \Biggr ] ^ {2}, +$$ + +and + +$$ +\lambda_ {g} = 1 2 \gamma^ {- 1} \left(k _ {\Sigma} k _ {\Gamma} ^ {2} + k _ {\Gamma}\right) b _ {g} ^ {- 1 / 2} (\eta \log p + \log a _ {g}) ^ {1 / 2} n ^ {- 1 / 2}, +$$ + +then + +$$ +p r \left(\mathrm {v e c} (\widehat {\Theta} _ {g}) _ {G _ {g} ^ {c}} = 0\right) > 1 - p ^ {2 - \eta}, +$$ + +where $\mathrm{vec}(\widehat{\Theta}_g)_{G_g^c}$ represents the subvector indexed by $G_{g}^{c} = \{(i,j):\Theta_{gij}\neq 0\}$ . + +The proof of Theorem 4.4 is similar to that of Theorem 3 in Xiao et al. (2022) and is omitted here. + +# A.3. Theoretical Results and Proofs for the MPLN Model + +Recall the definition of the PLN distribution from the manuscript: + +$$ +\begin{array}{l} \mathbf {y} \mid \mathbf {x} \sim \prod_ {j = 1} ^ {p} \text {P o i s s o n} \{S \exp \left(x _ {j}\right) \}, \tag {15} \\ \mathbf {x} \sim \mathrm {N} (\boldsymbol {\mu}, \boldsymbol {\Sigma}), \\ \end{array} +$$ + +where $S$ denotes the total sequencing reads, which can be estimated as the sum of counts per cell or by other methods (Anders & Huber, 2010; Hafemeister & Satija, 2019). Without loss of generality, we assume that $S$ is known and constant. For simplicity, we set $S = 1$ in the proof. + +We hereafter represent the PLN distribution as $\mathrm{PLN}(\Theta, \mu)$ , where $\Theta = \Sigma^{-1}$ . For the MPLN distribution, defined as $\sum_{g=1}^{G} \pi_g \mathrm{PLN}(\Theta_g, \mu_g)$ , we assume that the true means $\mu_g$ and proportions $\pi_g$ ( $g = 1, \dots, G$ ) are known. + +We impose the following conditions: + +Condition A.3. There exist positive constants $m$ , $M$ , and $l$ , such that $\max_{1 \leq j, k \leq p} |\sigma_{gjk}| \leq l$ and $m \leq \lambda_{\min} (\Theta_g) \leq \lambda_{\max} (\Theta_g) \leq M$ for $g = 1, \ldots, G$ . + +Condition A.4. The parameters $(\pmb{\mu}_g^\top, \mathrm{vech}(\Theta_g)^\top)^\top$ ( $g = 1, \dots, G$ ) are different from each other. + +Based on these conditions, we establish the following theoretical results for the MPLN model: + +Theorem A.5. Under Conditions A.3 and A.4, the MPLN model is identifiable, and its Fisher information matrix is positive definite. + +Theorem A.6. Under Conditions A.3 and A.4, the MPLN model satisfies Conditions 4.1 and 4.2. + +Theorem A.5 establishes the identifiability of the MPLN model and the positive definiteness of its Fisher information matrix, ensuring that the model behaves well under relatively mild conditions. Building on Theorem A.5, we demonstrate Theorem A.6, which represents a key theoretical contribution of this study. + +In this section, we first introduce some notations, followed by the presentation of several lemmas. Finally, we provide proofs for Theorem A.5 and Theorem A.6. + +# A.3.1. NOTATION + +We define two vectorization operators, $\mathrm{vech}$ and $\mathrm{vech}_2$ . For a symmetric matrix $\mathbf{A} = [a_{jk}]_{1\leq j,k\leq p}\in \mathbb{R}^{p\times p}$ , $\mathrm{vech}(\mathbf{A})$ is defined as + +$$ +\operatorname {v e c h} (\mathbf {A}) = \left(a _ {1 1}, a _ {1 2}, a _ {1 3}, \ldots , a _ {1 p}, a _ {2 2}, a _ {2 3}, \ldots , a _ {2 p}, \ldots , a _ {(p - 1) (p - 1)}, a _ {(p - 1) p}, a _ {p p}\right) ^ {\top}, +$$ + +and $\mathrm{vech}_2(\mathbf{A})$ is + +$$ +\operatorname {v e c h} _ {2} (\mathbf {A}) = \left(a _ {1 1}, 2 a _ {1 2}, 2 a _ {1 3}, \ldots , 2 a _ {1 p}, a _ {2 2}, 2 a _ {2 3}, \ldots , 2 a _ {2 p}, \ldots , a _ {(p - 1) (p - 1)}, 2 a _ {(p - 1) p}, a _ {p p}\right) ^ {\top}. +$$ + +Note that $\mathrm{vech}$ and $\mathrm{vech}_2$ only differ at $i\neq j$ elements. + +We represent the MPLN distribution as MPLN $\left(\pmb {\nu},\{\pmb {\mu}_g\}_{g = 1}^G\right)$ , where $\pmb {\nu} = (\pmb{\nu}_1^\top ,\pmb{\nu}_2^\top ,\dots ,\pmb{\nu}_G^\top)^\top$ and $\pmb {\nu}_g = \mathrm{vech}(\Theta_g)$ . + +Define $\varphi = (\varphi_{1}^{\top},\varphi_{2}^{\top},\dots ,\varphi_{G}^{\top})^{\top}$ , where $\varphi_{g} = \mathrm{vech}(\Sigma_{g})$ . Since $\Sigma_{g}$ is positive definite, the mapping between $\varphi$ and $\pmb{\nu}$ is bijective. In the following discussion, defining either $\varphi$ or $\pmb{\nu}$ implicitly determines the other. + +Additionally, we define the bounded sets: + +$$ +\mathcal {D} _ {p} ^ {M} = \{\pmb {\nu} = (\pmb {\nu} _ {1} ^ {\top}, \dots , \pmb {\nu} _ {G} ^ {\top}) ^ {\top} | \max _ {1 \leq j, k \leq p} | \Theta_ {g j k} | \leq l ^ {\prime}, m \leq \lambda_ {\min} (\Theta_ {g}) \leq \lambda_ {\max} (\Theta_ {g}) \leq M, g = 1, \dots , G \}, +$$ + +and + +$$ +\mathcal {O} _ {p} ^ {M} = \{\boldsymbol {\varphi} = \left(\boldsymbol {\varphi} _ {1} ^ {\top}, \dots , \boldsymbol {\varphi} _ {G} ^ {\top}\right) ^ {\top} | \max _ {1 \leq j, k \leq p} | \sigma_ {g j k} | \leq l, m ^ {\prime} \leq \lambda_ {m i n} (\boldsymbol {\Sigma} _ {g}) \leq \lambda_ {m a x} (\boldsymbol {\Sigma} _ {g}) \leq M ^ {\prime}, g = 1, \dots , G \}. +$$ + +We assume the true parameter $\pmb{\nu}^{*}$ is an interior point of $\mathcal{D}_p^M$ and the true parameter $\varphi^{*}$ is restricted on $\mathcal{O}_p^M$ . + +We denote the density of the PLN distribution $\mathrm{PLN}(\Theta, \mu)$ by $p(\mathbf{y}; \Theta, \mu)$ or $p(\mathbf{y}; \Sigma, \mu)$ , and the density of the MPLN distribution $\mathrm{MPLN}(\nu, \{\pmb{\mu}_g\}_{g=1}^G)$ by $p(\mathbf{y}; \nu, \{\pmb{\mu}_g\}_{g=1}^G)$ or $p(\mathbf{y}; \varphi, \{\pmb{\mu}_g\}_{g=1}^G)$ . In the following sections, we always write $h(\mathbf{y}, \mathbf{x}) = \prod_{j=1}^{p} \exp(x_j y_j) \exp(-\exp(x_j))$ . Given a single sample $i$ , we write the log-likelihood function of the PLN at $\mathbf{y}_i$ as + +$$ +\begin{array}{l} \ell (\boldsymbol {\Theta}, \mathbf {y} _ {i}) = \log p (\mathbf {y} _ {i}; \boldsymbol {\Theta}, \boldsymbol {\mu}) \\ = \log \int \det (\boldsymbol {\Theta}) ^ {\frac {1}{2}} \exp \left(- \frac {1}{2} (\mathbf {x} - \boldsymbol {\mu}) ^ {\top} \boldsymbol {\Theta} (\mathbf {x} - \boldsymbol {\mu})\right) h (\mathbf {y} _ {i}, \mathbf {x}) d \mathbf {x} + C (\mathbf {y}), \\ \end{array} +$$ + +where $C(\mathbf{y})$ is a term that depends only on $\mathbf{y}$ . Also, we define $\ell_n(\Theta) = \sum_{i=1}^{n} \ell(\Theta, \mathbf{y}_i)$ as the log-likelihood in the PLN. For the MPLN, its log-likelihood function at $\mathbf{y}_i$ is + +$$ +\begin{array}{l} \ell (\boldsymbol {\nu}, \mathbf {y} _ {i}) = \log \left(\sum_ {g = 1} ^ {G} \pi_ {g} p (\mathbf {y} _ {i}; \boldsymbol {\Theta} _ {g}, \boldsymbol {\mu} _ {g})\right) \\ = \log \left(\sum_ {g = 1} ^ {G} \pi_ {g} \int \det (\boldsymbol {\Theta} _ {g}) ^ {\frac {1}{2}} \exp \left(- \frac {1}{2} (\mathbf {x} - \boldsymbol {\mu} _ {g}) ^ {\top} \boldsymbol {\Theta} _ {g} (\mathbf {x} - \boldsymbol {\mu} _ {g})\right) h (\mathbf {y} _ {i}, \mathbf {x}) d \mathbf {x}\right) + C (\mathbf {y}). \\ \end{array} +$$ + +The log-likelihood of the MPLN model is $\ell_n(\pmb {\nu}) = \sum_{i = 1}^{n}\ell (\pmb {\nu},\mathbf{y}_i)$ . If we define + +$$ +L _ {g} (\pmb {\nu} _ {g}, \mathbf {y}) = \int \mathrm {d e t} (\pmb {\Theta} _ {g}) ^ {\frac {1}{2}} \exp \left(- \frac {1}{2} (\mathbf {x} - \pmb {\mu} _ {g}) ^ {\top} \pmb {\Theta} _ {g} (\mathbf {x} - \pmb {\mu} _ {g})\right) h (\mathbf {y}, \mathbf {x}) d \mathbf {x}, +$$ + +and $L^{M}(\pmb {\nu},\mathbf{y}) = \sum_{g = 1}^{G}\pi_{g}L_{g}(\pmb{\nu}_{g},\mathbf{y})$ , then $\ell (\pmb {\nu},\mathbf{y}_i) = \log \bigl (L^M (\pmb {\nu},\mathbf{y}_i)\bigr) + C(\mathbf{y}_i)$ . Note that the function $L_{g}(\pmb{\nu}_{g},\mathbf{y})$ is proportional to the density $p(\mathbf{y};\Theta_g,\pmb {\mu}_g)$ + +For the PLN model, denote the derivative (the score function) and the second order derivative (the Hessian matrix) of its log-likelihood as + +$$ +\mathcal {S} (\boldsymbol {\Theta}, \mathbf {y}) = \frac {\partial \ell (\boldsymbol {\Theta} , \mathbf {y})}{\partial \operatorname {v e c h} (\boldsymbol {\Theta})}, \mathcal {H} (\boldsymbol {\Theta}, \mathbf {y}) = \frac {\partial^ {2} \ell (\boldsymbol {\Theta} , \mathbf {y})}{\partial \operatorname {v e c h} (\boldsymbol {\Theta}) \partial \operatorname {v e c h} (\boldsymbol {\Theta}) ^ {\top}}. \tag {16} +$$ + +For the MPLN model, we can similarly define its score function $S^M(\pmb{\nu}, \mathbf{y})$ , its Hessian matrix $\mathcal{H}^M(\pmb{\nu}, \mathbf{y})$ , and its Fisher information matrix $-D(\pmb{\nu}^*)$ . + +$$ +D (\boldsymbol {\nu}) = \operatorname {E} _ {\boldsymbol {\nu} ^ {*}} \left(\mathcal {H} ^ {M} (\boldsymbol {\nu}, \mathbf {y})\right). \tag {17} +$$ + +Finally, we denote $\mathbb{N}^p$ as the set of all $p$ -dimensional non-negative integer vector. For a vector $\mathbf{a} = (a_1, \ldots, a_p)^\top$ , we denote $||\mathbf{a}||_2 = \sqrt{\sum_{j=1}^{p} a_j^2}$ as its $L_2$ -norm and $||\mathbf{a}||_\infty = \max_j |a_j|$ as its $L_\infty$ -norm. For a matrix $\mathbf{A}$ , we denote $||\mathbf{A}||_2$ as its largest singular value of $\mathbf{A}$ . Given $\Theta$ and $\mu$ , we define an operator $\mathcal{T}$ that maps functions in $\mathbf{x}$ to functions in $\mathbf{y}$ , + +$$ +\mathcal {T} (f) = \int \exp \left(- \frac {1}{2} (\mathbf {x} - \boldsymbol {\mu}) ^ {\top} \boldsymbol {\Theta} (\mathbf {x} - \boldsymbol {\mu})\right) f (\mathbf {x}) h (\mathbf {y}, \mathbf {x}) d \mathbf {x}. +$$ + +In particular, + +$$ +\mathcal {T} (1) = \int \exp \left(- \frac {1}{2} (\mathbf {x} - \boldsymbol {\mu}) ^ {\top} \boldsymbol {\Theta} (\mathbf {x} - \boldsymbol {\mu})\right) h (\mathbf {y}, \mathbf {x}) d \mathbf {x}, +$$ + +where 1 denotes the constant function $1(x)\equiv 1$ + +Definition A.7 (Good vector). We call a vector $\boldsymbol{\xi} = (\xi_{1},\sigma_{1},\dots,\xi_{G},\sigma_{G})^{\top}\in \mathbb{R}^{2G}$ as a good vector if there exists $g$ such that $(\xi_{g'},\sigma_{g'})\neq (\xi_g,\sigma_g)$ for all $g^{\prime}\neq g$ . We call the index $g$ a good index with respect to $\pmb{\xi}$ . + +# A.3.2. LEMMAS + +Lemma A.8. Let $\mathbf{y} \sim \mathrm{PLN}(\Theta, \mu)$ . For any $n, y \in \mathbb{N}$ , we define + +$$ +\phi (n, y) = \left\{ \begin{array}{l l} 1 & n = 0, \\ y (y - 1) \dots (y - n + 1) & n > 0. \end{array} \right. +$$ + +Then, for $\mathbf{n} = (n_{1},\dots ,n_{p})^{\top}$ we have + +$$ +\mathrm {E} \left(\prod_ {j = 1} ^ {p} \phi (n _ {j}, y _ {j})\right) = \exp \left(\mathbf {n} ^ {\top} \boldsymbol {\mu} + \mathbf {n} ^ {\top} \boldsymbol {\Theta} ^ {- 1} \mathbf {n} / 2\right). +$$ + +Proof. By the property of conditional expectation, we have + +$$ +\operatorname {E} \left(\prod_ {j = 1} ^ {p} \phi (n _ {j}, y _ {j})\right) = \operatorname {E} _ {\mathbf {x}} \operatorname {E} _ {\mathbf {y}} \left(\prod_ {j = 1} ^ {p} \phi (n _ {j}, y _ {j}) | \mathbf {x}\right). +$$ + +From the moments of the Poisson distribution, we have + +$$ +\operatorname {E} _ {\mathbf {y}} \left(\prod_ {j = 1} ^ {p} \phi (n _ {j}, y _ {j}) | \mathbf {x}\right) = \prod_ {j = 1} ^ {p} \exp (n _ {j} x _ {j}). +$$ + +Further, since $\mathbf{x} \sim \mathrm{N}(\pmb{\mu}, \pmb{\Theta}^{-1})$ , we have + +$$ +\mathrm {E} _ {\mathbf {x}} \left(\prod_ {j = 1} ^ {p} \exp (n _ {j} x _ {j})\right) = \mathrm {E} _ {\mathbf {x}} (\exp (\mathbf {n} ^ {\top} \mathbf {x})) = \exp \left(\mathbf {n} ^ {\top} \boldsymbol {\mu} + \mathbf {n} ^ {\top} \boldsymbol {\Theta} ^ {- 1} \mathbf {n} / 2\right), +$$ + +and the conclusion follows. + +Lemma A.9. Let $\pmb {\xi} = (\xi_{1},\sigma_{1},\dots ,\xi_{G},\sigma_{G})^{\top}$ be a good vector with a good index $s$ satisfying $\sigma_g > 0$ for $g = 1,\dots ,G$ and $\alpha = (\alpha_{1},\dots ,\alpha_{G})^{\top}$ . If for any $z\in \mathbb{N}$ + +$$ +\sum_ {g = 1} ^ {G} \alpha_ {g} \exp (\xi_ {g} z + \sigma_ {g} z ^ {2}) = 0, +$$ + +then $\alpha_{s} = 0$ + +Proof. Without loss of generality, we assume that $(\xi_g,\sigma_g)(g = 1,\dots ,G)$ are first sorted by $\sigma_{g}$ in increasing order, and for the same $\sigma_{g}$ , they are further sorted by $\xi_{g}$ in increasing order. We say that $(\xi_{g},\sigma_{g})$ and $(\xi_s,\sigma_s)$ are equivalent if $(\xi_g,\sigma_g) = (\xi_s,\sigma_s)$ . By this equivalence relationship, $\{(\xi_g,\sigma_g)\}_{g = 1}^G$ can be partitioned into $Q$ groups $(Q\geq 1)$ . Let $S_{q}$ be the index set of the $q$ -th group. We have + +$$ +\sum_ {q = 1} ^ {Q} \sum_ {j \in S _ {q}} \alpha_ {j} \exp (\xi_ {j} z + \sigma_ {j} z ^ {2}) = 0 +$$ + +for all $z \in \mathbb{N}$ . Dividing $\exp (\xi_G z + \sigma_G z^2)$ on both sides of the above equation, we get + +$$ +\sum_ {q = 1} ^ {Q - 1} \sum_ {j \in S _ {q}} \alpha_ {j} \exp \left(\xi_ {j} z + \sigma_ {j} z ^ {2} - \xi_ {G} z - \sigma_ {G} z ^ {2}\right) + \sum_ {j \in S _ {Q}} \alpha_ {j} = 0 \tag {18} +$$ + +for all $z \in \mathbb{N}$ . By the choice of $\sigma_G, \xi_G$ , the first summation of Equation (18) converges to zero when $z$ goes to infinity. So, we have $\sum_{j \in S_Q} \alpha_j = 0$ . By mathematical induction, we have $\sum_{j \in S_q} \alpha_j = 0$ for $q = 1, \ldots, Q$ . Since $\pmb{\xi}$ is a good vector with a good index $s$ , $(\xi_s, \sigma_s)$ itself forms a group, and hence $\alpha_s = 0$ . + +Lemma A.10. For any $n > 0$ , let $\mathcal{M}_i \subset \mathbb{R}^p, i = 1, \dots, n$ be $n$ linear proper subspaces of $\mathbb{R}^p$ . Then, there exists a non-negative integer vector $\gamma \in \mathbb{N}^p$ such that $\gamma \notin \bigcup_{i=1}^{n} \mathcal{M}_i$ . + +Proof. We prove by mathematical induction. The conclusion clearly holds for $n = 1$ . Now we assume that Lemma A.10 holds for $n$ and we aim to prove that it also holds for $n + 1$ . Note that by linear algebra, $\bigcup_{i=1}^{n} \mathcal{M}_i$ is a proper subspace of $\mathbb{R}^p$ for all $n$ . + +By induction hypothesis, we can take $\alpha \in \mathbb{N}^p \setminus \bigcup_{i=1}^{n} \mathcal{M}_i$ . If $\alpha \notin \mathcal{M}_{n+1}$ , we have $\alpha \notin \bigcup_{i=1}^{n+1} \mathcal{M}_i$ , and the proof is finished. Thus, we only need to consider $\alpha \in \mathcal{M}_{n+1}$ . Similarly, we can take $\beta \in \mathbb{N}^p \setminus \bigcup_{i=2}^{n+1} \mathcal{M}_i$ and $\beta \in \mathcal{M}_1$ . For any $i \neq 1$ , we can prove that there is at most one $k_1$ such that $\alpha + k_1\beta \in \mathcal{M}_i$ . In fact, if there are $k_1, k_2$ such that $k_1 \neq k_2$ and $\alpha + k_1\beta \in \mathcal{M}_i$ , $\alpha + k_2\beta \in \mathcal{M}_i$ , then $\beta \in \mathcal{M}_i$ , which is contradictory to the fact that $\beta \in \mathbb{N}^p \setminus \bigcup_{i=2}^{n+1} \mathcal{M}_i$ . Furthermore, there is no $k \in \mathbb{N}$ such that $\alpha + k\beta \in \mathcal{M}_1$ . Otherwise, there exists a $k \in \mathbb{N}$ such that $\alpha + k\beta \in \mathcal{M}_1$ . Then, we have $\alpha \in \mathcal{M}_1$ , which is also a contradiction. So we could find at most $n$ positive integers for $k$ such that $\alpha + k\beta \in \bigcup_{i=1}^{n+1} \mathcal{M}_i$ . Since there are infinitely many non-negative numbers, we prove that there exists $k \in \mathbb{N}$ such that $\alpha + k\beta \notin \bigcup_{i=1}^{n+1} \mathcal{M}_i$ , and Lemma A.10 is proved. + +Lemma A.11. Assume that $\mathbf{A}_i\in \mathbb{R}^{p\times p}$ ( $i = 1,\ldots ,n$ ) are $n$ non-zero matrix. For any $n > 0$ , let $\mathcal{N}_i = \{\mathbf{x}:\mathbf{x}^\top \mathbf{A}_i\mathbf{x} = 0,\mathbf{x}\in \mathbb{R}^p\}$ ( $i = 1,\dots ,n$ ) be $n$ proper subspaces of $\mathbb{R}^p$ . Then, there exists a non-negative integer vector $\gamma$ such that $\gamma \notin \bigcup_{i = 1}^{n}\mathcal{N}_{i}$ . + +Proof. We prove by mathematical induction. The conclusion clearly holds for $n = 1$ . Now we assume that Lemma A.11 holds for $n$ and we aim to prove that it also holds for $n + 1$ . + +By induction hypothesis, we can take $\beta \in \mathbb{N}^p \setminus \bigcup_{i=2}^{n+1} \mathcal{N}_i$ . If $\beta \notin \mathcal{N}_1$ , we have $\beta \notin \bigcup_{i=1}^{n+1} \mathcal{N}_i$ , and the proof is finished. Thus, we only need to consider $\beta \in \mathcal{N}_1$ . Next, we can take $\alpha$ such that $\alpha \notin \mathcal{N}_1$ . If $i \neq 1$ , then there are at most two integers $k \in \mathbb{N}$ satisfying the quadratic equation $(\alpha + k\beta)^{\top} \mathbf{A}_i(\alpha + k\beta) = 0 (i \neq 1)$ because of $\beta^{\top} \mathbf{A}_i\beta \neq 0$ . If $i = 1$ , then there are at most one integer $k \in \mathbb{N}$ satisfying the quadratic equation $(\alpha + k\beta)^{\top} \mathbf{A}_1(\alpha + k\beta) = 0$ because of $\beta^{\top} \mathbf{A}_i\beta = 0$ and $\alpha^{\top} \mathbf{A}_1\alpha \neq 0$ . It follows that there are at most $2n + 1$ positive integers $k \in \mathbb{N}$ such that $\alpha + k\beta \in \bigcup_{i=1}^{n+1} \mathcal{N}_i$ . Since there are infinitely many non-negative numbers, we prove that there exists $k \in \mathbb{N}$ such that $\alpha + k\beta \notin \bigcup_{i=1}^{n+1} \mathcal{N}_i$ , and Lemma A.11 is proved. + +Lemma A.12. Assume that $\mathbf{A}_i\in \mathbb{R}^{p\times p}$ ( $i = 1,\dots ,n$ ) are $n$ non-zero matrices. For any $n > 0$ , let $\mathcal{N}_i = \{\mathbf{x}:\mathbf{x}^\top \mathbf{A}_i\mathbf{x} = 0,\mathbf{x}\in \mathbb{R}^p\}$ ( $i = 1,\dots ,n$ ) be $n$ proper subspaces of $\mathbb{R}^p$ . For any $m > 0$ , let $\mathcal{M}_i\subset \mathbb{R}^p,i = 1,\dots ,m$ be $m$ linear proper subspaces. Then, there exists a non-negative integer vector $\gamma$ such that $\gamma \notin (\bigcup_{i = 1}^{n}\mathcal{M}_{i})\cup (\bigcup_{i = 1}^{n}\mathcal{N}_{i})$ . + +Proof. By the proof of Lemma A.10, there exists $\alpha \notin \bigcup_{i=1}^{n} \mathcal{M}_{i}$ . We can assume $\alpha \in \bigcup_{i=1}^{n} \mathcal{N}_{i}$ . Otherwise, we complete the proof. By the proof of Lemma A.11, there exists $\gamma \notin \bigcup_{i=1}^{m} \mathcal{N}_{i}$ . On the one hand, since $\gamma \in \mathbb{N}^p \setminus \bigcup_{i=1}^{m} \mathcal{N}_{i}$ , there are at most two integers $k \in \mathbb{N}$ satisfying the quadratic equation $(\alpha + k\gamma)^{\top} \mathbf{A}_{i} (\alpha + k\gamma) = 0$ . On the other hand, for any $\mathcal{M}_{i}, i = 1, \ldots, n$ , there is at most one integer $k$ such that $\alpha + k\beta \in \mathcal{M}_{i}$ . Otherwise, if there exist $k_{1} \neq k_{2}$ and $i$ satisfying + +$$ +\boldsymbol {\alpha} + k _ {1} \boldsymbol {\gamma} \in \mathcal {M} _ {i}, \boldsymbol {\alpha} + k _ {2} \boldsymbol {\gamma} \in \mathcal {M} _ {i}, +$$ + +then we have $(k_{2} - k_{1})\gamma \in \mathcal{M}_{i}$ . It follows that $\alpha \in \mathcal{M}_i$ , which is contradictory to the fact that $\alpha \notin \bigcup_{i = 1}^{n}\mathcal{M}_{i}$ . Hence, there are at most $2m + n$ positive integers $k\in \mathbb{N}$ such that $\alpha +k\gamma \in (\bigcup_{i = 1}^{n}\mathcal{M}_{i})\cup (\bigcup_{i = 1}^{n}\mathcal{N}_{i})$ . Since there are infinitely many non-negative integers, there exists an integer $k$ such that $\alpha +k\gamma \notin (\bigcup_{i = 1}^{n}\mathcal{M}_{i})\cup (\bigcup_{i = 1}^{m}\mathcal{N}_{i})$ , and Lemma A.12 is proved. + +Lemma A.13. Let $\mathbf{y}$ and $\mathbf{x}$ be random variables as defined in (15) for the PLN model, and let $\phi(n, y)$ be the same as in Lemma A.8. Let $\mathbf{n} = (n_1, \dots, n_p)^\top$ and $\mathbf{T} \in \mathbb{R}^{p \times p}$ be a $p \times p$ matrix. We have + +$$ +\begin{array}{l} \left. \operatorname {E} \left(\prod_ {j = 1} ^ {p} \phi \left(n _ {j}, y _ {j}\right) \operatorname {t r} \left(\mathbf {T} \left(\boldsymbol {\Theta} ^ {- 1} - (\mathbf {x} - \boldsymbol {\mu}) (\mathbf {x} - \boldsymbol {\mu}) ^ {\top}\right)\right)\right) \right. \\ = \left(\mathbf {n} ^ {\top} \boldsymbol {\Theta} ^ {- 1} \mathbf {T} \boldsymbol {\Theta} ^ {- 1} \mathbf {n}\right) \exp \left(\mathbf {n} ^ {\top} \boldsymbol {\mu} + \mathbf {n} ^ {\top} \boldsymbol {\Theta} ^ {- 1} \mathbf {n} / 2\right). \\ \end{array} +$$ + +Proof. By Lemma A.8 + +$$ +\mathrm {E} \left(\prod_ {j = 1} ^ {p} \phi (n _ {j}, y _ {j}) \operatorname {t r} \left(\mathbf {T} \boldsymbol {\Theta} ^ {- 1}\right)\right) = \operatorname {t r} \left(\mathbf {T} \boldsymbol {\Theta} ^ {- 1}\right) \exp \left(\mathbf {n} ^ {\top} \boldsymbol {\mu} + \mathbf {n} ^ {\top} \boldsymbol {\Theta} ^ {- 1} \mathbf {n} / 2\right). +$$ + +Similar to the proof of Lemma A.8, by the moment generating function of the normal distribution, we have + +$$ +\begin{array}{l} \mathrm {E} \left(\prod_ {j = 1} ^ {p} \phi (n _ {j}, y _ {j}) \operatorname {t r} \left(\mathbf {T} (\mathbf {x} - \boldsymbol {\mu}) (\mathbf {x} - \boldsymbol {\mu}) ^ {\top}\right)\right) \\ = \mathrm {E} _ {\mathbf {x}} \left(\exp (\mathbf {n} ^ {\top} \mathbf {x}) \operatorname {t r} \left(\mathbf {T} (\mathbf {x} - \boldsymbol {\mu}) (\mathbf {x} - \boldsymbol {\mu}) ^ {\top}\right)\right) \\ = \left\{\operatorname {t r} \left(\mathbf {T} \boldsymbol {\Theta} ^ {- 1}\right) + \mathbf {n} ^ {\top} \boldsymbol {\Theta} ^ {- 1} \mathbf {T} \boldsymbol {\Theta} ^ {- 1} \mathbf {n} \right\} \exp \left(\mathbf {n} ^ {\top} \boldsymbol {\mu} + \mathbf {n} ^ {\top} \boldsymbol {\Theta} ^ {- 1} \mathbf {n} / 2\right). \\ \end{array} +$$ + +Lemma A.13 follows from the above two equations. + +Lemma A.14. For any $(\pmb{\mu}_g^\top, \mathrm{vech}(\Theta_g)^\top)^\top$ ( $g = 1, \dots, G$ ) that are bounded and different from each other, $p(\mathbf{y}; \Theta_1, \pmb{\mu}_1), \dots, p(\mathbf{y}; \Theta_G, \pmb{\mu}_G)$ are linearly independent. + +Proof. We prove this by mathematical induction. The independence for $G = 1$ is trivial. Now we assume that Lemma A.14 holds for $G - 1$ . For any $(\pmb{\mu}_g^\top, \mathrm{vech}(\Theta_g)^\top)^\top$ $(g = 1, \dots, G)$ that are bounded and different from each other, if we can prove that there exist $\alpha = (\alpha_1, \ldots, \alpha_G)^\top$ and an index $s \in \{1, \ldots, G\}$ such that + +$$ +\sum_ {g = 1} ^ {G} \alpha_ {g} p (\mathbf {y}; \boldsymbol {\Theta} _ {g}, \boldsymbol {\mu} _ {g}) = 0 \text {a n d} \alpha_ {s} = 0, \tag {19} +$$ + +then by induction, we have $\alpha = 0$ and hence $p(\mathbf{y};\Theta_g,\pmb {\mu}_g)$ $(g = 1,\dots ,G)$ are linearly independent. So our goal is to prove that if $\sum_{g = 1}^{G}\alpha_{g}p(\mathbf{y};\Theta_{g},\pmb{\mu}_{g}) = 0$ , then we can always find an index $s$ such that $\alpha_{s} = 0$ + +Let $\mathbf{n} = (n_1, \dots, n_p)^\top$ be any non-negative integer vector. Then, for any positive integer $z$ , by Lemma A.8, there exists a polynomial function $p_z(\mathbf{y}) = \prod_{j=1}^{p} \phi(zn_j, y_j)$ such that, if (19) holds, then + +$$ +\sum_ {g = 1} ^ {G} \alpha_ {g} \mathrm {E} _ {g} (p _ {z} (\mathbf {y})) = 0 \mathrm {a n d} \mathrm {E} _ {g} (p _ {z} (\mathbf {y})) = \exp (z \mathbf {n} ^ {\top} \boldsymbol {\mu} _ {g} + z ^ {2} \mathbf {n} ^ {\top} \boldsymbol {\Theta} _ {g} ^ {- 1} \mathbf {n} / 2), +$$ + +where $\mathrm{E}_g$ represents taking expectation with respect to PLN $(\Theta_g, \mu_g)$ . Let + +$$ +\pmb {\xi} = \left(\mathbf {n} ^ {\top} \pmb {\mu} _ {1}, \mathbf {n} ^ {\top} \pmb {\Theta} _ {1} ^ {- 1} \mathbf {n} / 2, \dots , \mathbf {n} ^ {\top} \pmb {\mu} _ {G}, \mathbf {n} ^ {\top} \pmb {\Theta} _ {G} ^ {- 1} \mathbf {n} / 2\right). +$$ + +By Lemma A.9, if there exists an $\mathbf{n}$ such that $\pmb{\xi}$ is a good vector with good index $s$ , then $\alpha_{s} = 0$ and we complete the proof. If, on the other hand, $\pmb{\xi} = (\mathbf{n}^{\top}\pmb{\mu}_{1},\mathbf{n}^{\top}\Theta_{1}^{-1}\mathbf{n} / 2,\dots ,\mathbf{n}^{\top}\pmb{\mu}_{G},\mathbf{n}^{\top}\Theta_{G}^{-1}\mathbf{n} / 2)$ is not a good vector for any non-negative integer vector $\mathbf{n}$ . Therefore, for any $\mathbf{n}$ , there exists $s\neq 1$ such that $\mathbf{n}^{\top}\pmb{\mu}_{1} = \mathbf{n}^{\top}\pmb{\mu}_{s}$ and $\mathbf{n}^{\top}\Theta_{1}^{-1}\mathbf{n} = \mathbf{n}^{\top}\Theta_{s}^{-1}\mathbf{n}$ . Thus, $\mathbf{n}$ is the solution to the linear equation $\mathbf{x}^{\top}(\pmb{\mu}_{1} - \pmb{\mu}_{s}) = 0$ and the quadratic equation $\mathbf{x}^{\top}\left(\Theta_{1}^{-1} - \Theta_{s}^{-1}\right)\mathbf{x} = 0$ . We define $\mathcal{M}_g$ as the linear space consisting of solutions to the linear equation $\mathbf{x}^{\top}\left(\pmb{\mu}_{1} - \pmb{\mu}_{g}\right) = 0 (g\neq 1)$ . We define $\mathcal{N}_g$ as the space consisting of solutions to the quadratic equation $\mathbf{x}^{\top}\left(\Theta_{1}^{-1} - \Theta_{g}^{-1}\right)\mathbf{x} = 0 (g\neq 1)$ . Define $\mathcal{Q} = \bigcup_{g = 2}^{G}(\mathcal{M}_g\cap \mathcal{N}_g)$ . Thus, for any non-negative integer vector $\mathbf{n}$ , we have $\mathbf{n}\in \mathcal{Q}$ . Since $(\pmb{\mu}_{g}^{\top},\mathrm{vech}(\Theta_{g})^{\top})^{\top},g = 1,\ldots ,G$ , are different from each other, $\mathcal{M}_g\cap \mathcal{N}_g$ is a proper subspace of $\mathbb{R}^p$ . More precisely, if $\pmb{\mu}_{1} = \pmb{\mu}_{s}$ , then we have $\Theta_1\neq \Theta_s$ , which means $\mathcal{M}_g\cap \mathcal{N}_g = \mathcal{N}_g$ . Let $\mathcal{I} = \{g:\pmb {\mu}_1 = \pmb {\mu}_g\}$ . Then, we have + +$$ +\mathbf {n} \in \mathcal {Q} = \bigcup_ {g = 2} ^ {G} (\mathcal {M} _ {g} \cap \mathcal {N} _ {g}) \subset \bigcup_ {g \in \mathcal {I}} \mathcal {N} _ {g} \cup \bigcup_ {g \not \in \mathcal {I}} \mathcal {M} _ {g}. +$$ + +This contradicts Lemma A.12. Therefore, there exists a vector $\mathbf{n}$ such that $\pmb{\xi}$ is a good vector. Consequently, for any $(\pmb{\mu}_g^\top, \mathrm{vech}(\Theta_g)^\top)^\top$ ( $g = 1, \dots, G$ ) that are different from each other, $p(\mathbf{y}; \Theta_1, \pmb{\mu}_1), \dots, p(\mathbf{y}; \Theta_G, \pmb{\mu}_G)$ are linearly independent. + +Lemma A.15. For any $\varphi \in \mathcal{O}_p^M$ , there exist two functions $f_{low}^{M}(\cdot)$ and $f_{up}^{M}(\cdot)$ of $\mathbf{y}$ such that $f_{low}^{M}(\mathbf{y}) \leq p(\mathbf{y}; \varphi, \{\pmb{\mu}_{g}\}_{g=1}^{G}) \leq f_{up}^{M}(\mathbf{y})$ , and $\int f_{low}^{M}(\mathbf{y}) K(\mathbf{y}) d\mathbf{y} < \infty$ , $\int f_{up}^{M}(\mathbf{y}) K(\mathbf{y}) d\mathbf{y} < \infty$ for any polynomial $K(\mathbf{y})$ of $\mathbf{y}$ . + +Proof. By Remark 1 of Xiao et al. (2022). + +# A.3.3. PROOF OF THEOREM A.5 + +Proof. By Yakowitz & Spragins (1968), under Conditions A.3 and A.4, the identifiability of the MPLN model is equivalent to the linear independence of the PLN components. By Lemma A.14, the first conclusion holds. + +To establish the second conclusion of Theorem A.5, it is necessary to derive the explicit formulas for the score functions and Fisher information matrices of the PLN and MPLN models. It is clear that the densities of the PLN and MPLN satisfy the + +regularity conditions in the literature (Shao, 2003). Then, we can calculate the score function and the Fisher information as follows. + +The Hessian matrix $\mathcal{H}(\Theta, \mathbf{y})$ of the PLN model is a $p(p + 1) / 2 \times p(p + 1) / 2$ matrix. For notational convenience, let $(i,j)$ be the index of the element at position $(2p - i + 1)i / 2 - p + j$ of the score function $\mathcal{S}$ and let $\mathcal{H}_{(i,j)(i',j')} = \frac{\partial^2\ell(\Theta,\mathbf{y})}{\partial\Theta_{i'j'}\partial\Theta_{ij}}$ , $(i \leq j, i' \leq j')$ be the element at row $(2p - i + 1)i / 2 - p + j$ and column $(2p - i' + 1)i' / 2 - p + j'$ of the Hessian matrix. + +Recall the Equation (16) above. The score function of the PLN model can be written as + +$$ +\mathcal {S} (\boldsymbol {\Theta}, \mathbf {y}) = \frac {1}{2} \mathrm {v e c h} _ {2} \left(\boldsymbol {\Theta} ^ {- 1}\right) - \frac {1}{2} \frac {\int \exp \left(- \frac {1}{2} (\mathbf {x} - \boldsymbol {\mu}) ^ {\top} \boldsymbol {\Theta} (\mathbf {x} - \boldsymbol {\mu})\right) \mathrm {v e c h} _ {2} \left((\mathbf {x} - \boldsymbol {\mu}) (\mathbf {x} - \boldsymbol {\mu}) ^ {\top}\right) h (\mathbf {y} , \mathbf {x}) d \mathbf {x}}{\int \exp \left(- \frac {1}{2} (\mathbf {x} - \boldsymbol {\mu}) ^ {\top} \boldsymbol {\Theta} (\mathbf {x} - \boldsymbol {\mu})\right) h (\mathbf {y} , \mathbf {x}) d \mathbf {x}}. +$$ + +Especially, at the true parameter $\Theta^{*}$ , we have $S(\Theta^{*},\mathbf{y}) = \frac{1}{2}\mathrm{E}_{\mathbf{x}}\left(\mathrm{vech}_2\left(\Theta^{*-1} - (\mathbf{x} - \boldsymbol{\mu})(\mathbf{x} - \boldsymbol{\mu})^{\top}\right) |\mathbf{y}\right)$ . By applying the operator $\mathcal{T}$ , the score function element at position $(2p - i + 1)i/2 - p + j$ can be rewritten as + +$$ +\mathcal {S} _ {(i, j)} (\boldsymbol {\Theta}, \mathbf {y}) = \frac {1}{2} \mathrm {v e c h} _ {2} (\boldsymbol {\Theta} ^ {- 1}) _ {(i, j)} - \frac {1}{2} \frac {\mathcal {T} (\mathrm {v e c h} _ {2} ((\mathbf {x} - \boldsymbol {\mu}) (\mathbf {x} - \boldsymbol {\mu}) ^ {\top}) _ {(i , j)})}{\mathcal {T} (1)}. +$$ + +Using the operator $\mathcal{T}$ , the Hessian matrix can be written as follows. Let $\boldsymbol{\Sigma} = \boldsymbol{\Theta}^{-1}$ . + +When $i = j, i' = j'$ , + +$$ +\mathcal {H} _ {(i, i) (i ^ {\prime}, i ^ {\prime})} (\boldsymbol {\Theta}, \mathbf {y}) = - \frac {1}{2} \Sigma_ {i i ^ {\prime}} \Sigma_ {i ^ {\prime} i} + \frac {1}{4} \frac {\mathcal {T} ((\mathbf {x} - \boldsymbol {\mu}) _ {i} ^ {2} (\mathbf {x} - \boldsymbol {\mu}) _ {i ^ {\prime}} ^ {2})}{\mathcal {T} (1)} - \frac {1}{4} \frac {\mathcal {T} ((\mathbf {x} - \boldsymbol {\mu}) _ {i ^ {\prime}} ^ {2}) \mathcal {T} ((\mathbf {x} - \boldsymbol {\mu}) _ {i} ^ {2})}{\mathcal {T} ^ {2} (1)}. +$$ + +When $i \neq j, i' = j'$ , + +$$ +\mathcal {H} _ {(i, j) (i ^ {\prime}, i ^ {\prime})} (\boldsymbol {\Theta}, \mathbf {y}) = - \Sigma_ {i i ^ {\prime}} \Sigma_ {i ^ {\prime} j} + \frac {1}{2} \frac {\mathcal {T} ((\mathbf {x} - \boldsymbol {\mu}) _ {i} (\mathbf {x} - \boldsymbol {\mu}) _ {j} (\mathbf {x} - \boldsymbol {\mu}) _ {i ^ {\prime}} ^ {2})}{\mathcal {T} (1)} - \frac {1}{2} \frac {\mathcal {T} ((\mathbf {x} - \boldsymbol {\mu}) _ {i ^ {\prime}} ^ {2}) \mathcal {T} ((\mathbf {x} - \boldsymbol {\mu}) _ {i} (\mathbf {x} - \boldsymbol {\mu}) _ {j})}{\mathcal {T} ^ {2} (1)}. +$$ + +When $i = j, i' \neq j'$ , + +$$ +\begin{array}{l} \mathcal {H} _ {(i, i) (i ^ {\prime}, j ^ {\prime})} (\boldsymbol {\Theta}, \mathbf {y}) = - \Sigma_ {i i ^ {\prime}} \Sigma_ {j ^ {\prime} i} + \frac {1}{2} \frac {\mathcal {T} ((\mathbf {x} - \boldsymbol {\mu}) _ {i ^ {\prime}} (\mathbf {x} - \boldsymbol {\mu}) _ {j ^ {\prime}} (\mathbf {x} - \boldsymbol {\mu}) _ {i} ^ {2})}{\mathcal {T} (1))} \\ - \frac {1}{2} \frac {\mathcal {T} \left((\mathbf {x} - \boldsymbol {\mu}) _ {i} ^ {2}\right) \mathcal {T} \left((\mathbf {x} - \boldsymbol {\mu}) _ {i ^ {\prime}} (\mathbf {x} - \boldsymbol {\mu}) _ {j ^ {\prime}}\right)}{\mathcal {T} ^ {2} (1)}. \\ \end{array} +$$ + +When $i\neq j,i^{\prime}\neq j^{\prime}$ + +$$ +\begin{array}{l} \mathcal {H} _ {(i, j) (i ^ {\prime}, j ^ {\prime})} (\boldsymbol {\Theta}, \mathbf {y}) = - (\Sigma_ {i i ^ {\prime}} \Sigma_ {j ^ {\prime} j} + \Sigma_ {i j ^ {\prime}} \Sigma_ {i ^ {\prime} j}) + \frac {\mathcal {T} ((\mathbf {x} - \boldsymbol {\mu}) _ {i ^ {\prime}} (\mathbf {x} - \boldsymbol {\mu}) _ {j ^ {\prime}} (\mathbf {x} - \boldsymbol {\mu}) _ {i} (\mathbf {x} - \boldsymbol {\mu}) _ {j})}{\mathcal {T} (1)} \\ - \frac {\mathcal {T} \left((\mathbf {x} - \boldsymbol {\mu}) _ {i} (\mathbf {x} - \boldsymbol {\mu}) _ {j}\right) \mathcal {T} \left((\mathbf {x} - \boldsymbol {\mu}) _ {i ^ {\prime}} (\mathbf {x} - \boldsymbol {\mu}) _ {j ^ {\prime}}\right)}{\mathcal {T} ^ {2} (1)}. \\ \end{array} +$$ + +Now we consider the score function and the Fisher information matrix of the MPLN model. The score function of the MPLN model can be written as + +$$ +\mathcal {S} ^ {M} (\boldsymbol {\nu}, \mathbf {y}) = L ^ {M} (\boldsymbol {\nu}, \mathbf {y}) ^ {- 1} \left(\pi_ {1} \frac {\partial L _ {1} (\boldsymbol {\nu} _ {1} , \mathbf {y})}{\partial \boldsymbol {\nu} _ {1}}, \dots , \pi_ {G} \frac {\partial L _ {G} (\boldsymbol {\nu} _ {G} , \mathbf {y})}{\partial \boldsymbol {\nu} _ {G}}\right) := \left(\mathcal {S} _ {1} ^ {M} (\boldsymbol {\nu}, \mathbf {y}), \dots , \mathcal {S} _ {G} ^ {M} (\boldsymbol {\nu}, \mathbf {y})\right). +$$ + +Similarly, we use the triplet $(g,i,j)$ , with $i\leq j$ , to index $\mathcal{S}^M$ . Recall that $\pmb{\nu}_{g} = \mathrm{vech}(\Theta_{g})$ . Let $(g,i,j),(g^{\prime},i^{\prime},j^{\prime}),i\leq$ $j,i^{\prime}\leq j^{\prime}$ be the index of the element at the $(g - 1)p(p + 1) / 2 + (2p - i + 1)i / 2 - p + j$ row and $(g^{\prime} - 1)p(p + 1) / 2+$ $(2p - i^{\prime} + 1)i^{\prime} / 2 - p + j^{\prime}$ column of $\mathcal{H}^M (\pmb {\nu},\mathbf{y})$ , respectively. + +When $g = g'$ , + +$$ +\begin{array}{l} \mathcal {H} _ {(g, i, j), (g, i ^ {\prime}, j ^ {\prime})} ^ {M} (\pmb {\nu}, \mathbf {y}) = \frac {\partial}{\partial \Theta_ {g i ^ {\prime} j ^ {\prime}}} \mathcal {S} _ {(g, i, j)} ^ {M} (\pmb {\nu}, \mathbf {y}) \\ = \frac {\pi_ {g} L _ {g} (\boldsymbol {\Theta} _ {g} , \mathbf {y})}{L ^ {M} (\boldsymbol {\nu} , \mathbf {y})} \left(\mathcal {H} _ {(i, j) (i ^ {\prime}, j ^ {\prime})} (\boldsymbol {\Theta} _ {g}, \mathbf {y}) + \mathcal {S} _ {(i ^ {\prime}, j ^ {\prime})} (\boldsymbol {\Theta} _ {g}, \mathbf {y}) \mathcal {S} _ {(i, j)} (\boldsymbol {\Theta} _ {g}, \mathbf {y})\right) \\ - \frac {\left(\pi_ {g} L _ {g} (\boldsymbol {\Theta} _ {g} , \mathbf {y})\right) ^ {2}}{L ^ {M} (\boldsymbol {\nu} , \mathbf {y}) ^ {2}} \mathcal {S} _ {\left(i ^ {\prime}, j ^ {\prime}\right)} \left(\boldsymbol {\Theta} _ {g}, \mathbf {y}\right) \mathcal {S} _ {\left(i, j\right)} \left(\boldsymbol {\Theta} _ {g}, \mathbf {y}\right). \tag {20} \\ \end{array} +$$ + +When $g \neq g'$ , we have + +$$ +\begin{array}{l} \mathcal {H} _ {(g, i, j), (g ^ {\prime}, i ^ {\prime}, j ^ {\prime})} ^ {M} (\boldsymbol {\nu}, \mathbf {y}) = \frac {\partial}{\partial \Theta_ {g ^ {\prime} i ^ {\prime} j ^ {\prime}}} \mathcal {S} _ {(g, i, j)} ^ {M} (\boldsymbol {\nu}, \mathbf {y}) \\ = - \frac {\pi_ {g} \pi_ {g} ^ {\prime} L _ {g} (\boldsymbol {\Theta} _ {g} , \mathbf {y}) L _ {g ^ {\prime}} (\boldsymbol {\Theta} _ {g ^ {\prime}} , \mathbf {y})}{L ^ {M} (\boldsymbol {\nu}, \mathbf {y}) ^ {2}} \mathcal {S} _ {(i ^ {\prime}, j ^ {\prime})} (\boldsymbol {\Theta} _ {g ^ {\prime}}, \mathbf {y}) \mathcal {S} _ {(i, j)} (\boldsymbol {\Theta} _ {g}, \mathbf {y}). \tag {21} \\ \end{array} +$$ + +Recall the definition (17) of $D(\pmb{\nu})$ . Then, $-D(\pmb{\nu}^{*}) = \operatorname{E}\left(S^{M}(\pmb{\nu}^{*}, \mathbf{y}) S^{M}(\pmb{\nu}^{*}, \mathbf{y})^{\top}\right)$ is the Fisher information matrix of the MPLN at $\pmb{\nu}^{*}$ . + +To establish positive definiteness, we show that there exists no non-zero vector $\mathbf{t} = (\mathbf{t}_1,\dots ,\mathbf{t}_G)^\top$ such that $\mathrm{E}(\mathbf{t}^{\top}\mathcal{S}^{M}(\pmb {\nu}^{*},\mathbf{y})\mathcal{S}^{M}(\pmb {\nu}^{*},\mathbf{y})^{\top}\mathbf{t}) = 0$ . Assuming that there exists a vector $\mathbf{t} = (\mathbf{t}_1,\dots ,\mathbf{t}_G)^\top$ satisfying $\mathrm{E}(\mathbf{t}^{\top}\mathcal{S}^{M}(\pmb {\nu}^{*},\mathbf{y})\mathcal{S}^{M}(\pmb {\nu}^{*},\mathbf{y})^{\top}\mathbf{t}) = 0$ , we aim to prove that $\mathbf{t} = 0$ . Since + +$$ +\operatorname {E} (\mathbf {t} ^ {\top} \mathcal {S} ^ {M} (\boldsymbol {\nu} ^ {*}, \mathbf {y}) \mathcal {S} ^ {M} (\boldsymbol {\nu} ^ {*}, \mathbf {y}) ^ {\top} \mathbf {t}) = \sum_ {\mathbf {y}} p (\mathbf {y}; \boldsymbol {\nu} ^ {*}, \{\boldsymbol {\mu} _ {g} \} _ {g = 1} ^ {G}) (\mathbf {t} ^ {\top} \mathcal {S} ^ {M} (\boldsymbol {\nu} ^ {*}, \mathbf {y})) ^ {2} = 0, +$$ + +and under the assumption that $p\left(\mathbf{y}; \boldsymbol{\nu}^{*}, \left\{\boldsymbol{\mu}_{g}\right\}_{g=1}^{G}\right) > 0$ for all $\mathbf{y}$ , it follows that $\mathbf{t}^{\top} \mathcal{S}^{M}(\boldsymbol{\nu}^{*}, \mathbf{y}) = 0$ for any $\mathbf{y}$ . + +Then, when $\pmb {\nu} = \pmb{\nu}^{*}$ , we have + +$$ +L ^ {M} (\boldsymbol {\nu}, \mathbf {y}) ^ {- 1} \sum_ {g = 1} ^ {G} \mathbf {t} _ {g} ^ {\top} \pi_ {g} \frac {\partial L _ {g} (\boldsymbol {\nu} _ {g} , \mathbf {y})}{\partial \boldsymbol {\nu} _ {g}} = 0. +$$ + +Since $L^{M}(\pmb {\nu},\mathbf{y})\neq 0$ , we have $\begin{array}{r}\sum_{g = 1}^{G}\mathbf{t}_{g}^{\top}\pi_{g}\frac{\partial L_{g}(\pmb{\nu}_{g},\mathbf{y})}{\partial\pmb{\nu}_{g}} = 0. \end{array}$ Let $\mathbf{n} = (n_1,\dots ,n_p)^\top$ be any non-negative integer vector and $\psi (\mathbf{y}) = \prod_{j = 1}^{p}\phi (zn_{j},y_{j}),z\in \mathbb{N}$ . Then + +$$ +\sum_ {g = 1} ^ {G} \mathbf {t} _ {g} ^ {\top} \pi_ {g} \frac {\partial \log L _ {g} (\boldsymbol {\nu} _ {g} , \mathbf {y})}{\partial \boldsymbol {\nu} _ {g}} L _ {g} (\boldsymbol {\nu} _ {g}, \mathbf {y}) \psi (\mathbf {y}) = 0. \tag {22} +$$ + +Since $L_{g}(\pmb{\nu}_{g},\mathbf{y})$ is proportional to the density of the PLN with parameters $\Theta_g$ and $\pmb{\mu}_g$ , (22) can be rewritten as + +$$ +\sum_ {g = 1} ^ {G} \mathbf {t} _ {g} ^ {\top} \pi_ {g} \frac {\partial \log L _ {g} (\pmb {\nu} _ {g} , \mathbf {y})}{\partial \pmb {\nu} _ {g}} p (\mathbf {y}; \pmb {\Theta} _ {g}, \pmb {\mu} _ {g}) \psi (\mathbf {y}) = 0. +$$ + +Summing over $\mathbf{y}$ , we get + +$$ +\sum_ {\mathbf {y}} \sum_ {g = 1} ^ {G} \mathbf {t} _ {g} ^ {\top} \pi_ {g} \frac {\partial \log L _ {g} (\pmb {\nu} _ {g} , \mathbf {y})}{\partial \pmb {\nu} _ {g}} p (\mathbf {y}; \pmb {\Theta} _ {g}, \pmb {\mu} _ {g}) \psi (\mathbf {y}) = 0. +$$ + +By Fubini's Theorem, we get + +$$ +\sum_ {g = 1} ^ {G} \sum_ {\mathbf {y}} \mathbf {t} _ {g} ^ {\top} \pi_ {g} \frac {\partial \log L _ {g} (\boldsymbol {\nu} _ {g} , \mathbf {y})}{\partial \boldsymbol {\nu} _ {g}} p (\mathbf {y}; \boldsymbol {\Theta} _ {g}, \boldsymbol {\mu} _ {g}) \psi (\mathbf {y}) = 0. \tag {23} +$$ + +Then, let $\mathbf{T}_g$ be the symmetric matrix such that $\mathrm{vech}(\mathbf{T}_g) = \mathbf{t}_g$ . For a fixed $g$ , we have + +$$ +\begin{array}{l} \sum_ {\mathbf {y}} \mathbf {t} _ {g} ^ {\top} \frac {\partial \log L _ {g} (\boldsymbol {\nu} _ {g} , \mathbf {y})}{\partial \boldsymbol {\nu} _ {g}} p (\mathbf {y}; \boldsymbol {\Theta} _ {g}, \boldsymbol {\mu} _ {g}) \psi (\mathbf {y}) = \mathrm {E} _ {\mathbf {y} _ {g}} \left(\psi (\mathbf {y} _ {g}) \mathbf {t} _ {g} ^ {\top} \frac {\partial \log L _ {g} (\boldsymbol {\nu} _ {g} , \mathbf {y} _ {g})}{\partial \boldsymbol {\nu} _ {g}}\right) \\ = \frac {1}{2} \mathrm {E} _ {\mathbf {x} _ {g}, \mathbf {y} _ {g}} \left(\psi (\mathbf {y} _ {g}) \operatorname {t r} \left\{\mathbf {T} _ {g} \boldsymbol {\Theta} _ {g} ^ {* - 1} - \mathbf {T} _ {g} (\mathbf {x} _ {g} - \boldsymbol {\mu}) (\mathbf {x} _ {g} - \boldsymbol {\mu}) ^ {\top} \right\}\right), \\ \end{array} +$$ + +where $\mathbf{y}_g$ follows the PLN distribution with parameters $\Theta_g$ and $\pmb{\mu}_{g}$ , and $\mathbf{x}_g\sim \mathrm{N}(\pmb {\mu}_g,\pmb {\Theta}_g^{-1})$ is the corresponding latent variable. By Lemma A.13, we get + +$$ +\mathrm {E} _ {\mathbf {y} _ {g}} \left(\psi (\mathbf {y} _ {g}) \mathbf {t} _ {g} ^ {\top} \frac {\partial \log L _ {g} (\boldsymbol {\nu} _ {g} , \mathbf {y} _ {g})}{\partial \boldsymbol {\nu} _ {g}}\right) = \frac {1}{2} z ^ {2} \left(\mathbf {n} ^ {\top} \boldsymbol {\Theta} _ {g} ^ {- 1} \mathbf {T} _ {g} \boldsymbol {\Theta} _ {g} ^ {- 1} \mathbf {n}\right) \exp \left(z \mathbf {n} ^ {\top} \boldsymbol {\mu} _ {g} + z ^ {2} \mathbf {n} ^ {\top} \boldsymbol {\Theta} _ {g} ^ {- 1} \mathbf {n} / 2\right). +$$ + +Then, Equation (23) can be rewritten as, for all $z\in \mathbb{N}$ + +$$ +\sum_ {g = 1} ^ {G} \pi_ {g} z ^ {2} \left(\mathbf {n} ^ {\top} \boldsymbol {\Theta} _ {g} ^ {- 1} \mathbf {T} _ {g} \boldsymbol {\Theta} _ {g} ^ {- 1} \mathbf {n}\right) \exp \left(z \mathbf {n} ^ {\top} \boldsymbol {\mu} _ {g} + z ^ {2} \mathbf {n} ^ {\top} \boldsymbol {\Theta} _ {g} ^ {- 1} \mathbf {n} / 2\right) = 0. +$$ + +In order to show $\mathbf{T}_1 = 0$ , similar to the proof of the first conclusion, We define $\mathcal{M}_g$ as the linear space consisting of solutions to the linear equation $\mathbf{x}^{\top}\left(\pmb{\mu}_{1}-\pmb{\mu}_{g}\right)=0 (g \neq 1)$ . We define $\mathcal{N}_g$ as the space consisting of solutions to the quadratic equation $\mathbf{x}^{\top}\left(\Theta_{1}^{-1}-\Theta_{s}^{-1}\right) \mathbf{x}=0 (g \neq 1)$ . Define $\mathcal{Q}=\bigcup_{g=2}^{G}(\mathcal{M}_{g} \cap \mathcal{N}_{g})$ . For any $\mathbf{n} \notin \mathcal{Q}$ , $(\mathbf{n}^{\top} \pmb{\mu}_{1}, \mathbf{n}^{\top} \Theta_{1}^{-1} \mathbf{n}/2, \ldots, \mathbf{n}^{\top} \pmb{\mu}_{G}, \mathbf{n}^{\top} \Theta_{G}^{-1} \mathbf{n}/2)$ is a good vector with a good index 1. Since $\pi_1 > 0$ , we must have + +$$ +\mathbf {n} ^ {\top} \boldsymbol {\Theta} _ {1} ^ {- 1} \mathbf {T} _ {1} \boldsymbol {\Theta} _ {1} ^ {- 1} \mathbf {n} = 0. \tag {24} +$$ + +By Lemma A.12, if $\Theta_1^{-1}\mathbf{T}_1\Theta_1^{-1}$ is not a zero matrix, then there exists an $\mathbf{n}$ such that $\mathbf{n} \notin \mathcal{Q}$ and $\mathbf{n}^{\top}\Theta_{1}^{-1}\mathbf{T}_{1}\Theta_{1}^{-1}\mathbf{n} \neq 0$ which is contradictory to (24). Hence, we must have $\Theta_1^{-1}\mathbf{T}_1\Theta_1^{-1} = \mathbf{0}$ and thus $\mathbf{T}_1 = \mathbf{0}$ . Similarly, we get $\mathbf{T}_g = \mathbf{0}$ for all $g = 1,\ldots ,G$ . It follows that $\mathbf{t} = \mathbf{0}$ , and we compete the proof. + +# A.3.4. PROOF OF THEOREM A.6 + +Proof. For the MPLN model, the marginal distribution is also an MPLN distribution. Therefore, it is unnecessary to separately verify the one-dimensional and two-dimensional marginal density functions. Instead, it suffices to verify that the $p$ -dimensional density function of the MPLN distribution satisfies the inequalities stated in Conditions 4.1 and 4.2. Specifically, there exist a measurable function $m(\mathbf{y})$ and constants $C_1, C_2$ , such that $\int m^2(\mathbf{y}) d\nu = C_1^2 < \infty$ , for any $\varphi_1, \varphi_2 \in \mathcal{O}_p^M$ , let $p_1 = p(\mathbf{y}; \boldsymbol{\nu}_1, \{\boldsymbol{\mu}_g\}_{g=1}^G)$ and $p_2 = p(\mathbf{y}; \boldsymbol{\nu}_2, \{\boldsymbol{\mu}_g\}_{g=1}^G)$ , we have + +(i) $C_2\| \varphi_1 - \varphi_2\| _2\leq d(p_1,p_2)$ +(ii) $|p_1^{1/2} - p_2^{1/2}| \leq m(\mathbf{y}) \| \varphi_1 - \varphi_2 \|_2$ . + +To establish this result, we follow a proof framework similar to that of Lemma S9 in Xiao et al. (2022). Here we denote the score function and Hessian matrix of the log-likelihood in the PLN model with respect to $\pmb{\Sigma}$ as + +$$ +\mathcal {S} (\boldsymbol {\Sigma}, \mathbf {y}) = \frac {\partial \ell (\boldsymbol {\Theta} , \mathbf {y})}{\partial \operatorname {v e c h} (\boldsymbol {\Sigma})}, \mathcal {H} (\boldsymbol {\Sigma}, \mathbf {y}) = \frac {\partial^ {2} \ell (\boldsymbol {\Theta} , \mathbf {y})}{\partial \operatorname {v e c h} (\boldsymbol {\Sigma}) \partial \operatorname {v e c h} (\boldsymbol {\Sigma}) ^ {\top}}. +$$ + +For the MPLN model, we can similarly denote the score function and Hessian matrix with respect to $\varphi$ as $S^M (\varphi ,\mathbf{y})$ and $\mathcal{H}^M (\varphi ,\mathbf{y})$ . + +First, we verify that (i) is satisfied. We get the Taylor expansion of $p_2^{1/2}$ on $\varphi_1$ , + +$$ +\begin{array}{l} p _ {2} ^ {1 / 2} = p _ {1} ^ {1 / 2} + p _ {1} ^ {- 1 / 2} \left. \left(\frac {\partial p (\mathbf {y} ; \boldsymbol {\varphi} , \{\boldsymbol {\mu} _ {g} \} _ {g = 1} ^ {G})}{\partial \boldsymbol {\varphi}} \right| _ {\boldsymbol {\varphi} = \boldsymbol {\varphi} _ {1}}\right) ^ {\top} \left(\boldsymbol {\varphi} _ {2} - \boldsymbol {\varphi} _ {1}\right) / 2 + \left(\boldsymbol {\varphi} _ {2} - \boldsymbol {\varphi} _ {1}\right) ^ {\top} R \left(\boldsymbol {\varphi} _ {0}, \mathbf {y}\right) \left(\boldsymbol {\varphi} _ {2} - \boldsymbol {\varphi} _ {1}\right) / 2 \tag {25} \\ = p _ {1} ^ {1 / 2} + p _ {1} ^ {1 / 2} \mathcal {S} ^ {M} (\varphi_ {1}, \mathbf {y}) ^ {\top} (\varphi_ {2} - \varphi_ {1}) / 2 + (\varphi_ {2} - \varphi_ {1}) ^ {\top} R (\varphi_ {0}, \mathbf {y}) (\varphi_ {2} - \varphi_ {1}) / 2, \\ \end{array} +$$ + +where $R(\varphi_0,\mathbf{y}) = p^{1 / 2}(\mathbf{y};\varphi_0,\{\pmb {\mu}_g\}_{g = 1}^G)\left[\mathcal{S}^M (\varphi_0,\mathbf{y})\mathcal{S}^M (\varphi_0,\mathbf{y})^\top /4 + \mathcal{H}^M (\varphi_0,\mathbf{y}) / 2\right]$ and $\varphi_0$ is between $\varphi_{1}$ and $\varphi_{2}$ We define $p_* = p\left(\mathbf{y};\varphi_0,\{\pmb {\mu}_g\}_{g = 1}^G\right)$ and $\delta = \varphi_{2} - \varphi_{1}$ , then we have + +$$ +\begin{array}{l} d \left(p _ {1}, p _ {2}\right) = \left[ \int \left(p _ {1} ^ {1 / 2} - p _ {2} ^ {1 / 2}\right) ^ {2} d \nu \right] ^ {1 / 2} \\ = \left[ \int \left(p _ {1} ^ {1 / 2} \mathcal {S} ^ {M} (\varphi_ {1}, \mathbf {y}) ^ {\top} \boldsymbol {\delta} + p _ {*} ^ {1 / 2} \boldsymbol {\delta} ^ {\top} R (\varphi_ {0}, \mathbf {y}) \boldsymbol {\delta}\right) ^ {2} d \nu \right] ^ {1 / 2} / 2 \\ = \left[ \int p _ {1} \boldsymbol {\delta} ^ {\top} \mathcal {S} ^ {M} \left(\varphi_ {1}, \mathbf {y}\right) \mathcal {S} ^ {M} \left(\varphi_ {1}, \mathbf {y}\right) ^ {\top} \boldsymbol {\delta} d \nu + \right. \tag {26} \\ \int 2 p _ {1} ^ {1 / 2} p _ {*} ^ {1 / 2} \mathcal {S} ^ {M} (\varphi_ {1}, \mathbf {y}) ^ {\top} \boldsymbol {\delta} \boldsymbol {\delta} ^ {\top} R (\varphi_ {0}, \mathbf {y}) \boldsymbol {\delta} d \nu + \\ \left. \int p _ {*} \boldsymbol {\delta} ^ {\top} R (\boldsymbol {\varphi} _ {0}, \mathbf {y}) \boldsymbol {\delta} \boldsymbol {\delta} ^ {\top} R (\boldsymbol {\varphi} _ {0}, \mathbf {y}) \boldsymbol {\delta} d \nu \right] ^ {1 / 2} / 2 \\ =: \left(\mathrm {I} + \mathrm {I I} + \mathrm {I I I}\right) ^ {1 / 2} / 2, \\ \end{array} +$$ + +where I, II, and III are defined in an obvious way. + +Define the minimum eigenvalue of $\operatorname{E}_{\varphi_1}\left(S^M (\varphi_1,\mathbf{y})S^M (\varphi_1,\mathbf{y})^\top\right)$ is $\lambda_{min}(\varphi_1)$ , then + +$$ +I = \boldsymbol {\delta} ^ {\top} E _ {\varphi_ {1}} \left(\mathcal {S} ^ {M} \left(\varphi_ {1}, \mathbf {y}\right) \mathcal {S} ^ {M} \left(\varphi_ {1}, \mathbf {y}\right) ^ {\top}\right) \boldsymbol {\delta} \geq \lambda_ {\min } \left(\varphi_ {1}\right) \| \boldsymbol {\delta} \| _ {2} ^ {2}. \tag {27} +$$ + +Since $\varphi_{1} \in \mathcal{O}_{p}^{M}$ is defined on a compact set, and $\operatorname{E}_{\varphi_{1}}\left(\mathcal{S}^{M}(\varphi_{1}, \mathbf{y}) \mathcal{S}^{M}(\varphi_{1}, \mathbf{y})^{\top}\right)$ is positive definite and continuous for $\varphi_{1}$ , there exists a positive constant $C_{low} > 0$ , such that $C_{low} \leq \lambda_{min}(\varphi_{1})$ for any $\varphi_{1} \in \mathcal{O}_{p}^{M}$ , then we have + +$$ +\mathrm {I} \geq C _ {\text {l o w}} \| \boldsymbol {\delta} \| _ {2} ^ {2}. \tag {28} +$$ + +For part II, we have + +$$ +\begin{array}{l} \left| \mathrm {I I} \right| \leq \int p _ {1} \left| \mathcal {S} ^ {M} \left(\varphi_ {1}, \mathbf {y}\right) ^ {\top} \boldsymbol {\delta} \boldsymbol {\delta} ^ {\top} R \left(\varphi_ {0}, \mathbf {y}\right) \boldsymbol {\delta} \right| d \nu + \int p _ {*} \left| \mathcal {S} ^ {M} \left(\varphi_ {1}, \mathbf {y}\right) ^ {\top} \boldsymbol {\delta} \boldsymbol {\delta} ^ {\top} R \left(\varphi_ {0}, \mathbf {y}\right) \boldsymbol {\delta} \right| d \nu \tag {29} \\ = \mathrm {E} _ {\varphi_ {1}} \left(\left| \mathcal {S} ^ {M} (\varphi_ {1}, \mathbf {y}) ^ {\top} \boldsymbol {\delta} \boldsymbol {\delta} ^ {\top} R (\varphi_ {0}, \mathbf {y}) \boldsymbol {\delta} \right|\right) + \int p _ {*} \left| \mathcal {S} ^ {M} (\varphi_ {1}, \mathbf {y}) ^ {\top} \boldsymbol {\delta} \boldsymbol {\delta} ^ {\top} R (\varphi_ {0}, \mathbf {y}) \boldsymbol {\delta} \right| d \nu . \\ \end{array} +$$ + +For notational convenience, let $(i,j)$ be the index of the element at position $(2p - i + 1)i / 2 - p + j$ in $\mathcal{S}$ , while $(g,i,j)$ is similar index for $\mathcal{S}^M$ with $i\leq j$ . Similarly, for $i\leq j,i'\leq j'$ , $(i,j)(i',j')$ refers to the element at row $(2p - i + 1)i / 2 - p + j$ and column $(2p - i' + 1)i' / 2 - p + j'$ in $\mathcal{H}$ and $(g,i,j),(g',i',j')$ indexes the element at row $(g - 1)p(p + 1) / 2 + (2p - i + 1)i / 2 - p + j$ and column $(g' - 1)p(p + 1) / 2 + (2p - i' + 1)i' / 2 - p + j'$ in $\mathcal{H}^M$ . + +We now claim that for $\mathbf{y} \sim \mathrm{MPLN}(\pmb{\nu},\{\pmb{\mu}_g\}_{g=1}^G)$ , there exist two polynomial functions $K_{1}(\mathbf{y})$ and $K_{2}(\mathbf{y})$ satisfying $\operatorname{E}[K_1(\mathbf{y})] < \infty$ and $\operatorname{E}[K_2(\mathbf{y})] < \infty$ , such that for any $g,i,j,g',i',j',|\mathcal{S}_{(g,i,j)}^M(\varphi,\mathbf{y})| \leq K_1(\mathbf{y})$ and $|\mathcal{H}_{(g,i,j),(g,i',j')}^M(\varphi,\mathbf{y})| \leq K_2(\mathbf{y})$ . + +To prove this, first consider the case $g = g'$ . Since $\pi_g L_g(\pmb{\nu}, \mathbf{y}) / L^M(\pmb{\nu}, \mathbf{y}) \leq 1$ , then we have, + +$$ +\left| \mathcal {S} _ {(g, i, j)} ^ {M} (\boldsymbol {\varphi}, \mathbf {y}) \right| \leq \left| \mathcal {S} _ {(i, j)} \left(\boldsymbol {\Sigma} _ {g}, \mathbf {y}\right) \right| +$$ + +and + +$$ +\left| \mathcal {H} _ {(g, i, j), (g, i ^ {\prime}, j ^ {\prime})} ^ {M} (\boldsymbol {\varphi}, \mathbf {y}) \right| \leq \left| \mathcal {H} _ {(i, j) (i ^ {\prime}, j ^ {\prime})} \left(\boldsymbol {\Sigma} _ {g}, \mathbf {y}\right) \right| + 2 \left| \mathcal {S} _ {(i, j)} \left(\boldsymbol {\Sigma} _ {g}, \mathbf {y}\right) \mathcal {S} _ {\left(i ^ {\prime}, j ^ {\prime}\right)} \left(\boldsymbol {\Sigma} _ {g}, \mathbf {y}\right) \right|. +$$ + +Then, by applying Remark 3 in Xiao et al. (2022), we know that, there exist two polynomial functions $K_{1}(\mathbf{y})$ , $K_{2}(\mathbf{y})$ such that $|\mathcal{S}_{(g,i,j)}^{M}(\varphi ,\mathbf{y})|\leq K_{1}(\mathbf{y})$ and $|\mathcal{H}_{(g,i,j),(g,i^{\prime},j^{\prime})}^{M}(\varphi ,\mathbf{y})|\leq K_{2}(\mathbf{y})$ with $\operatorname {E}(K_1(\mathbf{y})) < \infty$ and $\operatorname {E}(K_2(\mathbf{y})) < \infty$ . The same proof can be applied to the $g\neq g^{\prime}$ case. This completes the proof of the claim. + +Therefore, there exist two polynomial functions $K_{1}(\mathbf{y})$ and $K_{2}(\mathbf{y})$ , such that + +$$ +\left| \mathcal {S} ^ {M} \left(\varphi_ {1}, \mathbf {y}\right) ^ {\top} \boldsymbol {\delta} \right| \leq \left\| \mathcal {S} ^ {M} \left(\varphi_ {1}, \mathbf {y}\right) \right\| _ {1} \| \boldsymbol {\delta} \| _ {2} \leq K _ {1} (\mathbf {y}) \| \boldsymbol {\delta} \| _ {2} \tag {30} +$$ + +and + +$$ +\left| \boldsymbol {\delta} ^ {\top} R \left(\varphi_ {0}, \mathbf {y}\right) \boldsymbol {\delta} \right| \leq \| R \left(\varphi_ {0}, \mathbf {y}\right) \| _ {2} \| \boldsymbol {\delta} \| _ {2} ^ {2} \leq \| R \left(\varphi_ {0}, \mathbf {y}\right) \| _ {F} \| \boldsymbol {\delta} \| _ {2} ^ {2} \leq K _ {2} (\mathbf {y}) \| \boldsymbol {\delta} \| _ {2} ^ {2}. \tag {31} +$$ + +Using the fact that any MPLN distribution have any finite moments, we can derive that the first part of Equation (29) can be bounded by $C\left\| \delta \right\| _2^3$ with a constant $C$ . Then using Lemma A.15, we know the second part of Equation (29) satisfies + +$$ +\int p _ {*} \left| \mathcal {S} ^ {M} (\boldsymbol {\varphi} _ {1}, \mathbf {y}) ^ {\top} \boldsymbol {\delta} \boldsymbol {\delta} ^ {\top} R (\boldsymbol {\varphi} _ {0}, \mathbf {y}) \boldsymbol {\delta} \right| d \nu \leq \int f _ {u p} ^ {M} (\mathbf {y}) K _ {1} (\mathbf {y}) K _ {2} (\mathbf {y}) \| \boldsymbol {\delta} \| _ {2} ^ {3} d \nu \leq C ^ {\prime} \| \boldsymbol {\delta} \| _ {2} ^ {3} +$$ + +with a constant $C^\prime$ . Then we can derive + +$$ +\left| \Pi \right| \leq \left(C + C ^ {\prime}\right) \| \boldsymbol {\delta} \| _ {2} ^ {3}. \tag {32} +$$ + +For III = ∫ p* [δ⁺ R(φ0, y) δ⁻ R(φ0, y) dν, using (31) and similar technique in II, we have + +$$ +\left| \operatorname {I I I} \right| \leq C ^ {\prime \prime} \| \boldsymbol {\delta} \| _ {2} ^ {4} \tag {33} +$$ + +with a constant $C''$ . + +Since the dominating functions $f_{up}^{M}, K_{1}, K_{2}$ are all independent from parameters, then the constants $C, C', C''$ are all independent from parameters. Thus, there exist positive constants $K$ and $C'$ , both independent of the parameters, such that for any $\| \varphi_{1} - \varphi_{2} \|_{2} \leq K$ , we have $C' \| \varphi_{1} - \varphi_{2} \|_{2} \leq d(p_{1}, p_{2})$ . + +Next, we prove that (i) holds for any $\varphi_1, \varphi_2 \in \mathcal{O}_p^M$ . Given that $\max_{1 \leq j, k \leq p} |\sigma_{jk}| \leq l$ , there exists a positive constant $K'$ such that $\| \varphi_1 - \varphi_2 \|_2 \leq K'$ for any $\varphi_1, \varphi_2 \in \mathcal{O}_p^M$ . Define the set $\mathcal{W} = \left\{ (\varphi_1, \varphi_2) \mid \| \varphi_1 - \varphi_2 \|_2 \geq K, \varphi_1, \varphi_2 \in \mathcal{O}_p^M \right\}$ . By the identifiability of the MPLN model, we have $d(p_1, p_2) \neq 0$ when $p_1 \neq p_2$ . Since $d(p_1, p_2)$ is a continuous function and $\mathcal{W}$ is a closed and bounded domain, $d(p_1, p_2)$ has a minimum value $k_1 > 0$ on $\mathcal{W}$ . For any $(\varphi_1, \varphi_2) \in \mathcal{W}$ , we have $k_1 \| \varphi_1 - \varphi_2 \|_2 / K' \leq d(p_1, p_2)$ . Let $C_2 = \min \{ C_2', k_1 / K' \}$ . Then, we have (i) holds for any $\varphi_1, \varphi_2 \in \mathcal{O}_p^M$ . + +Finally, we verify (ii). Let $p_1 = \sum_{g=1}^{G} \pi_g p_{1g}$ and $p_2 = \sum_{g=1}^{G} \pi_g p_{2g}$ , where $p_{1g} = p(\mathbf{y}; \boldsymbol{\Sigma}_g, \boldsymbol{\mu}_g)$ and $p_{2i} = p(\mathbf{y}; \boldsymbol{\Sigma}_g', \boldsymbol{\mu}_g)$ . According to the Lemma S10 in Xiao et al. (2022), there exist measurable functions $m_g(\mathbf{y})$ and constants $C_g$ , such that $\int m_g^2(\mathbf{y}) d\nu = C_g^2 < \infty$ and $\left| p_{1g}^{1/2} - p_{2g}^{1/2} \right| \leq m_g(\mathbf{y}) \left\| \varphi_g - \varphi'_g \right\|_2$ for $1 \leq g \leq G$ . Using Cauchy-Schwarz inequality, we have + +$$ +\begin{array}{l} \left| p _ {1} ^ {1 / 2} - p _ {2} ^ {1 / 2} \right| ^ {2} = \sum_ {g = 1} ^ {G} \pi_ {g} \left(p _ {1 g} + p _ {2 g}\right) - 2 \sqrt {\sum_ {g = 1} ^ {G} \pi_ {g} p _ {1 g}} \sqrt {\sum_ {g = 1} ^ {G} \pi_ {g} p _ {2 g}} \\ \leq \sum_ {g = 1} ^ {G} \pi_ {g} \left(p _ {1 g} + p _ {2 g}\right) - 2 \sum_ {g = 1} ^ {G} \pi_ {g} p _ {1 g} ^ {1 / 2} p _ {2 g} ^ {1 / 2} \tag {34} \\ = \sum_ {g = 1} ^ {G} \pi_ {g} \left| p _ {1 g} ^ {\frac {1}{2}} - p _ {2} ^ {\frac {1}{2}} \right| ^ {2} \\ \leq \sum_ {g = 1} ^ {G} \pi_ {g} m _ {g} ^ {2} (\mathbf {y}) \left\| \boldsymbol {\varphi} _ {g} - \boldsymbol {\varphi} _ {g} ^ {\prime} \right\| _ {2} ^ {2}. \\ \end{array} +$$ + +Let $m^2 (\mathbf{y}) = \max_{1\leq g\leq G}\pi_gm_g^2 (\mathbf{y})$ , then $\int m^2 (\mathbf{y})d\nu = C_1^2 < \infty$ for a constant $C_1$ and + +$$ +\left| p _ {1} ^ {1 / 2} - p _ {2} ^ {1 / 2} \right| ^ {2} \leq m ^ {2} (\mathbf {y}) \sum_ {g = 1} ^ {G} \left\| \varphi_ {g} - \varphi_ {g} ^ {\prime} \right\| _ {2} ^ {2} = m ^ {2} (\mathbf {y}) \| \varphi - \varphi^ {\prime} \| _ {2} ^ {2}. +$$ + +$$ +\operatorname {S o} \left| p _ {1} ^ {1 / 2} - p _ {2} ^ {1 / 2} \right| \leq m (\mathbf {y}) \| \varphi - \varphi^ {\prime} \| _ {2}. +$$ + +![](images/03a4cc400fa58d2c03ca4fd287db5ca93071e71576ad58d0954abece0d454156.jpg) + +# A.4. Theoretical Results and Proofs for the Binary Data Model in Example 2.6 + +Let $\mathbf{y} = (y_1, \ldots, y_p)^\top$ represent $p$ -dimensional binary variables and $\mathbf{x} = (x_1, \ldots, x_p)^\top$ be a $p$ -dimensional random vector. Assume that $\mathbf{y}$ follows the latent Gaussian copula model for binary data defined in Example 2.6, hereafter referred to as the binary model, then we have + +$$ +y _ {j} = I \left(x _ {j} > C _ {j}\right) \tag {35} +$$ + +$$ +\mathbf {x} \sim \mathrm {N P N} (\mathbf {0}, \boldsymbol {\Sigma}, f) +$$ + +where $I(\cdot)$ is the indicator function and $\Sigma_{jj} = 1$ for any $1\leq j\leq p$ + +Let $\mathbf{C} = (C_1, \ldots, C_p)^\top$ . The joint density function of $\mathbf{y} \in \{0, 1\}^p$ is given by: + +$$ +p (\mathbf {y}; \boldsymbol {\Sigma}, \mathbf {C}) = \frac {1}{(2 \pi) ^ {p / 2} \det (\boldsymbol {\Sigma}) ^ {1 / 2}} \int_ {\mathbf {x} \in U (\mathbf {y})} \exp \left(- \frac {1}{2} \mathbf {x} ^ {\top} \boldsymbol {\Sigma} ^ {- 1} \mathbf {x}\right) d \mathbf {x} +$$ + +where $U(\mathbf{y}) = U_{1}(y_{1}) \times \dots \times U_{p}(y_{p})$ , with: + +$$ +U _ {j} (y _ {j}) = \left\{ \begin{array}{l l} [ f \left(C _ {j}\right), \infty) & \text {i f y _ {j} = 1} \\ (- \infty , f \left(C _ {j}\right)) & \text {i f y _ {j} = 0} \end{array} \right. +$$ + +for $1\leq j\leq p$ + +Given $\Sigma$ and $\mathbf{C}$ , we define an operator $\mathcal{K}$ that maps functions in $\mathbf{x}$ to functions in $\mathbf{y}$ , + +$$ +\mathcal {K} (g) = \int_ {\mathbf {x} \in U (\mathbf {y})} \exp \left(- \frac {1}{2} \mathbf {x} ^ {\top} \pmb {\Sigma} ^ {- 1} \mathbf {x}\right) g (\mathbf {x}) d \mathbf {x}. +$$ + +In particular, + +$$ +\mathcal {K} (1) = \int_ {\mathbf {x} \in U (\mathbf {y})} \exp \left(- \frac {1}{2} \mathbf {x} ^ {\top} \boldsymbol {\Sigma} ^ {- 1} \mathbf {x}\right) d \mathbf {x}, +$$ + +where 1 denotes the constant function $1(x)\equiv 1$ + +Let $\Theta = \Sigma^{-1}$ denote the precision matrix. Assuming that $\mathbf{C}$ is known, we establish the following theoretical results for the binary model: + +Condition A.16. There exist positive constants $m$ and $M$ , such that $m \leq \lambda_{\min}(\Theta) \leq \lambda_{\max}(\Theta) \leq M$ . + +Theorem A.17. Under Condition A.16, the binary model satisfies Conditions 4.1 and 4.2. + +Proof. For the binary model, marginal distributions of any dimension remain consistent with the binary model framework. One-dimensional marginal density functions do not depend on any parameters. Thus, we focus on the two-dimensional case, where $\mathbf{y} = (y_1, y_2)^\top$ . + +$$ +y _ {j} = I \left(x _ {j} > C _ {j}\right), j = 1, 2 \tag {36} +$$ + +$$ +\mathbf {x} \sim \mathrm {N P N} (\mathbf {0}, \boldsymbol {\Sigma}, f), +$$ + +where $\mathbf{x} = (x_{1},x_{2})$ and + +$$ +\boldsymbol {\Sigma} = \left( \begin{array}{c c} 1 & \sigma \\ \sigma & 1 \end{array} \right). \tag {37} +$$ + +For notational simplicity, we denote the density function as $h_2(\mathbf{y};\sigma)$ . According to the Condition A.16, we have $-1 < c \leq \sigma \leq C < 1$ for some constants $c$ and $C$ . Define the bounded set $\mathcal{D} = \{\sigma | -1 < c \leq \sigma \leq C < 1\}$ . + +We only need to prove that there exist a measurable function $m(\mathbf{y})$ and constants $C_1, C_2$ , such that $\int m^2(\mathbf{y}) d\nu = C_1^2 < \infty$ and for any $\sigma_1, \sigma_2 \in \mathcal{D}$ , let $p_1 = h_2(\mathbf{y}; \sigma_1)$ and $p_2 = h_2(\mathbf{y}; \sigma_2)$ , we have: + +(i) $C_2|\sigma_1 - \sigma_2| \leq d(p_1, p_2)$ . + +(ii) $|p_1^{1/2} - p_2^{1/2}| \leq m(\mathbf{y}) |\sigma_1 - \sigma_2|$ . + +First, we demonstrate that (i) is satisfied, following the proof of Theorem A.6. + +We denote the score function and Hessian matrix of the log-likelihood. Straightforward calculation shows that + +$$ +\begin{array}{l} \mathcal {S} (\sigma , \mathbf {y}) = \frac {\log h _ {2} (\mathbf {y} ; \sigma)}{\partial \sigma} \\ = \frac {(1 + \sigma^ {2}) \mathcal {K} (x _ {1} x _ {2}) - \sigma \mathcal {K} (x _ {1} ^ {2} + x _ {2} ^ {2})}{(1 - \sigma^ {2}) ^ {2} \mathcal {K} (1)} + \frac {\sigma}{1 - \sigma^ {2}}, \\ \end{array} +$$ + +$$ +\begin{array}{l} \mathcal {H} (\sigma , \mathbf {y}) = \frac {\partial^ {2} \log h _ {2} (\mathbf {y} ; \sigma)}{\partial \sigma^ {2}} \\ = \frac {\left(1 + \sigma^ {2}\right) ^ {2} \mathcal {K} \left(x _ {1} ^ {2} x _ {2} ^ {2}\right) + \sigma^ {2} \mathcal {K} \left(\left(x _ {1} ^ {2} + x _ {2} ^ {2}\right) ^ {2}\right) - 2 \sigma \left(1 + \sigma^ {2}\right) \mathcal {K} \left(x _ {1} x _ {2} \left(x _ {1} ^ {2} + x _ {2} ^ {2}\right)\right)}{\left(1 - \sigma^ {2}\right) ^ {4} \mathcal {K} (1)} \tag {38} \\ - \frac {((1 + \sigma^ {2}) \mathcal {K} (x _ {1} x _ {2}) - \sigma \mathcal {K} (x _ {1} ^ {2} + x _ {2} ^ {2})) ^ {2}}{(1 - \sigma^ {2}) ^ {4} \mathcal {K} ^ {2} (1)} + \frac {1 + \sigma^ {2}}{(1 - \sigma^ {2}) ^ {2}} \\ + \frac {(6 \sigma + 2 \sigma^ {3}) \mathcal {K} (x _ {1} x _ {2}) - (1 + 3 \sigma^ {2}) \mathcal {K} (x _ {1} ^ {2} + x _ {2} ^ {2})}{(1 - \sigma^ {2}) ^ {3} \mathcal {K} (1)}. \\ \end{array} +$$ + +We get the Taylor expansion of $p_2^{1/2}$ on $\sigma_1$ , + +$$ +p _ {2} ^ {1 / 2} = p _ {1} ^ {1 / 2} + p _ {1} ^ {1 / 2} \mathcal {S} \left(\sigma_ {1}, \mathbf {y}\right) \left(\sigma_ {2} - \sigma_ {1}\right) / 2 + R \left(\sigma_ {0}, \mathbf {y}\right) \left(\sigma_ {2} - \sigma_ {1}\right) ^ {2} / 2, \tag {39} +$$ + +where $R(\sigma_0,\mathbf{y}) = p^{1 / 2}(\mathbf{y};\sigma_0)\left[S(\sigma_0,\mathbf{y})^2 /4 + \mathcal{H}(\sigma_0,\mathbf{y}) / 2\right]$ and $\sigma_0$ is between $\sigma_{1}$ and $\sigma_{2}$ . We define $p_0 = h_2(\mathbf{y};\sigma_0)$ and $\delta = \sigma_{2} - \sigma_{1}$ , then we have + +$$ +\begin{array}{l} d \left(p _ {1}, p _ {2}\right) = \left[ \int p _ {1} \mathcal {S} \left(\sigma_ {1}, \mathbf {y}\right) ^ {2} \delta^ {2} d \nu + \int 2 p _ {1} ^ {1 / 2} p _ {0} ^ {1 / 2} \mathcal {S} \left(\sigma_ {1}, \mathbf {y}\right) R \left(\sigma_ {0}, \mathbf {y}\right) \delta^ {3} d \nu + \int p _ {0} R \left(\sigma_ {0}, \mathbf {y}\right) ^ {2} \delta^ {4} d \nu \right] ^ {1 / 2} / 2 \tag {40} \\ =: \left(\mathrm {I} + \mathrm {I I} + \mathrm {I I I}\right) ^ {1 / 2} / 2, \\ \end{array} +$$ + +where I, II, and III are defined in an obvious way. + +Since $\sigma_{1} \in \mathcal{D}$ is defined on a compact set, and $\mathrm{E}_{\sigma_1}\left(\mathcal{S}(\sigma_1,\mathbf{y})^2\right)$ is positive definite and continuous for $\sigma_{1}$ , there exists a positive constant $C_{low} > 0$ , such that for any $\sigma_{1} \in \mathcal{D}$ , + +$$ +\mathrm {I} \geq C _ {\text {l o w}} | \delta | ^ {2}. \tag {41} +$$ + +For part II, we have + +$$ +\begin{array}{l} | \Pi | \leq \int p _ {1} \left| \mathcal {S} (\sigma_ {1}, \mathbf {y}) R (\sigma_ {0}, \mathbf {y}) \delta^ {3} \right| d \nu + \int p _ {0} \left| \mathcal {S} (\sigma_ {1}, \mathbf {y}) R (\sigma_ {0}, \mathbf {y}) \delta^ {3} \right| d \nu . \\ = \mathrm {E} _ {\sigma_ {1}} \left(\left| S (\sigma_ {1}, \mathbf {y}) R (\sigma_ {0}, \mathbf {y}) \delta^ {3} \right|\right) + \int p _ {0} \left| S (\sigma_ {1}, \mathbf {y}) R (\sigma_ {0}, \mathbf {y}) \delta^ {3} \right| d \nu . \\ \end{array} +$$ + +Since $\mathbf{y}$ takes a finite number of values, according to Equation (38), there exist constants $K_{1}$ and $K_{2}$ , independent of the parameters, such that $|\mathcal{S}(\sigma ,\mathbf{y})|\leq K_1$ and $|\mathcal{H}(\sigma ,\mathbf{y})|\leq K_2$ for any $\sigma \in \mathcal{D}$ . Similarly, we have $h_2(\mathbf{y};\sigma)\leq K_3$ , where $K_{3}$ is a constant. + +Then we can derive + +$$ +\left| \mathrm {I I} \right| \leq C ^ {\prime} | \delta | ^ {3} \tag {43} +$$ + +with a constant $C^\prime$ + +For part III $= \int p_0R(\sigma_0,\mathbf{y})^2\delta^4 d\nu$ , using similar technique in II, we have + +$$ +\left| \mathrm {I I I} \right| \leq C ^ {\prime \prime} | \delta | ^ {4} \tag {44} +$$ + +with a constant $C''$ . + +Since the constants $K_{1}, K_{2}, C', C''$ are all independent from parameters, there exist positive constants $K$ and $C'_2$ , both independent of the parameters, such that $C'_2 |\sigma_1 - \sigma_2| \leq d(p_1, p_2)$ for any $|\sigma_1 - \sigma_2| \leq K$ . + +Next, we prove that (i) holds for any $\sigma_1, \sigma_2 \in \mathcal{D}$ . Given that $-1 < c \leq \sigma \leq C < 1$ , there exists a positive constant $K'$ such that $|\sigma_1 - \sigma_2| \leq K'$ for any $\sigma_1, \sigma_2 \in \mathcal{D}$ . Define $\mathcal{W} = \{ (\sigma_1, \sigma_2) \mid |\sigma_1 - \sigma_2| \geq K, \sigma_1, \sigma_2 \in \mathcal{D} \}$ . By the identifiability of the binary model, $d(p_1, p_2) \neq 0$ when $p_1 \neq p_2$ . Since $d(p_1, p_2)$ is continuous and $\mathcal{W}$ is compact, it attains a minimum value $k_1 > 0$ on $\mathcal{W}$ . For any $(\sigma_1, \sigma_2) \in \mathcal{W}$ , $k_1 |\sigma_1 - \sigma_2| / K' \leq d(p_1, p_2)$ . Let $C_2 = \min \{C'_2, k_1 / K'\}$ . Thus, (i) holds for all $\sigma_1, \sigma_2 \in \mathcal{D}$ . + +Finally, we verify (ii). For any $\sigma_1, \sigma_2 \in \mathcal{D}$ , let $p_1 = h_2(\mathbf{y}; \sigma_1)$ and $p_2 = h_2(\mathbf{y}; \sigma_2)$ . Similarly, we have Taylor expansion of $p_2^{1/2}$ on $\sigma_1$ , + +$$ +p _ {2} ^ {1 / 2} = p _ {1} ^ {1 / 2} + p _ {*} ^ {- 1 / 2} \left(\frac {\partial p _ {*}}{\partial \sigma^ {*}}\right) (\sigma_ {2} - \sigma_ {1}) / 2 +$$ + +where $\sigma^{*}$ is between $\sigma_{1}$ and $\sigma_{2}$ , and $p_{*} = h_{2}(\mathbf{y};\sigma^{*})$ . Let $\eta = \sigma_{2} - \sigma_{1}$ , we have, + +$$ +\left| p _ {2} ^ {1 / 2} - p _ {1} ^ {1 / 2} \right| = \frac {1}{2} p _ {*} ^ {1 / 2} | \mathcal {S} (\sigma^ {*}, \mathbf {y}) \eta | \leq \frac {1}{2} K _ {3} ^ {1 / 2} K _ {1} | \eta | +$$ + +So we finish the proof. + +# B. Simulation + +# B.1. Details of the Data Generation Process for the MPLN Model + +The network structures are generated based on the following procedures. + +- Random Graph: Pairs of nodes are connected with probability 0.016 and the nonzero edges are randomly set as 0.3 or -0.3. +- Restricted Random Graph: The restricted random graph comprises 5 independent groups of randomly connected nodes. Pairs of nodes within the same group are connected with probability 0.016, while nodes belonging to separate groups are not related. The nonzero edges are randomly set as 0.3 or -0.3. +- Banded Graph: Pairs $(i,j)$ of nodes are connected if $|i - j| \leq 2, i = j$ . All nonzero edges are set as 0.3. +- Scale-free Graph: A scale-free network follows a power law which suggests that the central node have more connections. The scale-free graphs are generated with power 1 and the nonzero edges are randomly set as 0.3 or -0.3. + +For each simulation dataset, we independently generate the precision matrix for each of the three latent normal distributions based on one of four graph structures. To ensure positive definiteness, the diagonal elements of the precision matrix are set to 1 plus a small positive value. The mean vectors $\pmb{\mu}_{g} = (\mu_{g1},\dots,\mu_{gp})^{\top}$ for each latent normal distribution $(g = 1,2,3)$ are then generated as follows: the first $p_d$ elements of $\pmb{\mu}_{g}$ are independently sampled from $\{v_{1},(v_{1} + v_{2}) / 2,v_{2}\}$ , and the remaining $p - p_d$ elements are shared across $\pmb{\mu}_1,\pmb{\mu}_2,\pmb{\mu}_3$ , independently sampled from $\{v_{3},v_{4}\}$ . The values of $(v_{1},v_{2},v_{3},v_{4})$ are set to $(1.9, -0.6,0.4, - 0.6)$ for the low zero-proportion case (about $20\%$ zeros) and $(1.1, - 1.4, - 0.4, - 1.4)$ for the high zero-proportion case (about $40\%$ zeros). We vary $p_d$ to control the mixing degree of the three populations. + +The scaling factors $\mathbf{S} = (S_1, \dots, S_n)^\top$ are independently sampled from a distribution defined as $S_i = \exp(Z_i)$ , where $Z_i \sim \mathrm{N}(\log(\log 10), 0.05^2)$ for $i = 1, \dots, n$ . Using these model parameters, the observed expression values $\mathbf{Y}_1, \dots, \mathbf{Y}_n$ are generated from the MPLN model. We then compute the Adjusted Rand Index (ARI) between the true population labels and the labels obtained from K-means clustering of the normalized data + +$$ +\widetilde {\mathbf {Y}} _ {i} = \log (\frac {\mathbf {Y} _ {i} + 1}{\widehat {S} _ {i}}), +$$ + +Table 3. Comparisons of EM-MMLE with PLNet, VMPLN and Glasso in terms of AUPR on simulation results for blocked random graphs generated by the MPLN model. The results are averages over 50 replicates with standard deviations in brackets. + +
Zero-proportion +Dimension +Mixing degreeLowp=100 +MiddleLowp=300 +MiddleHigh
HighLow
n=1800
EM-MMLE0.95 (0.011)0.93 (0.017)0.9 (0.016)0.82 (0.028)0.78 (0.023)0.67 (0.043)
PLNet0.86 (0.05)0.79 (0.084)0.79 (0.074)0.7 (0.033)0.65 (0.056)0.52 (0.054)
VMPLN0.91 (0.028)0.88 (0.037)0.89 (0.024)0.62 (0.024)0.62 (0.019)0.6 (0.025)
Glasso0.82 (0.038)0.78 (0.038)0.75 (0.05)0.66 (0.032)0.64 (0.027)0.56 (0.037)
n=3000
EM-MMLE0.99 (0.005)0.98 (0.005)0.98 (0.006)0.94 (0.014)0.91 (0.013)0.84 (0.047)
PLNet0.96 (0.02)0.95 (0.041)0.91 (0.057)0.87 (0.062)0.83 (0.048)0.73 (0.068)
VMPLN0.95 (0.03)0.93 (0.036)0.94 (0.021)0.7 (0.021)0.7 (0.02)0.7 (0.024)
Glasso0.89 (0.037)0.87 (0.043)0.85 (0.041)0.75 (0.03)0.74 (0.021)0.68 (0.039)
Zero-proportion +Dimension +Mixing degreep=100Highp=300
LowMiddleHighLowMiddleHigh
n=1800
EM-MMLE0.8 (0.029)0.78 (0.028)0.74 (0.035)0.58 (0.048)0.53 (0.048)0.45 (0.045)
PLNet0.7 (0.064)0.67 (0.049)0.63 (0.045)0.49 (0.054)0.44 (0.049)0.35 (0.055)
VMPLN0.76 (0.054)0.74 (0.034)0.71 (0.036)0.43 (0.034)0.42 (0.031)0.41 (0.036)
Glasso0.52 (0.045)0.47 (0.036)0.45 (0.048)0.44 (0.037)0.42 (0.031)0.36 (0.038)
n=3000
EM-MMLE0.95 (0.012)0.93 (0.014)0.91 (0.018)0.79 (0.037)0.75 (0.037)0.68 (0.039)
PLNet0.87 (0.061)0.86 (0.034)0.8 (0.062)0.73 (0.057)0.67 (0.057)0.6 (0.047)
VMPLN0.86 (0.048)0.84 (0.043)0.83 (0.046)0.53 (0.028)0.53 (0.023)0.51 (0.019)
Glasso0.62 (0.058)0.59 (0.041)0.54 (0.067)0.55 (0.034)0.54 (0.028)0.49 (0.029)
+ +where $\widehat{S}_i = \sum_{j=1}^p Y_{ij} / 10^3$ for $i = 1,2,\dots,n$ . The ARI values are adjusted as follows: low-level mixing data correspond to an ARI in (0.9, 1], middle-level mixing data to an ARI in (0.75, 0.85], and high-level mixing data to an ARI in (0.6, 0.7]. + +# B.2. Details of the Data Generation Process for Binary Data + +The threshold parameter $C_j$ is sampled from uniform distribution on $[-1, 1]$ . We construct the inverse correlation matrix $\Theta$ such that $\Theta_{jj} = 1$ and $\Theta_{jk} = \alpha_1 z_{jk}$ for $j \neq k$ . Here, we set $\alpha_1 = 0.15$ to ensure the positive definiteness of $\Theta$ , and $z_{jk}$ is a Bernoulli random variable with success probability + +$$ +p _ {j k} = \frac {4 0 0}{p (p - 1)} \exp \left(- \frac {\| \mathbf {t} _ {j} - \mathbf {t} _ {k} \| _ {2}}{2 \alpha_ {2}}\right), +$$ + +where $\mathbf{t}_j$ and $\mathbf{t}_k$ are independently drawn from a bivariate uniform distribution on $[0,1]$ . The constant $\alpha_{2}$ is adjusted to generate approximately 200 edges in the graph, and the covariance matrix $\boldsymbol{\Sigma}$ is rescaled so that all diagonal elements equal 1. + +# B.3. Additional Results + +Tables 3-5 present the AUPR performance of EM-MMLE, PLNet, VMPLN, and Glasso for blocked random graphs, banded graphs, and scale-free graphs, respectively. + +# C. Real Data Analysis + +# C.1. Silver Standard Construction for Benchmarking on scRNA-seq Data + +The databases utilized in this study include STRING (Szklarczyk et al., 2019), HumanTFDB (Hu et al., 2019), hTFtarget (Zhang et al., 2020), ChEA (Lachmann et al., 2010), ChIP-Atlas (Oki et al., 2018), ChIPBase (Zhou et al., 2016), ESCAPE (Xu et al., 2013), TRRUST (Han et al., 2018), and RegNetwork (Liu et al., 2015). + +Table 4. Comparisons of EM-MMLE with PLNet, VMPLN and Glasso in terms of AUPR on simulation results for banded graphs generated by the MPLN model. The results are averages over 50 replicates with standard deviations in brackets. + +
Zero-proportion +Dimension +Mixing degreeLowp=100 +MiddleLowp=300 +MiddleHigh
HighLow
n=1800
EM-MMLE0.87 (0.017)0.88 (0.017)0.85 (0.022)0.87 (0.01)0.83 (0.017)0.76 (0.021)
PLNet0.8 (0.019)0.77 (0.03)0.72 (0.017)0.73 (0.027)0.67 (0.052)0.6 (0.031)
VMPLN0.71 (0.02)0.71 (0.021)0.71 (0.019)0.71 (0.012)0.71 (0.014)0.69 (0.016)
Glasso0.65 (0.037)0.63 (0.034)0.6 (0.03)0.72 (0.018)0.7 (0.018)0.65 (0.021)
n=3000
EM-MMLE0.93 (0.015)0.93 (0.016)0.93 (0.017)0.95 (0.008)0.93 (0.01)0.88 (0.019)
PLNet0.88 (0.014)0.85 (0.023)0.81 (0.03)0.85 (0.037)0.82 (0.025)0.75 (0.052)
VMPLN0.76 (0.024)0.75 (0.024)0.76 (0.025)0.77 (0.014)0.77 (0.015)0.77 (0.012)
Glasso0.69 (0.028)0.67 (0.034)0.66 (0.044)0.79 (0.018)0.78 (0.019)0.74 (0.02)
Zero-proportion +Dimension +Mixing degreep=100Highp=300
LowMiddleHighLowMiddleHigh
n=1800
EM-MMLE0.79 (0.019)0.79 (0.023)0.77 (0.025)0.74 (0.015)0.7 (0.018)0.64 (0.022)
PLNet0.72 (0.028)0.69 (0.031)0.65 (0.035)0.62 (0.033)0.59 (0.031)0.53 (0.03)
VMPLN0.62 (0.021)0.61 (0.034)0.61 (0.028)0.59 (0.019)0.57 (0.017)0.57 (0.021)
Glasso0.5 (0.023)0.48 (0.035)0.46 (0.037)0.55 (0.015)0.54 (0.019)0.5 (0.025)
n=3000
EM-MMLE0.88 (0.012)0.89 (0.022)0.87 (0.019)0.87 (0.01)0.84 (0.015)0.79 (0.015)
PLNet0.81 (0.023)0.79 (0.033)0.75 (0.03)0.79 (0.034)0.74 (0.039)0.69 (0.036)
VMPLN0.67 (0.025)0.67 (0.036)0.66 (0.029)0.66 (0.015)0.65 (0.019)0.65 (0.017)
Glasso0.53 (0.028)0.52 (0.042)0.49 (0.037)0.64 (0.018)0.62 (0.024)0.59 (0.024)
+ +Table 5. Comparisons of EM-MMLE with PLNet, VMPLN and Glasso in terms of AUPR on simulation results for scale-free graphs generated by the MPLN model. The results are averages over 50 replicates with standard deviations in brackets. + +
Zero-proportion +Dimension +Mixing degreeLowp=100 +MiddleLowp=300 +MiddleHigh
HighLow
n=1800
EM-MMLE0.74 (0.036)0.71 (0.035)0.64 (0.05)0.64 (0.034)0.58 (0.04)0.5 (0.04)
PLNet0.68 (0.044)0.6 (0.042)0.54 (0.043)0.57 (0.049)0.49 (0.046)0.43 (0.045)
VMPLN0.54 (0.025)0.53 (0.03)0.52 (0.029)0.48 (0.028)0.48 (0.029)0.43 (0.042)
Glasso0.52 (0.038)0.48 (0.037)0.44 (0.04)0.53 (0.035)0.49 (0.037)0.42 (0.033)
n=3000
EM-MMLE0.84 (0.029)0.85 (0.035)0.78 (0.045)0.83 (0.025)0.78 (0.031)0.68 (0.033)
PLNet0.78 (0.045)0.75 (0.053)0.67 (0.042)0.78 (0.042)0.71 (0.05)0.63 (0.04)
VMPLN0.59 (0.027)0.59 (0.025)0.57 (0.034)0.59 (0.021)0.58 (0.018)0.56 (0.023)
Glasso0.56 (0.044)0.56 (0.037)0.5 (0.038)0.66 (0.031)0.62 (0.03)0.54 (0.03)
Zero-proportion +Dimension +Mixing degreep=100Highp=300
LowMiddleHighLowMiddleHigh
n=1800
EM-MMLE0.56 (0.037)0.55 (0.033)0.49 (0.047)0.37 (0.039)0.32 (0.04)0.28 (0.043)
PLNet0.5 (0.04)0.47 (0.035)0.41 (0.032)0.33 (0.04)0.29 (0.039)0.25 (0.043)
VMPLN0.42 (0.026)0.42 (0.025)0.4 (0.031)0.3 (0.026)0.28 (0.029)0.27 (0.036)
Glasso0.36 (0.032)0.35 (0.033)0.31 (0.031)0.31 (0.032)0.29 (0.034)0.25 (0.035)
n=3000
EM-MMLE0.7 (0.032)0.7 (0.031)0.65 (0.052)0.58 (0.046)0.53 (0.05)0.47 (0.073)
PLNet0.63 (0.035)0.61 (0.034)0.53 (0.043)0.54 (0.042)0.49 (0.047)0.42 (0.067)
VMPLN0.46 (0.02)0.46 (0.023)0.44 (0.02)0.39 (0.025)0.38 (0.028)0.37 (0.043)
Glasso0.4 (0.038)0.39 (0.038)0.35 (0.032)0.42 (0.034)0.41 (0.037)0.35 (0.056)
+ +Silver standards are derived from the 3' batch data, with gene pairs from public gene regulatory network databases considered as potential regulatory relationships. Each identified regulatory relationship involves at least one transcription factor. For each cell type in the 3' batch, Spearman's $\rho$ correlation is calculated between gene pairs with potential regulatory connections. Gene pairs showing significant Spearman's $\rho$ correlations are designated as true regulatory relationships and included in the silver standard edge set for the respective cell type. + +# C.2. Description of the AUPRC Ratio + +First, given a network estimation $\widehat{\Theta}$ from an algorithm, we define an edge score for each edge. For EM-MMLE, VMPLN, PLNet, and Glasso, the edge score for the edge $(i,j)$ is defined as: + +$$ +\left| - \left(\widehat {\Theta} _ {i i} \widehat {\Theta} _ {j j}\right) ^ {- \frac {1}{2}} \widehat {\Theta} _ {i j} \right|. +$$ + +For PPCOR and GENIE3, the edge score is defined as the estimated connected weight for each edge. + +Since the network inferred by the method contains connected edges with varying scores and unconnected edges, we calculate the area under the partial precision-recall curve (AUPRC) by applying different thresholds to the edge scores. To mitigate the impact of varying network densities across methods, we define the AUPRC ratio as the ratio between the AUPRC of a given method and the expected AUPRC of a random network prediction. The precision of the random predictor is the edge density of the ground-truth network. + +# C.3. Supporting Figures + +Figure 3 shows the gene regulatory networks inferred by EM-MMLE for the top 300 highly variable genes. ID3 is identified as a cell-type-specific hub gene in the $\mathrm{CD4 + }$ T cell network. Figure 4 presents the top 10 biological processes from a gene ontology analysis of ID3 target genes, highlighting the most significant biological processes associated with these genes. + +![](images/fb05d46ab58b9390bbca9db791abb1059af30b63a351b658161a4c4cadac84b5.jpg) +(a) B cells + +![](images/4e2713af4211ee0c5c8fa919aa6690dbbb3353a38e29c01aa2e25cd3584e94c1.jpg) +(b) Monocytes + +![](images/49a4d5a7670ed7a391942126faa71bff33fb4dc5bfe92e2e76ebc56d83072962.jpg) +(c) CD8+ T cells + +![](images/e90200c8f0fc02871eaf08eca4a88b50ca1404ddb69d3672a5ef2fa9cfd4fb50.jpg) +(d) CD4+ T cells +Figure 3. Inferred gene regulatory networks for four cell types. The size of each node represents its weighted node degree, while the edge width indicates the correlation weight. Genes highlighted in red represent the transcription factors of interest. + +![](images/ca62c774cd25ff12bcb765096d4401764a180c0cb4df6265e06d96977181ce57.jpg) +Figure 4. Gene ontology enrichment analysis of ID3 target genes within the gene regulatory network of $\mathrm{CD4 + }$ T cells. \ No newline at end of file diff --git a/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/images.zip b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..42aa7b45b14fc1ca4ed0e6edaba635e8d3433c84 --- /dev/null +++ b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d33d68326c039c8bab1d8cd3df75f06d9c1f80dab24da3e512ac31e34c49421d +size 2136700 diff --git a/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/layout.json b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..66166e4d42dbc49f0df4e4c279f3af64c40d5912 --- /dev/null +++ b/agenericfamilyofgraphicalmodelsdiversityefficiencyandheterogeneity/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28aedaf8771aad3ba738d699ba780bb250f02eea6d515345fe7d2beadbd73d23 +size 1800319 diff --git a/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/99f6f239-dad9-42a2-bfb1-3152d1939a7d_content_list.json b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/99f6f239-dad9-42a2-bfb1-3152d1939a7d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e6d49505f18d1d831f8cd2ee284864a29e92b1b8 --- /dev/null +++ b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/99f6f239-dad9-42a2-bfb1-3152d1939a7d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:131d3f1d2d8d598713c1f8275ec017aaeee955aab35243f65e404b744e024168 +size 120679 diff --git a/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/99f6f239-dad9-42a2-bfb1-3152d1939a7d_model.json b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/99f6f239-dad9-42a2-bfb1-3152d1939a7d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1c78322c585d9e4fdb0ce34cedd2b2cc62c9b517 --- /dev/null +++ b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/99f6f239-dad9-42a2-bfb1-3152d1939a7d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b45b56e575a8a28a4c70bcecefb79f0c310024576f841689253b56a99d2896d8 +size 147823 diff --git a/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/99f6f239-dad9-42a2-bfb1-3152d1939a7d_origin.pdf b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/99f6f239-dad9-42a2-bfb1-3152d1939a7d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..825e68da0b2eec11d3b428fa0c1a63b72d17944b --- /dev/null +++ b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/99f6f239-dad9-42a2-bfb1-3152d1939a7d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4819be7e7ad75c0e335734f5d938e6dd5cb421b94b31268c5183c1a8a953e11 +size 1603882 diff --git a/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/full.md b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/full.md new file mode 100644 index 0000000000000000000000000000000000000000..927910def8f7c9775c4c14cbb952107ae5694da1 --- /dev/null +++ b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/full.md @@ -0,0 +1,459 @@ +# A Geometric Approach to Personalized Recommendation with Set-Theoretic Constraints Using Box Embeddings + +Shib Dasgupta1 Michael Boratko1 Andrew McCallum1 + +# Abstract + +Personalized item recommendation typically suffers from data sparsity, which is most often addressed by learning vector representations of users and items via low-rank matrix factorization. While this effectively densifies the matrix by assuming users and movies can be represented by linearly dependent latent features, it does not capture more complicated interactions. For example, vector representations struggle with set-theoretic relationships, such as negation and intersection, e.g. recommending a movie that is "comedy and action, but not romance". In this work, we formulate the problem of personalized item recommendation as matrix completion where rows are set-theoretically dependent. To capture this set-theoretic dependence we represent each user and attribute by a hyper-rectangle or box (i.e. a Cartesian product of intervals). Box embeddings can intuitively be understood as trainable Venn diagrams, and thus not only inherently represent similarity (via the Jaccard index), but also naturally and faithfully support arbitrary set-theoretic relationships. Queries involving set-theoretic constraints can be efficiently computed directly on the embedding space by performing geometric operations on the representations. We empirically demonstrate the superiority of box embeddings over vector-based neural methods on both simple and complex item recommendation queries by up to $30\%$ overall. + +# 1. Introduction + +Recommendation systems are a standard component of most online platforms, providing personalized suggestions for + +$^{1}$ Manning College of Information & Computer Sciences, UMass Amherst. Correspondence to: Shib Dasgupta . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +products, movies, articles, and more. In addition to generic recommendation, these platforms often present the option for the user to search for items, either via natural language or structured queries. While collaborative filtering methods like matrix factorization have proven successful in addressing data sparsity for unconditional generation, they often fall short when attempting to combine them with more complicated queries. This is not unexpected, as vector embeddings, while effectively capturing linear relationships, are ill-equipped to handle the complex set-theoretic relationships. Even advanced neural network-based approaches, which are designed to capture intricate relationships, have been shown to struggle with set-theoretic compositionally that underlie many real-world preferences. + +Let us consider an example where a user named Bob wants to watch a comedy which is not a romantic comedy. Assuming we have a prior watch history for users, standard collaborative filtering techniques (e.g. low-rank matrix factorization) would yield a learned score function score $(m, \text{Bob})$ for each movie $m$ . If we also have movie-attribute annotations, we could form the set of comedies $C$ and set of romance movies $R$ and simply filter to those movies in $C \setminus R$ , however this assumes that the movie-attribute annotations are complete, which is rarely the case in practice. In fact, Dasgupta et al. (2023) show that item-attribute matrices, even manually curated, are often incomplete, and remain sparse and noisy due to limited coverage and annotation effort. + +A standard approach in a setting with sparse data is to learn a low-rank approximation for the attribute $\times$ movie matrix $\mathbf{A}$ , yielding a dense matrix $\hat{\mathbf{A}}$ . We can then form sets of movies based on this dense matrix using an (attribute-specific) threshold, e.g. $\hat{C} \coloneqq \{m \mid \hat{A}_{\text{comedy}, m} > \tau_{\text{comedy}}\}$ and $\hat{R} \coloneqq \{m \mid \hat{A}_{\text{romance}, m} > \tau_{\text{romance}}\}$ , and then rank movies $m \in \hat{C} \setminus \hat{R}$ according to score(m, Bob). While this approach does allow for performing the sort of queries we are after, it suffers from three fundamental issues: + +1. Limited user-attribute interaction: Since the attribute classification is done independently from the user, any latent relationships between the user and attribute cannot be taken into account. + +![](images/dddde066902e91e6dfa251b25bc3137f1141ca3bf7a595098879d4f14e9beaa4.jpg) +Figure 1: Standard matrix completion assumes you are given partial information about the user $\times$ movie matrix $\mathbf{U}$ , and potentially incomplete information about the attribute $\times$ movie matrix $\mathbf{A}$ . + +![](images/4a90b2a0714951a2e1412f54580a0cbaf84a4c0757e8d7f6eb4602a75d2eeb0f.jpg) +Figure 2: Box embeddings represent the movies, users, and attributes as "boxes" (Cartesian products of intervals) in $\mathbb{R}^n$ . + +2. Error compounding: Errors in the completion of attribute sets accumulate as the number of sets involved in the query increase. +3. Mismatched inductive-bias: Our queries can be viewed as set-theoretic combinations of the rows, not linear combinations. As such, using a low-rank approximation of the matrix may be misaligned with the eventual use. + +In this paper, we formulate the problem of attribute-specific recommendation as matrix completion where rows are not necessarily linear combinations of each other but, rather, are set-theoretic combinations of each other. More precisely, given some user $\times$ movie interaction matrix $\mathbf{U}$ and attribute $\times$ movie matrix $\mathbf{A}$ , the queries we are considering are set-theoretic combinations of these rows (see Figure 1). For example, the ground-truth data for comedies which are not romance movies which Bob likes would be the vector $x\in \{0,1\}^{|M|}$ , where $x_{m} = 1$ if and only if $\mathbf{U}_{\mathrm{Bob},m} = 1$ and $\mathbf{A}_{\mathrm{comedy},m} = 1$ and $\mathbf{A}_{\mathrm{romance},m} = 0$ . Note that this is not a linear combination of the previous rows, and so while the inductive bias of low-rank factorization has proven immensely effective for collaborative filtering we should not expect it to be directly applicable in this setting. + +Instead, we propose to learn representations for the users and attributes that are consistent with specific set-theoretic axioms. These representations must also be compactly parameterizable in a lower-dimensional space, differentiable with respect to some appropriate score function, and allow for efficient computation of various set operations. Box Embeddings (Vilnis et al., 2018; Dasgupta et al., 2020), which are axis-parallel $n$ -dimensional hyperrectangles, meet these criteria (see Figure 2). The volume of a box is easily calculated as the product of its side-lengths. Furthermore, box embeddings are closed under intersection (i.e. the intersection of two boxes is another box). Inclusion-exclusion thus allows us to calculate the volume of arbitrary set-theoretic combinations of boxes. + +The contributions of our paper are as follows - + +1. We model the problem of attribute-specific query recommendation as "set-theoretic matrix completion", where attributes and users are treated as sets of items. We discuss the challenges faced by existing machine-learning approaches for this problem setup. +2. We demonstrate the inconsistency of existing vector embedding models for this task. Additionally, we establish box embeddings as a suitable embedding method for addressing such set-theoretic problems. +3. We conduct an extensive empirical study comparing various vector and box embedding models for the task of set-theoretic query recommendation. + +Box embeddings, with their geometric set operations, significantly outperform all vector-based methods. We also evaluate score multiplication and threshold-based prediction for both vector and box embedding models, and find that performing set operations directly on the box embeddings performs best, solidifying our claim that the inductive bias of box embeddings provides the necessary generalization capabilities to address set-theoretic queries. + +# 2. Task Formulation + +# 2.1. Background + +Matrix completion is a fundamental problem in machine learning, and arises in a wide array of tasks, from recommender systems to image reconstruction. Formally, this problem is typically modeled as follows: Given a matrix $X \in \mathbb{R}^{m \times n}$ where only a subset of the entries are observed, find a complete matrix $\hat{X} \in \mathbb{R}^{m \times n}$ which closely approximates $X$ on the observed entries. For the task of recommendation, this involves predicting user interactions with items they have not previously interacted with, and a common assumption is that the preferences of users and characteristics of the items can be expressed by a small number of latent factors, with the alignment of these latent factors captured via dot-product. This justifies the search for a low-rank approximation $\hat{X} = BC$ , where $B \in \mathbb{R}^{m \times D}$ and $C \in \mathbb{R}^{D \times n}$ . In the case where the original matrix is binary, $X \in \{0,1\}^{m \times n}$ , it is common to perform logistic matrix factorization, where an elementwise sigmoid is applied after the dot-product of latent factors, which we denote (with slight abuse of notation) as $\hat{X} = \sigma(BC)$ . + +# 2.2. Set-Theoretic Matrix Completion + +We will describe the task of set-theoretic matrix completion on the setting of movies, users, and attributes, though the formulation and our proposed model can be generalized to arbitrary domains. We are given a set $\mathcal{D}_U \subseteq U \times M$ of user-movie interactions, and a set $\mathcal{D}_A \subseteq A \times M$ of attribute-movie pairs. We assume both of these sets are incomplete. + +Our goal is to eventually be able to recommend movies based on some query, for example "comedy and not romance". Such a query for a particular user can be represented as $u \wedge a_1 \wedge \neg a_2$ , where $u$ is the user, $a_1 = \text{comedy}$ and $a_2 = \text{romance}$ . We let $Q$ be the set of all queries of interest, which depends on which queries we anticipate evaluating at inference time. In this work, we will take $Q$ to be queries of the form $u, a_1, u \wedge a_1, u \wedge a_1 \wedge a_2$ , and $u \wedge a_1 \wedge \neg a_2$ , where $u \in U$ and $a_1, a_2 \in A$ . + +With this formulation, we can view our task as matrix completion for a matrix $X \in \{0,1\}^{|Q|\times |M|}$ , where the rows are derived by applying bitwise operators on the rows of + +user and attribute data. While we could, in theory, proceed directly with logistic matrix factorization on this matrix, there are both practical and theoretical reasons to search for an alternative. First, the number of rows of this matrix is very large relative to the original data - in our case we have $|Q| = \mathcal{O}(|U||A|^2)$ , but in general $|Q| = \mathcal{O}(3^{|U||A|})$ . This poses practical issues, both at training time (as there are an exponential number of elements of $X$ to traverse) and inference time (storing the low-rank approximations requires $\mathcal{O}(|Q|)$ memory, which is much larger than $|U| + |A|$ ). There are also theoretical issues with the underlying assumption, as it is no longer reasonable to assume the rows of $\sigma^{-1}(X)$ are linear combinations of some latent factors. + +# 3. Method + +Our proposed solution to address these issues starts by defining the sets of movies which comprise the queries of interest. Let, $\mathcal{P}(M)$ be the power set of movies $M$ . Specifically, for each user $u$ we can define the set $M_u = \{m \mid (u, m) \in \mathcal{D}_U\}$ , and for each attribute $a$ we can define the set $M_a = \{m \mid (a, m) \in \mathcal{D}_A\}$ . If we let $\mathcal{M} \subseteq \mathcal{P}(M)$ be the collection of all such sets, then the set of movies corresponding to a given query $q$ are direct set-theoretic combinations of elements in $\mathcal{M}$ . Hence, the reasonable underlying assumption, in this case, is to model the elements of $\mathcal{M}$ as sets via a map $f: \mathcal{M} \to R$ where $R$ is also a set of sets, and the map $f$ respects set-theoretic operations, i.e. $f(S \cap T) = f(S) \cap f(T)$ and $f(S \setminus T) = f(S) \setminus f(T)$ , etc. Such a map is referred to as a homomorphism of Boolean algebras, and the problem of learning such a function was explored in general in (Boratko et al., 2022). In our work, we propose box embeddings as the function $f$ which can be trained to obey the homomorphism constraints. As a result, user-attribute-item representations based on box embeddings could serve as an optimal inductive bias for the proposed set-theoretic matrix completion task. + +# 3.1. Set-theoretic Representation Box Embeddings + +As introduced in Vilnis et al. (2018), box embeddings represent entities by a hyperrectangle in $\mathbb{R}^D$ , i.e. a Cartesian product of intervals. Let the box embedding for user $u$ be: + +$$ +\operatorname {B o x} (u) = \prod_ {d = 1} ^ {D} [ u _ {d} ^ {\perp}, u _ {d} ^ {\lnot} ] = [ u _ {1} ^ {\perp}, u _ {1} ^ {\lnot} ] \times \dots \times [ u _ {D} ^ {\perp}, u _ {D} ^ {\lnot} ] \subseteq \mathbb {R} ^ {D}, +$$ + +where $[u_d^\perp, u_d^\top]$ is the interval for $d$ -th dimension, $u_d^\perp < u_d^\top$ for $d \in \{1, \ldots, D\}$ . + +The volume of an interval is defined as the length of the interval $\mathrm{Vol}((u_d^\perp, u_d^\top)) = \max(u_d^\top - u_d^\perp, 0)$ . + +Let, $\operatorname{Box}(m) = \prod_{d=1}^{D}[m_d^{\perp}, m_d^{\top}]$ be the box embeddings for a movie $m$ . At dimension $d$ , the volume of intersection + +between user $u$ and movie $m$ is defined as - + +$$ +\begin{array}{l} \operatorname {V o l I n t} \left(\left(u _ {d} ^ {\perp}, u _ {d} ^ {\lnot}\right), \left(m _ {d} ^ {\perp}, m _ {d} ^ {\lnot}\right)\right) \\ = \max \left(\min (u _ {d} ^ {\lnot}, m _ {d} ^ {\lnot}) - \max (u _ {d} ^ {\lrcorner}, m _ {d} ^ {\lrcorner}), 0\right). \\ \end{array} +$$ + +When the movie interval $[m_d^\perp, m_d^{\prime}]$ is completely contained by user interval $[u_d^\perp, u_d^{\prime}]$ , then $\frac{\mathrm{VolInt}((u_d^\perp, u_d^{\prime}), (m_d^\perp, m_d^{\prime}))}{\mathrm{Vol}((m_d^{\prime}, m_d^{\prime}))} = 1$ . This objective creates a set-theoretic interpretation with box embeddings, where user $\mathrm{Box}(u)$ contains all the movie boxes related to $u$ (Figure 2). The score for containment for a single dimension $d$ is formulated as: + +$$ +\begin{array}{l} F _ {\text {B o x}} \left(\left(u _ {d} ^ {\perp}, u _ {d} ^ {\nearrow}\right), \left(m _ {d} ^ {\perp}, m _ {d} ^ {\nearrow}\right)\right) \\ := \frac {\operatorname {V o l I n t} ((u _ {d} ^ {\lrcorner} , u _ {d} ^ {\rceil}) , (m _ {d} ^ {\lrcorner} , m _ {d} ^ {\rceil}))}{\operatorname {V o l} ((m _ {d} ^ {\lrcorner} , m _ {d} ^ {\rceil}))} \\ := \frac {\operatorname* {m a x} \left(\operatorname* {m i n} \left(u _ {d} ^ {\top} , m _ {d} ^ {\top}\right) - \operatorname* {m a x} \left(u _ {d} ^ {\top} , m _ {d} ^ {\top}\right) , 0\right)}{\operatorname* {m a x} \left(m _ {d} ^ {\top} - m _ {d} ^ {\top} , 0\right)}. \tag {1} \\ \end{array} +$$ + +The overall containment score is the multiplication of $F_{\mathrm{Box}}$ for each dimension. The log of this score is referred to as the energy function as given: + +$$ +\mathrm {E} _ {\mathrm {B o x}} (u, m) := - \log \prod_ {d = 1} ^ {D} F _ {\mathrm {B o x}} ((u _ {d} ^ {\perp}, u _ {d} ^ {\lnot}), (m _ {d} ^ {\perp}, m _ {d} ^ {\lnot})). \quad (2) +$$ + +This energy function is minimized when the user Box $(u)$ contains the movie Box $(m)$ . Previous works have highlighted the difficulty of optimizing an objective including these hard min and max functions (Li et al., 2019; Dasgupta et al., 2020). In our work, we use the latter solution, termed GumbelBOX, which treats the endpoints $x^{\perp}$ and $x^{\top}$ as mean of GumbelMax and GumbelMin random variables, respectively. Given 1-dimensional box parameters $\{[x_n^\perp ,x_n^\top ]\}_{n = 1}^N$ we define the associated GumbelMax random variables $X_{n}^{\perp}$ with mean $x_{n}^{\perp}$ and scale $\beta$ as well as the GumbelMin random variables $X_{n}^{\top}$ with mean $x_{n}^{\top}$ and scale $\beta$ . Dasgupta et al. (2020) calculates that the expected volume of intersection of intervals $\{[X_n^\perp ,X_n^\top ]\}$ can be approximated by + +$$ +\begin{array}{l} \mathbb {E} \left[ \max \left(\min _ {n} X _ {n} ^ {\top} - \max _ {n} X _ {n} ^ {\perp}, 0\right) \right] \\ \approx \mathrm {L S E} _ {\beta} \left(\mathrm {L S E} _ {- \beta} \left(x _ {1} ^ {\lnot}, \dots , x _ {N} ^ {\lnot}\right) - \mathrm {L S E} _ {\beta} \left(x _ {1} ^ {\llcorner}, \dots , x _ {N} ^ {\llcorner}\right), 0\right). \\ \end{array} +$$ + +essentially replacing the hard min and max operators with a smooth approximation, $\mathrm{LSE}_t(\mathbf{x})\coloneqq t\log (\sum_i e^{x_i / t})$ .Expected intersection volume in higher dimensions is just a product of the preceding equation, as the random variables are independent. We use this GumbelBOX (ab-. brev $GB$ ) formulation in our work changing the notations $F_{Box}$ , Vol, VolInt to $F_{GB}$ $\mathrm{Vol}_{GB}$ , VolInt $GB$ .We modify the per-dimension score function $F_{\mathrm{Box}}$ in (2) by replacing + +the ratio of hard volume calculations with the approximation to the expected volume, + +$$ +\begin{array}{l} F _ {\mathrm {G B}} \left(\left(u _ {d} ^ {\perp}, u _ {d} ^ {\lnot}\right), \left(m _ {d} ^ {\perp}, m _ {d} ^ {\lnot}\right); (\tau , \nu)\right) \\ := \frac {\mathrm {L S E} _ {\nu} (\mathrm {L S E} _ {- \tau} (u _ {d} ^ {\lnot} , m _ {d} ^ {\lnot}) - \mathrm {L S E} _ {\tau} (u _ {d} ^ {\lrcorner} , m _ {d} ^ {\lrcorner}) , 0)}{\mathrm {L S E} _ {\nu} (m _ {d} ^ {\lnot} - m _ {d} ^ {\lrcorner} , 0)} \\ =: \frac {\operatorname {V o l I n t} _ {\mathrm {G B}} \left(\left(u _ {d} ^ {\perp} , u _ {d} ^ {\prime}\right) , \left(m _ {d} ^ {\perp} , m _ {d} ^ {\prime}\right) ; (\tau , \nu)\right)}{\operatorname {V o l} _ {\mathrm {G B}} \left(\left(m _ {d} ^ {\prime} - m _ {d} ^ {\perp}\right) ; \nu\right)}. \tag {3} \\ \end{array} +$$ + +# 3.2. Training + +We model each user, attribute, and movie as a box in $\mathbb{R}^D$ , and denote the map from these entities to their associated box parameters as $\theta$ , i.e., the trainable box embedding for user $u$ is $\theta(u) \coloneqq \mathrm{Box}(u)$ . Our goal is to train these box representations to represent certain sets of movies which allow us to perform the sort of queries we are interested in. As motivated above, for a given user $u$ , we train $\mathrm{Box}(u)$ to approximate the set $M_u$ via a noise-contrastive estimation objective. Namely, for each $(u, m) \in \mathcal{D}_U$ , we have a loss term + +$$ +\begin{array}{l} \ell_ {(u, m)} (\theta) := \mathrm {E} _ {\mathrm {G B}} (u, m; \theta) \\ \left. \right. - \mathbb {E} _ {\tilde {m} \sim M} \left[ \log \left(1 - \exp \left(- \mathrm {E} _ {\mathrm {G B}} (u, \tilde {m}; \theta)\right)\right)\right]. \\ \end{array} +$$ + +The first term is minimized when $\mathrm{Box}(u)$ contains $\mathrm{Box}(m)$ . We approximate the second term via sampling, which encourages $\mathrm{Box}(u)$ to be disjoint from $\mathrm{Box}(\widetilde{m})$ for a uniformly randomly sampled movie $\widetilde{m}$ . We define an analogous loss function $\ell_{(a,m)}(\theta)$ for attribute-movie interactions, which trains $\mathrm{Box}(a)$ to contain the box $\mathrm{Box}(m)$ for each $m$ such that $(u,m) \in \mathcal{D}_U$ . + +The overall loss function is a convex combination of these loss terms: + +$$ +\begin{array}{l} \mathcal {L} (\theta ; \mathcal {D} _ {U}, \mathcal {D} _ {A}) := w * \sum_ {(u, m) \in \mathcal {D} _ {U}} \ell_ {(u, m)} (\theta) \\ + (1 - w) * \sum_ {(a, m) \in \mathcal {D} _ {A}} \ell_ {(a, m)} (\theta). \\ \end{array} +$$ + +for a hyperparameter $w \in [0,1]$ . This optimization ensures that the movie boxes are contained within the corresponding user and attribute boxes, thereby establishing a set-theoretic inductive bias. Both numbers of negative samples and $w$ are hyperparameters for training (Please Refer to Section 4, Appendix A.2) for further details. Training box embeddings is generally efficient, as the computation of box intersection volumes can be parallelized across dimensions. We provide training time details for the box embedding model and other vector-based baselines in Table 11 in Appendix C + +# 3.3. Inference + +During inference, given the trained embedding model $\theta$ and a user $u$ we determine the user's preference for the movie + +$m$ by negating and exponentiating the energy function, + +$$ +\begin{array}{l} \operatorname {s c o r e} (m, u; \theta) := \exp (- \operatorname {E} _ {\mathrm {G B}} (u, m; \theta)) \\ = \prod_ {d = 1} ^ {D} F _ {\mathrm {G B}} \left(\theta (u) _ {d}, \theta (m) _ {d}; (\tau , \nu)\right) \in \mathbb {R} _ {\geq 0}, \\ \end{array} +$$ + +where $\theta(x)_d = (x_d^\perp, x_d^\top)$ . Since the calculation is simply a product over dimensions, for notational clarity we will restrict our discussion for more complex queries to the one-dimensional case, and omit the explicit dependence on temperature hyperparameters, so + +$$ +\mathrm {s c o r e} (m, u; \theta) := \frac {\mathrm {V o l I n t} _ {\mathrm {G B}} (\theta (m) , \theta (u))}{\mathrm {V o l} _ {\mathrm {G B}} (\theta (m)))} +$$ + +which is the proportion of $\theta(m)$ which is contained within $\theta(u)$ (see Figure 2). It achieves its maximum at 1 if $\theta(u)$ contains $\theta(m)$ , and is minimized at 0 when they are disjoint, corresponding to the motivation that $\theta(u)$ represents the set of movies that user $u$ has interacted with. + +Given a query with a conjunction between attributes (e.g. "comedy and action") we denote the attributes involved $a_1$ and $a_2$ . Similarly to the score for a single user query, we define the score for these attributes as the proportion of the movie box $\theta(m)$ which is contained inside of the (soft) intersection of boxes $\theta(u)$ , $\theta(a_1)$ , and $\theta(a_2)$ , i.e. + +$$ +\operatorname {s c o r e} (m, u \wedge a _ {1} \wedge a _ {2}; \theta) := \frac {\operatorname {V o l I n t} _ {\mathrm {G B}} (\theta (m) , \theta (u) , \theta (a _ {1}) , \theta (a _ {2}))}{\operatorname {V o l} _ {\mathrm {G B}} (\theta (m))}. +$$ + +Again, this score is maximized if $\theta(m)$ is contained inside $\theta(u), \theta(a_1)$ , and $\theta(a_2)$ , and minimized when it is disjoint. + +In order to address queries with set differences, recall that, given two measurable sets $S$ and $T$ , we can compute the volume of $S \setminus T$ as $\operatorname{Vol}(S \setminus T) = \operatorname{Vol}(S) - \operatorname{Vol}(S \cap T)$ . Thus, if the query involves a negated attribute (e.g. "comedy and not action"), we define + +$$ +\begin{array}{l} \operatorname {s c o r e} (m, u \wedge a _ {1} \wedge \neg a _ {2}; \theta) := \frac {\operatorname {V o l I n t} _ {\mathrm {G B}} (\theta (m) , \theta (u) , \theta (a _ {1}))}{\operatorname {V o l} _ {\mathrm {G B}} (\theta (m))} \\ - \frac {\operatorname {V o l I n t} _ {\mathrm {G B}} (\theta (m) , \theta (u) , \theta (a _ {1}) , \theta (a _ {2}))}{\operatorname {V o l} _ {\mathrm {G B}} (\theta (m))} \\ \end{array} +$$ + +This score is maximized when $\theta(m)$ is contained inside $\theta(u)$ and $\theta(a_1)$ while being disjoint from $\theta(a_2)$ , and decreases when these conditions are not met. + +Our containment-based scoring framework naturally generalizes to more complex logical queries involving arbitrary Boolean combinations of attributes. By leveraging the inclusion-exclusion principle, any Boolean query can be converted into Disjunctive Normal Form (DNF). For example, the score for a complex query such as $u \wedge a_1 \vee a_2 \wedge \neg a_3 \vee a_4$ can be rewritten as a sum of scores over several + +conjunction clauses. Each clause is handled by computing the volume of the intersection of the involved box embeddings. Importantly, the model is trained only on pairwise user-item and attribute-item interactions, yet naturally extends its mechanism to arbitrary, unseen structured logical queries at inference time. + +Time complexity Each DNF clause requires computing the intersection of multiple boxes. For box embeddings, this is implemented via log-sum-exp (LSE) over coordinate-wise minima and maxima. For a clause involving $k$ variables (user or attributes), the intersection cost is $\mathcal{O}(kD)$ , where $D$ is the embedding dimension. To score a full Boolean query with $T$ DNF clauses, the total complexity is $\mathcal{O}(TD)$ . In the worst case, where all combinations of $n$ variables appear in disjunction, $T = 2^n$ . However, real-world queries are usually structured as conjunctions and simple negations, leading to far fewer terms. Additionally, we parallelize the LSE computations across dimensions and query terms, enabling efficient batched evaluation of logical queries. Our codebase includes these optimizations. + +# 4. Experiments + +In our experiments, we evaluate all the models on item recommendation across three domains: movies, songs, and restaurants. (4.1). We systematically generate queries of varying complexity from these datasets to evaluate performance on set-theoretic tasks (4.2.1, 4.2.2). We train and select models based on the performance of the traditional personalized item prediction (4.3). Finally, we demonstrate that our set-based representation method is better suited for handling set-theoretic constraints in recommendation tasks (5.1, 5.2). + +# 4.1. Dataset + +The datasets used in our study must contain two primary components: Item-User interactions $\mathcal{D}_U$ and Item-Attribute interactions $\mathcal{D}_A$ . We select datasets that offer rich ground truth annotations for both components. We utilize the MovieLens 1M and 20M datasets for personalized movie recommendations (Harper & Konstan, 2015). For the song domain, we employ a subset of the Last-FM dataset, which is the official song tag dataset of the Million Song Dataset (Bertin-Mahieux et al., 2011). In the restaurant domain, we use the NYC-R dataset introduced by (Wang et al., 2018). + +We utilize the data curated by Dasgupta et al. (2023) to construct $\mathcal{D}_A$ for the Movielens data. This dataset employs Wikidata (Vrandecic & Krötzsch, 2014) to generate ground truth attribute labels for movies1. For the Last-FM dataset, the authors use the Last.fm API ('getTopTags')2 to create + +attribute tags. Likewise, the authors in (Wang et al., 2018) crawl restaurant review data from TripAdvisor3 to curate tags and ratings for restaurants in NYC. The sparsity of $D_{A}$ and $D_{U}$ is comparable in the Movielens datasets. In contrast, the Last.fm and NYC-R datasets, designed with tag annotations in mind, exhibit much denser attribute-movie interaction. Thus, the selection of these three datasets not only encompasses diverse domains but also offers varying ground-truth distributions for our experiments. + +We use the binarized implicit feedback data (Hu et al., 2008), indicating whether the user or the attribute has been associated with the specific item. To ensure the quality of the data, we retain users/items with 5 or more interactions and attributes with frequency 20 or more in all the datasets. Refer to Table 1 for a detailed description of the dataset statistics. + +# 4.2. Dataset Splits & Query Generation + +To select models for each method, we train on a dataset split $D_{U}^{\mathrm{train}}$ & $D_{A}^{\mathrm{train}}$ while evaluating on a held-out set $D_{U}^{\mathrm{eval}}$ & $D_{A}^{\mathrm{eval}}$ . However, we use these eval set pairs to construct compositional queries. Simple random sampling or leave-one-out data splits do not ensure a substantial number of these queries. Therefore, we devise a data splitting technique closely linked to query generation, which we discuss next. + +# 4.2.1. PERSONALIZED SIMPLE QUERY + +This type of query corresponds to a single attribute for a particular user, e.g. Bob wants to watch a comedy movie. More formally, given a user $u$ and an attribute $a$ , the query type would be $-u \cap a$ . Note that, these simple queries are set-theoretic combinations between the item sets corresponding to the users and the attributes. Let us denote the data corresponding to these queries as $Q_{U \cap A}$ . + +While constructing the $Q_{U \cap A}$ pairs we need to ensure that - if an item is held out for evaluation for a simple query, the individual user-item and attribute-item pair should belong to the evaluation set as well. More formally, $(u, a, i) \in Q_{U \cap A} \Longleftrightarrow (u, i) \in \mathcal{D}_U^{\mathrm{eval}} \wedge (a, i) \in \mathcal{D}_A^{\mathrm{eval}}$ . To ensure this train/test isolation, we use the sampling algorithm 1 that takes in $D_U$ and $D_A$ and outputs $Q_{U \cap A}$ , $\mathcal{D}_U^{\mathrm{train}}$ , $\mathcal{D}_A^{\mathrm{train}}$ , $\mathcal{D}_U^{\mathrm{eval}}$ , $\mathcal{D}_A^{\mathrm{eval}}$ (Refer to Appendix A.1 for more details). The detailed statistics for the splits are provided in Table 1. Also, the statistics for the $Q_{U \cap A}$ are present in Table 2 + +# 4.2.2. PERSONALIZED COMPLEX QUERY + +The set-theoretic compositions that we consider here are the intersection and negation of attributes for a particular user. Given a user $u$ and attributes $a_1$ and $a_2$ , we consider the + +query types- $u\cap a_1\cap a_2$ and $u\cap a_1\cap \neg a_2$ ,e.g.,Bob want to watch an Action Comedy movie, Alice want to watch a Children but not Monster movie. Creating meaningful attribute compositions requires careful consideration, as not all combinations make sense. For instance, 'Sci-Fi' & 'Documentary' might not be a meaningful combination, whereas 'Sci-Fi' & 'Time-Travel' is. Similarly, 'Sci-Fi' $\rightharpoondown$ Fiction' doesn't make sense, but 'Fiction' $\rightharpoonup$ 'Sci-Fi' does. Sometimes, even if the intersection is valid, it could be trivial and non-interesting,e.g., 'Fiction' & 'Sci-Fi'. + +Intuitively, for two attributes $a_1$ & $a_2$ , their intersection is interesting if $|a_1 \cap a_2|$ is greater than combining any two random items set. Also, for their intersection to be nontrivial the size of the intersection $|a_1 \cap a_2|$ must be less than the individual sizes of the attributes i.e., $\alpha |a_1|$ and $\alpha |a_2|$ . Here, $|.|$ denotes the size of the item set corresponding to the attributes. $\alpha \in [0,1]$ is a design parameter, dedicated after manual inspection of the quality of the item sets for the combinations. In case of difference queries such as $a_1 \cap \neg a_2$ , we consider $\neg a_2$ to be the second attribute and carry out the same filtering strategy as done for the intersection queries. We denote the set of non-trivial and viable attribute pairs for the intersection to be $\mathcal{A}_{\cap} = \{(a_1, a_2) | |a_1 \cap a_2| > \epsilon, |a_1 \cap a_2| < \alpha |a_1|, |a_1 \cap a_2| < \alpha |a_2|\}$ , and for the difference to be $\mathcal{A}_{\setminus} = \{(a_1, a_2) | |a_1 \cap \neg a_2| > \epsilon, |a_1 \cap \neg a_2| < \alpha |a_1|, |a_1 \cap \neg a_2| < \alpha | \neg a_2|\}$ . Using the above formulation, we generate the test set for the personalized complex queries $Q_{U \cap A_1 \cap A_2}$ and $Q_{U \cap A_1 \cap \neg A_2}$ using algorithm 2. Please refer to Table 2 for the detailed statistics. The link for the dataset is available at https://github.com/ssdasgupta/set-based-collaborative-filtering. + +# 4.3. Training Details & Evaluation Criteria + +We train all the methods on users and attributes jointly using $\mathcal{D}^{\mathrm{train}} = \mathcal{D}_U^{\mathrm{train}}\cup \mathcal{D}_A^{\mathrm{train}}$ . We use dimensions $d = 128$ for vector-based models, and $d = 64$ for box models so that the number of parameters per user, attribute, and movie is equal.4 We perform extensive hyperparameter tuning for the learning rate, batch size, volume and intersection temperature of boxes, loss combination constant, etc. Please refer to the Appendix A.2 for details. We follow the standard sampled evaluation procedure described in Rendle et al. (2020), only for model selection purpose. For each user-item tuple $(u,m)$ in $\mathcal{D}_U^{\mathrm{eval}}$ , the model ranks $m$ amongst a set of items consisting of the $m$ together with 100 other true negative items w.r.t the user. Then we report on two different evaluation metrics namely Hit Ratio@ $k$ (HR@ $k$ ) and NDCG. (a) HitRatio@ $k$ : If the rank of $m$ is less than or equals to $k$ then the value of HR@ $k$ is 1 or 0 otherwise. (2) NDCG: if $r$ is the rank of $m$ , then $1 / \log (r + 1)$ is the NDCG. + +Table 1: Dataset Statistics, the Item-User interaction $\mathcal{D}_U$ & the Item-Attribute interaction $\mathcal{D}_A$ . The Train/Test split is created using algorithm 1 to test set-theoretic generalization. + +
Dataset#Users#Items#Attributes#Train D_U#Eval D_U#Train D_A#Eval D_A
Last-FM1,872241749060,4978,85734,3744,240
NYC-R9,597376457982,7348,50234,9084,376
MovieLens 1M6,0403,70557963,55436,65510,2731,545
MovieLens-20M138,49326,7449519,722,646277,61780,1781,734
+ +The model is selected based on the best-performing model on NDCG for the item prediction over the user-item validation set $\mathcal{D}_U^{\mathrm{eval}}$ , with the best-performing checkpoint saved for further evaluation on compositional queries. We follow the same evaluation protocol for the compositional queries as well, except, we rank $m$ amongst all items in the vocabulary rather than a sampled subset. + +# 4.4. Baselines + +The recommendation systems literature offers a wide range of methods that represent users, and items in $\mathbb{R}^d$ . These methods then propose a compatibility score function between the user and item, $\phi : \mathbb{R}^d \times \mathbb{R}^d \to \mathbb{R}$ . A common and effective choice for $\phi$ is the dot product, which underpins matrix factorization (Rendle et al., 2020; Koren & Bell, 2015). To capture more complex interactions among users, items, and attributes, (He et al., 2017) extend matrix factorization by replacing the dot product with a neural network-based similarity function. This method, called Neural Matrix Factorization (NEUMF), combines the dot product with an MLP. Similarly, (He et al., 2020) propose LightGCN (LGCN) to captures the user, items, and attribute interaction using Graph Convolution Network (Kipf & Welling, 2017) over a joint graph of user-item-attribute. We use MF, and, NEUMF LGCN as our baselines. + +For a personalized query, be it simple or complex, we need to devise a method to combine the individual scores of the user and the attributes involved in the query. In this work, we compare three approaches to obtain an aggregated score: + +1. FILTER: In this approach, we retrieve a list of items corresponding to the attributes based on the scores provided by the embedding models. The list is generated by thresholding the scores, where the threshold is optimized by minimizing the F1 score between the training data and predicted scores. We refer to the methods using this aggregation technique as BOX-FILTER for box embeddings and MF-FILTER, NEUMF-FILTER, LGCN-FILTER for vector-based methods. +2. PRODUCT: In this method, the compositional score is computed by multiplying the scores for the individual queries. For vector-based embeddings, the scores for + +Table 2: Compositional Query Statistics + +
DatasetPersonalized Simple Query u∩aPersonalized Complex Query u∩a1∩a2u∩a1∩¬a2
Last-FM9,86745,14210,814
NYC-R9,4827,4602,369
ML-1M21,39251,29937,769
ML-20M35,36842,35547,374
+ +each movie related to a user or attribute are normalized using the sigmoid function. For box embeddings, the energy function is normalized by conditioning on the movie box volume (see Section 3.3). The score for negation is calculated by subtracting the normalized score from 1. The three methods using this technique are referred to as BOX-PRODUCT, MF-PRODUCT, NEUMF-PRODUCT, and LGCN-PRODUCT. + +3. GEOMETRIC: This approach leverages the geometry of the embedding space. For vector-based embeddings, learned through Matrix Factorization, addition, and subtraction are often used for query composition (Mikolov et al., 2013). Box embeddings, on the other hand, naturally represent intersection operations, allowing us to compute scores for any set-theoretic combination using box intersection and inclusion-exclusion principles. We refer to these methods as BOX-GEOMETRIC and MF-GEOMETRIC. + +# 5. Results + +After conducting an extensive hyper-parameter search on $D_U^{\mathrm{eval}}$ , we select the top-performing model for each method based on NDCG scores (see Table 6 in the Appendix for the model selection details). This ensures that the chosen model is optimal for set-theoretic query inference, with the following performance results. + +# 5.1. Set-Theoretic Generalization + +We test the selected models for each method with the curated set-theoretic personalized queries (Detailed stats for the + +Table 3: Hit Rate(%)↑ on Set-theoretic queries for datasets Last-FM, MovieLens 1M, NYC-R. + +
MethodsU∩AU∩A1∩A2U∩A1∩-A2
h@10h@20h@50h@10h@20h@50h@10h@20h@50
LAST-FM
MF-FILTER14.825.137.426.846.862.815.224.435.5
MF-PRODUCT9.021.748.014.336.873.24.814.843.4
MF-GEOMETRIC6.112.229.73.47.627.51.74.815.9
NEUMF-FILTER13.521.932.320.019.655.711.318.828.7
NEUMF-PRODUCT13.625.647.619.535.763.39.016.840.5
LGCN-FILTER20.428.539.142.454.267.415.821.527.6
LGCN-PRODUCT20.531.048.643.858.080.70.81.33.5
BOX-FILTER22.931.539.032.746.555.922.032.140.3
BOX-PRODUCT27.944.568.038.257.782.717.832.460.3
BOX-GEOMETRIC28.344.868.338.858.383.117.532.560.0
MOVIELENS-1M
MF-FILTER5.010.222.311.417.927.54.79.822.5
MF-PRODUCT4.38.520.45.110.626.13.47.319.3
MF-GEOMETRIC0.40.93.00.10.20.80.51.02.7
NEUMF-FILTER9.315.528.513.321.535.98.814.726.7
NEUMF-PRODUCT10.316.831.415.324.543.55.79.720.2
LGCN-FILTER8.212.320.911.415.624.09.913.821.9
LGCN-PRODUCT5.99.014.97.611.720.15.58.614.1
BOX-FILTER11.719.132.314.520.528.611.419.534.0
BOX-PRODUCT9.9516.731.510.617.834.28.915.129.4
BOX-GEOMETRIC11.018.334.216.926.646.18.615.231.0
NYC-R
MF-FILTER1.42.44.62.74.88.02.13.56.3
MF-PRODUCT1.12.98.63.78.223.38.913.117.6
MF-GEOMETRIC0.51.54.30.20.83.50.51.23.7
NEUMF-FILTER3.85.69.22.53.24.54.26.310.8
NEUMF-PRODUCT4.67.313.76.611.220.82.75.211.2
LGCN-FILTER4.87.817.212.716.921.85.48.616.4
LGCN-PRODUCT5.08.718.112.117.635.14.98.013.2
BOX-FILTER4.97.813.49.913.520.44.47.112.5
BOX-PRODUCT5.08.917.910.919.537.35.39.118.8
BOX-GEOMETRIC4.98.717.612.221.539.25.59.219.2
+ +queries in Table 2). We report the ranking performance in terms of Hit Rates at 10, 20, and 50. Please refer to 3 for the results. + +The Box Embedding-based method outperforms vector-based methods by a significant margin, showing on average $30\%$ improvement when comparing the aggregated HR@50 performance of the best vector model (MFPRODUCT/NEUMF-PRODUCT/LGCN-FILTER) to the box model (BOX-GEOMETRIC) across all the three different domains. + +The $U \cap A_1 \cap A_2$ query is the most challenging, as it requires accuracy in all three individual queries. For this difficult query, BOX-GEOMETRIC shows the largest performance gap compared to other methods. Additionally, using vector addition and subtraction as geometric proxies for intersection and difference performs significantly worse than all other vector-based methods, while geometric operations in the box embedding space outperform even other box embedding methods. This validates the set-theoretic inductive bias of box embeddings and confirms that geometric operations in this space provide valid set-theoretic operations, unlike vectors. + +The FILTER aggregation technique performs similarly to or better than other methods only for Hits@10. However, + +Table 4: Generalization Spectrum Gap for PERSONALIZED COMPLEX QUERY $U\cap A_1\cap A_2$ + +
MethodsHit Rate @50 ↑Spectrum Gap ↓ (W - S) / W
Weakest (W)Weak-User (W-U)Weak-Attribute (W-A)Set-Theoretic (S)
MF-FILTER55.241.930.527.550.2%
MF-PRODUCT67.438.539.326.161.2 %
MF-GEOMETRIC18.512.91.80.895.6%
NEUMF-FILTER48.433.140.435.938.5%
NEUMF-PRODUCT67.848.740.643.535.9%
BOX-FILTER52.744.530.328.545.9%
BOX-PRODUCT64.652.839.034.247.1%
BOX-GEOMETRIC62.653.350.146.126.4%
+ +as $k$ increases, its performance declines across all model types (Box, MF, NeuMF) and datasets. This observation highlights the limitation of a fixed threshold filter and advocates smoother aggregation techniques like PRODUCT and GEOMETRIC. + +# 5.2. Spectrum of Generalization + +The query generation process (refer Section 4.2.1) ensures that for the target item $m$ corresponding to a query involving user $u$ and attribute $a$ , the pair $(u, m)$ and $(a, m)$ must not be in the training set $(u, m) \notin \mathcal{D}_U^{\mathrm{train}}$ and $(a, m) \notin \mathcal{D}_A^{\mathrm{train}}$ . The set-theoretic evaluation weakens when such pairs are added back to the training set. There are three different weakening settings applicable here, which we refer to as a spectrum - WEAKEST GENERALIZATION $((u, m) \in \mathcal{D}_U^{\mathrm{train}}$ and $(a, m) \in \mathcal{D}_A^{\mathrm{train}}$ ), WEAK GENERALIZATION-USER $((u, m) \in \mathcal{D}_U^{\mathrm{eval}}$ and $(a, m) \notin \mathcal{D}_A^{\mathrm{train}}$ ), WEAK GENERALIZATION-ATTRIBUTE $((u, m) \notin \mathcal{D}_U^{\mathrm{train}}$ and $(a, m) \in \mathcal{D}_A^{\mathrm{eval}}$ ). We report HitRate@50 performance on query type $U \cap A_1 \cap A_2$ for the MovieLens-1M dataset in Table 4 (More query types in Appendix - Table 9, 8). + +The weaker the generalization setting the easier it is for the models to achieve higher performance on the test set. Indeed, we observe that this is true across all the methods w.r.t each of the aggregation settings, validating the correctness of the trained models. + +However, we are interested in observing the performance gap when we go from the weakest to the strongest set-theoretic generalization. We refer to the percentage gap Generalization Spectrum Gap (hr(Weakest) - hr(Set-theoretic) / hr(Weakest) %). From Table 4 we observe that the best-performing box model BOX-GEOMETRIC achieves the best Generalization Spectrum Gap for HR@50. + +# 6. Related Work + +# 6.1. Box Embeddings + +Some of the recent works have tried to incorporate box embeddings in a recommendation systems setup. Xu et al. (2024); Wu et al. (2024); Zhang et al. (2021) use the side-length of the box embeddings as a preference range to obtain + +diverse set recommendations for users, Mei et al. (2022a) utilizes the axis parallel nature of the box embeddings for faster retrieval. Sun et al. (2020a;b); Ren et al. (2020) are some of the recent works that focus on logical query over knowledge bases (KB). However, in this work, we frame collaborative filtering as a set-theoretic matrix completion problem, which helps us to achieve better generalization for the composition of personalized queries. + +# 6.2. Set-based queries in Search and group recommendation systems. + +While set-theoretic queries are commonplace in search, popular question-answering (QA) benchmarks often do not include them. We found QUEST (Malaviya et al., 2023) the most closely related study, introducing a benchmark for entity-seeking queries with implicit set-based semantics. However, QUEST does not focus on explicit constraints or personalization, which are central to our work. + +# 6.3. Context Aware Recommendation + +The concept of context-aware recommendation, as introduced in (Adomavicius et al., 2011), provides a general framework where "context" is broadly defined as any auxiliary information. This framework emphasizes that user preferences for items can vary based on the context in which interactions occur, reflecting a user-centric view of contextual information. + +Building on this foundation, recent works have explored specific instances of context-aware recommendation, such as "attribute-aware recommendation." These approaches often leverage item or user attributes as contextual information to address various goals, including improving user profiling (Adomavicius et al., 2011), predicting missing item attributes (Wu et al., 2020; Chen et al., 2022), enhancing recommendations for cold-start scenarios(Deldjoo et al., 2019), or providing attribute-based explanations for recommendations (Xian et al., 2021). + +Our work differs significantly in its focus and objectives. we term "attribute-constrained recommendation," which involves generating recommendations explicitly constrained by logical combinations of attributes. Unlike attribute-aware approaches, which aim to improve recommendation quality by incorporating attribute information as auxiliary data, our work directly targets the task of satisfying explicit attribute-based constraints posed by users. + +# 6.4. Compositional Queries with Vector Embeddings + +It is common in machine learning to represent discrete entities such as items or attributes by vectors (Bengio et al., 2013) and to learn them by fitting the training data. Besides semantic similarity, some have claimed that learned vectors + +have compositional properties through vector arithmetic, for example in the empirical analysis of word2vec (Mikolov et al., 2013) and GLOVE (Pennington et al., 2014), and some theoretical analysis (Levy & Goldberg, 2014; Arora et al., 2018). However, anecdotally, many have found that the compositional behavior of vectors is far from reliable (Rogers et al., 2017). Our paper provides a comprehensive evaluation of vector embeddings on compositional queries and compares the results to a region-based alternative. + +# 7. Conclusion & Future Work + +In this work we presented the task of personalized recommendation with set-theoretic queries. We discussed how this problem can be viewed as set-theoretic matrix completion, and why the common approach of logistic matrix factorization is not aligned with the set-theoretic operations we wish to perform at inference time. We observed substantial improvements over the vector/neural baselines when using box embeddings as the representation, validating our intuition regarding the necessary set-theoretic bias. Our empirical results confirm that box embeddings are ideally suited to the task of recommendation with set-theoretic queries. + +In real-world recommendation systems — such as streaming platforms, e-commerce sites, or travel services — fre-text queries (e.g., “funny action movies without clowns”) are typically mapped to a curated set of item tags (e.g., genre, theme, metadata) via a natural language understanding (NLU) module. Our model operates downstream of this step, assuming a structured query (e.g., Action $\wedge$ Comedy $\wedge \neg$ Clowns) has already been derived. While our current focus is on the execution of structured set-theoretic queries, future work could explore tighter integration with front-end NLU systems. Large language models (e.g., GPT-4o) have demonstrated strong performance in parsing natural language constraints, and we view such models as complementary: performing query parsing and attribute identification, while our method serves as a reliable and efficient back-end executor for the resulting set-theoretic logic. Bridging the gap between these stages offers a promising direction for building end-to-end systems that are both expressive and controllable. + +As noted in Section 3.3, our model supports efficient evaluation of complex queries. We construct a benchmark of semantically plausible queries using statistical heuristics and manual filtering (Section 4.2.2), ensuring realistic and diverse combinations. While this allows us to test compositional generalization, curating a benchmark of natural user-issued queries remains an important direction for future work. + +# Acknowledgments + +The authors would like to thank the members of the Information and Extraction Synthesis Laboratory (IESL) at UMass Amherst, Steffen Rendle, and Li Zhang, for helpful discussions. This work was supported by IBM Research AI through the AI Horizons Network and National Science Foundation (NSF) under the Grant Numbers IIS-2106391. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of IBM or NSF. + +# Impact Statement + +This paper aims to advance the field of Machine Learning by introducing a geometric approach to personalized recommendation under set-theoretic constraints. Our primary contribution is methodological, focusing on improving representation learning for structured preference modeling. While recommendation systems have broad societal reach and their deployment may influence user behavior, fairness, or exposure to information, this work does not involve direct deployment or sensitive user data. As such, we do not identify any immediate or domain-specific societal risks associated with this research. Nonetheless, we acknowledge the importance of responsible use and encourage future applications of our method to consider fairness, transparency, and user control as core design considerations. + +# References + +Adomavicius, G., Mobasher, B., Ricci, F., and Tuzhilin, A. Context-aware recommender systems. AI Magazine, 32(3):67-80, Oct. 2011. doi: 10.1609/ajmag.v32i3.2364. URL https://ojs.aaai.org/ajmagazine/index.php/ajmagazine/article/view/2364. +Arora, S., Li, Y., Liang, Y., Ma, T., and Risteski, A. Linear algebraic structure of word senses, with applications to polysemy. Transactions of the Association for Computational Linguistics, 6:483-495, 2018. +Bengio, Y., Courville, A., and Vincent, P. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8): 1798-1828, 2013. +Bertin-Mahieux, T., Ellis, D. P., Whitman, B., and Lamere, P. The million song dataset. In Proceedings of the 12th International Conference on Music Information Retrieval (ISMIR 2011), 2011. +Boratko, M., Patel, D., Dasgupta, S. S., and McCallum, A. Measure-theoretic set representation learning. preprint from https://www.mboratko.com/mtsrl.pdf, 2022. +Chen, L., Cao, J., Wang, Y., Liang, W., and Zhu, G. Multi-view graph attention network for travel recommendation. Expert Systems with Applications, 191:116234, 2022. ISSN 0957-4174. doi: https://doi.org/10.1016/j.eswa.2021.116234. URL https://www.sciencedirect.com/science/article/pii/S0957417421015402. +Dasgupta, S., McCallum, A., Rendle, S., and Zhang, L. Answering compositional queries with set-theoretic embeddings, 2023. +Dasgupta, S. S., Boratko, M., Zhang, D., Vilnis, L., Li, X. L., and McCallum, A. Improving local identifiability in probabilistic box embeddings. In Advances in Neural Information Processing Systems, 2020. +Deldjoo, Y., Ferrari Dacrema, M., Constantin, M. G., Eghbal-Zadeh, H., Cereda, S., Schedl, M., Ionescu, B., and Cremonesi, P. Movie genome: alleviating new item cold start in movie recommendation. User Modeling and User-Adapted Interaction, 29(2): 291-343, April 2019. ISSN 0924-1868. doi: 10.1007/s11257-019-09221-y. URL https://doi.org/10.1007/s11257-019-09221-y. +Harper, F. M. and Konstan, J. A. The movielens datasets: History and context. ACM Trans. Interact. Intell. Syst., 5 (4):19:1-19:19, December 2015. ISSN 2160-6455. doi: + +10.1145/2827872. URL http://doi.acm.org/10. 1145/2827872. +He, X., Liao, L., Zhang, H., Nie, L., Hu, X., and Chua, T.-S. Neural collaborative filtering. In Proceedings of the 26th International Conference on World Wide Web, WWW '17, pp. 173-182, Republic and Canton of Geneva, CHE, 2017. International World Wide Web Conferences Steering Committee. ISBN 9781450349130. doi: 10.1145/3038912.3052569. URL https://doi.org/10.1145/3038912.3052569. +He, X., Deng, K., Wang, X., Li, Y., Zhang, Y., and Wang, M. Lightgen: Simplifying and powering graph convolution network for recommendation. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR '20, pp. 639-648, New York, NY, USA, 2020. Association for Computing Machinery. ISBN 9781450380164. doi: 10. 1145/3397271.3401063. URL https://doi.org/ 10.1145/3397271.3401063. +Hu, Y., Koren, Y., and Volinsky, C. Collaborative filtering for implicit feedback datasets. In Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, ICDM '08, pp. 263-272, 2008. +Kipf, T. N. and Welling, M. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2017. URL https://openreview.net/forum?id=SJU4ayYgl. +Koren, Y. and Bell, R. Advances in Collaborative Filtering, pp. 77-118. Springer US, Boston, MA, 2015. ISBN 978-1-4899-7637-6. doi: 10.1007/978-1-4899-7637-6_3. URL https://doi.org/10.1007/978-1-4899-7637-6_3. +Levy, O. and Goldberg, Y. Neural word embedding as implicit matrix factorization. Advances in neural information processing systems, 27, 2014. +Li, X., Vilnis, L., Zhang, D., Boratko, M., and McCallum, A. Smoothing the geometry of probabilistic box embeddings. *ICLR*, 2019. +Malaviya, C., Shaw, P., Chang, M.-W., Lee, K., and Toutanova, K. Quest: A retrieval dataset of entity-seeking queries with implicit set operations, 2023. URL https://arxiv.org/abs/2305.11694. +Mei, L., Mao, J., Guo, G., and Wen, J.-R. Learning probabilistic box embeddings for effective and efficient ranking. In Proceedings of the ACM Web Conference 2022, WWW '22, pp. 473-482, New York, NY, USA, 2022a. Association for Computing Machinery. ISBN 9781450390965. + +doi: 10.1145/3485447.3512073. URL https://doi.org/10.1145/3485447.3512073. +Mei, L., Mao, J., Guo, G., and Wen, J.-R. Learning probabilistic box embeddings for effective and efficient ranking. In Proceedings of the ACM Web Conference 2022, WWW '22, pp. 473-482, New York, NY, USA, 2022b. Association for Computing Machinery. ISBN 9781450390965. doi: 10.1145/3485447.3512073. URL https://doi.org/10.1145/3485447.3512073. +Mikolov, T., Chen, K., Corrado, G., and Dean, J. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781, 2013. +Pennington, J., Socher, R., and Manning, C. D. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp. 1532-1543, 2014. +Ren, H., Hu, W., and Leskovec, J. Query2box: Reasoning over knowledge graphs in vector space using box embeddings. In 8th International Conference on Learning Representations. OpenReview.net, 2020. +Rendle, S., Krichene, W., Zhang, L., and Anderson, J. Neural collaborative filtering vs. matrix factorization revisited. In Proceedings of the 14th ACM Conference on Recommender Systems, RecSys '20, pp. 240-248, New York, NY, USA, 2020. Association for Computing Machinery. ISBN 9781450375832. doi: 10.1145/3383313.3412488. URL https://doi.org/10.1145/3383313.3412488. +Rogers, A., Drozd, A., and Li, B. The (too many) problems of analogical reasoning with word vectors. In Proceedings of the 6th Joint Conference on Lexical and Computational Semantics (*SEM* 2017), pp. 135-148, Vancouver, Canada, August 2017. Association for Computational Linguistics. doi: 10.18653/v1/S17-1017. URL https://aclanthology.org/S17-1017. +Sun, H., Arnold, A. O., Bedrax-Weiss, T., Pereira, F., and Cohen, W. W. Faithful embeddings for knowledge base queries. In Proceedings of the 34th International Conference on Neural Information Processing Systems, NIPS'20, Red Hook, NY, USA, 2020a. Curran Associates Inc. ISBN 9781713829546. +Sun, H., Arnold, A. O., Bedrax-Weiss, T., Pereira, F., and Cohen, W. W. Guessing what's plausible but remembering what's true: Accurate neural reasoning for question-answering. 2020b. +Vilnis, L., Li, X., Murty, S., and McCallum, A. Probabilistic embedding of knowledge graphs with box lattice measures. In Association for Computational Linguistics, 2018. + +Vrandecic, D. and Krötzsch, M. Wikidata: a free collaborative knowledgebase. Communications of the ACM, 57 (10):78-85, 2014. +Wang, X., He, X., Feng, F., Nie, L., and Chua, T.-S. Tem: Tree-enhanced embedding model for explainable recommendation. In Proceedings of the 2018 World Wide Web Conference, WWW '18, pp. 1543-1552, Republic and Canton of Geneva, CHE, 2018. International World Wide Web Conferences Steering Committee. ISBN 9781450356398. doi: 10.1145/3178876.3186066. URL https://doi.org/10.1145/3178876.3186066. +Wu, C., Shi, S., Wang, C., Liu, Z., Peng, W., Wu, W., Kong, D., Li, H., and Gai, K. Enhancing recommendation accuracy and diversity with box embedding: A universal framework. In Proceedings of the ACM on Web Conference 2024, WWW '24, pp. 3756-3766, New York, NY, USA, 2024. Association for Computing Machinery. ISBN 9798400701719. doi: 10.1145/3589334.3645577. URL https://doi.org/10.1145/3589334.3645577. +Wu, L., Yang, Y., Zhang, K., Hong, R., Fu, Y., and Wang, M. Joint item recommendation and attribute inference: An adaptive graph convolutional network approach. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR '20, pp. 679-688, New York, NY, USA, 2020. Association for Computing Machinery. ISBN 9781450380164. doi: 10.1145/3397271.3401144. URL https://doi.org/10.1145/3397271.3401144. +Xian, Y., Zhao, T., Li, J., Chan, J., Kan, A., Ma, J., Dong, X. L., Faloutsos, C., Karypis, G., Muthukrishnan, S., and Zhang, Y. Ex3: Explainable attribute-aware itemset recommendations. In Proceedings of the 15th ACM Conference on Recommender Systems, RecSys '21, pp. 484-494, New York, NY, USA, 2021. Association for Computing Machinery. ISBN 9781450384582. doi: 10. 1145/3460231.3474240. URL https://doi.org/ 10.1145/3460231.3474240. +Xu, Z., Qu, Y., Zhang, W., Liang, L., and zeng Chen, H. Inbox: Recommendation with knowledge graph using interest box embedding. ArXiv, abs/2403.12649, 2024. URL https://api.sementicscholar.org/CorpusID:268532286. +Zhang, S., Liu, H., Zhang, A., Hu, Y., Zhang, C., Li, Y., Zhu, T., He, S., and Ou, W. Learning user representations with hypercuboids for recommender systems. In Proceedings of the 14th ACM International Conference on Web Search and Data Mining, WSDM + +'21, pp. 716-724, New York, NY, USA, 2021. Association for Computing Machinery. ISBN 9781450382977. doi: 10.1145/3437963.3441768. URL https://doi.org/10.1145/3437963.3441768. + +Table 6: Test NDCG on ${D}_{U}^{\text{eval }}$ for selected models. + +
DatasetMFNEUMFLGCNBOX
Last-FM0.510.520.560.65
NYC-R0.310.330.370.39
ML-1M0.510.530.550.58
ML-20M0.710.700.720.73
+ +# A. Experiment Details + +# A.1. Data Splits & Query Generation + +Algorithm 1 PERSONALISED SIMPLE QUERY $(u\cap a)$ generation algorithm $u\cap a$ + +1: Let the set of users, attributes, and movies be $\mathcal{U},\mathcal{A},\mathcal{M}$ +2: Marginal probability of an attribute $a$ in $A$ , $P(a) = \sum_{m} A_{a,m} / \sum_{a'} \sum_{m} A_{a',m}$ +3: Marginal probability of an user $u$ in $U$ , $P(u) = \sum_{m} U_{u,m} / \sum_{u'} \sum_{m} U_{u',m}$ +4: Marginal probability of an movie $m$ in $U$ , $P(m) = \sum_{u} U_{u,m} / \sum_{u} \sum_{m'} U_{u,m'}$ +5: Let $U$ be the User $\times$ Item matrix and $A$ be the Attribute $\times$ Item matrix. +6: $U^{Train} \gets U, A^{Train} \gets A$ +7: $U^{Eval}\gets \mathbf{0},A^{Eval}\gets \mathbf{0}$ +8: Set of simple personalized queries, $Q_{U \cap A} \gets \phi$ +9: while $|Q_{U \cap A}| < \text{MAX SAMPLE SIZE do}$ +10: Sample an attribute $a$ from $\mathcal{A}$ according to $P(a)$ . +11: Sample a movie $m$ from for the attribute $a$ , i.e., Sample from $\{m' | A_{a, m'} = 1\}$ , according to $P(m)$ +12: Sample a user $u$ from who has rated movie $m$ , i.e., Sample from $\{u'|U_{m,u'} = 1\}$ , according to $P(u)$ +13: $U_{u,m}^{Train} = 0, A_{a,m}^{Train} = 0, U_{u,m}^{Eval} = 1, A_{a,m}^{Eval} = 1$ +14: $Q_{U\cap A}.\mathrm{INSERT}((u,a,m))$ +15: end while + +# A.2. Training Details + +Table 5: Hyper Parameter range for all the dataset. We run 100 runs for both models and select the best model on User-Movie validation set NDCG metric + +
HyperparametersRange BoxBest Value BoxRange VectorBest Value Vector
Embedding dim6464128128
Learning Rate1e-1, 1e-2, 1e-3, 1e-4, 1e-50.0011e-1, 1e-2, 1e-3, 1e-4, 1e-50.001
Batch Size64, 128, 256, 512, 102412864, 128, 256, 512, 1024128
# Negatives1, 5, 10, 20201, 5, 10, 205
Intersection Temp10, 2, 1, 1e-1, 1e-2, 1e-3, 1e-52.0--
Volume Temp10, 5, 1, 0.1, 0.01, 0.0010.01--
Attribute Loss const0.1, 0.3, 0.5, 0.7, 0.90.70.1, 0.3, 0.5, 0.7, 0.90.5
+ +Hyperparameters are reported in Table 5. Best parameter values are reported for Box Embeddings and MF method. + +Algorithm 2 PERSONALISED COMPLEX QUERY Generation Algorithm + +1: Compositional Query sets $Q_{U \cap A_1 \cap A_2}$ , $Q_{U \cap A_1 \cap \neg A_2}$ +2: Non-Trivial attribute combination set $\mathcal{A}$ +3: for each user-movie tuple in Eval set, i.e., $(u,m)\in$ $\{(u,m)|U_{u,m}^{Eval} = 1\}$ do +4: for each pair of attributes $(a_{1}, a_{2}) \in \{(a_{1}, a_{2}) | A_{a_{1}, m}^{Eval} = 1$ and $A_{a_{2}, m}^{Eval} = 1\}$ do +5: if the pair is viable and non-trivial, i.e., $(a_{1},a_{2})\in$ $\mathcal{A}_{\cap}$ then +6: $Q_{U\cap A_1\cap A_2}.\mathrm{INSERT}((u,a_1,a_2,m))$ +7: end if +8: end for +9: for each pair of attributes $(a_{1}, a_{2}) \in \{(a_{1}, a_{2}) | A_{a_{1}, m}^{Eval} = 1$ and $A_{a_{2}, m} = 0\}$ do +10: if the pair is viable and non-trivial, i.e., $(a_{1},a_{2})\in$ Athen +11: $Q_{U\cap A_1\cap \neg A_2}.\mathrm{INSERT}((u,a_1,a_2,m))$ +12: end if +13: end for +14: end for + +# A.3. Model Selection + +# A.4. Set-Theoretic Generalization + +Table 7: Hit Rate(%)↑ for Set-theoretic queries for dataset ML-20M. + +
MethodsU∩AU∩A1∩A2U∩A1∩A2
h@10h@20h@50h@10h@20h@50h@10h@20
MF-FILTER4.68.116.10.41.02.93.76.6
MF-PRODUCT4.17.515.63.36.616.42.75.1
MF-GEOMETRIC0.10.30.60.00.00.00.31.4
NEUMF-FILTER4.68.216.11.15.66.44.97.3
NEUMF-PRODUCT4.68.216.14.18.522.14.36.9
BOX-FILTER4.68.116.111.021.842.34.67.7
BOX-PRODUCT4.58.216.111.121.842.54.37.1
BOX-GEOMETRIC4.58.116.211.021.842.46.412.8
+ +# A.5. Spectrum of Weak Generalization + +Table 8: The spectrum of generalization for SIMPLE PERSONALIZED QUERY $U\cap A$ .W:WEAKEST GENERALIZATION,W-U: WEAK GENERALIZATION-USER, W-A: WEAK +GENERALIZATION-ATTRIBUTE, S: SET THEORETIC GENERALIZATION + +
MethodsHit Rate @10Hit Rate @ 20Hit Rate @ 50
W | W-U | W-A | SW | W-U | W-A | SW | W-U | W-A | S
MF-FILTER24.7 | 6.7 | 13.0 | 5.036.3 | 13.3 | 20.7 | 10.254.2 | 30.1 | 33.3 | 22.3
MF-PRODUCT23.3 | 5.7 | 13.1 | 4.335.0 | 10.8 | 21.4 | 8.554.7 | 24.2 | 38.8 | 20.4
MF-GEOMETRIC4.9 | 10.9 | 1.8 | 0.47.9 | 11.7 | 3.3 | 0.915.1 | 14.5 | 7.4 | 3.0
BOX-FILTER24.1 | 13.0 | 16.4 | 11.734.5 | 22.3 | 24.6 | 19.150.5 | 40.5 | 37.6 | 32.3
BOX-PRODUCT25.2 | 13.6 | 13.9 | 10.035.2 | 21.5 | 21.9 | 16.752.2 | 38.4 | 38.3 | 31.5
BOX-GEOMETRIC25.4 | 14.7 | 14.8 | 11.035.6 | 23.3 | 23.5 | 18.352.2 | 40.8 | 40.5 | 34.1
+ +![](images/f14b0b01edf638b0a536751e7a5afe24d11f67dd892ef3e749fac19899704b41.jpg) +Figure 3: Parallel Co-ordinate plot for different hyperparameters vs model performance. Lighter the color, better the model's performance. + +Table 9: The spectrum of generalization for COMPLEX PERSONALIZED QUERY $U\cap A_1\cap \neg A_2$ .W: WEAKEST GENERALIZATION, W-U: WEAK GENERALIZATION-USER, W-A: WEAK GENERALIZATION-ATTRIBUTE, S: SET THEORETIC GENERALIZATION + +
MethodsHit Rate @10Hit Rate @ 20Hit Rate @ 50
W | W-U | W-A | SW | W-U | W-A | SW | W-U | W-A | S
MF-FILTER25.5 | 13.0 | 12.4 | 4.734.9 | 14.1 | 19.5 | 9.854.7 | 29.5 | 37.1 | 22.5
MF-PRODUCT23.5 | 7.0 | 10.4 | 3.434.9 | 12.8 | 18.0 | 7.354.5 | 27.5 | 35.0 | 19.3
MF-GEOMETRIC5.2 | 2.0 | 1.7 | 0.58.8 | 3.5 | 1.9 | 1.017.4 | 8.8 | 6.5 | 2.7
BOX-FILTER24.1 | 15.3 | 15.0 | 11.435.5 | 22.7 | 21.1 | 19.554.1 | 39.2 | 37.3 | 34.0
BOX-PRODUCT21.1 | 13.7 | 12.0 | 8.930.5 | 21.7 | 19.3 | 15.247.4 | 38.0 | 35.0 | 29.4
BOX-GEOMETRIC21.1 | 13.2 | 10.8 | 8.630.4 | 20.8 | 17.7 | 15.147.3 | 36.6 | 33.2 | 31.0
+ +Table 10: The spectrum of generalization for COMPLEX PERSONALIZED QUERY $U\cap A_1\cap A_2$ .W: WEAKEST GENERALIZATION, W-U: WEAK GENERALIZATION-USER, W-A: WEAK GENERALIZATION-ATTRIBUTE, S: SET THEORETIC GENERALIZATION + +
MethodsHit Rate @10Hit Rate @ 20Hit Rate @ 50
W | W-U | W-A | SW | W-U | W-A | SW | W-U | W-A | S
MF-FILTER35.3 | 17.6 | 16.9 | 11.445.0 | 27.3 | 23.3 | 17.955.2 | 41.9 | 30.5 | 27.5
MF-PRODUCT34.0 | 11.0 | 11.6 | 15.147.3 | 19.6 | 20.1 | 10.667.4 | 38.5 | 39.3 | 26.1
MF-GEOMETRIC6.13 | 3.1 | 10.3 | 10.19.90 | 5.8 | 0.6 | 10.218.5 | 12.9 | 1.8 | 0.8
BOX-FILTER30.8 | 21.5 | 17.3 | 14.541.1 | 31.2 | 23.3 | 20.552.7 | 44.5 | 30.3 | 28.5
BOX-PRODUCT35.4 | 23.8 | 13.4 | 10.647.0 | 34.5 | 21.7 | 17.864.6 | 52.8 | 39.0 | 34.2
BOX-GEOMETRIC34.6 | 25.2 | 20.0 | 16.845.7 | 35.7 | 30.5 | 26.662.6 | 53.3 | 50.1 | 46.1
+ +The BOX-GEOMETRIC achieves the best Generalization Spectrum Gap for all types of queries. + +# B. Error Compounding Analysis + +We further perform more granular analysis amongst the Box based methods with complex query type $U \cap A_1 \cap A_2$ . + +![](images/19c85c48e1a4d24e0e1d0a62977db5b4281c368230871892776053152efd2023.jpg) +Figure 4: Weak Generalization Illustration + +![](images/73d9b52cbfb503dee9dc68e5db36aba19b6c0365aa9281b7879cea4b505d4324.jpg) +Figure 5: Relationships of correct answers by the three box models on $u \wedge a_1 \wedge a_2$ queries. + +As claimed in our initial hypothesis, the FILTER method suffers from error compounding. If the target movie $m$ is + +![](images/9ff4677b025426a58c613e55e8715d217de53e24d79652218a6d4f5e15dd3b5a.jpg) +Box-Filter Compounding Error + +![](images/bb492a3430221f454d15a878623a7538fb9d7070d52c63506b191ed51df5dcae.jpg) +Figure 6: The Geometric method subsumes the benefit of the product in compounding error. +Box-Filter not Compounding Error +Figure 7: The effect is less for the non-compounding error. + +in the model's prediction list for $A_{1}$ but not for $A_{2}$ or the other way round, we denote this error as compounding error. In figure 6, out of the compounding errors, $34\%$ is solved by the BOX-GEOMETRIC method and $26\%$ by the BoxPRODUCT method. However, in figure 7, for the error that is not due to compounding (where the model gets both $A_{1}$ and $A_{2}$ prediction wrong), only $18\%$ are corrected by the BOX-GEOMETRIC method and a mere $10\%$ of them are corrected by BOX-PRODUCT. Refer to figure 5 6 7 for details. This demonstrates that the BOX-GEOMETRIC significantly contributes to the correction of error compounding. + +# C. Time Efficiency analysis + +Table 11: Training time (mm:ss) for a single epoch are measured for different batch sizes with 5 negative samples on Movielens-1M dataset. Experiments are conducted on Nvidia GTX 1080Ti gpus + +
Batch SizeMFNEUMFLIGHTGCNBOX
6408:3717:0070:3019:32
12804:3209:4638:4011:40
25602:2904:4020:5505:28
51201:1802:2310:4702:54
102400:4001:2005:2401:12
+ +In Table 11, we observe that the MF, being the simplest approach with minimal computational requirements, is consistently the fastest across all batch sizes. At the largest batch size (1024), it achieves the shortest training time of just 00:40. The Box-based method exhibits training times comparable to NEUMF. However, it is significantly faster than LIGHTGCN, which relies on graph convolutional computations. The iterative message-passing operations required by LIGHTGCN result in considerably higher training times, particularly at smaller batch sizes (e.g., 70:30 at a batch size of 64). As the batch size increases, the training time for Box embeddings becomes almost as efficient as MF. For instance, at a batch size of 1024, Box achieves a training time of 01:12, compared to 00:40 for MF. This demonstrates that the computational complexity of box embeddings is of the same order as MF, making it a scalable and efficient choice. + +Box embeddings are generally quite fast because the computation of box intersection volumes can be parallelized over dimensions. Note that the training times above use Gumble-Box embeddings, which involve log-sum-exp calculations. However, this could be improved even further at inference time by replacing these soft min and max approximations with hard operators. If such an optimized approach is desired, then training can accommodate this by regularizing temperature. For deployment in industrial set-up, we could take additional steps with Box Embeddings as outlined in (Mei et al., 2022b). \ No newline at end of file diff --git a/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/images.zip b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ac57f7fe07ad0aee4b82804c759af33e7637a64f --- /dev/null +++ b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fc1c810bb8b3a8dd1a4c4642bc3524d00dd7acf1b076005cc13a6a41cfcd082 +size 728338 diff --git a/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/layout.json b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8f8eb8501877a5d5a5c34992580e3a0b3ac68327 --- /dev/null +++ b/ageometricapproachtopersonalizedrecommendationwithsettheoreticconstraintsusingboxembeddings/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e6eced13765e7084cf1b93ff53acc30b6131dc58f3d1959f6456bc0651471d3 +size 722885 diff --git a/ahitchhikersguidetoscalinglawestimation/31954b9f-7f2b-41bd-8848-53cd31f469bb_content_list.json b/ahitchhikersguidetoscalinglawestimation/31954b9f-7f2b-41bd-8848-53cd31f469bb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..62d0b5147f1931c3f81b32b3c63110d888ef07ac --- /dev/null +++ b/ahitchhikersguidetoscalinglawestimation/31954b9f-7f2b-41bd-8848-53cd31f469bb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef0075d141d017e1e9d6128973c265ce84b9ae36134fee355867c34971e36de6 +size 109828 diff --git a/ahitchhikersguidetoscalinglawestimation/31954b9f-7f2b-41bd-8848-53cd31f469bb_model.json b/ahitchhikersguidetoscalinglawestimation/31954b9f-7f2b-41bd-8848-53cd31f469bb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e78ff705b1dc8b9c17200691c6d7631c55e94636 --- /dev/null +++ b/ahitchhikersguidetoscalinglawestimation/31954b9f-7f2b-41bd-8848-53cd31f469bb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a85668eea14a760f0ce96b79cab4b1e012320d916087d842c614bcea55771fc +size 139955 diff --git a/ahitchhikersguidetoscalinglawestimation/31954b9f-7f2b-41bd-8848-53cd31f469bb_origin.pdf b/ahitchhikersguidetoscalinglawestimation/31954b9f-7f2b-41bd-8848-53cd31f469bb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..06b7c0936599c98b8e373914c0d92c4b09a311a1 --- /dev/null +++ b/ahitchhikersguidetoscalinglawestimation/31954b9f-7f2b-41bd-8848-53cd31f469bb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c32e05c1836cefd8d01bdf3ab6ffe711ada335412cd032dc71dac673e822f0a +size 1073334 diff --git a/ahitchhikersguidetoscalinglawestimation/full.md b/ahitchhikersguidetoscalinglawestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d051dd6adb20faf597b71b3a123fb1daef67402b --- /dev/null +++ b/ahitchhikersguidetoscalinglawestimation/full.md @@ -0,0 +1,461 @@ +# Leshem Choshen $^{123}$ Yang Zhang $^{23}$ Jacob Andreas + +# Abstract + +Scaling laws predict the loss of a target language model by extrapolating from easier-to-train models with fewer parameters or smaller training sets. This provides an efficient way for practitioners and researchers alike to choose optimizers, datasets, and model architectures. Despite the widespread use of scaling laws to model the dynamics of language model training, there has been little work on understanding how to best estimate and interpret them. We collect (and release) a large-scale dataset containing losses and downstream evaluations for 485 previously published pretrained models. We use these to estimate more than 1,000 scaling laws, then derive a set of best practices for estimating scaling laws in new model families. We find that fitting scaling laws to intermediate checkpoints of training runs (and not just their final losses) substantially improves accuracy, and that—all else equal—estimates of performance are generally most accurate when derived from other models of similar sizes. However, because there is a significant degree of variability across model seeds, training multiple small models is sometimes more useful than training a single large one. Moreover, while different model families differ in scaling behavior, they are often similar enough that a target model's behavior can be predicted from a single model with the same architecture, along with scaling parameter estimates derived from other model families.1 + +# 1. Introduction + +Substantial effort and cost are required to train even a single large language model (LLM), and even greater cost and effort are required to evaluate proposed changes to language + +$^{1}$ MIT $^{2}$ MIT-IBM Watson AI Lab $^{3}$ IBM Research. Correspondence to: Leshem Choshen . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +1See our repository for code, data, and experimental results. + +![](images/d2e1758a0ca65f3f022cc3c2053e4bbcb0592cde42df5e1b94b05d3886e8075d.jpg) +Figure 1: Illustration of a scaled family, an estimated scaling law, and its prediction error for a target model. + +models' architecture or training data. There is thus an acute need for efficient decision-making aids that can evaluate new methods without full-scale training. A large body of work motivates or evaluates these changes using small models (Warstadt et al., 2023; Hu et al., 2024a; Hillier et al., 2024), synthetic tasks (Akyurek et al., 2024; Wortsman et al., 2023) or theory (Jelassi et al., 2024). But one of the most important tools for current practitioners is the estimation of scaling laws for LLMs (Ivgi et al., 2022; Dubey et al., 2024). + +A scaling law extrapolates the performance of a target model from the performance of a set of models with fewer parameters or smaller training sets. Typically, this requires models to belong to the same model family, differing only in parameter count and training size, but using the same architecture and training distribution. A high-quality scaling law accurately predicts the target model's test performance (Rosenfeld et al.; Kaplan et al., 2020; Hoffmann et al., 2022). Most past work fixes a model family and exhaustively trains models to relate scale and performance through a new scaling law. One question that has received comparatively little attention is how to create such laws in the first place. + +This paper offers a practical guide to when, how and which small models to use, to efficiently obtain meaningful predictions about large models' behavior—maximizing prediction reliability while minimizing the budget for preliminary ex + +perimentation, which necessarily involves tradeoffs between the number of preliminary models trained, the size of the largest preliminary model, and size of the dataset used to train it. To answer those questions one requires analysis across model families and scaling law procedures. + +We begin by collecting data to perform a large-scale meta-analysis of scaling laws (§3). Usually, scaling law research relies on a single collection of closely related models, or alters only a minimal aspect of pretraining (e.g. data size; Muennighoff et al., 2024). We instead gather a large and diverse set of scaled families, to allow this and future meta-analysis of scaling laws that generalize across architectures, datasets and settings. + +The rest of the paper uses this data to analyze a number of key questions around scaling law estimation: + +1. What reliability is achievable and expected from scaling laws? Variation between LLM initializations produce unpredictable changes of up to $4\%$ in loss. Most published controlled experiments on pretraining decisions, report changes between $4\%$ and $50\%$ ( $\S 4$ ). +2. How much does the shape of scaling laws vary across model families? Different model families have scaling laws with a different functional dependence on model size. However, transformer LLMs are similar enough that, with a single model from a target family and a scaling law from a different model family, it is sometimes possible to accurately estimate target model performance. (§5). +3. Must scaling laws be estimated only from fully trained models? Even though optimization procedures are typically sensitive to the full size of a training run, (unprincipled) estimation of scaling laws from intermediate training checkpoints greatly improves scaling law fit ( $\S 6$ ). It is generally possible to estimate a model's final loss beginning roughly $1/3$ of the way through training. +4. How large must models be to produce reliable scaling laws? All else equal, experimenting with large models is typically more useful than with small models (§7), but may be outweighed by the benefits of reduced variance from training more, smaller models (§8). +5. Taken together, cost-effective estimation of a scaling law should consider the number of models, the size of the models, and the number of training tokens for each model. We highlight those size, tokens and number of models effects in Fig. 2. + +Our experiments also provide insight into the functional form of scaling laws themselves, suggesting that they may have fewer degrees of freedom than typically assumed (§9). We conclude with discussion of other work on scaling law estimation that may be of interest to practitioners (§10). + +# 2. Defining a scaling law + +A scaling law estimates the loss of a costly model by training cheaper ones (see Fig. 1) typically with fewer parameters (#params) and training tokens (#toks). A scaling law is a function that predicts a target model's loss on held-out data when setting the value of one hyperparameter (Kaplan et al., 2020) or both (Rosenfeld et al.; Hoffmann et al., 2022). Comparing laws' predictions about different pretraining choices (e.g. data Ge et al., 2024) allows informed decisions about which large-scale model to train. A scaling law also enables finding the optimal choice of hyperparameters under computational constraints on pretraining (Hoffmann et al., 2022) or inference (Touvron et al., 2023; Sardana et al.). + +Formally, we call a model $f$ any single neural language model with a specific set of parameters. Different seeds, or even different checkpoints from the same training run, correspond to different models. We define a scaled model family $F$ as a set of models, with each $f \in F$ differing only in size $\# \text{params}(f)$ and number of tokens $\# \text{toks}(f)$ . We note that a change in size is usually applied in a systematic manner that affects the number of attention heads, width, depth and such network characteristics that in all our data changes with it in a one-to-one mapping. + +Two subsets of scaled model families will be especially important in our analysis. First, the maximal parameter family $F_{\max P}$ contains only models with the largest number of parameters. Formally, define $m = \max_{f \in F} \# \mathsf{params}(f)$ ; then $F_{\max P} = \{ f \in F : \# \mathsf{params}(f) = m \}$ . $F_{\max P}$ will generally contain the target model(s) whose behavior we wish to predict $t \in F_{\text{target}}$ . Second, the q-maximal token family $F_{\# tok > q}$ contains all models trained on at least a $q$ -sized fraction of the training set. Formally, define $t = q \cdot (\max_{f \in F} \# \mathsf{toks}(f))$ ; then $F_{\# tok > q} = \{ f \in F : \# \mathsf{toks}(f) \geq t \}$ . Note that this definition does not distinguish between partially trained models, and models trained to convergence on a subset of the training set. These two types of models generally differ, but as current theory does not predict in what manner and the former are cheap substitutes, we test empirically if those are similar enough to make good predictions in Section 6. + +A scaling law $\hat{L}(f \mid F)$ estimates the performance of a new model $f$ given a model family $F$ . (We will simply write $\hat{L}(f)$ when the family is clear from the context.) All experiments in this paper use the widely used functional form proposed by Hoffmann et al. (2022): + +$$ +\hat {L} (f) := e ^ {E} + \frac {e ^ {A}}{\# \operatorname {p a r a m s} (f) ^ {\alpha}} + \frac {e ^ {B}}{\# \operatorname {t o k s} (f) ^ {\beta}}. \tag {1} +$$ + +Here $E$ captures the scaled family's general performance; $A, \alpha$ and $B, \beta$ describe the scaling effect of #params and #toks respectively. The parameters are in an exponent to ensure positivity, i.e., more training data improves the + +![](images/d5160cc595f4b0b6aaa48ca353fc576578018c92d9b89cf7969f965522f01a9d.jpg) + +![](images/c2510456f57f777e0a631501beb5b28b0031436771f04692831b274be5d49b06.jpg) + +![](images/891283723e708e40c9c6d9ded556d803ff0138e33c37bf4f009497211ca81dda.jpg) + +![](images/0f028ab9518c4779f39be72e2bc44fd50d5ba8aba28816e20ea927d4de0eaba0.jpg) +(a) Scale up vs. Train Percentage + +![](images/0c2512ff12ddb9974e07b9c69b9c9c26f46628ea97589b79e5d0525f16d1f633.jpg) +(b) #Models vs. Train Percentage + +![](images/865fdb4adf81329cb78d45f15da90975874c685de4d04609a34b1d7cdca9f69c.jpg) +(c) #Models vs. Scale up predicted +Figure 2: The effects of 3 variables on scaling law accuracy. Each cell corresponds to a single scaling law estimated from a set of model checkpoints $F_{train}$ , with the color denoting the error when predicting the largest model. Each column shows a subset of the three axes along which these training sets differ: (1) the number of tokens used to train each LM in $F_{train}$ (expressed as a fraction of the full training corpus), (2) the number of distinct models trained; and (3) the size of the largest model trained (expressed as a scale-up factor—the ratio between the target model and the largest model in $F_{train}$ ). In (a), all laws are estimated from four models. In (c) all laws use the full corpus. Orange lines show iso-FLOP contours (sets of scaling laws whose training sets require the same computational cost to produce). $\star$ represent the most efficient ways to obtain $15\%$ , $10\%$ and $5\%$ ARE. One of the most immediate conclusions from these plots is that scaling law estimation is quite noisy—the inclusion of a single badly-behaved model in the estimation procedure can produce large errors, and in small model families error does not reliably decrease with additional computation. However—because of noise—it is often preferable to extrapolate from a large number of small, partially trained models rather than a small number of large models. + +scaling. $^{2}$ These parameters are estimated by first collecting a set of training models $F_{\mathrm{train}}$ , then minimizing the reconstruction error + +$$ +\operatorname *{arg min}_{E,A,\alpha ,B,\beta}\sum_{f\in F_{\text{train}}}\left(\hat{L} (f) - L(f)\right)^{2} +$$ + +where $L(f)$ denotes the empirical negative log-likelihood of some held-out data under the model $f$ . + +In this sense, a scaling law is an ordinary parametric model, and we may ask many of the questions about $\hat{L}$ that we ask about LLMs themselves—what training data $(F_{\mathrm{train}})$ to collect? How to estimate accuracy? However, to provide empirical answers to these questions, we first require data. + +# 3. Data for 1000+ scaling laws and more + +As part of this work, we have collected and released the largest-scale public dataset describing scaling behavior across model families. This dataset aggregates information from a large number of LLM training efforts that have released information about the behavior of multiple models of different sizes or scales. While experiments in this paper focus on scaling laws that measure loss, the dataset also includes information about model performance on downstream evaluation benchmarks where available. We have focused on language models where the largest one is more than 3B parameters and where data was shared publicly or in private correspondence. Our repository accepts further contributions and requests for additions. In addition to those, we have manually extracted some data from papers that did not release models but reported losses in figures. + +Other data sources. We want to highlight other sources for data on model results. Resources on the training check + +points and dynamics are scarce and perhaps the only other collection of such will be in the data-limited babyLM models of 2025 (Charpentier et al., 2025). There are some efforts to collect large sets of downstream evaluations for models that have been useful in other works. Those include DoVE, which aims to collect all LLM evaluations (Habba et al., 2025), and data collected to create observational scaling laws (Maia Polo et al., 2024; Ruan et al., 2024). + +# 3.1. Data sources + +For each model in this dataset, we collect any downstream evaluation and loss during training that was reported, as well as $\# \mathrm{toks}$ for each, links to matching checkpoints when available, links to data sources, and information about computational cost (in FLOPs) and number of training epochs (i.e. passes over the training set). Each model is identified by a unique name, a type (e.g. llama), $\# \mathrm{toks}$ , $\# \mathrm{params}$ , architecture type (e.g. encoder-decoder), and seed. + +Models (families) in this dataset include Pythia (Biderman et al., 2023), OPT (Zhang et al., 2022, collected thanks to Xia et al., 2023; Biderman et al., 2023), OLMO (Groeneveld et al., 2024), Amber (Liu et al., 2023), K2 (LLM360 Team, 2024), Mamba (Liu et al., 2023), RedPajamas(Together, 2023)ModuleFormer mixture of experts (Shen et al., 2023), overtrained models (Gadre et al., 2024), Mamba, Llama and hybrid architecture variations from Poli et al. (2024), transformer architectures (Alabdulmohsin et al., 2022), Bloom (Le Scao et al., 2023), T5-Pile (Sutawika et al., 2024), Pandey (2024) models, GPT-family models with different data regimes (Muennighoff et al., 2024), Gopher (Hoffmann et al., 2022) and GPT-3 (Brown et al., 2020). + +The data consists of 1.9M steps of training evaluated on loss or perplexity, usually on multiple data sources belonging to 485 unique pretrained models, and more than 40 scaled families. We hope this will provide a useful resource for the community and plan to extend it further as models get released and their training dynamics are shared. We see such a resource as a facilitator to more research on model development (e.g. A/B testing), scaling laws, downstream scaling laws (Gadre et al., 2024; Ruan et al., 2024; Owen, 2024; Isik et al., 2024), training dynamics (Choshen et al., 2022) and more. + +# 3.2. Scaling law estimation + +In the rest of the paper, we present findings from estimating hundreds of scaling laws as follows: + +Fitting For each model family $F$ , we identify the maximal parameter family $F_{\mathrm{max}P}$ , and estimate a scaling law $\hat{L}$ using the remaining models $F_{\mathrm{train}} = F \setminus F_{\mathrm{max}P}$ . Estimation of scaling law parameters uses the curve_fit function in scikit-learn (Pedregosa et al., 2011), with square loss. + +We additionally experimented with an L-BFGS-based solver but found it to be less stable. It converged to similar results, but often did not converge, was slow and required multiple trials. Some past work has Huber loss to improve the robustness of estimates; we repeat the analysis from the main paper with Huber loss in §E and find the same trends as in our main analysis. We only estimate scaling laws for families that contain at least three models. + +Evaluation To evaluate estimated scaling laws reliably, we need to account for loss fluctuations during large-scale model training. Thus, we test against a few checkpoints near the end of training: we choose as target models $F_{\text{target}}$ the 30%-maximal token family from the set $F_{\#tok > 30\%}$ defined in the previous paragraph—that is, we take $F_{\text{target}} = F_{P,\#tok > 30\%}$ . We then report the mean absolute relative error (ARE) $\mathbb{E}_{f \in F_{\text{target}}} |L(f) - \hat{L}(f \mid F_{\text{train}})| / L(f)$ between the empirical loss $L$ and the loss $\hat{L}$ predicted by the scaling law. + +# 4. How well should scaling laws predict? + +$4\%$ is the best ARE typically obtained; ARE up to $20\%$ can still distinguish between many modeling choices. + +To establish how accurate a scaling law must be to be useful to practitioners, we first assess what changes in model accuracy have been considered meaningful in past work. We have surveyed experiments in the literature where an A/B test was performed, i.e., two models were trained similarly, manipulating one attribute to see how it affects scores. Empirically, we found no widely adopted modeling changes that were motivated with less than a $4\%$ relative difference between models. Additionally, reported variance across random restarts of the same model architecture reaches up to $3.5\%$ (c.f., §8; Sellam et al., 2021). We take this to mean that this is approximately the minimal effect size experimenters care, as well the minimal effect that can be reliably measured. Accordingly, this bounds the best goodness of fit we should expect or require of scaling laws. + +To offer several concrete points of comparison: Pythia 6.9B models fixed inconsistencies in their code and hence have two versions (c.f. App. B; Biderman et al., 2023) which differ in loss by $40\%$ . They also provide a data dedduplication A/B test that decreased loss by roughly $5\%$ . Gadre et al. (2024) tested the effect of training 400M parameter models for different $\# \mathrm{toks}$ . The smallest modification (doubling the number of training tokens) decreased loss by roughly $4\%$ , while $30\times$ more training tokens produced a $50\%$ loss difference. Instead of varying the amount of data or epochs, Ge et al. (2024) found that training on a different kind of data incurred ARE of approximately $10\%$ and different data mixes led to $6\%$ changes or less. + +![](images/d3931b131a6b764d5972475f84b41c60837aa729dde85d3185af3dbe3d8976de.jpg) +(a) Size parameters + +![](images/22399c277a9fa07570621b0c72a051c4f2d7cbda9bb0fed96b6b5b803969aa61.jpg) +(b) Token parameters +Figure 3: Parameters differ between scaled model families. Surprisingly, however, the pairs of parameters controlling the influence of model and training set size have similar ratios. The legend shows model architecture (left), scaling families (center) and per-family intercept (right). + +![](images/6b7fc785a0a3d830c7793fd94c99dcdcf132974025250fdebb5545e59454c4ec.jpg) +(c) Intercept + +# 5. When I train a new model, do I even need a new scaling law? + +Different model families exhibit different scaling behavior, but performance can sometimes be estimated using a single model in a new family. + +Scaling laws relate performance to scalar training parameters like model or dataset size. For discrete decisions (e.g. the choice of nonlinearity), it is unclear how to pool information across models that differ in these traits (see Ruan et al., 2024; Maia Polo et al., 2024, for concurrent work that performs this pooling based on downstream task behavior). Clearly, discrete choices affect loss of pretrained models with the same #params and #toks. But how do they affect the form of scaling laws? + +One way to answer this question is to look at the parameter estimates for scaling law parameters $E$ , $\alpha$ , $A$ , $\beta$ and $B$ differ across model families. These results are shown in Figure 3, where it can be seen that there are often dramatic differences in all five parameters across families. In this sense, even the rate at which additional data or parameters improve model performance depend on underlying architectural details, suggesting that understanding the behavior of a new model family may require a new scaling law. + +But another way to answer this is to ask how reliably we can predict final model accuracy when borrowing (or pooling) some parameters of scaling laws between families—even if these result in poor parameter estimates, they may predict large-scale model behavior within the range of meaningful differences identified in Section 4. To do so, we set the #params scaling parameters $(A, \alpha)$ to fixed values reported in past work, and estimate remaining parameters for individual model families. We take the variable values found by Muennighoff et al. (2024) (see Besiroglu et al., 2024; Porian et al., 2024 for a discussion of estimates from earlier work including Hoffmann et al., 2022). We find (see Fig. 6 in App. A) that in some cases only a single training run in a new model family is necessary to obtain accurate scaling law predictions. In the OLMO family, for example, we obtain + +less than $1\%$ error estimating the accuracy of a 7B model from a collection of 1B model checkpoints. We find that predictions generalize, and a constant #params scaling factor is enough for most models (except the encoder-decoder T5-Pile). However, error rates are larger than in the source family, and predictions for larger models are worse (most conspicuous in OPT's error of $37\%$ , $25\%$ and $15\%$ when extrapolating from 8.7B, 13B and 30B to 175B). + +# 5.1. Can I train the target model a bit instead of many small models? + +Yes, but obtaining reliable estimates in this way requires up to $30\%$ of the full training run. + +The above results (last row of Fig. 6 in App. A) also suggest the possibility of predicting losses not with just smaller models, but with partially trained versions of the target model itself. When predicting inside the same #params family—that is, estimating $\hat{L}(f \mid F_{\text {target }} \setminus \{f\})$ —the #params term in Equation (1) is constant, and extrapolation is only required for #toks. As seen in the figures, this form of estimation is informative if permitted by computational constraints. Beyond the immediate usefulness of this approach, it is a promising avenue for future research on alternatives to scaling the number of layers. + +# 5.2. Are even simpler baselines enough? + +Some extrapolation is necessary: scaling laws can produce accurate estimates even when the target model vastly outperforms any training model. + +To provide another form of comparison for the predicted scaling laws, we compute two baselines. Both baselines adopt a pessimistic evaluation assuming that the target model is no better than the best model in the small model family used to estimate a scaling law. Specifically, the baselines are the best performance $\hat{L} (\varnothing \mid F_{\mathrm{train}}) = \min_{f\in F_{\mathrm{train}}}L(f)$ and the performance of the most-trained model, consuming the most compute for train- + +![](images/be47176b0805878de2b271157a5a0968626e692dc0e3a668f66a6dee6489a354.jpg) +(a) OPT + +![](images/c6e615426d7f1b702bab2c591246526f04ca040092caf9dba992be6a981c4be3.jpg) +(b) GPT3 + +![](images/7b5bd8e798d7fd07ffbd19a5a56261e9ff97a224e50f681e6c8ff939a98da045.jpg) +(c) Pythia +Figure 4: The effect of fitting on more of the training trajectory. Each cell represents the absolute relative error estimating scaling laws from a given number of models (vertical axis) trained on a subset of the final checkpoints from a training run (so scaling laws on the left are estimated using all checkpoints, and on the right using only the final $10\%$ of checkpoints). White cells failed to fit. As long as the first $\approx 10\%$ of checkpoints are discarded, final loss can often be predicted accurately. + +ing, i.e. $\hat{L} (\emptyset \mid F_{\mathrm{train}}) = \arg \max_{f\in F_{\mathrm{train}}}\# \mathsf{params}(f)\times$ #toks(f). Those baselines might be the best one can expect without fitting a law to scaling. + +We find (See App. 5.2) that the best performance baseline is closer to $L(F_{\mathrm{target}})$ , which is to be expected, as the target model performance is better than any other model in $F$ and this is the better of the two. In both cases, even with the full $F$ , the baselines suffer more than $15\%$ error, mostly above $10\%$ , almost never get below $5\%$ , and $18\%$ ARE on average across all scaled families we study. + +# 6. I have some data; what portions should I use? + +Estimate scaling laws from intermediate checkpoints, not just fully trained models! + +Most past work on scaling behavior of language models (e.g., Gadre et al., 2024; Muennighoff et al., 2024) has trained a separate model for each value of #toks studied. This is based on the assumption that changes in the learning rate schedule, which depend on the size of the full dataset that will be used for training, render losses from intermediate checkpoints uninformative. + +However, some recent work has demonstrated the effectiveness of learning schedules that do not require prior access to the size of the training set (Hu et al., 2024b), and some work has questioned whether careful choice of the learning rate decay is even necessary for reliable scaling laws (Porian et al., 2024). Together, these findings motivate revisiting the assumption that only a single useful datapoint may be obtained from each training run. In §5.1, we observed the value of intermediate checkpoints when only a single #params family is used to fit a scaling law. In general, there may be differences between models trained on the same number of + +tokens and sizes depending on the choice of learning rate schedule. But it is unknown whether these differences are large enough to impact the estimation of scaling laws. We now test whether this finding extends to larger families—i.e. whether including intermediate checkpoints from all models in a model family reduces ARE. + +Results are shown in Figure 4, which plots ARE for scaling laws estimated from data subsets of the form $F_{\# tok > q}$ for varying $q$ . We find that including full training curves in scaling law estimation can predict losses well. In fact, relying merely on the end of training (left in Figure 4) produces significantly worse performance across the board. Our remaining experiments thus fit scaling laws using all these intermediate checkpoints, and not final performance alone. + +# 6.1. Should I use all intermediate checkpoints? + +Almost all, but drop very early checkpoints. + +In Fig. 4, we plot ARE for different $F_{\# tok > q}$ -maximal token families serving as $F$ , i.e., when fitting only with the end of training runs. There is not a clear trend indicating whether we should use all data (as might be suggested by GPT-3 results alone) or only some of it. But it is rarely the case that best estimates are obtained from the end of training alone. + +There is, however, a distinctly uninformative phase at the beginning of training, as can be seen in the loss curves (App. B) and noted in the literature (e.g., Chen et al.). We observe that this period is more likely to contain significant spikes or an increase in loss (worse performance) despite additional training. We hence hypothesize this part should always be removed from data used to estimate scaling laws. + +Indeed, our experiments depicted in Fig. 5 compare scaling law AREs with and without including models trained on less than 10B tokens in $F$ . Evidently, the very beginning + +of training (often not even reported in logs and graphs) is sometimes harmful to the prediction. Specifically, we run the same experiments with and without ignoring the first 10B tokens seen. We find that for some models (e.g., OPT and Pythia) the ARE exceeds $15\%$ even when using the whole data, but drops to $4 - 10\%$ when ignoring those tokens. In preliminary experiments, we found that cutting fewer tokens gave noisier results, and cutting more had a negligible effect. + +# 7. How big a model should I train? + +Larger models are better, but not necessary. Mainly, beware of specific models that might give noisy results. + +In Figure 2 we compare scaling laws when controlling the amount, percentage, or size of the models (2 at a time). We find that choosing models closer in #params to the target model is generally effective (e.g., Fig. 2a, 2c), but the effect is neither strong nor monotonic. For example, in all cases fitting on all $F$ provides one of the lowest ARE. However, in GPT, Gopher and OPT, predicting with the smallest 4 models available is already enough to achieve less than $10\%$ error. In Pythia, the smallest models are not predictive but the rest of the models provide a similar fit. While relying on a larger model is beneficial, predicting many scales up (e.g., the behavior of a $34\times$ larger model in Pythia) is still reliable, especially if accounting for other factors we discuss next. + +In fact, training additional, larger models before fitting a scaling law may sometimes decrease accuracy due to increased variance in large model performance—see, for example, Pythia 2.8B in Fig. 1. Unfortunately, it is difficult to identify whether a seed is exceptionally high or low-performing without additional information. For example, cross-validation on $F$ fails to detect it (see App. D). + +Instead, this instability can be addressed by accounting for seed variability. A wasteful way to do so would be to train every model several times. A better alternative is to diversify and train each model on as differing hyperparameters as possible and to maximize the information gained (a common practice in efficiency-coverage scenarios, e.g., Perlitz et al., 2024). Hence, we suggest training more models of differing sizes each accounting for both size and seed changes, rather than training multiple seeds. We further discuss the effects of number of models $(|F|)$ in $\S 8$ . + +Given the choice of the largest model and the number of models, it is unclear how to optimally space the model sizes, whether linearly, log-scale, or otherwise. We leave that optimization problem for future work. + +![](images/1435fc0a78544393f19763ba8e5e3785e285bacd5aba4c7b39faf1b1b8e2405d.jpg) + +![](images/572cf7d4184dbeb74734764037b94bea8ff099a94f5dcf7e2f3e9db8f37f480b.jpg) + +![](images/d1dc230c53e8909859ff73b7df80942da1a4a1ec8620f90a6e29d288aaab5e6d.jpg) +(a) Cut 10B first tokens + +![](images/0f3a9dad14c694f41b2255765a21c0881800be2876191d1511182137c3a485d0.jpg) +(b) Fit all data +Figure 5: The effect of fitting with/without the beginning 10B tokens seen. Each cell represents the absolute relative error when estimating a scaling law from a given number of models (vertical axis) trained on a given subset of checkpoints from the beginning of training (horizontal axis). + +# 8. How many models for reliable predictions? + +5 models is a safe bet, more would improve the results' robustness. These models can be small. + +We have seen that predicting with larger models and hence extrapolating less yields better results. However, given compute constraints (and additional hardware constraints like memory), practitioners may generally wish to use smaller models when possible. Consider for example Fig. 2b where we compare fitting on 4 models but vary their size. We find that more models reduce ARE even without being bigger models. As discussed in §7, adding a larger model to a current scaled family serves two goals, it increases the proximity to the predicted model, as well as increases the number of models seen. + +We separate the contribution of size and number of models. In Fig. 2c, we predict with the largest model being held constant and add (at minimal cost) smaller models. We see again that larger models do benefit predictions. For example, the small models part (left) of the graph indicates large errors (bright). However, we also see again the unwanted effects a single model may have on the overall prediction. Consider for example the figure's diagonal in Pythia. Cells in a diagonal share a group of models and each row adds another one to $F$ . Evidently this specific group hurts results, even when larger models are added to $F$ . With enough models (bottom of diagonal), the negative decreases. Switching the model (next column) also removes the negative effect. + +Moreover, across all rows the tendency is never monotonic, implying larger models do not not ensure better predictions. + +But in general, we see that increasing the number of models tends to improve prediction. For example, in GPT3 the best predictions are with many models. Perhaps intuitively, adding a larger model and improving both #params and number of models aspects improves quite consistently (Fig. 2b and diagonals of Fig. 2c). + +# 9. Are all scaling law parameters crucial? + +Scaling laws might have fewer degrees of freedom than described in the literature. + +Assuming we do not try to account for aspects other than #toks and #params (see §10), one might wonder if some of the observed errors come from model misspecification—an incorrect functional form for $\hat{L}$ , which (with a small number of exceptions including Caballero et al.) has generally gone uncontested since it was first proposed (Rosenfeld et al.; Hoffmann et al., 2022). Here we specifically evaluate whether scaling laws empirically exhibit fewer degrees of freedom than has been proposed. First, we compute the principal components of the 5 learned parameters and find that 3 components explain $99.49\%$ of the variance between the 5 parameters. Inspection reveals that two of these components tightly couple the pairs of parameters dealing with the same training parameter (#params and #toks). Plotting values of $A$ against $\alpha$ and of $B$ against $\beta$ (Fig. 3), we see a clear linear relationship between these variables despite their non-linear interaction in Eq. 1. There are a few exceptions: the Encoder-Decoder model T5-Pile shows a different behavior from the rest of the scaled families, and four additional scaled families show a different relationship between $B$ and $\beta$ . In fact, all these families share the common feature that they were trained using multiple passes over a single training set Gadre et al. (2024). The outlier point with $\beta > 4$ is a $70\mathrm{m}$ baseline of Pythia for a continual training intervention experiment (Biderman et al., 2023). Future work may consider different function forms tying some of the parameters or introducing other ones instead. + +Another function form change that future work should consider is accounting for the learning rate schedule, as our experiments assumed it was negligible, and previous works disregarded the training trajectory. A mismatch between the form and the real dependence might explain the inconsistencies in using the beginning of training. As noted in §6.1, the beginning is not fitting as well as later on. + +# 10. Related work + +This work builds on a large number of recent studies relating scaling law estimation and decision-making about + +model training. Among the aspects studied are total training costs including inference (Sardana et al.), effects of sophisticated data selection (Sorscher et al., 2022; Ge et al., 2024), training time (Inbar & Sernau, 2024), transfer of learned skills (Hernandez et al., 2021), behavior of models in other modalities (Mikami et al., 2022; Abnar et al.; Al-abdulmohsin et al., 2024; Hesslow et al., 2022) mixtures of experts (Ludziejewski et al.), data mixing (Ge et al., 2024), downstream performance (Muennighoff et al., 2024), vocabulary size (Tao et al., 2024), and architecture comparisons (Tay et al., 2023; Poli et al., 2024) including small models (Muckatira et al., 2024) or other phenomena like finetuning (Zhang et al.) and the loss in different positions in the training sequences (Xiong et al., 2024). Especially relevant to our context is Ruan et al. (2024); Maia Polo et al. (2024) that rely on multiple pretraining settings for creating scaling laws that generalize across models or kinds of losses. + +Another line of works that can be seen as a scaling law discusses the relation between model width and hyperparameter choices (rather than loss) (Yang et al., 2022; 2021; Blake et al., 2024; Lingle, 2024). + +# 11. Limitations + +Our primary metric, ARE, does not distinguish between over- or under-estimation of performance. When using scaling laws to choose between candidate models to train, these error estimates may be unnecessarily conservative (e.g. if both families' laws are biased in the same direction). + +Another difficulty is aggregating information across model families. As most published families evaluate models of incomparable scales, often over incomparable ranges, we were unable to produce an informative version of Figure 2 that aggregated information across all models available, and was thus able to give general recommendations about computoptimal choice of preliminary experiments. + +# 12. Discussion + +This paper provides a first study of open questions in the estimation of scaling laws and their relation to large-scale pretraining decisions. We expect that many of these conclusions could be sharpened or extended with the availability of additional information about model training, and we call on other leaders of large-scale training efforts to share training losses and evaluation results from multiple checkpoints during pretraining—even in cases where model parameters themselves cannot be released. + +Our findings leave open many important questions, from efficient predictions by fitting on many model families to scaling laws of the deltas between a/b test (e.g. on optimizer choice), and to other methods that efficiently compare archi + +tectures without relying on multiple models (e.g. continual learning). In addition, our results in §9 suggest other scaling law parameterizations might better fit data. + +# Practical recomendations + +$\S 4$ Set an estimation goal and a budget. +$\S 5.1$ If budget allows, train the whole model for $30\%$ . +$\S A$ If extremely constrained, predict from one model. +$\S 6$ Use all training losses (except the beginning). +$\S 7$ Train as big as possible, but limit tokens. +$\S 7$ Train more models, not just larger ones. + +# Impact Statement + +This paper presents work whose goal is to advance LLM research. There are many potential societal consequences of our work, most of which lean towards the positive, environmental (efficient), open, and collaborative aspects. Therefore, it is hard to imagine specific issues with the progress allowed by this work. + +# Acknowledgments + +This work was funded by the MIT-IBM Watson AI Lab, and by a Sloan Research Fellowship to JA. + +# References + +Abnar, S., Dehghani, M., Neyshabur, B., and Sedghi, H. Exploring the limits of large scale pre-training. In International Conference on Learning Representations. +Akyurek, E., Wang, B., Kim, Y., and Andreas, J. In-context language learning: Architectures and algorithms. arXiv preprint arXiv:2401.12973, 2024. +Alabdulmohsin, I. M., Neyshabur, B., and Zhai, X. Revisiting neural scaling laws in language and vision. Advances in Neural Information Processing Systems, 35:22300-22312, 2022. +Alabdulmohsin, I. M., Zhai, X., Kolesnikov, A., and Beyer, L. Getting vit in shape: Scaling laws for compute-optimal model design. Advances in Neural Information Processing Systems, 36, 2024. +Besiroglu, T., Erdil, E., Barnett, M., and You, J. Chinchilla scaling: A replication attempt, 2024. URL https:// arxiv.org/abs/2404.10102. +Biderman, S., Schoelkopf, H., Anthony, Q. G., Bradley, H., O'Brien, K., Hallahan, E., Khan, M. A., Purohit, S., Prashanth, U. S., Raff, E., Skowron, A., Sutawika, L., and Van Der Wal, O. Pythia: A suite for analyzing large language models across training and scaling. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J. (eds.), Proceedings of the 40th International + +Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 2397-2430. PMLR, 23-29 Jul 2023. URL https://proceedings.mlrpress/v202/biderman23a.html. +Blake, C., Eichenberg, C., Dean, J., Balles, L., Prince, L. Y., Deiseroth, B., Cruz-Salinas, A. F., Luschi, C., Weinbach, S., and Orr, D. u-mu p: The unit-scaled maximal update parametrization. arXiv preprint arXiv:2407.17465, 2024. +Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D. M., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., and Amodei, D. Language models are few-shot learners, 2020. +Caballero, E., Gupta, K., Rish, I., and Krueger, D. Broken neural scaling laws. In The Eleventh International Conference on Learning Representations. +Charpentier, L., Choshen, L., Cotterell, R., Gul, M. O., Hu, M., Jumelet, J., Linzen, T., Liu, J., Mueller, A., Ross, C., Shah, R. S., Warstadt, A., Wilcox, E., and Williams, A. Babylm turns 3: Call for papers for the 2025 babylm workshop, 2025. URL https://arxiv.org/abs/2502.10645. +Chen, A., Shwartz-Ziv, R., Cho, K., Leavitt, M. L., and Saphra, N. Sudden drops in the loss: Syntax acquisition, phase transitions, and simplicity bias in mlms. In The Twelfth International Conference on Learning Representations. +Choshen, L., Hacohen, G., Weinshall, D., and Abend, O. The grammar-learning trajectories of neural language models. In Muresan, S., Nakov, P., and Villavicencio, A. (eds.), Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 8281-8297, Dublin, Ireland, May 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.acl-long.568. URL https://aclanthology.org/2022.acl-long.568. +Dubey, A., Jauhri, A., Pandey, A., Kadian, A., Al-Dahle, A., Letman, A., Mathur, A., Schelten, A., Yang, A., Fan, A., Goyal, A., Hartshorn, A., Yang, A., Mitra, A., Sravankumar, A., Korenev, A., Hinsvark, A., Rao, A., Zhang, A., Rodriguez, A., Gregerson, A., Spataru, A., Roziere, B., Biron, B., Tang, B., Chern, B., Caucheteux, C., Nayak, C., Bi, C., Marra, C., McConnell, C., Keller, C., Touret, C., Wu, C., Wong, C., Ferrer, C. C., Nikolaidis, C., Allonsius, D., Song, D., Pintz, D., Livshits, D., Esiobu, D., Choudhary, D., Mahajan, D., Garcia-Olano, D., Perino, D., Hupkes, D., Lakomkin, E., AlBadawy, E., Lobanova, + +E., Dinan, E., Smith, E. M., Radenovic, F., Zhang, F., Synnaeve, G., Lee, G., Anderson, G. L., Nail, G., Mialon, G., Pang, G., Cucurell, G., Nguyen, H., Korevaar, H., Xu, H., Touvron, H., Zarov, I., Ibarra, I. A., Kloumann, I., Misra, I., Evtimov, I., Copet, J., Lee, J., Geffert, J., Vranes, J., Park, J., Mahadeokar, J., Shah, J., van der Linde, J., Billock, J., Hong, J., Lee, J., Fu, J., Chi, J., Huang, J., Liu, J., Wang, J., Yu, J., Bitton, J., Spisak, J., Park, J., Rocca, J., Johnstun, J., Saxe, J., Jia, J., Alwala, K. V., Upasani, K., Plawiak, K., Li, K., Heafield, K., Stone, K., El-Arini, K., Iyer, K., Malik, K., Chiu, K., Bhalla, K., Rantala-Yeary, L., van der Maaten, L., Chen, L., Tan, L., Jenkins, L., Martin, L., Madaan, L., Malo, L., Blecher, L., Landzaat, L., de Oliveira, L., Muzzi, M., Pasupuleti, M., Singh, M., Paluri, M., Kardas, M., Oldham, M., Rita, M., Pavlova, M., Kambadur, M., Lewis, M., Si, M., Singh, M. K., Hassan, M., Goyal, N., Torabi, N., Bashlykov, N., Bogoychev, N., Chatterji, N., Duchenne O. Celebi O. Alrassy P. Zhang P. Li P.Vasic P. Weng P. Bhargava P.Dubal P. Krishnan P. Koura P.S. Xu P. He Q. Dong Q. Srinivasan R. Ganapathy R.Calderer R.Cabral R.S.Stojnic R.Raileanu R.Girdhar R.Patel R.Sauvestre R.Polidoro R. Sumbaly R.Taylor R.Silva R.Hou R.Wang R Hosseini S.Chennabasappa S.Singh S.Bell S.Kim S.S.Edunov S.Nie S.Narang S.Rarparthy S.Shen S.Wan S.Bhosale S.ZhangS.Vandenhende S. Batra S.Whitman S.Sootla S.Collot S.Gururangan S.Borodinsky S.Herman T.Fowler T.Sheasha T Georgiou T.Scialom T.Speckbacher T.Mihaylov T. Xiao T.Karn U.Goswami V.GuptaV.Ramanathan V.Kerkez V.Gonguet V.Do V.Vogeti V.Petrovic V.Chu W.XiongW.FuW.MeersW.Martinet X. Wang X.Tan X.E.Xie X.Jia X.Wang X.Goldschlag Y.Gaur Y.Babaei Y.Wen Y.SongY.Zhang Y.Li Y.Mao Y.Coudert Z.D.Yan Z.Chen Z. Papakipos Z.SinghA.Grattafori A.Jain A.Kelsey A.Shajnfeld A.Gangidi A.Victoria A.Goldstand A.Menon A.Sharma A.Boesenberg A.Vaughan A.Baevski A.Feinstein A.Kallet A.Sangani A. Yunus A.Lupu A.Alvarado A.Caples A.Gu A. HoA.Poulton A.Ryan A.Ramchandani A.Franco A.Saraf A.Chowdhury A.Gabriel A.Bharambe A. Eisenman A.Yazdan A.James B.Maurer B.Leonhardi B.Huang B.Loyd B.Paola B.D.Paranjape B. Liu B.Wu B.Ni B.Hancock B.Wasti B.Spence B.Stojkovic B.Gamido B.Montalvo B.Parker C. Burton C.Mejia C.Wang C.Kim C.Zhou C.Hu C.Cho C.-H.Cai C.Tindal C.Feichtenhofer C. Civin D.Beaty D.Kreymer D.Li D.Wyatt D.Adkins D.Xu D.Testuggine D.David D.Parikh D.Liskovich D.Foss D.Wang D.Le D.Holland D.Dowling E.Jamil E.Montgomery E.Presani E. Hahn E.Wood E.Brinkman E.Arcaute E.Dunbar + +E., Smothers, E., Sun, F., Kreuk, F., Tian, F., Ozgenel, F., Caggioni, F., Guzmán, F., Kanayet, F., Seide, F., Florez, G. M., Schwarz, G., Badeer, G., Swee, G., Halpern, G., Thattai, G., Herman, G., Sizov, G., Guangyi, Zhang, Lakshminarayanan, G., Shojanazeri, H., Zou, H., Wang, H., Zha, H., Habeeb, H., Rudolph, H., Suk, H., Aspegren, H., Goldman, H., Molybog, I., Tufanov, I., Veliche, I.-E., Gat, I., Weissman, J., Geboski, J., Kohli, J., Asher, J., Gaya, J.-B., Marcus, J., Tang, J., Chan, J., Zhen, J., Reizenstein, J., Teboul, J., Zhong, J., Jin, J., Yang, J., Cummings, J., Carvill, J., Shepard, J., McPhie, J., Torres, J., Ginsburg, J., Wang, J., Wu, K., U, K. H., Saxena, K., Prasad, K., Khandelwal, K., Zand, K., Matosich, K., Veeraraghavan, K., Michelena, K., Li, K., Huang, K., Chawla, K., Lakhotia, K., Huang, K., Chen, L., Garg, L., A. L., Silva, L. Bell, L. Zhang, L. Guo, L. Yu, L. Moshkovich, L. Wehrstedt, L. Khabsa, M., Avalani, M., Bhatt, M., Tsimpoukelli, M., Mankus, M., Hasson, M., Lennie, M., Reso M. Groshev, M. Naumov, M. Lathi, M. Keneally M. Seltzer, M. L. Valko, M. Restrepo, M. Patel, M. Vyatskov, M. Samvelyan, M. Clark, M. Macey, M. Wang M. Hermoso M.J.MetanatM.RastegariM.Bansal M. Santhanam N.Parks N.WhiteN.BawaN.Singhal N.Egebo N.Usunier N.Laptev N.P.Dong N. ZhangN.ChengN.CernoguzO.HartO.Salpekar O.KalinloA.KentP.Parekh P.SaabP.Balaji P. Rittner P. Bontrager P. Roux P.Dollar P.Zvyagina P. Ratanchandani P. Yuvraj P. Liang Q.Alao R. Rodriguez R.Ayub R.Murthy R.Nayani R.Mitra R.Li R.Hogan R.Battey R.Wang R.Maheswari R.HowesR.Rinott R.BonduS.J.DattaS.Chugh S.Hunt S.Dhillon S.Sidorov S.Pan S.Verma S.Yamamoto S.Ramaswamy S.Lindsay S.Lindsay S.Feng S.Lin S.Zha S.C.Shankar S.Zhang S. Zhang S.Wang S.Agarwal S.Sajuyigbe S.Chintala S.MaxS.ChenS.KehoeS.Satterfield S. Govindaprasad,S.GuptaS.ChoS.VirkS.SubramanianS.Choudhury S.Goldman S.RemezT.Glaser T.Best T.Kohler T.Robinson T.Li T.Zhang T. Matthews T.Chou T.Shaked T.VontimittaV.Ajayi V.Montanez V.Mohan V.Kumar V.S.Mangla V. Ionescu V.Poenaru V.Mihalescu V.T.Ivanov V. Li W.Wang W.Jiang W.Bouaziz W.Constable W. Tang X.Wang X.Wu X.Wang X.Xia X.Wu X. GaoX.ChenY.HuY.JiaY.QiY.LiY.Zhang Y.Zhang Y.Adi Y.Nam Y.Yu Wang Hao Y.Qian Y.He Y.Rait Z.DeVito Z.Rosnbrick Z.Wen Z. YangZ.and ZhaoZ.The llama 3 herd of models2024. URL https://arxiv.org/abs/2407.21783. + +Gadre, S. Y., Smyrnis, G., Shankar, V., Gururangan, S., Wortsman, M., Shao, R., Mercat, J., Fang, A., Li, J., Keh, S., et al. Language models scale reliably with over-training and on downstream tasks. arXiv preprint + +arXiv:2403.08540, 2024. +Ge, C., Ma, Z., Chen, D., Li, Y., and Ding, B. Data mixing made efficient: A bivariate scaling law for language model pretraining, 2024. URL https://arxiv.org/abs/2405.14908. +Groeneveld, D., Beltagy, I., Walsh, P., Bhagia, A., Kinney, R., Tafjord, O., Jha, A. H., Ivison, H., Magnusson, I., Wang, Y., Arora, S., Atkinson, D., Authur, R., Chandu, K. R., Cohan, A., Dumas, J., Elazar, Y., Gu, Y., Hessel, J., Khot, T., Merrill, W., Morrison, J., Muennighoff, N., Naik, A., Nam, C., Peters, M. E., Pyatkin, V., Ravichander, A., Schwenk, D., Shah, S., Smith, W., Strubell, E., Subramani, N., Wortsman, M., Dasigi, P., Lambert, N., Richardson, K., Zettlemoyer, L., Dodge, J., Lo, K., Soldaini, L., Smith, N. A., and Hajishirzi, H. Olmo: Accelerating the science of language models, 2024. URL https://arxiv.org/abs/2402.00838. +Habba, E., Arviv, O., Itzhak, I., Perlitz, Y., Bandel, E., Choshen, L., Shmueli-Scheuer, M., and Stanovsky, G. Dove: A large-scale multi-dimensional predictions dataset towards meaningful llm evaluation, 2025. URL https://arxiv.org/abs/2503.01622. +Hernandez, D., Kaplan, J., Henighan, T., and McCandlish, S. Scaling laws for transfer. arXiv preprint arXiv:2102.01293, 2021. +Hesslow, D., Zanichelli, N., Notin, P., Poli, I., and Marks, D. Rita: a study on scaling up generative protein sequence models. arXiv preprint arXiv:2205.05789, 2022. +Hillier, D., Guertler, L., Tan, C., Agrawal, P., Chen, R., and Cheng, B. Super tiny language models. ArXiv, abs/2405.14159, 2024. URL https://apisemantic scholar.org/CorpusID:269982112. +Hoffmann, J., Borgeaud, S., Mensch, A., Buchatskaya, E., Cai, T., Rutherford, E., Casas, D. d. L., Hendricks, L. A., Welbl, J., Clark, A., et al. Training compute-optimal large language models. arXiv preprint arXiv:2203.15556, 2022. +Hu, M. Y., Mueller, A., Ross, C., Williams, A., Linzen, T., Zhuang, C., Cotterell, R., Choshen, L., Warstadt, A., and Wilcox, E. G. Findings of the second babylm challenge: Sample-efficient pretraining on developmentally plausible corpora. arXiv preprint arXiv:2412.05149, 2024a. +Hu, S., Tu, Y., Han, X., He, C., Cui, G., Long, X., Zheng, Z., Fang, Y., Huang, Y., Zhao, W., et al. Minicpm: Unveiling the potential of small language models with scalable training strategies. arXiv preprint arXiv:2404.06395, 2024b. +Inbar, I. and Sernau, L. Time matters: Scaling laws for any budget. arXiv preprint arXiv:2406.18922, 2024. + +Isik, B., Ponomareva, N., Hazimeh, H., Paparas, D., Vassilitskii, S., and Koyejo, S. Scaling laws for downstream task performance of large language models. arXiv preprint arXiv:2402.04177, 2024. +Ivgi, M., Carmon, Y., and Berant, J. Scaling laws under the microscope: Predicting transformer performance from small scale experiments. arXiv preprint arXiv:2202.06387, 2022. +Jelassi, S., Brandonbrener, D., Kakade, S. M., and Malach, E. Repeat after me: Transformers are better than state space models at copying. arXiv preprint arXiv:2402.01032, 2024. +Kaplan, J., McCandlish, S., Henighan, T., Brown, T. B., Chess, B., Child, R., Gray, S., Radford, A., Wu, J., and Amodei, D. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020. +Le Scao, T., Fan, A., Akiki, C., Pavlick, E., Ilic, S., Hesslow, D., Castagné, R., Luccioni, A. S., Yvon, F., Galle, M., et al. Bloom: A 176b-parameter open-access multilingual language model. 2023. +Lingle, L. A large-scale exploration of mu-transfer. arXiv preprint arXiv:2404.05728, 2024. +Liu, Z., Qiao, A., Neiswanger, W., Wang, H., Tan, B., Tao, T., Li, J., Wang, Y., Sun, S., Pangarkar, O., Fan, R., Gu, Y., Miller, V., Zhuang, Y., He, G., Li, H., Koto, F., Tang, L., Ranjan, N., Shen, Z., Ren, X., Iriondo, R., Mu, C., Hu, Z., Schulze, M., Nakov, P., Baldwin, T., and Xing, E. P. Llm360: Towards fully transparent open-source llms, 2023. +LLM360 Team. Llm360 k2-65b: Scaling up fully transparent open-source llms. 2024. +Ludziejewski, J., Krajewski, J., Adamczewski, K., Pióro, M., Krutul, M., Antoniak, S., Ciebiera, K., Król, K., Odrzygoźdź, T., Sankowski, P., et al. Scaling laws for fine-grained mixture of experts. In *Forty-first International Conference on Machine Learning*. +Maia Polo, F., Somerstep, S., Choshen, L., Sun, Y., and Yurochkin, M. Sloth: scaling laws for llm skills to predict multi-benchmark performance across families. arXiv preprint arXiv:2410.11840, 2024. +Mikami, H., Fukumizu, K., Murai, S., Suzuki, S., Kikuchi, Y., Suzuki, T., Maeda, S.-i., and Hayashi, K. A scaling law for syn2real transfer: How much is your pre-training effective? In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 477-492. Springer, 2022. + +Muckatira, S., Deshpande, V., Lialin, V., and Rumshisky, A. Emergent abilities in reduced-scale generative language models. In Duh, K., Gomez, H., and Bethard, S. (eds.), Findings of the Association for Computational Linguistics: NAACL 2024, pp. 1242-1257, Mexico City, Mexico, June 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.findings-naacl.79. URL https://aclanthology.org/2024 findings-naacl.79. +Muennighoff, N., Rush, A., Barak, B., Le Scao, T., Tazi, N., Piktus, A., Pyysalo, S., Wolf, T., and Raffel, C. A. Scaling data-constrained language models. Advances in Neural Information Processing Systems, 36, 2024. +Owen, D. How predictable is language model benchmark performance? arXiv preprint arXiv:2401.04757, 2024. +Pandey, R. gzip predicts data-dependent scaling laws. arXiv preprint arXiv:2405.16684, 2024. +Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., et al. Scikit-learn: Machine learning in python. the Journal of machine Learning research, 12:2825-2830, 2011. +Perlitz, Y., Bandel, E., Gera, A., Arviv, O., Ein-Dor, L., Shnarch, E., Slonim, N., Shmueli-Scheuer, M., and Choshen, L. Efficient benchmarking (of language models). In Duh, K., Gomez, H., and Bethard, S. (eds.), Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 2519-2536, Mexico City, Mexico, June 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.nacl-long.139. URL https://aclanthology.org/2024.nacl-long.139. +Poli, M., Thomas, A. W., Nguyen, E., Ponnusamy, P., Deiseroth, B., Kersting, K., Suzuki, T., Hie, B., Ermon, S., Ré, C., Zhang, C., and Massaroli, S. Mechanistic design and scaling of hybrid architectures, 2024. URL https://arxiv.org/abs/2403.17844. +Porian, T., Wortsman, M., Jitsev, J., Schmidt, L., and Carmon, Y. Resolving discrepancies in compute-optimal scaling of language models. arXiv preprint arXiv:2406.19146, 2024. +Rosenfeld, J. S., Rosenfeld, A., Belinkov, Y., and Shavit, N. A constructive prediction of the generalization error across scales. In International Conference on Learning Representations. +Ruan, Y., Maddison, C. J., and Hashimoto, T. Observational scaling laws and the predictability of language model performance, 2024. + +Sardana, N., Portes, J., Doubov, S., and Frankle, J. Beyond chinchilla-optimal: Accounting for inference in language model scaling laws. In *Forty-first International Conference on Machine Learning*. +Sellam, T., Yadlowsky, S., Tenney, I., Wei, J., Saphra, N., D'Amour, A., Linzen, T., Bastings, J., Turc, I. R., Eisenstein, J., et al. The multiberts: Bert reproductions for robustness analysis. In International Conference on Learning Representations, 2021. +Shen, Y., Zhang, Z., Cao, T., Tan, S., Chen, Z., and Gan, C. Moduleformer: Learning modular large language models from uncurated data. arXiv preprint arXiv:2306.04640, 2023. +Sorscher, B., Geirhos, R., Shekhar, S., Ganguli, S., and Morcos, A. Beyond neural scaling laws: beating power law scaling via data pruning. Advances in Neural Information Processing Systems, 35:19523-19536, 2022. +Sutawika, L., Komatsuzaki, A., and Raffel, C. Pile-t5, 2024. URL https://blog.eleuther.ai/pile-t5/. Blog post. +Tao, C., Liu, Q., Dou, L., Muennighoff, N., Wan, Z., Luo, P., Lin, M., and Wong, N. Scaling laws with vocabulary: Larger models deserve larger vocabularies. arXiv preprint arXiv:2407.13623, 2024. +Tay, Y., Dehghani, M., Abnar, S., Chung, H., Fedus, W., Rao, J., Narang, S., Tran, V., Yogatama, D., and Metzler, D. Scaling laws vs model architectures: How does inductive bias influence scaling? In Bouamor, H., Pino, J., and Bali, K. (eds.), Findings of the Association for Computational Linguistics: EMNLP 2023, pp. 12342-12364, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.findings-emnlp.825. URL https://aclanthology.org/2023-findings-emnlp.825. +Together. Releasing 3b and 7b redpajama-incite family of models including base, instruction-tuned & chat models, May 2023. URL https://www.together.ai/blog/redpajama-models-v1. +Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., Bhosale, S., et al. Llama 2: Open foundation and finetuned chat models. arXiv preprint arXiv:2307.09288, 2023. +Warstadt, A., Mueller, A., Choshen, L., Wilcox, E., Zhuang, C., Ciro, J., Mosquera, R., Paranjabe, B., Williams, A., Linzen, T., et al. Findings of the babylm challenge: + +Sample-efficient pretraining on developmentally plausible corpora. In Proceedings of the BabyLM Challenge at the 27th Conference on Computational Natural Language Learning, pp. 1-34, 2023. URL https://aclanthology.org/2023.conl1-babylm.1/. +Wortsman, M., Liu, P. J., Xiao, L., Everett, K. E., Alemi, A. A., Adlam, B., Co-Reyes, J. D., Gur, I., Kumar, A., Novak, R., et al. Small-scale proxies for large-scale transformer training instabilities. In The Twelfth International Conference on Learning Representations, 2023. +Xia, M., Artetxe, M., Zhou, C., Lin, X. V., Pasunuru, R., Chen, D., Zettlemoyer, L., and Stoyanov, V. Training trajectories of language models across scales. In Rogers, A., Boyd-Graber, J., and Okazaki, N. (eds.), Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 13711-13738, Toronto, Canada, July 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023. acl-long.767. URL https://aclanthology.org/2023. acl-long.767. +Xiong, Y., Chen, X., Ye, X., Chen, H., Lin, Z., Lian, H., Niu, J., and Ding, G. Temporal scaling law for large language models. 2024. URL https://api_semanticscholar.org/CorpusID:269449894. +Yang, G., Hu, E., Babuschkin, I., Sidor, S., Liu, X., Farhi, D., Ryder, N., Pachocki, J., Chen, W., and Gao, J. Tuning large neural networks via zero-shot hyperparameter transfer. Advances in Neural Information Processing Systems, 34:17084-17097, 2021. +Yang, G., Hu, E. J., Babuschkin, I., Sidor, S., Liu, X., Farhi, D., Ryder, N., Pachocki, J., Chen, W., and Gao, J. Tensor programs v: Tuning large neural networks via zero-shot hyperparameter transfer. arXiv preprint arXiv:2203.03466, 2022. +Zhang, B., Liu, Z., Cherry, C., and First, O. When scaling meets llm finetuning: The effect of data, model and finetuning method. In *The Twelfth International Conference on Learning Representations*. +Zhang, S., Roller, S., Goyal, N., Artetxe, M., Chen, M., Chen, S., Dewan, C., Diab, M., Li, X., Lin, X. V., Mihaylov, T., Ott, M., Shleifer, S., Shuster, K., Simig, D., Koura, P. S., Sridhar, A., Wang, T., and Zettlemoyer, L. Opt: Open pre-trained transformer language models, 2022. URL https://arxiv.org/abs/2205.01068. + +# A. Scale up with 1 model + +We bring errors of data from fitting from a single model on a given percentage of training to the largest model with + +full training. Scaling is constant and follows the literature (Muennighoff et al., 2024) and the largest model stands as target model (so the bottom line in each figure represents predicting from the beginning of training). In parallel to this paper, an even more efficient work on predicting with 1 model was suggested, and the two should be incorporated (Maia Polo et al., 2024). + +# B. Loss curves and predictions + +We provide in Fig. 7 graphs of the loss during training of the target models per originating source (e.g., a paper) together with the predictions by using different percentage of the training. + +# C. Is scaling working only upwards? + +No. Small models usually show consistent and predicatable performance. + +Usually, one does not use a scaling law to extrapolate to a smaller model as one can just train the small model. However, under observational scaling laws, where one wants to research a phenomenon without scaling at all (Ruan et al., 2024; Maia Polo et al., 2024), or when many models were trained and one wishes to create smaller models for various reasons (Hillier et al., 2024; Warstadt et al., 2023), scaling down might prove useful. Moreover, in the context of traditional scaling laws this may act as a baseline. Such an experiment may shed another light on the number of models $|F|$ versus their size #params. If large models are better because they are more stable or otherwise fit laws more robustly, few models will be enough, if the number of models or scale down difference from the prediction, it will show similar behaviour to scaling up. See more in §8. + +To test this we reverse the order of models and predict with the largest models the loss on the smallest models. This means that for example in the case of 3 models, we predict the smallest model's loss and fit the scaling law relying on the 3 largest models. As before, we break the results by the percentage of training done and do not reverse it. + +As shown in Fig. 8, the number of models plays an important role in fitting well and a minimum of $30 - 40\%$ of the training is necessary for good fit, more than that often improves further. + +# D. Can we detect bad models to fit on? + +If so, not through cross validation. + +In §7, we raise the issue of instability of scaling law predictions, with a single model vastly changing the results. We tried to see if, without knowing the ARE, we could remove + +![](images/199c3bb3683de7382d54450439c9bf6e5664edae72c388b5c65ad3d5333ea5e9.jpg) + +![](images/89f897982a1609a4224f0b0f96010642e242c6464b1c4dc6052199eab31ad2a5.jpg) + +![](images/0435e25cc1b72be82a07359eabffd8252ab6fd7c9f793001e56cee6ac09b0d7a.jpg) +(a) OPT + +![](images/2b55f8e647c0123187927a4d4e6f76cca461afba7161c9ce3075781b31c6a608.jpg) +(b) GPT2 (trained on C4) + +![](images/14ab4f72348ea854acd9d462db27f9175f8a8559fdaf5fa5d3bde66321362871.jpg) +(c) OLMO + +![](images/c7f88e7fb31746bef821981dd15dad146f74c97f77a874d246ffdd19afa26ea3.jpg) +(d) Pythia deduped V0 + +![](images/aefe594747e76c98fdada703b09cac0394feba10d4846db5c9d5b8b875af26f7.jpg) +(e) Pythia V0 +(g) Pythia + +![](images/133a79d65145232679f024b3b52d594d2138c6c19aaff87e7ae530aa5d8792b6.jpg) +(f) Pythia deduped +(h) T5-Pile +Figure 6: Fitting scaling laws under the assumption that all models scale similarly. Thus, a single model is needed to predict. The last row in each Figure represents predicting a model at the beginning of its training. + +![](images/b05a7aa49074d8df1c803230e10c940119d93fd1e15a79795ea91a3b0ad0bae6.jpg) + +![](images/16242eb3eb134349dd5e2f132f92d46f8c19213bce9fe66a780b569572d6bc35.jpg) +(a) Overtrain + +![](images/09e2cbee2d5e4df3b12c3a8e8fda728a675372bd62a15cb07686d5e39103e517.jpg) +(c) GPT-3 +(e) T5-Pile + +![](images/2f28ce6d8a3bfc8722b8a937bd0e6a3b735a5abf355213d2756c5820a0d1aeeb.jpg) + +![](images/776722e0d2089d245d6150bd9a7739a5e7a098e2b687c92ff6ce0aea8f4ce99e.jpg) +(b) Datablations + +![](images/ed2753cf66be619b66f7ffaa6491c089fa3cbbe4a8326bff3051e74571b22aff.jpg) +(d) Pythia +(f) Training Trajectories +Figure 7: In each figure all losses from a specific source and predictions of the scaling loss with different percentage of the #toks and all models. Predictions are points where the X axis is the available data for prediction and y the prediction value, lines are the actual value. One scaled family per paper was sampled as a representative. + +bad models from the prediction. We hypothesized that models that we can't predict would mean models that would skew our predictions when fitted upon. We performed a cross-validation on the #params families in $F$ each time setting the models with most #toks as target ans excluding the #params family from $F$ . Our hypothesis was found to be incorrect. Such cases of hard-to-predict models were found to indicate that the models left in $F$ are bad predictors and not that the target is very dissimilar (a "bad" training). In 58% of the cases removing that model from the scaling law created the worst ARE possible on the actual target, more than removing any other model. + +# E. Huber replication + +Huber loss is sometimes used instead of ARE (Hoffmann et al., 2022). Huber loss is defined as + +$$ +L _ {\delta} (a) = \begin{array}{c c} \frac {1}{2} a ^ {2} & \text {f o r} | a | \leq \delta , \\ \delta \cdot \left(| a | - \frac {1}{2} \delta\right), & \text {o t h e r w i s e}. \end{array} +$$ + +We use $\delta = e10^{-3}$ as done in (Hoffmann et al., 2022). The overall results are similar but for completeness report them in Fig. 9. + +![](images/eaaa3881179c20c0e7f1947bd476b9ef5494c1039fb8ab2d2253a88b1bddedb8.jpg) +(a) OPT + +![](images/74f8c0c0b717516d452d6071aa38c91f397a2e7f92cbb76e63e5ff634d556d5c.jpg) +(b) Pythia deduced V0 + +![](images/bdff20367fc9db6d1fcf640a6b7b81c4db341788e54fd9d258660b359b8d07ec.jpg) + +![](images/0cf03e41be562717491e4e62d08fc8ba1cef6bfaaf4e74467fdd81a7cb38c80c.jpg) + +![](images/075f332d1e2dd18fc167213e718d85baf0bf588f9d8b2a6d80331db2fa23e7c2.jpg) +(c) Pythia V0 +(e) Pythia + +![](images/78847fd00b5c1870a64bea7186536a656842acea7181fe3637ab6e02347e5553.jpg) +(d) Pythia deduped +(f) T5-Pile +Figure 8: Fitting scaling laws trying to predict the smallest model, with the largest (Y-axis) models trained on a percentage of the data (X-axis). + +![](images/a3503fb159c2aa9baca84c4370169f34897c88c3ca101addb7e7cf5e54cc7790.jpg) +(a) GPT3 + +![](images/d56de96989c09b2701a9ced465a1678e0915975d0c1a9d30159ce0b2b1c16097.jpg) +(b) Pythia + +![](images/6b629595f3ab16e2fd0b423cc2642cb7614419d502bff57434eec6f838edd70c.jpg) +(c) GPT2 + +![](images/d9753c8189d846f2d79d16c3b30f4ac0399e99a8348f210ef4520e246af6015f.jpg) +(d) Llama +Figure 9: Scaling laws under a Huber loss. The line represents most efficient setting to recieve $<0.05$ . Comparison of several models given different amount of models and percentages of training. \ No newline at end of file diff --git a/ahitchhikersguidetoscalinglawestimation/images.zip b/ahitchhikersguidetoscalinglawestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d2824eff7010dd4658486618fba88c0e88deb449 --- /dev/null +++ b/ahitchhikersguidetoscalinglawestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:befb1765539de28f80324553535d24f6638a5be88be1aa59fda40be688fce0ad +size 515509 diff --git a/ahitchhikersguidetoscalinglawestimation/layout.json b/ahitchhikersguidetoscalinglawestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ede633253ec0741db820c37d7e429bb86d9b1ec7 --- /dev/null +++ b/ahitchhikersguidetoscalinglawestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f1cd54f9a2c1871e96699160f39f2d33b9afe8b452262cfaae0f0390dd7c977 +size 607508 diff --git a/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/1d986b8e-36e5-4fbf-8db2-42204daea09e_content_list.json b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/1d986b8e-36e5-4fbf-8db2-42204daea09e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..72fb02365f9669169ac650ea3007cce16928f9d7 --- /dev/null +++ b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/1d986b8e-36e5-4fbf-8db2-42204daea09e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a164d5be5e482364ae7615794610a315af7ede82dd6b0ae049a6c9aa78d597ae +size 269556 diff --git a/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/1d986b8e-36e5-4fbf-8db2-42204daea09e_model.json b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/1d986b8e-36e5-4fbf-8db2-42204daea09e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..dd4cced58e49e076966de073802abf2ed35dd2ee --- /dev/null +++ b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/1d986b8e-36e5-4fbf-8db2-42204daea09e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b230781a765c02115a21700252773e3f7dfc102510636fbae42f65d221ff670e +size 326363 diff --git a/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/1d986b8e-36e5-4fbf-8db2-42204daea09e_origin.pdf b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/1d986b8e-36e5-4fbf-8db2-42204daea09e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5f69261ce1e07c4de52dd5b81a8069591406b09f --- /dev/null +++ b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/1d986b8e-36e5-4fbf-8db2-42204daea09e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0385b082f35e716cb919971ca5d78f0aba4d553a3f586681f929a3466ec727fe +size 9097242 diff --git a/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/full.md b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c9e2edc0cf1c6d063643c4ca6e9faae7c513dfa3 --- /dev/null +++ b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/full.md @@ -0,0 +1,826 @@ +# A Large Recurrent Action Model: xLSTM Enables Fast Inference for Robotics Tasks + +Thomas Schmied Thomas Adler Vihang Patil Maximilian Beck 2 Korbinian Poppel 12 Johannes Brandstetter 12 Gunter Klambauer 12 Razvan Pascanu 34 Sepp Hochreiter 12 + +# Abstract + +In recent years, there has been a trend in the field of Reinforcement Learning (RL) towards large action models trained offline on large-scale datasets via sequence modeling. Existing models are primarily based on the Transformer architecture, which results in powerful agents. However, due to slow inference times, Transformer-based approaches are impractical for real-time applications, such as robotics. Recently, modern recurrent architectures, such as xLSTM and Mamba, have been proposed that exhibit parallelization benefits during training similar to the Transformer architecture while offering fast inference. In this work, we study the aptitude of these modern recurrent architectures for large action models. Consequently, we propose a Large Recurrent Action Model (LRAM) with an xLSTM at its core that comes with linear-time inference complexity and natural sequence length extrapolation abilities. Experiments on 432 tasks from 6 domains show that LRAM compares favorably to Transformers in terms of performance and speed. + +# 1. Introduction + +Reinforcement Learning (RL) has been responsible for impressive success stories such as game-playing (Silver et al., 2016; Vinyals et al., 2019; Berner et al., 2019; Patil et al., 2022), plasma control for fusion (Degrave et al., 2022), or navigation of stratospheric balloons (Bellemare et al., 2020). While these successes were based on classical RL approaches, in which agents have been trained online with RL objectives, recently there has been a trend towards offline RL settings (Levine et al., 2020; Schweighofer et al., 2022) + +1ELLIS Unit, LIT AI Lab, Institute for Machine Learning, JKU Linz, Austria 2NXAI GmbH, Linz, Austria 3Google DeepMind 4Mila - Québec AI Institute. + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +and sequence models trained via behavior cloning (Chen et al., 2021; Janner et al., 2021). Such approaches, in which agents are trained on large-scale offline datasets with causal sequence modeling objectives, have been driven by the proliferation of Transformer-based architectures and gave rise to what we refer to as Large Action Models (LAMs) to highlight their similarity to large language models (LLMs) (Radford et al., 2018). LAM approaches can also be used in multi-task settings to develop generalist agents such as Gato (Reed et al., 2022). + +Existing LAMs are primarily based on the Transformer (Vaswani et al., 2017) architecture. Because of their powerful predictive performance, robotics has become an emergent application area for large models (Brohan et al., 2023b; a; Octo Model Team et al., 2024; Gu et al., 2023; Wang et al., 2023), and a number of large multi-task datasets were collected (Jia et al., 2024; Embodiment Collaboration et al., 2024; Jiang et al., 2023; Mandlekar et al., 2023). This development bears the potential to produce robotics agents that learn to master complex tasks in a wide range of environments and even different embodiments. For example, recently it has been demonstrated, albeit in restricted settings, that sequence models trained on multi-episodic contexts can perform in-context learning (ICL) (Laskin et al., 2020; Lee et al., 2023). One potential application of ICL can be to learn new related tasks in robotics without the need for re-training or fine-tuning. + +One of the key reasons for the success of Transformer-based models is their ability to scale to large datasets through their efficient parallelization during training. However, despite numerous success stories in RL, language modeling (Brown et al., 2020) or computer vision (Dosovitskiy et al., 2021; He et al., 2022), a persistent drawback of Transformer-based architectures is their high inference cost in terms of both speed and memory (Kim et al., 2023). Consequently, deploying Transformer-based models in resource-constrained scenarios, such as on devices with limited hardware capacity and/or real-time constraints, e.g., robots or smartphones, is prohibitive because of the required fast inference times (Firoozi et al., 2023; Hu et al., 2023). A basic principle of control theory is that the controller sample rate should be in the order of magnitude of the sample rate of the sensors + +![](images/c55be45834cd0eb478064a1a12484bf119b929a3a7e5cf25da359e0ebfe26654.jpg) +Figure 1. Illustration of our Large Recurrent Action Model (LRAM) with an xLSTM (Beck et al., 2024) at its core. + +(Franklin et al., 1998, Ch. 11). To illustrate this, for typical robots such as drones or industrial robot arms, rates of $100\mathrm{Hz}$ - $1000\mathrm{Hz}$ are required to keep the system stable (Salzmann et al., 2023; El-Hussieny, 2024; Hu et al., 2023; Chignoli et al., 2021). This implies inference times of less than $10\mathrm{ms}$ . At $1000\mathrm{Hz}$ , a 15-second movement of the agent corresponds to a sequence of $15\mathrm{K}$ steps (El-Hussieny, 2024), resulting in long context lengths even without ICL. While there exists a range of techniques to make large models faster, such as quantization (Frantar et al., 2023), distillation (Hinton et al., 2015), or pruning (LeCun et al., 1989), the quadratic-time complexity of self attention still remains. + +Recently, modern recurrent architectures have been proposed, which exhibit similar parallelization properties during training as the Transformer architecture while offering linear-time inference complexity. These modern recurrent architectures include xLSTM (Beck et al., 2024) and state-space models (SSMs), such as Mamba (Gu & Dao, 2023; Dao & Gu, 2024) and Griffin/Hawk (De et al., 2024), and have challenged the dominance of the Transformer in language modeling but also in other domains such as computer vision (Alkin et al., 2024; Zhu et al., 2024), and biomedicine (Schmidinger et al., 2024). More importantly, their linear-time inference makes them suitable for deployment in scenarios with limited compute, large context sizes, and real-time requirements, such as robotics. + +In this work, we assess the aptitude of modern recurrent architectures, such as xLSTM and Mamba, as large action models. To this end, we introduce a Large Recurrent Action Model (LRAM) with an xLSTM at its core (see Figure 1). We train our agents on 432 tasks from 6 domains using a supervised learning setting similar to that of the Decision Transformer (Chen et al., 2021, DT). We use data collected during online-RL training of single-task specialist agents and compile these trajectories alongside other expert demonstrations into a large-scale multi-domain dataset comprising 894M transitions. Due to their parallelization properties, + +the modern recurrent architectures considered in this work can process this large-scale training set as efficiently as the Transformer, while being faster at inference. Experiments across 4 model sizes with our multi-task models indicate that LRAM compares favorably to Transformers in terms of both performance and speed. In addition, we study the effect of modern recurrent architectures on fine-tuning performance and in-context learning abilities, and find that they exhibit strong performance in both dimensions. + +The main purpose of this paper is to test the hypothesis that modern recurrent model architectures are better suited for building LAMs than Transformers. Hereby, we make the following contributions. + +- We propose a Large Recurrent Action Model (LRAM) with an xLSTM at its core that enables efficient inference. +- We assess the aptitude of modern recurrent architectures as backbones for large-action models with respect to their efficiency at inference time and overall performance in multi-task, fine-tuning, and in-context learning settings. +- To foster further research on large action models, we release our data preparation pipeline and our datasets. + +# 2. Related work + +Sequence Models in RL. LSTM (Hochreiter & Schmidhuber, 1997) is the dominant backbone architecture for partially observable online RL problems and has been behind achievements such as mastering Starcraft II (Vinyals et al., 2019), Dota 2 (Berner et al., 2019), and Atari (Espeholt et al., 2018; Kapturowski et al., 2019). After the success of the Transformer in NLP (Devlin et al., 2019; Radford et al., 2019; Brown et al., 2020), computer vision (Dosovitskiy + +et al., 2021; He et al., 2022; Radford et al., 2021; Fürst et al., 2022) and speech recognition (Radford et al., 2022; Baevski et al., 2020), the architecture has found its way into RL. Chen et al. (2021) proposed the Decision Transformer (DT), a GPT-style model (Radford et al., 2018), that learns to predict actions from offline trajectories via behavior cloning. Trajectory Transformer (Janner et al., 2021) predicts actions along with states and rewards, which allows for dynamics modeling. Other follow-up works build on the DT (Zheng et al., 2022; Wang et al., 2022; Shang et al., 2022; Meng et al., 2021; Siebenborn et al., 2022; Schmied et al., 2024a) or replace the Transformer with Mamba (Ota, 2024; Dai et al., 2024). Furthermore, sequence models trained to predict the next action were found to exhibit ICL if conditioned on previous trajectories (Laskin et al., 2022; Lee et al., 2022; Kirsch et al., 2023), albeit in limited scenarios. + +Large Action Models (LAMs). LAMs, such as the Decision Transformer, are well-suited for multi-task settings. Lee et al. (2022) found that a multi-game DT can learn to play 46 Atari games. Reed et al. (2022) introduced a generalist agent trained on over 600 tasks from different domains, ranging from Atari to manipulation of a robot arm. Jiang et al. (2022) a Transformer for robot manipulation based on multi-modal prompts, that allow to steer the model to perform new tasks. Recently, Raad et al. (2024) introduced an agent instructable via language to play a variety of commercial video games. Since then, robotics has become an emergent area for developing LAMs (Brohan et al., 2023b;a; Octo Model Team et al., 2024; Gu et al., 2023; Wang et al., 2023; Kim et al., 2024), also due to the availability of large-scale datasets (Jia et al., 2024; Embodiment Collaboration et al., 2024; Jiang et al., 2023; Mandlekar et al., 2023). + +Next-generation Sequence Modeling Architectures. Linear recurrent models, such as state-space models (SSM, Gu et al., 2021; 2022b; Smith et al., 2023; Orvieto et al., 2023) have challenged the dominance of the Transformer (Vaswani et al., 2017) architecture on long-range tasks (Tay et al., 2020). The key insight of those linear RNNs was to diagonalize the recurrent state matrix and enforce stable training via an exponential parameterization (Gu et al., 2022a; Orvieto et al., 2023). Since then, there have been efforts to include features such as gating from RNNs (Elman, 1990; Jordan, 1990; Hochreiter & Schmidhuber, 1997; Cho et al., 2014). Non-linear gates are believed to have higher expressivity, but are harder to train. Griffin (De et al., 2024) mixes gated linear recurrences with local attention to achieve more training data efficiency than Llama-2 (Touvron et al., 2023) and better sequence extrapolation. Mamba (Gu & Dao, 2023) introduces a selection mechanism similar to gating into SSMs, which makes its state and input matrix time-dependent. This is similar to the gating mechanism of RNNs but also bears resemblance to approaches like fast weights (Schmidhuber, 1992) and Linear Atten + +tion (Katharopoulos et al., 2020). Mamba-2 (Dao & Gu, 2024) highlights the connection between SSMs with input-dependent state and input matrices and (Gated) Linear attention variants. Most recently, the xLSTM (Beck et al., 2024) was proposed as an improvement over the classic LSTM (Hochreiter & Schmidhuber, 1997) that combines gating, linear recurrences, and recurrent weights into a single architecture for language modeling. First, xLSTM leverages exponential gating with stabilization to RNNs for stronger emphasis on important inputs. Second, xLSTM is composed of two variants, the mLSTM variant with an emphasis on memory that proves important in language modeling, and the sLSTM variant that keeps the non-diagonalized recurrent matrix to enable state-tracking (Merrill et al., 2024). State tracking is important in logic tasks and cannot be modeled fundamentally by linearized recurrent or state-space models like Mamba, Griffin, or Transformers. + +# 3. Large Recurrent Action Models + +# 3.1. Background + +Reinforcement Learning. We assume the standard RL formulation via a Markov Decision Process (MDP) represented by a tuple of $(S, \mathcal{A}, \mathcal{P}, \mathcal{R})$ , where $S$ and $\mathcal{A}$ denote state and action spaces, respectively. At every timestep $t$ , the agent observes state $s_t \in S$ , predicts action $a_t \in \mathcal{A}$ , and receives a scalar reward $r_t$ . The reward is determined by the reward function $\mathcal{R}(r_t \mid s_t, a_t)$ . $\mathcal{P}(s_{t+1} \mid s_t, a_t)$ defines the transition dynamics and constitutes a probability distribution over next states $s_{t+1}$ when executing action $a_t$ in state $s_t$ . The goal of RL is to learn a policy $\pi(a_t \mid s_t)$ that predicts an action $a_t$ in state $s_t$ that maximizes $r_t$ . + +Decision Transformer (Chen et al., 2021) casts the RL problem setting as next action prediction task via causal sequence modeling. At training time, DT aims to learn a policy $\pi_{\theta}$ that maps future rewards to actions, which is often referred to as upside-down RL (Schmidhuber, 2019). At inference time, the DT is conditioned via a target return to emit high-reward actions. Consequently, we assume access to a dataset $\mathcal{D} = \{\tau_i\}_{i=1}^N$ containing $N$ trajectories $\tau_i$ consisting of quadruplets $\tau_i = (s_1, \hat{R}_1, a_1, r_1, \ldots, s_T, \hat{R}_T, a_T, r_T)$ of state $s_t$ , return-to-go (RTG) $\hat{R}_t = \sum_{t'=t}^{T} r_{t'}$ , action $a_t$ , and reward $r_t$ . Here, $T$ refers to the length of the trajectory. The DT $\pi_{\theta}$ is trained to predict the ground-truth action $a_t$ conditioned on sub-trajectories from the dataset: + +$$ +\begin{array}{l} \hat {a} _ {t} \sim \pi_ {\theta} \left(\hat {a} _ {t} \mid s _ {t - C}, \hat {R} _ {t - C}, a _ {t - C}, r _ {t - C}, \dots , \right. \tag {1} \\ \left. s _ {t - 1}, \hat {R} _ {t - 1}, a _ {t - 1}, r _ {t - 1}, s _ {t}, \hat {R} _ {t}\right) \\ \end{array} +$$ + +where $C \leq T$ is the size of the context window. In fact, Equation 1 describes the setting of the multi-game DT (Lee et al., 2022), which also includes rewards in the sequence representation. + +Table 1. Dataset statistics for all 432 training tasks. + +
DatasetTasksTrajectoriesMean Trj. LengthTotal TransitionsRepetitions
Atari41136K2733205M1.03×
Compositue240480K500240M0.87×
DMControl11110K1000110M1.92×
Meta-World45450K20090M2.34×
Mimicgen8383K30025M8.5×
Progen122185K144224M0.94×
Total4323.4M-894M-
+ +# 3.2. Large Recurrent Action Models (LRAMs) + +Our LRAM has a modern recurrent architecture at its core (see Figure 1), which comes with a parallel training and a recurrent inference mode. We instantiate LRAM with three different variants, two different xLSTM configurations, and Mamba. We use a training protocol similar to that of Lee et al. (2022) and Reed et al. (2022) with important differences that aim to speed up inference across backbones. + +Multi-modal sequence representation. To encode input from different environments with varying state and action spaces, we use separate encoders per modality that are shared across tasks and domains. For encoding images, we use a CNN similar to Espeholt et al. (2018), whereas for low-dimensional inputs we use a fully connected network. We refrain from patchifying images and tokenizing continuous states to avoid unnecessarily long sequences. Similarly, we use linear layers to encode rewards and RTGs. We omit actions in our sequence formulation, as we found that this can be detrimental to performance, in particular for continuous control tasks with smoothly changing actions (see Section 4.3). Consequently, our trajectories have the form $\tau_{i} = (s_{1},\hat{R}_{1},r_{1},\dots ,s_{T},\hat{R}_{T},r_{T})$ and we train our policy $\pi_{\rho}$ to predict the ground-truth action $a_{t}$ as: + +$$ +\begin{array}{l} \hat {a} _ {t} \sim \pi_ {\rho} \left(\hat {a} _ {t} \mid s _ {t - C}, \hat {R} _ {t - C}, r _ {t - C}, \dots , \right. \tag {2} \\ \left. s _ {t - 1}, \hat {R} _ {t - 1}, r _ {t - 1}, s _ {t}, \hat {R} _ {t}\right). \\ \end{array} +$$ + +Shared action head. Action spaces in RL typically vary across environments. For example, in the environments we consider, there are 18 discrete actions and a maximum of 8 continuous dimensions for continuous control environments. Therefore, we employ discretization of continuous action dimensions into 256 uniformly-spaced bins, similar to Reed et al. (2022) and Brohan et al. (2023b). Unlike prior work, we leverage a shared action head to predict all discrete actions or continuous action dimensions jointly. We found that this setup significantly reduces inference time compared to using autoregressive action prediction of continuous actions. + +Recurrent inference mode. At inference time, we leverage the recurrent backbone and maintain the hidden states of + +the last timestep. This enables fast inference with linear-time complexity along the sequence length. In addition, the recurrent-style inference is well-suited for online fine-tuning via RL objectives, similar to LSTM-based policies in online RL. To speed up inference, we leverage custom kernels for the xLSTM backbone (see Appendix 21). + +Our unified discrete action representation enables consistent training of our agents via the cross-entropy loss as training objective across all tasks and domains, similar to Reed et al. (2022). We use separate reward scales per domain and target returns per task. Furthermore, we do not make use of timestep encodings as used by Chen et al. (2021), which are detrimental when episode lengths vary. We provide additional implementation details in Appendix C. + +# 4. Experiments + +We study the aptitude of modern recurrent architectures as LAMs on 432 tasks from 6 domains: Atari (Bellemare et al., 2013), Compositue (Mendez et al., 2022), DMControl (Tassa et al., 2018), Meta-World (Yu et al., 2020b), Mimicgen (Mandlekar et al., 2023), and Procgen (Cobbe et al., 2020b). To this end, we compile a large-scale dataset containing 894 million transitions (see Section 4.1). Across all experiments, we compare four backbone variants: xLSTM [7:1], xLSTM [1:0] (Beck et al., 2024), Mamba (Gu & Dao, 2023), and the GPT-2 style Transformer employed in the DT (Chen et al., 2021). Following (Beck et al., 2024), we use the bracket notation for xLSTM, which indicates the ratio of mLSTM to sLSTM blocks. For example, xLSTM [1:0] contains only mLSTM blocks. + +In Section 4.2, we conduct a scaling comparison for four model sizes ranging from 16M to 206M parameters that shows that modern recurrent architectures achieve performance comparable or favorable to the Transformer baseline across different model sizes. In Section 4.3, we study the impact of the recurrent backbones on fine-tuning performance, ICL abilities, and further analyze our trained recurrent backbones. Finally, in Section 4.4, we empirically examine the differences at inference time in terms of latency and through + +![](images/430e92a487f98a46ce198c6efdd8228414029f202fcd2c54adba5fb12f4cb8e2.jpg) +(a) Sequence prediction + +![](images/6ad47cfd123364a2e11f53a7d4864202a67c43a288be7c4d53ab11424f118713.jpg) +(b) Environment interaction +Figure 2. Scaling comparison. We compare xLSTM, Mamba, DT in four model sizes: 16M, 48M, 110M, and 206M parameters. We show the (a) validation perplexity on the hold-out datasets, and (b) normalized scores obtained from evaluating in the training task environments, averaged over all 6 domains. + +put between xLSTM and Transformer-based agents, which indicate advantages for the recurrent backbone. + +# 4.1. Datasets & Environments + +Datasets. We compile a large-scale dataset comprising 432 tasks from six domains. We leverage datasets from prior works if available, and generate our own data otherwise. For Atari, we extract 5M transitions per task from the DQN-Replay dataset released by Agarwal et al. (2020). For Compositue, we leverage the datasets released by (Hussing et al., 2023). For Meta-World, we use 2M transitions per task released by (Schmied et al., 2024a). For DMControl, we generate 10M transitions per task using task-specific RL agents. For Mimicgen, we use the datasets for the 21 tasks released by (Mandlekar et al., 2023) and generate trajectories for the remaining 62 tasks. Finally, for Procgen, we extract 20M transitions from the datasets released by (Schmied et al., 2024b). Our final dataset contains 3.4M trajectories and in total 894M transitions (see Table 2). We reserve an additional 37 tasks from the same domains for zero-shot evaluation. To foster future research, we release our data-preparation pipeline and generated data. We provide the rationales for our specific dataset selection in Appendix B.1. + +**Environments.** Atari and Progen come with image observations and discrete actions. In contrast, the remaining four domains exhibit state-based observations and continuous actions. Consequently, our experiments involve a mixture of state and action spaces as well as varying episode lengths (see Table 2). Periodically evaluating the trained agents on all 432 tasks sequentially is time-consuming, and we, therefore, distributed the evaluation across GPUs and parallel processes (see Appendix C). Additional details on our datasets and environments are available in Appendix B. + +# 4.2. Scaling comparison + +To conduct our main comparisons, we train our four backbone variants on the full training task mixture of 432 tasks. For each architecture backbone, we report performance scores for four model sizes: 16M, 48M, 108M, and 206M parameters. We train all models for 200K updates with a batch size of 128 and a context length of 50 timesteps. All domains are represented with approximately equal proportion, resulting in 33K updates per domain. Additional implementation details and hyperparameters for every backbone variant and model size are available in Appendix C. + +Sequence prediction performance. In Figure 2a, we report the validation set perplexity for all backbones and model sizes averaged over the individual scores from all domains. To achieve this, we maintain a hold-out set of trajectories for each training task (2.5%) and compute the perplexities after every 50K steps (see Figure 12 for training perplexities). Both recurrent backbones outperform the Transformer baseline considerably, especially as the model sizes increase. + +Evaluation performance. During training, we evaluate our agents after every 50K step in all 432 training environments. In Figure 2b, we report the resulting normalized performances averaged across all six domains. The recurrent backbones outperform the Transformer one across model sizes. While xLSTM and Mamba perform similarly at smaller scales, xLSTM tends to outperform Mamba at larger scales (206M). This is an important advantage of xLSTM, as LRAM agents can strongly benefit from more data and consequently larger models. Note that Mamba has a significantly higher number of parameters than competitors. For the zero-shot evaluation performances on the 37 hold-out tasks, we refer to Figure 14 in Appendix D.2. + +![](images/717c187c84f537432508e0f32c6508f0dff44a5dc9910572d48e6ec6fbf02492.jpg) +Figure 3. Normalized scores per domain for model size 206M. For Meta-World, DMControl, Mimicgen, Compositie, and Progen, we report data-normalized scores, for Atari we report human-normalized scores. + +Performance per domain. In Figure 3, we report the normalized scores for the 206M models attained on all six domains. For Meta-World, DMControl, Mimicgen, Composite, and Procgen, we use data-normalized scores, as suggested by (Levine et al., 2020). For Atari, we report human-normalized scores. We observe that xLSTM outperforms competitors on three of the six domains, while they perform similarly on the remaining domains. + +# 4.3. Analyses & Ablations + +Fine-tuning. To assess the effect of the recurrent backbones on fine-tuning performance, we fine-tune our models on 37 held-out environments from all 6 domains. We evaluate the fine-tuning performance of the xLSTM architecture for the 16M pretrained models and compare it against an xLSTM trained from scratch. The pretrained LRAM outperforms the randomly initialized xLSTM model in most domains (see Figure 15). This suggests that fine-tuning performance is not affected negatively by switching the backbone. + +![](images/9d30fe96a74cd8f1b0aaeb30384850ba819b9e7be7a3017bdc63795eea90f976.jpg) +Figure 4. In-context Learning with modern recurrent architectures on 20 hold-out tasks for Dark-Room $10 \times 10$ . + +In-context Learning. Next, we study the ICL abilities of our recurrent backbones on the Dark-Room environment considered in prior work on in-context RL (Laskin et al., 2022; Lee et al., 2023; Schmied et al., 2024b). To study ICL in isolation, we train models from scratch with a multi + +episodic context, which results in a large context length (see Appendix D.4 for details on the experiment setup). In particular, we adopt the Algorithm Distillation (AD, Laskin et al., 2022) framework and exchange the Transformer backbone architecture with modern recurrent architectures. In Figure 4, we report the ICL performance on the 20 hold-out tasks (see Figure 16 for training tasks). We find that xLSTM [7:1] attains the highest overall scores both on the 80 training and 20 hold-out tasks, which we attribute to the state-tracking abilities (Merrill et al., 2024) of sLSTM blocks. + +Embedding space analysis. In Figure 5, we analyze the representations learned by our model. We sample 32 subtrajectories from every task, extract the sequence representation at the last layer, cluster them using UMAP (McInnes et al., 2018), and color every point by its domain (see Appendix F for more details). We find that tasks from the same domain cluster together. Furthermore, xLSTM exhibits a more refined domain separation compared to DT, which may further contribute to the better downstream performance. See Appendix F for a more detailed discussion on the embedding space analysis and a comparison to Mamba. + +![](images/a59f9d0e31cab9075a1974428c199cc25e60ad321d9214833525dbe5f8b48014.jpg) +(a) DT +Figure 5. Embedding space comparison. UMAP clustering of hidden states for all tasks for 16M, colored by domain. xLSTM exhibits a better domain separation than DT. + +![](images/954230c1aa21ac55ba5cda1acbf81cbf76a1911de87b158f1e125de75dbc660f.jpg) +(b) xLSTM + +![](images/109ed2f9f6d684e1a746d33ff72ef548c7890ab09e8618c9ac78ef1aa5b13d2b.jpg) +(a) Latency, $B = 1$ + +![](images/ec5763bf76e7cb61dbd07a8f6d1c7bb14746b1721b07ef0287e0200545a69da8.jpg) +(b) Latency, $B = 16$ +Figure 6. Latency comparison on A100. We report latency for varying context lengths (in timesteps) with batch sizes (a) $B = 1$ and (b) $B = 16$ . In (c), we show the memory consumption in % of GPU memory with $B = 1$ . We compare DT to xLSTM and Mamba with the same number of layer blocks and parameters on Atari Freeway. Missing bars for DT indicate out-of-memory (OOM). + +![](images/95724f44a52dc1808745c7541a7211fea7343aad956a111593597f28b210f8c6.jpg) +(c) Memory, $B = 1$ + +Removing Actions & Effect of Context Length. We found that removing actions from the context results in better performance across backbones. While context lengths beyond 1 hurt performance on Meta-World and DMControl, and when training with actions, the reverse is true when training without actions (see Figures 23, 24, 26). This is in contrast to recent works, which did not benefit from longer contexts (Octo Model Team et al., 2024). While removing actions improves performance on Meta-World/DMControl, it does not affect performance on discrete control environments. For Meta-World/DMControl, we observed that the models become overly confident, which is problematic if poor initial actions are produced. This is because many robotics environments exhibit smoothly changing actions, and by observing previous actions, the agent can learn shortcuts. A similar issue has been observed by Wen et al. (2020) and termed the copycat problem. Removing actions from the input prevents the agent from using shortcuts and, therefore, alleviates the copycat problem. Importantly, the evaluation performance improves across domains as the sequence length increases, which indicates that the history helps to predict the next action (e.g., by observing mistakes made in the past, see Figures 25, 27). + +Return-conditioning vs. Behavior Cloning. Across our experiments, we utilized a sequence representation that includes return-to-go tokens, as commonly used in DTs (Chen et al., 2021; Lee et al., 2022). However, many recent works focus on behavior cloning without return conditioning (Reed et al., 2022; Brohan et al., 2023a). Therefore, we study the effect of excluding the RTG/reward tokens from the sequence at the 206M parameter scale, to validate that our findings transfer to the behavior cloning setting. Indeed, we find that the same trends hold (see Figures 28 and 29). + +mLSTM-to-sLSTM Ratio. Throughout experiments, we compare two xLSTM variants: xLSTM [7:1] and xLSTM [1:0]. These ratios were proposed by Beck et al. (2024) and + +we maintain the same ratios for consistency (see Appendix C.3). While mLSTM is parallelizable, sLSTM enables state-tracking (Merrill et al., 2024). To better understand the effect of the ratio, we conduct ablation studies both on the 432 tasks and on Dark-Room (see Appendix E.3), similar to Beck et al. (2024). We find that other ratios, such as [3:1], can be effective, and highlight the importance of placing sLSTMs at lower-level layers (Figure 31). However, the effectiveness of sLSTM layers is dependent on the task at hand. Complex tasks with long horizons or partial observability, as are common in real-world applications, may benefit from the state-tracking abilities provided by sLSTM. + +We present additional ablations on the effect of reducing the number of layers in xLSTM and disabling Dropout on DT in Appendix E.5 and E.4, respectively. + +# 4.4. Inference Time Comparison + +Finally, we empirically examine the difference between recurrent and Transformer-based agents at inference time. Similar to De et al. (2024), we report both latency and throughput. We focus our analysis on latency, as it is the more important dimension for real-time applications. + +Setup. We conduct all inference time tests on A100s with 40GB of RAM using 206M models. For the Transformer, we use KV-caching and FlashAttention (Dao, 2023) as supported by PyTorch (Paszke et al., 2019). For xLSTM, we use recurrent-style inference using custom kernels to accelerate computations (see Figure 21 for the impact of kernel acceleration). For Mamba, we make use of the kernels introduced by Gu & Dao (2023). For DT and xLSTM, we use torch.compile, but not for Mamba because we found the kernels to be incompatible with compilation. The Transformer with KV-caching has a linear time complexity per step and quadratic in the sequence length. In contrast, the xLSTM and Mamba have a constant time complexity per + +step and are linear in the sequence length. Therefore, we expect speed-ups especially for longer sequences and larger batch sizes, as observed by De et al. (2024). To ensure a fair comparison, we compare all backbones with the same number of layer blocks and increase the hidden size of xLSTM and Mamba to match the number of parameters of DT (see Appendix E.5 for evaluation performance of these models). We provide further details on our inference time tests in Appendix D.5. + +Environment. We conduct all inference time tests on the environment that exhibited the longest average episode lengths in our experiments, the Atari game Freeway. Every episode in Freeway lasts for 8192 steps, which is equivalent to 24576 tokens (s/rtg/r). We evaluate all models for 5 episodes and preserve the KV-cache/hidden state across episode boundaries. The reported latencies and throughputs are averaged across all evaluation episodes, except for the first episode, which we discard to exclude compilation times and prefetching. We opted for measuring the inference times during environment interaction, i.e., including simulator latency, rather than mere token generation. + +Latency. Similar to De et al. (2024), we measure latency by the average time (in seconds) taken to perform a single inference step with a fixed batch size $B$ (lower is better). In Figure, 6, we report the latencies for varying context lengths, $C \in [50,25600]$ and two batch sizes $B \in \{1,16\}$ . Note that $C$ is in time steps, and every time step contains 3 tokens (state, reward-to-go, reward). Hence, the effective sequence length for the largest $C$ is 76800. As expected, we find that the recurrent backbones attain lower inference latencies than the Transformer one, especially for longer sequences and with a larger batch size. For $B = 1$ , we find that Mamba is slower than the Transformer and xLSTM, which we believe is because of the incompatibility with torch.compile. Note that we expect the gap to xLSTM to be closed with compatible kernels. As the sequence length increases, DT runs out of memory due to the increasing size of the KV cache (see Figure 6c). In contrast, the inference speeds for Mamba/xLSTM are independent of the context length and therefore, enable significantly longer context lengths. This property is particularly interesting for in-context RL, which requires keeping multiple episodes in the context (Laskin et al., 2022). Nevertheless, our experiments highlight that the materialization of the complexity advantage depends on the device, model size, batch size, and the context length, which is similar to findings by De et al. (2024). + +Throughput. Throughput is measured by the total number of inference steps performed per second for a model with a fixed context length. In Figure 7, we report the throughputs for varying batch sizes, $B \in [1,128]$ for a fixed context length of $C = 1600$ . Here, the batch size can be interpreted as the number of parallel environments the agent interacts + +![](images/d4ec131c906046be9050d499fffb90aaa3ade02522952087cd78d9f8a0d6e5ea.jpg) +Figure 7. Throughput comparison on A100 for varying batch sizes with $C = 1600$ timesteps on the Atari Freeway environment. We compare DT, xLSTM with 4 and 16 heads, and Mamba. Missing bars for DT indicate OOM. + +with. For xLSTM, we report numbers for two variants with 4 and 16 heads, respectively. We found that decreasing the head dimension (more heads, same total hidden dim) is important for xLSTM to enable high throughput. This is because a higher head dimension incurs more FLOPS (see Figure 22 in Appendix D.5.4 for an ablation on the impact of the head dimension). As expected, we find that both Mamba and xLSTM attain considerably higher throughputs than the DT. These benefits increase with larger batch sizes. While the DT with quadratic complexity in the sequence length goes OOM for batch sizes above 64, the recurrent backbones with linear complexity can easily handle larger batch sizes. This throughput advantage may be particularly relevant for online fine-tuning of agents in many parallel environments. + +# 5. Conclusion + +In this work, we study the aptitude of modern recurrent architectures as alternatives to Transformers for building LAMs. We found that our LRAM with an xLSTM or Mamba at its core compares favorably to the Transformer in terms of evaluation performance across model scales ranging from 16M to 206M parameters (see Section 4.2). Moreover, we demonstrated that LRAM exhibits higher inference speeds, especially at large context sizes (see Section 4.4). Thus, the empirical evidence suggests that recurrent backbones can be attractive alternatives for LAMs. Notably, the linear-time inference complexity of xLSTM and Mamba may enable applications that require long context lengths (e.g., ICL) and facilitate the application of large-scale agents for real-time applications, such as robotics. + +Modern recurrent architectures and Transformers come with different advantages and disadvantages. xLSTM and Mamba, on the one hand, exhibit a fundamental complexity advantage over Transformers. Their linear complexity + +ensures that the computational requirements increase more slowly with the sequence length, which enables more efficient inference and is particularly relevant for edge applications. While we conduct our inference time comparisons on a high-end data center GPU, applications on edge devices may have to deal with less powerful accelerators. Importantly, we found that LAMs strongly benefit from longer sequences (see Section 4.3). Their ability to efficiently handle long sequences can be beneficial for applications in real-world environments, which often exhibit long-term dependencies. Similarly, longer context can be relevant for ICL applications, which benefit from keeping multiple episodes (such as demonstrations or previous trials) in the context. Transformers, on the other hand, are effective for applications that require exact recall of tokens (such as particular locations in a grid, signs in an image) in a sequence, which can be important for decision-making (Ni et al., 2024). Finally, xLSTM in particular enables state-tracking via sLSTM blocks, which Transformers and Mamba cannot perform (Merrill et al., 2024). State tracking can be important for logic tasks or dealing with partial observability and may be a useful tool for practitioners. Given these differences, different backbones should be considered depending on the task at hand. + +Limitations & Future Work. The primary target application of LAMs is robotics. While the majority of our experiments involve robotic simulations, we do not yet provide experiments for real robots. We do, however, believe that our findings translate to real-world scenarios and aim to provide further evidence in future work. Moreover, our fine-tuning experiments are limited to offline RL. We envision that an agent pre-trained on large-scale datasets can be successfully fine-tuned via online RL to explore new strategies that do not appear in the training data. Modern recurrent architectures offer both parallel and recurrent training modes, which might be the key to success for such applications. While we provide evidence for improved ICL abilities of LRAM, we only consider a grid-world setting. We aim to further investigate the ICL abilities of LRAM in more complex environments. + +# Impact Statement + +While we conduct all our experiments in simulated environments, the primary target application of our method is robotics. We believe that our work can positively impact applications in the near future that require efficient inference, on-device processing, or have real-time constraints. However, robotics applications in the real world are not without risks. In particular, in areas where humans are involved, such as factory settings, special care is required. LAMs are trained via next-action prediction similar to LLMs. Consequently, LAMs may also suffer from hallucinations in + +unknown scenarios. We therefore strongly discourage users from blindly following the predictions made by real-world LAMs without appropriate precautions regarding safety and robustness. It is essential to ensure the responsible deployment of such future technologies, and we believe that more research on the robustness of LAMs is necessary. + +# Acknowledgements + +We acknowledge EuroHPC Joint Undertaking for awarding us access to Karolina at IT4Innovations, Czech Republic, MeluXina at LuxProvide, Luxembourg, and Leonardo at CINECA, Italy. The ELLIS Unit Linz, the LIT AI Lab, the Institute for Machine Learning, are supported by the Federal State Upper Austria. We thank the projects FWF AIRI FG 9-N (10.55776/FG9), AI4GreenHeatingGrids (FFG-899943), Stars4Waters (HORIZON-CL6-2021-CLIMATE-01-01), FWF Bilateral Artificial Intelligence (10.55776/COE12). We thank NXAI GmbH, Audi AG, Silicon Austria Labs (SAL), Merck Healthcare KGaA, GLS (Univ. Waterloo), TÜV Holding GmbH, Software Competence Center Hagenberg GmbH, dSPACE GmbH, TRUMPF SE + Co. KG. + +# References + +Agarwal, R., Schuurmans, D., and Norouzi, M. An optimistic perspective on offline reinforcement learning. In International Conference on Machine Learning, pp. 104-114. PMLR, 2020. +Agarwal, R., Schwarzer, M., Castro, P. S., Courville, A. C., and Bellemare, M. Deep reinforcement learning at the edge of the statistical precipice. Advances in neural information processing systems, 34:29304-29320, 2021. +Alkin, B., Beck, M., Poppel, K., Hochreiter, S., and Brandstetter, J. Vision-lstm: xlstm as generic vision backbone. CoRR, abs/2406.04303, 2024. doi: 10.48550/ARXIV.2406.04303. URL https://doi.org/10.48550/arXiv.2406.04303. +Baevski, A., Zhou, Y., Mohamed, A., and Auli, M. wav2vec 2.0: A framework for self-supervised learning of speech representations. Advances in Neural Information Processing Systems, 33:12449-12460, 2020. +Beck, M., Poppel, K., Spanring, M., Auer, A., Prudnikova, O., Kopp, M., Klambauer, G., Brandstetter, J., and Hochreiter, S. xlstm: Extended long short-term memory. CoRR, abs/2405.04517, 2024. doi: 10.48550/ARXIV.2405.04517. URL https://doi.org/10.48550/arXiv.2405.04517. +Bellemare, M. G., Naddaf, Y., Veness, J., and Bowling, M. The Arcade learning environment: An evaluation plat + +form for general agents. Journal of Artificial Intelligence Research, 47:253-279, 2013. +Bellemare, M. G., Candido, S., Castro, P. S., Gong, J., Machado, M. C., Moitra, S., Ponda, S. S., and Wang, Z. Autonomous navigation of stratospheric balloons using reinforcement learning. Nature, 588(7836):77-82, 2020. +Berner, C., Brockman, G., Chan, B., Cheung, V., Dkebiak, P., Dennison, C., Farhi, D., Fischer, Q., Hashme, S., Hesse, C., et al. Dota 2 with large scale deep reinforcement learning. arXiv preprint arXiv:1912.06680, 2019. +Brohan, A., Brown, N., Carbajal, J., Chebotar, Y., Chen, X., Choromanski, K., Ding, T., Driess, D., Dubey, A., Finn, C., et al. Rt-2: Vision-language-action models transfer web knowledge to robotic control. arXiv preprint arXiv:2307.15818, 2023a. +Brohan, A., Brown, N., Carbajal, J., Chebotar, Y., Dabis, J., Finn, C., Gopalakrishnan, K., Hausman, K., Herzog, A., Hsu, J., Ibarz, J., Ichter, B., Irpan, A., Jackson, T., Jes-month, S., Joshi, N. J., Julian, R., Kalashnikov, D., Kuang, Y., Leal, I., Lee, K., Levine, S., Lu, Y., Malla, U., Manjunath, D., Mordatch, I., Nachum, O., Parada, C., Peralta, J., Perez, E., Pertsch, K., Quiambao, J., Rao, K., Ryoo, M. S., Salazar, G., Sanketi, P. R., Sayed, K., Singh, J., Sontakke, S., Stone, A., Tan, C., Tran, H. T., Vanhoucke, V., Vega, S., Vuong, Q., Xia, F., Xiao, T., Xu, P., Xu, S., Yu, T., and Zitkovich, B. RT-1: robotics transformer for real-world control at scale. In Bekris, K. E., Hauser, K., Herbert, S. L., and Yu, J. (eds.), Robotics: Science and Systems XIX, Daegu, Republic of Korea, July 10-14, 2023, 2023b. doi: 10.15607/RSS.2023.XIX.025. URL https://doi.org/10.15607/RSS.2023.XIX.025. +Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., and Amodei, D. Language models are few-shot learners. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 1877-1901. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/1457c0d6bfbcb4967418bfb8ac142f64a-Paper.pdf. +Chen, L., Lu, K., Rajeswaran, A., Lee, K., Grover, A., Laskin, M., Abbeel, P., Srinivas, A., and Mordatch, I. Decision transformer: Reinforcement learning via sequence modeling. Advances in neural information processing systems, 34:15084-15097, 2021. + +Chignoli, M., Kim, D., Stanger-Jones, E., and Kim, S. The mit humanoid robot: Design, motion planning, and control for acrobatic behaviors. In 2020 IEEE-RAS 20th International Conference on Humanoid Robots (Humanoids), pp. 1-8. IEEE, 2021. +Cho, K., van Merrienboer, B., Gülçehre, C., Bahdanau, D., Bougares, F., Schwenk, H., and Bengio, Y. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Moschitti, A., Pang, B., and Daelemans, W. (eds.), Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014, October 25-29, 2014, Doha, Qatar; A meeting of SIGDAT, a Special Interest Group of the ACL, pp. 1724-1734. ACL, 2014. doi: 10.3115/V1/D14-1179. URL https://doi.org/10.3115/v1/d14-1179. +Cobbe, K., Hesse, C., Hilton, J., and Schulman, J. Leveraging procedural generation to benchmark reinforcement learning. In International conference on machine learning, pp. 2048-2056. PMLR, 2020a. +Cobbe, K., Hesse, C., Hilton, J., and Schulman, J. Leveraging procedural generation to benchmark reinforcement learning. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pp. 2048-2056. PMLR, 2020b. URL http://proceedings.mlr.press/v119/cobbe20a.html. +Dai, Y., Ma, O., Zhang, L., Liang, X., Hu, S., Wang, M., Ji, S., Huang, J., and Shen, L. Is mamba compatible with trajectory optimization in offline reinforcement learning? arXiv preprint arXiv:2405.12094, 2024. +Dao, T. Flashattention-2: Faster attention with better parallelism and work partitioning. arXiv preprint arXiv:2307.08691, 2023. +Dao, T. and Gu, A. Transformers are ssms: Generalized models and efficient algorithms through structured state space duality. arXiv preprint arXiv:2405.21060, 2024. +De, S., Smith, S. L., Fernando, A., Botev, A., Cristian-Muraru, G., Gu, A., Haroun, R., Berrada, L., Chen, Y., Srinivasan, S., et al. Griffin: Mixing gated linear recurrences with local attention for efficient language models. arXiv preprint arXiv:2402.19427, 2024. +Degrave, J., Felici, F., Buchli, J., Neunert, M., Tracey, B., Carpanese, F., Ewalds, T., Hafner, R., Abdelmaleki, A., de Las Casas, D., et al. Magnetic control of tokamak plasmas through deep reinforcement learning. Nature, 602(7897):414-419, 2022. + +Devlin, J., Chang, M., Lee, K., and Toutanova, K. BERT: pre-training of deep bidirectional transformers for language understanding. In Burstein, J., Doran, C., and Solorio, T. (eds.), Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pp. 4171-4186. Association for Computational Linguistics, 2019. doi: 10.18653/v1/n19-1423. +Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., and Houlsby, N. An image is worth 16x16 words: Transformers for image recognition at scale. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net, 2021. +El-Hussieny, H. Real-time deep learning-based model predictive control of a 3-dof biped robot leg. Scientific Reports, 14(1):16243, 2024. +Elman, J. L. Finding structure in time. Cogn. Sci., 14(2): 179-211, 1990. doi: 10.1207/S15516709COG1402\_1. URL https://doi.org/10.1207/s15516709cog1402_1. +Embodiment Collaboration, O'Neill, A., Rehman, A., Maddukuri, A., Gupta, A., Padalkar, A., Lee, A., Pooley, A., Gupta, A., Mandlekar, A., Jain, A., Tung, A., Bewley, A., Herzog, A., Irpan, A., Khazatsky, A., Rai, A., Gupta, A., Wang, A., Singh, A., Garg, A., Kembhavi, A., Xie, A., Brohan, A., Raffin, A., Sharma, A., Yavary, A., Jain, A., Balakrishna, A., Wahid, A., Burgess-Limerick, B., Kim, B., Scholkopf, B., Wulfe, B., Ichter, B., Lu, C., Xu, C., Le, C., Finn, C., Wang, C., Xu, C., Chi, C., Huang, C., Chan, C., Agia, C., Pan, C., Fu, C., Devin, C., Xu, D., Morton, D., Driess, D., Chen, D., Pathak, D., Shah, D., Büchler, D., Jayaraman, D., Kalashnikov, D., Sadigh, D., Johns, E., Foster, E., Liu, F., Ceola, F., Xia, F., Zhao, F., Stulp, F., Zhou, G., Sukhatme, G. S., Salhotra, G., Yan, G., Feng, G., Schiavi, G., Berseth, G., Kahn, G., Wang, G., Su, H., Fang, H., Shi, H., Bao, H., Amor, H. B., Christensen, H. I., Furuta, H., Walke, H., Fang, H., Ha, H., Mordatch, I., Radosavovic, I., Leal, I., Liang, J., AbouChakra, J., Kim, J., Drake, J., Peters, J., Schneider, J., Hsu, J., Bohg, J., Bingham, J., Wu, J., Gao, J., Hu, J., Wu, J., Wu, J., Tan, J., Oh, J., Wu, J., Lu, J., Yang, J., Salvador, J., Lim, J. J., Han, J., Wang, K., Rao, K., Pertsch, K., Hausman, K., Go, K., Gopalakrishnan, K., Goldberg, K., Byrne, K., Kawaharazuka, K., Black, K., Lin, K., Zhang, K., Ehsani, K., Lekkala, K., Ellis, K., Rana, K., Fang, K., Singh, K., Zeng, K., Hatch, K., Hsu, K., Itti, L. Chen L. Y. Pinto L.Fei-Fei L.TanL.FanL.Ott L. LeeL.WeihsL.ChenM.LepertM.MemmelM. + +Tomizuka, M., Itkina, M., Castro, M. G., Spero, M., Du, M., Ahn, M., Yip, M. C., Zhang, M., Ding, M., Heo, M., Srirama, M. K., Sharma, M., Kim, M. J., Kanazawa, M., Hansen, N., Heess, N., Joshi, N. J., Suenderhauf, N., Liu, N., Palo, N. D., Shafiullah, N., Mees, O., Kroemer, O., Bastani, O., Sanketi, P. R., Miller, P., Yin, P., Wohlhart, P., Xu, P., Fagan, P., Mitrano, P., Sermanet, P., Abbeel, P., Sundaresan, P., Chen, Q., Vuong, Q., Rafailov, R., Tian, R., Doshi, R., Martin-Martin, R., Baijal, R., Scalise, R., Hendrix, R., Lin, R., Qian, R., Zhang, R., Mendonca, R., Shah, R., Hoque, R., Julian, R., Bustamante, S., Kirmani, S., Levine, S., Lin, S., Moore, S., Bahl, S., Dass, S., Sonawani, S., Song, S., Xu, S., Haldar, S., Karamcheti, S., Adebola, S., Guist, S., Nasiriany, S., Schaal, S., Welker, S., Tian, S., Ramamoorthy, S., Dasari, S., Belkhale, S., Park, S., Nair, S., Mirchandani, S., Osa, T., Gupta, T., Harada, T., Matsushima, T., Xiao, T., Kollar, T., Yu, T., Ding, T., Davchev, T., Zhao, T. Z., Armstrong, T., Darrell, T., Chung, T., Jain, V., Vanhoucke, V., Zhan, W., Zhou, W., Burgard, W., Chen, X., Wang, X., Zhu, X., Geng, X., Liu, X., Liangwei, X., Li, X., Lu, Y., Ma, Y., Kim, Y., Chebotar, Y., Zhou, Y., Zhu, Y., Wu, Y., Xu, Y., Wang, Y., Bisk, Y., Cho, Y., Lee, Y., Cui, Y., Cao, Y., Wu, Y., Tang Y. ZhuY.ZhangY.JiangY.LiY.LiY.Iwasawa Y. MatsuoY.MaZ.XuZ.CuiZ.ZhangZ.Fu Z. and Lin,Z.Open x-embodiment: Robotic learning datasets and rt-x models, 2024. +Espeholt, L., Soyer, H., Munos, R., Simonyan, K., Mnih, V., Ward, T., Doron, Y., Firoiu, V., Harley, T., Dunning, I., et al. Impala: Scalable distributed deep-rl with importance weighted actor-learner architectures. In International conference on machine learning, pp. 1407-1416. PMLR, 2018. +Firoozzi, R., Tucker, J., Tian, S., Majumdar, A., Sun, J., Liu, W., Zhu, Y., Song, S., Kapoor, A., Hausman, K., et al. Foundation models in robotics: Applications, challenges, and the future. The International Journal of Robotics Research, pp. 02783649241281508, 2023. +Franklin, G. F., Powell, J. D., Workman, M. L., et al. Digital control of dynamic systems, volume 3. Addison-wesley Menlo Park, 1998. +Frantar, E., Ashkboos, S., Hoefler, T., and Alistarh, D. OPTQ: accurate quantization for generative pretrained transformers. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net, 2023. URL https://openreview.net/forum?id=tcbBPnfwxS. +Fürst, A., Rumetshofer, E., Lehner, J., Tran, V., Tang, F., Ramsauer, H., Kreil, D., Kopp, M., Klambauer, G., Bitto + +Nemling, A., and Hochreiter, S. Cloob: Modern hopfield networks with infoloob outperform clip, 2022. +Gu, A. and Dao, T. Mamba: Linear-time sequence modeling with selective state spaces. CoRR, abs/2312.00752, 2023. doi: 10.48550/ARXIV.2312.00752. URL https://doi.org/10.48550/arXiv.2312.00752. +Gu, A., Johnson, I., Goel, K., Saab, K., Dao, T., Rudra, A., and Ré, C. Combining recurrent, convolutional, and continuous-time models with linear state space layers. In Ranzato, M., Beygelzimer, A., Dauphin, Y. N., Liang, P., and Vaughan, J. W. (eds.), Advances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021, NeurIPS 2021, December 6-14, 2021, virtual, pp. 572-585, 2021. URL https://proceedings.neurips.cc/paper/2021/bitstream/05546b0e38ab9175cd905eebcc6ebb76-Abstr.html. +Gu, A., Goel, K., Gupta, A., and Ré, C. On the parameterization and initialization of diagonal state space models. Advances in Neural Information Processing Systems, 35: 35971-35983, 2022a. +Gu, A., Goel, K., and Ré, C. Efficiently modeling long sequences with structured state spaces. In *The Tenth International Conference on Learning Representations*, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net, 2022b. URL https://openreview.net/forum?id=uYLFOz1vlAC. +Gu, J., Kirmani, S., Wohlhart, P., Lu, Y., Arenas, M. G., Rao, K., Yu, W., Fu, C., Gopalakrishnan, K., Xu, Z., Sundaresan, P., Xu, P., Su, H., Hausman, K., Finn, C., Vuong, Q., and Xiao, T. Rt-trajectory: Robotic task generalization via hindsight trajectory sketches, 2023. +Gu, X., Wang, Y.-J., and Chen, J. Humanoid-gym: Reinforcement learning for humanoid robot with zero-shot sim2real transfer, 2024. +Haarnoja, T., Zhou, A., Abbeel, P., and Levine, S. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In Dy, J. G. and Krause, A. (eds.), Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholm, Sweden, July 10-15, 2018, volume 80 of Proceedings of Machine Learning Research, pp. 1856-1865. PMLR, 2018. +Hafner, D., Lillicrap, T., Fischer, I., Villegas, R., Ha, D., Lee, H., and Davidson, J. Learning latent dynamics for planning from pixels. In International conference on machine learning, pp. 2555-2565. PMLR, 2019. + +He, K., Chen, X., Xie, S., Li, Y., Dollar, P., and Girshick, R. B. Masked autoencoders are scalable vision learners. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2022, New Orleans, LA, USA, June 18-24, 2022, pp. 15979-15988. IEEE, 2022. doi: 10.1109/CVPR52688.2022.01553. +Hessel, M., Modayil, J., van Hasselt, H., Schaul, T., Ostrovski, G., Dabney, W., Horgan, D., Piot, B., Azar, M. G., and Silver, D. Rainbow: Combining improvements in deep reinforcement learning. *ArXiv*, 2017. +Hinton, G. E., Vinyals, O., and Dean, J. Distilling the knowledge in a neural network. CoRR, abs/1503.02531, 2015. URL http://arxiv.org/abs/1503.02531. +Hochreiter, S. and Schmidhuber, J. Long short-term memory. Neural Comput., 9(8):1735-1780, 1997. +Hu, Y., Xie, Q., Jain, V., Francis, J., Patrikar, J., Keetha, N., Kim, S., Xie, Y., Zhang, T., Zhao, Z., et al. Toward general-purpose robots via foundation models: A survey and meta-analysis. arXiv preprint arXiv:2312.08782, 2023. +Hussing, M., Mendez, J. A., Singrodia, A., Kent, C., and Eaton, E. Robotic manipulation datasets for offline compositional reinforcement learning. arXiv preprint arXiv:2307.07091, 2023. +Janner, M., Li, Q., and Levine, S. Offline reinforcement learning as one big sequence modeling problem. Advances in neural information processing systems, 34: 1273-1286, 2021. +Jia, X., Blessing, D., Jiang, X., Reuss, M., Donat, A., Lioutikov, R., and Neumann, G. Towards diverse behaviors: A benchmark for imitation learning with human demonstrations. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=6pPYRXKPpw. +Jiang, Y., Gupta, A., Zhang, Z., Wang, G., Dou, Y., Chen, Y., Fei-Fei, L., Anandkumar, A., Zhu, Y., and Fan, L. Vima: General robot manipulation with multimodal prompts. arXiv preprint arXiv:2210.03094, 2022. +Jiang, Y., Gupta, A., Zhang, Z., Wang, G., Dou, Y., Chen, Y., Fei-Fei, L., Anandkumar, A., Zhu, Y., and Fan, L. Vima: General robot manipulation with multimodal prompts, 2023. +Jordan, M. I. Attractor dynamics and parallelism in a connectionist sequential machine, pp. 112-127. IEEE Press, 1990. ISBN 0818620153. + +Kaptuowski, S., Ostrovski, G., Dabney, W., Quan, J., and Munos, R. Recurrent experience replay in distributed reinforcement learning. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=r11yTjAqYX. +Katharopoulos, A., Vyas, A., Pappas, N., and Fleuret, F. Transformers are rnns: Fast autoregressive transformers with linear attention. In International conference on machine learning, pp. 5156-5165. PMLR, 2020. +Kim, M. J., Pertsch, K., Karamcheti, S., Xiao, T., Balakrishna, A., Nair, S., Rafailov, R., Foster, E., Lam, G., Sanketi, P., et al. Openvla: An open-source vision-language-action model. arXiv preprint arXiv:2406.09246, 2024. +Kim, S., Hooper, C., Wattanawong, T., Kang, M., Yan, R., Genc, H., Dinh, G., Huang, Q., Keutzer, K., Mahoney, M. W., et al. Full stack optimization of transformer inference: a survey. arXiv preprint arXiv:2302.14017, 2023. +Kirsch, L., Harrison, J., Freeman, C., Sohl-Dickstein, J., and Schmidhuber, J. Towards general-purpose in-context learning agents. In NeurIPS 2023 Workshop on Generalization in Planning, 2023. +Laskin, M., Lee, K., Stooke, A., Pinto, L., Abbeel, P., and Srinivas, A. Reinforcement learning with augmented data. ArXiv, 2004.14990, 2020. +Laskin, M., Wang, L., Oh, J., Parisotto, E., Spencer, S., Steigerwald, R., Strouse, D., Hansen, S., Filos, A., Brooks, E., et al. In-context reinforcement learning with algorithm distillation. arXiv preprint arXiv:2210.14215, 2022. +LeCun, Y., Denker, J. S., and Solla, S. A. Optimal brain damage. In Touretzky, D. S. (ed.), Advances in Neural Information Processing Systems 2, [NIPS Conference, Denver, Colorado, USA, November 27-30, 1989], pp. 598-605. Morgan Kaufmann, 1989. URL http://papers.nips.cc/paper/250-optimal-brain-damage. +Lee, J. N., Xie, A., Pacchiano, A., Chandak, Y., Finn, C., Nachum, O., and Brunskill, E. Supervised pretraining can learn in-context reinforcement learning. arXiv preprint arXiv:2306.14892, 2023. +Lee, K.-H., Nachum, O., Yang, M., Lee, L., Freeman, D., Xu, W., Guadarrama, S., Fischer, I., Jang, E., Michalewski, H., et al. Multi-game decision transformers. arXiv preprint arXiv:2205.15241, 2022. +Levine, S., Kumar, A., Tucker, G., and Fu, J. Offline reinforcement learning: Tutorial, review, and perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020. + +Loshchilov, I. and Hutter, F. Decoupled weight decay regularization. In International Conference on Learning Representations, 2018. +Mandlekar, A., Nasiriany, S., Wen, B., Akinola, I., Narang, Y., Fan, L., Zhu, Y., and Fox, D. Mimicgen: A data generation system for scalable robot learning using human demonstrations, 2023. +McInnes, L., Healy, J., and Melville, J. Umap: Uniform manifold approximation and projection for dimension reduction. arXiv preprint arXiv:1802.03426, 2018. +Mendez, J. A., Hussing, M., Gummadi, M., and Eaton, E. Compositue: A compositional reinforcement learning benchmark. In Chandar, S., Pascanu, R., and Precup, D. (eds.), Conference on Lifelong Learning Agents, CoLLAs 2022, 22-24 August 2022, McGill University, Montreal, Quebec, Canada, volume 199 of Proceedings of Machine Learning Research, pp. 982-1003. PMLR, 2022. URL https://proceedings.mlr.press/v199/mendez22a.html. +Meng, L., Wen, M., Yang, Y., Le, C., Li, X., Zhang, W., Wen, Y., Zhang, H., Wang, J., and Xu, B. Offline pretrained multi-agent decision transformer: One big sequence model conquers all starcraftiii tasks. arXiv preprint arXiv:2112.02845, 2021. +Merrill, W., Petty, J., and Sabharwal, A. The illusion of state in state-space models. CoRR, abs/2404.08819, 2024. doi: 10.48550/ARXIV.2404.08819. URL https://doi.org/10.48550/arXiv.2404.08819. +Micikevicius, P., Narang, S., Alben, J., Diamos, G., Elsen, E., Garcia, D., Ginsburg, B., Houston, M., Kuchaiev, O., Venkatesh, G., et al. Mixed precision training. arXiv preprint arXiv:1710.03740, 2017. +Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness, J., Bellemare, M. G., Graves, A., Riedmiller, M., Fidjeland, A. K., Ostrovski, G., Petersen, S., Beattie, C., Sadik, A., Antonoglou, I., King, H., Kumaran, D., Wierstra, D., Legg, S., and Hassabis, D. Human-level control through deep reinforcement learning. Nature, 518(7540): 529-533, 2015. doi: 10.1038/nature14236. +Ni, T., Ma, M., Eysenbach, B., and Bacon, P.-L. When do transformers shine in rl? decoupling memory from credit assignment. Advances in Neural Information Processing Systems, 36, 2024. +Octo Model Team, Ghosh, D., Walke, H., Pertsch, K., Black, K., Mees, O., Dasari, S., Hejna, J., Kreiman, T., Xu, C., Luo, J., Tan, Y. L., Sanketi, P., Vuong, Q., Xiao, T., Sadigh, D., Finn, C., and Levine, S. Octo: An opensource generalist robot policy, 2024. + +Orvieto, A., Smith, S. L., Gu, A., Fernando, A., Gülçehre, C., Pascanu, R., and De, S. Resurrecting recurrent neural networks for long sequences. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J. (eds.), International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pp. 26670-26698. PMLR, 2023. URL https://proceedings.mlr.press/v202/orvieto23a.html. +Ota, T. Decision mamba: Reinforcement learning via sequence modeling with selective state spaces. arXiv preprint arXiv:2403.19925, 2024. +Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., et al. Pytorch: An imperative style, high-performance deep learning library. Advances in neural information processing systems, 32, 2019. +Patil, V., Hofmarcher, M., Dinu, M., Dorfer, M., Blies, P. M., Brandstetter, J., Arjona-Medina, J. A., and Hochreiter, S. Align-rudder: Learning from few demonstrations by reward redistribution. In Chaudhuri, K., Jegelka, S., Song, L., Szepesvari, C., Niu, G., and Sabato, S. (eds.), International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 of Proceedings of Machine Learning Research, pp. 17531-17572. PMLR, 2022. +Raad, M. A., Ahuja, A., Barros, C., Besse, F., Bolt, A., Bolton, A., Brownfield, B., Buttimore, G., Cant, M., Chakera, S., et al. Scaling instructable agents across many simulated worlds. arXiv preprint arXiv:2404.10179, 2024. +Radford, A., Narasimhan, K., Salimans, T., Sutskever, I., et al. Improving language understanding by generative pre-training. 2018. +Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., Sutskever, I., et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019. +Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., Krueger, G., and Sutskever, I. Learning transferable visual models from natural language supervision. In Meila, M. and Zhang, T. (eds.), Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pp. 8748-8763. PMLR, 2021. +Radford, A., Kim, J. W., Xu, T., Brockman, G., McLeavey, C., and Sutskever, I. Robust speech recognition via large + +scale weak supervision. arXiv preprint arXiv:2212.04356, 2022. +Raparthy, S. C., Hambro, E., Kirk, R., Henaff, M., and Raileanu, R. Generalization to new sequential decision making tasks with in-context learning, 2023. +Reed, S. E., Zolna, K., Parisotto, E., Colmenarejo, S. G., Novikov, A., Barth-Maron, G., Gimenez, M., Sulsky, Y., Kay, J., Springenberg, J. T., Eccles, T., Bruce, J., Razavi, A., Edwards, A., Heess, N., Chen, Y., Hadsell, R., Vinyals, O., Bordbar, M., and de Freitas, N. A generalist agent. CoRR, abs/2205.06175, 2022. doi: 10.48550/arXiv.2205.06175. +Salzmann, T., Kaufmann, E., Arrizabalaga, J., Pavone, M., Scaramuzza, D., and Ryll, M. Real-time neural mpc: Deep learning model predictive control for quadrotors and agile robotic platforms. IEEE Robotics and Automation Letters, 8(4):2397-2404, 2023. +Schmidhuber, J. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Comput., 4(1):131-139, 1992. doi: 10.1162/NECO.1992.4.1.131. URL https://doi.org/10.1162/neco.1992.4.1.131. +Schmidhuber, J. Reinforcement learning upside down: Don't predict rewards-just map them to actions. arXiv preprint arXiv:1912.02875, 2019. +Schmidinger, N., Schneckenreiter, L., Seidl, P., Schimunek, J., Luukkonen, S., Hoedt, P-J., Brandstetter, J., Mayr, A., Hochreiter, S., and Klambauer, G. Bio-xlstm: Generative modeling, representation and in-context learning of biological and chemical sequences. *Under review*, 2024. +Schmidt, D. and Schmied, T. Fast and data-efficient training of rainbow: an experimental study on atari. arXiv preprint arXiv:2111.10247, 2021. +Schmied, T., Hofmacher, M., Paischer, F., Pascanu, R., and Hochreiter, S. Learning to modulate pre-trained models in rl. Advances in Neural Information Processing Systems, 36, 2024a. +Schmied, T., Paischer, F., Patil, V., Hofmarcher, M., Pascanu, R., and Hochreiter, S. Retrieval-augmented decision transformer: External memory for in-context rl. arXiv preprint arXiv:2410.07071, 2024b. +Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. Proximal policy optimization algorithms. ArXiv, 2018. +Schwarzer, M., Ceron, J. S. O., Courville, A., Bellemare, M. G., Agarwal, R., and Castro, P. S. Bigger, better, faster: Human-level atari with human-level efficiency. + +In International Conference on Machine Learning, pp. 30365-30380. PMLR, 2023. +Schweighofer, K., Dinu, M.-c., Radler, A., Hofmarcher, M., Patil, V. P., Bitto-Nemling, A., Eghbal-zadeh, H., and Hochreiter, S. A dataset perspective on offline reinforcement learning. In Conference on Lifelong Learning Agents, pp. 470-517. PMLR, 2022. +Shang, J., Kahatapitiya, K., Li, X., and Ryoo, M. S. Starformer: Transformer with state-action-reward representations for visual reinforcement learning. In European Conference on Computer Vision, pp. 462-479. Springer, 2022. +Siebenborn, M., Belousov, B., Huang, J., and Peters, J. How crucial is transformer in decision transformer? arXiv preprint arXiv:2211.14655, 2022. +Silver, D., Huang, A., Maddison, C. J., Guez, A., Sifre, L., van den Driessche, G., Schrittwieser, J., Antonoglou, I., Panneershelvam, V., Lanctot, M., Dieleman, S., Grewe, D., Nham, J., Kalchbrenner, N., Sutskever, I., Lillicrap, T. P., Leach, M., Kavukcuoglu, K., Graepel, T., and Hassabis, D. Mastering the game of Go with deep neural networks and tree search. Nature, 529(7587):484-489, 2016. doi: 10.1038/nature16961. +Smith, J. T. H., Warrington, A., and Linderman, S. W. Simplified state space layers for sequence modeling. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net, 2023. URL https://openreview.net/forum?id=Ai8Hw3AXqks. +Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., and Salakhutdinov, R. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1):1929-1958, 2014. +Tassa, Y., Doron, Y., Muldal, A., Erez, T., Li, Y., de Las Casas, D., Budden, D., Abdelmaleki, A., Merel, J., Lefrancq, A., Lillicrap, T. P., and Riedmiller, M. A. Deepmind control suite. CoRR, abs/1801.00690, 2018. +Tay, Y., Dehghani, M., Abnar, S., Shen, Y., Bahri, D., Pham, P., Rao, J., Yang, L., Ruder, S., and Metzler, D. Long range arena: A benchmark for efficient transformers. arXiv preprint arXiv:2011.04006, 2020. +Todorov, E., Erez, T., and Tassa, Y. MuJoCo: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026-5033, October 2012a. doi: 10.1109/IROS.2012.6386109. + +Todorov, E., Erez, T., and Tassa, Y. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026-5033. IEEE, 2012b. +Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., Bhosale, S., Bikel, D., Blecher, L., Canton-Ferrer, C., Chen, M., Cucurull, G., Esiobu, D., Fernandes, J., Fu, J., Fu, W., Fuller, B., Gao, C., Goswami, V., Goyal, N., Hartshorn, A., Hosseini, S., Hou, R., Inan, H., Kardas, M., Kerkez, V., Khabsa, M., Kloumann, I., Korenev, A., Koura, P. S., Lachaux, M., Lavril, T., Lee, J., Liskovich, D., Lu, Y., Mao, Y., Martinet, X., Mihaylov, T., Mishra, P., Molybog, I., Nie, Y., Poulton, A., Reizenstein, J., Rungta, R., Saladi, K., Schelten, A., Silva, R., Smith, E. M., Subramanian, R., Tan, X. E., Tang, B., Taylor, R., Williams, A., Kuan, J. X., Xu, P., Yan, Z., Zarov, I., Zhang, Y., Fan, A., Kambadur, M., Narang, S., Rodriguez, A., Stojnic, R., Edunov, S., and Scialom, T. Llama 2: Open foundation and fine-tuned chat models. CoRR, abs/2307.09288, 2023. doi: 10.48550/ARXIV.2307.09288. URL https://doi.org/10.48550/arXiv.2307.09288. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, I., and Polosukhin, I. Attention is all you need. Advances in neural information processing systems, 30, 2017. +Vinyals, O., Babuschkin, I., Czarnecki, W. M., Mathieu, M., Dudzik, A., Chung, J., Choi, D. H., Powell, R., Ewalds, T., Georgiev, P., Oh, J., Horgan, D., Kroiss, M., Danihelka, I., Huang, A., Sifre, L., Cai, T., Agapiou, J. P., Jaderberg, M., Vezhnevets, A. S., Leblond, R., Pohlen, T., Dalibard, V., Budden, D., Sulsky, Y., Molloy, J., Paine, T. L., Gülçehre, C., Wang, Z., Pfaff, T., Wu, Y., Ring, R., Yogatama, D., Wünsch, D., McKinney, K., Smith, O., Schaul, T., Lillicrap, T. P., Kavukcuoglu, K., Hassabis, D., Apps, C., and Silver, D. Grandmaster level in starcraft II using multi-agent reinforcement learning. Nat., 575(7782):350-354, 2019. doi: 10.1038/s41586-019-1724-z. +Wang, G., Xie, Y., Jiang, Y., Mandlekar, A., Xiao, C., Zhu, Y., Fan, L., and Anandkumar, A. Voyager: An open-ended embodied agent with large language models, 2023. +Wang, K., Zhao, H., Luo, X., Ren, K., Zhang, W., and Li, D. Bootstrapped transformer for offline reinforcement learning. arXiv preprint arXiv:2206.08569, 2022. +Wen, C., Lin, J., Darrell, T., Jayaraman, D., and Gao, Y. Fighting copycat agents in behavioral cloning from observation histories. Advances in Neural Information Processing Systems, 33:2564-2575, 2020. +Wolczyk, M., Zajkac, M., Pascanu, R., Kuciński, L., and Milos, P. Continual world: A robotic benchmark for + +continual reinforcement learning. Advances in Neural Information Processing Systems, 34:28496-28510, 2021. +Yu, T., Kumar, S., Gupta, A., Levine, S., Hausman, K., and Finn, C. Gradient surgery for multi-task learning. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020a. +Yu, T., Quillen, D., He, Z., Julian, R., Hausman, K., Finn, C., and Levine, S. Meta-world: A benchmark and evaluation for multi-task and meta reinforcement learning. In Conference on robot learning, pp. 1094-1100. PMLR, 2020b. +Zheng, Q., Zhang, A., and Grover, A. Online decision transformer. In Chaudhuri, K., Jegelka, S., Song, L., Szepesvári, C., Niu, G., and Sabato, S. (eds.), International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 of Proceedings of Machine Learning Research, pp. 27042-27059. PMLR, 2022. +Zhu, G., Lin, Z., Yang, G., and Zhang, C. Episodic reinforcement learning with associative memory. In International Conference on Learning Representations, 2020. +Zhu, L., Liao, B., Zhang, Q., Wang, X., Liu, W., and Wang, X. Vision mamba: Efficient visual representation learning with bidirectional state space model. CoRR, abs/2401.09417, 2024. doi: 10.48550/ARXIV.2401.09417. URL https://doi.org/10.48550/arXiv.2401.09417. + +# Appendix + +# A. Reproducibility Statement + +We make the code base used for our experiments publicly available and release the datasets we generated. Both are available at: https://github.com/ml-jku/LRAM. We describe the environments we use for our experiments and provide dataset statistics in Appendix B. Furthermore, in Appendix C, we provide implementation details for all methods and a list of hyperparameters used for our experiments. In Appendix D, we present additional figures that accompany our results in the main text (e.g., all model sizes). Finally, in Appendices E and F, we provide further details on the conducted ablation studies and the embedding space analysis, respectively. + +# B. Environments & Datasets + +# B.1. General + +We compile a large-scale dataset comprising 432 tasks from six domains, 3.4M trajectories, and 894M transitions in total (see Table 2). A key motivation behind our dataset compilation is the scarcity of suitable datasets that span many simulated tasks. To address this and to enable a robust comparison of different sequence model architectures, we aimed to assemble a collection of datasets that span as many tasks as possible. In particular, we focused on trajectories in simulated environments rather than real-world trajectories (Embodiment Collaboration et al., 2024), to enable faster iteration cycles. To facilitate usability for future works, we consider standard benchmarks that are widely adopted by the community (e.g., Atari, Meta-World). + +We release our data pipeline and generated dataset, and hope that they can serve as a solid basis for future research on multi-task agents. To enable fast and targeted data-loading, every trajectory is stored in a separate hdf5 file. We trade off some data-loading speed for disk space efficiency by compressing trajectories that contain image-based observations. + +# B.2. Atari + +The Arcade Learning Environment (ALE) (Bellemare et al., 2013) is the standard benchmark for evaluating RL agents and consists of 57 Atari games. Input observations in Atari are RGB images, but as is standard practice, we gray-scale and crop frames $(|S| = 1 \times 64 \times 64)$ . There are 18 discrete actions across all 57 Atari games $(|A| = 18)$ , but individual games may use only a subset of these actions. Furthermore, we adopt the standard Atari recipe as used in prior works, including a frame skip of 4, maximum number of no-ops of 30, resetting on life loss, and reward clipping to $[-1,1]$ (Mnih et al., 2015; Hessel et al., 2017). + +Tasks. Similar to Lee et al. (2022), we assign 41 games to the training set and 5 additional tasks to the hold-out set. The 41 training tasks include: + +amidar, assault, asterix, atlantis, bank-heist, battle-zone, beam-rider, boxing, breakout, carnival, centipede, chopper-command, crazy-climber, demon-attack, double-dunk, enduro, fishing-derby, freeway, frostbite, gopher, gravitar, hero, ice-hockey, jamesbond, kangaroo, krull, kung-fu-master, name-this-game, phoenix, pooyan, qbert, riverraid, road-runner, robotank, seaquest, time-pilot, up-n-down, video-pinball, wizard-of-wor, yars-revenge, zaxxon + +The 5 hold-out tasks include: alien,pong,ms-pacman, space-invaders, star-gunner + +Dataset. For Atari, we leverage the DQN-Replay dataset released by Agarwal et al. (2020). The dataset contains the trajectories seen over the entire training of the DQN agent (50M frames). We extract a subset of the last 5M transitions for every task, amounting to 205M transitions in total for the 41 training tasks. The number of episodes, the episode lengths, and total achieved rewards vary across tasks, as shown in Table 2. + +# B.3. Meta-World + +The Meta-World benchmark (Yu et al., 2020a) consists of 50 manipulation tasks using a Sawyer robotic arm, ranging from opening or closing windows to pressing buttons. Meta-World is based on the MuJoCo physics engine (Todorov et al., 2012a). Observations in Meta-World are 39-dimensional continuous vectors $(|S| = 1 \times 64 \times 39)$ , and actions are represented by 6 + +Table 2. Atari Dataset Statistics. + +
Task# of TrajectoriesMean LengthMean Return
amidar18132753145
pooyan27731800176
frostbite521876618
video-pinball10233902266
wizard-of-wor3059131415
chopper-command545273818
breakout3780130039
phoenix3307150949
asterix525095155
enduro5718720636
kung-fu-master17752812131
hero30221345168
assault3782117077
demon-attack16492431116
qbert39391138155
jamesbond2841175811
bank-heist4146120462
up-n-down3246153899
centipede687958281
boxing4796104163
battle-zone1933213415
name-this-game9885049389
zaxxon2561195012
beam-rider1232324877
time-pilot3886102911
ice-hockey14653407-6
riverraid26451512143
krull30321319528
gopher18172338185
freeway2438204833
seaquest28071779150
double-dunk177428150
road-runner33081217135
atlantis186263491394
gravitar61876461
yars-revenge4094103696
crazy-climber11053954572
kangaroo1787279250
fishing-derby273718250
carnival2113119437
robotank747665256
Average33212734153
+ +continuous dimensions $(|\mathcal{A}| = 18)$ in range $[-1,1]$ . All tasks share a common action and state space. Following Wolczyk et al. (2021) and Schmied et al. (2024a), we limit the episode lengths to 200 interactions. + +Tasks. We follow Yu et al. (2020a) and split the 50 Meta-World tasks into 45 training tasks (MT45) and 5 evaluation tasks (MT5). + +The 45 training tasks are: + +reach, push, pick-place, door-open, drawer-open, drawer-close, button-press-topdown, peg-insert-side, window-open, window-close, door-close, reach-wall, pick-place-wall, push-wall, button-press, button-press-topdown-wall, button-press-wall, peg-unplug-side, disassemble, hammer, plate-slide, plate-slide-side, plate-slide-back, plate-slide-back-side, handle-press, handle-pull, handle-press-side, handle-pull-side, stick-push, stick-pull, basketball, soccer, faucet-open, faucet-close, coffee-push, coffee-pull, coffee-button, sweep, sweep-into, pick-out-of-hole, assembly, shelf-place, push-back, lever-pull, dial-turn + +The 5 evaluation tasks are: bin-picking, box-close, door-lock, door-unlock, hand-insert + +![](images/3298c9c7d70b092a18f59c8710074d29f4bf8c068ad04c2d35caa6351b59b972.jpg) +(a) IIWA + +![](images/05d75ba11d91c6ad568d346184a103ae2dd3979cf8ff02ce4f8cfadb7613c902.jpg) +(b) Panda + +![](images/9e9a762c9344d098aa4b48cdb86058e0cb00c95661df925979ee2bb02cf73725.jpg) +(c) Jaco +Figure 8. Illustration of the four supported robot arms in Composite (Mendez et al., 2022). + +![](images/9d50b3670eb8111ba1fdc8eb42e9e0d1051f4d01af40c9628e652454857a94a3.jpg) +(d) Gen3 + +Dataset. For Meta-World, we use the datasets released by (Schmied et al., 2024a), which contain 2M transitions per task and consequently 90M transitions in total for the training set. All episodes last for 200 environment interaction steps, and consequently, there are 10K episodes for every task. For detailed dataset statistics per task, we refer to their publication. + +# B.4. DMControl + +The DMControl benchmark (Tassa et al., 2018) consists of 30 different robotic tasks. Unlike Meta-World, the benchmark contains robots with different morphologies instead of a single common Sawyer arm. Due to the different robot morphologies, the state and action spaces vary across tasks ( $3 \leq |\mathcal{S}| \leq 24$ , $1 \leq |\mathcal{A}| \leq 6$ ), with all actions in the range $[-1, 1]$ . + +Tasks. We do not use all 30 tasks contained in the DMControl benchmark, but select 16 of the 30 tasks that have been used in prior works (Hafner et al., 2019; Schmied et al., 2024a;b), which we refer to as DMC11 and DMC5, respectively. + +The 11 training tasks are: + +finger-turneasy,fish-upright,hopper-stand,point mass-easy,walker-stand,walker-run, ball_in_cup-catch,cartpole-swingup,cheetah-run,finger-spin,reacher-easy + +The 5 evaluation tasks are: + +cartpole-balance, finger-turn-hard, pendulum-swingup, reacher-hard, walker-walk + +Dataset. For DMControl, we generate 10M transitions per task by training task-specific SAC (Haarnoja et al., 2018) agents, using the same setup as Schmied et al. (2024a). Episodes in all DMControl tasks last for 1000 environment steps, and per time-step a maximum reward of $+1$ can be achieved, which results in a maximum reward of 1000 per episode. Consequently, our training set contains 10K episodes per task, amounting to 110K episodes and 110M transitions in total across all tasks. We list the dataset statistics for all 11 tasks in Table 3. + +Table 3. DMControl Data statistics. + +
Task# of TrajectoriesMean LengthMean Return
point_masseasy10K1K851
cheetah_run10K1K385
walker_run10K1K230
ball_in_cup Catch10K1K969
hopper_stand10K1K460
walker_stand10K1K939
finger_turn_easy10K1K954
reacher_easy10K1K938
cartpole_swingup10K1K817
fish_upright10K1K815
finger_spin10K1K966
Average196281528.2
+ +# B.5. Composituite + +The Composite benchmark (Mendez et al., 2022) is a robotics benchmark for grasping and object manipulation. The benchmark is implemented on top of robotsuite (Zhu et al., 2020), which in turn leverages the MuJoCo simulator under the hood (Todorov et al., 2012b). Composite contains a mix of 4 simulated robot arms: IWA, Jaco, Gen3, and Panda (see Figure 8). All arms share a common state and action space containing 93 continuous state dimensions and 8 continuous action dimensions, respectively ( $|S| = 93$ , $|\mathcal{A}| = 8$ ). + +Tasks. CompoSuite is designed as a compositional multi-task benchmark for RL, in which a particular robot manipulates a particular object given an objective, while avoiding obstacles. Overall, there are 4 robot arms, 4 objects, 4 obstacles, and 4 task objectives. This results in 256 possible robot/object/objective/obstacle combinations. For our experiments, we assign 240 tasks to the training set and use the remaining 16 tasks as a hold-out set (Panda and Object_Wall) combinations. For a list of all 256 tasks, we refer to Mendez et al. (2022). + +Dataset. For Composite, we leverage the datasets released by Hussing et al. (2023). For every task, we select 2000 episodes, which last on average for 500 steps. This amounts to 1M transitions per task, and 240M transitions across all 240 training tasks. For dataset statistics, we refer to Hussing et al. (2023). + +# B.6. Mimicgen + +Similar to Compositue, Mimicgen (Mandlekar et al., 2023) is based on robosuite and the MuJoCo simulator. Mimicgen is designed for automatically synthesizing large-scale datasets from only a handful of human demonstrations. Observations in Mimicgen can be represented as images (from multiple cameras) or low-dimensional continuous states. For our experiments, we opt for the low-dimensional state representation to simplify learning. Therefore, observations and actions are represented by 37-dimensional and 7-dimensional continuous vectors, respectively $(|\mathcal{S}| = 37$ , $|\mathcal{A}| = 7)$ . Similar to Compositue, Mimicgen supports 4 different robot arms: Panda, IIWA, Sawyer, and UR5e (see Figure 9). + +![](images/7c7e6aba2c9b2122981703c2a0d3410ee53a8766edb70679746ecaad676e0b1b.jpg) +(a) IIWA + +![](images/231bc3902463768b38e193d9504a2d7437fe8a12d86722e1de85329d1bc9a682.jpg) +(b) Panda +Figure 9. Illustration of the four supported robot arms in Mimicgen (Mandlekar et al., 2023) solving the stack-three task. + +![](images/c63df8ca7b6f9f013c0833e0422ca35877c74c068c65321e76694d4438f058a9.jpg) +(c) Sawyer + +![](images/a6211267de7bbe547a529738b6a9281e673da82bd764e0706e9feef5cbcf63a6.jpg) +(d) UR5e + +Tasks. Mimicgen consists of 24 diverse tasks, including stacking blocks, reassembling objects, and even long-horizon tasks like coffee preparation. These 24 tasks can be performed with the four supported robot arms, amounting to 96 tasks in total. + +Dataset. Mandlekar et al. (2023) released datasets for the 24 tasks using the default robot arm Panda. To increase the dataset diversity, we additionally generated data for the remaining 3 robot arms. However, not all data generation runs produce successful trajectories, and we discard the ones with too few successful trajectories. Our final dataset for Mimicgen contains 83 training and 2 evaluation tasks. For each task, we collect 1000 successful demonstrations (we do not include unsuccessful trajectories). Episode lengths vary across tasks, ranging from 260 to 850 environment steps. + +# B.7.Procgen + +The Procgen benchmark consists of 16 procedurally-generated video games (Cobbe et al., 2020a). Observations in Procgen are RGB images of dimension $3 \times 64 \times 64$ . However, for training efficiency, we apply gray-scaling to image observations $(|\mathcal{S}| = 1 \times 64 \times 64)$ . All 16 environments share a common action space of 15 discrete actions $(|\mathcal{A}| = 16)$ . Procgen is designed to test the generalization abilities of RL agents. Consequently, procedural generation is employed to randomize background and colors, while retaining the game dynamics. + +Tasks. Following prior works (Raparthy et al., 2023; Schmied et al., 2024b), we assign 12 and 4 tasks to the training and hold-out sets, respectively. The 12 training tasks are: + +bigfish, bossfight, caveflyer, chaser, coinrun, dodgeball, fruitbot, heist, leaper, maze, miner, starpilot + +The 4 hold-out tasks are: climber, ninja, plunder, jumper + +Dataset. We leverage the datasets released by (Schmied et al., 2024b), which contain 20M transitions per task. The datasets were generated by recording all transitions observed by training RL agents for 25M steps, followed by uniform subsampling to 20M transitions. Consequently, the dataset contains mixed quality trajectories ranging from random (beginning of training) to expert (end of training). We list the dataset statistics for all 16 tasks in Table 4. + +Table 4. Procgen Data statistics. + +
Task# of TrajectoriesMean LengthMean Return
bigfish828352306.251
bossfight1124591411.946
caveflyer1516941057.745
chaser936122123.248
coinrun261117519.473
dodgeball1443641372.884
fruitbot7365327016.094
heist1013611968.405
leaper296084674.446
maze482245419.432
miner2888186811.8
starpilot9646820617.3
Average1820591448.3
+ +# C. Experimental & Implementation Details + +# C.1. Training & Evaluation + +In our experiments, we compare two variants of xLSTM, Mamba and DT. For our main experiments in Section 4.2, we train all models for 200K updates, and evaluate after every 50K update steps. We report the mean and $95\%$ confidence intervals over three seeds in our experiments, as suggested by Agarwal et al. (2021). For every evaluation task, we take the average of 3 evaluation seeds. + +We train our agents with a batch size of 128 and gradient accumulation across the 6 domains, such that every domain is represented with the same proportion. This is to compare Consequently, the effective batch size is 768. We use a learning rate of $1e^{-4}$ , 4000 linear warm-up steps followed by a cosine decay to $1e^{-6}$ , and train using the AdamW optimizer (Loshchilov & Hutter, 2018). In addition, we employ gradient clipping of 0.25, weight decay of 0.01 for all models. We do not employ Dropout, as is standard practice in DTs, as we found that it negatively affects performance (see Section 4.3). We use separate reward scales of 200, 100, and 20 for Meta-World, DMControl, and Atari, respectively. Furthermore, for all domains, we set the target return to the maximum return achieved for a particular task in the training datasets. This is particularly useful for domains where the maximum returns differ heavily across tasks (e.g., Atari). We list all hyperparameters in Table 5. + +We want to highlight that we opt to represent every domain with approximately equal proportion in every update step. This is, because we aim to study how the different backbones perform across domains, rather than optimizing performance on specific domains. However, to better understand the impact of the data ratios on multitask capabilities, we believe it would be interesting to study other data ratios in future work. Varying the data ratios would, for example, allow studying potential interferences between the 432 tasks. + +# C.2. Context Lengths + +By default, we train all models with a context length $C = 50$ timesteps. For every timestep, there are three tokens (s/rt/r), and consequently, the effective context length is 150. We found that performance improves for longer context lengths (see Section E.1), but limit our experiments to $C = 50$ to reduce the computational cost. + +Table 5. Hyperparameters for LRAM. + +
ParameterValue
Gradient steps200K
Evaluation frequency50K
Evaluation episodes5
OptimizerAdamW
Batch size128
Gradient accumulation6
Lr scheduleLinear warm-up + Cosine
Warm-up steps4000
Learning rate1e-4 → 1e-6
Weight decay0.01
Gradient clipping0.25
Dropout0.2
Context len (timesteps)50
Reward scaleper-domain
Target returnper-task
+ +# C.3. Model Architectures + +We train models across 4 model sizes: 16M, 48M, 110M, and 206M. We follow Lee et al. (2022) in selecting the number of layers and hidden dimensions. For xLSTM and Mamba, we use twice the number of layers blocks to match the number of parameters of the Transformer (Beck et al., 2024; Gu et al., 2024) (see Table 6) For our xLSTM [7:1] variant, which contains sLSTM blocks, we strive to maintain the same ratio as proposed by Beck et al. (2024). Not all our model sizes are divisible by 8, and only the 16M and 110M models exhibit the exact 7:1 ratio of mLSTM to sLSTM blocks. For consistency, however, we maintain the same notation as (Beck et al., 2024). We place sLSTM blocks at positions [1], [1, 3], [1, 3], and [1, 3, 5] for the 16M, 48M, 110M, 206M, respectively. + +Across backbones, we use linear layers to encode continuous states, reward returns-to-go, similar to Chen et al. (2021). The maximal state dimension across continuous control environments is 204 in our experiments. To use a shared linear embedding layer for continuous states, we pad states that have a lower number of dimensions to 204 dimensions using zeros. To encode image inputs on visual domains, we use the IMPALA-CNN proposed by Espeholt et al. (2018) and adopted by previous works on Procgen (Cobbe et al., 2020a) and Atari (Schmidt & Schmied, 2021; Schwarzer et al., 2023). Consequently, we do not make use of discretization of continuous states or patchification of images. This design choice significantly reduces the sequence length to only three tokens per time-step (see Appendix C.2) and consequently results in faster inference. + +For continuous actions, we make use of discretization and discretize of every action dimension into 256 uniformly-spaced bins, similar to Reed et al. (2022) and Brohan et al. (2023b). We experimented with lower/higher numbers of bins, but did not observe a benefit beyond 256 bins. Consequently, this resolution is sufficient for the environments we consider. We use a shared action head to predict the action bins of all continuous dimensions jointly. The maximum number of continuous action dimensions is 8 in our experiments, and consequently, the number of discrete action classes is 2048. In addition, there are 18 discrete actions originating from Atari and Progen. Therefore, our action head learns to predict the correct action among the 2066 discrete classes. While different environments may have different action dimensions, the model predicts all action dimensions jointly. At inference time, the number of action dimensions of the current environment is known, and we extract the respective dimensions from the joint predictions. We opt for the shared action head representation, as this further speeds up inference and does not require autoregressive action prediction. + +For the Transformer baseline, we use global positional embeddings similar to Chen et al. (2021). For the recurrent backbones, we do not make use of positional encodings. + +Table 6. Model Sizes. + +
ModelLayersHidden DimHeadsParameters
Transformer4512816M
Transformer67681248M
Transformer8102416110M
Transformer10128020206M
Mamba8512-16M
Mamba12768-48M
Mamba161024-110M
Mamba201280-206M
xLSTM8512416M
xLSTM12768448M
xLSTM1610244110M
xLSTM2012804206M
+ +# C.4. Hardware & Training Times + +We train all our models on a server equipped with 4 A100 GPUs. We use distributed data parallel to distribute the workload, as supported in PyTorch (Paszke et al., 2019). Training times range from 5 hours for the smallest DT model to 30 hours for the largest Mamba model. Throughout all our experiments, we use mixed precision training (Micikevicius et al., 2017) as supported in PyTorch to speed up training time. + +We evaluate our models after every 50K steps. However, periodically evaluating the trained agents on all 432 tasks sequentially is time-consuming. Therefore, we perform parallel evaluation with 4 processes at a time. For multi-GPU setups, we distribute the evaluation workload among the available GPUs. For example, with 4 available GPUs and 4 evaluation processes per GPU, 16 environments are evaluated simultaneously. Consequently, the total evaluation time for all 432 tasks ranges from 18 minutes for the smallest DT model to roughly 2 hours for the largest Mamba model. + +# D. Additional Results + +# D.1. Training Tasks + +In Figures 10 and 11, we report the normalized scores obtained per domain and the average learning curves across tasks for all four model sizes. + +![](images/f4696775cb4db73dc50aafa25825611f79335c52db25ecc698b9445a339b4313.jpg) +(a) 16M + +![](images/8e31105dba15b1d2005b754d27cc7985011e53705faad617d6709706c2d4c200.jpg) +(b) 48M + +![](images/aa4b2db9a689ab7f5005f989360e6f588658c1bf04ebc2e51b10234205292b50.jpg) +(c) 110M + +![](images/5bbdf1ff2fa987941327b28dc619b949bee87eb000d38f44bcbb32dbef8578fb.jpg) +(d) 206M +Figure 10. Normalized scores per-domain all four model sizes: 16M, 48M, 110M, and 206M. For Meta-World, DMControl, Mimicgen, Composite, and Progen we report data-normalized scores, for Atari we report human-normalized scores. + +In Figure 12, we report the training perplexity on the 432 training tasks over 200K updates. Here, we observe that the training perplexity behaves similarly to the validation perplexity. This is expected, as our models see most transitions only a single time (see Table 2 for the number of repetitions per domain). + +Furthermore, we report the scaling curves with an additional model size of 408M parameters in Figure 13. Due to the high computational cost of the 408M models, we were currently only able to conduct a single run for this size. However, we aim to provide further empirical evidence for these model sizes in future work. + +![](images/279a6dd1dec18569890a92135a80ef774e17dcb9fbfb34a40440fafe88cb6509.jpg) +(a) 16M + +![](images/ed2008099ac14deb41198e6579e0e3fb799eeb57f1777f708a4da8542c62573f.jpg) +(b) 48M + +![](images/94d5b8d491eb05e45d0e0fd65c73e694dfb23d8742e8519f293fba905281ce08.jpg) +(c) 110M + +![](images/97c01834df4894105472814f24a6ee8431312529a87afd75ee2fb2d77e39fb2b.jpg) +(d) 206M +Figure 11. Learning curves for all four model sizes, 16M, 48M, 110M, and 206M, on the training tasks. + +# D.2. Hold-out Tasks + +In Figure 14, we show the zero-shot evaluation performance on the hold-out tasks 14. We want to highlight that the performance declines for all methods and model sizes compared to performance on training tasks. This is because hold-out tasks exhibit severe shifts in state-spaces, action-spaces, and reward functions. + +# D.3. Fine-Tuning + +In Figure 15, we present the fine-tuning evaluation performance on the held-out tasks. We compare xLSTMs trained from scratch against xLSTMs initialized with the pre-trained weights. We do observe consistent improvement of the pre-trained models over the models trained from scratch. While we train on a substantial number of environments, the total amount of data used is still only a fraction of that employed in training other large-scale models, such as LLMs. Consequently, we do not observe comparable few-shot generalization. However, we anticipate that few-shot generalization capabilities will emerge as we increase both data volume and model size. + +# D.4. In-context Learning + +We assess the ICL abilities of modern recurrent architectures on the Dark-Room environment considered in prior works on in-context RL (Laskin et al., 2022; Lee et al., 2023; Schmied et al., 2024b). In Dark-Room, the agent is located in a dark room. The task is to navigate to an invisible goal location in that dark room. The state is partially observable, as the agent only observes its own x-y position on the grid $(|S| = 2)$ . The action space consists of 5 discrete actions: move up, move down, move left, move right, stay $(|A| = 5)$ . Upon reaching the goal location, the agent receives a reward of $+1$ for every step in the episode it resides in the goal location. Consequently, the agent first has to explore the room to find the goal. Once the goal location is found (as indicated by the positive reward), the agent can exploit this knowledge. Given a multi-episodic context, the agent should be able to exploit information contained in the previous trials (e.g., exploiting one path vs. avoiding another). + +In our experiments, the Dark-Room is a $10 \times 10$ grid and episodes last for 100 steps, starting in the top left corner of the + +![](images/f38df51ce34f8987b2878abc4477a72bc955d5167be24cb4d0d0803a54620907.jpg) +(a) Training Perplexity + +![](images/952b2fcda3955819987064993c822c25c6b9b562ac90acd14bd5a2902bb21cb3.jpg) +Figure 12. Scaling comparison. We compare xLSTM, Mamba, DT in four model sizes: 16M, 48M, 110M, and 206M parameters. We show the training perplexity on the training dataset to evaluate the sequence prediction performance. +(a) Sequence prediction + +![](images/8686bc66f3eba5e41c5dc7626bda915c8a978dddf4e976ac41353fc194176d0d.jpg) +(b) Environment interaction +Figure 13. Scaling comparison with additional 408M parameter models. We show the (a) validation perplexity on the hold-out datasets, and (b) normalized scores obtained from evaluating in the training task environments, averaged over all 6 domains. + +grid. We adopt the same experiment setup as Schmied et al. (2024b) and leverage their datasets. We train 16M parameter agents on datasets from 80 randomly selected goal locations in the grid. The datasets contain 100K transitions per task and are obtained by training task-specific PPO (Schulman et al., 2018) agents. Then, we evaluate the in-context abilities of our agents on 20 hold-out goal locations. During evaluation, the agent is given 40 episodes to interact with the environment, which we refer to as ICL-trials. Furthermore, we adopt the AD (Laskin et al., 2022) framework for training our agents with a multi-episodic context. We use the same sequence representation as used in our main experiments, consisting of states, returns-to-go (target return set to 80 during evaluation), and rewards. Note that this differs from the sequence representation used by Laskin et al. (2022). We set the context length for all agents to the equivalent of two episodes, which amounts to 200 timesteps in total. + +In Figure 16, we report the ICL performance over the 40 ICL trials on (a) 80 training locations and (b) 20 hold-out locations for the 4 different backbones considered in this work. We observe that the recurrent backbones attain considerably higher scores than the Transformer backbone. Furthermore, we find that xLSTM [7:1] attains the highest overall scores, which we attribute to the state-tracking abilities (Merrill et al., 2024) of sLSTM blocks. We aim to explore the ICL abilities of modern recurrent backbones more in future work. + +![](images/fc4050bca9ecc01b746a02f37e10d67a835200f770cbb94574d15413a6afe507.jpg) +Figure 14. Scaling comparison. Zero-shot performance on hold-out tasks at four model sizes, 16M, 48M, 110M, and 206M. Note that performance declines for all methods and model sizes compared to performance on training tasks. This is because hold-out tasks exhibit severe shifts in state-spaces, action-spaces, and reward functions. + +![](images/17718faeac165b82283f7dfc51868df2c5f082a6ffd585d483baab2d59c30159.jpg) +Figure 15. Fine-tune performance on hold-out tasks. We compare the performance of a pretrained xLSTM against an xLSTM trained from scratch, both with 16 million parameters. We select the top $5\%$ of trajectories from our held-out tasks based on performance and use this subset to fine-tune the models. We perform 25K update steps during fine-tuning and show the normalized scores, averaged across held-out tasks from each domain. + +# D.5. Inference Time Comparisons + +We empirically examine the difference in inference speed between of our models. Similar to De et al. (2024), we report both latency and throughput. For real-time applications, latency is the more important dimension, and therefore, we focus our analysis on latency. + +# D.5.1. LATENCY + +In Figures 17 and 18, we report the latencies for DT and xLSTM with the same number of layer blocks as DT, and twice the number of layer blocks as DT, respectively. We conduct our comparison for two different batch sizes and across varying sequence lengths. + +# D.5.2. THROUGHPUT + +In Figures 19 and 20, we similarly report the attained throughput for DT and xLSTM with the same number of layer blocks as DT, and twice the number of layer blocks as DT, respectively. We conduct our comparison for two fixed context lengths and varying batch sizes. + +![](images/85c5d8e20e24e1b00c0d7e1d95809a87beb1f9f9abac670869618a1c45882e9f.jpg) +(a) 80 training tasks + +![](images/8f010e666b584434af25631f28a0ad0885c6071072e64acfa958a1584a1a391e.jpg) +(b) 20 hold-out tasks + +![](images/a379eff549e768ab6771f712a7bc34cb67f73b1e5766c06e4d57db6289ef2bef.jpg) +(a) $B = 1$ +Figure 17. Latency. We report latency with (a) batch size of 1 and (b) batch size of 16 for DT and xLSTM with 206M parameters. For xLSTM, we use the same number of layer blocks as DT and a higher hidden dimension to match parameters. + +![](images/33304e4868c7605f6527806dbf2a081b63cfbc58f8cfb9f39ad9d9ab7e63a146.jpg) +Figure 16. In-context Learning on Dark-Room $10 \times 10$ . +(b) $B = 16$ + +# D.5.3. XLSTM: KERNEL COMPARISONS + +We leverage custom kernels for xLSTM to conduct our inference-speed comparisons. In particular, we compare 4 variants: recurrent-style inference with and without kernel acceleration, and chunkwise inference with and without kernel acceleration. In our experiments, every timestep contains 3 individual tokens. Consequently, regular recurrent-style inference requires iterating over the token sequence of length 3 in a loop, given the hidden state of the previous timestep. This requires 3 forward passes. In contrast, the chunkwise implementation operates on chunks of timesteps given a hidden state. Consequently, this only requires a single forward pass. In Figure 21, we illustrate the impact of kernel acceleration. We find that our chunkwise kernels result in considerably lower latencies. Interestingly, we find that for $B = 1$ , our chunkwise implementation without kernel acceleration is faster than the recurrent-style inference with kernel acceleration. However, as the batch size increases, this trend reverses. This highlights the importance of kernel acceleration for efficient inference. + +# D.5.4. XLSTM: IMPACT OF HEAD DIMENSION + +In our experiments, we found that choosing the appropriate head dimension is critical to enable high throughput for xLSTM. Therefore, we conduct an inference ablation with xLSTM 206M in which we vary the number of heads between 4 and 32, while keeping the total hidden dimension constant, resulting in different head dimensions. We find that throughput increases considerably when increasing the number of heads (see Figure 22). For 4 heads, and therefore the highest head dimension, the total throughput saturates at batch size 96. In contrast, when increasing the number of heads to 32 (i.e., decreasing the head dimension), the total throughput continues to increase. This is because a higher head dimension incurs more FLOPS. + +![](images/bf08b31b4de6efaca4f836858b8786965ec3611996873f022ac0d17e1b130136.jpg) +(a) $B = 1$ + +![](images/e9ae15be7161bff5ed09fdea42147c406ea7d18e4cbc5f725f75166c702b888f.jpg) +(b) $B = 16$ + +![](images/36aeab96d5839511663822d812fc995f3fb5377a1ca7227f249066bbc6af8187.jpg) +Figure 18. Latency. We report latency with (a) batch size of 1 and (b) batch size of 16 for DT and xLSTM with 206M parameters. For xLSTM, we use twice the number of layer blocks and the same hidden dimension as the Transformer. +(a) $C = 800$ + +![](images/6163b058138c4d7096be0b22504cfde534f8dd055bea20dbb4df8f6402ff1b3e.jpg) +(b) $C = 1600$ +Figure 19. Throughput. We report throughput with (a) context size of 800, and (b) context size of 1600 timesteps for DT and xLSTM with 206M parameters. For xLSTM, we use the same number of layer blocks as DT and a higher hidden dimension to match parameters. + +# E. Ablations + +# E.1. Removing action condition + +# E.1.1. DT ON META-WORLD + +We found that removing actions from the context results in better performance across backbones. In Figure 23, we report the learning curves over 200K updates for DT with varying context lengths on Meta-World, both with and without actions in the context. While context lengths beyond 1 hurt performance when training with actions, the reverse is true when training without actions. This is in contrast to recent works, which did not benefit from longer contexts (Octo Model Team et al., 2024). However, while removing actions improves performance on Meta-World, it does not affect performance on discrete control. On Meta-World, we observed that the models become overly confident (high action logits), which is problematic if poor initial actions are produced. We assume this is because in robotics, actions change smoothly, and by observing previous actions, the agent learns shortcuts. A similar issue has been identified by Wen et al. (2020) and termed the copycat problem, because the agent is incentivized to copy previous actions. Our solution is to remove actions from the input sequence. This prevents the agent from learning shortcuts and alleviates the copycat problem. + +# E.1.2. DT ON ALL 432 TASKS. + +To further investigate the effect of removing actions from the context, we repeat this ablation on the full 432 tasks and 6 domains at the 206M model scale. In Figure 24, we report the learning curves for a DT with varying sequence lengths + +![](images/2642e0bfa2a8f7808c1439ddacde7a3a2f124767a716b743c84694e3bab9ed36.jpg) +(a) $C = 800$ + +![](images/3f10da4bdf7d422f83ad1eb953755133efe503c8dc6f079f8b9f8ba0f01bf76e.jpg) +(b) $C = 1600$ + +![](images/e7703138184c5e845cf8e3a7708058fa15f20546b3fcd89422da0f615800fbbf.jpg) +Figure 20. Throughput. We report throughput with (a) context size of 800, and (b) context size of 1600 timesteps for DT and xLSTM with 206M parameters. For xLSTM, we use twice the number of layer blocks and the same hidden dimension as the Transformer. +(a) batch_size = 1 + +![](images/d4cf89cb3f5e7bd90d9c1c2daab662d8eac974ef0100cb2974dfadb26ee49db2.jpg) +(b) batch_size = 16 +Figure 21. Impact of kernel acceleration. We report latency with (a) batch size of 1 and (b) batch size of 32 for DT and xLSTM with 206M parameters. For xLSTM, we use the same number of layer blocks as DT and a higher hidden dimension to match parameters. + +trained (a) with and (b) without actions in the agent's context. Similar to the single-domain study on Meta-World with smaller models, we find that providing a longer context does not improve performance, resulting in a normalized score of around 0.3 across domains. In contrast, without action in the context, we observe a consistent improvement in the evaluation performance as the sequence length increases. In fact, the normalized score increases from around 0.3 with $C = 1$ to 0.7 with $C = 50$ . For computational reasons, we only report one seed per sequence length in this experiment, but we believe that the overall trends are clear. + +To better understand on which domains the longer context benefits or hurts our agents, we also present the normalized score per domain in Figure 25. Without actions in the context, we find that longer context consistently benefits the performance across domains. With actions in the context, we observe that on Meta-World and DMControl, the performance deteriorates for $C > 1$ . In contrast, on the discrete control domains Atari and Procgen, but also on the continuous control domain Composuite, performance tends to improve with $C > 1$ . This suggests that the copycat problem is particularly present on Meta-World and DMControl. However, note that the final performances on Atari, Procgen, and Mimicgen are considerably worse when actions are present in the context compared to when they are not. + +To further investigate this, we compute the MSE between subsequent actions in the training dataset (similar to Wen et al. (2020)) for the continuous control domains and report them in Table 7. Indeed, we find that Meta-World and DMControl exhibit significantly lower MSEs between subsequent actions than Compositue. While Mimicgen also exhibits a low MSE between consecutive actions, all backbones perform poorly on this challenging benchmark. Consequently, we conclude that removing actions from the agent's context is particularly effective for domains where actions change smoothly. + +![](images/c9c6a7717018b1511f25222f89cd3fdf75bf74c26cdda534b87956d87482b1cf.jpg) +Figure 22. Throughput comparison for xLSTM 206M with varying numbers of heads but fixed total hidden size. By default, we used 4 heads for our experiments. Increasing the number of heads results in higher throughput. + +![](images/93b31fc1e9577a0fe866fcc9f58121dbc0db83d8fc8cde10962e8190f4c5eaa5.jpg) +(a) w/ actions + +![](images/bcbb2fde45dab96f45885dd256121d16b56bf16fd5ed8bdeb02dd550c8bba40f.jpg) +(b) w/o actions +Figure 23. Ablation on removing the action condition for varying context lengths $C$ . Performance of DT (a) with, and (b) without action condition on Meta-World. With action in the context, $C > 1$ harms performance due to overconfidence in action predictions. Without actions in the context, the performance of DT improves with increasing $C$ . + +This result highlights the fact that large action models can strongly benefit from increased context length, even on the simulated environments we consider in this work. Furthermore, we believe that this effect can be even bigger in complex real-world environments that require longer-term interactions. + +# E.1.3. XLSTM ON ALL 432 TASKS. + +To validate that modern recurrent backbones also benefit from training with longer sequence lengths, we repeat the same ablation as presented in Appendix E.1.2 using xLSTM [1:0]. We report the learning curves, validation perplexities, and evaluation performance across all 432 tasks for varying context lengths in Figure 26. Note that the validation perplexity curves in Figure 26a, start at step $50\mathrm{K}$ for readability. Again, we observe considerable improvements in the validation perplexities and the normalized scores (0.4 for $C = 1$ to 0.8 for $C = 50$ ) as the context length increases. + +In addition, we provide the normalized scores per domain for xLSTM with varying sequence lengths in Figure 27. Across domains, we observe increasing performance with increasing $C$ . + +# E.2. Return-conditioning vs. Behavior Cloning + +Across experiments presented in the main text, except for the ICL experiments, we utilized a sequence representation that includes return-to-go tokens (RTG) as commonly used in the DT literature (Chen et al., 2021; Lee et al., 2022). At inference time, the RTG allows to condition the model on a high target return to produce high-quality actions. This is particularly + +![](images/b6c19abdcb8d24969eb0d33e65722a48ae33a6835f2508338d109c5efb8a73dd.jpg) +(a) w/ actions + +![](images/b0d787038a6b96693cd41ae8864756b75fed35feb14a3e430adda692be7c27b8.jpg) +(b) w/o actions +Figure 24. Ablation on removing the action condition for varying context lengths $C$ . Performance of DT (a) with, and (b) without action condition on all 432 tasks. Without actions in the context, the performance of DT improves with increasing $C$ . + +Table 7. Average MSE (± standard deviation) between subsequent actions in robotics datasets. + +
Meta-WorldDMControlCompositueMimicgen
Avg. MSE0.08±0.090.2±0.222.1±0.30.015±0.007
+ +useful when the datasets contain a mixture of optimal and suboptimal trajectories. However, many recent works focus on behavior cloning without return conditioning (Brohan et al., 2023b;a; Octo Model Team et al., 2024). + +To better understand whether our findings transfer to the behavior cloning setting, we conduct an ablation study in which we exclude the RTG tokens and the reward tokens from the sequence representation. This means that the sequence consists of state and reward tokens, or state-tokens only. In Figures 28 and 28, we report the (a) validation perplexities and (b) evaluation performance on the 432 task for the four considered backbones when removing RTG or RTG and reward, respectively. We retain the same training settings and datasets as reported in Appendix C (200K updates, evaluation after every 50K steps). We observe similar learning dynamics as for the 206M models that include RTG/reward tokens in the sequence representation (see Figure 2 and Figure 11). Consequently, we conclude that the same performance trends hold for training the considered backbones with and without RTG/reward condition. Note that the final performances are lower compared to the models that include the RTG condition, and that can be conditioned on a high return at inference time. + +# E.3. Effect of mLSTM-to-sLSTM ratio. + +Throughout our experiments, we compare two xLSTM variants: xLSTM [7:1] and xLSTM [1:0]. The bracket notation was introduced by (Beck et al., 2024) and denotes the ratio of mLSTM to sLSTM blocks. For example, xLSTM [7:1] contains 1 sLSTM block for every 7 mLSTM blocks. As described in Appendix C, we aim to maintain the same ratio as proposed by Beck et al. (2024). While mLSTM blocks are fully parallelizable, sLSTM blocks are not. However, sLSTM preserves the non-diagonalized recurrent matrix to enable state-tracking (Merrill et al., 2024). As such, sLSTM can be attractive for tasks that require state-tracking (see Figure 4 in Beck et al. (2024)). + +We first conduct an ablation study on the effect of the mLSTM-to-sLSTM ratio on the evaluation performance across all 432 tasks. For this experiment, we use the 16M parameter model that contains 8 xLSTM blocks in total. Consequently, we compare the following ratios [1:0] (only mLSTM), [0:1] (only sLSTM), [1:1], [1:3], [7:1]. In addition, we investigate the placement of sLSTMs across all 8 blocks. To indicate the placement, we use @ followed by the layer index (starting at 0). For example, [3:1] @ 1,3 indicates that the second and fourth layers are sLSTMs. In Figure 30, we report the validation perplexities and evaluation performance for different ratios and layer placements across the 432 tasks. For computational reasons, we conduct this experiment with only 1 seed per ratio. We find that at the 16M parameter scale, xLSTM [1:0] on average outperforms the variants that leverage sLSTM blocks. This indicates that these domains do not strongly benefit from the state tracking abilities of sLSTM. + +![](images/044d4276f2f4e887396d0591dbb51b64da142533c6587a6f36b7ae6d89116456.jpg) +(a) w/ actions + +![](images/1b1636d017035f14f60e68f28b1e5fb66de1ac05ecc914d5fb6684f37b41dd06.jpg) +(b) w/o actions +Figure 25. Ablation on removing the action condition for varying context lengths $C$ . We show the normalized score per domain for all context lengths (a) with and (b) without actions. + +Next, conduct the same analysis on Dark-Room $10 \times 10$ ICL environment as used in Appendix D.4. Unlike most of the 432 tasks used in our main experiments, Dark-Room exhibits a partially observable observation space and sparse rewards. Consequently, Dark-Room is more likely to require state tracking abilities. In fact, we already observed better performance for xLSTM [7:1] than for xLSTM [1:0] in Appendix 16. In Figure 31, we report the ICL curves for the 80 train tasks and 20 hold-out tasks. We observe that xLSTM variants that contain sLSTM blocks at lower-level positions, such as [7:1] @ 1 and [3:1] @ 1,3 outperform xLSTM [1:0]. In contrast, xLSTM variants that contain sLSTM blocks at deeper-level positions, such as [0:1] and 3:1 @ 5,7, perform poorly. This is similar to findings by Beck et al. (2024) who also place sLSTM layers at lower-level positions. + +We conclude that sLSTM layers can be important building blocks for tasks that require state-tracking, such as Dark-Room. Most of the 432 tasks we consider in the main experiments of this work contain fully observable observation spaces and may not require state-tracking. However, we believe that more complex tasks with longer horizons or partial observability, as is common in real-world applications, could greatly benefit from the state-tracking abilities provided by sLSTM blocks. As such, equipping an agent with the ability to perform state-tracking by including sLSTM blocks may be a valuable option for practitioners. This is a distinguishing factor of xLSTM from Mamba, which does not exhibit state-tracking. + +# E.4. Effect of Dropout in DT + +DTs use by default a Dropout (Srivastava et al., 2014) rate of 0.1. However, during our experiments, we found that Dropout has detrimental effects on the evaluation performance, particularly on continuous control domains like Compositue. In Figure 32, we show the validation perplexities and evaluation performance for a DT trained with and without Dropout. Consequently, we remove Dropout from our DT variant. + +# E.5. Effect of reducing number of layers in xLSTM + +In prior works, xLSTM and Mamba use twice the number of layers blocks as the Transformer baseline, while maintaining the same hidden dimension (Gu & Dao, 2023; Beck et al., 2024). For our inference-time comparisons, we therefore reduce + +![](images/f56495b41c377eaac4232e6cbf27a661958d140b4c4f2ff51a496e1f565e1b18.jpg) +(a) Sequence Prediction Performance + +![](images/05b1fb62b53afa755c508eb1eaac11a873f81a88fa3a4b9f10d1e1330990145e.jpg) +(b) Evaluation Performance + +![](images/187820f327746a6e092cf0dc96712822998b11a055a62c3c26ce5bcc662e934d.jpg) +Figure 26. Ablation on the effect of varying the context length $C$ for xLSTM. We report (a) validation perplexity and (b) evaluation performance across the 432 training tasks for xLSTM [1:0]. Without actions in the context, the performance of DT improves with increasing $C$ . +(a) w/o actions +Figure 27. Ablation on the effect of varying the context length $C$ for xLSTM. We show the normalized scores per domain for all context lengths. + +the number of layer blocks in xLSTM by half. To ensure a fair comparison, we consequently adjust the hidden size of xLSTM to match the number of parameters of the Transformer baseline. In this section, we investigate the effect of these modifications of the xLSTM architecture on the model performance. + +In Figure 33, report the validation perplexities and evaluation performance for the regular xLSTM with twice the number of layer blocks as DT, and an xLSTM with half the number of blocks. Reducing the number of layer blocks results in a slight decrease in performance on both metrics. However, xLSTM still outperforms the Transformer baseline (see Figure 2). + +# F. Embedding Space Analysis + +In Figure 5, we analyze the representations learned by our models using UMAP (McInnes et al., 2018). Here, we explain the clustering procedure in more detail. For every task, we sample 32 sub-trajectories containing 50 timesteps (150 tokens) and encode them using our sequence models. Then, we extract the hidden states at the last layer of our model and aggregate them via mean pooling. We cluster all vectors using the default hyperparameters of UMAP into a two-dimensional space. Finally, we color the resulting points by their domain. + +The purpose of this analysis is to examine how the models organize their representations of different environments. In general, tasks within the same domain tend to share similar input characteristics, such as visual inputs (e.g., image frames), possible actions to perform, and reward structures. Therefore, they are more likely to be "grouped" together in the embedding + +![](images/b748119334f25f3df8b809c857cface641f9f4defb7fc009d37fbe60f965ea01.jpg) +(a) Sequence Prediction Performance + +![](images/6981891d6bcf0e54366a20a4965a72be919fad27bcce50d9d9bf3fbd24083f87.jpg) +(b) Evaluation Performance + +![](images/d6dd5f68a2701ece690d29c3721afddd266929e3c19b770d5672571f03df1708.jpg) +Figure 28. Ablation on the effect of omitting the RTG condition. We report the learning curves for (a) validation perplexity and (b) evaluation performance across the 432 training tasks for 206M parameter models. We observe similar performance trends as when including the RTG in the sequence. +(a) Sequence Prediction Performance +Figure 29. Ablation on the effect of omitting the RTG condition and the reward condition. We report the learning curves for (a) validation perplexity and (b) evaluation performance across the 432 training tasks for 206M parameter models. We observe similar performance trends as when including the RTG in the sequence. + +![](images/936ed7ca7e6cdcff7f273450d87b94b3dc4380f04e5e307ab8f12a4ba2fc18a4.jpg) +(b) Evaluation Performance + +space. For example, when embeddings of Atari games are closer to each other than to Progen games, it indicates that Atari games share more similar underlying dynamics or input structures compared to Progen. We indeed find that tasks from the same domain cluster together. A more refined and better-separated embedding space may result in better final performance, potentially because it facilitates task identification at inference time. This may, however, be specific to the mixture of training tasks at hand. Therefore, we believe that studying the learned embedding spaces of multi-task agents in a wide range of environments is interesting for future work. + +Analogous to Figure 5 for DT and xLSTM, we show the UMAP clustering for Mamba 16M in Figure 34. In comparison to DT, Mamba exhibits a slightly stronger grouping of the embedding space. + +# G. Raw Scores + +In this section, we report the raw scores for all 432 training tasks for the 206M parameter scale. See Tables 8, 9, 10, 11, 12 for Progen, Atari, Meta-World, DMControl, and Mimicgen, respectively. The raw scores for Compositie are available in Tables 13, 14, 15, and 16. + +![](images/19b6cf93cf320bd2d26f0cb0c8f59277e682f207e5444472f7d285a671e4ab2e.jpg) +(a) Sequence Prediction Performance + +![](images/b446522750abd9944321b400928700f1206191457ca8603d6872d57c396369e7.jpg) +(b) Evaluation Performance + +![](images/4d650434006e264602669708189b31a712367f4e491a4376b6c06498f2bd9d9b.jpg) +Figure 30. Ablation on the effect of the mLSTM-to-sLSTM ratio. We report the learning curves for (a) validation perplexity and (b) evaluation performance across the 432 training tasks for 206M parameter models with varying ratios. +(a) 80 training tasks + +![](images/2df83b5a9320adfec7927b86aad1a6cc7744f18e0eba6f78214696dbdfa5ac0c.jpg) +(b) 20 hold-out tasks + +![](images/7f0c5fd62c06d4d6f26a0bbd4b062cf2ee98579a104f5b4a8b37235f31b19bd4.jpg) +Figure 31. In-context Learning on Dark-Room $10 \times 10$ for varying mLSTM-to-sLSTM ratios. +(a) Sequence Prediction Performance +Figure 32. Ablation on the effect of dropout on DT performance. We show the (a) validation perplexity and (b) evaluation performance on the training tasks. DT performance drops considerably if training with dropout. + +![](images/90e285123f2a878058e36ccecd79b19cef2bee4f9acf54e93a25312510510677.jpg) +(b) Evaluation Performance + +![](images/f9bcb63f1ce709176b5827535f616481a414cd489f804cb5169355cfc39fae78.jpg) +(a) Sequence Prediction Performance + +![](images/8d513f42a4a4ff4f1fdf9341934aebe22c9fe34e1623bfe41d20ca9d15ebb551.jpg) +(b) Evaluation Performance + +![](images/99ac4cb9cdff847973bd968ca97b6563c10d13fee71ca50e79a386f76b1fc20d.jpg) +Figure 33. Ablation on the effect of reducing the number of layer blocks in xLSTM. We show the (a) validation perplexity and (b) evaluation performance on the training tasks for the layer regular and layer-matched xLSTM models. Reducing the number of layer blocks in xLSTM results in a slight performance decrease. +(a) DT + +![](images/fb7a10cb118c6ff1410600b8e0b50176c1a03dcde1eb39f6e7ba95c1db8ba4e4.jpg) +(b) Mamba +Figure 34. UMAP clustering of hidden states for 432 tasks produced by (a) DT, (b) Mamba, and (c) xLSTM with 16M parameters, colored by domain. We again depict the embedding spaces for DT and xLSTM from Figure 5 for better readability. + +![](images/eab5aac8059a92a5e55ff3e8a2c00d3299a12d9f2bc8073f57457939a57318f8.jpg) +(c) xLSTM + +Table 8. Raw Scores for Progen. + +
TaskDTMambaxLSTM [1:0]xLSTM [7:1]
bigfish2.532.04.65.13
bossfight6.734.19.272.0
caveflyer6.676.36.674.87
chaser3.413.914.924.2
coinrun10.09.010.010.0
dodgeball2.83.44.273.87
fruitbot13.3319.819.7319.27
heist7.337.06.676.67
leaper5.334.08.675.33
maze8.6710.07.337.33
miner8.0711.09.08.27
starpilot24.9310.121.828.2
Avg. Reward8.327.558.738.76
+ +Table 9. Raw Scores for Atari. + +
TaskDTMambaxLSTM [1:0]xLSTM [7:1]
Amidar82.2730.871.0726.73
Assault438.2224.7410.2494.13
Asterix573.33540.0763.33583.33
Atlantis42573.3397240.083760.076973.33
BankHeist2.679.00.08.67
BattleZone2000.02400.02600.01733.33
BeamRider126.1361.6176.0243.47
Boxing80.877.783.884.93
Breakout68.13136.692.9393.73
Carnival618.67424.0697.33484.0
Centipede1802.131238.22416.731806.6
ChopperCommand813.33800.0813.33766.67
CrazyClimber96853.3365960.0106606.6779873.33
DemonAttack100.065.0181.33130.67
DoubleDunk-2.53-3.0-2.93-3.87
Enduro34.5365.598.7348.53
FishingDerby-72.47-68.2-72.07-71.0
Freeway29.029.830.028.6
Frostbite774.671248.01162.671049.33
Gopher314.6734.0132.012.0
Gravitar116.67175.0176.67136.67
Hero14004.6711381.014688.6716522.0
IceHockey-4.8-6.3-7.6-5.93
Jamesbond490.0540.0603.33510.0
Kangaroo1426.672880.02620.02653.33
Krull8880.6710090.08918.09569.33
KungFuMaster8866.6712700.08120.011233.33
NameThisGame7976.677967.07789.337232.0
Phoenix592.01600.01807.331052.67
Pooyan283.3387.5371.67406.67
Qbert4306.671700.0805.02613.33
Riverraid2888.676923.06688.07446.67
RoadRunner1320.0350.01340.0213.33
Robotank18.6713.223.0725.13
Seaquest182.67396.0448.0209.33
TimePilot2533.333520.03200.02966.67
UpNDown10598.012043.015340.6712815.33
VideoPinball1669.070.0220.4140.6
WizardOfWor113.33160.0160.0206.67
YarsRevenge14356.2714499.016815.021403.67
Zaxxon0.00.020.00.0
Avg. Reward5556.816281.276705.616383.35
+ +Table 10. Raw Scores for Meta-World. + +
TaskDTMambaxLSTM [1:0]xLSTM [7:1]
reach1860.69 ± 12.511859.3 ± 5.791859.17 ± 12.621864.37 ± 6.57
push1588.19 ± 207.01605.03 ± 107.811493.31 ± 238.011759.33 ± 3.89
pick-place137.85 ± 99.18161.74 ± 153.95389.81 ± 37.36296.21 ± 43.77
door-open1552.95 ± 6.511562.39 ± 6.791569.35 ± 6.711570.16 ± 14.83
drawer-open1735.13 ± 21.761714.4 ± 19.31740.48 ± 9.21747.33 ± 3.88
drawer-close1856.67 ± 3.061858.05 ± 2.751858.7 ± 2.341859.33 ± 1.15
button-press-topdown1322.3 ± 3.121326.55 ± 19.931341.5 ± 3.151322.83 ± 7.25
peg-insert-side1557.59 ± 98.521607.59 ± 9.11640.43 ± 13.11574.75 ± 90.34
window-open1594.16 ± 34.131568.55 ± 14.381576.82 ± 10.211578.18 ± 70.3
window-close1474.26 ± 16.881443.94 ± 18.991459.83 ± 18.791452.21 ± 26.56
door-close1538.02 ± 14.641544.31 ± 3.631546.0 ± 9.691541.64 ± 10.5
reach-wall1837.64 ± 1.61845.12 ± 3.061837.76 ± 3.391777.17 ± 94.47
pick-place-wall1041.54 ± 219.67843.51 ± 224.6206.88 ± 184.28385.57 ± 151.52
push-wall1689.67 ± 12.741701.7 ± 1.541599.63 ± 189.061487.69 ± 195.8
button-press1512.08 ± 9.541488.1 ± 38.831541.77 ± 5.481527.3 ± 10.16
button-press-topdown-wall1314.49 ± 62.731295.2 ± 6.621321.26 ± 17.591328.74 ± 24.16
button-press-wall1359.83 ± 173.511547.14 ± 13.841326.57 ± 109.091267.11 ± 8.78
peg-unplug-side1415.68 ± 162.541517.49 ± 25.271393.98 ± 173.01422.64 ± 192.05
disassemble1452.0 ± 44.541441.18 ± 29.151220.27 ± 441.511072.31 ± 374.95
hammer1446.68 ± 169.031683.04 ± 4.821669.54 ± 32.01642.34 ± 72.23
plate-slide1673.66 ± 1.721676.83 ± 3.01682.41 ± 5.021677.52 ± 5.46
plate-slide-side1719.4 ± 7.851694.35 ± 46.291686.38 ± 61.271690.72 ± 12.97
plate-slide-back1790.96 ± 6.391787.65 ± 5.991797.78 ± 1.171797.17 ± 0.43
plate-slide-back-side1773.26 ± 9.721763.24 ± 5.591785.11 ± 7.421788.61 ± 6.67
handle-press1734.75 ± 220.821829.07 ± 29.911881.23 ± 15.621881.92 ± 10.56
handle-pull1590.74 ± 35.981627.4 ± 34.181616.62 ± 52.01627.6 ± 21.86
handle-press-side1852.25 ± 7.01857.4 ± 10.131847.95 ± 5.611857.36 ± 5.57
handle-pull-side1651.05 ± 3.481607.3 ± 22.561655.75 ± 4.61651.77 ± 7.53
stick-push1595.45 ± 6.881585.22 ± 5.171595.35 ± 3.291595.21 ± 0.88
stick-pull1377.41 ± 108.311401.91 ± 32.791460.27 ± 57.131442.68 ± 43.23
basketball1529.79 ± 11.411528.22 ± 18.231543.02 ± 2.491542.8 ± 17.81
soccer649.69 ± 160.32929.06 ± 64.35792.21 ± 139.63732.44 ± 290.49
fauvet-open1676.95 ± 121.61703.83 ± 41.971727.05 ± 45.151744.83 ± 15.93
fauvet-close1772.91 ± 9.231772.13 ± 2.351778.25 ± 3.961775.25 ± 0.79
coffee-push340.21 ± 276.9232.01 ± 225.261.35 ± 51.7941.79 ± 40.9
coffee-pull1346.29 ± 101.931261.39 ± 195.181409.68 ± 34.661293.92 ± 129.94
coffee-button1595.94 ± 16.571592.77 ± 2.231593.15 ± 49.981562.92 ± 36.79
sweep1485.79 ± 12.171452.38 ± 13.741508.58 ± 14.961471.73 ± 29.08
sweep-into1796.25 ± 7.641472.64 ± 455.91804.27 ± 2.381786.27 ± 14.64
pick-out-of-hole1437.38 ± 181.151499.35 ± 35.731529.83 ± 8.091415.91 ± 176.44
assembly1229.39 ± 16.961216.34 ± 22.211236.68 ± 21.771227.81 ± 7.67
shelf-place1446.07 ± 30.411448.75 ± 39.731485.4 ± 12.311463.53 ± 9.04
push-back1226.32 ± 172.591022.98 ± 158.351011.25 ± 396.651027.48 ± 303.73
lever-pull1604.74 ± 3.321634.06 ± 6.081639.31 ± 10.111626.09 ± 23.72
dial-turn1688.33 ± 22.941667.37 ± 41.451713.38 ± 35.161686.59 ± 55.09
Avg. Reward1486.051486.181455.151464.16
+ +Table 11. Raw Scores for DMControl. + +
TaskDTMambaxLSTM [1:0]xLSTM [7:1]
finger-turn-easy121.27 ± 104.6396.4 ± 122.47449.8 ± 186.65640.13 ± 82.48
fish-upright181.14 ± 70.82154.59 ± 34.64277.23 ± 105.37241.73 ± 257.01
hopper-stand296.15 ± 141.83304.78 ± 32.65413.95 ± 35.83392.34 ± 152.75
point_mass-easy342.26 ± 37.42720.11 ± 42.95734.95 ± 114.17823.74 ± 57.3
walker-stand911.72 ± 38.16785.21 ± 23.53947.31 ± 22.13864.14 ± 181.56
walker-run155.91 ± 73.84274.83 ± 0.44201.34 ± 34.77145.01 ± 31.71
ball_in_cup-catch976.93 ± 0.83970.9 ± 4.67977.33 ± 0.5975.93 ± 0.42
cartpole-swingup688.5 ± 42.6762.4 ± 63.93800.14 ± 13.64591.08 ± 86.49
cheetah-run81.21 ± 96.85482.39 ± 17.23358.52 ± 127.92389.04 ± 4.11
finger-spin209.27 ± 20.57430.8 ± 61.66673.47 ± 94.37626.93 ± 29.21
reacher-easy45.4 ± 5.21180.7 ± 133.6478.73 ± 20.5958.0 ± 13.91
Avg. Reward364.52496.65505.06522.55
+ +Table 12. Raw Scores for Mimicgen. + +
TaskDTMambaxLSTM [1:0]xLSTM [7:1]
Panda_CoffeePreparation_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.13 ± 0.12
Panda_CoffeePreparation_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Panda_Coffee_D00.4 ± 0.20.0 ± 0.00.2 ± 0.20.07 ± 0.12
Panda_Coffee_D10.2 ± 0.20.0 ± 0.00.2 ± 0.20.07 ± 0.12
Panda_Coffee_D20.07 ± 0.120.0 ± 0.00.07 ± 0.120.0 ± 0.0
Panda_HammerCleanup_D01.0 ± 0.00.9 ± 0.141.0 ± 0.01.0 ± 0.0
Panda_HammerCleanup_D10.47 ± 0.50.1 ± 0.140.47 ± 0.230.47 ± 0.31
Panda_Kitchen_D00.87 ± 0.230.6 ± 0.01.0 ± 0.01.0 ± 0.0
Panda_Kitchen_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Panda_MugCleanup_D00.13 ± 0.120.1 ± 0.140.6 ± 0.20.27 ± 0.12
Panda_MugCleanup_D10.07 ± 0.120.0 ± 0.00.2 ± 0.20.07 ± 0.12
Sawyer_NutAssembly_D00.07 ± 0.120.0 ± 0.00.0 ± 0.00.07 ± 0.12
Sawyer_PickPlace_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Panda_Square_D00.2 ± 0.20.0 ± 0.00.53 ± 0.120.53 ± 0.12
Panda_Square_D10.0 ± 0.00.0 ± 0.00.2 ± 0.20.07 ± 0.12
Panda_Square_D20.13 ± 0.120.0 ± 0.00.07 ± 0.120.07 ± 0.12
Panda_SquareThree_D00.0 ± 0.00.0 ± 0.00.07 ± 0.120.0 ± 0.0
Panda_SquareThree_D10.0 ± 0.00.0 ± 0.00.07 ± 0.120.0 ± 0.0
Panda_Square_D00.47 ± 0.120.2 ± 0.00.67 ± 0.310.73 ± 0.12
Panda_Square_D10.4 ± 0.20.0 ± 0.00.27 ± 0.120.4 ± 0.2
Panda,Threading_D00.27 ± 0.120.2 ± 0.00.27 ± 0.120.2 ± 0.2
Panda,Threading_D10.2 ± 0.350.0 ± 0.00.07 ± 0.120.07 ± 0.12
Panda.ThreePieceAssembly_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Panda.ThreePieceAssembly_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
IWA_Coffee_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer_Coffee_D00.27 ± 0.310.0 ± 0.00.13 ± 0.120.2 ± 0.2
UR5e_Coffee_D00.33 ± 0.120.2 ± 0.00.47 ± 0.310.4 ± 0.2
IWA_Coffee_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer_Coffee_D10.07 ± 0.120.0 ± 0.00.07 ± 0.120.0 ± 0.0
UR5e_Coffee_D10.13 ± 0.120.0 ± 0.00.2 ± 0.20.33 ± 0.31
IWA_Coffee_D20.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
UR5e_Coffee_D20.0 ± 0.00.1 ± 0.140.2 ± 0.20.07 ± 0.12
IWA_HammerCleanup_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer_HammerCleanup_D00.73 ± 0.120.9 ± 0.140.93 ± 0.120.87 ± 0.23
UR5e_HammerCleanup_D01.0 ± 0.00.9 ± 0.141.0 ± 0.00.93 ± 0.12
IWA_HammerCleanup_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer_HammerCleanup_D10.2 ± 0.20.2 ± 0.00.27 ± 0.230.4 ± 0.35
UR5e_HammerCleanup_D10.47 ± 0.120.4 ± 0.280.8 ± 0.20.6 ± 0.0
IWA_Kitchen_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
UR5e_Kitchen_D00.93 ± 0.120.8 ± 0.01.0 ± 0.01.0 ± 0.0
UR5e_Kitchen_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.07 ± 0.12
IWA_MugCleanup_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
IWA_MugCleanup_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
UR5e_MugCleanup_D10.07 ± 0.120.0 ± 0.00.13 ± 0.120.13 ± 0.12
IWA_NutAssembly_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer_NutAssembly_D00.0 ± 0.00.0 ± 0.00.07 ± 0.120.0 ± 0.0
UR5e_NutAssembly_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.07 ± 0.12
IWA_PickPlace_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer_PickPlace_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
UR5e_PickPlace_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
IWA_Square_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer_Square_D00.2 ± 0.20.4 ± 0.280.33 ± 0.120.53 ± 0.23
UR5e_Square_D00.13 ± 0.230.3 ± 0.420.27 ± 0.120.53 ± 0.23
IWA_Square_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer_Square_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
UR5e_Square_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
IWA_SquareThree_D00.47 ± 0.310.2 ± 0.00.6 ± 0.20.4 ± 0.2
UR5e_SquareThree_D10.4 ± 0.20.3 ± 0.140.87 ± 0.120.67 ± 0.12
IWA_SquareThree_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer_SquareThree_D10.2 ± 0.20.0 ± 0.00.4 ± 0.20.27 ± 0.12
UR5e_SquareThree_D10.6 ± 0.00.1 ± 0.140.73 ± 0.120.4 ± 0.2
IWA,Threading_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer,Threading_D10.13 ± 0.120.0 ± 0.00.07 ± 0.120.13 ± 0.12
UR5e,Threading_D10.27 ± 0.310.1 ± 0.140.4 ± 0.20.4 ± 0.2
IWA,Threading_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer,Threading_D10.0 ± 0.00.0 ± 0.00.13 ± 0.120.0 ± 0.0
UR5e,Threading_D10.07 ± 0.120.0 ± 0.00.0 ± 0.00.0 ± 0.0
IWA THREEPieceAssembly_D00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer.ThreePieceAssembly_D00.0 ± 0.00.0 ± 0.00.13 ± 0.120.0 ± 0.0
UR5e.ThreePieceAssembly_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer.ThreePieceAssembly_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
UR5e.ThreePieceAssembly_D10.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
IWA ThreePieceAssembly_D20.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
Sawyer.ThreePieceAssembly_D20.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
UR5e.ThreePieceAssembly_D20.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
+ +Table 13. Raw Scores for Composite, Part1. + +
TaskDTMambaxLSTM [1:0]xLSTM [7:1]
IIWA☑Box☑None☑PickPlace402.74 ± 14.4414.73 ± 10.49424.35 ± 12.95421.33 ± 11.39
IIWA☑Box☑None☑Push388.61 ± 35.63427.0 ± 2.03424.4 ± 4.63427.0 ± 0.68
IIWA☑Box☑None☑Shelf370.3 ± 80.53417.61 ± 1.44417.78 ± 0.96416.41 ± 1.87
IIWA☑Box☑None☑Trashcan329.27 ± 113.43424.39 ± 1.04429.54 ± 1.57426.07 ± 3.98
IIWA☑Box☑GoalWall☑PickPlace367.68 ± 81.93428.6 ± 4.11428.0 ± 2.32429.29 ± 1.97
IIWA☑Box☑GoalWall☑Push299.69 ± 77.03337.81 ± 88.42344.59 ± 28.19318.19 ± 50.76
IIWA☑Box☑GoalWall☑Shelf360.92 ± 48.29405.81 ± 9.82408.1 ± 5.92402.31 ± 3.08
IIWA☑Box☑GoalWall☑Trashcan376.45 ± 83.64422.34 ± 3.61429.15 ± 2.72425.64 ± 3.88
IIWA☑Box☑ObjectDoor☑PickPlace389.21 ± 47.22417.89 ± 0.92413.82 ± 4.06414.08 ± 3.83
IIWA☑Box☑ObjectDoor☑Push406.51 ± 0.32403.59 ± 5.82373.61 ± 40.95397.45 ± 1.89
IIWA☑Box☑ObjectDoor☑Shelf329.42 ± 67.73353.67 ± 56.2367.47 ± 43.7396.33 ± 2.67
IIWA☑Box☑ObjectDoor☑Trashcan325.45 ± 72.77372.51 ± 41.55358.72 ± 76.22391.58 ± 16.76
IIWA☑Box☑ObjectWall☑PickPlace393.52 ± 51.47425.76 ± 2.29420.61 ± 2.99421.61 ± 1.06
IIWA☑Box☑ObjectWall☑Push420.21 ± 3.5412.76 ± 1.67410.19 ± 1.62411.5 ± 3.13
IIWA☑Box☑ObjectWall☑Shelf400.86 ± 3.66408.22 ± 1.63401.42 ± 3.93396.64 ± 10.55
IIWA☑Box☑ObjectWall☑Trashcan414.43 ± 2.93413.71 ± 3.47417.11 ± 1.69414.46 ± 0.8
IIWA☑Dumbbell☑None☑PickPlace386.95 ± 51.87422.35 ± 2.94421.32 ± 2.03421.94 ± 1.48
IIWA☑Dumbbell☑None☑Push360.62 ± 90.94413.39 ± 6.13414.23 ± 6.04393.34 ± 36.66
IIWA☑Dumbbell☑None☑Shelf310.45 ± 73.45344.81 ± 53.72380.51 ± 5.34350.8 ± 52.16
IIWA☑Dumbbell☑None☑Trashcan386.09 ± 40.69396.08 ± 0.7414.03 ± 3.78412.34 ± 3.36
IIWA☑Dumbbell☑GoalWall☑PickPlace413.6 ± 1.16415.64 ± 3.28410.7 ± 7.64413.51 ± 1.23
IIWA☑Dumbbell☑GoalWall☑Push316.49 ± 38.69367.45 ± 4.81336.67 ± 82.13371.92 ± 5.91
IIWA☑Dumbbell☑GoalWall☑Shelf395.63 ± 3.19372.77 ± 30.32376.75 ± 8.62372.77 ± 4.25
IIWA☑Dumbbell☑GoalWall☑Trashcan379.45 ± 58.51374.31 ± 55.11412.22 ± 4.09406.03 ± 5.03
IIWA☑Dumbbell☑ObjectDoor☑PickPlace358.13 ± 26.76364.62 ± 40.18393.83 ± 2.05347.28 ± 39.81
IIWA☑Dumbbell☑ObjectDoor☑Push400.9 ± 8.95383.81 ± 8.46382.93 ± 0.7364.06 ± 35.78
IIWA☑Dumbbell☑ObjectDoor☑Shelf369.75 ± 14.29325.7 ± 30.94350.7 ± 21.76335.84 ± 40.36
IIWA☑Dumbbell☑ObjectDoor☑Trashcan393.05 ± 3.92358.77 ± 36.88397.23 ± 1.73389.54 ± 9.14
IIWA☑Dumbbell☑ObjectWall☑PickPlace403.51 ± 12.08407.37 ± 0.09404.28 ± 1.23401.15 ± 10.64
IIWA☑Dumbbell☑ObjectWall☑Push330.77 ± 30.29296.98 ± 68.18334.41 ± 22.28307.4 ± 33.85
IIWA☑Dumbbell☑ObjectWall☑Shelf353.9 ± 29.5374.39 ± 6.58358.29 ± 33.75358.76 ± 18.87
IIWA☑Dumbbell☑ObjectWall☑Trashcan394.48 ± 4.39361.99 ± 39.17398.06 ± 0.59383.43 ± 32.4
IIWA☑Plate☑None☑PickPlace427.3 ± 0.59424.44 ± 1.82424.59 ± 2.01425.99 ± 1.2
IIWA☑Plate☑None☑Push424.25 ± 1.13419.86 ± 3.96418.13 ± 3.55418.42 ± 1.3
IIWA☑Plate☑None☑Shelf408.07 ± 0.95397.02 ± 6.49396.55 ± 10.03394.93 ± 10.81
IIWA☑Plate☑None☑Trashcan419.62 ± 1.81420.24 ± 0.33420.37 ± 0.91419.42 ± 2.61
IIWA☑Plate☑GoalWall☑PickPlace424.69 ± 2.67423.93 ± 1.77421.83 ± 1.01420.13 ± 8.21
IIWA☑Plate☑GoalWall☑Push409.69 ± 3.55397.97 ± 13.41390.46 ± 14.79388.89 ± 3.01
IIWA☑Plate☑GoalWall☑Shelf404.92 ± 0.82396.09 ± 4.6393.01 ± 5.77401.81 ± 8.93
IIWA☑Plate☑GoalWall☑Trashcan420.47 ± 1.88420.68 ± 2.82420.29 ± 1.48421.31 ± 1.93
IIWA☑Plate☑ObjectDoor☑PickPlace408.48 ± 1.12403.23 ± 7.83397.51 ± 1.65401.53 ± 1.76
IIWA☑Plate☑ObjectDoor☑Push404.34 ± 4.45395.97 ± 16.84389.33 ± 7.78385.77 ± 1.21
IIWA☑Plate☑ObjectDoor☑Shelf377.91 ± 21.42373.43 ± 5.34369.41 ± 4.97374.16 ± 13.75
IIWA☑Plate☑ObjectDoor☑Trashcan400.27 ± 3.16400.74 ± 0.53399.28 ± 1.63400.23 ± 0.63
IIWA☑Plate☑ObjectWall☑PickPlace417.35 ± 3.15416.76 ± 6.18409.31 ± 1.26411.62 ± 0.97
IIWA☑Plate☑ObjectWall☑Push413.47 ± 3.92408.16 ± 6.53405.51 ± 3.71405.27 ± 1.34
IIWA☑Plate☑ObjectWall☑Shelf393.23 ± 1.39376.64 ± 12.49386.41 ± 8.65382.81 ± 6.78
IIWA☑Plate☑ObjectWall☑Trashcan410.85 ± 1.07408.87 ± 3.95408.98 ± 0.82409.35 ± 2.6
IIWA Hollowbox ☐None☑PickPlace378.13 ± 94.18427.5 ± 6.93428.62 ± 3.62426.38 ± 3.26
IIWA Hollowbox ☐None☑Push386.22 ± 36.15422.49 ± 8.01427.73 ± 1.97426.12 ± 2.3
IIWA Hollowbox ☐None☑Shelf416.65 ± 6.66419.89 ± 11.03418.34 ± 6.49415.11 ± 0.89
IIWA Hollowbox ☐None☑Trashcan424.38 ± 2.77421.62 ± 1.4426.9 ± 2.35425.99 ± 1.81
IIWA Hollowbox ☐GoalWall☑PickPlace430.17 ± 3.37427.76 ± 0.48427.91 ± 0.76426.47 ± 1.62
IIWA Hollowbox ☐GoalWall☑Push401.33 ± 3.96373.0 ± 41.02390.09 ± 9.46394.35 ± 14.43
IIWA Hollowbox ☐GoalWall☑Shelf424.55 ± 2.3379.05 ± 64.32423.51 ± 1.31419.69 ± 3.38
IIWA Hollowbox ☐GoalWall☑Trashcan425.95 ± 0.73425.27 ± 0.66424.8 ± 1.0420.68 ± 3.33
IIWA Hollowbox ☐ObjectDoor☑PickPlace276.87 ± 109.64369.45 ± 57.47374.76 ± 45.83301.41 ± 112.33
IIWA Hollowbox ☐ObjectDoor▶Push326.56 ± 109.6352.22 ± 53.97390.78 ± 6.35324.09 ± 55.59
IIWA Hollowbox ☐ObjectDoor▶Shelf339.03 ± 43.75370.75 ± 8.36362.72 ± 30.31353.98 ± 38.19
IIWA Hollowbox ☐ObjectDoor▶ trashcan395.18 ± 8.7370.39 ± 35.98387.21 ± 14.61387.99 ± 21.95
IIWA Hollowbox ☐ObjectWall▶PickPlace364.95 ± 27.07355.61 ± 76.66356.01 ± 8.3369.47 ± 24.62
IIWA Hollowbox ☐ObjectWall▶Push422.04 ± 2.08414.47 ± 8.08414.39 ± 5.5408.53 ± 8.05
IIWA Hollowbox ☐ObjectWall▶Shelf400.82 ± 2.4400.31 ± 1.28403.69 ± 2.06401.27 ± 1.97
IIWA Hollowbox ☐ObjectWall▶trashcan415.82 ± 0.9416.68 ± 0.14392.79 ± 44.13417.34 ± 0.77
+ +Table 14. Raw Scores for Composite, Part 2. + +
TaskDTMambaxLSTM [1:0]xLSTM [7:1]
Jaco_box_None_PickPlace401.38 ± 3.88400.41 ± 0.63399.74 ± 5.35396.54 ± 4.99
Jaco_box_NonePush399.84 ± 3.29397.79 ± 1.71392.77 ± 1.12397.31 ± 1.39
Jaco_box_None_Self383.53 ± 0.31384.65 ± 5.31385.85 ± 1.1386.34 ± 3.47
Jaco_box_None_Trashcan374.88 ± 43.66398.46 ± 2.69397.66 ± 4.99398.21 ± 0.91
Jaco_box_GoalWall_PickPlace394.75 ± 2.52395.12 ± 0.38392.3 ± 5.3389.93 ± 3.83
Jaco_box_GoalWallPush317.78 ± 67.67343.43 ± 7.49351.67 ± 20.65336.02 ± 8.59
Jaco_box_GoalWall_Self374.62 ± 20.35387.0 ± 1.42387.73 ± 2.11384.74 ± 1.19
Jaco_box_GoalWall_Trashcan374.07 ± 30.72393.81 ± 0.68395.49 ± 1.23392.53 ± 3.46
Jaco_box_ObjectDoor_PickPlace396.05 ± 1.12391.81 ± 4.67388.37 ± 1.26383.39 ± 9.07
Jaco_box_ObjectDoorPush364.64 ± 38.39383.07 ± 5.73366.91 ± 33.04387.51 ± 2.93
Jaco_box_ObjectDoor_Self373.8 ± 2.81379.75 ± 1.45375.38 ± 6.27376.86 ± 1.37
Jaco_box_ObjectDoor_Trashcan388.4 ± 1.28353.97 ± 52.06389.38 ± 2.0389.81 ± 2.89
Jaco_box_ObjectWall_PickPlace394.31 ± 2.66385.33 ± 5.43388.54 ± 7.62387.82 ± 2.26
Jaco_box_ObjectWallPush387.4 ± 9.34384.75 ± 4.29383.61 ± 7.58383.32 ± 7.73
Jaco_box_ObjectWall_Self364.38 ± 2.57361.28 ± 8.2367.38 ± 2.04369.22 ± 2.79
Jaco_box_ObjectWall_Trashcan385.73 ± 6.85385.9 ± 1.13385.34 ± 0.74380.01 ± 5.08
Jaco_Dumbbell_None_PickPlace319.87 ± 1.83334.2 ± 1.93376.46 ± 9.19334.95 ± 68.5
Jaco_Dumbbell_NonePush388.29 ± 1.98372.13 ± 5.46373.3 ± 6.88369.49 ± 4.36
Jaco_Dumbbell_None_Self300.81 ± 61.26344.47 ± 15.49361.77 ± 6.21362.88 ± 8.22
Jaco_Dumbbell_None_Trashcan369.52 ± 11.5369.83 ± 13.39387.28 ± 1.88377.27 ± 9.7
Jaco_Dumbbell_GoalWall_PickPlace306.12 ± 40.29306.26 ± 32.85349.04 ± 18.3348.42 ± 37.3
Jaco_Dumbbell_GoalWallPush107.91 ± 29.9136.11 ± 9.04245.71 ± 30.15188.19 ± 58.09
Jaco_Dumbbell_GoalWall_Self300.97 ± 114.65368.99 ± 0.5363.58 ± 9.74346.57 ± 27.41
Jaco_Dumbbell_GoalWall_Trashcan321.81 ± 87.58317.94 ± 23.15376.09 ± 2.22378.49 ± 4.52
Jaco_Dumbbell_ObjectDoor_PickPlace382.35 ± 1.62380.2 ± 5.17349.1 ± 32.92372.44 ± 7.6
Jaco_Dumbbell_ObjectDoor_Push382.32 ± 1.08353.42 ± 7.17353.85 ± 6.83338.66 ± 19.03
Jaco_Dumbbell_ObjectDoor_Self312.14 ± 64.22330.22 ± 47.38343.51 ± 30.97331.5 ± 37.18
Jaco_Dumbbell_ObjectDoor_Trashcan371.06 ± 8.48375.34 ± 4.07373.78 ± 6.05370.06 ± 8.94
Jaco_Dumbbell_ObjectWall_PickPlace279.55 ± 111.58314.05 ± 21.02360.29 ± 15.75360.38 ± 12.02
Jaco_Dumbbell_ObjectWallPush381.11 ± 3.7351.38 ± 1.82349.16 ± 2.93352.64 ± 11.94
Jaco_Dumbbell_ObjectWall_Self354.95 ± 1.59316.33 ± 42.6342.43 ± 7.94332.97 ± 15.33
Jaco_Dumbbell_ObjectWall_Trashcan367.01 ± 8.38354.32 ± 22.23365.47 ± 7.45363.25 ± 3.18
Jaco_PLate(None_PickPlace397.25 ± 0.77389.99 ± 6.44384.38 ± 5.92380.69 ± 2.55
Jaco_PLate(None_Push395.18 ± 1.01390.69 ± 9.12381.68 ± 6.86380.2 ± 3.48
Jaco_PLate(None_Self380.49 ± 0.75381.62 ± 0.09356.49 ± 41.25380.99 ± 2.43
Jaco_PLate(None_Trashcan391.97 ± 0.76390.62 ± 0.57391.2 ± 1.38390.3 ± 1.83
Jaco_PLate_GoalWall_PickPlace379.45 ± 24.14378.13 ± 6.34377.33 ± 11.32376.12 ± 4.31
Jaco_PLate_GoalWallPush293.6 ± 38.38319.4 ± 24.13320.49 ± 24.25320.5 ± 31.85
Jaco_PLate_GoalWall_Self358.04 ± 22.32369.8 ± 15.11367.73 ± 12.97362.35 ± 3.32
Jaco_PLate_GoalWall_Trashcan383.53 ± 7.45387.55 ± 1.56389.51 ± 2.03388.57 ± 1.98
Jaco_PLate/ObjectDoor_PickPlace390.4 ± 1.3381.92 ± 15.09376.2 ± 7.51380.34 ± 9.73
Jaco_PLate:ObjectDoor_Push372.01 ± 4.07366.41 ± 16.51359.43 ± 10.46355.71 ± 3.99
Jaco_PLate:ObjectDoor_Self366.15 ± 6.61357.96 ± 8.35368.82 ± 4.35362.39 ± 7.11
Jaco_PLate:ObjectDoor_Trashcan382.66 ± 0.58384.3 ± 0.38384.0 ± 1.92383.57 ± 1.1
Jaco_PLate:ObjectWall_PickPlace390.73 ± 1.55378.98 ± 6.95376.76 ± 8.54373.98 ± 5.41
Jaco_PLate:ObjectWallPush378.3 ± 4.49372.47 ± 10.13364.42 ± 8.12360.69 ± 3.82
Jaco_PLate:ObjectWall_Self364.2 ± 3.52364.64 ± 3.01368.33 ± 1.95360.73 ± 6.42
Jaco_PLate:ObjectWall_Trashcan374.17 ± 3.76375.68 ± 1.54382.5 ± 2.76373.86 ± 4.91
Jaco_Hollowbox(None_PickPlace402.23 ± 2.04386.75 ± 25.35396.5 ± 1.04398.48 ± 3.76
Jaco_Hollowbox(None_Push392.65 ± 9.62396.56 ± 4.13397.09 ± 7.5396.63 ± 0.38
Jaco_Hollowbox(None_Self377.5 ± 2.78382.06 ± 6.3384.26 ± 5.2381.68 ± 4.82
Jaco_Hollowbox(None_Trashcan394.85 ± 1.28394.82 ± 3.27393.68 ± 3.67392.87 ± 1.71
Jaco_Hollowbox_GOalWall_PickPlace395.2 ± 1.44385.82 ± 13.41378.92 ± 9.41379.34 ± 7.17
Jaco_Hollowbox_GOalWallPush349.5 ± 34.56337.43 ± 15.64348.44 ± 11.76340.9 ± 2.77
Jaco_Hollowbox_GOalWall_Self357.89 ± 19.58349.29 ± 10.1344.53 ± 6.27333.97 ± 12.22
Jaco_Hollowbox_GOalWall_Trashcan385.01 ± 1.04385.4 ± 1.7386.58 ± 0.37384.52 ± 0.05
Jaco_Hollowbox_ObjectDoor_PickPlace335.16 ± 76.71387.66 ± 8.98375.68 ± 4.01344.62 ± 44.5
Jaco_Hollowbox_ObjectDoor_Push356.64 ± 41.54386.82 ± 11.07383.4 ± 9.21385.73 ± 7.74
Jaco_Hollowbox_ObjectDoor_Self371.32 ± 0.65362.29 ± 13.12366.72 ± 4.12360.22 ± 15.51
Jaco_Hollowbox_ObjectDoor_Trashcan358.07 ± 46.79385.01 ± 1.12383.6 ± 2.35385.17 ± 0.42
Jaco_Hollowbox_ObjectWall_PickPlace393.5 ± 2.63377.85 ± 3.53378.61 ± 8.16375.96 ± 5.55
Jaco_Hollowbox_ObjectWallPush391.74 ± 4.74382.69 ± 12.26387.67 ± 9.52379.01 ± 6.44
Jaco_Hollowbox_ObjectWall_Self371.33 ± 3.41367.26 ± 11.73365.73 ± 7.59356.39 ± 16.14
Jaco_Hollowbox_ObjectWall_Trashcan382.6 ± 1.63385.72 ± 2.03382.62 ± 1.19382.01 ± 4.22
+ +Table 15. Raw Scores for Composite, Part 3. + +
TaskDTMambaxLSTM [1:0]xLSTM [7:1]
Kinova3_Box_None_PickPlace432.49 ± 3.69432.11 ± 7.68432.28 ± 3.45431.06 ± 2.67
Kinova3_Box_None_Push398.81 ± 44.71416.96 ± 17.33428.52 ± 1.83416.41 ± 18.69
Kinova3_Box_None_Shelf411.22 ± 3.9413.65 ± 0.42415.58 ± 4.21411.67 ± 3.98
Kinova3_Box_None_Trashcan378.21 ± 81.97426.67 ± 2.1431.01 ± 0.89427.82 ± 1.12
Kinova3_Box_GoalWall_PickPlace347.29 ± 145.33430.92 ± 1.73431.3 ± 2.19408.26 ± 40.64
Kinova3_Box_GoalWall_Push325.78 ± 131.68390.05 ± 6.59382.78 ± 2.17388.29 ± 6.07
Kinova3_Box_GoalWall_Self357.79 ± 96.22395.77 ± 28.11418.95 ± 2.7417.37 ± 1.02
Kinova3_Box_GoalWall_Trashcan373.8 ± 80.27424.09 ± 0.02428.12 ± 3.66427.05 ± 0.87
Kinova3_Box_ObjectDoor_PickPlace425.72 ± 1.7427.38 ± 0.43424.25 ± 2.86424.5 ± 3.45
Kinova3_Box_ObjectDoor_Push395.44 ± 30.77414.0 ± 5.47406.02 ± 0.61410.58 ± 8.15
Kinova3_Box_ObjectDoor_Self381.62 ± 37.98326.93 ± 2.6408.55 ± 2.3381.75 ± 45.62
Kinova3_Box_ObjectDoor_Trashcan392.17 ± 40.87415.87 ± 2.48419.24 ± 0.61416.46 ± 1.78
Kinova3_Box_ObjectWall_PickPlace405.45 ± 21.25387.27 ± 50.08425.83 ± 2.68423.06 ± 3.66
Kinova3_Box_ObjectWall_Push419.98 ± 2.8414.6 ± 1.04412.82 ± 1.07415.16 ± 7.28
Kinova3_Box_ObjectWall_Self399.47 ± 4.56399.51 ± 1.29402.37 ± 2.66402.42 ± 1.48
Kinova3_Box_ObjectWall_Trashcan416.15 ± 4.57412.41 ± 0.4399.87 ± 31.99394.97 ± 36.15
Kinova3_Dumbbell_None_PickPlace380.36 ± 55.46418.88 ± 5.8419.3 ± 7.37416.89 ± 2.86
Kinova3_Dumbbell_NonePush394.84 ± 25.64396.29 ± 13.63367.03 ± 53.29390.74 ± 22.17
Kinova3_Dumbbell_None_Self290.98 ± 123.89394.73 ± 4.82386.09 ± 19.99397.38 ± 2.93
Kinova3_Dumbbell_None_Trashcan358.26 ± 43.32377.36 ± 53.06413.01 ± 6.02414.39 ± 1.97
Kinova3_Dumbbell_GoalWall_PickPlace408.52 ± 19.13392.63 ± 23.38404.51 ± 4.31412.68 ± 11.05
Kinova3_Dumbbell_GoalWall_Push294.63 ± 35.99358.66 ± 10.09321.72 ± 41.37310.79 ± 67.84
Kinova3_Dumbbell_GoalWall_Self384.01 ± 20.53383.06 ± 15.17395.02 ± 0.83377.15 ± 28.52
Kinova3_Dumbbell_GoalWall_Trashcan377.28 ± 51.33370.59 ± 31.83413.63 ± 2.06378.76 ± 27.34
Kinova3_Dumbbell_ObjectDoor_PickPlace415.58 ± 5.38404.89 ± 11.83405.77 ± 7.4410.95 ± 8.75
Kinova3_Dumbbell_ObjectDoor_Push359.17 ± 15.53265.44 ± 62.94367.39 ± 23.91311.57 ± 45.56
Kinova3_Dumbbell_ObjectDoor_Self360.34 ± 28.19379.36 ± 6.7385.26 ± 2.74363.99 ± 37.65
Kinova3_Dumbbell_ObjectDoor_Trashcan409.92 ± 1.78407.09 ± 1.26407.79 ± 0.71407.57 ± 2.85
Kinova3_Dumbbell_ObjectWall_PickPlace404.63 ± 16.95409.29 ± 4.6406.14 ± 2.11411.69 ± 6.71
Kinova3_Dumbbell_ObjectWall_Push311.79 ± 94.94285.81 ± 62.32342.04 ± 22.98244.56 ± 16.32
Kinova3_Dumbbell_ObjectWall_Self378.68 ± 3.03378.63 ± 0.91376.92 ± 0.76361.79 ± 25.06
Kinova3_Dumbbell_ObjectWall_Trashcan400.98 ± 4.19398.65 ± 3.89401.96 ± 1.45395.81 ± 3.51
Kinova3_PLate_None_PickPlace424.09 ± 4.78427.36 ± 4.29424.82 ± 1.31425.02 ± 2.92
Kinova3_PLate_None_Push412.25 ± 19.8422.75 ± 2.79417.63 ± 6.13416.41 ± 4.33
Kinova3_PLate_None_Self409.96 ± 0.2409.11 ± 0.52410.28 ± 0.65409.52 ± 1.61
Kinova3_PLate_None_Trashcan422.54 ± 2.13422.07 ± 1.15421.73 ± 1.36422.97 ± 0.74
Kinova3_PLate_GoalWall_PickPlace427.74 ± 0.81421.23 ± 6.67416.44 ± 1.6416.35 ± 15.86
Kinova3_PLate_GoalWall_Push401.46 ± 2.17385.01 ± 15.39377.6 ± 3.14386.87 ± 12.31
Kinova3_PLate_GoalWall_Self410.49 ± 0.77409.46 ± 0.15409.63 ± 0.65407.67 ± 3.33
Kinova3_PLate_GoalWall_Trashcan421.05 ± 0.88421.19 ± 0.48422.63 ± 0.81423.21 ± 1.16
Kinova3_PLate_ObjectDoor_PickPlace423.26 ± 0.3407.55 ± 0.81406.43 ± 2.07414.11 ± 7.32
Kinova3_PLate_ObjectDoor_Push258.58 ± 18.57278.08 ± 34.02300.72 ± 90.5257.79 ± 48.13
Kinova3_PLate/ObjectDoor_Self404.4 ± 0.95403.82 ± 0.86405.9 ± 0.31401.09 ± 2.61
Kinova3_PLate:ObjectDoor_Trashcan415.34 ± 1.08415.81 ± 0.35416.09 ± 0.31414.34 ± 1.85
Kinova3_PLate:ObjectWall_PickPlace420.16 ± 2.07413.68 ± 5.5408.0 ± 2.29411.83 ± 4.11
Kinova3_PLate:ObjectWallPush400.11 ± 16.39403.95 ± 3.67406.48 ± 5.73403.65 ± 6.23
Kinova3_PLate:ObjectWall_Self391.09 ± 3.65391.99 ± 6.62386.25 ± 16.53391.7 ± 5.14
Kinova3_PLate:ObjectWall_Trashcan413.36 ± 1.11413.44 ± 3.93413.82 ± 2.45415.14 ± 1.46
Kinova3_Hollowbox_None_PickPlace424.86 ± 6.23433.78 ± 0.13430.43 ± 1.11430.84 ± 1.55
Kinova3_Hollowbox_None_Push361.99 ± 40.33369.17 ± 8.0396.28 ± 28.04380.94 ± 28.74
Kinova3_Hollowbox_None_Self417.73 ± 13.43417.46 ± 0.36423.26 ± 3.53424.02 ± 2.62
Kinova3_Hollowbox_None_Trashcan424.65 ± 1.15409.34 ± 12.4425.0 ± 2.72416.0 ± 15.33
Kinova3_Hollowbox_GoalWall_PickPlace386.68 ± 49.29425.24 ± 0.83421.85 ± 8.69420.32 ± 9.71
Kinova3_Hollowbox_GoalWallPush403.57 ± 0.96383.09 ± 8.37384.13 ± 10.01381.43 ± 8.58
Kinova3_Hollowbox_GoalWall_Self385.7 ± 36.06395.01 ± 4.51423.93 ± 5.1417.05 ± 13.43
Kinova3_Hollowbox_GoalWall_Trashcan406.37 ± 27.44404.11 ± 3.64405.09 ± 22.54389.36 ± 32.05
Kinova3_Hollowbox/ObjectDoor_PickPlace344.01 ± 63.38364.3 ± 13.82387.53 ± 20.66324.36 ± 55.48
Kinova3_Hollowbox/ObjectDoor_Push390.98 ± 46.38416.05 ± 8.96405.41 ± 5.34406.76 ± 16.92
Kinova3_Hollowbox/ObjectDoor_Self359.0 ± 25.63381.87 ± 12.39390.42 ± 6.21357.94 ± 48.51
Kinova3_Hollowbox/ObjectDoor_Trashcan405.87 ± 4.17411.24 ± 1.26414.92 ± 3.6408.73 ± 5.66
Kinova3_Hollowbox:ObjectWall_PickPlace424.57 ± 0.92408.98 ± 6.4417.83 ± 5.67419.63 ± 9.2
Kinova3_Hollowbox:ObjectWallPush249.37 ± 176.18319.13 ± 111.09324.39 ± 76.09335.61 ± 74.98
Kinova3_Hollowbox:ObjectWall_Self394.7 ± 9.3328.52 ± 61.08357.89 ± 37.75362.16 ± 40.05
Kinova3_Hollowbox:ObjectWall_Trashcan354.65 ± 48.89353.43 ± 78.59407.99 ± 1.96408.29 ± 4.94
+ +Table 16. Raw Scores for Composite, Part 4. + +
TaskDTMambaxLSTM [1:0]xLSTM [7:1]
Panda Boxes None_PickPlace409.21 ± 5.27408.66 ± 7.81409.83 ± 1.87405.46 ± 3.84
Panda Boxes None.Push402.52 ± 2.55373.74 ± 49.95400.35 ± 2.32399.37 ± 9.95
Panda Boxes None.Shelf383.69 ± 4.34381.42 ± 3.66383.55 ± 5.74386.01 ± 1.29
Panda Boxes None.Trashcan400.37 ± 5.64395.77 ± 2.77407.95 ± 1.92406.17 ± 3.36
Panda Boxes GoalWall_PickPlace401.53 ± 6.39389.57 ± 18.4397.12 ± 4.39401.64 ± 9.81
Panda Boxes GoalWallPush272.61 ± 79.58257.61 ± 57.4263.72 ± 45.71281.71 ± 31.21
Panda Boxes GoalWallShelf384.43 ± 1.66389.06 ± 3.69388.59 ± 3.9383.94 ± 2.0
Panda Boxes GoalWallTrashcan400.68 ± 4.51400.18 ± 6.03403.24 ± 5.65392.28 ± 16.82
Panda Boxes ObjectDoor_PickPlace359.01 ± 12.2365.3 ± 5.97359.63 ± 0.79359.27 ± 10.88
Panda Boxes ObjectDoorPush363.07 ± 3.13352.85 ± 13.71340.37 ± 6.06340.5 ± 4.97
Panda Boxes ObjectDoorShelf346.29 ± 2.53345.8 ± 4.91349.82 ± 6.46341.44 ± 11.05
Panda Boxes ObjectDoorTrashcan361.19 ± 1.65356.77 ± 3.24356.66 ± 5.73337.69 ± 32.63
Panda_Dumbbell_None_PickPlace342.62 ± 39.18310.15 ± 24.64318.76 ± 2.7342.02 ± 31.28
Panda_Dumbbell_NonePush299.34 ± 78.28341.64 ± 42.57359.06 ± 42.88263.35 ± 154.81
Panda_Dumbbell_NoneShelf264.01 ± 101.29362.15 ± 0.87319.71 ± 33.9297.54 ± 67.67
Panda_Dumbbell_NoneTrashcan174.45 ± 64.43329.06 ± 43.08373.77 ± 16.73327.93 ± 68.84
Panda_Dumbbell为目标PickPlace310.61 ± 42.65268.34 ± 147.91329.02 ± 62.28360.39 ± 5.25
Panda_Dumbbell为目标Shelf249.21 ± 43.29282.01 ± 4.89270.81 ± 11.98285.28 ± 5.25
Panda_Dumbbell为目标Shelf319.5 ± 68.89347.34 ± 20.01364.15 ± 2.6318.6 ± 33.85
Panda_Dumbbell为目标Trashcan377.5 ± 5.27360.98 ± 9.73379.05 ± 7.52337.19 ± 40.73
Panda_Dumbbell为目标PickPlace344.54 ± 5.77346.57 ± 0.33340.15 ± 8.5338.46 ± 10.42
Panda_Dumbbell为目标DoorPush289.31 ± 11.14308.25 ± 9.24309.4 ± 5.02304.1 ± 8.06
Panda_Dumbbell为目标DoorShelf323.26 ± 3.52279.85 ± 18.84313.19 ± 17.79323.49 ± 0.27
Panda_Dumbbell为目标DoorTrashcan334.05 ± 5.55337.49 ± 0.68341.0 ± 3.14333.06 ± 7.77
Panda_PLate_None_PickPlace384.37 ± 30.37404.77 ± 5.27397.34 ± 1.3398.41 ± 2.51
Panda_PLate_NonePush397.95 ± 1.05398.1 ± 4.91397.42 ± 3.32397.64 ± 2.7
Panda_PLate_None_Shelf352.29 ± 37.8372.12 ± 13.92370.46 ± 3.11367.5 ± 6.03
Panda_PLate_NoneTrashcan392.99 ± 1.41393.63 ± 2.91394.05 ± 3.74393.71 ± 1.27
Panda_PLate为目标PickPlace398.36 ± 3.95398.24 ± 4.51393.0 ± 1.9399.02 ± 4.53
Panda_PLate为目标Shelf387.68 ± 0.49377.79 ± 11.92355.01 ± 34.01350.1 ± 22.72
Panda_PLate为目标DoorPush380.05 ± 0.52367.67 ± 22.6339.46 ± 40.63359.76 ± 5.67
Panda_PLate为目标DoorTrashcan391.41 ± 3.83389.44 ± 3.8395.4 ± 2.49393.96 ± 2.68
Panda_PLate.ObjectDoor_PickPlace350.33 ± 18.2348.67 ± 8.14329.35 ± 4.62336.64 ± 16.61
Panda_PLate.ObjectDoorPush346.4 ± 9.33337.36 ± 17.06326.32 ± 7.92323.51 ± 2.24
Panda_PLate.ObjectDoor_Shelf290.68 ± 11.21321.54 ± 17.89326.04 ± 18.76305.25 ± 20.96
Panda_PLate.ObjectDoorTrashcan348.09 ± 3.63349.43 ± 4.05351.8 ± 0.25349.29 ± 1.91
Panda_Hollowbox_None_PickPlace410.32 ± 6.76412.25 ± 3.0408.01 ± 1.93405.29 ± 5.3
Panda_Hollowbox_NonePush404.95 ± 1.07406.74 ± 4.03401.61 ± 6.16402.46 ± 4.04
Panda_Hollowbox_None_Shelf387.59 ± 5.19380.86 ± 10.45369.22 ± 14.85369.57 ± 4.84
Panda_Hollowbox_NoneTrashcan399.09 ± 2.01400.52 ± 5.27401.03 ± 5.27392.82 ± 7.37
Panda_Hollowbox为目标PickPlace406.02 ± 10.18403.47 ± 0.97405.96 ± 0.39407.16 ± 3.77
Panda_Hollowbox为目标WallPush259.87 ± 75.12293.02 ± 117.06341.55 ± 23.29281.79 ± 42.98
Panda_Hollowbox为目标WallShelf387.38 ± 3.45369.01 ± 6.14365.26 ± 6.74316.46 ± 81.46
Panda_Hollowbox为目标WallTrashcan377.54 ± 44.77395.3 ± 4.85396.82 ± 4.17401.54 ± 5.21
Panda_Hollowbox.ObjectDoorPickPlace334.94 ± 35.48341.18 ± 32.31342.71 ± 7.54353.64 ± 2.45
Panda_Hollowbox.ObjectDoorPush192.69 ± 6.49294.01 ± 57.68257.48 ± 13.16230.54 ± 8.56
Panda_Hollowbox.ObjectDoor_shelf343.92 ± 10.22202.17 ± 4.87328.01 ± 42.52285.35 ± 64.92
Panda_Hollowbox.ObjectDoorTrashcan338.02 ± 36.48363.04 ± 2.59360.88 ± 2.45363.04 ± 1.29
\ No newline at end of file diff --git a/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/images.zip b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ec8cdd00c74da0a42f4477a509998054659630cc --- /dev/null +++ b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aeac1edc438fd6c6bc3b4458cc38a1f004b3918e5036785649d5d092cab841fd +size 4169151 diff --git a/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/layout.json b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a8be4b1f84d240dd954fc7ed806b16413fe627f9 --- /dev/null +++ b/alargerecurrentactionmodelxlstmenablesfastinferenceforroboticstasks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b99aece616488d1412375ec283f482420d920c13e97c2400d48221dfa508d6b +size 1095940 diff --git a/alensintointerpretabletransformermistakesviasemanticdependency/c97a70d8-fc1b-4777-8563-9d7d1e94a46f_content_list.json b/alensintointerpretabletransformermistakesviasemanticdependency/c97a70d8-fc1b-4777-8563-9d7d1e94a46f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1bb9b63537ca430de712fee06ce05e6a79a5b58c --- /dev/null +++ b/alensintointerpretabletransformermistakesviasemanticdependency/c97a70d8-fc1b-4777-8563-9d7d1e94a46f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f16223f49ee017a8b03ece84f2aa2de2f14980e8a3cf7e07efa0745531913d7d +size 178669 diff --git a/alensintointerpretabletransformermistakesviasemanticdependency/c97a70d8-fc1b-4777-8563-9d7d1e94a46f_model.json b/alensintointerpretabletransformermistakesviasemanticdependency/c97a70d8-fc1b-4777-8563-9d7d1e94a46f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..68292c7d07cf442f622677b16205a6f921aaf5cc --- /dev/null +++ b/alensintointerpretabletransformermistakesviasemanticdependency/c97a70d8-fc1b-4777-8563-9d7d1e94a46f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e55ed6a88376487dae02f91cf66133e08a862e37565d6c40189abc810e3b35e4 +size 212658 diff --git a/alensintointerpretabletransformermistakesviasemanticdependency/c97a70d8-fc1b-4777-8563-9d7d1e94a46f_origin.pdf b/alensintointerpretabletransformermistakesviasemanticdependency/c97a70d8-fc1b-4777-8563-9d7d1e94a46f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..54e7b54eb6c6475aab01fed0b2795318ef9f1948 --- /dev/null +++ b/alensintointerpretabletransformermistakesviasemanticdependency/c97a70d8-fc1b-4777-8563-9d7d1e94a46f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:131ab17126da5a23a0cc747f22477cd6298a8cb504cac457ad97cded5fe7ea3b +size 4407347 diff --git a/alensintointerpretabletransformermistakesviasemanticdependency/full.md b/alensintointerpretabletransformermistakesviasemanticdependency/full.md new file mode 100644 index 0000000000000000000000000000000000000000..41b6b0425b272b3e543514bc9a245392e0e5dde0 --- /dev/null +++ b/alensintointerpretabletransformermistakesviasemanticdependency/full.md @@ -0,0 +1,713 @@ +# A Lens into Interpretable Transformer Mistakes via Semantic Dependency + +Ruo-Jing Dong1 Yu Yao1 Bo Han2 Tongliang Liu1 + +# Abstract + +Semantic Dependency refers to the relationship between words in a sentence where the meaning of one word depends on another, which is important for natural language understanding. In this paper, we investigate the role of semantic dependencies in answering questions for transformer models, which is achieved by analyzing how token values shift in response to changes in semantics. Through extensive experiments on models including the BERT series, GPT, and LLaMA, we uncover the following key findings: 1). Most tokens primarily retain their original semantic information even as they propagate through multiple layers. 2). Models can encode truthful semantic dependencies in tokens in the final layer. 3). Mistakes in model answers often stem from specific tokens encoded with incorrect semantic dependencies. Furthermore, we found that addressing the incorrectness by directly adjusting parameters is challenging because the same parameters can encode both correct and incorrect semantic dependencies depending on the context. Our findings provide insights into the causes of incorrect information generation in transformers and help the future development of robust and reliable models. + +# 1. Introduction + +Large Language Models (LLMs) based on the transformer architecture such as BERT (Devlin et al., 2018), GPT(Radford et al., 2019; Brown, 2020), and LLaMA (Touvron et al., 2023) have demonstrated remarkable capabilities across various natural language tasks. Alongside their benefits, LLMs pose significant risks and challenges (Weidinger et al., 2021). For example, LLMs may intensify biases (Navigli et al., 2023; Taori & Hashimoto, 2023), produce toxic content (Gehman et al., 2020; Ousidhoum et al., 2021), + +$^{1}$ Sydney AI Centre, The University of Sydney $^{2}$ TMLR Group, Hong Kong Baptist University. Correspondence to: Tongliang Liu . + +Proceedings of the $42^{st}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +generate false information (Lin et al., 2021), exhibit hallucinations (Ji et al., 2023), leak sensitive training data (Carlini et al., 2021), and even engage in deception (OpenAI, 2023; Scheurer et al., 2024). Addressing these issues has led to the development of evaluation methods for LLM performance (Liang et al., 2022) and strategies aimed at mitigating harmful outputs (Ganguli et al., 2022; Bai et al., 2022). + +Existing research has elucidated several reasons for the mistakes observed in LLMs. Studies have suggested that non-linearity, insufficient model averaging, and inadequate regularization lead to mistakes when encountering crafted adversarial examples (Chakraborty et al., 2018; Zhang et al., 2020). Additionally, the programmatic behavior of LLMs may lead to vulnerabilities under security attacks and produce harmful content (Kang et al., 2024). Competing objectives and mismatched generalization may cause the susceptibility of safety-trained LLMs (Wei et al., 2024). Studies also indicate various reasons for language models generating unfaithful or nonsensical text, including source-reference divergence in data, imperfect representation learning, erroneous decoding, exposure bias, and parametric knowledge bias (Ji et al., 2023). These studies have identified various reasons that lead to mistakes and enhanced our understanding, providing valuable insights into model weaknesses. Building upon these insights, we aim to further explore the internal mechanisms within the model's architecture that lead to mistakes. + +We believe that mistakes produced by LLMs arise from the way semantic dependencies, the relationships where the meaning of one token depends on another (Mel'čuk, 2001), are encoded within transformer models. Intuitively, in transformer models, inputs are tokenized and embedded as vectors that carry semantic information. These tokens then pass through multiple attention layers, where they exchange and aggregate semantic information to build semantic dependencies. These dependencies are crucial for the model's contextual understanding and reasoning, enabling it to generate coherent outputs. Since the model's predictions ultimately depend on the final layer outputs, which are constructed from the representations generated by earlier layers, any inaccuracies in the propagation and exchange of semantic information can result in misrepresented semantic dependencies. Such mistakes disrupt the model's ability to accurately understand token relationships and contextual + +meaning, thereby leading to mistakes in predictions. + +To systematically explore the role of semantic dependencies in causing model mistakes, we propose a method to interpret the semantic information aggregation mechanisms of transformer models. The idea is that altering the semantic information of an input token should result in significant changes in the outputs of tokens that depend on this input information, while tokens that are not semantically dependent remain relatively unchanged. By evaluating the variations in output token representations in response to perturbations in input tokens, we can effectively trace the flow and aggregation of semantic information throughout the model. This approach allows us to gain insights into how semantic dependencies are encoded and propagated within transformer models and helps identify potential disruptions that may contribute to prediction mistakes. + +Key Findings. In our exploration, we analyzed different transformer models such as BERT, LLaMA, and GPT. Here, we explain several key findings regarding the behavior of tokens for semantic information aggregation and propagation. + +![](images/afa0a2e21f02c842c31388a7d3dd0527821099c4c55225f8c7e17f593b3964b4.jpg) +Figure 1: An Illustration of Finding 1. + +1). Most tokens primarily retain their original semantic information, even as they pass through the layers of transformers. For example, in Figure 1, the arrows indicate the semantic information flow from the token at layer 0 to token at layer L. For the token "aggregates" in the input token sequence in layer 0, the final layer's token aggregates a large amount of information from its input token and a small amount of information from other tokens. The fact that most tokens still predominantly reflect their initial semantics highlights model's strong retention property, which is not inherently expected given the iterative aggregation of semantic information across many layers. + +![](images/f0df9ae0b157a3a30c91fae1caa3f04ebb320ca51900ac248f2c1d4f8fcfc932.jpg) +Figure 2: An Illustration of Finding 2. + +2). A token in the final layer usually encodes truthful semantic dependency. Beyond preserving individual token semantics, the model must also encode truthful semantic + +dependencies between tokens to understand sentence-level meaning. For example, the model must recognize how adjectives modify nouns or how subjects relate to actions. In the case of the input "red apple and blue sky" shown in Figure 2, an output token will encode the semantically dependent information "red" and "apple" together, rather than encoding semantically independent information like "blue" and "apple". We find our evaluated models can encode truthful semantic dependency in the final layer tokens. + +![](images/09bf2d0ffab5a498adf28864c2954ff3a026ae248c9f9cb71fc6cf6e952b5531.jpg) +Figure 3: An Illustration of Finding 3. + +3). Finally, we found that when the model makes mistakes, certain tokens incorrectly encode information that is not semantically dependent. For example, Figure 3 demonstrates that semantic information is aggregated differently in the output token sequence when the model outputs an incorrect answer. In a question-answering task where the context sequence "white rhinos are grey instead of white" is paired with the question "What is the color of white rhinos?", the correct answer is "grey". However, when the model incorrectly outputs "white", the question's key terms, such as "color" and "rhinos", contain more information about "white" rather than "grey". This highlights how false semantic dependency encoded in key tokens can lead to incorrect outputs. +4). Additionally, we also find that the encoded semantic dependencies within a token are highly sensitive to both irrelevant context changes and the order of contexts. Due to space limitations, a detailed introduction, experiments, and results are provided in Appendix A.2. + +Implications Our insights into semantic dependency encoded within tokens of transformer models potentially help design new transformer architectures to be more resilient and semantically coherent. For example, our finding reveals that model mistakes often result from certain tokens erroneously encoding semantic dependencies that should not exist. To address this, future research could refine attention mechanisms to better prioritize meaningful token interactions and reduce the impact of the adversarial context. This could be achieved by implementing dynamic re-weighting + +strategies in top QA task-specific attention heads we localized and incorporating stricter regularization techniques that can prevent tokens from erroneously encoding false dependencies while cautiously preserving the truthful ones. + +Our paper is structured as follows: first, in Section 3, we verify a critical prerequisite for studying token-level semantic dependency: whether a final-layer token retains its original semantic information. Because to define a matched dependency between an input token (e.g., red) and another token (e.g., apple), the corresponding final-layer token apple or red must reflect its original meaning. The result confirms our method's validity to capture semantic dependencies across multiple layers. Next, in Section 4, we systematically verify if models can encode truthful semantic dependency. Our finding indicates while models generally possess this foundational capability, mistakes still occur. Therefore, in Section 5, we further investigate how mistakes arise from false semantic dependencies in QA tasks and develop a method to pinpoint a group of attention head parameters responsible for token-level semantic dependency. We testify that addressing the incorrectness by directly pruning parameters is challenging because the same parameters can encode both correct and incorrect semantic dependencies. + +# 2. Related Work + +Semantic Dependency Parsing and Semantic Role Labeling. Semantic dependency parsing (SDP) (Björkelund et al., 2010; Dozat & Manning, 2018) aims to identify semantic relationships between words in a sentence. Closely related to SDP, semantic role labeling (SRL) (He et al., 2017; Chen et al., 2025) focuses on identifying the predicate-argument structure of a sentence by assigning roles to words or phrases. However, the internal mechanisms by which transformer models encode, propagate, and utilize semantic dependencies remain largely opaque. Our work bridges this gap by exploring how internal mechanisms contribute to semantic dependency encoding and how these insights can be leveraged to address mistakes. + +Semantic Information Flow in Transformer. Existing works (Liao et al., 2021; Schuster et al., 2022; Elhoushi et al., 2024) have studied activation stability and the limited contribution to token refinement in later layers of transformer models. However, whether the last-layer token retains its original semantic information in the input layer remains unexplored. Previous study (Geva et al., 2023) analyzes how factual associations are recalled while our study addresses a gap by studying how semantic dependencies are encoded in tokens and influence QA tasks. + +Interpretable Model Mistake Based on Attention Heads. Previous studies highlight the roles of specific attention heads in model performance, such as retrieval heads for + +retrieving factual information (Wu et al., 2024) or property-specific attention heads in CLIP models (Gandelsman et al., 2024). Our work offers another perspective by interpreting model mistakes via token-level semantic dependency encoding, which provides insights into understanding and correcting model mistakes under specific question-answering cases. Additionally, our finding in mutual attention heads responsible for key dependencies in QA tasks also shows the importance of pruning parameters in attention heads without tempering the correct semantic dependency encoding. + +Probing Study for Linguistic Properties in Transformers. Probing methods (Rogers et al., 2021) analyze the internal representations of pre-trained models to determine whether specific linguistic properties are encoded. For instance, research shows that BERT captures syntactic tree structures (Hewitt & Manning, 2019), semantic roles, and entity types (Tenney, 2019). Studies also quantify the mutual information between representations and linguistic properties (Pimentel et al., 2020). Token ablation is a parameter-free probing technique, which is widely used to analyze syntactic subtree structures (Wu et al., 2020), syntactic agreement (Finlayson et al., 2021), and bias (Vig et al., 2020). Naturally occurring morpho-syntactic perturbations is also used to probe dependencies (Amini et al., 2023). Unlike these studies, which focus on static linguistic features, we investigate token-level semantic dependency encoding, introducing a framework to quantify dependency strength without prior knowledge. Our approach captures context-sensitive semantic dependencies, which can vary across diverse scenarios. + +Feature Attribution and Binding Study. Feature attribution methods primarily aim to assess the importance of individual tokens or features to the model's output. For example, prior work on attention flow (Abnar & Zuidema, 2020) quantifies token importance through accumulated attention matrices. Gradient-based techniques like Conservative Propagation (Ali et al., 2022) is used to assess token attribution. Our study shifts focus from token importance to the semantic dependencies encoded in token representations and how these affect model behavior. + +Existing semantic dependency methods based on feature-token interactions (Eberle et al., 2020; Janizek et al., 2021; Schnake et al., 2021) mainly focus on studying the contribution of combinations of features or tokens to model predictions. Meanwhile, feature binding methods (Feng & Steinhardt, 2023; Vasileiou & Eberle, 2024; Wattenberg & Viégas, 2024) often do not test whether the model's most confident output reflects encoded semantic dependencies; rather, many assume this relationship holds and study downstream properties. In contrast, our method is designed to explicitly test the assumption by evaluating whether there is a dependence between the model's output and the semantic dependency encoded in the final-layer token. + +# 3. Most Tokens Primarily Retain Their Original Semantic Information Through Transformer Layers + +In this section, we introduce a perturbation-based method to explore some mechanisms of semantic information propagation in transformers. Extensive experiments show 1). even through multiple transformer layers, most final-layer tokens still primarily maintain their original semantic information from the first layer; 2). every final-layer token contains semantic information from almost all tokens (including itself) of the entire sequence. The results indicate our proposed method can effectively capture semantic changes in the input text and is suitable for detecting token-level semantic dependencies. + +Transformer Architecture We consider a general $L$ -layer transformer model. Each layer consists of a multi-head self-attention mechanism (MHA) followed by a position-wise feed-forward network (FFN), along with residual connections. The input sequence of $N$ tokens is embedded into $D$ -dimensional vectors and combined with positional encodings to form the initial representations: + +$$ +\mathbf {z} ^ {0} = \left[ \mathbf {z} _ {1} ^ {0}, \mathbf {z} _ {2} ^ {0}, \dots , \mathbf {z} _ {N} ^ {0} \right], \tag {1} +$$ + +where $\mathbf{z}_i^0\in \mathbb{R}^D$ is the embedding of the $i$ -th token in 0-th layer. + +In transformer-based models, the token sequence is updated through $L$ layers using the following two steps, where multi-head attention (MHA) and feed-forward networks (FFN) work together to enrich the text representations: + +$$ +\hat {\mathbf {z}} ^ {l} = \operatorname {M H A} ^ {l} \left(\mathbf {z} ^ {l - 1}\right) + \mathbf {z} ^ {l - 1}, \quad \mathbf {z} ^ {l} = \operatorname {F F N} ^ {l} \left(\hat {\mathbf {z}} ^ {l}\right) + \hat {\mathbf {z}} ^ {l}, \tag {2} +$$ + +where $l = 1,2,\ldots ,L$ . Here, $\mathrm{MHA}^l$ and $\mathrm{FFN}^l$ denote the multi-head attention and feed-forward network operations at layer $l$ , respectively. The residual connections ensure that information flows directly through layers, facilitating the retention of original semantic information. For the $i$ -th token in the output of the $L$ -th layer, we have: + +$$ +\mathbf {z} _ {i} ^ {L} = \mathbf {z} _ {i} ^ {0} + \sum_ {l = 1} ^ {L} \mathrm {M H A} _ {i} ^ {l} \left(\mathbf {z} ^ {l - 1}\right) + \sum_ {l = 1} ^ {L} \mathrm {F F N} _ {i} ^ {l} \left(\hat {\mathbf {z}} ^ {l}\right), \tag {3} +$$ + +where $\mathrm{MHA}_i^l$ and $\mathrm{FFN}_i^l$ represent the operations affecting the $i$ -th token at layer $l$ (Vaswani et al., 2017). Here we use the formulation proposed in the study (Gandelsman et al., 2024), which ignores the layer-normalization term. The above equation shows that a last-layer token can be written as a combination of first-layer tokens. This suggests that a last-layer token incorporates a varying yet unquantified amount of semantic information derived from the entire token sequence. Our research aims to address this gap by measuring such token-level semantic contribution. + +Based on the above equation, we identify two underexplored mechanisms for validation. 1). Self-information retention: validate whether the $i$ -th token $\mathbf{z}_i^L$ in the output layer primarily retains information about the $i$ -th token $\mathbf{z}_i^0$ in the input layer. Specifically, we compare the changes of all tokens in the final layer $L$ with the changes in $\mathbf{z}_i^0$ . If $\mathbf{z}_i^L$ changes most significantly when $\mathbf{z}_i^0$ changes, it suggests the $i$ -th token in the final layer contains most information derived from the $i$ -th token in the first layer. 2). Sequence-level semantic aggregation: validate whether a token in $L$ -th layer aggregates semantic information from tokens of the entire sequence $z^0$ . If every token change in $z^0$ leads to the change of $\mathbf{z}_i^L$ , it suggests $\mathbf{z}_i^L$ contains information from all tokens. + +Token Perturbation We then generate $K$ perturbed versions of the input token $\mathbf{z}^{0(\mathrm{org})}$ by only replacing the $i$ -th token $\mathbf{z}_i^0$ with randomly sampled tokens from the vocabulary $\mathcal{V}$ . Specifically, we sample a new token $\tilde{\mathbf{z}}_i^{0(k)}$ for $k$ times as follows. + +$$ +\text {o r i g i n a l} \mathbf {z} ^ {0 (\text {o r g})} = [ \mathbf {z} _ {1} ^ {0}, \dots , \mathbf {z} _ {i} ^ {0}, \dots , \mathbf {z} _ {N} ^ {0} ]; +$$ + +$$ +\text {p e r t u r b e d} \tilde {\mathbf {z}} ^ {0 (k)} = \left[ \mathbf {z} _ {1} ^ {0}, \dots , \tilde {\mathbf {z}} _ {i} ^ {0 (k)}, \dots , \mathbf {z} _ {N} ^ {0} \right], \tag {4} +$$ + +$$ +\text {w h e r e} \tilde {\mathbf {z}} _ {i} ^ {0 (k)} \sim \operatorname {U n i f o r m} (\mathcal {V}) \quad \text {a n d} k \in \{1, \dots , K \}. +$$ + +Each perturbed sequence of token $\tilde{\mathbf{z}}^{0(k)}$ is processed independently through the $L$ -layer transformer model, yielding $L$ -layer token $\tilde{\mathbf{z}}^{L(k)}$ . Similarly, the corresponding $L$ -layer token for $\mathbf{z}^{0(\mathrm{org})}$ is $\mathbf{z}^{L(\mathrm{org})}$ . + +Measuring Semantic Dependency To quantify how the perturbation of the $i$ -th token $\mathbf{z}_i^0$ in the first layer affects $j$ -th token $\mathbf{z}_j^0$ in final layer, we examine the average change of the $j$ -th token across the $K$ sequences. Specifically, for the $j$ -th token, we calculate the semantic dependency score $\Delta_{\mathbf{z}_j^L|\mathbf{z}_i^0}$ , which is achieved by calculating average change $\Delta_{\mathbf{z}_j^L|\mathbf{z}_i^0}$ between its value in the original sequence and its values in the perturbed sequences: + +$$ +\Delta_ {\mathbf {z} _ {j} ^ {L} \mid \mathbf {z} _ {i} ^ {0}} = \frac {1}{K} \sum_ {k = 1} ^ {K} \left\| \tilde {\mathbf {z}} _ {j} ^ {L (k)} - \mathbf {z} _ {j} ^ {L (\mathrm {o r g})} \right\| _ {2}. \tag {5} +$$ + +A higher value of $\Delta_{\mathbf{z}_j^L|\mathbf{z}_i^0}$ indicates that the $j$ -th token in final layer $L$ is more sensitive to change of the $i$ -th token. It implies that $j$ -th token encodes more information from the $i$ -th token, i.e. encodes a stronger semantic dependency. + +To validate that the $j$ -th token $\mathbf{z}_j^L$ in the output layer $L$ encode strongest semantic dependency with the $i$ -th token in the input layer $\mathbf{z}_i^0$ , we compare the average change $\Delta_{\mathbf{z}_j^L|\mathbf{z}_i^0}$ for all tokens. If $\Delta_{\mathbf{z}_i^L|\mathbf{z}_i^0}$ is the largest among all $\Delta_{\mathbf{z}_j^L|\mathbf{z}_i^0}, j \in \{1, \dots, N\}$ , we can determine the $j$ -th token in the final layer encode strongest semantic dependency with $i$ -th token. For the first validation across multiple instances, + +Table 1: Two validations on basic mechanisms of token-level semantic information propagation. Validation 1 is for self-information retention. Validation 2 is for sequence-level semantic aggregation. + +
Modelvalidation 1 (%)validation 2 (%)
BERT (encoder only)98.8199.29
RoBERTa (encoder only)93.0694.69
TinyRoBERTa (encoder only)94.2996.40
ALBERT (encoder only)97.0197.74
DistilBERT (encoder only)95.1196.06
DeBERTa (encoder only)99.6299.74
MobileBERT (encoder only)96.4999.37
MiniLM (encoder only)88.6993.42
GPT-2 (decoder-only, auto-regressive)75.15100.00
LLaMA3 (decoder-only, auto-regressive)95.59100.00
+ +we calculate the percentage $P$ that the $i$ -th token's perturbation in input layer primarily affects its corresponding output token $\mathbf{z}_i^L$ in a transformer-based model $f_{\theta}$ on $M$ tested token cases as follows: + +$$ +P \left(f _ {\theta}\right) = \frac {1}{M} \sum_ {m = 1} ^ {M} \mathbb {1} _ {\left\{i = \arg \max _ {j = 1} ^ {N} \Delta_ {\mathbf {z} _ {j} ^ {L} | \mathbf {z} _ {i} ^ {0}} \right\}}. \tag {6} +$$ + +For the second validation, we calculate the percentage of cases when each input token $\mathbf{z}_i^0$ affect each output token $\mathbf{z}_j^L$ , i.e., $\Delta_{\mathbf{z}_j^L|\mathbf{z}_i^0} > 0$ , for all $i,j \in \{1,\dots,N\}$ + +Experiments We validate model's self-information retention and sequence-level semantic aggregation using various sentences from six datasets, including gsm8k (Cobbe et al., 2021), Yelp (Zhang et al., 2015), GLUE (Wang et al., 2019), CNN/DailyMail (Hermann et al., 2015), OpenOrca (Lian et al., 2023) and WikiText (Merit et al., 2016). For each model, over 100,000 token cases were evaluated for each datasets (each token perturbation is treated as one case, 600,000 cases in total). Our analysis involves 10 various Transformer-based models, including BERT (Devlin et al., 2018), RoBERTa (Liu, 2019), ALBERT (Lan, 2019), DistilBERT(Sanh, 2019), DeBERTa (He et al., 2020), MobileBERT (Sun et al., 2020), MiniLM (Wang et al., 2020), GPT (Radford et al., 2019), and LLaMA (Touvron et al., 2023). Noted that we compute changes for nearly all tokens (over $95\%$ ) in each sequence, excluding special tokens such as [CLS] and [SEP], which ensures a comprehensive assessment of the semantic dependency across the input. + +Results The results in Table 1 summarize two key metrics: the first column represents the percentage of tokens that primarily retain their original semantic information, while the second column indicates the percentage of input tokens that propagate semantic information to other tokens. Compared to BERT and LLaMA, there is a part of tokens that do not preliminarily retain their original information in GPT. From this experiment, we can observe that most tokens primarily retain their original semantic information, even as they pass through the transformer layers. Additionally, we verify that + +almost every final-layer token receives semantic information from every token (including itself) in the sequence. + +# 4. A Final-layer Token Encodes Truthful Semantic Dependency + +In the previous section, we observed that most tokens primarily retain their original semantic information. However, we also found that tokens not only retain their own semantic information but also integrate semantic information from all other tokens. In this section, we aim to verify whether a token usually contains semantically dependent information, i.e., encodes truthful semantic dependencies in the final layer. Specifically, our method investigates if tokens encode more semantic information from semantically related words compared to unrelated words in the sequence. We find that this holds for most tokens. + +To assess whether a token effectively encodes truthful semantic dependency, we first randomly select a word $\mathbf{w}_i^0$ . We then identify a group $G_{\mathbf{z}_i^0}$ containing the indices of semantically dependent tokens by leveraging semantic dependency parsing tools SpaCy (Honnibal et al., 2020), which parse the words in the sentence that are semantically dependent with $\mathbf{w}_i^0$ , including both head and children in parsing tree and the word itself. SpaCy leverages a pre-trained neural network model to predict syntactic relationships between words, offering more comprehensive annotations than human labeling. Next, we estimate a semantically dependent token group $\hat{G}_{\mathbf{z}_i^0}$ by changing $\mathbf{z}_i^0$ and obtain the indices of top $K_{\mathrm{top}}$ tokens most sensitive to the change of $\mathbf{z}_i^0$ . Finally, we evaluate the alignment between $G_{\mathbf{z}_i^0}$ and $\hat{G}_{\mathbf{z}_i^0}$ . + +Semantically Dependent Token Groups A group $G_{\mathbf{z}_i^0}$ contains the indices of tokens semantically dependent on $\mathbf{z}_i^0$ . To identify a semantically dependent token group $G_{\mathbf{z}_i^0}$ , we leverage existing semantic dependency parsing methods to obtain the semantically dependent word group $W_{\mathbf{w}_i^0}$ of the word $\mathbf{w}_i^0$ , then convert it into a token group $^1$ . Intuitively, dependency parsing analyzes the grammatical structure of a sentence, establishing relationships between "head" words and the words that modify them. For example, in the sentence "The quick brown fox jumps over the lazy dog," the word "fox" is semantically related to word "quick", "brown" and "jumps" based on their grammatical dependencies. Once $W_{\mathbf{w}_i^0}$ is identified, each word $\mathbf{w}_j$ in $W_{\mathbf{w}_i^0}$ is converted into its corresponding token indices, and $\mathbf{w}_i^0$ is converted into $\mathbf{z}_i^0$ , forming $G_{\mathbf{z}_i^0}$ . + +Estimated Semantically Dependent Token Group by Leveraging Token Perturbation To estimate the semantically dependent token group $\hat{G}_{\mathbf{z}_i^0}$ for each token $\mathbf{z}_i^0$ , we + +Table 2: Alignment scores that indicate how well individual tokens encode truthful semantic dependencies (\%). + +
ModelAverage Alignment Score (%)
BERT87.86
RoBERTa87.71
TinyRoBERTa82.44
ALBERT88.77
DistilBERT88.88
DeBERTa87.17
MobileBERT85.80
MiniLM84.62
GPT-293.41
LLaMA392.47
+ +measure semantic dependency score $\Delta_{\mathbf{z}_j^L|\mathbf{z}_i^0}$ by Eq. (5) for each token $\mathbf{z}_j^L$ in the final layer $L$ . Then we rank it and select the largest $K_{\mathrm{top}}$ indices within the sequence into a set denoted as $\hat{G}_{\mathbf{z}_i^0}$ . + +$$ +\hat {G} _ {\mathbf {z} _ {i} ^ {0}} = \{j \mid j \in \text {i n d i c e s o f} \max _ {K _ {\text {t o p}}} \left(\Delta_ {\mathbf {z} _ {j} ^ {L} \mid \mathbf {z} _ {i} ^ {0}}, j = 1, \dots , N\right) \}. \tag {7} +$$ + +Calculating Alignment Score To assess the alignment between our estimated semantically dependent token group $\hat{G}_{\mathbf{z}_i^0}$ and the semantically related token group $G_{\mathbf{z}_i^0}$ , we compute the alignment score $S_i$ to measure the overlap between $\hat{G}_{\mathbf{z}_i^0}$ and $G_{\mathbf{z}_i^0}$ : + +$$ +S _ {\mathbf {z} _ {i} ^ {0}} = \frac {\left| G _ {\mathbf {z} _ {i} ^ {0}} \cap \hat {G} _ {\mathbf {z} _ {i} ^ {0}} \right|}{K _ {\text {t o p}}}, \tag {8} +$$ + +where $\left|G_{\mathbf{z}_i^0}\cap \hat{G}_{\mathbf{z}_i^0}\right|$ represents the number of overlapping tokens between $G_{\mathbf{z}_i^0}$ and $\hat{G}_{\mathbf{z}_i^0}$ . A high alignment score means the tokens influenced by the perturbation of $\mathbf{z}_i^0$ tend to be the ones that are semantically related to it, indicating models' ability to encode truthful semantic dependency. + +Experiments and Results We conducted this experiment on 10 transformer models. We first construct a specialized word dependency dataset using SpaCy. This dataset includes sentences from the GLUE dataset, where each word (as one case) in the sentence is annotated with its semantically dependent word groups as standard dependency data. For each model, we evaluated over 10,000 cases, where each case corresponds to perturbing a single token and computing the alignment score. The average alignment scores across all cases are presented in Table 2. The overall high alignment scores indicate these models can generally encode truthful semantic dependencies in final-layer tokens. + +# 5. When the Model Makes Mistakes, It Falsely Aggregates Semantically Independent Information within a Token + +Models rely on correctly encoding semantic dependencies to generate coherent and contextually appropriate outputs; + +otherwise, the resulting content may be random or confusing. Although Section 4 showed that transformer models can encode truthful semantic dependencies in the final layer, they still produce incorrect outputs in certain contexts. This suggests that correctly encoding most semantic dependencies is insufficient to prevent mistakes. We hypothesize that such mistakes arise from the model's tendency to encode false semantic dependencies in tokens through transformer layers. Intuitively, in the final layer, token representations are transformed via a linear prediction layer to produce output logits. However, the limited discriminative power of this linear layer makes it susceptible to errors when tokens encode false semantic dependencies from other unrelated or misleading tokens, ultimately leading to incorrect predictions. To test our hypothesis, we conduct an empirical analysis using the question answering (QA) task, which is particularly suitable for evaluating the influence of token-level semantic dependencies because QA inherently requires the model to understand and associate tokens in a question with those in the context. + +In this section, we firstly identify that model mistakes in QA tasks stem from incorrect semantic dependencies encoded in question tokens. Specifically, our method examines whether the semantic dependency strength between wrong answer tokens and question tokens exceeds that between correct answer tokens and question tokens. Furthermore, to localize model parameters that encode semantic dependency, we propose a method to pinpoint a group of attention head parameters responsible for token-level semantic dependency. We demonstrate that directly pruning the parameters to correct these mistakes is challenging, as the same parameters may encode both correct and incorrect semantic dependencies. + +# 5.1. Evaluation of Correct & False Semantic Dependencies in QA Task + +To test our hypothesis that model errors often result from falsely aggregated independent semantic information within tokens, we analyze QA pairs where the language model outputs either the correct answer extracted from the context or an incorrect one. We then compare the semantic dependencies between tokens in incorrect answers and question tokens against those in correct answers within a question-answering (QA) task. + +Consider the QA example illustrated in Figure 4, where the context provides the correct answer "national anthem" and an misleading phrase "sign language." If the BERT model incorrectly outputs "sign language" instead of "national anthem", this presents an opportunity to examine the underlying semantic dependencies between context tokens and question tokens that led to the mistake. + +Formally, let $Q = \{\mathbf{q}_i^0\}_{i=1}^{N_Q}$ represent the set of tokens in + +![](images/2aac0f2216795e3158b6593fedf0e29f1ff2825f42ce409fc8ac2ad8f99935eb.jpg) +Figure 4: A question-answer instance for false semantically dependent information within tokens. + +![](images/efa726dc3da88102fda1572fede5948157d3f259677a46192eafc4ec3bae09ef.jpg) + +the question, $A_{\mathrm{correct}} = \{\mathbf{a}_i^0\}_{i=1}^{N_C}$ represent the correct answer tokens in the context, and $A_{\mathrm{wrong}} = \{\mathbf{a}_i^0\}_{i=1}^{N_W}$ represent the incorrect answer tokens in the context. For each answer token $\mathbf{a}_i$ , we measure its semantic dependency on each question token $\mathbf{q}_j \in Q$ by computing a semantic dependency score $\Delta_{\mathbf{q}_j^L|\mathbf{a}_i^0}$ by Eq. (5). This score quantifies the degree to which answer token $\mathbf{a}_i$ influences the question token $\mathbf{q}_j$ in the final layer $L$ of the model. Next, we determine the maximum semantic dependency score for each answer token by selecting the highest $\Delta_{\mathbf{q}_j^L|\mathbf{a}_i^0}$ across all question tokens $\Delta_{\mathbf{a}_i^0|Q}' = \max_{j=1}^{N_Q} \Delta_{\mathbf{q}_j^L|\mathbf{a}_i^0}$ . + +For both correct and incorrect answers, we compute the highest dependency scores across all answer tokens: + +$$ +\Delta_ {A _ {\text {c o r r e c t} | Q}} ^ {\prime} = \max _ {k = 1} ^ {N _ {C}} \Delta_ {\mathbf {a} _ {k}} ^ {\prime}, \quad \Delta_ {A _ {\text {w r o n g} | Q}} ^ {\prime} = \max _ {k = 1} ^ {N _ {W}} \Delta_ {\mathbf {a} _ {k}} ^ {\prime}. \tag {9} +$$ + +To evaluate whether the maximum dependency score for incorrect answers exceeds that of correct answers when a model makes mistakes, we calculate the percentage that $\Delta_{A_{\mathrm{wrong}|Q}}^{\prime}$ is greater than $\Delta_{A_{\mathrm{correct}|Q}}^{\prime}$ given the question and answer pairs where the model makes mistakes. Specifically, + +$$ +P \left(f _ {\theta}\right) = \frac {1}{H} \sum_ {i = 1} ^ {H} \mathbb {1} _ {\left\{\Delta_ {A _ {\text {w r o n g}} | Q} ^ {\prime} > \Delta_ {A _ {\text {c o r r e c t}} | Q} ^ {\prime} \right\}}, \tag {10} +$$ + +where $H$ represents the total number of failed QA instances. + +Experiments We apply our evaluation method to the Stanford Question Answering Dataset (SQuAD) 1.1 (Rajpurkar et al., 2016), which comprises context paragraphs extracted from Wikipedia articles, along with manually crafted questions and their corresponding correct answers. Each QA instance in the dataset provides a context from which the correct answer is a continuous span of text, which means the answer exists verbatim in the context. Our analysis involves processing over 100,000 QA validation cases across 10 Transformer-based models. + +Table 3: Two-by-two possibility table for model answer correctness and semantic dependency correctness. + +
Correct DependencyIncorrect Dependency
Answer CorrectlyP'(fθ)1 - P'(fθ)
Answer Incorrectly1 - P(fθ)P(fθ)
+ +For each QA instance, we first determine whether the model fails to output the correct answer by evaluating the F1 score between the model's predicted answer and the ground truth answer. We consider a prediction to be incorrect if the F1 score is below 0.6. Consequently, we collect these incorrect answer cases (where $\mathrm{F}1 < 0.6$ ) for further analysis to examine the presence of false dependencies. This selection criterion ensures that we focus on substantial mistakes rather than minor discrepancies, thereby providing a robust basis for evaluating semantic dependency misalignments. + +In these selected failed QA cases, we compare the semantic dependencies between question tokens and correct/incorrect answer tokens. For each case, we calculate whether the maximum semantic dependency score of incorrect answer tokens $\Delta_{A_{\mathrm{wrong}}|Q}^{\prime}$ exceeds that of correct answer tokens $\Delta_{A_{\mathrm{correct}}|Q}^{\prime}$ . This comparison allows us to assess whether the model's mistakes are associated with false semantic dependencies from incorrect context tokens influencing question tokens. For successful QA cases, we calculate the percentage $P^{\prime}(f_{\theta})$ when the maximum semantic dependency score of correct answer tokens $\Delta_{A_{\mathrm{correct}}|Q}^{\prime}$ exceeds that of incorrect answer tokens, $\Delta_{A_{\mathrm{wrong}}|Q}^{\prime}$ , where the incorrect tokens are randomly sampled $T$ times from the remaining context tokens (excluding the correct answer tokens). Finally, we summarize $P(f_{\theta})$ and $P^{\prime}(f_{\theta})$ for all models. + +Results For each model, we provide a two-by-two possibility table (shown in Table 3) for model answer correctness and semantic dependency correctness. $P(f_{\theta})$ stands for the percentage when the model answers incorrectly and semantic dependency is incorrectly encoded. $P'(f_{\theta})$ stands for + +Table 4: Summarized percentages for two-by-two possibility table and F1 scores of all models. Results based on GPT evaluations are provided in the Appendix A.3. + +
BERTRoBERTatinyRoBERTaALBERTDistilBERTDeBERTaMobileBERTMiniLMGPT-2LLaMA3
P(fθ)79.0769.2077.9471.8681.8075.3266.6177.5648.0464.56
1-P(fθ)20.9330.8022.0628.1418.2024.6833.3922.4451.9035.44
P'(fθ)93.2682.3283.3387.0596.4889.2575.2491.9781.2570.56
1-P'(fθ)6.7417.6816.6712.953.5210.7524.768.0318.7529.44
Average F1 Score (%)92.9384.8682.8380.5685.7191.6981.1985.340.7835.81
+ +the percentage when the model answers correctly and the semantic dependency is correctly encoded. + +The final results for all QA cases and average F1 score are summarized in Table 4, which generally shows a significant proportion of model mistake cases across various models can be attributed to falsely encoded semantic dependencies. For instance, in BERT's case, the high percentage $P(f_{\theta})$ implies that when the model selects an incorrect answer, it is more likely due to the erroneous answer tokens causing a stronger semantic influence on the question tokens than the correct answer tokens. Conversely, the overall high $P'(f_{\theta})$ suggests when the model correctly encodes the semantic dependency in the final-layer token, it usually provides the correct answer. These findings highlight the importance of semantic dependency encoded in the final-layer token for model predictions. + +The variation in Percentage across different models highlights inherent differences in how each architecture manages semantic dependencies and mitigates the impact of misleading information. For models like DistilBERT and BERT, the higher $P(f_{\theta})$ suggests that their architecture may be more susceptible to false dependencies when mistakes occur. For models like RoBERTa and MobileBERT, the Lower $P(f_{\theta})$ means false dependency accounts for a small proportion in failed QA instances, which means there may be some other factors that lead to wrong outputs. Unlike the BERT series, GPT-2 and LLaMA show much lower $P(f_{\theta})$ and F1 scores. This discrepancy can be attributed to their generative nature where they tend to produce new words or synonyms rather than reproducing original ground-truth answers. Their logic of answer generation differs from that of the BERT-based QA models, potentially introducing inconsistencies in how semantic dependencies are encoded and impacting semantic dependency evaluation. + +# 5.2. Localize Parameters of Attention Head Group Responsible for Semantic Dependency + +As shown above, mistakes in QA tasks are closely tied to token-level semantic dependency. To better understand the network's role in model mistakes and evaluate whether false semantic dependencies can be adjusted to improve model performance, we focus on localizing the parameters that + +encode semantic dependencies. Our motivation stems from two key considerations: 1). If correct and incorrect dependencies are controlled by different parameters, we can directly modify the ones responsible for incorrect dependencies (e.g. pruning methods) to improve model performance. 2). Conversely, if they share the same parameters, we need other strategies to address the challenge of removing false dependencies without affecting the correct ones. + +As discussed above, the attention mechanism plays a key role in propagating semantic information between tokens, ultimately enabling the final layer token to encode various semantic dependencies. Building on these foundations, we focus primarily on analyzing the contribution of attention head parameters in this paper. Specifically, we propose a method to identify attention heads primarily responsible for encoding specific token dependencies. + +Inspired by previous study (Gandelsman et al., 2024), the contribution of $l$ -th MHA on $j$ -th token can be broken down into tokens and heads. + +$$ +\mathrm {M H A} _ {j} ^ {l} \left(\mathbf {Z} ^ {l - 1}\right) = \sum_ {h = 1} ^ {H} \sum_ {i = 1} ^ {N} x _ {i} ^ {l, h}, \quad x _ {i} ^ {l, h} = \alpha_ {i} ^ {l, h} W _ {V O} ^ {l, h} z _ {i} ^ {l - 1} \tag {11} +$$ + +Specifically, for any token dependency, i.e., token dependency from $i$ -th token to $j$ -th token, including correct or wrong token dependency in QA tasks mentioned above, we replace the $i$ -th the token with $K$ randomly sampled tokens. Then we measure each head's contribution to semantic dependency by calculating average change $\Delta_{\mathbf{z}_j^L|\mathbf{z}_i^0}^{l,h}$ between original head contribution and perturbed head contributions: + +$$ +\Delta_ {\mathbf {z} _ {j} ^ {L} \mid \mathbf {z} _ {i} ^ {0}} ^ {l, h} = \frac {1}{K} \sum_ {k = 1} ^ {K} \left\| x _ {i} ^ {l, h (k)} - x _ {i} ^ {l, h (\text {o r g})} \right\| _ {2} \tag {12} +$$ + +As shown in Figure 4(b), we test the semantic dependency contribution score $\Delta_{\mathbf{q}_j^L|\mathbf{a}_i^0}$ of each attention head in BERT for both wrong semantic dependency between "sign" and "?" and correct semantic dependency between "anthem" to "Mary" in corresponding QA instance in Figure 4(a). The heatmap reveals the group of attention heads (highlighted in brighter colors) that mutually contribute to a semantic dependency in this specific context. + +Experiments To evaluate how parameters in attention heads contribute to semantic dependencies across various cases, we conducted experiments on different fine-tuned models commonly used in QA tasks with high accuracy (F1 $>0.8$ ). Specifically, we analyzed the frequency of each top $5\%$ contributing attention head for correct and false semantic dependency across all failed QA cases (shown in Figure 5). Due to space constraints, we present the results from the four highest-performing models and include additional experiments in Appendix A.4. + +![](images/88b4b16f2081f7822b20e26fc593c04e25169b791c2683058158ed1bee38a608.jpg) + +![](images/e11b623510fa339cb09a4ff2c78571840ebd6a510f70c210a98eebb754b7f266.jpg) + +![](images/b9909144f6ad42f5635ff29beadc5a85e8770580c80e27eaf3d27751fb6e5e77.jpg) +(a) BERT + +![](images/9f8c96b0619e7a0d131e5fdf74e7145b48f2c7c2f6a68afed01d474351aae903.jpg) + +![](images/269f6002720a7e31fde6116cd2b9fa279a2efe9b24a718111c548e78611d6bab.jpg) + +![](images/1272bd7b3eab58ff633ef56d17337ee45a5bd5c2ffd7600e71e9ce6cba03e25f.jpg) + +![](images/13cd36c484628284d4b0a5cabede9ef875d822370d7a2ac277ac8d2673dc7350.jpg) +(c) DeBERTa + +![](images/8bbc7c789c6974bbdcb291682517e7b82b9a502e0052439efae0f000c0c56e0c.jpg) +(d) MiniLM +Figure 5: Frequency of each top $5\%$ contributing attention head for correct (green) and false (red) semantic dependency across all failed QA cases. + +Results Figure 5 reveals a shared group of top attention heads responsible for both correct and false semantic dependency in these models. This suggests that model mistakes in QA tasks stem from the parameters of these specific attention heads. However, it also suggests false semantic dependencies cannot be reduced by directly disabling them (e.g., via head pruning approaches (Voita et al., 2019; Michel et al., 2019)) because these heads also contribute + +to encoding correct semantic dependencies and indiscriminate removal of attention heads may inadvertently disrupt essential task-specific dependencies. Our finding highlights a critical technical challenge: how to disentangle and optimize attention mechanisms to suppress false dependencies while preserving correct ones. Future work may require more targeted re-weighting or regularization strategies to achieve this balance. + +# 6. Discussion and Future Work + +Our current method has certain limitations, which we believe present valuable opportunities for future work. Firstly, our analysis relies on perturbation-based approaches to assess token dependencies, which require that answer tokens appear in the context. This limits its applicability to scenarios where the model generates answers not directly found in the input. We aim to expand our ability to effectively analyze dependencies in such cases. + +Additionally, perturbation involves removing existing information and introducing new information, which can cause variability in output tokens. For instance, replacing a token with a semantically similar yet different token may lead to significant variation depending on the model's interpretation. We address this by randomly sampling new tokens to ensure diversity and reduce bias, though some variability remains. Future work will focus on refining this calibration. + +Our analysis primarily focuses on the semantic dependencies between final-layer tokens and first-layer tokens. This design choice is motivated by our goal of understanding errors in the model's output, where the final-layer token representations are expected to have the most direct influence, as supported by prior studies. While our current study centers on the final layer, our method is general and can be applied to intermediate layers as well. We will explore token dependencies across different layers in future work. + +# 7. Conclusion + +In this paper, we delved into the internal mechanisms of transformer models to explore how semantic dependencies are encoded in tokens, which can contribute to the mistakes produced by language models. Extensive experiments reveal that: 1) most tokens primarily retain their original semantic information across layers. 2) models can encode truthful semantic dependencies in final-layer tokens. and 3) model mistakes often stem from tokens encoding incorrect dependencies. However, shared attention head parameters help encode both correct and false dependencies, indicating the challenge of removing incorrect dependencies. We believe these insights can offer valuable implications for future transformer model design. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# Acknowledgements + +TL is partially supported by the following Australian Research Council projects: FT220100318, DP220102121, LP220100527, LP220200949, and IC190100031. BH was supported by RGC Young Collaborative Research Grant No. C2005-24Y and NSFC General Program No. 62376235. + +# References + +Abnar, S. and Zuidema, W. Quantifying attention flow in transformers. arXiv preprint arXiv:2005.00928, 2020. +Ali, A., Schnake, T., Eberle, O., Montavon, G., Müller, K.-R., and Wolf, L. Xai for transformers: Better explanations through conservative propagation. In International conference on machine learning, pp. 435-451. PMLR, 2022. +Amini, A., Pimentel, T., Meister, C., and Cotterell, R. Naturalistic causal probing for morpho-syntax. Transactions of the Association for Computational Linguistics, 11:384-403, 2023. +Bai, Y., Kadavath, S., Kundu, S., Askell, A., Kernion, J., Jones, A., Chen, A., Goldie, A., Mirhoseini, A., McKinnon, C., et al. Constitutional ai: Harmlessness from ai feedback. arXiv preprint arXiv:2212.08073, 2022. +Björkelund, A., Bohnet, B., Hafdell, L., and Nugues, P. A high-performance syntactic and semantic dependency parser. In *Coling 2010: Demonstrations*, pp. 33-36, 2010. +Brown, T. B. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020. +Carlini, N., Tramer, F., Wallace, E., Jagielski, M., Herbert-Voss, A., Lee, K., Roberts, A., Brown, T., Song, D., Erlingsson, U., et al. Extracting training data from large language models. In 30th USENIX Security Symposium (USENIX Security 21), pp. 2633-2650, 2021. +Chakraborty, A., Alam, M., Dey, V., Chattopadhyay, A., and Mukhopadhyay, D. Adversarial attacks and defences: A survey. CoRR, abs/1810.00069, 2018. +Chen, H., Zhang, M., Li, J., Zhang, M., Øvrelid, L., Hajic, J., and Fei, H. Semantic role labeling: A systematical survey. arXiv preprint arXiv:2502.08660, 2025. + +Cobbe, K., Kosaraju, V., Bavarian, M., Chen, M., Jun, H., Kaiser, L., Plappert, M., Tworek, J., Hilton, J., Nakano, R., Hesse, C., and Schulman, J. Training verifiers to solve math word problems. CoRR, abs/2110.14168, 2021. +Devlin, J., Chang, M., Lee, K., and Toutanova, K. BERT: pre-training of deep bidirectional transformers for language understanding. CoRR, abs/1810.04805, 2018. +Dozat, T. and Manning, C. D. Simpler but more accurate semantic dependency parsing. arXiv preprint arXiv:1807.01396, 2018. +Eberle, O., Böttner, J., Krautli, F., Müller, K.-R., Valleriani, M., and Montavon, G. Building and interpreting deep similarity models. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(3):1149-1161, 2020. +Elhoushi, M., Shrivastava, A., Liskovich, D., Hosmer, B., Wasti, B., Lai, L., Mahmoud, A., Acun, B., Agarwal, S., Roman, A., et al. Layer skip: Enabling early exit inference and self-speculative decoding. arXiv preprint arXiv:2404.16710, 2024. +Feng, J. and Steinhardt, J. How do language models bind entities in context? arXiv preprint arXiv:2310.17191, 2023. +Finlayson, M., Mueller, A., Gehrmann, S., Shieber, S., Linzen, T., and Belinkov, Y. Causal analysis of syntactic agreement mechanisms in neural language models. arXiv preprint arXiv:2106.06087, 2021. +Gandelsman, Y., Efros, A. A., and Steinhardt, J. Interpreting clip's image representation via text-based decomposition, 2024. URL https://arxiv.org/abs/2310.05916. +Ganguli, D., Lovitt, L., Kernion, J., Askell, A., Bai, Y., Kadavath, S., Mann, B., Perez, E., Schiefer, N., Ndousse, K., et al. Red teaming language models to reduce harms: Methods, scaling behaviors, and lessons learned. arXiv preprint arXiv:2209.07858, 2022. +Gehman, S., Gururangan, S., Sap, M., Choi, Y., and Smith, N. A. Realtoxicityprompts: Evaluating neural toxic degeneration in language models. In EMNLP (Findings), volume EMNLP 2020 of Findings of ACL, pp. 3356-3369. Association for Computational Linguistics, 2020. +Geva, M., Bastings, J., Filippova, K., and Globerson, A. Dissecting recall of factual associations in auto-regressive language models. arXiv preprint arXiv:2304.14767, 2023. +He, L., Lee, K., Lewis, M., and Zettlemoyer, L. Deep semantic role labeling: What works and what's next. In + +Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 473-483, 2017. +He, P., Liu, X., Gao, J., and Chen, W. Deberta: Decoding-enhanced bert with disentangled attention. arXiv preprint arXiv:2006.03654, 2020. +Hermann, K. M., Kocisky, T., Grefenstette, E., Espeholt, L., Kay, W., Suleyman, M., and Blunsom, P. Teaching machines to read and comprehend. In NIPS, pp. 1693-1701, 2015. +Hewitt, J. and Manning, C. D. A structural probe for finding syntax in word representations. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4129-4138, 2019. +Honnibal, M., Montani, I., Landeghem, S. V., and Boyd, A. spaCy: Industrial-strength Natural Language Processing in Python. https://spacy.io, 2020. Version 3.0. +Janizek, J. D., Sturmfels, P., and Lee, S.-I. Explaining explanations: Axiomatic feature interactions for deep networks. Journal of Machine Learning Research, 22 (104):1-54, 2021. +Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y. J., Madotto, A., and Fung, P. Survey of hallucination in natural language generation. ACM Computing Surveys, 55(12):1-38, 2023. +Jia, R. and Liang, P. Adversarial examples for evaluating reading comprehension systems. arXiv preprint arXiv:1707.07328, 2017. +Kang, D., Li, X., Stoica, I., Guestrin, C., Zaharia, M., and Hashimoto, T. Exploiting programmatic behavior of llms: Dual-use through standard security attacks. In 2024 IEEE Security and Privacy Workshops (SPW), pp. 132-143. IEEE, 2024. +Khashabi, D., Khot, T., Sabharwal, A., and Roth, D. Question answering as global reasoning over semantic abstractions. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018. +Lan, Z. Albert: A lite bert for self-supervised learning of language representations. arXiv preprint arXiv:1909.11942, 2019. +Li, X., Roth, D., and Small, K. The role of semantic information in learning question classifiers. In Proceedings of the International Joint Conference on Natural Language Processing, 2004. + +Lian, W., Goodson, B., Pentland, E., Cook, A., Vong, C., and "Teknium". Openorca: An open dataset of gpt augmented flan reasoning traces. https://https://huggingface.co/Open-Orca/OpenOrca, 2023. +Liang, P., Bommasani, R., Lee, T., Tsipras, D., Soylu, D., Yasunaga, M., Zhang, Y., Narayanan, D., Wu, Y., Kumar, A., et al. Holistic evaluation of language models. arXiv preprint arXiv:2211.09110, 2022. +Liao, K., Zhang, Y., Ren, X., Su, Q., Sun, X., and He, B. A global past-future early exit method for accelerating inference of pre-trained language models. In Proceedings of the 2021 conference of the north american chapter of the association for computational linguistics: Human language technologies, pp. 2013-2023, 2021. +Lin, S., Hilton, J., and Evans, O. Truthfulqa: Measuring how models mimic human falsehoods. arXiv preprint arXiv:2109.07958, 2021. +Liu, Y. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 364, 2019. +Mel'čuk, I. Language: Dependency. Elsevier, 2001. +Merit, S., Xiong, C., Bradbury, J., and Socher, R. Pointer sentinel mixture models, 2016. +Michel, P., Levy, O., and Neubig, G. Are sixteen heads really better than one? Advances in neural information processing systems, 32, 2019. +Navigli, R., Conia, S., and Ross, B. Biases in large language models: origins, inventory, and discussion. ACM Journal of Data and Information Quality, 15(2):1-21, 2023. +OpenAI. GPT-4 technical report. CoRR, abs/2303.08774, 2023. +Ousidhoum, N., Zhao, X., Fang, T., Song, Y., and Yeung, D.-Y. Probing toxic content in large pre-trained language models. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 4262-4274, 2021. +Pimentel, T., Valvoda, J., Maudslay, R. H., Zmigrod, R., Williams, A., and Cotterell, R. Information-theoretic probing for linguistic structure. arXiv preprint arXiv:2004.03061, 2020. +Qi, P., Zhang, Y., Zhang, Y., Bolton, J., and Manning, C. D. Stanza: A Python natural language processing toolkit for many human languages. In Proceedings of the 58th Annual Meeting of the Association + +for Computational Linguistics: System Demonstrations, 2020. URL https://nlp.stanford.edu/pubs/qi2020stanza.pdf. +Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., Sutskever, I., et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019. +Rajpurkar, P., Zhang, J., Lopyrev, K., and Liang, P. SQuAD: 100,000+ questions for machine comprehension of text. In Su, J., Duh, K., and Carreras, X. (eds.), Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 2383-2392, Austin, Texas, November 2016. Association for Computational Linguistics. doi: 10.18653/v1/D16-1264. URL https://aclanthology.org/D16-1264. +Rogers, A., Kovaleva, O., and Rumshisky, A. A primer in bertology: What we know about how bert works. Transactions of the Association for Computational Linguistics, 8:842-866, 2021. +Sanh, V. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108, 2019. +Scheurer, J., Balesni, M., and Hobbahn, M. Large language models can strategically deceive their users when put under pressure. In ICLR 2024 Workshop on Large Language Model (LLM) Agents, 2024. +Schnake, T., Eberle, O., Lederer, J., Nakajima, S., Schütt, K. T., Müller, K.-R., and Montavon, G. Higher-order explanations of graph neural networks via relevant walks. IEEE transactions on pattern analysis and machine intelligence, 44(11):7581-7596, 2021. +Schuster, T., Fisch, A., Gupta, J., Dehghani, M., Bahri, D., Tran, V., Tay, Y., and Metzler, D. Confident adaptive language modeling. Advances in Neural Information Processing Systems, 35:17456-17472, 2022. +Shen, D. and Lapata, M. Using semantic roles to improve question answering. In Proceedings of the 2007 joint conference on empirical methods in natural language processing and computational natural language learning (EMNLP-CoNLL), pp. 12-21, 2007. +Shi, F., Chen, X., Misra, K., Scales, N., Dohan, D., Chi, E. H., Schärli, N., and Zhou, D. Large language models can be easily distracted by irrelevant context. In International Conference on Machine Learning, pp. 31210-31227. PMLR, 2023. +Sun, Z., Yu, H., Song, X., Liu, R., Yang, Y., and Zhou, D. Mobilebert: a compact task-agnostic bert for resource-limited devices. arXiv preprint arXiv:2004.02984, 2020. + +Taori, R. and Hashimoto, T. Data feedback loops: Model-driven amplification of dataset biases. In International Conference on Machine Learning, pp. 33883-33920. PMLR, 2023. +Tenney, I. Bert rediscovers the classical nlp pipeline. arXiv preprint arXiv:1905.05950, 2019. +Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., Rodriguez, A., Joulin, A., Grave, E., and Lample, G. Llama: Open and efficient foundation language models. CoRR, abs/2302.13971, 2023. +Vasileiou, A. and Eberle, O. Explaining text similarity in transformer models. arXiv preprint arXiv:2405.06604, 2024. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. In NIPS, pp. 5998-6008, 2017. +Vig, J., Gehrmann, S., Belinkov, Y., Qian, S., Nevo, D., Singer, Y., and Shieber, S. Investigating gender bias in language models using causal mediation analysis. Advances in neural information processing systems, 33: 12388-12401, 2020. +Voita, E., Talbot, D., Moiseev, F., Sennrich, R., and Titov, I. Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned. arXiv preprint arXiv:1905.09418, 2019. +Wang, A., Singh, A., Michael, J., Hill, F., Levy, O., and Bowman, S. R. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In ICLR. OpenReview.net, 2019. +Wang, W., Wei, F., Dong, L., Bao, H., Yang, N., and Zhou, M. Minilm: Deep self-attention distillation for task-agnostic compression of pre-trained transformers. Advances in Neural Information Processing Systems, 33: 5776-5788, 2020. +Wattenberg, M. and Viégas, F. B. Relational composition in neural networks: A survey and call to action. arXiv preprint arXiv:2407.14662, 2024. +Wei, A., Haghtalab, N., and Steinhardt, J. Jailbroken: How does llm safety training fail? Advances in Neural Information Processing Systems, 36, 2024. +Weidinger, L., Mellor, J., Rauh, M., Griffin, C., Uesato, J., Huang, P.-S., Cheng, M., Glaese, M., Balle, B., Kasirzadeh, A., et al. Ethical and social risks of harm from language models. arXiv preprint arXiv:2112.04359, 2021. + +Wu, W., Wang, Y., Xiao, G., Peng, H., and Fu, Y. Retrieval head mechanistically explains long-context factuality. arXiv preprint arXiv:2404.15574, 2024. +Wu, Z., Chen, Y., Kao, B., and Liu, Q. Perturbed masking: Parameter-free probing for analyzing and interpreting bert. arXiv preprint arXiv:2004.14786, 2020. +Zhang, W. E., Sheng, Q. Z., Alhazmi, A., and Li, C. Adversarial attacks on deep-learning models in natural language processing: A survey. ACM Transactions on Intelligent Systems and Technology (TIST), 11(3):1-41, 2020. +Zhang, X., Zhao, J., and LeCun, Y. Character-level convolutional networks for text classification. Advances in neural information processing systems, 28, 2015. + +# A. Appendix + +# A.1. Detailed Related Works + +Semantic Dependency Parsing and Semantic Role Labeling. Semantic dependency parsing (SDP) (Björkelund et al., 2010; Dozat & Manning, 2018) aims to identify semantic relationships between words in a sentence, by constructing a directed graph, where nodes represent words and edges capture their semantic dependencies. Closely related to SDP, semantic role labeling (SRL) (He et al., 2017; Chen et al., 2025) focuses on identifying the predicate-argument structure of a sentence by assigning roles to words or phrases based on their semantic relationship to a verb or predicate. Notably, studies (Li et al., 2004; Shen & Lapata, 2007; Khashabi et al., 2018) have shown that incorporating semantic role information enhances question-answering systems. However, despite their advancements, the internal mechanisms by which transformer models encode, propagate, and utilize semantic dependencies remain largely opaque. Our work bridges this gap by exploring how internal mechanisms contribute to semantic dependency encoding and how these insights can be leveraged to address mistakes. + +Semantic Information Flow in Transformer. Existing work (Liao et al., 2021; Schuster et al., 2022; Elhoushi et al., 2024) have studied model activation stability in later layers of transformer models. Specifically, additional layers may contribute minimally to the refinement of token representations, which enables techniques like early exit to accelerate inference. However, whether the token in the last layer mostly contains its original semantic information in the input layer has not been studied. Previous study (Geva et al., 2023) analyzes how factual associations are recalled in auto-regressive language models, highlighting the roles of MLP sublayers in enriching subject representations and attention heads in extracting attributes. Our study addresses a gap by studying how semantic dependencies are encoded in tokens and influence QA tasks in both non-auto-regressive (BERT series) and auto-regressive models (GPT, LLaMA). + +Interpretable Model Mistake Based on Attention Heads. Existing works have studied specific roles of attention heads to explain model mistakes. Study (Wu et al., 2024) identifies specific attention heads, termed retrieval heads, which are critical for retrieving factual information from long contexts. The absence or malfunctioning of these retrieval heads may lead to model mistakes. Another study (Gandelsman et al., 2024) shows some attention heads in CLIP have property-specific roles (e.g., location or shape), which are important for model performance. Our work offers another perspective by interpreting model mistakes via token-level semantic dependency encoding, which provides insights into understanding and correcting model mistakes under specific question-answering cases. Additionally, our finding in mutual attention heads responsible for key dependencies in QA tasks also shows the importance of adjusting parameters in attention heads without tempering the correct semantic dependency encoding. + +Probing Study for Linguistic Properties in Transformer. Probing methods (Rogers et al., 2021) are widely used to analyze the internal representations of pre-trained language models to determine whether specific linguistic properties are encoded. A previous study demonstrated that BERT encodes syntactic tree structures in its vector space, allowing a probing classifier to reconstruct syntactic distances between words using linear transformations (Hewitt & Manning, 2019). Additionally, the study revealed that BERT encodes high-level linguistic features like entity types, semantic roles, and relations through probing tasks (Tenney, 2019). Moreover, existing research utilized information-theoretic probing methods to quantify the mutual information between model representations and linguistic properties, reducing over-interpretation risks (Pimentel et al., 2020). + +Token ablation is a widely used, parameter-free probing technique. For example, researchers have studied the influence of syntactic subtree structures on masked language model (MLM) predictions through ablations (Wu et al., 2020). Others analyze syntactic agreement in language models through causal interventions, identifying key neurons and attention heads (Finlayson et al., 2021). Gender bias has been investigated using causal mediation analysis (Vig et al., 2020). Naturally occurring perturbations, which refer to sentences differing in specific morpho-syntactic features, have been used to probe causal relationships (Amini et al., 2023). + +These works primarily investigate how models encode syntactic and high-level semantic features, such as entity relations or syntactic structures. In contrast, our study focuses specifically on token-level semantic dependency encoding, analyzing fine-grained interactions between individual tokens rather than task-specific feature aggregation or high-level semantic encoding. Moreover, we introduce an evaluation framework to measure semantic dependency strength between two tokens without relying on prior knowledge. Our approach also identifies false semantic dependencies that arise when the model + +produces incorrect answers. Unlike static syntactic or semantic structures, our framework captures the dynamic and context-sensitive semantic dependencies, which can vary irregularly across diverse scenarios. + +Feature Attribution and Binding Study. Feature attribution methods primarily aim to assess the importance of individual tokens or features to the model's output. For example, prior work on attention flow (Abnar & Zuidema, 2020) quantifies token importance through accumulated attention matrices. Gradient-based techniques like Conservative Propagation (Ali et al., 2022) is used to assess token attribution. Our study shifts focus from token importance to the semantic dependencies encoded in token representations and how these affect model behavior. + +Existing semantic dependency methods based on feature-token interactions (Eberle et al., 2020; Janizek et al., 2021; Schnake et al., 2021) mainly focus on studying the contribution of combinations of features or tokens to model predictions. Meanwhile, feature binding methods (Feng & Steinhardt, 2023; Vasileiou & Eberle, 2024; Wattenberg & Viégas, 2024) often do not test whether the model's most confident output reflects encoded semantic dependencies; rather, many assume this relationship holds and study downstream properties. In contrast, our method is designed to explicitly test the assumption by evaluating whether there is a dependence between the model's output and the semantic dependency encoded in the final-layer token. + +# A.2. Extra Finding: The Semantic Dependency Encoded in a Token Is Influenced by Both Irrelevant Context Changes and Order of Contexts + +In this section, we study whether the rank of semantic dependency strength encoded in a token changes when adding irrelevant context or simply changing the order of the context sequence. We also found some interesting phenomena after experiments: 1). Semantically related tokens remain relatively stable when altering irrelevant context or the order of the context. 2). Left context change usually causes greater influence than right context change. + +Robustness studies have demonstrated that the inclusion of irrelevant context (Shi et al., 2023) or adversarial sentences (Jia & Liang, 2017) in prompts can lead to a significant decline in model accuracy. They usually work by analyzing model performance on various types of adversarial examples and attribute the decline to broader issues, such as the model's tendency to rely on surface-level features like word overlap and positional cues. To further explore the underlying reason for such performance decline from a token-level perspective, we test whether altering the irrelevant context or rearranging the order of independent sentences affects the rank of semantic dependency strength. + +For example, we have two semantically independent token sequences "white rhinos are gray" and "apples are red" in Figure 6, where "apples are red" (highlighted with green background) serves as irrelevant context to "white rhinos are gray". On the top half part of the figure, when we add the irrelevant context "apples are red", the rank of semantic dependency strength between the token "rhinos" and tokens in its sequence "white rhinos are gray." varied. On the bottom part of the figure, the same thing happens when we maintain the overall input semantic information unchanged and only change the order of the two token sequences. This demonstrates that even when two token sequences are semantically independent, irrelevant changes in context and the ordering of sequences can significantly alter how semantic information is aggregated within each token. + +Semantic Dependency Analysis with Irrelevant Context Change To validate whether irrelevant context influences the semantic dependencies of tokens in a sequence, we selected two semantically independent sentences randomly sampled from a dataset. Consider two sentences: + +"The sky is blue." vs "The apple is red. The sky is blue.", i.e., $s_1$ vs $(s_2, s_1)$ + +"The sky is blue." vs "The sky is blue. The apple is red.", i.e., $s_1$ vs $(s_1, s_2)$ + +We investigated whether the semantic dependencies within "The sky is blue." remain unchanged when appended with "The apple is red." on its left side or right side. Since both contexts are independent, with no semantic dependencies between them, the semantic dependencies within "The sky is blue." should remain unchanged regardless of their surrounding context in the input sequence. + +Specifically, given two input token sequences are $\mathbf{z}^{0(s_1)} = \{\mathbf{z}_i^0\}_{i=1}^{N_1}$ and $\mathbf{z}^{0(s_2)} = \{\mathbf{z}_j^0\}_{j=1}^{N_2}$ , respectively. Here, we validate the semantic dependencies within $\mathbf{z}^{0(s_1)}$ . We created two additional token sequences: $\mathbf{z}^{0(\text{Left})} = [\mathbf{z}^{0(s_2)}, \mathbf{z}^{0(s_1)}]$ + +![](images/34754b6f5fd29a9c85a914a56780bc5c54f8839d49e1074908b2244261abea64.jpg) +Figure 6: Semantic information propagation is influenced by irrelevant context change and sequence order change. + +and $\mathbf{z}^{0(\mathrm{Right})} = [\mathbf{z}^{0(s_1)},\mathbf{z}^{0(s_2)}]$ , where $\mathbf{z}^{0(\mathrm{Left})}$ is obtained by concatenating $\mathbf{z}^{0(s_2)}$ to the left and $\mathbf{z}^{0(\mathrm{Right})}$ is obtained by concatenating $\mathbf{z}^{0(s_2)}$ to the right. For token $\mathbf{z}_i^0$ from $\mathbf{z}^{0(s_1)}$ , we obtain the corresponding estimated semantic dependency token group $\hat{G}_{\mathbf{z}_i^0}^{s_1}$ via Eq. (7). By using the same approach, estimated semantic dependency token groups $\hat{G}_{\mathbf{z}_i^0}^{\mathrm{Left}}$ and $\hat{G}_{\mathbf{z}_i^0}^{\mathrm{Right}}$ for $\mathbf{z}^{0(\mathrm{Left})}$ and $\mathbf{z}^{0(\mathrm{Right})}$ can also be obtained. Then the Dependency Alteration Score (DAS) of $\hat{G}_{\mathbf{z}_i^0}^{\mathrm{Left}}$ and $\hat{G}_{\mathbf{z}_i^0}^{s_1}$ can be calculated as follows: + +$$ +\operatorname {D A S} \left(\hat {G} _ {\mathbf {z} _ {i} ^ {0}} ^ {\text {L e f t}}, \hat {G} _ {\mathbf {z} _ {i} ^ {0}} ^ {s _ {1}}\right) = 1 - \frac {\operatorname {L C S} \left(\hat {G} _ {\mathbf {z} _ {i} ^ {0}} ^ {\text {L e f t}} , \hat {G} _ {\mathbf {z} _ {i} ^ {0}} ^ {s _ {1}}\right)}{L}, \tag {13} +$$ + +where $\mathrm{LCS}(\cdot)$ is the length of the longest common subsequence. In our case, it represents the longest sequence of tokens that appear in the same order in both contexts, despite irrelevant context or order changes. The score $\mathrm{DAS}(\hat{G}_{\mathbf{z}_i^0}^{\mathrm{Left}},\hat{G}_{\mathbf{z}_i^0}^{s_1})$ measures how the semantic dependency changes when appending irrelevant context $\mathbf{z}^{0(s_2)}$ to the left of the original sequence $\mathbf{z}^{0(s_1)}$ . Similar $\mathrm{DAS}(\hat{G}_{\mathbf{z}_i^0}^{\mathrm{Right}},\hat{G}_{\mathbf{z}_i^0}^{s_1})$ can be obtained, which measures the changes of semantic dependency when appending irrelevant context $\mathbf{z}^{0(s_2)}$ to the right. + +Semantic Dependency Analysis with Irrelevant Context Order Change For irrelevant context order change, we observe whether the token dependency in sentence "The sky is blue." alters when inputting the sentence with irrelevant context order change, e.g., "The sky is blue. The apple is red." and input "The apple is red. The sky is blue." We simply use $\mathrm{DAS}(\hat{G}_{\mathbf{z}_i^0}^{\mathrm{Left}},\hat{G}_{\mathbf{z}_i^0}^{\mathrm{Right}})$ to measure how the semantic dependency changes when appending the irrelevant context $\mathbf{z}^{0(s_2)}$ to the left and the right of the original sequence $\mathbf{z}^{0(s_1)}$ . + +Experiments We conducted the semantic dependency analysis across over 5,000 cases to examine the impact of irrelevant context added to both the left and right sides, as well as the effect of sequence order changes, in order to determine whether the semantic dependency encoding is context-dependent and order-dependent. Specifically, we measured the dependency changes when perturbing the token $\mathbf{z}_i^{0(s_1)}$ in the original sequence $\mathbf{z}^{0(s_1)}$ . This involves evaluating the dependency alterations of its semantically dependent token groups by aligning the top 5 semantically dependent token groups ( $L = 5$ ) and by aligning all tokens from the original sequence $\mathbf{z}^{0(s_1)}$ ( $L = N_1$ ). The average dependency alteration scores are presented in Figure 7. + +Results Figure 7(a) and Figure 7(b) illustrate the changes in semantic dependency when irrelevant context is appended on the left or right side. It shows that the rank of semantic dependency strength of common token is significantly affected by the context, while relationships of semantically more related tokens (Top 5) remain relatively stable. + +Figure 7(c) further compares the changes in dependency when the irrelevant context is added to the left versus the right side of the original sentence. The results reveal that adding context to the left side generally results in a greater alteration of + +![](images/80231547f69cd59a952e451adcb28f32d5cd36668cb82199aa5c41eda5c641f8.jpg) + +![](images/d3c9f100d8e56436eee76ea22e2147ef6ac2658016575ccbc2a53a173c8df800.jpg) + +![](images/25b0f7795adb4e82df55aeaee2204bd796cd97c89a736101276451b4e8fe608d.jpg) +(a) Left context change +(c) Left & right context +Figure 7: Semantic Dependency Alteration Score when irrelevant context or context order changes. + +![](images/d4e97a74f503437d67588b935596c964e7190975620378e47e3b00d36b9fc4b4.jpg) +(b) Right context change +(d) Order change + +semantic dependencies compared to the right side. This suggests that the order of irrelevant context can differentially impact the model's semantic dependency structures. + +Figure 7(d) demonstrates the impact of altering the sequence order on semantic dependencies. The results also show that irrelevant token groups are easily influenced by unrelated contexts, while semantically more dependent tokens exhibit greater resilience to such alterations. + +Overall, our findings indicate that both the introduction of irrelevant context and the modification of sequence order dramatically influence semantic dependency within sentences. These results reinforce the importance of context placement and order in shaping the semantic dependency structures learned by Transformer-based language models. + +Insight for Future Model Design Our insight can further help training or finetuning a robust language model. Intuitively, semantic dependencies between tokens should remain robust regardless of changes in irrelevant contexts or the order of independent sentences. A natural thought for future work could be regulating transformer models to maintain consistent semantic dependencies despite irrelevant context variations. This may involve implementing regularization techniques that enforce stable token representations regardless of irrelevant context or sequence alterations. + +# A.3. More Experiments + +Percentage of a Token Primarily Retains Its Original Semantic Information across Different Datasets in Section 3. We measure the total percentage with various sentences from six datasets, including gsm8k (Cobbe et al., 2021), Yelp (Zhang et al., 2015), GLUE (Wang et al., 2019), CNN/DailyMail (Hermann et al., 2015), OpenOrca (Lian et al., 2023) and WikiText (Merit et al., 2016). For each model, over 600,000 token cases were evaluated (each token perturbation is treated as one case). We also observed that a proportion of tokens in GPT propagate semantic information mostly to its next token. Thus, We also include the percentage of the token propagating semantic information to both its next token and itself for GPT on the right. The detailed result is displayed in Table 5. + +To further discuss this phenomenon, we believe that one key factor is the presence of residual shortcuts, which may encourage final-layer token representations to retain information from the original input. For example, in a simple one-layer model with a direct shortcut from input to output, the final-layer token is likely to closely mirror its corresponding input token. However, residual connections alone do not fully explain the observed effect. To support this, we include the percentages for GPT-2, GPT-2-Large, and GPT-2-XL across different datasets in Table 6. Although these models share the same residual architecture, larger models (e.g., GPT-2-XL) exhibit significantly stronger semantic retention (similar percentages to BERT, e.g., around $98\%$ ) at the final-layer token level than smaller models (e.g., GPT-2). It suggests that semantic retention is also influenced by other factors such as model size and complexity. + +Table 5: Percentage of a token primarily retains its original semantic information. + +
gsm8kYelpGLUEDailyMailOpenOrcaWikiText
BERT99.2298.5898.4898.8198.9098.84
RoBERTa89.5493.4689.9895.0293.3496.99
TinyRoBERTa92.2995.1694.4395.1194.3894.39
ALBERT96.8497.3697.6796.6797.6595.85
DistilBERT93.8495.2795.8495.7095.5494.49
DeBERTa99.6999.5799.5499.6799.4699.78
MobileBERT94.3496.3893.1697.7398.2299.08
MiniLM87.2192.1693.2587.5486.3885.58
GPT-275.19/88.4277.46/89.9477.49/92.5173.11/85.8869.32/81.6872.31/84.46
LLaMA396.2196.6894.2095.8595.7894.80
+ +Table 6: Percentage of a token primarily retains its original semantic information in GPT series. + +
gsm8kYelpGLUEDailyMailOpenOrcaWikiTextAvg. Percentage
GPT-2 (124M)75.1977.4677.4973.1169.3272.3175.15
GPT-2-Large (774M)98.4998.4798.1698.1798.3498.0898.29
GPT-2-XL (1.5B)98.6498.3297.8597.8397.9097.8098.05
+ +Percentage of a Token Propagates Semantic Information to Other Tokens in Section 3. We also observe the change of the specific input word causes influence on other tokens in the final layer in experiment of Section 3. The result in all cases (each token perturbation is treated as one case, over 600,000 cases are evaluated for each model) is shown in Table 7. Even if minor, in models like BERT, DeBERTa, and MobileBERT, the change is almost $100\%$ , which means each token receives pieces of semantic information from almost every token in the input sequence. While in auto-regressive models like LLaMA or GPT, the token only influences the tokens on this token's right side. We observe the changes of tokens on each tokens' left side is 0. We can also observe the change exists in all tokens on each token's right side, which suggests each token receives pieces of semantic information from almost all tokens on its left side. + +Why replacing a token with random tokens to explore semantic dependency For both finding 2 and finding 3, we need to examine how semantic dependency is encoded in the final layer by replacing an input token $\mathbf{z}_i^0$ and observing which final-layer token (e.g., at position $j$ ) changes. If $\mathbf{z}_i^0$ and $\mathbf{z}_j^L$ exhibit strong dependency, which means the semantic information of $\mathbf{z}_i^0$ is encoded in the final-layer representation at position $j$ , then replacing $\mathbf{z}_i^0$ with another token $\tilde{\mathbf{z}}_i^0$ should cause $\mathbf{z}_j^L$ to change substantially. This indicates a semantic dependency between the two tokens. However, if we replace $\mathbf{z}_i^0$ with a synonym (e.g., $\mathbf{z}_i'^0$ ), the overall semantic meaning of the sentence may remain largely unchanged, and the model may treat $\mathbf{z}_i^0$ and $\mathbf{z}_i'^0$ similarly. In this case, we may observe a minimal change at $\mathbf{z}_j^L$ , making it difficult to conclude whether $\mathbf{z}_j^L$ was originally dependent on $\mathbf{z}_i^0$ , even if a true dependency existed. Therefore, we use random tokens to encourage semantic independence. It is also important to note that random token selection may introduce out-of-domain predictions. We believe measuring sensitivity or semantic relevance through gradients could provide valuable insights and exciting directions for future work. + +Why Using Neural Dependency Parsing Tool in Section 4 Noted that our analysis relies on semantic dependency data derived with SpaCy, a pretrained neural network-based dependency parser. SpaCy generates syntactic dependency trees using robust neural architectures trained on large annotated corpora, offering a reliable approximation of semantic dependencies. To our knowledge, no token-level semantic dependency dataset with comprehensive human annotations exists. Constructing such a dataset would be prohibitively expensive and prone to omissions due to the complexity of identifying all dependent token relationships manually. Thus, we use neural dependency parsing tool to generate a specialized semantic dependency dataset for our experiment. + +We additionally conducted experiments using another widely adopted dependency parser, Stanza (Stanford NLP) (Qi et al., 2020), to validate the robustness of our findings. As shown in Table 8, the results obtained with Stanza are consistent with those derived from SpaCy, further supporting the conclusion that transformer models encode truthful semantic dependencies + +Table 7: Percentage of a token propagates semantic information to other tokens. + +
gsm8kYelpGLUEDailyMailOpenOrcaWikiText
BERT99.4499.0999.1699.2099.3499.52
RoBERTa92.9495.0090.7695.9895.2398.24
TinyRoBERTa96.4696.4297.0496.4295.9896.07
ALBERT97.8897.9998.3597.3498.2396.63
DistilBERT95.4495.8996.3796.2996.4295.93
DeBERTa99.8699.6399.6699.7799.6899.82
MobileBERT99.4399.2298.9699.3899.5099.74
MiniLM94.0395.5194.7191.7492.1992.35
GPT-2100.00100.00100.00100.00100.00100.00
LLaMA3100.00100.00100.00100.00100.00100.00
+ +Table 8: Alignment scores indicating how well tokens encode truthful semantic dependencies using Stanza and Spacy (%) + +
BERTRoBERTatinyRoBERTaALBERTDistilBERTDeBERTaMobileBERTMiniLMGPT-2LLaMA3
SpaCy87.8687.7182.4488.7788.8887.1785.884.6293.4192.47
Stanza84.3386.981.1485.5387.1983.6980.9883.6791.4290.32
+ +in their final layers. + +Note that although model-estimated semantic dependencies can be easily obtained, the main challenge is that existing semantic dependency parser methods usually cannot measure dependencies at the subword level. This makes direct comparison difficult. To address this issue, we may need to manually annotate the semantic dependencies and compare them with those estimated by the models, which is costly and hard to scale. + +Why Using Longest Common Subsequence in Section A.2 Consider a simple example to understand how LCS captures changes in token order: Suppose we have two sequences, $A = [1, 2, 3, 4]$ and $B = [2, 3, 4, 1]$ . In moving from sequence $A$ to sequence $B$ , the order of the tokens changes such that the token "1" moves from the beginning to the end. Here, the LCS between $A$ and $B$ is the subsequence $[2, 3, 4]$ , which has a length of 3. This subsequence represents the largest set of tokens that have retained their original order between the two sequences. Since the total number of tokens, $N$ , is 4, the LCS length of 3 indicates that one token ("1") changed its position relative to the others. By calculating $\mathrm{DAS} = 0.25$ , we find that a quarter of the token order has been altered due to the change in context. Thus, a lower LCS value (relative to $N$ ) results in a higher DAS, reflecting a more significant change in token dependency patterns. This metric effectively highlights how sensitive the token dependencies are to contextual modifications, demonstrating the dynamic nature of semantic processing in natural language systems. + +Why Choosing QA as the Primary Task for Our Experiments We chose the question-answering (QA) task because it is particularly well-suited for evaluating the impact of semantic dependency mistakes at the token level. QA tasks inherently involve understanding and associating tokens in a question with those in the context, making them ideal for testing the model's ability to handle complex dependencies. This directly aligns with the focus of our study, which explores how false encoded semantic dependencies lead to model mistakes. Additionally, to validate our findings, it is crucial to have ground truth datasets that clearly present correct and incorrect dependencies. QA tasks provide datasets like SQuAD, where the answers are explicitly tied to certain context tokens. These datasets enable us to systematically evaluate how dependency mistakes between question and context tokens contribute to prediction mistakes. + +Why Threshold of F1 $< 0.6$ is Chosen and Additional Evaluation Using More Advanced ChatGPT Model. The threshold of F1 $< 0.6$ for identifying incorrect answers was determined empirically. Since our goal is to assess whether incorrect answers are associated with incorrect semantic dependencies, an F1 score below 0.6 indicates that over $40\%$ of the tokens predicted by the model differ from those in the original answer, which strongly suggests the answer is likely incorrect. + +To further strengthen this analysis, and following existing work, we conducted additional experiments using ChatGPT-4o + +Table 9: Additional experiments ChatGPT-4o model to find incorrect cases. + +
BERTRoBERTatinyRoBERTaALBERTDistilBERTDeBERTaMobileBERTMiniLMGPT-2LLaMA3
P(fθ) (F1<0.6)79.0769.2077.9471.8681.8075.3266.6177.5648.0464.56
F1 Score92.9384.8682.8380.5685.7191.6981.1985.340.7835.81
P(fθ) (GPT-4o select)79.0068.4273.3166.1181.7977.8468.6977.5659.6062.35
Accuracy88.4578.0078.0074.6376.6390.4474.5078.900.1014.68
+ +Table 10: The F1 score of GPT and LLama models using one-shot setting and zero-shot setting. + +
F1 (0-shot)F1 (1-shot)
GPT-2 (124M)0.785.5
GPT-2-Large (774M)7.321.09
LLaMA3-8B-instruct (8B)35.8176.27
+ +models to compare the model's answer with the ground truth and find incorrect cases. The results displayed in Table 9 are similar to using $\mathrm{F}1 < 0.6$ . + +Why Choose 0-shot F1 Evaluation on LLaMA and GPT Models To ensure a fair comparison, we evaluated LLaMA and GPT models using the same zero-shot (0-shot) setting as BERT. This is the reason that they present a low accuracy. Table 10 shows the F1 score using a one-shot setting, which aligns with official benchmark evaluations. + +# A.4. Localize Parameters of Attention Head Group Responsible for Semantic Dependency in Section 5.2 + +To better understand the network's role in model mistakes and evaluate whether false semantic dependencies can be adjusted to improve model performance, we focus on localizing the parameters that encode semantic dependencies. We have developed a method to identify the attention heads primarily responsible for specific token dependencies. Here, we present the intuition and detailed equations. + +Intuitively, when the input token carrying specific semantic information changes, the attention heads relevant to corresponding semantic information propagation will exhibit significant changes in their outputs, while the outputs of irrelevant heads will remain relatively unchanged. Therefore, by identifying heads with the highest variation in their contribution to a given token dependency, we can pinpoint the group of attention heads that are mutually responsible for any token dependency including wrong or correct token dependency in the QA task. + +As mentioned in Eq. (2), transformer encoder or transformer decoder is a residual network built from $L$ layers, each of which contains a multi-head self-attention (MHA) followed by feed forward network (FFN) block. + +In the $l$ -th MHA layer, the input stream $z^{l-1}$ is processed separately by $H$ attention heads. Specifically, the input sequence $Z^{l-1}$ is separately projected into $Q$ , $K$ , $V$ matrix in $h$ -th attention head of $l$ -th layer as follows: + +$$ +\mathbf {Q} ^ {l, h} = \mathbf {Z} ^ {l - 1} \mathbf {W} _ {Q} ^ {l, h}, \quad \mathbf {K} ^ {l, h} = \mathbf {Z} ^ {l - 1} \mathbf {W} _ {K} ^ {l, h}, \quad \mathbf {V} ^ {l, h} = \mathbf {Z} ^ {l - 1} \mathbf {W} _ {V} ^ {l, h} \tag {14} +$$ + +Then attention weight matrix $\mathbf{A}^{l,h}\in \mathbb{R}^{N\times N}$ is calculated as follows: + +$$ +\mathbf {A} ^ {l, h} = \operatorname {s o f t m a x} \left(\frac {\mathbf {Q K} ^ {T}}{\sqrt {d _ {k}}}\right) \tag {15} +$$ + +The output of each attention head is + +$$ +\mathbf {O} ^ {l, h} = \mathbf {A} ^ {l, h} \mathbf {V} ^ {l, h} \tag {16} +$$ + +For multi-head attention, the outputs of each head are concatenated and projected to $Z^{l} \in \mathbb{R}^{N \times D}$ , where $W_{O}$ is the output weight matrix. + +$$ +\mathbf {M H A} ^ {l} \left(\mathbf {z} ^ {l - 1}\right) = \operatorname {C o n c a t} \left(\mathbf {O} ^ {l, 1}, \mathbf {O} ^ {l, 2}, \dots , \mathbf {O} ^ {l, H}\right) \mathbf {W} _ {O} \tag {17} +$$ + +The class token and the other tokens share the same computation process. Inspired by previous study (Gandelsman et al., 2024), the contribution of $l$ -th MHA on $j$ -th token can be broken down into tokens and heads. We can observe that given a token, each context token contributes to this token by adding operation for semantic information aggregation, which generates context-related token representation. + +$$ +\mathrm {M H A} _ {j} ^ {l} \left(\mathbf {Z} ^ {l - 1}\right) = \sum_ {h = 1} ^ {H} \sum_ {i = 1} ^ {N} x _ {i} ^ {l, h}, \quad x _ {i} ^ {l, h} = \alpha_ {i} ^ {l, h} W _ {V O} ^ {l, h} z _ {i} ^ {l - 1} \tag {18} +$$ + +Specifically, for any token dependency, i.e., token dependency from $i$ -th token to $j$ -th token, including correct or wrong token dependency in the QA task mentioned above, we replace the $i$ -th token with $K$ randomly sampled tokens. Then we measure each head's contribution to semantic dependency by calculating average change $\Delta_{\mathbf{z}_j^L|\mathbf{z}_i^0}^{l,h}$ between original head contribution and perturbed head contributions as follows: + +$$ +\Delta_ {\mathbf {z} _ {j} ^ {L} \mid \mathbf {z} _ {i} ^ {0}} ^ {l, h} = \frac {1}{K} \sum_ {k = 1} ^ {K} \left\| x _ {i} ^ {l, h (k)} - x _ {i} ^ {l, h (\text {o r g})} \right\| _ {2} \tag {19} +$$ + +As is shown in Figure 4(b), we test the dependency contribution score $\Delta_{\mathbf{q}_j^L|\mathbf{a}_i^0}^{l,h}$ of each attention head in BERT for both wrong semantic dependency between "sign" and "?" and correct semantic dependency between "anthem" to "marry" in corresponding QA instance. In this case we can observe there are a group of attention heads (highlighted with bright color in the contribution heatmap) mutually contribute to the semantic dependency. We can also find the head group responsible for false dependency is clearly brighter than correct dependency, showing a different pattern. + +Extra Experiments and Results Firstly, we calculated the average number of top $5\%$ contributing attention heads per layer for both correct and false semantic dependency across all BERT's failed QA cases (shown in Figure 8). The results reveal the heads responsible for false semantic dependency are primarily distributed in later layers, whereas those contributing to correct semantic dependency are distributed across both earlier and later layers. + +Secondly, We have analyzed the frequency of each top $5\%$ contributing attention head for correct and false semantic dependency across all failed QA cases (a part of the result is shown in the main text in Figure 5). Here, we include all fine-tuned BERT models commonly used in QA tasks with high accuracy $(\mathrm{F}1 > 0.8)$ in Figure 9. + +Additionally, We also calculated the average number of top $5\%$ contributing attention heads per Layer for semantic dependency across successful QA cases in BERT series (the same number of failed QA cases randomly sampled from the SQuAD dataset) in Figure 10. The results show that when the model performs correctly, the heads responsible for the correct semantic dependency are mostly distributed in later layers compared to correct semantic dependency when the model fails a QA task. Based on Figure 8 and Figure 10, we surmise that The model tends to rely more on the attention heads in the later layers when answering questions, regardless of whether the answer is correct or incorrect. + +Furthermore, we also count the frequency of each top $5\%$ contributing attention head across successful QA cases (the same number of failed QA cases randomly sampled from the SQuAD dataset) in Figure 11. We also found a similar group of top attention heads responsible for correct semantic dependency when models fail or succeed in QA tasks, which means they are QA task-specific heads. The high overlap of the task-specific attention heads also shows that the same parameters contribute to encoding correct semantic dependency regardless of whether models succeed or fail in QA cases. Based on Figure 9 and Figure 11, we can conclude that such model mistakes in QA tasks can not be corrected by directly adjusting parameters such as simply pruning attention heads because correct and incorrect dependencies are controlled by the same group of parameters. We need other strategies to address the challenge of removing false dependencies without affecting the correct ones. + +Discussion As highlighted in the main text, the attention mechanism plays a key role in propagating semantic information between tokens, ultimately enabling final layer tokens to encode semantic dependencies. In this paper, we focus primarily on analyzing the contribution of attention head parameters. Additionally, we notice that MLP layers may amplify irrelevant or erroneous semantics (Geva et al., 2023). In future work, we aim to extend our analysis to quantify the contribution of MLP layers to semantic dependency. + +![](images/341c40af638de4d5e853b753ae914fadb9230e45a7b603803893bf1b2135aa18.jpg) + +![](images/da998181fec7565dd0691b8ecc9ce894cbee17a8713c37db7913734e1afc978c.jpg) + +![](images/c843fe47d769a3fd7a07f9bc8c0eb2da02caf9ca0fe7e149e3fad7530e311a6a.jpg) + +![](images/0f57c5809610fbc8df63a926121f5dcafd3ccb2c5c85ee3e73e64bc55867124f.jpg) + +![](images/fe90a02dae3b86df4e5c3987f80567d4492409747ae031c8863241def21a295d.jpg) +(a) BERT +(e) DistilBERT + +![](images/90b6030ac6e821a9fae468c8f650f3487a76bf15ff898811d56d27604a78fc61.jpg) +(b) RoBERTa +(f) DeBERTa + +![](images/669bde0fa7bca49724f91412d69a3e97e2ceab50a3aa0ac293712ff264badab3.jpg) +(c) TinyRoBERTa +(g) MobileBERT + +![](images/c2e55ad879719f0d036a55bfd4f2725b76ad868a8a5678717888c1e853c1b020.jpg) +(d) ALBERT +(h) MiniLM + +![](images/9e67dadaa5949ddf8a153d1b0f9a817d8454a297694268de963f07a6e78ef518.jpg) +Figure 8: Distribution of top $5\%$ contributing attention heads for correct (green) and false (red) semantic dependency across all failed QA cases. + +![](images/09126f98b6ce451c514c2e43875673a55e1fb6f57df96ac8cac777b2b9719635.jpg) + +![](images/f9e15bf33f7c1aefe48e890dcd581ee682194c2d299cb76a68ee006dee02e379.jpg) + +![](images/5e9817e23f38924cd8a07ba1aad8751b29ad08a02301180da3de7a225372707b.jpg) + +![](images/f57d23738ec2b1d737708e1b41e4b2b1cab952af80788b800f00d8ceefd3e5ed.jpg) + +![](images/4c8def2e1e924cfaae3fc1ed27efe454f77e53cad87a472757eee1c4166facd9.jpg) + +![](images/37f602a9574ef47a4e129da9a93c6d99c879cac564e17b8e859ab3011b4e1795.jpg) + +![](images/6da20193f94576deb6fd7af563a4b233205e2c3e81288d708d51f545664469ee.jpg) + +![](images/bbdfcb16c1ea71ba07935731f36a16624e88c65d02415ab012137363ae6d57db.jpg) +(a) BERT + +![](images/58dcde68d5bfe0cdb7b9b5c4337a226229244f976dcd9b791cb3b068438c14ae.jpg) +(e) DistilBERT +Figure 9: Frequency of each top $5\%$ contributing attention head for correct (green) and false (red) semantic dependency across all failed QA cases. + +![](images/8ae0494444f25b6ca7547282a5673ac1d0f15f3eab295a8e1fabbf4eec89e28d.jpg) +(b) RoBERTa + +![](images/8a3acb62546013111933b7a232e161cd226e214c9a2490976686f51330a79a94.jpg) +(f) DeBERTa + +![](images/f292e3c8c6224226ff631fce62c1742c2f05904ac9b5a428a92b993fe0e54436.jpg) +(c) TinyRoBERTa + +![](images/3d6072edc22363b45a3bc709d42a70f460a593447b00fbded1c8a477aec8c447.jpg) +(g) MobileBERT + +![](images/6097a8234d54eeef650133bee0a20207f5ad1442ec94113fabc12db22aee0516.jpg) +(d) ALBERT + +![](images/f886d222bf371aba76b7b195c8a75138ba44afead775e28dd42b9e43ffad5a48.jpg) +(h) MiniLM + +![](images/f6d886d0d190489219fe473ff341c3e8976b38237ad28b8e94903c2b7344b847.jpg) + +![](images/d45cc2367f9fda060101f5256a0182f4188351767e023ed5141ae800f52d6e7d.jpg) + +![](images/1dc17aac5ac9c449d01195e36e96cb0a590ab8789ad073b3e3dab44c436ea5fd.jpg) + +![](images/28a500e35b6e00cc6d56e9a7ce1cf1266a4897ee69dec4b7e0fa3a9f1bcb63b2.jpg) + +![](images/1bc6f07dbcb3ede26bd197735c886c149b70719471a4ad0499bf895934318b2c.jpg) +(a) BERT +(e) DistilBERT + +![](images/405ef5257fbb649a7a4608f9fa37b302f0ccab3489122e4df06f3234e09c502b.jpg) +(b) RoBERTa +(f) DeBERTa + +![](images/14faabf7c769f9707e6cecb182871416a25859c72a65e4e7eb5eebab13e855d2.jpg) +(c) TinyRoBERTa +(g) MobileBERT + +![](images/8f8bc1550e00e853683b966c4375d29bd89e740e79181bd9949c9b479b0482eb.jpg) +(d) ALBERT +(h) MiniLM + +![](images/217bf9765fce3212ffda719c108b82cfdfb018255c4c2c21b788b17ada37c7bc.jpg) +Figure 10: Distribution of top $5\%$ contributing attention heads for correct semantic dependency in failed QA cases (green) compared to successful QA cases (blue). + +![](images/f9c03fdcb0fe4ed1e388f2fe5bd5243395b0a17c7893a5e6cc46435b9ade76b7.jpg) + +![](images/b88101da74ee51328184174188d890c6f48b4eb68993bbbfebd2d3bd1341729a.jpg) + +![](images/d8211914f03c1cb2405db86be8118ddc12c8efffb2a3d7945dee14068c7aaa0d.jpg) + +![](images/e8cb7de8b22071dd4e2547de959f6a43e91f1281b6cefd3bc2900b097f58645b.jpg) + +![](images/47cf197387b84844b0902041269448d059db875e16eceb2a3cf8b5a11ca1d18b.jpg) + +![](images/d6ebbfede81390dd682e83f8a01ffe0d7503b2c301164bc85172a23cffb8828f.jpg) + +![](images/ff7c2f7ac3ad37db97608ac48e7b9f6bdc5dd21cf62946410095105fc86982b2.jpg) + +![](images/458b3a1e2649b21bbc80b4f0e18915f45027c11dbeb4950413540e3bbb406362.jpg) +(a) BERT + +![](images/6458f379b4c7a55e6783b283a5a6bf6e0ec3bf18ed84f69136d557b7fd4e3e0b.jpg) +(e) DistilBERT +Figure 11: Frequency of each top $5\%$ contributing attention head for correct semantic dependency in failed QA cases (green) compared to successful QA cases (blue). + +![](images/547eb4212e12460cf0dab9fa286048053056012cae11d2c8440c48a9e8a62de0.jpg) +(b) RoBERTa + +![](images/76ec052207c7cb5be7bf2763e63c71fab500a3bc04622f57126048bf8b63bc38.jpg) +(f) DeBERTa + +![](images/67c501dbdabc5228ef391a829db626e6a12a10280a18b3eac44510f235f956f5.jpg) +(c) TinyRoBERTa + +![](images/47c42857826699f8b467a2b4e99f7ee10ca3d7fbd9db116096c53459df71f74f.jpg) +(g) MobileBERT + +![](images/d9df12ab781c558d5f5d00fcb7fbfe3ef07f668c3c2fa51fa2b695c0ab6f89d3.jpg) +(d) ALBERT + +![](images/3ae98b8af29c77a006938b565d3028301fb1cf7788eed069d7e3135eb80835fb.jpg) +(h) MiniLM + +# A.5. Pesudocode for Section 5 + +Algorithm 1 Evaluation of Semantic Dependencies +Input: Dataset with $M$ instances, transformer model $f_{\theta}$ , number of perturbations $K$ +Output: The percentage $p$ that $\Delta^{\prime}_{A_{\mathrm{wrong}}|Q}$ is greater than $\Delta^{\prime}_{A_{\mathrm{correct}}|Q}$ given the question and answer pairs where the model makes mistakes. Initialize count $\leftarrow 0$ +for each incorrect QA instance $m = 1$ to $H$ do Extract question tokens $Q = \{\mathbf{q}_i^0\}_{i = 1}^{N_Q}$ , correct answer tokens $A_{\mathrm{correct}} = \{\mathbf{a}_i^0\}_{i = 1}^{N_C}$ , and incorrect answer tokens $A_{\mathrm{wrong}} = \{\mathbf{a}_i^0\}_{i = 1}^{N_W}$ for each answer token $\mathbf{a}_k^0\in A_{\mathrm{correct}}\cup A_{\mathrm{wrong}}$ do for $k = 1$ to $K$ do if $k = 1$ then $\tilde{\mathbf{z}}_k^0\gets \mathbf{a}_k^0$ else $\tilde{\mathbf{z}}_k^0\gets$ RandomToken(V) end if Construct perturbed sequence $\tilde{\mathbf{z}}^{0(k)}$ by replacing $\mathbf{a}_k^0$ with $\tilde{\mathbf{z}}_k^0$ Compute final layer representations $\tilde{\mathbf{z}}^{L(k)}\gets f_{\theta}(\tilde{\mathbf{z}}^{0(k)})$ end for Compute original final layer representations $\mathbf{z}^{L(\mathrm{org})}\gets f_{\theta}(\mathbf{z}^{0(\mathrm{org})})$ for each token $j = 1$ to $N$ do Calculate $\Delta_{\mathbf{z}_j^L |\mathbf{a}_k^0}\gets \frac{1}{K - 1}\sum_{k = 2}^{K}\left\| \tilde{\mathbf{z}}_j^{L(k)} - \mathbf{z}_j^{L(\mathrm{org})}\right\| _2$ end for Determine maximum dependency score for $\mathbf{a}_k^0:\Delta_{\mathbf{a}_k^0|\mathbf{Q}}'\coloneqq \max_{j = 1}^{N_Q}\Delta_{\mathbf{q}_j^L |\mathbf{a}_k^0}$ end for Determine maximum dependency score for correct answers: $\Delta_{A_{\mathrm{correct}}|Q}^{\prime} = \max_{k = 1}^{N_C}\Delta_{\mathbf{a}_k^0}^\prime$ Determine maximum dependency score for wrong answers: $\Delta_{A_{\mathrm{wrong}}|Q}^{\prime} = \max_{k = 1}^{NW}\Delta_{\mathbf{a}_k^0}^\prime$ if $\Delta_{A_{\mathrm{wrong}}}^{\prime} > \Delta_{A_{\mathrm{correct}}}^{\prime}$ then count $\leftarrow$ count + 1 end if end for Calculate percentage: $p(f_{\theta}) = \frac{\textit{count}}{M}$ + +# A.6. Symbol List + +Table 11: Symbols and Their Explanations + +
SymbolExplanation
ziLThe embedding of the i-th token in the l-th layer.
ziLjThe embedding of the j-th token in the l-th layer.
ziL(og)The original embedding of the i-th token in the l-th layer.
zL(k)The k-th perturbed embedding of the i-th token in the l-th layer.
ΔzLj|zi0Semantic dependency score, which measures how the perturbation of token i at layer 0 affects token j at the final layer L.
NThe number of tokens in a token sequence.
KThe i-th token in layer 0 is perturbed K times to calculate the average change of the i-th token in layer L. K = 5 in our experiments.
MThe number of total perturbed token cases across all sequences we evaluate.
P(fθ)Percentage P of the cases that the transformer-based language model fθ matches our finding.
Wwi0True semantically dependent word group for the i-th word in layer 0 based on semantic dependency parsing.
Gzi0Truthful semantically dependent token group for the i-th token in layer 0 based on semantic dependency parsing.
Gzi0Estimated semantically dependent token group for the i-th token using token perturbation.
KtopThe number of top tokens most sensitive to the perturbation of the input token. Ktop is set to the size of Gzi0. In the experiment, we evaluate the overlap of Gzi0 and top 5 tokens when the size is under 5.
Szi0Alignment score between the truthful (Gzi0) and estimated (Gzi0) semantically dependent token groups.
Gs1zi0, Gs2zi0Estimated semantically dependent token group for the i-th token corresponding to token sequences s1 and s2.
GLeftzi0, GRightzi0Estimated semantically dependent token group for the i-th token corresponding to concatenated sequences (s2, s1) and (s1, s2).
DAS(·)Dependency Alteration Score, measuring the impact of irrelevant context or sequence order changes on semantic dependencies in a sequence.
LThe number of chosen semantically dependent tokens in the original token sequence z0(s1). e.g., L = 5 when choosing the top 5 semantically dependent tokens for evaluation.
qIiThe embedding of the i-th question token in the l-th layer.
aiIThe embedding of the j-th answer token in the l-th layer.
ΔqL|ai0Semantic dependency score in QA task, which measures how the perturbation of i-th answer token at layer 0 affects j-th question token at the final layer L.
Δ'a0|QHighest semantic dependency score above all semantic dependency between all question tokens and i-th answer tokens in a QA task.
Δ'Acorrect|Q, Δ'Awrong|QHighest semantic dependency score above all semantic dependency between question tokens and answer tokens (correct or wrong) in a QA task.
\ No newline at end of file diff --git a/alensintointerpretabletransformermistakesviasemanticdependency/images.zip b/alensintointerpretabletransformermistakesviasemanticdependency/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..55f5742206a0f6d09105d8361c8db2ad2883e856 --- /dev/null +++ b/alensintointerpretabletransformermistakesviasemanticdependency/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a83f415839aedcf2642082cd129dfa5a8d6ac23433f9a28ff4fb85d88dcbdcbe +size 1465396 diff --git a/alensintointerpretabletransformermistakesviasemanticdependency/layout.json b/alensintointerpretabletransformermistakesviasemanticdependency/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7ab8a1665b7145947c4709f603f9217d585d3d75 --- /dev/null +++ b/alensintointerpretabletransformermistakesviasemanticdependency/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9735cea6a01b2c39938c8e3e58655a7dd4518b90b047aac9b6edd89c2db98212 +size 968858 diff --git a/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/46660fb9-15b4-4b80-a153-58ad0ee26420_content_list.json b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/46660fb9-15b4-4b80-a153-58ad0ee26420_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8f952ebed2bf32d84d2b4104120f0c801dfe1f4e --- /dev/null +++ b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/46660fb9-15b4-4b80-a153-58ad0ee26420_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34ce4802ee39478bc1a9898d4a9d1f2cffac24852d95d4dd5a35f5d34f06ba55 +size 230188 diff --git a/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/46660fb9-15b4-4b80-a153-58ad0ee26420_model.json b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/46660fb9-15b4-4b80-a153-58ad0ee26420_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a37225a95266f92a9e6e4adbc06b85712b15b0e5 --- /dev/null +++ b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/46660fb9-15b4-4b80-a153-58ad0ee26420_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cafac09abfde53250da48a3f93e777b574d36bdd4d9ca1fd25472c7d87270e5b +size 270439 diff --git a/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/46660fb9-15b4-4b80-a153-58ad0ee26420_origin.pdf b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/46660fb9-15b4-4b80-a153-58ad0ee26420_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f9ee294012cffc00b3d1837c02a5a8f12c4bd61a --- /dev/null +++ b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/46660fb9-15b4-4b80-a153-58ad0ee26420_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30c9cb34e80e5bc0b10a0ef8541e9b2199804657bba6287776711eb2da537aed +size 1656814 diff --git a/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/full.md b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..499988bdac45917d069de11f8b4dc540d7063ce1 --- /dev/null +++ b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/full.md @@ -0,0 +1,1115 @@ +# A Likelihood Based Approach to Distribution Regression Using Conditional Deep Generative Models + +Shivam Kumar1 Yun Yang2 Lizhen Lin2 + +# Abstract + +In this work, we explore the theoretical properties of conditional deep generative models under the statistical framework of distribution regression where the response variable lies in a high-dimensional ambient space but concentrates around a potentially lower-dimensional manifold. More specifically, we study the large-sample properties of a likelihood-based approach for estimating these models. Our results lead to the convergence rate of a sieve maximum likelihood estimator (MLE) for estimating the conditional distribution (and its devolved counterpart) of the response given predictors in the Hellinger (Wasserstein) metric. Our rates depend solely on the intrinsic dimension and smoothness of the true conditional distribution. These findings provide an explanation of why conditional deep generative models can circumvent the curse of dimensionality from the perspective of statistical foundations and demonstrate that they can learn a broader class of nearly singular conditional distributions. Our analysis also emphasizes the importance of introducing a small noise perturbation to the data when they are supported sufficiently close to a manifold. Finally, in our numerical studies, we demonstrate the effective implementation of the proposed approach using both synthetic and real-world datasets, which also provide complementary validation to our theoretical findings. + +$^{1}$ Department of Applied and Computational Mathematics and Statistics, University of Notre Dame, Notre Dame, USA $^{2}$ Department of Mathematics, University of Maryland, College Park, USA. Correspondence to: Shivam Kumar . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +# 1. Introduction + +Conditional distribution estimation provides a principled framework for characterizing the dependence relationship between a response variable $Y$ and predictors $X$ , with the primary goal of estimating the distribution of $Y$ conditional on $X$ through learning the (conditional) data-generating process. Conditional distribution estimation allows one to regress the entire distribution of $Y$ on $X$ , which provides much richer information than the traditional mean regression and plays a central role in various important areas ranging from causal inference (Pearl, 2009; Spirtes, 2010), graphical models (Jordan, 1999; Koller & Friedman, 2009), representation learning (Carreira-Perpinan, 1997; Van Der Maaten et al., 2009), to model selection (Claeskens & Hjort, 2008; Ando, 2010). Their applications span across diverse domains such as forecasting (Gneiting & Katzfuss, 2014), biology (Krishnaswamy et al., 2014), energy (Jeon & Taylor, 2012), astronomy (Zhao et al., 2021), and industrial engineering (Simar & Wilson, 2015), among others. + +There is a rich literature in statistics and machine learning on conditional distribution estimation including both frequentist and Bayesian methods (Hall & Yao, 2005; Norets & Pati, 2017). Traditional methods, however, suffer from the curse of dimensionality and often struggle to adapt to the intricacies of modern data types such as the ones with lower-dimensional manifold structures. + +Recent methodologies that leverage deep generative models have demonstrated significant advancements in complex data generation. Instead of explicitly modeling the data distribution, these approaches implicitly estimate it through learning the corresponding data sampling scheme. Commonly, these implicit distribution estimation approaches can be broadly categorized into three types. The first one is likelihood-based with notable examples including Kingma & Welling (2013), Rezende et al. (2014), Burda et al. (2015), and Song et al. (2021). The second approach, based on adversarial learning, matches the empirical distribution of the data with a distribution estimator using an adversarial loss. Representative examples include Goodfellow et al. (2014), Arjovsky et al. (2017), and Mroueh et al. (2017), among others. The third approach, which is more recent, reduces + +the problem of distribution estimation to score estimation through certain time-discrete or continuous dynamical systems. The idea of score matching was first proposed in Hyvarinen & Dayan (2005) and Vincent (2011). More recently, score-based diffusion models have achieved state-of-the-art performance in many applications (Sohl-Dickstein et al., 2015; Nichol & Dhariwal, 2021; Song et al., 2020; Lipman et al., 2022; Brehmer & Cranmer, 2020; Han et al., 2022). + +On the theoretical front, recent works such as Liu et al. (2021), Chae et al. (2023), Altekruger et al. (2023), Stanczuk et al. (2024), Pidstrigach (2022), and Tang & Yang (2023) demonstrate that distribution estimation based on deep generative models can adapt to the intrinsic geometry of the data, with convergence rates dependent on the intrinsic dimension of the data, thus potentially circumventing the curse of dimensionality. Such advancement has naturally motivated us to employ and investigate conditional deep generative model for conditional distribution estimation. Specifically, we explore and study the theoretical properties of a new likelihood-based approach to conditional sampling using deep generative models for data potentially residing on a low-dimensional manifold corrupted by full-dimensional noise. More concretely, we consider the following conditional distributional regression problem: + +$$ +Y | X = V | X + \varepsilon , \tag {1} +$$ + +where $X$ serves as a predictor in $\mathbb{R}^{\mathfrak{p}}$ , $V|X$ represents the (uncorrupted) underlying response supported on a manifold of dimension $\mathfrak{d}\leq D$ , $Y|X$ represents the observed response, and $\varepsilon \sim \mathsf{N}(0,\sigma_{*}^{2}I_{D})$ denotes the noise residing in the ambient space $\mathbb{R}^D$ . Our deep generative model focuses on the conditional distribution $V|X$ by using a (conditional) generator of the form $G_{*}(Z,X)$ , where $G_{*}$ is a function of a random seed $Z$ and the covariate information $X$ . This approach is termed 'conditional deep generative' because the conditional generator is modeled using deep neural networks (DNNs). Observe that, when $\mathfrak{d} < D$ , the distribution of $G_{*}(Z,X)$ is supported on a lower-dimensional manifold, making it singular with respect to the Lebesgue measure in the $D$ -dimensional ambient space. We study the statistical convergence rate of sieve MLEs in the conditional deep general model setup and investigate its dependence on the intrinsic dimension, structure properties of the model as well as the noise level of the data. + +# 1.1. List of contributions + +We briefly summarise the main contributions made in this paper. + +- To the best of our knowledge, our study is the first attempt to explore the likelihood-based approach for distributional regression using a conditional deep generative + +model, considering full-dimensional noise and the potential presence of singular underlying support. We provide a solid statistical foundation for the approach by proving the near-optimal convergence rates for this proposed estimator. + +- We derive the convergence rates for the conditional density estimator of the corrupted data $Y$ with respect to the Hellinger distance and specialize the obtained rate for two popular deep neural network classes: the sparse and fully connected network classes. Furthermore, we characterize the Wasserstein convergence rates for the induced intrinsic conditional distribution estimator on the manifold (i.e., a deconvolution problem). Both rates turn out to depend only on the intrinsic dimension and smoothness of the true conditional distribution. +- Our analysis in Corollary 2 suggests the need to inject a small amount of noise into the data when they are sufficiently close to the manifold. Intuitively, this observation validates the underlying structural challenges in related manifold estimation problems with noisy data, as outlined by Genovese et al. (2012). +- We show that the class of learnable (conditional) distributions of our method is broad. It encompasses not only the smooth distributions class, but also extends to the general (nearly) singular distributions with manifold structures, with minimal assumptions. + +# 1.2. Other relevant literature + +The problem of non-parametric conditional density estimation has been extensively explored in statistical literature. Hall & Yao (2005), Bott & Kohler (2017), and Bilodeau et al. (2023) directly tackle this problem with smoothing and local polynomial-based methods. Fan & Yim (2004) and Efromovich (2007) explore suitably transformed regression problems to address this challenge. Other notable approaches include the nearest neighbor method (Izbicki et al., 2020; Bhattacharya & Gangopadhyay, 1990), basis function expansion (Sugiyama et al., 2010; Izbicki & Lee, 2016), tree-based boosting (Pospisil & Lee, 2018; Gao & Hastie, 2022), and Bayesian optimal transport flow Chemseddine et al. (2024) among others. + +In the context of conditional generation, we highlight recent work by Zhou et al. (2022) and Liu et al. (2021). In Zhou et al. (2022), GANs were employed to investigate conditional density estimation. While this work offers a consistent estimator, it lacks statistical rates or convergence analysis, and its focus is on a low-dimensional setup. In Liu et al. (2021), conditional density estimation supported on a manifold using Wasserstein-GANs was examined. However, their setup does not account for smoothness across either covariates or responses, nor do they address how deep generative models specifically tackle the challenges of high- + +dimensionality. Moreover, their assumption that the data lies exactly on the manifold can be restrictive. Our study shares some commonalities with the work of Chae et al. (2023), as both investigate sieve maximum likelihood estimators (MLEs). However, the fundamental problems addressed and the methodologies employed differ significantly, and our work involves technical challenges that span multiple scales. While Chae et al. (2023) concentrates exclusively on unconditional distribution estimation, our theoretical analysis necessitates much more nuanced techniques due to the conditional nature of our setup. This shift is noteworthy because it demands a more refined analysis of entropy bounds, considering two potential sources of smoothness - across the regressor and the response variables. Furthermore, our setting accommodates the possibility of an infinite number of $x$ values, which gives rise to a dynamic manifold structure, further compounding the intricacy of the problem at hand. + +# 2. Conditional deep generative models for distribution regression + +We consider the following probabilistic conditional generative model, where for a given predictor value $x$ , the response $Y$ is generated by + +$$ +Y = G _ {*} (Z, x) + \varepsilon , \quad x \in \mathcal {X} \subset \mathbb {R} ^ {\mathrm {p}}. \tag {2} +$$ + +Here, $G_{*}(\cdot ,x):\mathcal{Z}\to \mathcal{M}_{x}$ is the unknown generator function, $Z$ a latent variable with a known distribution $P_Z$ and support $\mathcal{Z}\subset \mathbb{R}^{\mathfrak{o}}$ independent of the predictor $X$ . The existence of the generator $G_{*}$ directly follows from Noise Outsourcing Lemma 3. This lemma enables the transfer of randomness into the covariate and an orthogonal (independent) component through a generating function for any regression response. We denote $\mathcal{M}:= \cup_{x\in \mathcal{X}}\mathcal{M}_x\subset \mathbb{R}^D$ as the support of the image of $G_{*}(\mathcal{Z},\mathcal{X})$ such as a (union of) $d$ -dimensional manifold. We model $G_{*}(\cdot ,\cdot):\mathcal{Z}\times \mathcal{X}\subset \mathbb{R}^{\mathfrak{o}}\times \mathbb{R}^{\mathfrak{p}}\rightarrow \mathcal{Y}\subset \mathbb{R}^{D}$ using a deep neural network, leading to a conditional deep generative model for (2). + +In the next section, we present a more general result in terms of the entropy bound (variance) for the true function class of $G_{*}$ and the approximability (bias) of the search class. We then proceed to a simplified understanding in the context of conditional deep generative models in subsequent sections. + +# 2.1. Convergence rates of the Sieve MLE + +In light of equation (2), it is evident that the distribution of $Y|X = x$ results from the convolution of two distinct distributions: the pushforward of $Z$ through $G_{*}$ with $X = x$ , and $\varepsilon$ following an independent $D$ -dimensional normal distribution. The density corresponding to the true distribution + +$P_{*}(\cdot |X = x)$ can thus be expressed as: + +$$ +p _ {*} (y | x) = \int \phi_ {\sigma_ {*}} (y - G _ {*} (z, x)) d P _ {Z}, +$$ + +where $\phi_{\sigma_*}$ is the density of $\mathsf{N}(0,\sigma_*^2 I_d)$ . We define the class of conditional distributions $\mathcal{P}$ as + +$$ +\mathcal {P} = \left\{P _ {g, \sigma}: g (\cdot , x) \in \mathcal {F}, \sigma \in \left[ \sigma_ {\min }, \sigma_ {\max } \right] \right\}, \tag {3} +$$ + +where $P_{g,\sigma}$ represents the distribution with density $p_{g,\sigma} = \int \phi_{\sigma}(y - g(z,x))dP_Z$ . In this notation, $P_{*} = P_{G_{*},\sigma_{*}}$ and $p_{*} = p_{G_{*},\sigma_{*}}$ . The elements of $\mathcal{P}$ comprise two components: $g$ originating from the underlying function class $\mathcal{F}$ , and $\sigma$ , which characterizes the noise component. This class enables us to obtain separate estimates for $G_{*}$ and $\sigma_{*}$ , furnishing us with both the canonical estimator for the distribution of $Y|X = x$ and enhancing our comprehension of the singular distribution of $G_{*}(Z,x)$ , supported on a low-dimensional manifold. + +Given a data set $\{(X_i,Y_i)\}_{i = 1}^n$ , the log-likelihood function is defined as $\ell_n(g,\sigma) = n^{-1}\sum_{i = 1}^n\log p_{g,\sigma}(Y_i|X_i)$ . For a sequence $\eta_{n}\downarrow 0$ as $n\to \infty$ , a sieve maximum likelihood estimator (MLE) (Geman & Hwang, 1982) is any estimator $(\widehat{g},\widehat{\sigma})\in \mathcal{F}\times [\sigma_{\min},\sigma_{\max}]$ that satisfies + +$$ +\ell_ {n} (\widehat {g}, \widehat {\sigma}) \geq \sup \quad \ell_ {n} (g, \sigma) - \eta_ {n}. \tag {4} +$$ + +$$ +\begin{array}{l} \sigma \in [ \sigma_ {\min }, \sigma_ {\max } ] \\ g \in \mathcal {F} \end{array} +$$ + +Here $\widehat{g} \in \mathcal{F}$ and $\widehat{\sigma} \in [\sigma_{\min}, \sigma_{\max}]$ are the estimators, and $\eta_n$ represents the optimization error. The dependence of $\widehat{g}$ and $\widehat{\sigma}$ on $n$ illustrates the sieve's role in approximating the true distribution when optimization is performed over the class $\mathcal{P}$ . The estimated density $\widehat{p} = p_{\widehat{g},\widehat{\sigma}}$ provides an estimator for $p_*(\cdot|\cdot)$ , and $Q_{\widehat{g}}(\cdot|X = x)$ serve as the estimator for $Q_*(\cdot|X = x)$ . + +In this section, we formulate the main results, which provide convergence rates in the Hellinger distance for our sieve MLE estimator. The convergence rate was derived for any search functional class $\mathcal{F}$ , with a brief emphasis on their entropy and approximation capabilities. + +Assumption 1 (True distribution). Denote $\mu_X^*(x)$ as the distribution of $X$ . We denote the true conditional densities as $p_* = \{p_*(\cdot | x), x \in \mathbb{R}^{\mathfrak{p}}\}$ . It is natural to assume that the data is generated from $p_*$ from model (2) with some true generator $G_*$ and $\sigma_*$ . We denote $Q_*(\cdot | X = x)$ (or $Q_{G_*}$ ) as the distribution of $G_*(Z, x)$ for some distribution $P_Z$ . + +A function $g$ is said to have a composite structure (Schmidt-Hieber, 2020; Kohler & Langer, 2021) if it takes the form as + +$$ +g = f _ {q} \circ f _ {q - 1} \circ \dots \circ f _ {1} \tag {5} +$$ + +where $f_{j}:(a_{j},b_{j})^{d_{j}}\to (a_{j + 1},b_{j + 1})^{d_{j + 1}}$ $d_0 = \mathfrak{p} + \mathfrak{d}$ and $d_{q + 1} = D$ Denote $f_{j} = (f_{j}^{(1)},\dots ,f_{j}^{(d_{j + 1})})$ as + +the components of $f_{j}$ , let $t_j$ be the maximal number of variables on which each of the $f_{j}^{(i)}$ depends and let $f_{j}^{(i)} \in \mathcal{H}^{\beta_{j}}((a_{j},b_{j})^{t_{j}},K)$ (see Section 2.4.1 for the definition of the Hölder class $\mathcal{H}^\beta$ ). A composite structure is very general which includes smooth functions and additive structure as special cases. In addition, in the next section, we show the class of conditional distributions $\{Q_{G_*}(\cdot |X = x):x\in \mathbb{R}^{\mathfrak{p}},G_*\in \mathcal{G}\}$ induced by the composite structure is broad. + +Assumption 2 (composite structure). Denote $\mathcal{G} = \mathcal{G}(q, \pmb{d}, \pmb{t}, \beta, K)$ as a collection of functions of form (5), where $\pmb{d} = (d_0, \dots, d_{q+1})$ , $\pmb{t} = (t_0, \dots, t_{q+1})$ , and $\beta = (\beta_0, \dots, \beta_{q+1})$ . We regard $(q, \pmb{d}, \pmb{t}, \beta, K)$ as constants in our setup, and assume that the true generator $G_*(\cdot, x)$ as in (2) belongs to $\mathcal{G}$ , for all $x \in \mathcal{X}$ . Additionally, we assume $\| | G_*|_\infty \|_\infty \leq K$ . + +$$ +\widetilde {\beta} _ {j} = \beta_ {j} \prod_ {l = j + 1} ^ {q} \left(\beta_ {l} \wedge 1\right), \quad j _ {*} = \underset {j \in \{0, \dots , q \}} {\operatorname {a r g m a x}} \frac {t _ {j}}{\widetilde {\beta} _ {j}}, +$$ + +$$ +\beta_ {*} = \widetilde {\beta} _ {j _ {*}}, \quad t _ {*} = t _ {j _ {*}}. +$$ + +The quantities $t_*$ and $\beta_*$ are called intrinsic dimension and smoothness of $G_*$ (or of $\mathcal{G}$ ). + +Remark 1 (Strength of the Composite Structure). The expression $(a_j, b_j) \subset [-K, K]$ can be intuitively visualized by setting $a_j = -K$ and $b_j = K$ . To illustrate the impact of intrinsic dimensionality and smoothness, consider a function $f: \mathbb{R}^d \to \mathbb{R}$ defined as $f(x) = f_1(x_1) + \ldots + f_d(x_d)$ , where $x = (x_1, \ldots, x_d)$ and $f_j \in \mathcal{H}^\beta((-K, K), K)$ for $j = 1, \ldots, d$ . While $f \in \mathcal{H}^\beta((-K, K)^d, K)$ , its intrinsic dimension is $t_* = 1$ with intrinsic smoothness $\beta$ . This mitigates the curse of dimensionality. + +Example (One-dimensional $\beta$ -Hölder Generator). Let $U \sim \mathrm{Unif}(0,1)$ and define $G(u) = u^{1/\beta}$ , $u \in [0,1]$ . Then $X = G(U)$ has density + +$$ +\frac {d}{d x} \mathbb {P} (U \leq x ^ {\beta}) = \beta x ^ {\beta - 1}, \quad x \in [ 0, 1 ], +$$ + +which belongs to the $\beta$ -Hölder class on $[0,1]$ . In our notation one checks $t_* = 1, \beta_* = \beta$ , and setting $\beta = 1$ recovers Unif(0,1) case and thus provides a fully explicit illustration of Assumption 2. + +Assumption 3. Let $\mathcal{M}_*$ be the closure of $G_*(\mathcal{Z},\mathcal{X})$ . We assume that $\mathcal{M}_*$ does not have an interior point, and reach $(\mathcal{M}_*) = \mathsf{r}_*$ with $\mathsf{r}_* > 0$ . + +Assumption 2 permits low intrinsic dimensionality within the learnable function class. Assumption 3 imposes the strong identifiability condition necessary for efficient estimation, as seen in manifold literature (Aamari & Levrard, 2019; Tang & Yang, 2023). + +Given two conditional densities $p_1(\cdot |x), p_2(\cdot |x)$ and $\mu_X^*$ denoting the density of $X$ , we use integrated distances for a measure of evaluation. With a slight abuse of notation, we denote $d_1(p_1, p_2) = \mathbb{E}_X[d_1(p_1(\cdot |x), p_2(\cdot |x))]$ and $d_H(p_1, p_2) = \mathbb{E}_X[d_H(p_1(\cdot |x), p_2(\cdot |x)]$ , where $d_1$ and $d_H$ represent the $L_1$ and the Hellinger distance as $d_1(p_1(\cdot |x), p_2(\cdot |x)) = \int |p_1(y|x) - p_2(y|x)| dy$ and $d_H(p_1, p_2) = (\int \int [\sqrt{p_1(y|x)} - \sqrt{p_2(y|x)}]^2 dy)^{1/2}$ respectively. Denote $\mathcal{N}(\delta, \mathcal{F}, d)$ and $\mathcal{N}_{\mathbb{I}}(\delta, \mathcal{F}, d)$ as covering and bracketing numbers of the function class $\mathcal{F}$ with respect to the (pseudo)-metric $d$ . + +We first present Lemma 1, which establishes the bracketing entropy of the functional class $\mathcal{P}$ with respect to Hellinger distance in terms of the covering entropy of the search class $\mathcal{F}$ . This enables us to transfer the entropy control of the individual components $\mathcal{F}$ and $\sigma$ to the entire $\mathcal{P}$ . + +Lemma 1. Let $\mathcal{F}$ be class of functions from $\mathcal{Z} \times \mathcal{X}$ to $\mathbb{R}^D$ such that $\| |g|_{\infty}\|_{\infty} \leq K$ for every $g \in \mathcal{F}$ . Let $\mathcal{P} = \{P_{g,\sigma}: g \in \mathcal{F}, \sigma \in [\sigma_{\min}, \sigma_{\max}]\}$ with $\sigma_{\min} \leq 1$ . Then, there exist constants $c = c(\sigma_{\max}, K, D)$ and $C = C(\sigma_{\max}, K, D)$ and $\delta_* = \delta_*(D)$ such that for every $\delta \in (0, \delta_*)$ , + +$$ +\log \mathcal {N} _ {\llbracket} (\delta , \mathcal {P}, d _ {H}) \leq \log \mathcal {N} \left(c \sigma_ {\min } ^ {D + 3} \delta^ {4}, \mathcal {F}, \| | \cdot | _ {\infty} \| _ {\infty}\right) + \log \left(\frac {C}{\sigma_ {\min } ^ {D + 2} \delta^ {4}}\right), \tag {6} +$$ + +The proof of Lemma 1 is provided in the Appendix E. Theorem 1 presents the convergence rate of the sieve-MLE to the true distribution (see Appendix F for the proof). + +Theorem 1. Let $\mathcal{F},\mathcal{P},\sigma_{\mathrm{min}}$ and $\delta_{*} = \delta_{*}(D)$ be given as in Lemma 1, and $n\geq 1$ . Suppose that $\log \mathcal{N}(\delta ,\mathcal{F},\| |\cdot |_{\infty}\|_{\infty})\leq \xi \left\{A + 1\vee \log \delta^{-1}\right\}$ for every $\delta \in (0,\delta_{*}]$ and some $A,\xi >0$ . Suppose that there exists a $G\in \mathcal{F}$ and some $\delta_{\mathrm{approx}}\in (0,\delta_{*}]$ such that $\| \| G - G_{*}|_{\infty}\|_{\infty}\leq \delta_{\mathrm{approx}}$ . Furthermore, suppose that $s\geq 1$ , $A\geq 1$ , $\sigma_{min}\leq 1$ , $\delta_{\mathrm{approx}}\leq 1$ and $\sigma_{*}\in [\sigma_{\mathrm{min}},\sigma_{\mathrm{max}}]$ . Then + +$$ +P _ {*} \left(d _ {H} (\widehat {p}, p _ {*}) > \varepsilon_ {n} ^ {*}\right) \leq 5 e ^ {- C _ {1} n \varepsilon_ {n} ^ {* 2}} + C _ {2} n ^ {- 1} \tag {7} +$$ + +provided that $\eta_{n}\leq n\varepsilon_{n}^{*2} / 6$ and $\varepsilon_{n}^{*}\leq \sqrt{2}\delta_{*}$ where + +$$ +\varepsilon_ {n} ^ {*} = C _ {3} \left(\sqrt {\frac {\xi \left\{A + \log \left(n / \sigma_ {\operatorname* {m i n}}\right) \right\}}{n}} \vee \frac {\delta_ {\text {a p p r o x}}}{\sigma_ {*}}\right), \tag {8} +$$ + +$C_1$ is an absolute constant, $C_2 = C_2(D)$ and $C_3 = C_3(D, K, \sigma_{\max})$ . + +The outlined rate has two components: the statistical component, expressed as an upper bound to the metric entropy of $\mathcal{F}$ , and the approximation component, denoted as $\delta_{\mathrm{approx}}$ . The statistical error is quantified by measuring the complexity of the class $\mathcal{P}$ , as formulated in Lemma 1. The approximation error is assessed through the ability of the provided function class to approximate the true distribution. + +# 2.2. Neural network class + +We model $G_{*}(\cdot, \cdot)$ using a deep neural network. More specifically, we parameterize the true generator $G_{*}$ with a deep neural neural architecture $(L, \mathbf{r})$ of the form + +$$ +f: \mathbb {R} ^ {r _ {0}} \rightarrow \mathbb {R} ^ {r _ {L + 1}}, \quad z \mapsto f (z) = W _ {L} \rho_ {v _ {L}} W _ {L - 1} \rho_ {v _ {L -}} \dots W _ {1} \rho_ {v _ {1}} W _ {0} z, \tag {9} +$$ + +where $W_{j}\in \mathbb{R}^{r_{j + 1}\times r_{j}},v_{j}\in \mathbb{R}^{r_{j}}$ $\rho_{v_j}(\cdot) = \mathrm{ReLU}(\cdot -v_j)$ and $\mathbf{r} = (r_0,\dots ,r_{L + 1})\in \mathbb{N}^{L + 2}$ . The constant $L$ is the number of hidden layers and $r = (r_0,\ldots ,r_{L + 1})$ represents the number of nodes in each layer. + +We define the sparse neural architecture class $\mathcal{F}_s(L,\mathbf{r},s,B,K)$ as set of functions of form (9) satisfying + +$$ +\max _ {0 \leq j \leq L} | W _ {j} | _ {\infty} \vee | v _ {j} | _ {\infty} \leq B, \quad \sum_ {j = 1} ^ {L} | W _ {j} | _ {0} + | v _ {j} | _ {0} \leq s, \quad \| | f | _ {\infty} \| _ {\infty} \leq K, +$$ + +with $r_0 = \mathfrak{d} + \mathfrak{p}$ and $r_{L + 1} = D$ , where $|\cdot |_0$ and $|\cdot |_{\infty}$ stand for the $L^0$ and $L^{\infty}$ vector norms, and $\| |f|_{\infty}\|_{\infty} = \sup_{x\in \mathbb{R}^{r_0}}\max_{i = 1,\dots,D}|f_i(x)|$ , $s$ is sparsity parameter and $K$ is functional bound. + +The fully connected neural architecture class $\mathcal{F}_c = \mathcal{F}_c(L, \mathbf{r}, B, K)$ is set of functions of form (9) satisfying + +$$ +\max _ {0 \leq j \leq L} | W _ {j} | _ {\infty} \vee | v _ {j} | _ {\infty} \leq B, \quad \| | f | _ {\infty} \| _ {\infty} \leq K. +$$ + +Both classes $\mathcal{F}_s$ and $\mathcal{F}_c$ for the deep generator will be considered in our analysis of the resulting sieve maximum likelihood estimator. We denote the corresponding sieve-MLE as $\widehat{p}_s$ and $\widehat{p}_c$ , respectively. When we use $r$ instead of $\mathbf{r}$ , it refers to $r_1 = \ldots = r_L = r$ along with $r_0 = \mathfrak{d} + \mathfrak{p}$ and $r_{L+1} = D$ . + +We can simplify and visualize the result stated in Theorem 1 in both cases: when the sieve-MLE is obtained with optimization performed over the class $\mathcal{F}_s$ and $\mathcal{F}_c$ . To fulfill the conditions stated in the Theorem 1, we need to establish entropy bounds for these function classes, $\mathcal{F}_s$ and $\mathcal{F}_c$ , and gain insight into their approximation capabilities for the composite structure class described in Assumption 2. + +For the sparse neural architecture class $\mathcal{F}_s(L,r,s,K)$ , the entropy, formally stated as Proposition 1 in Ohn & Kim (2019), is bounded as follows. + +$$ +\log \mathcal {N} (\delta , \mathcal {F} _ {s}, \| | \cdot | _ {\infty} \| _ {\infty}) \lesssim s L \left\{\log (B L r) + \log \delta^ {- 1} \right\}. \tag {10} +$$ + +From an entropy perspective, the fully connected neural architecture class $\mathcal{F}_c(L,r,B,K)$ can be viewed as $\mathcal{F}_s$ without any sparsity constraint, meaning $s\asymp r^2 L$ . Therefore, we have + +$$ +\log \mathcal {N} (\delta , \mathcal {F} _ {c}, \| | \cdot | _ {\infty} \| _ {\infty}) \lesssim L ^ {2} r ^ {2} \left\{\log (B L r) + \log \delta^ {- 1} \right\}. \tag {11} +$$ + +The approximation properties of the sparse and fully connected network are provided in Lemma 4.1 and Lemma 4.2 of the Appendix K, respectively. + +Having established the essential components for $\mathcal{F}_c$ in (11) and Lemma 4.2, and for $\mathcal{F}_s$ in (10) and Lemma 4.1, respectively, we can simplify Theorem 1 and state Corollary 1. + +Corollary 1. Suppose that Assumptions 1 and 2 hold, and $\sigma_{*} \in [\sigma_{\min}, \sigma_{\max}]$ with $\sigma_{\min} \leq 1$ and $\sigma_{\max} < \infty$ . Moreover, assume that the noise $\sigma_{*}$ decays at rate $\alpha$ , i.e., $\sigma_{*} \asymp n^{-\alpha}$ , and $\sigma_{\min} = n^{-\gamma}$ for some $\gamma \geq \alpha \geq 0$ . Then, for every $\delta_{\mathrm{approx}} \in [0,1]$ , the following holds: + +1. Let $\mathcal{F}_s = \mathcal{F}_s(L,r,s,B,K)$ with $\delta_{*} = \delta_{*}(D)$ be as given in Lemma 1, and $L\asymp \log \delta_{\mathrm{approx}}^{-1}$ , $r\asymp \delta_{\mathrm{approx}}^{-t_{*} / \beta_{*}}$ , $s\asymp \delta_{\mathrm{approx}}^{-t_{*} / \beta_{*}}\log \delta_{\mathrm{approx}}^{-1}$ , $B\asymp \delta_{\mathrm{approx}}^{-1}$ . Then the sieve MLE $\widehat{p}_{s}$ satisfies (7) with $\varepsilon_n^*$ as in (8) with $\xi = \delta_{\mathrm{approx}}^{-t_{*} / \beta_{*}}\log^{2}(\delta_{\mathrm{approx}}^{-1})$ and $A = \log^{2}(\delta_{\mathrm{approx}}^{-1})$ provided that $\eta_n\leq n\varepsilon_n^{*2} / 6$ and $\varepsilon_n^*\leq \sqrt{2}\delta_*$ . + +2. Let $\mathcal{F}_c = \mathcal{F}_c(L,r,B,K)$ with $\delta_{*} = \delta_{*}(D)$ be as given in Lemma 1, and $L\asymp \log \delta_{\mathrm{approx}}^{-1}$ , $r\asymp \delta_{\mathrm{approx}}^{-t_* / 2\beta_*}$ , $B\asymp \delta_{\mathrm{approx}}^{-1}$ . Then the sieve MLE $\widehat{p}_c$ satisfies (7) with $\varepsilon_n^*$ as in (8) with $\xi = \delta_{\mathrm{approx}}^{-t_* / \beta_*}\log^2 (\delta_{\mathrm{approx}}^{-1})$ and $A = \log^{2}(\delta_{\mathrm{approx}}^{-1})$ provided that $\eta_{n}\leq n\varepsilon_{n}^{*2} / 6$ and $\varepsilon_{n}^{*}\leq \sqrt{2}\delta_{*}$ . + +In particular, choosing $\delta_{\mathrm{approx}} \coloneqq \left( \sigma_{*}^{2} / n \right)^{\beta_{*} / (2\beta_{*} + t_{*})}$ minimizes $\varepsilon_{n}^{*} \asymp \sqrt{\xi \left\{ A + \log \left( n / \sigma_{\min} \right) \right\} / n} \vee \delta_{\mathrm{approx}} / \sigma_{*}$ , and gives + +$$ +\varepsilon_ {n} ^ {*} \asymp n ^ {- \frac {\beta_ {*} - t _ {*} \alpha}{2 \beta_ {*} + t _ {*}}} \log^ {2} (n). \tag {12} +$$ + +Remark 2. The convergence rate in (12) illustrates the influence of intrinsic dimensionality, smoothness, and noise level on the estimation process. Note that $\alpha$ is upper bounded as $\varepsilon_{n}^{*}\leq \sqrt{2}\delta_{*}(D)$ . For large values of $\alpha$ , estimation of $G_{*}$ is inherent difficult as the data is very close on the singular support. To address this, a small noise injection, as described in Corollary 2, can smooth the estimation and ensure consistency. + +The proof of Corollary 1 is provided in Appendix G. For the composite structural class $\mathcal{G}$ , the effective smoothness is denoted by $\beta_{*}$ , and the dimension is $t_*$ . This effectively mitigates the curse of dimensionality. The convergence rate at (12) also recovers the optimal rate when $q = 1$ and $\alpha = 0$ , and there is a small lag of polynomial factor $t_*\alpha / (2\beta_* + t_*)$ when $\alpha > 0$ (Norets & Pati, 2017). This lag arises due to the presence of full-dimensional noise in the response observation $Y$ . Note that when the noise is small, that is $\alpha$ is large, achieving a sharp estimation of $p_*$ requires an equally accurate estimate of $G_*$ . This can be quite challenging. + +Our practically tractable approach attempts to address this without initially estimating the singular support. + +# 2.3. Wasserstein convergence of the intrinsic (conditional) distributions + +Using Wasserstein distance as a metric for distributions $Q_{g}$ is meaningful due to their singularity in ambient space: when $\mathfrak{d} < D$ , the conditional distribution is singular with respect to the Lebesgue measure on $\mathbb{R}^{D}$ . + +The integrated Wasserstein distance, for $r \geq 1$ , between $P_{1}(\cdot |X)$ and $P_{2}(\cdot |X)$ is defined as + +$$ +W _ {r} \left(P _ {1}, P _ {2}\right) = \mathbb {E} _ {X} \left[ \inf _ {\beta \in \Gamma (P _ {1}, P _ {2})} \left(\mathbb {E} _ {(U _ {1}, U _ {2}) \sim \beta} \left[ | U _ {1} - U _ {2} | _ {r} ^ {r} \right]\right) ^ {1 / r} \right], +$$ + +where $\Gamma(P_1, P_2)$ is the set of all couplings between $P_1$ and $P_2$ that preserves the two marginals. The (dual) representation of this norm, $W_r(P_1, P_2) = \mathbb{E}_X\left[\sup_{\|f\|_{Lip_r} \leq 1}\left\{\mathbb{E}_{P_1}[f] - \mathbb{E}_{P_2}[f]\right\}\right]$ (Villani et al., 2009) with $\|\cdot\|_{Lip_r}$ denoting the $r$ -Lipschitz norm, is particularly useful in our proofs. + +Theorem 2. Suppose that Assumption 3 holds. If $d_H(p_{g,\sigma}, p_*) \leq \varepsilon$ holds for some $\varepsilon \in [0,1]$ and some $p_{g,\sigma} \in \mathcal{P}$ , then we have + +$$ +W _ {1} (Q _ {g}, Q _ {*}) \leq C \left(\varepsilon + \sigma_ {*} \sqrt {\log \varepsilon^ {- 1}}\right), +$$ + +where $C = C(D,K,\mathsf{r}_{*})$ depends only on $(D,K,\mathsf{r}_{*})$ . + +The proof of Theorem 2 is provided in Appendix H. Theorem 2 guarantees that $W_{1}\left(\widehat{Q}_{\widehat{g}},Q_{*}\right)\lesssim_{\log}d_{H}(\widehat{p},p_{*}) + \sigma_{*}$ where $\lesssim_{\log}$ represents less than or equal up to a logarithmic factor of $n$ . Following from Corollary 1, the Wasserstein convergence rate, $n^{-(\beta_{*} - t_{*}\alpha) / (2\beta_{*} + t_{*})}\log^{2}(n)\vee \sigma_{*}\log^{1 / 2}(n)$ , comprises two components: the convergence rate in the Hellinger distance and the standard deviation of the true noise sequence. It is noteworthy that the first expression is influenced by the variance of noise by the factor $\alpha$ . When $\alpha$ is very small, indicating that the data $Y_{j}$ lies very close to the manifold, the second expression $n^{-\alpha}$ in the overall rate dominates. Intuitively, this phenomenon arises from the underlying structural challenges in related manifold estimation problems with noisy data, as discussed by Genovese et al. (2012). To address this issue, we propose a data perturbation strategy by transforming the data $\{(Y_j,X_j)\}_{j = 1}^n$ into $\{(\widetilde{Y}_j,X_j)\}_{j = 1}^n$ , where $\widetilde{Y}_j = Y_j + \epsilon_j$ and $\epsilon_{j}\sim \mathsf{N}\left(0_{D},n^{-\beta_{*} / (\beta_{*} + t_{*})}I_{D}\right)$ . The resulting estimation error bound is summarized below, whose proof is provided in Appendix I. + +Corollary 2. Suppose that Assumption 1, 2, and 3 hold, and $\sigma_{*} \in [\sigma_{\min}, \sigma_{\max}]$ with $\sigma_{*} = n^{-\alpha}$ and $\sigma_{\min} = n^{-\gamma}$ for some $0 \leq \alpha \leq \gamma$ . Then for each of the network architecture classes (sparse and fully connected) with the network + +parameters specified in Corollary 1, the sieve MLE $\widehat{p}_{per}$ and $\widehat{Q}_{per}$ based on the perturbed data $\{(\widetilde{Y}_j,X_j)\}_{j = 1}^n$ satisfies + +$$ +P _ {*} \left[ W _ {1} \left(\widehat {Q} _ {p e r}, Q _ {*}\right) \geq \left(\varepsilon_ {n} ^ {*} + \sigma_ {*} \sqrt {\log \left(\left(\varepsilon_ {n} ^ {*}\right) ^ {- 1}\right)}\right) \right] \lesssim 5 e ^ {- C _ {1} n \varepsilon_ {n} ^ {* 2}} + \frac {C _ {2}}{n} +$$ + +where $\varepsilon_{n}^{*}$ can be chosen such that + +$$ +\varepsilon_ {n} ^ {*} + \sigma_ {*} \sqrt {\log \left(\left(\varepsilon_ {n} ^ {*}\right) ^ {- 1}\right)} \times \left\{ \begin{array}{l l} n ^ {- \frac {\beta_ {*} - t _ {*} \alpha}{2 \beta_ {*} + t _ {*}}} \log^ {2} (n), & \text {i f} \alpha < \beta_ {*} / \{2 \left(\beta_ {*} + t _ {*}\right) \}, \\ n ^ {- \frac {\beta_ {*}}{2 \left(\beta_ {*} + t _ {*}\right)}} \log^ {2} (n), & \text {o t h e r w i s e .} \end{array} \right. \tag {13} +$$ + +# 2.4. Characterization of the learnable distribution class + +Section 2.2 focuses on the true generator $G_{*}$ within the class of functions with composite structures. In this subsection, we show that such a conditional distribution class achieved by the push-forward map $G_{*}$ is broad and includes many existing distribution classes for $Q_{*}$ as special cases. + +# 2.4.1. SMOOTH CONDITIONAL DENSITY + +For $\beta > 0$ , let $\mathcal{H}^{\beta}(D, M)$ be the class of all $\beta$ -Hölder functions $f: D \subset \mathbb{R}^{\mathfrak{o}} \to \mathbb{R}$ with $\beta$ -Hölder norm bounded by $M > 0$ . Let $\mathcal{H}^{\beta}(D) = \cup_{M > 0} \mathcal{H}^{\beta}(D, M)$ . See Appendix B for their formal definitions. + +Lemma 2. Suppose that (i) $\mathcal{Z} \times \mathcal{X}$ and $\mathcal{Y}$ are uniformly convex and (ii) $p_Z \in \mathcal{H}^{\beta_Z}(\mathcal{Z})$ , $\mu_X^* \in \mathcal{H}^{\beta_X}(\mathcal{X})$ and $q_* \in \mathcal{H}^{\beta_Q}(\mathcal{Y})$ for some $\beta_Z, \beta_X, \beta_Q > 0$ and are bounded above and below. Then, there exists a map $g(\cdot, \cdot): \mathcal{Z} \times \mathcal{X} \to \mathcal{Y}$ such that $Q_*(\cdot|\cdot) = Q_g$ and $g \in \mathcal{H}^{\beta_{\min} + 1}(\mathcal{Z} \times \mathcal{X})$ , where $\beta_{\min} = \min\{\beta_Z, \beta_X, \beta_Q\}$ . + +Lemma 2 establishes that the learnable distribution class includes Hölder-smooth functions with smoothness parameter $\beta_{\mathrm{min}}$ and intrinsic dimension $\mathfrak{d}$ . As a result, following Corollary 1, the convergence rate for density estimation is given by $\varepsilon_n^* \asymp n^{-(\beta_{\mathrm{min}} + 1 - \mathfrak{d}\alpha) / (2\beta_{\mathrm{min}} + 2 + \mathfrak{d})}$ . A push-forward map is a transport map between two distributions. The well-established regularity theory of transport map in optimal transport is directly applicable here [see Villani et al. (2009) and Villani (2021)]. The proof of Lemma 2 is based on Theorem 12.50 of (Villani et al., 2009) and Caffarelli (1996), which establishes the regularity of this transport map and its existence follows from Brenier (1991). When $p_Z$ is selected as a well-behaved parametric distribution, the regularity of the transport map is determined by the smoothness of both $\mu_X^*$ and $Q_*$ . For a more detailed discussion on this, please refer to Appendix C. + +# 2.4.2. A BROADER CONDITIONAL DISTRIBUTION CLASS WITH SMOOTHNESS DISPARITY + +In Appendix L, we present a novel approximation result for the function class exhibiting smoothness disparity in Theorem 5. This new result facilitates the study of theoretical properties of estimators when the generator $G_{*} \in$ + +$\mathcal{H}_{\mathfrak{o},\mathfrak{p}}^{\beta z,\beta x}(\mathcal{Z},\mathcal{X},K)$ . Note that such a function class defined in (16) in Appendix L is much broader compared to the smoothness class in Section 2.4.1 as $Z$ and $X$ do not have to be jointly smooth and it allows for smoothness disparity among them. The subsequent Theorem 3 combines our approximation result with (11) and enables us to specialize Theorem 1 to this class (see Appendix J for the proof). + +Theorem 3. Let $G_{*}\in \mathcal{H}_{\mathfrak{o},\mathfrak{p}}^{\beta_Z,\beta_X}(\mathcal{Z},\mathcal{X},K)$ . Suppose that Assumption 1 holds and $\sigma_{*}\in [\sigma_{\mathrm{min}},\sigma_{\mathrm{max}}]$ with $\sigma_{\mathrm{min}}\leq 1$ and $\sigma_{\mathrm{max}} < \infty$ . Moreover, we assume $\sigma_{*}\asymp n^{-\alpha}$ , and $\sigma_{\mathrm{min}} = n^{-\gamma}$ for some $0\leq \alpha \leq \gamma \leq (\beta_Z^{-1}\mathfrak{d} + \beta_X^{-1}\mathfrak{p})^{-1}$ . Then, for every $\delta_{\mathrm{approx}}\in [0,1]$ , we have: Let $\mathcal{F}_s = \mathcal{F}_s(L,r,s,1,K)$ with $L\succ \log \delta_{\mathrm{approx}}^{-1}$ , $r\succ \delta_{\mathrm{approx}}^{-(\beta_Z^{-1}\mathfrak{d} + \beta_X^{-1}\mathfrak{p})}$ , $s\succ \delta_{\mathrm{approx}}^{-(\beta_Z^{-1}\mathfrak{d} + \beta_X^{-1}\mathfrak{p})}\log \delta_{\mathrm{approx}}^{-1}$ . Then the sieve MLE $\widehat{p_s}$ satisfies (7) with the rate outlined in (8) with $\xi = \delta_{\mathrm{approx}}^{-(\beta_Z^{-1}\mathfrak{d} + \beta_X^{-1}\mathfrak{p})}\log^2\delta_{\mathrm{approx}}^{-1}$ and $A = \log^2\delta_{\mathrm{approx}}^{-1}$ , provided that $\eta_n\leq n\varepsilon_n^{*2} / 6$ . In particular, choosing $\delta_{\mathrm{approx}}:= (\sigma_{*}^{2} / n)^{1 / (2 + \beta_{Z}^{-1}\mathfrak{d} + \beta_{X}^{-1}\mathfrak{p})}\leq 1$ minimizes $\varepsilon_n^*\asymp \sqrt{\xi\left\{A + \log\left(n / \sigma_{\mathrm{min}}\right)\right\} / n}\vee \delta_{\mathrm{approx}} / \sigma_*$ , and gives + +$$ +\varepsilon_ {n} ^ {*} \asymp n ^ {- \frac {1 - \alpha \left(\beta_ {Z} ^ {- 1} \mathfrak {d} + \beta_ {X} ^ {- 1} \mathfrak {p}\right)}{2 + \beta_ {Z} ^ {- 1} \mathfrak {d} + \beta_ {X} ^ {- 1} \mathfrak {p}}} \log^ {2} (n). \tag {14} +$$ + +The proof of Theorem 3 is provided in Appendix J. In the special case when $\alpha = 0$ and $\mathfrak{d} = D$ , our convergence rate in (14) recovers the minimax optimal rate for conditional density estimation based on kernel smoothing, as established in (Li et al., 2022). + +# 2.4.3. CONDITIONAL DISTRIBUTION ON MANIFOLDS + +In this part, we extend Lemma 2 and provide the existence of the generator when the conditional distribution is supported on a compact manifold with dimension $\mathsf{d}_* \leq D$ . Due to space constraints, we provide only a sketched proof here; the detailed proof can be found in Appendix D. Specifically, we first present arguments for the existence of the generator when $\mathcal{V}$ is covered by a single chart. We then extend this to the multiple chart case using the technique of partition of unity. + +In the simpler case when there exists a single $(\mathcal{V},\varphi)$ covering $\mathcal{V}$ , where $\varphi : \mathcal{B}_1(0_{\mathrm{d}_*}) \to \mathcal{V}$ is a homeomorphism, we assume $\varphi \in \mathcal{H}^{\beta_{\min} + 1}$ . In this case, we use the change of variable formula to transfer the measure on $\mathcal{B}_1(0_{\mathrm{d}_*})$ (unit ball in $\mathbb{R}^{\mathrm{d}_*}$ ) from $\mathcal{V}$ . Following Lemma 2, we can find a transport map $g \in \mathcal{H}^{\beta_{\min}}$ mapping from $\mathcal{Z} \times \mathcal{X}$ to $\mathcal{B}_1(0_{\mathrm{d}_*})$ . The map $g \circ \varphi$ then serves as our generator. + +In the general case where the compact manifold $\mathcal{V}$ needs to be covered by multiple charts, demonstrating the existence of a transport or push-forward map is challenging because $\mathcal{V}$ is not uniformly convex. Suppose that $\{(U_k,\varphi_k)\}_{k = 1}^K$ forms a cover of $\mathcal{V}$ . Due to the compactness of $\mathcal{V}$ , the + +number of charts $K$ is finite. Analogous to the single chart scenario, we first construct $g_{k}\circ \varphi_{k}$ to transport the measure on each chart. We then patch these local transport maps together to construct a global transport map; see Appendix D for full details. As a result, following Corollary 1, the convergence rate for density estimation shall be given by $\varepsilon_n^*\asymp n^{-(\beta_{\mathrm{min}} - \mathfrak{d}\alpha) / (2\beta_{\mathrm{min}} + \mathfrak{d})}$ . + +# 3. Numerical Results + +In this section, we present numerical experiments to validate and complement our theoretical findings using two synthetic dataset examples. These experiments cover a range of scenarios, including full-dimensional cases as well as benchmark examples involving manifold-based data. Additionally, we provide a real data example to further enrich our experimentation and validation process. It is worth noting that, although not significant, the computational cost of fitting a conditional generative model is higher compared to fitting an unconditional one, as the input dimension of the deep neural network (DNN) is $\mathfrak{p} + \mathfrak{d}$ rather than just $\mathfrak{d}$ . + +Learning algorithm to compute sieve MLE. For the computational algorithm, we adopt a common conditional variational auto-encoder (VAE) architecture to maximize the following log-likelihood term: $\sum_{j=1}^{n} \mathcal{L}_{\mathrm{VAE}}(g, \sigma, \phi; Y_j, X_j)$ , where + +$$ +\mathcal {L} _ {\mathrm {V A E}} (g, \sigma , \phi ; y, x) = \log \left(\frac {p _ {g , \sigma} (y , x , z)}{q _ {\phi} (Z | y , x)}\right). +$$ + +The variational distribution $q_{\phi}(Z|y,x)$ is chosen as the standard normal family $\mathsf{N}(\mu_{\phi}(y,x),\Sigma_{\phi}(y,x))$ + +We examine two classes of datasets: (i) full-dimensional response and (ii) response residing on a low-dimensional manifold. The first highlights the generality of our proposed approach, while the second underscores its efficiency in terms of the Wasserstein metric and validates the small noise perturbation strategy outlined in Corollary 2. + +Simulation from full dimension distribution. We use the following models for data generation. + +$\mathbf{FD1}:\quad Y = \mathbb{I}_{\{U < 0.5\}}\mathsf{N}\left(-X,0.25^{2}\right) +$ $\mathbb{I}_{\{U > 0.5\}}\mathsf{N}\left(X,0.25^2\right);U\sim \mathrm{Unif}(0,1),X\sim \mathsf{N}(3,1).$ +- FD2: $Y = X_1^2 + e^{(X_2 + X_3 / 3)} + \sin(X_4 + X_5) + \varepsilon$ ; $\{X_j\}_{j=1}^5 \stackrel{i.i.d.}{\sim} \mathsf{N}(0,1), \varepsilon \sim \mathsf{N}(0,1)$ . +- FD3: $Y = X_1^2 + e^{(X_2 + X_3 / 3)} + X_4 - X_5 + 0.5$ ( $1 + X_2^2 + X_5^2$ ) × $\varepsilon$ ; $\{X_j\}_{j=1}^5 \stackrel{i.i.d}{\sim} \mathsf{N}(0,1), \varepsilon \sim \mathsf{N}(0,1)$ . + +These are examples of a mixture model, an additive noise model, and a multiplicative noise model, respectively. The + +neural architecture for both the encoder and decoder consists of two deep layers, i.e., $L = 2$ . The hyperparameters are as follows: $r_{\mathrm{enc}} = (\mathfrak{p} + 1,10,10)$ for $\mu_{\phi}$ and $\Sigma_{\phi}$ , and $r_{\mathrm{dec}} = (10 + \mathfrak{p},10,1)$ for $g$ . The sample size used for simulation is 5000, with a training-to-testing ratio of $4:1$ . We employ a batch size of 64 with a learning rate of $10^{-3}$ . + +We compare the sieve MLE with CKDE (Hall et al., 2004) and FlexCode proposed by Izbicki & Lee (2017). To evaluate their performance, we compute the mean squared error (MSE) for both the mean and the standard deviation. We use Monte Carlo approximation to compute the mean and standard deviation for the sieve MLE, and numerical integration for CKDE and Flexcode. This evaluation strategy resembles that implemented by Zhou et al. (2022). Table 2 summarizes the findings. + +Table 1. MSE for the estimated conditional mean and the standard deviation. + +
Sieve MLECKDEFlexCode
FD1MEAN0.0379 ± 0.01701.0053 ± 0.10041.1660 ± 0.1076
SD0.0280 ± 0.00450.9887 ± 0.03471.2000 ± 0.0126
FD2MEAN0.1943 ± 0.04270.2640 ± 0.05150.3954 ± 0.0571
SD0.2843 ± 0.00930.2853 ± 0.02135.8278 ± 0.1607
FD3MEAN0.2337 ± 0.04530.2967 ± 0.05371.3419 ± 0.1087
SD1.6394 ± 0.08610.6334 ± 0.046011.4898 ± 0.1559
+ +Note that the sieve MLE outperforms all other methods in all scenarios except for the MSE(SD) for the FD3 dataset. However, for the FD3 dataset, we found that as the training sample size increases further, the MSE(SD) of the sieve MLE achieves performance increasingly comparable to CKDE. + +Simulation from distributions on manifolds. We consider two examples of manifolds with an intrinsic dimension $\mathfrak{d} = 1$ , while the ambient dimension is $D = 2$ . + +- $\mathbf{M1}: Y = G_{*}(Z, U) + \varepsilon$ , $G_{*} = (G_{*}^{(1)}, G_{*}^{(2)})$ , +[ G_{*}^{(1)} = \mathbb{I}_{\{U < 0.5\}}(1 - \cos(Z)) + \mathbb{I}_{\{U > 0.5\}}\cos(Z), ] +[ G_{*}^{(2)} = \mathbb{I}_{\{U < 0.5\}}(0.5 - \sin(Z)) + \mathbb{I}_{\{U > 0.5\}}\sin(Z); Z \sim \mathrm{Unif}(0, \pi), U \sim \mathrm{Unif}(0, 1). ] +- M2: $Y = G_{*}(Z,U) + \varepsilon$ , $G_{*} = \left(G_{*}^{(1)},G_{*}^{(2)}\right)$ , $G_{*}^{(1)} = \mathbb{I}_{\{U < 0.5\}}\cos (Z) + \mathbb{I}_{\{U > 0.5\}}2\cos (Z)$ , $G_{*}^{(2)} = \mathbb{I}_{\{U < 0.5\}}0.5\sin (Z) + \mathbb{I}_{\{U > 0.5\}}\sin (Z)$ ; $Z \sim \mathrm{Unif}(0,2\pi)$ , $U \sim \mathrm{Unif}(0,1)$ . + +The manifold $M_1$ consists of two moons. The manifold $M_2$ comprises ellipses, with conditions distinguishing the inner and outer confocal ellipses. The noise sequence follows a two-dimensional centered Gaussian distribution, $\varepsilon \sim \mathsf{N}(0_2,\sigma_*^2 I_2)$ . We investigated this setup across various noise variances $\sigma_{*}^{2}$ . Our neural architecture employed $r_{\mathrm{enc}} = (\mathfrak{p} + 2,100,100,2)$ for $\mu_{\phi}$ and $\Sigma_{\phi}$ , and + +$r_{\mathrm{dec}} = (2 + \mathfrak{p},100,100,2)$ for $g$ . We utilized a sample size of 5000 for simulation, with a training-to-testing ratio of $4:1$ . A batch size of 100 was employed, with a learning rate of $10^{-3}$ . + +![](images/8b45e6cecbc2241938ec6a3d0649fff5ae0ae95a359dd57c09e17cab355383da.jpg) +Figure 1. Generated samples from manifold $M_{1}$ and $M_{2}$ are displayed. + +![](images/d76824829a1c873bccbc5a17ab6402a5e709747656a26e1e25b83c47b3494fbf.jpg) + +![](images/56736d7af3f3ade254bb1a2372d47c0afc17bf8465a6215f7f270da526b7390d.jpg) +Figure 2. Box plots for the empirical Wasserstein distance at different noise levels $\sigma_{*}$ . + +![](images/f04834f721c4c0addc7b6f41a7cecc348a2e0254791df7e5264b4d3ddb2a9920.jpg) + +We computed the empirical $W_{1}$ distance using the algorithm proposed by Cuturi (2013) to evaluate the performance. Figure 2 presents the boxplots of $W_{1}$ between the true and learned distribution for $M_{1}$ and $M_{2}$ across 20 repetitions. The left panel highlights the following general behaviors: + +- When $\alpha$ is small and close to zero, the noise variance is large, making estimation challenging due to the singularity of the true data distribution. +- When $\alpha$ is large, the noise variance is small, and the perturbed data facilitates efficient estimation. + +This observed pattern, as emphasized in Corollary 2, closely aligns with the results achieved in (13). An additional numerical experiment on real data has been performed and can be found in Appendix A.1. + +# 4. Discussion + +We investigated statistical properties of a likelihood-based conditional deep generative model for distribution regression in a scenario where the response variable is situated in + +a high-dimensional ambient space but is centered around a potentially lower-dimensional intrinsic structure. Our analysis established favorable rates in both the Hellinger and Wasserstein metrics which are dependent on only the intrinsic dimension of the data. Our theoretical findings show that the conditional deep generative models can circumvent the curse of dimensionality for high-dimensional distribution regression. To the best of our knowledge, our work is the first of its kind. + +Given the novelty of emerging statistical methodologies with intricate structural considerations in the study of deep generative models, there exist numerous paths for future exploration. Among these potential directions, we are particularly interested in investigating controllable generation via penalized optimization methods, studying statistical properties of deep generative models trained via matching flows, as well as delving into the hypothesis testing problem within the framework of deep generative models, among others. Another interesting direction is to explore residual neural network structure for modeling time series of distributions with interesting temporal dependence structures. + +# Impact Statement + +This paper presents work whose goal is to advance the field of machine learning theory by understanding the statistical foundations of deep neural network models. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# References + +Aamari, E. and Levrard, C. Nonasymptotic rates for manifold, tangent space and curvature estimation. The Annals of Statistics, 47(1):177 - 204, 2019. doi: 10.1214/18-AOS1685. URL https://doi.org/10.1214/18-AOS1685. +Altekrüger, F., Hagemann, P., and Steidl, G. Conditional generative models are provably robust: Pointwise guarantees for bayesian inverse problems. arXiv preprint arXiv:2303.15845, 2023. +Ando, T. Bayesian model selection and statistical modeling. CRC Press, 2010. +Arjovsky, M., Chintala, S., and Bottou, L. Wasserstein generative adversarial networks. In International conference on machine learning, pp. 214-223. PMLR, 2017. +Bengio, Y., Courville, A., and Vincent, P. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8): 1798-1828, 2013. + +Bhattacharya, P. K. and Gangopadhyay, A. K. Kernel and nearest-neighbor estimation of a conditional quantile. The Annals of Statistics, pp. 1400–1415, 1990. +Bilodeau, B., Foster, D. J., and Roy, D. M. Minimax rates for conditional density estimation via empirical entropy. The Annals of Statistics, 51(2):762-790, 2023. +Bott, A.-K. and Kohler, M. Nonparametric estimation of a conditional density. Annals of the Institute of Statistical Mathematics, 69(1):189-214, 2017. +Brehmer, J. and Cranmer, K. Flows for simultaneous manifold learning and density estimation. Advances in neural information processing systems, 33:442-453, 2020. +Brenier, Y. Polar factorization and monotone rearrangement of vector-valued functions. Communications on pure and applied mathematics, 44(4):375-417, 1991. +Burda, Y., Grosse, R., and Salakhutdinov, R. Importance weighted autoencoders. arXiv preprint arXiv:1509.00519, 2015. +Caffarelli, L. A. Boundary regularity of maps with convex potentials--ii. Annals of mathematics, 144(3):453-496, 1996. +Carreira-Perpinan, M. A. A review of dimension reduction techniques. Department of Computer Science. University of Sheffield. Tech. Rep. CS-96-09, 9:1-69, 1997. +Chae, M., Kim, D., Kim, Y., and Lin, L. A likelihood approach to nonparametric estimation of a singular distribution using deep generative models. Journal of Machine Learning Research, 24(77):1-42, 2023. URL http://jmlr.org/papers/v24/21-1099.html. +Chemseddine, J., Hagemann, P., Steidl, G., and Wald, C. Conditional Wasserstein distances with applications in bayesian ot flow matching. arXiv preprint arXiv:2403.18705, 2024. +Claeskens, G. and Hjort, N. L. Model selection and model averaging. Cambridge books, 2008. +Cuturei, M. Sinkhorn distances: Lightspeed computation of optimal transport. Advances in neural information processing systems, 26, 2013. +Efromovich, S. Conditional density estimation in a regression setting. The Annals of Statistics, 35(6):2504 - 2535, 2007. doi: 10.1214/00905360700000253. URL https://doi.org/10.1214/00905360700000253. +Fan, J. and Yim, T. H. A crossvalidation method for estimating conditional densities. Biometrika, 91(4):819-834, 2004. + +Gao, Z. and Hastie, T. Lincde: conditional density estimation via lindsey's method. Journal of machine learning research, 23(52):1-55, 2022. +Geman, S. and Hwang, C.-R. Nonparametric maximum likelihood estimation by the method of sieves. The annals of Statistics, pp. 401-414, 1982. +Genovese, C. R., Perone-Pacifico, M., Verdinelli, I., and Wasserman, L. Manifold estimation and singular deconvolution under Hausdorff loss. The Annals of Statistics, 40(2):941 - 963, 2012. doi: 10.1214/12-AOS994. URL https://doi.org/10.1214/12-AOS994. +Ghosal, S. and van der Vaart, A. Fundamentals of Nonparametric Bayesian Inference. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 2017. doi: 10.1017/9781139029834. +Gibbs, A. L. and Su, F. E. On choosing and bounding probability metrics. International statistical review, 70 (3):419-435, 2002. +Gneiting, T. and Katzfuss, M. Probabilistic forecasting. Annual Review of Statistics and Its Application, 1:125-151, 2014. +Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. Generative adversarial nets. Advances in neural information processing systems, 27, 2014. +Hall, P. and Yao, Q. Approximating conditional distribution functions using dimension reduction. The Annals of Statistics, 33(3):1404 - 1421, 2005. doi: 10.1214/009053604000001282. URL https://doi.org/10.1214/009053604000001282. +Hall, P., Racine, J., and Li, Q. Cross-validation and the estimation of conditional probability densities. Journal of the American Statistical Association, 99(468):1015-1026, 2004. +Han, X., Zheng, H., and Zhou, M. Card: Classification and regression diffusion models. Advances in Neural Information Processing Systems, 35:18100-18115, 2022. +Hyvärinen, A. and Dayan, P. Estimation of non-normalized statistical models by score matching. Journal of Machine Learning Research, 6(4), 2005. +Izbicki, R. and Lee, A. B. Nonparametric conditional density estimation in a high-dimensional regression setting. Journal of Computational and Graphical Statistics, 25 (4):1297-1316, 2016. +Izbicki, R. and Lee, A. B. Converting high-dimensional regression to high-dimensional conditional density estimation. Electronic Journal of Statistics, 11(2):2800 - + +2831, 2017. doi: 10.1214/17-EJS1302. URL https://doi.org/10.1214/17-EJS1302. +Izbicki, R., Lee, A. B., and Pospisil, T. Nnkcde: Nearest neighbor kernel conditional density estimation. Astrophysics Source Code Library, pp. ascl-2005, 2020. +Jeon, J. and Taylor, J. W. Using conditional kernel density estimation for wind power density forecasting. Journal of the American Statistical Association, 107(497):66-79, 2012. +Jordan, M. I. Learning in graphical models. MIT press, 1999. +Kallenberg, O. Foundations of modern probability, volume 2. Springer, 1997. +Kingma, D. P. and Welling, M. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. +Kohler, M. and Langer, S. Discussion of: "Nonparametric regression using deep neural networks with ReLU activation function". The Annals of Statistics, 48(4): 1906 - 1910, 2020. doi: 10.1214/19-AOS1912. URL https://doi.org/10.1214/19-AOS1912. +Kohler, M. and Langer, S. On the rate of convergence of fully connected deep neural network regression estimates. The Annals of Statistics, 49(4):2231 - 2249, 2021. doi: 10.1214/20-AOS2034. URL https://doi.org/10. 1214/20-AOS2034. +Kohler, M., Langer, S., and Reif, U. Estimation of a regression function on a manifold by fully connected deep neural networks. Journal of Statistical Planning and Inference, 222:160-181, 2023. +Koller, D. and Friedman, N. Probabilistic graphical models: principles and techniques. MIT press, 2009. +Krishnaswamy, S., Spitzer, M. H., Mingueneau, M., Bendall, S. C., Litvin, O., Stone, E., Pe'er, D., and Nolan, G. P. Conditional density-based analysis of t cell signaling in single-cell data. Science, 346(6213):1250689, 2014. +Lee, J. M. Smooth manifolds. Springer, 2012. +Li, M., Neykov, M., and Balakrishnan, S. Minimax optimal conditional density estimation under total variation smoothness. Electronic Journal of Statistics, 16(2):3937-3972, 2022. +Lipman, Y., Chen, R. T., Ben-Hamu, H., Nickel, M., and Le, M. Flow matching for generative modeling. arXiv preprint arXiv:2210.02747, 2022. +Liu, S., Zhou, X., Jiao, Y., and Huang, J. Wasserstein generative learning of conditional distribution. arXiv preprint arXiv:2112.10039, 2021. + +Mroueh, Y., Li, C.-L., Sercu, T., Raj, A., and Cheng, Y. Sobolev gan. arXiv preprint arXiv:1711.04894, 2017. +Nichol, A. Q. and Dhariwal, P. Improved denoising diffusion probabilistic models. In International conference on machine learning, pp. 8162-8171. PMLR, 2021. +Norets, A. and Pati, D. Adaptive bayesian estimation of conditional densities. *Econometric Theory*, 33(4):980-1012, 2017. +Ohn, I. and Kim, Y. Smooth function approximation by deep neural networks with general activation functions. Entropy, 21(7):627, 2019. +Pearl, J. Causal inference in statistics: An overview. Statistics Surveys, 3(none):96 - 146, 2009. doi: 10.1214/09-SS057. URL https://doi.org/10.1214/09-SS057. +Pidstrigach, J. Score-based generative models detect manifolds. Advances in Neural Information Processing Systems, 35:35852-35865, 2022. +Pospisil, T. and Lee, A. B. Rfcde: Random forests for conditional density estimation. arXiv preprint arXiv:1804.05753, 2018. +Rezende, D. J., Mohamed, S., and Wierstra, D. Stochastic backpropagation and approximate inference in deep generative models. In International conference on machine learning, pp. 1278-1286. PMLR, 2014. +Schmidt-Hieber, J. Deep relu network approximation of functions on a manifold. arXiv preprint arXiv:1908.00695, 2019. +Schmidt-Hieber, J. Nonparametric regression using deep neural networks with ReLU activation function. The Annals of Statistics, 48(4):1875 - 1897, 2020. doi: 10.1214/19-AOS1875. URL https://doi.org/10.1214/19-AOS1875. +Simar, L. and Wilson, P. W. Statistical approaches for nonparametric frontier models: a guided tour. International Statistical Review, 83(1):77-110, 2015. +Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N., and Ganguli, S. Deep unsupervised learning using nonequilibrium thermodynamics. In International conference on machine learning, pp. 2256-2265. PMLR, 2015. +Song, Y., Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Ermon, S., and Poole, B. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456, 2020. + +Song, Y., Durkan, C., Murray, I., and Ermon, S. Maximum likelihood training of score-based diffusion models. Advances in neural information processing systems, 34: 1415-1428, 2021. +Spirtes, P. Introduction to causal inference. Journal of Machine Learning Research, 11(5), 2010. +Stanczuk, J. P., Batzolis, G., Deveney, T., and Schonlieb, C.-B. Diffusion models encode the intrinsic dimension of data manifolds. In International conference on machine learning. PMLR, 2024. +Sugiyama, M., Takeuchi, I., Suzuki, T., Kanamori, T., Hachiya, H., and Okanohara, D. Least-squares conditional density estimation. IEICE Transactions on Information and Systems, 93(3):583-594, 2010. +Tang, R. and Yang, Y. Minimax rate of distribution estimation on unknown submanifolds under adversarial losses. The Annals of Statistics, 51(3):1282 - 1308, 2023. doi: 10.1214/23-AOS2291. URL https://doi.org/10.1214/23-AOS2291. +Van Der Maaten, L., Postma, E., Van den Herik, J., et al. Dimensionality reduction: a comparative. *J Mach Learn Res*, 10(66-71), 2009. +Villani, C. Topics in optimal transportation, volume 58. American Mathematical Soc., 2021. +Villani, C. et al. Optimal transport: old and new, volume 338. Springer, 2009. +Vincent, P. A connection between score matching and denoising autoencoders. Neural computation, 23(7):1661-1674, 2011. +Wong, W. H. and Shen, X. Probability Inequalities for Likelihood Ratios and Convergence Rates of Sieve MLES. The Annals of Statistics, 23(2):339 - 362, 1995. doi: 10.1214/aos/1176324524. URL https://doi.org/10.1214/aos/1176324524. +Yarotsky, D. Error bounds for approximations with deep ReLU networks. Neural Networks, 94:103-114, 2017. +Zhao, D., Dalmasso, N., Izbicki, R., and Lee, A. B. Diagnostics for conditional density models and bayesian inference algorithms. In Uncertainty in Artificial Intelligence, pp. 1830-1840. PMLR, 2021. +Zhou, X., Jiao, Y., Liu, J., and Huang, J. A deep generative approach to conditional sampling. Journal of the American Statistical Association, pp. 1-12, 2022. + +# Supplementary Materials for “A Likelihood Based Approach to Distribution Regression Using Conditional Deep Generative Models” + +# A. Additional numerical results + +# A.1. Numerical result for real data + +We utilized the widely used MNIST dataset for two purposes: to demonstrate the generalizability of our approach to a benchmark image dataset where the intrinsic dimension $\mathfrak{d}$ is much lesser than the ambient dimension $D = 784$ and to underscore the effectiveness of sparse networks as outlined in Lemma 4.1 and Corollary 1.1. + +For the fully connected architecture, we set $r_{\mathrm{enc}} = (10 + 784,512,2)$ for $\mu_{\phi}$ and $\Sigma_{\phi}$ , and $r_{\mathrm{dec}} = (10 + 2,512,784)$ for $g$ . For the sparse architecture, we use $r_{\mathrm{enc}} = (10 + 784,608,432,256,2)$ for $\mu_{\phi}$ and $\Sigma_{\phi}$ , and $r_{\mathrm{dec}} = (10 + 2,256,432,608,784)$ for $g$ . The input dimension of 10 for both the encoder and decoder corresponds to the one-hot encoding of the labels. We employ a batch size of 64 with a learning rate of $10^{-3}$ . + +Figure 3 presents a visual comparison between real and generated images, organized according to their respective labels. The real images were randomly sampled from the training set along with their corresponding labels, while the generated images were produced using these labels (conditions) and random seeds. + +![](images/635203697383b1cf93558d2c23902769706542b184bc6941058b3b27c5bf74b5.jpg) +Figure 3. MNIST images: real images (left panel), generated images with sparse architecture (central panel), and generated images with fully connected architecture (right panel) + +This MNIST example highlights a case where the intrinsic dimension is significantly smaller than the ambient data dimension. This example serves to validate the proposed methodology in high-dimensional settings. + +To quantify sample quality, we computed the Wasserstein-1 distance $(W_{1})$ between generated and test images. For each digit, we averaged $W_{1}$ distances over 50 samples, reporting results as mean $\pm$ standard deviation. For reference, the baseline $W_{1}$ distance between two test images is $2.0219 \pm 0.7450$ . Table 2 summarizes these distances across different levels of Gaussian noise added during training. + +Table 2. Mean W1 distance (± SD) between generated and test MNIST images under varying training-data noise. + +
NoiseSparsely connectedFully connected
01.9555 ± 0.71821.8859 ± 0.7355
0.0051.9478 ± 0.73291.8663 ± 0.6251
0.011.9503 ± 0.72911.9598 ± 0.6867
0.022.0699 ± 0.69372.0616 ± 0.7410
0.042.2199 ± 0.67352.2117 ± 0.6627
0.062.3487 ± 0.65762.3172 ± 0.6267
0.082.4623 ± 0.62452.4076 ± 0.6308
0.12.5734 ± 0.64922.5002 ± 0.6337
0.33.4931 ± 0.70123.4943 ± 0.7164
0.54.0880 ± 0.75184.0995 ± 0.7633
+ +As shown in Table 2, at zero noise both architectures achieve W1 distances slightly below the baseline, indicating high-fidelity sample generation. As noise increases, W1 distances grow steadily, reflecting degradation in sample quality. Both network types follow similar trends, underlining robustness to architectural choice; minor deviations suggest subtle differences in sensitivity to noise. These empirical observations accord with our theoretical predictions on the large-sample properties of manifold-supported data. + +# A.2. Additional numerical results for distributions on manifold + +We extended our analysis to examine how the empirical $W_{1}$ distance varies with sample size, while keeping the noise level fixed at $\sigma_{*} = 0.01$ . Below is a summary table showing the median empirical Wasserstein distances for different sample sizes. The experimental setup remains consistent with the manifold case described in the Section 3. + +Table 3. Empirical Wasserstein distance ${W}_{1}$ (median) for different sample sizes + +
Sample SizeTwo Moon (σ* = 0.01)Ellipse (σ* = 0.01)
40000.2510.295
60000.2320.285
70000.2160.271
80000.2140.253
90000.2120.259
100000.1960.251
+ +While extracting exact rates through simulation can be challenging, the results in the table validate the large-sample properties for manifolds. These empirical findings align well with the theoretical expectations, further confirming the consistency and convergence trends of our framework. + +# B. Notation + +We denote $a \vee b$ and $a \wedge b$ as the maximum and minimum of two real numbers $a$ and $b$ , respectively. The notation $\lceil a \rceil$ represents the smallest integer greater than or equal to $a$ . The inequality $a \lesssim b$ indicates that $a$ is less than or equal to $b$ up to a multiplicative constant. When we write $a \lesssim_{\log} b$ , it means that $a$ is less than or equal to $b$ up to a logarithmic factor, specifically $\log(n)$ . We denote $a \asymp b$ when both $a \lesssim b$ and $b \lesssim a$ hold. For vector norms, $|\cdot|_{\mathfrak{p}}$ represents the $\ell^{\mathfrak{p}}$ norm, while $\| \cdot \|_{\mathfrak{p}}$ denotes the $L^{\mathfrak{p}}$ -norm of a function for $1 \leq \mathfrak{p} \leq \infty$ . Lastly, $B_{\epsilon}(u)$ signifies the Euclidean open ball with radius $\epsilon$ centered at $u$ . + +We use the multi-index notation through the main paper and the appendix. Denote $\mathbb{N}$ as the set of natural numbers and $\mathbb{N}_0$ as $\mathbb{N} \cup \{0\}$ . For a vector $\mathbf{x} \in \mathbb{R}^r$ , we denote the components as $\mathbf{x} = (x^{(1)}, \ldots, x^{(r)})$ . Given a function $f: D \subset \mathbb{R}^r \to \mathbb{R}$ , the operator is defined as $\partial^\alpha := \partial^{\alpha^{(1)}} \ldots \partial^{\alpha^{(r)}}$ with $\alpha \in \mathbb{N}_0^r$ , where $\partial^{\alpha^{(j)}} f := \partial^{\alpha^{(j)}} f(\mathbf{x}) / \partial x^{(j)}$ . For $\alpha \in \mathbb{N}_0^r$ , the expression $|\alpha| = \sum_{j=1}^{r} |\alpha^{(j)}|$ . Given a function $f(\cdot, \cdot): D \times D_t \subset \mathbb{R}^r \times \mathbb{R}^{r'} \to \mathbb{R}$ , we denote the operator + +$\partial^{\alpha + \alpha_{t}} := \partial^{\alpha^{(1)}} \ldots \partial^{\alpha^{(r)}} \partial^{\alpha_{t}^{(1)}} \ldots \partial^{\alpha_{t}^{(r_{t})}}$ , with $\alpha \in \mathbb{N}_0^r$ and $\alpha_{t} \in \mathbb{N}_{0}^{r}$ , where $\partial^{\alpha^{(j)}} f(\mathbf{x}, \mathbf{y}) = \partial^{\alpha^{(j)}} f(\mathbf{x}, \mathbf{y}) / \partial^{\alpha^{(j)}} x^{(j)}$ and $\partial^{\alpha_{t}^{(j)}} f(\mathbf{x}, \mathbf{y}) = \partial^{\alpha_{t}^{(j)}} f(\mathbf{x}, \mathbf{y}) / \partial y^{(j)}$ , with $\mathbf{x} \in D$ and $\mathbf{y} \in D_{t}$ . This notation allows us to represent the derivative with variable $\mathbf{x}$ and $\mathbf{y}$ separately through the vector $\alpha$ and $\alpha_{t}$ which is required to tackle the smoothness disparity along $x$ and $y$ variable. The $\beta$ -Hölder class functions are defined as + +$$ +\begin{array}{l} \mathcal {H} _ {r} ^ {\beta} (D, M) = \left\{f: D \subset \mathbb {R} ^ {r} \rightarrow \mathbb {R}: \right. \\ \sum_ {\boldsymbol {\alpha}: | \boldsymbol {\alpha} | < \beta} \| \partial^ {\boldsymbol {\alpha}} f \| _ {\infty} + \sum_ {\boldsymbol {\alpha}: | \boldsymbol {\alpha} | = \lfloor \beta \rfloor} \sup _ { \begin{array}{l} \mathbf {u} _ {1}, \mathbf {u} _ {2} \in D \\ \mathbf {u} _ {1} \neq \mathbf {u} _ {2} \end{array} } \frac {\left| \partial^ {\boldsymbol {\alpha}} f (\mathbf {u} _ {1}) - \partial^ {\boldsymbol {\alpha}} f (\mathbf {u} _ {2}) \right|}{\left| \mathbf {u} _ {1} - \mathbf {u} _ {2} \right| _ {\infty} ^ {\beta - \lfloor \beta \rfloor}} \leq M \Bigg \}, \tag {15} \\ \end{array} +$$ + +We extend this definition to include the Hölder class of functions with differences in smoothness (smoothness disparity) along two variables. This class is defined as + +$$ +\begin{array}{l} \mathcal {H} _ {r, r ^ {\prime}} ^ {\beta , \beta_ {\prime}} (D, D _ {I}, M) = \left\{f (\cdot , \cdot): D \times D _ {I} \subset \mathbb {R} ^ {r} \times \mathbb {R} ^ {r _ {\prime}} \rightarrow \mathbb {R}: \right. \\ \sum_ {\substack {\boldsymbol {\alpha}: | \boldsymbol {\alpha} | < \beta \\ \boldsymbol {\alpha} _ {t}: | \boldsymbol {\alpha} _ {t} | < \beta_ {t}}} \| \partial^ {\boldsymbol {\alpha} + \boldsymbol {\alpha} _ {t}} f \| _ {\infty} + \sum_ {\substack {\boldsymbol {\alpha}: | \boldsymbol {\alpha} | = \lfloor \beta \rfloor \\ \boldsymbol {\alpha} _ {t}: | \boldsymbol {\alpha} _ {t} | = \lfloor \beta_ {t} \rfloor}} \sup _ {\substack {\mathbf {u} _ {1}, \mathbf {u} _ {2} \in D _ {X} \\ \mathbf {v} _ {1}, \mathbf {v} _ {2} \in D _ {Y} \\ \mathbf {u} _ {1} \neq \mathbf {u} _ {2} \\ \mathbf {v} _ {1} \neq \mathbf {v} _ {2}}} \frac {\left| \partial^ {\boldsymbol {\alpha} + \boldsymbol {\alpha} _ {t}} f (\mathbf {v} _ {1} , \mathbf {u} _ {1}) - \partial^ {\boldsymbol {\alpha} + \boldsymbol {\alpha} _ {t}} f (\mathbf {v} _ {2} , \mathbf {u} _ {2}) \right|}{\left| \mathbf {u} _ {1} - \mathbf {u} _ {2} \right| _ {\infty} ^ {\beta - \lfloor \beta \rfloor} \vee \left| \mathbf {v} _ {1} - \mathbf {v} _ {2} \right| _ {\infty} ^ {\beta_ {t} - \lfloor \beta_ {t} \rfloor}} \leq M \Bigg \}. \tag{16} \\ \end{array} +$$ + +We denote $\mathcal{H}_r^\beta (D) = \cup_{M > 0}\mathcal{H}_r^\beta (D,M)$ and $\mathcal{H}_{r,r'}^{\beta ,\beta_r}(D,D_\ell) = \cup_{M > 0}\mathcal{H}_{r,r'}^{\beta ,\beta_r}(D,D_\ell ,M)$ . + +# C. More on Smooth conditional density + +Theorem 4 ((Villani et al., 2009) Theorem 12.50). Suppose that + +(i) $\mathcal{A}_1$ and $\mathcal{A}_2$ are uniformly convex, bounded, open subsets of $\mathbb{R}^{\mathfrak{o}}$ with $\mathcal{C}^{\lfloor \beta \rfloor + 2}$ (continuously differentiable up to order $\lfloor \beta \rfloor + 2$ ) boundaries, +(ii) $h_1 \in \mathcal{H}^\beta(\mathcal{A}_1)$ and $h_2 \in \mathcal{H}^\beta(\mathcal{A}_2)$ for some $\beta > 0$ , are probability densities bounded above and below. + +Then, there exists a unique map (up to an additive constant) $g: \mathcal{A}_1 \to \mathcal{A}_2$ with $g \in \mathcal{H}^{\beta + 1}(\mathcal{A}_1)$ , such that if $U \sim h_1$ then $g(U) \sim h_2$ . + +Proof of Lemma 2. Given that $Z$ and $X$ is independent, the product measure on $\mathcal{Z} \times \mathcal{X}$ is $p_Z \mu_X^*$ . Following the smoothness from $p_Z$ and $\mu_X^*$ , the map $p_Z(\cdot) \mu_X^*(\cdot) \in \mathcal{H}^{\min\{\beta_Z, \beta_X\}}(\mathcal{Z} \times \mathcal{X})$ . This implies that $p_Z(\cdot) \mu_X^*(\cdot) \in \mathcal{H}^{\min\{\beta_Z, \beta_X, \beta_Q\}}(\mathcal{Z} \times \mathcal{X})$ . Again $q_* \in \mathcal{H}^{\beta_Q}(\mathcal{Y})$ implies $q_* \in \mathcal{H}^{\min\{\beta_Z, \beta_X, \beta_Q\}}(\mathcal{Y})$ . The result now follows directly from Theorem 4. + +Many of the problems in the conditional setting have an analog in the joint setup. Our proposed approach has a direct statistical extension to this setup. The sufficiency of such extension follows from the observation in the subsequent Lemma 3 which is based on Lemma 2.1 and Lemma 2.2 of Zhou et al. (2022) (see also Theorem 5.10 of Kallenberg (1997)). + +Lemma 3 (Noise Outsourcing Lemma). Let $(Y,X)\in \mathcal{V}\times \mathcal{X}$ with joint distribution $P_{Y,X}$ . Suppose $Y$ is standard Borel space, then there exists $Z\sim \mathsf{N}(0,I_m)$ for any given $m\geq 1$ , independent of $X$ , and a Borel measurable function $G:\mathbb{R}^m\times \mathcal{X}\to \mathcal{V}$ such that + +$$ +(X, G (Z, X)) \sim (Y, X). \tag {17} +$$ + +Moreover, the condition (17) is equivalent of + +$$ +G (Z, x) \sim P _ {Y | X = x}. +$$ + +# D. More on Conditional distribution on manifolds + +Suppose $(\mathcal{V},\varphi)$ is the single chart covering $\mathcal{V}$ , where $\varphi : \mathcal{B}_1(0_{\mathrm{d}_*}) \to \mathcal{V}$ is a homeomorphism. We assume that $\varphi \in \mathcal{H}^{\beta_{\min} + 1}$ , and that $\inf_{\mathbf{u} \in \mathcal{B}_1(0_{\mathrm{d}_*})} |J_\varphi(\mathbf{u})|$ is bounded below by a positive constant, where + +$$ +| J _ {\varphi} (\mathbf {u}) | = \sqrt {\det \left(\frac {\partial \varphi}{\partial \mathbf {u} ^ {\top}} \frac {\partial \varphi}{\partial \mathbf {u}}\right)} +$$ + +is the Jacobian determinant of $\varphi$ + +Note that when $\mathrm{d}_* < D$ , the distribution $Q_*$ cannot possess a Lebesgue density because of the singularity of $\mathcal{V}$ . We, therefore consider a density with respect to the $\mathrm{d}_*$ -dimensional Hausdorff measure in $\mathbb{R}^D$ , denoted by $\mathsf{H}_{\mathrm{d}_*}$ . Suppose that $Q$ allows the Radon-Nikodym derivative $q$ with respect to $\mathsf{H}_{\mathrm{d}_*}$ . We further assume that $q$ is bounded from above and below and that $q \circ \varphi \in \mathcal{H}^{\beta_{\min}}$ . Then by change of variable formula, the Lebesgue density of $\widetilde{Q}$ , the push-forward measure on $\mathcal{B}_1(0_{\mathrm{d}_*})$ through the map $\varphi^{-1}$ , is given as + +$$ +\widetilde {q} (\mathbf {u}) = q (\varphi (\mathbf {u})) | J _ {\varphi} (\mathbf {u}) |. +$$ + +Following the assumptions on the Jacobian determinant and $\varphi \in \mathcal{H}^{\beta_{\mathrm{min}} + 1}$ , it follows that $|J_{\varphi}(\mathbf{u})|$ is bounded from above and below, and the map $\mathbf{u} \mapsto |J_{\varphi}(\mathbf{u})|$ belongs to $\mathcal{H}^{\beta_{\mathrm{min}}}$ . Therefore, $\widetilde{q}$ is bounded above and below, belongs to $\mathcal{H}^{\beta_{\mathrm{min}}}(\mathcal{B}_1(0_{\mathrm{d}_*}))$ . By Lemma 2, assuming $\beta_{\mathrm{min}} \leq \beta_Z \wedge \beta_X$ , there exists $g \in \mathcal{H}^{\beta_{\mathrm{min}} + 1}$ such that $\widetilde{Q} = Q_g$ . Thus, we have $Q = Q_{\varphi \circ g}$ , where $\varphi \circ g: \mathcal{Z} \times \mathcal{X} \to \mathcal{Y}$ . Following Lemma 4, it is possible to find the appropriate neural network approximating them. + +Suppose $\mathcal{V}$ is covered by the charts $\{(U_k,\varphi_k)\}_{k = 1}^K$ , with $1 < K < \infty$ , where $\varphi_{k}:\mathcal{B}_{1}(0_{\mathrm{d}_{*}})\to U_{k}$ is a homeomorphism. As before, we assume $\varphi_{k}\in \mathcal{H}^{\beta_{\min} + 1}$ , $|J_{\varphi_k}(\mathbf{u})|$ is bounded below by a positive constant, $Q$ possesses density $q$ with respect to $\mathrm{H_{d_*}}$ that is bounded above and below, and that $q\circ \phi_{k}\in \mathcal{H}^{\beta_{\min}}$ . Let $Q_{k}(\cdot) = Q(\cdot) / Q(U_{k})$ be the normalized measure of $Q$ over $U_{k}$ . + +We denote $q_{k}$ as the corresponding density with respect to $\mathsf{H}_{\mathbf{d}_{*}}$ . For $\mathbf{u} \in U_k \cap U_\ell$ , $q_{k}(\mathbf{u})Q(U_{k}) = q_{\ell}(\mathbf{u})Q(U_{\ell}) = q(\mathbf{u})$ holds due to the measure $Q(\cdot)$ being compatible with the charts. This is ensured because the densities $Q(U_{k})q_{k}(\cdot)$ and $Q(U_{\ell})q_{\ell}(\cdot)$ are consistent and align with the measure $Q$ over the overlapping regions of the charts. This compatibility is essential for constructing a coherent global measure from local chart densities. + +A compact manifold $\mathcal{V}$ can be covered by a finite partition of unity $\{\tau_k, k = 1, \dots, K\}$ , each sufficiently smooth (Lee, 2012). By definition, each function in this partition satisfies $\tau_k(\mathbf{u}) = 0$ for $\mathbf{u} \notin U_k$ and $\sum_{k=1}^{K} \tau_k(\mathbf{u}) = 1$ for all $\mathbf{u} \in \mathcal{V}$ . Given that $q(\mathbf{u}) = Q(U_k) q_k(\mathbf{u})$ for each $k$ and $\mathbf{u} \in U_k$ , we can express $q(\mathbf{u})$ as: + +$$ +q (\mathbf {u}) = \sum_ {k = 1} ^ {K} Q (U _ {k}) \tau_ {k} (\mathbf {u}) q _ {k} (\mathbf {u}). +$$ + +To normalize, let $c_k = \int \tau_k(\mathbf{u}) dQ_k(\mathbf{u})$ and define $q_k'(\mathbf{u}) = \tau_k(\mathbf{u}) q_k(\mathbf{u}) / c_k$ . Thus, we can rewrite $q(\mathbf{u})$ as: + +$$ +q (\mathbf {u}) = \sum_ {k = 1} ^ {K} \pi_ {k} q _ {k} ^ {\prime} (\mathbf {u}), +$$ + +where $\pi_k = c_k Q(U_k)$ . This formulation reveals that $q$ is a mixture of the component densities $q_k'(\mathbf{u})$ , weighted by $\pi_k$ . This mixture approach ensures compatibility across different charts, providing a unified density representation over the entire manifold $\mathcal{Y}$ . + +Since $q_{k}^{\prime}$ is sufficiently smooth, we can construct a mapping $g_{k}: \widetilde{\mathcal{V}} \to \mathcal{V}$ such that $Q_{k}^{\prime}$ is the distribution of $g_{k}(\widetilde{V})$ , supported on $U_{k}$ , where $\widetilde{\mathcal{V}}$ is a uniformly convex set in $\mathbb{R}^{d_{*}}$ , and $\widetilde{V}$ follows a uniform distribution on $\widetilde{\mathcal{V}}$ . Next, construct a disjoint partition of the interval $(0,1)$ into $K$ intervals $I_{1}, \ldots, I_{K}$ with lengths $\pi_{1}, \ldots, \pi_{K}$ , where $I_{k} = [\sum_{i=1}^{k-1} \pi_{i}, \sum_{i=1}^{k} \pi_{i}]$ . Define $h_{k}$ as the indicator function on the interval $I_{k}$ , i.e., $h_{k}(u) = 1$ if $u \in I_{k}$ and 0 otherwise. For a random variable $U$ following $\mathrm{Uniform}(0,1)$ , it follows that $P_{\mathsf{U}}(h_{k}(\mathsf{U}) = 1) = \pi_{k}$ , and $P_{\mathsf{U}}(h_{k}(\mathsf{U}) = 0) = 1 - \pi_{k}$ . Now, define $\mathbf{v} = (\mathsf{u},\widetilde{v})$ , where $\mathsf{u} \sim \mathrm{Uniform}(0,1)$ and $v \sim \mathrm{Uniform}(\widetilde{\mathcal{V}})$ . Using this, construct $g(\mathbf{v}) = \sum_{k=1}^{K} h_{k}(\mathbf{u}) g_{k}(v)$ . It is straightforward to observe that $Q = Q_{g}$ , as the partitioning through $h_{k}$ ensures that the measure is correctly matched to each $g_{k}$ , and $g_{k}$ ensures that the restricted distributions $Q_{k}^{\prime}$ are appropriately supported on $U_{k}$ . + +From an approximation perspective, the indicator functions $h_k$ and the localized generators can be effectively approximated using ReLU neural networks. This also holds for their products and further linear combinations. For details on such constructions, one may refer to Schmidt-Hieber (2019) for sparse neural networks and Kohler et al. (2023) for dense neural networks. + +It is important to note that we do not guarantee the regularity of the $g_{k}$ maps, as they are not necessarily lower bounded. However, the partition of unity maps $\tau_{k}$ vanish only at the boundary of $U_{k}$ . This property may allows for the construction of sufficiently smooth maps. For the multiple-chart case, we rely on more stringent results, such as Brenier's Theorem (see, for example, Villani et al. (2009)) or the Noise Outsourcing Lemma (Lemma 3), to ensure the existence of the transport maps. + +# E. Proof of Lemma 1 + +Proof. For $g_{1}(\cdot |x)$ , $g_{2}(\cdot |x) \in \mathcal{F}$ with $\| |g_1 - g_2|_\infty \|_\infty \leq \eta_1$ . Then + +$$ +\begin{array}{l} p _ {g _ {1}, \sigma} (y | x) - p _ {g _ {2}, \sigma} (y | x) \\ = \int \phi_ {\sigma} (y - g _ {1} (x, z)) \left(1 - \frac {\phi_ {\sigma} (y - g _ {2} (x , z))}{\phi_ {\sigma} (y - g _ {1} (x , z))}\right) d P _ {Z} (z) \\ = \int \phi_ {\sigma} (y - g _ {1} (x, z)) \left(1 - \exp \left\{- \frac {| y - g _ {2} (x , z) | _ {2} ^ {2} - | y - g _ {1} (x , z) | _ {2} ^ {2}}{2 \sigma^ {2}} \right\}\right) d P _ {Z} (z) \\ \leq \int \phi_ {\sigma} (y - g _ {1} (x, z)) \left(\frac {| y - g _ {2} (x , z) | _ {2} ^ {2} - | y - g _ {1} (x , z) | _ {2} ^ {2}}{2 \sigma^ {2}}\right) d P _ {Z} (z) (18) \\ = \int \phi_ {\sigma} (y - g _ {1} (x, z)) \left(\frac {| g _ {2} (x , z) - g _ {1} (x , z) | _ {2} ^ {2} - 2 (y - g _ {1} (x , z)) ^ {T} (g _ {2} (x , z) - g _ {1} (x , z))}{2 \sigma^ {2}}\right) d P _ {Z} (z) \\ \leq \int \phi_ {\sigma} (y - g _ {1} (x, z)) \left(\frac {| g _ {2} (x , z) - g _ {1} (x , z) | _ {2} ^ {2}}{2 \sigma^ {2}} + \frac {2 | y - g _ {1} (x , z) | _ {1} | g _ {2} (x , z) - g _ {1} (x , z) | _ {\infty}}{2 \sigma^ {2}}\right) d P _ {Z} (z) \\ \leq \int \phi_ {\sigma} (y - g _ {1} (x, z)) \frac {2 K D \eta_ {1}}{2 \sigma^ {2}} d P _ {Z} (z) + \frac {2 \eta_ {1}}{2 \sigma^ {2}} \int | y - g _ {1} (x, z) | _ {1} \phi_ {\sigma} (y - g _ {1} (x, z)) d P _ {Z} (z) (19) \\ \leq \frac {2 K D \eta_ {1}}{2 \sigma^ {2}} \frac {1}{\left(\sqrt {2 \pi \sigma^ {2}}\right) ^ {D}} + \frac {\eta_ {1}}{\sigma^ {2}} \int \sqrt {\frac {D}{2 \pi e}} \frac {1}{\left(\sqrt {2 \pi \sigma^ {2}}\right) ^ {D - 1}} d P _ {Z} (z) (20) \\ \leq c _ {1} (K, D) \sigma_ {\min } ^ {- (D + 2)} \eta_ {1}. (21) \\ \end{array} +$$ + +For the last line, we use the fact that $\sigma_{\mathrm{min}} \leq 1$ . The inequality at (18) follows from $e^{-x} \geq (1 - x)$ . The ones at (19) follow using + +$$ +\begin{array}{l} \left| g _ {2} (x, z) - g _ {1} (x, z) \right| _ {2} ^ {2} \leq 2 K \left| g _ {2} (x, z) - g _ {1} (x, z) \right| _ {1} \leq 2 K D \left| g _ {2} (x, z) - g _ {1} (x, z) \right| _ {\infty} \\ \leq 2 K D \left\| \left| g _ {1} - g _ {2} \right| _ {\infty} \right\| _ {\infty} \leq 2 K D \eta_ {1} \\ \end{array} +$$ + +and $|g_{2}(x,z) - g_{1}(x,z)|_{\infty} \leq \eta_{1}$ . The change at (20) follows from $\phi_{\sigma}(y - g_1(x,z)) \leq \left(\sqrt{2\pi\sigma^2}\right)^{-D}$ and the bound + +$$ +| v | _ {1} \phi_ {\sigma} (v) \leq \sqrt {\frac {D}{2 \pi e}} \frac {1}{(\sqrt {2 \pi \sigma^ {2}}) ^ {D - 1}}. +$$ + +Now for $\sigma_{1},\sigma_{2}\in [\sigma_{\min},\sigma_{\max}]$ with $|\sigma_1 - \sigma_2|\leq \eta_2$ . It holds that $|\sigma_1^{-2} - \sigma_2^{-2}|\leq \sigma_1^{-2}\sigma_2^{-2}(\sigma_1 + \sigma_2)\eta_2$ and $\left|\log \left(\frac{\sigma_2}{\sigma_1}\right)\right|\leq \frac{\eta_2}{\min\{\sigma_1,\sigma_2\}}$ We have + +$$ +\begin{array}{l} p _ {g, \sigma_ {1}} (y | x) - p _ {g _ {2}, \sigma_ {2}} (y | x) \\ = \int \phi_ {\sigma_ {1}} (y - g (x, z) \left(1 - \left(\frac {\sigma_ {1}}{\sigma_ {2}}\right) ^ {D} \exp \left\{\frac {| y - g (x , z) | _ {2} ^ {2}}{2} \left(\frac {1}{\sigma_ {1} ^ {2}} - \frac {1}{\sigma_ {2} ^ {2}}\right) \right\}\right) d P _ {Z} (z) \\ \leq \int \phi_ {\sigma_ {1}} (y - g (x, z) \left[ \frac {| y - g (x , z) | _ {2} ^ {2}}{2} \left(\frac {1}{\sigma_ {2} ^ {2}} - \frac {1}{\sigma_ {1} ^ {2}}\right) - D \log \left(\frac {\sigma_ {1}}{\sigma_ {2}}\right) \right] d P _ {Z} (z) (22) \\ \leq \int \phi_ {\sigma_ {1}} (y - g (x, z) \left[ \frac {| y - g (x , z) | _ {2} ^ {2}}{2} \left(\frac {\sigma_ {1} + \sigma_ {2}}{\sigma_ {1} ^ {2} \sigma_ {2} ^ {2}}\right) \eta_ {2} + \frac {D \eta_ {2}}{\min \{\sigma_ {1} , \sigma_ {2} \}} \right] d P _ {Z} (z) \\ \leq \frac {1}{\left(\sqrt {2 \pi \sigma_ {1} ^ {2}}\right) ^ {D}} \frac {\sigma_ {1} + \sigma_ {2}}{e \sigma_ {2} ^ {2}} \eta_ {2} + \frac {1}{\left(\sqrt {2 \pi \sigma_ {1} ^ {2}}\right) ^ {D}} \frac {D \eta_ {2}}{\min \left\{\sigma_ {1} , \sigma_ {2} \right\}} (23) \\ \leq c _ {2} (D) \sigma_ {\min } ^ {- (D + 1)} \eta_ {2}. (24) \\ \end{array} +$$ + +The (22) follows from $1 - e^{-\alpha} \leq \alpha$ . The change at (23) follows from $\phi_{\sigma_1}(y - g(x,z)) \leq \left(\sqrt{2\pi\sigma_1^2}\right)^{-D}$ and + +$$ +| v | _ {2} ^ {2} \phi_ {\sigma} (v) \leq \frac {\sigma^ {2}}{(\sqrt {2 \pi \sigma^ {2}}) ^ {D}} \frac {2}{e}. +$$ + +Let $\varepsilon > 0$ . Let $\{g_1, \ldots, g_{N_1}\}$ be $\eta_1$ -covering of $\mathcal{F}$ and $\{\sigma_1, \ldots, \sigma_{N_2}\}$ be $\eta_2$ -covering of $[\sigma_{\min}, \sigma_{\max}]$ with respect to $\| \cdot \|_{\infty}\|_{\infty}$ and $|\cdot|_{\infty}$ . By (21) and (24), $\eta_1 = c_1^{-1}\sigma_{\min}^{D + 2}\varepsilon / 4$ and $\eta_2 = c_2^{-2}\sigma_{\min}^{D + 1}\varepsilon / 4$ implies + +$$ +\left\{P _ {g _ {i}, \sigma_ {j}} (\cdot | \cdot): i = 1, \dots , N _ {1}, j = 1, \dots , N _ {2} \right\} +$$ + +forms an $\varepsilon /2$ -covering for $\mathcal{P}$ with respect to $\| \cdot \|_{\infty}$ . Denote the envelope function of $\mathcal{F}$ + +$$ +\begin{array}{l} H (y, x) = \sup _ {p \in \mathcal {P}} p (y | x) \leq \frac {1}{\left(2 \pi \sigma_ {\operatorname* {m i n}} ^ {2}\right) ^ {- D / 2}} \exp \left\{- \frac {| y | _ {2} ^ {2} - 4 K ^ {2} D}{4 \sigma_ {\operatorname* {m a x}} ^ {2}} \right\} \\ = e ^ {K ^ {2} D / 2 \sigma_ {\mathrm {m a x}} ^ {2}} 2 ^ {D / 2} \left(\frac {\sigma_ {\mathrm {m a x}}}{\sigma_ {\mathrm {m i n}}}\right) ^ {D} \phi_ {\sqrt {2} \sigma_ {\mathrm {m a x}}} (y). \\ \end{array} +$$ + +Following from $\int_{|y|_{\infty} > t}\phi_{\sigma}(y)dy\leq 2De^{-t^2 /2\sigma^2}$ , we have + +$$ +\int \int_ {| y | _ {\infty} > B} H (y, x) \mu (y, x) d y d x = \int \left(\int_ {| y | _ {\infty} > B} H (y, x) \mu (y | x) d y\right) \mu_ {X} ^ {*} (x) d x < \varepsilon , +$$ + +where + +$$ +B = 2 \sigma_ {\mathrm {m a x}} \left(\log \frac {1}{\varepsilon} + D \log \frac {\sigma_ {\mathrm {m a x}}}{\sigma_ {\mathrm {m i n}}} + \frac {K ^ {2} D}{2 \sigma_ {\mathrm {m a x}} ^ {2}} + \log 2 D\right) ^ {1 / 2}. +$$ + +For each $(i,j)$ define + +$$ +l _ {i j} (y, x) = \max \left\{p _ {g _ {i}, \sigma_ {j}} (y, x) - \varepsilon / 2, 0 \right\} \quad \text {a n d} \quad u _ {i j} (y, x) = \min \left\{p _ {g _ {i}, \sigma_ {j}} (y, x) + \varepsilon / 2, H (y, x) \right\}. +$$ + +It follows that + +$$ +\begin{array}{l} \int \int \left\{u _ {i j} (y, x) - l _ {i j} (y, x) \right\} \mu_ {X} ^ {*} (x) d y d x \\ \leq \int \int_ {| y | _ {\infty} \leq B} \varepsilon \mu_ {X} ^ {*} (x) d y d x + \int \int_ {| y | _ {\infty} > B} H (y, x) \mu_ {X} ^ {*} (x) d y d x \tag {25} \\ \leq \left\{\left(2 B\right) ^ {D} + 1 \right\} \varepsilon . \\ \end{array} +$$ + +Denote $\delta^2 \coloneqq \left\{(2B)^D + 1\right\}$ . With $d_H^2(u_{ij}, l_{ij}) \leq d_1(u_{ij}, l_{ij})$ , we have + +$$ +\mathcal {N} _ {[ ]} (\delta , \mathcal {P}, d _ {H}) \leq \mathcal {N} _ {[ ]} (\delta^ {2}, \mathcal {P}, d _ {1}) \leq N _ {1} N _ {2} \leq \frac {\sigma_ {\operatorname* {m a x}} - \sigma_ {\operatorname* {m i n}}}{\eta_ {2}} \mathcal {N} (\eta_ {1}, \mathcal {F}, \| | \cdot | _ {\infty} \| _ {\infty}). \tag {26} +$$ + +It is possible to write + +$$ +\delta^ {2} = \varepsilon \leq C _ {1} (\sigma_ {\max}, D) \left[ \varepsilon (\log \varepsilon^ {- 1}) ^ {D / 2} + \varepsilon C _ {2} (K) + \varepsilon \left(\log \frac {\sigma_ {\max}}{\sigma_ {\min}}\right) ^ {D / 2} \right], +$$ + +where $C_1(\sigma_{\mathrm{max}},D)$ and $C_2(K)$ is a constant. There exists small enough $\varepsilon_{*}(D)$ such that for all $\varepsilon \in (0,\varepsilon_{*}]$ + +$$ +\delta^ {2} \leq C _ {3} (\sigma_ {\max }, D, K) \sqrt {\varepsilon} \left(\log \frac {\sigma_ {\max }}{\sigma_ {\min }}\right) ^ {D / 2}. +$$ + +Consequently, there exists $\delta_{*} = \delta_{*}(D)$ , such that for all $\delta \leq \delta_{*}$ , we have + +$$ +C _ {3} ^ {2} (\sigma_ {\mathrm {m a x}}, K, D) \delta^ {4} \left(\log \frac {\sigma_ {\mathrm {m a x}}}{\sigma_ {\mathrm {m i n}}}\right) ^ {- D} \leq \varepsilon . +$$ + +It lead us to, for all $\delta \leq \delta_{*}$ + +$$ +\eta_ {1} \geq \frac {c _ {1} ^ {- 1} C _ {3} ^ {2} \sigma_ {\min } ^ {D + 3} \delta^ {4}}{\sigma_ {\min } \left\{\log \left(\sigma_ {\max } / \sigma_ {\min }\right) \right\} ^ {D}} \geq c \sigma_ {\min } ^ {D + 3} \delta^ {4}, \tag {27} +$$ + +where $c(\sigma_{\mathrm{max}},K,D)$ is a constant. We use the fact that $\sigma_{\mathrm{min}}\{\log (\sigma_{\mathrm{max}} / \sigma_{\mathrm{min}})\}^D$ is bounded above by some constant depending only upon $\sigma_{\mathrm{max}}$ as $\sigma_{\mathrm{min}}\leq 1$ . Similar to (27), it is possible to write for all $\delta >\delta_{*}$ + +$$ +\eta_ {2} \geq c ^ {\prime} \sigma_ {\min } ^ {D + 2} \delta^ {4}, \quad \text {f o r a l l} \delta \leq \delta_ {*}, \tag {28} +$$ + +where $c'(\sigma_{\max}, K, D)$ is some constant. + +The result now follows directly (28) and (27) with (26). + +# F. Proof of Theorem 1 + +Proof. Choose four absolute constants $c_{1},\ldots ,c_{4}$ as in Theorem 1 of Wong & Shen (1995). Define $c$ and $C$ in the statement of Lemma 1. The proof closely follows Chae et al. (2023). We have therein the proof of Theorem 3 that + +$$ +\begin{array}{l} \int_ {\varepsilon^ {2} / 2 ^ {8}} ^ {\sqrt {2} \varepsilon} \sqrt {\log \mathcal {N} _ {[ ]} (\delta / c _ {3} , \mathcal {P} , d _ {H})} d \delta \tag {29} \\ \leq \sqrt {2} \varepsilon \sqrt {\xi A + (D + 3) (s + 1) \log \sigma_ {m i n} ^ {- 1} + c _ {5} \xi} + \sqrt {2} \varepsilon \sqrt {4 (\xi + 1)} \sqrt {\log (2 ^ {8} / \varepsilon^ {2})}, \\ \end{array} +$$ + +for every $\varepsilon \leq \sqrt{2} \leq c_3\delta_* / \sqrt{2}$ , where $c_{5} = c_{5}(c,C,c_{3})$ . Observe that $c_{4}\sqrt{n}\varepsilon_{n}^{2}$ is upper bound to (29) and Eq. (3.1) of Wong & Shen (1995) is satisfied. + +Using B.12 of Ghosal & van der Vaart (2017), we have + +$$ +\begin{array}{l} K (p _ {G _ {*}, \sigma_ {*}}, p _ {g, \sigma_ {*}}) \leq \int \int K \Big (N (G _ {*} (z, x), \sigma_ {*} ^ {2}), N (g (z, x), \sigma_ {*} ^ {2}) \Big) \mu_ {X} ^ {*} (x) d x d P _ {Z} (z) \\ = \int \int \frac {\left| G _ {*} (z , x) - g (z , x) \right| _ {2} ^ {2}}{2 \sigma_ {*} ^ {2}} \mu_ {X} ^ {*} (x) d x d P _ {Z} (z) \leq \frac {D \delta_ {\mathrm {a p p r o x}} ^ {2}}{2 \sigma_ {*} ^ {2}} =: \delta_ {n}. \\ \end{array} +$$ + +One may easily see that + +$$ +\int \left(\log \frac {\phi_ {\sigma} (x)}{\phi_ {\sigma} (x - y)}\right) ^ {2} \phi_ {\sigma} (x) d x = \int \frac {| y | _ {2} ^ {4} + 4 | x ^ {T} y | ^ {2}}{4 \sigma^ {2}} \phi_ {\sigma} (x) d x \leq \frac {| y | _ {2} ^ {4}}{4 \sigma^ {2}} + | y | _ {2} ^ {2} \int \frac {| x | _ {2} ^ {2}}{\sigma^ {2}} \phi_ {\sigma} (x) d x. +$$ + +Combining this with Example B.12, (B.17) and Exercise B.8 of Ghosal & van der Vaart (2017), we have + +$$ +\begin{array}{l} \iint \left(\log \frac {p _ {G _ {*} , \sigma_ {*}} (y | x)}{p _ {g , \sigma_ {*}} (y | x)}\right) ^ {2} d P _ {*} (y | x) \mu_ {X} ^ {*} (x) d x \\ \leq \int \int \int \left(\log \frac {\phi_ {\sigma} (y - G _ {*} (z , x))}{\phi_ {\sigma} (y - G (z , x))}\right) ^ {2} \phi_ {\sigma} (y - G _ {*} (z, x)) d y d P _ {Z} (z) \mu_ {X} ^ {*} (x) d x \\ \leq \frac {D ^ {2} \delta_ {\mathrm {a p p r o x}} ^ {4}}{4 \sigma_ {*} ^ {2}} + D \delta_ {\mathrm {a p p r o x}} ^ {2} \int \frac {| x | _ {2} ^ {2}}{\sigma_ {*} ^ {2}} \phi_ {\sigma_ {*}} (y) d y + \frac {2 D \delta_ {\mathrm {a p p r o x}} ^ {2}}{\sigma_ {*} ^ {2}} \leq c _ {7} \frac {\delta_ {\mathrm {a p p r o x}} ^ {2}}{\sigma_ {*} ^ {2}} =: \tau_ {n}, \\ \end{array} +$$ + +where $c_{7} = c_{7}(D)$ . We are using $\delta_{n}$ and $\tau_{n}$ , although they are independent of $n$ , for notational consistency with Theorem 4 of Wong & Shen (1995). Let $\varepsilon_{n}^{*} = \varepsilon_{n} \vee \sqrt{12\delta_{n}}$ . Then, using Theorem 4 of Wong & Shen (1995), we have + +$$ +P _ {*} \left(d _ {H} (\widehat {p}, p _ {*}) > \varepsilon_ {n}\right) \leq 5 e ^ {- c _ {2} n \varepsilon_ {n} ^ {* 2}} + \frac {\tau_ {n}}{n \delta_ {n}} = 5 e ^ {- c _ {2} n \varepsilon_ {n} ^ {* 2}} + \frac {2 c _ {7} ^ {2}}{D n}. +$$ + +The proof is complete after redefining constants. + +![](images/d3f00d20b508d9172d54215df3d98cb29f6f17071b8d5081aa2d67309e6a3d84.jpg) + +# G. Proofs of Corollary 1 + +Proof. For the sparse case in 1.1, utilizing the entropy bound from (10), we observe that + +$$ +\xi \{A + \log (n / \sigma_ {\mathrm {m i n}}) \} \asymp \delta_ {\mathrm {a p p r o x}} ^ {- t _ {*} / \beta_ {*}} \log^ {3} (\delta_ {\mathrm {a p p r o x}} ^ {- 1}), +$$ + +which naturally leads to the required convergence rate. + +Similarly for the fully connected case 1.2, utilizing the entropy bound from (11), we observe that + +$$ +\xi \{A + \log (n / \sigma_ {\mathrm {m i n}}) \} \asymp \delta_ {\mathrm {a p p r o x}} ^ {- t _ {*} / \beta_ {*}} \log^ {3} (\delta_ {\mathrm {a p p r o x}} ^ {- 1}), +$$ + +which naturally leads to the required convergence rate. + +# H. Proof of Theorem 2 + +Proof. It is suffice to assume that $\varepsilon$ and $\sigma_{*}\sqrt{\log\varepsilon^{-1}}$ are sufficiently small. If not, let $\varepsilon +\sigma_{*}\sqrt{\log\varepsilon^{-1}}\geq c_{0}$ , where $c_{0}(K,D,\mathsf{r}_{*})$ . Then Theorem 2 holds trivially by taking a large enough constant depending just on $D,K$ , and $\mathsf{r}_*$ + +Let $V \sim Q(\cdot |X = x)$ , $V_{*} \sim Q(\cdot |X = x)$ , $\epsilon \sim \mathsf{N}(0_D, \sigma^2\mathbb{I}_d)$ and $\epsilon_{*} \sim \mathsf{N}(0_D, \sigma_{*}^{2}\mathbb{I}_{d})$ be independent with underlying probability density $\nu$ . We truncate the random variable $\epsilon$ and $\epsilon_{*}$ componentwise as $(\epsilon_{K})_{j} = \max \{-K, \min \{K, \epsilon_{j}\}\}$ and $(\epsilon_{*K})_j = \max \{-K, \min \{K, (\epsilon_{*})_j\}\}$ respectively. We denote $P_{g,\sigma}$ as $P$ , $Q_{g}$ as $Q$ , $\widetilde{P}$ as distribution of $V + \epsilon_{K}$ and $\widetilde{P}_{*}$ as the distribution of $V_{*} + \epsilon_{*K}$ . One may note that $W_{1}(\widetilde{P}_{*}, Q_{*}) \leq W_{2}(\widetilde{P}_{*}, Q_{*}) \leq \sqrt{\mathbb{E}[|\epsilon_{*K}|_2^2]} \leq \sqrt{\mathbb{E}[|\epsilon_{*}|_2^2]} \leq \sigma_*\sqrt{D}$ . Similarly, $W_{1}(\widetilde{P}, Q) \leq \sigma\sqrt{D}$ . The $\ell_1$ diameter of $[-2K, 2K]^D$ , where the support of $\widetilde{P}$ and $\widetilde{P}_{*}$ , is 4KD. Observe that + +$$ +W _ {1} \left(\widetilde {P} _ {*}, \widetilde {P}\right) \leq 4 K D d _ {1} \left(\widetilde {P} _ {*}, \widetilde {P}\right) \leq 4 K D d _ {1} (P _ {*}, P) \leq 8 K D d _ {H} (P _ {*}, P), +$$ + +where the first inequality follows from Theorem 4 of Gibbs & Su (2002), the second inequality follows from the fact the distance between two truncated distributions is always lesser than the original distributions and the last inequality follows from $d_{1} \leq 2d_{H}$ . Hence, + +$$ +W _ {1} \left(Q _ {*}, Q\right) \leq W _ {2} \left(Q _ {*}, \widetilde {P} _ {*}\right) + W _ {1} \left(\widetilde {P} _ {*}, \widetilde {P}\right) + W _ {2} \left(\widetilde {P}, Q\right) \leq \sigma_ {*} \sqrt {D} + 8 K D \varepsilon + \sigma \sqrt {D}. +$$ + +Now it is suffice to show that $\sigma \leq c\sigma_{*}\sqrt{\log\varepsilon^{-1}}$ , where $c = c(D,K,r*)$ is a constant, because we have assumed that $\varepsilon$ is small enough. We establish this in the rest of the proof. Let $t_* = \left[2\sigma_*^2 D\log \left(\frac{2D}{\varepsilon}\right)\right]^{1/2}$ . Observe that + +$$ +\int_ {| x | _ {2} > t _ {*}} \phi_ {\sigma_ {*}} (x) d x \leq \int_ {| x | _ {\infty} > t _ {*} / \sqrt {D}} \phi_ {\sigma_ {*}} (x) d x \leq 2 D e ^ {- t _ {*} ^ {2} / 2 D \sigma^ {2}} \leq \varepsilon . +$$ + +Let $\mathcal{M}_{*}^{t_{*}} = \mathcal{M}_{*}\oplus \mathcal{B}_{t_{*}}(0_{D})$ . We may write + +$$ +\begin{array}{l} 1 - P _ {*} \left(\mathcal {M} _ {*} ^ {t _ {*}}\right) = \nu \left(Y _ {*} + \epsilon_ {*} \notin \mathcal {M} _ {*} ^ {t _ {*}}\right) \leq \nu \left(| \epsilon_ {*} | _ {2} > t _ {*}\right) \\ \Rightarrow P \left(\mathcal {M} _ {*} ^ {t _ {*}}\right) \geq 1 - 2 \varepsilon , \tag {30} \\ \end{array} +$$ + +the implication in the last line follows from $\sup_B |P(B) - P_*(B)| \leq d_H(P, P_*) \leq \varepsilon$ . For the sake of contradiction, let $\sigma \in [2t_* r^* / 2] \cup (\mathfrak{r}_* / 2, \infty)$ ( $t_*$ is sufficiently small, from the assumption we made at the beginning of this proof). If $\sigma > \mathfrak{r}_* / 2$ , then + +$$ +2 \varepsilon \geq 1 - P \left(\mathcal {M} _ {*} ^ {t _ {*}}\right) \geq 1 - P \left([ - K, K ] ^ {D}\right) \geq c _ {2} (K, D, r *) +$$ + +where $c_{2}$ is some positive constant. It is a contradiction following from the smallness of $\varepsilon$ . Let's make a claim that if $\sigma \in [2t_{*}, r_{*} / 2]$ , then for every $y \in \mathbb{R}^{D}$ , there is some $z \in \mathbb{R}^{D}$ such that $|z - y|_{2} \leq \sigma$ and $\mathcal{B}_{\sigma / 2}(z) \cap \mathcal{M}_{*}^{t_{*}} = \emptyset$ . + +Following from the claim, we have + +$$ +\nu \left(Y + \epsilon \notin \mathcal {M} _ {*} ^ {t _ {*}} | Y = y\right) \geq \nu \left(\epsilon \in \mathcal {B} _ {\sigma / 2} (z - y)\right). +$$ + +Since $|z - y|_2 \leq \sigma$ , the right hand side is bounded below by a positive constant depending just on $D$ which is again a contradiction to (30). This proves the assertion made in the theorem. + +The proof of the claim is divided into three cases. Let $\rho(y, \mathcal{M}_*) = \inf \{|y - y'|_2 : y' \in \mathcal{M}_*\}$ be the $\ell_2$ set distance. + +Case 1. $\rho(y, \mathcal{M}_*) \geq \sigma$ : We may choose $z = y$ . + +Case 2. $\rho(y, \mathcal{M}_*) \in (0, \sigma)$ : Let $y_0$ be the unique Euclidean projection of $y$ onto $\mathcal{M}_*$ . Such a unique projection exists because $\sigma < r_*$ is within the reach and $y \in \mathcal{M}_*$ , since $\mathcal{M}_*$ is closed. Suppose $y_t = y_0 + t(y - y_0)$ . We shall define two continuous functions $d_0(t) = |y_t - y_0|_2$ and $d(t) = \rho(y_t, \mathcal{M}_*)$ . It is obvious that $d(t) \leq d_0(t)$ . For $t \in [0, 1 + \sigma / |y - y_0|_2]$ , $d_0(t) \leq d(t)$ because $y_0$ is the unique projection for all the points that lie on the line segment including the farthest point with $t = 1 + \sigma / |y - y_0|_2$ . Otherwise, say $d(t) = \rho(y_t, z)$ and + +$$ +\left| y - y _ {0} \right| _ {2} = \left| y - y _ {t} \right| _ {2} + \left| y _ {t} - y _ {0} \right| _ {2} > \left| y - y _ {t} \right| + \left| y _ {t} - z \right| \geq | y - z | _ {2} +$$ + +which contradicts $y_0$ being a unique projection. The claim holds for the point $z = y_{1 + \sigma / |y - y_0|_2}$ . To see this, observe $|z - y| = \sigma$ and $\mathcal{B}_{\sigma/2}(z) \cap \mathcal{M}_*^{t_*} = \emptyset$ because $t_* \leq \sigma/2$ and the ball $\mathcal{B}_{\sigma/2}(z) \subset \mathcal{M}_*^{r_*}$ is within the reach of the manifold. + +Case 3. $\rho(y, \mathcal{M}_*) = 0$ : Because $\mathcal{M}_*$ has empty interior, for all $\gamma > 0$ , we always find a point $y_\gamma$ , which in $\mathcal{B}_\gamma(y)$ which away from $\mathcal{M}_*$ . For small enough $\gamma$ , we reduce to case 2 by taking $\gamma \to 0$ , the limit point of $y_\gamma$ has the required behavior. + +# I. Proof of Corollary 2 + +Proof. The effective noise variance after the perturbation would be + +$$ +\widetilde {\sigma} _ {*} = n ^ {- \alpha} + n ^ {- \beta_ {*} / 2 (\beta_ {*} + t _ {*})} \asymp \left\{ \begin{array}{l l} n ^ {- \alpha}, & \quad \alpha < \beta_ {*} / \{2 (\beta_ {*} + t _ {*}) \} \\ n ^ {\beta_ {*} / 2 (\beta_ {*} + t _ {*})}, & \quad \text {o t h e r w i s e}. \end{array} \right. +$$ + +Following this and the Theorem 2, for the rate we have + +$$ +\begin{array}{l} \varepsilon_ {n} ^ {*} + \sigma_ {*} \sqrt {\log \left(\left(\varepsilon_ {n} ^ {*}\right) ^ {- 1}\right)} \asymp \left(n ^ {- \frac {\beta_ {*} - t _ {*} \alpha}{2 \beta_ {*} + t _ {*}}} + n ^ {- \alpha}\right) \log^ {2} (n) \\ \asymp \left\{ \begin{array}{l l} n ^ {- \frac {\beta_ {*} - t _ {*} \alpha}{2 \beta_ {*} + t _ {*}}} \log^ {2} (n), & \quad \text {i f} \alpha < \beta_ {*} / \{2 (\beta_ {*} + t _ {*}) \}, \\ n ^ {- \frac {\beta_ {*}}{2 (\beta_ {*} + t _ {*})}} \log^ {2} (n), & \quad \text {o t h e r w i s e}. \end{array} \right. \\ \end{array} +$$ + +# J. Proof of Theorem 3 + +Proof. With $m = \lceil \log_2(n) \rceil$ and $N = \left(n^{(\beta_Z^{-1}d + \beta_X^{-1}p)[1 + \alpha (\beta_Z^{-1}d + \beta_X^{-1}p)] / [2 + \beta_Z^{-1}d + \beta_X^{-1}p]}\right)$ in Theorem 5, we can find a network $G$ with the mentioned architecture such that + +$$ +\left\| \left| G - G _ {*} \right| _ {\infty} \right\| _ {\infty} \leq \delta_ {\text {a p p r o x}}. +$$ + +Following the entropy bound from (10), we have + +$$ +\begin{array}{l} \log \mathcal {N} (\delta , \mathcal {F} _ {s}, \| | \cdot | _ {\infty} \| _ {\infty}) \lesssim s L \left\{\log (r L) + \log \delta^ {- 1} \right\} \\ \lesssim \delta_ {\mathrm {a p p r o x}} ^ {- (\beta_ {Z} ^ {- 1} d + \beta_ {X} ^ {- 1} p)} \log^ {2} \delta_ {\mathrm {a p p r o x}} ^ {- 1} \left\{\log \left(\delta_ {\mathrm {a p p r o x}} ^ {- 1} \log \left(\delta_ {\mathrm {a p p r o x}} ^ {- 1}\right)\right) + \log \left(\delta_ {\mathrm {a p p r o x}} ^ {- 1}\right) \right\}. \\ \end{array} +$$ + +The rest directly follows from the Theorem 1 + +# K. Approximation properties of the sparse and fully connected DNNs + +The approximability of the sparse network is detailed in Lemma 4.1, which restates Lemma 5 from Chae et al. (2023). For the fully connected network, Lemma 4.2 demonstrates its approximation capabilities, derived directly from Theorem 2 and + +the proof of Theorem 1 in Kohler & Langer (2021). Additionally, the inclusion of the class $\mathcal{G}$ in the fully connected setup is supported by the discussion in Section 1 of Kohler & Langer (2020). + +Lemma 4. Suppose that $G_{*}\in \mathcal{G}$ . Then, for every small enough $\delta \in (0,1)$ + +1. there exists a sparse network $G \in \mathcal{F}_s = \mathcal{F}_s(L, r, s, K \vee 1)$ with $L \lesssim \log \delta^{-1}$ , $r \lesssim \delta^{-t_* / \beta_*}$ , $s \lesssim \delta^{-t_* / \beta_*} \log \delta^{-1}$ satisfying $\| |G - G_*|_{\infty} \|_{\infty} \leq \delta$ . +2. there exists a fully connected network $G\in \mathcal{F}_c$ with $L\lesssim \log \delta^{-1}$ $r\lesssim \delta^{-t_{*} / 2\beta_{*}}$ $B\lesssim \delta^{-1}$ satisfying $\| |G - G_{*}|_{\infty}\|_{\infty}\leq$ $\delta$ + +# L. A new approximation result for functions with smoothness disparity + +In this section, we prove the approximability of the sparse neural network for the Hölder class of function $f \in \mathcal{H}_{r,r'}^{\beta,\beta_t}(D,D_t,K)$ . + +Theorem 5. Let $f \in \mathcal{H}_{r,r'}^{\beta,\beta'}([0,1]^r, [0,1]^{r'}, K)$ . Denote $r_{\mathrm{sum}} = r + r'$ and $\beta_{\mathrm{sum}} = \beta + \beta'$ . Then for any integers $m \geq 1$ and $N \geq (\beta_{\mathrm{sum}} + 1)^{r_{\mathrm{sum}}} \vee (K + 1)e^{r_{\mathrm{sum}}}$ , there exists a network + +$$ +\widetilde {f} \in \mathcal {F} _ {s} \big (L, \big (\mathsf {r} _ {\mathrm {s u m}}, 6 (\mathsf {r} _ {\mathrm {s u m}} + \lceil \beta_ {\mathrm {s u m}} \rceil) N, \ldots , 6 (\mathsf {r} _ {\mathrm {s u m}} + \lceil \beta_ {\mathrm {s u m}} \rceil) N, 1 \big), s, \infty \big) +$$ + +with depth + +$$ +L = 8 + (m + 5) \left(1 + \left\lceil \log_ {2} \left(\mathsf {r} _ {\mathrm {s u m}} \vee \beta_ {\mathrm {s u m}}\right)\right\rceil\right) +$$ + +and the number of parameters + +$$ +s \leq 1 0 9 \big (r _ {\mathrm {s u m}} + \beta_ {\mathrm {s u m}} + 1 \big) ^ {3 + r _ {\mathrm {s u m}}} N (m + 6), +$$ + +such that + +$$ +\| \widetilde {f} - f \| _ {L ^ {\infty} ([ 0, 1 ] ^ {r _ {\mathrm {s u m}}})} \leq (2 K + 1) \left(1 + r _ {\mathrm {s u m}} ^ {2} + \beta_ {\mathrm {s u m}} ^ {2}\right) 6 ^ {r _ {\mathrm {s u m}}} N 2 ^ {- m} + K 3 ^ {r _ {\mathrm {s u m}} / (\beta^ {- 1} r + \beta_ {,} ^ {- 1} r _ {,})} N ^ {- 1 / (\beta^ {- 1} r + \beta_ {,} ^ {- 1} r _ {,})}. +$$ + +We denote $\widetilde{\beta} = (\beta +\beta_{t})^{-1}\beta \beta_{t}$ and $\widetilde{r} = (\beta +\beta_{t})^{-1}(r\beta +r_{t}\beta_{t})$ . Before presenting the proof of Theorem 5, we formulate some required results. + +We follow the classical idea of function approximation by local Taylor approximations that have previously been used for network approximations in (Yarotsky, 2017) and (Schmidt-Hieber, 2020). For a vector $\mathbf{a} \in [0,1]^r$ define + +$$ +P _ {\mathbf {a}, \mathbf {b}} ^ {\beta , \beta_ {\prime}} f (\mathbf {u}, \mathbf {v}) = \sum_ { \begin{array}{l} 0 \leq | \boldsymbol {\alpha} | < \beta \\ 0 \leq | \boldsymbol {\alpha} _ {\prime} | < \beta_ {\prime} \end{array} } \left(\partial^ {\boldsymbol {\alpha} + \boldsymbol {\alpha} _ {\prime}} f\right) (\mathbf {a}, \mathbf {b}) \frac {\left(\mathbf {u} - \mathbf {a}\right) ^ {\boldsymbol {\alpha}} \left(\mathbf {v} - \mathbf {b}\right) ^ {\boldsymbol {\alpha} _ {\prime}}}{\boldsymbol {\alpha} ! \boldsymbol {\alpha} _ {\prime} !}. \tag {31} +$$ + +We use the notation the $\mathbf{u} = (u^{(j)})_j$ to represent the component of the vector when the index $j$ is well understood. Accordingly we have $\mathbf{v} = (v^{(j)})_j$ , $\mathbf{a} = (a^{(j)})_j$ and $\mathbf{b} = (b^{(j)})_j$ . By Taylor's theorem for multivariate functions, we have for a suitable $\xi \in [0,1]$ + +$$ +\begin{array}{l} f(\mathbf{u},\mathbf{v}) = \sum_{\substack{\boldsymbol {\alpha}:|\boldsymbol {\alpha}| < \beta -1\\ \boldsymbol{\alpha}_{/}:\boldsymbol{\alpha}_{/}|\boldsymbol {\alpha}_{/} < \beta_{/} - 1}}(\partial^{\boldsymbol {\alpha} + \boldsymbol{\alpha}_{/}}f)(\mathbf{a},\mathbf{b})\frac{(\mathbf{u} - \mathbf{a})^{\boldsymbol{\alpha}}(\mathbf{v} - \mathbf{b})^{\boldsymbol{\alpha}_{/}}}{\boldsymbol{\alpha}!\boldsymbol{\alpha}_{/}!} \\ +\sum_{\substack{\beta -1\leq |\boldsymbol {\alpha}| < \beta \\ \beta^{\prime} - 1\leq |\boldsymbol{\alpha}^{\prime}| < \beta ,}}(\partial^{\boldsymbol {\alpha} + \boldsymbol{\alpha}^{\prime}}f)(\mathbf{a} + \xi (\mathbf{u} - \mathbf{a}),\mathbf{b} + \xi (\mathbf{v} - \mathbf{b}))\frac{(\mathbf{u} - \mathbf{a})^{\boldsymbol{\alpha}}(\mathbf{v} - \mathbf{b})^{\boldsymbol{\alpha}^{\prime}}}{\boldsymbol{\alpha}! \boldsymbol{\alpha}^{\prime}!}. \\ \end{array} +$$ + +We have $|(\mathbf{u} - \mathbf{a})^{\alpha}| = \prod_{j=1}^{r} |u_j - a_j|^{\alpha^{(j)}} \leq |\mathbf{u} - \mathbf{a}|_{\infty}^{\lvert\alpha\rvert}$ and $|(\mathbf{v} - \mathbf{b})^{\alpha'}| = \prod_{j=1}^{r'} |v_j - b_j|^{\alpha'^{(j)}} \leq |\mathbf{v} - \mathbf{b}|_{\infty}^{\lvert\alpha''\rvert}$ . Consequently, for $f \in \mathcal{H}_{r,r'}^{\beta,\beta'}([0,1]^r, [0,1]^{r'}, K)$ , + +$$ +\begin{array}{l} \left| f (\mathbf {u}, \mathbf {v}) - P _ {\mathbf {a}, \mathbf {b}} ^ {\beta , \beta_ {t}} f (\mathbf {u}, \mathbf {v}) \right| \\ \leq \sum_ {\substack {\beta - 1 \leq | \boldsymbol {\alpha} | < \beta \\ \beta , - 1 \leq | \boldsymbol {\alpha} _ {t} | < \beta_ {t}}} \left(\partial^ {\boldsymbol {\alpha} + \boldsymbol {\alpha} _ {t}} f (\mathbf {a} + \xi (\mathbf {u} - \mathbf {a}), \mathbf {b} + \xi (\mathbf {v} - \mathbf {b})) - \partial^ {\boldsymbol {\alpha} + \boldsymbol {\alpha} _ {t}} f (\mathbf {a}, \mathbf {b})\right) \frac {(\mathbf {u} - \mathbf {a}) ^ {\boldsymbol {\alpha}} (\mathbf {v} - \mathbf {b}) ^ {\boldsymbol {\alpha} _ {t}}}{\boldsymbol {\alpha} ! \boldsymbol {\alpha} _ {t} !} \tag{32} \\ \leq K \left(\left| \mathbf {u} - \mathbf {a} \right| _ {\infty} ^ {\beta} \vee \left| \mathbf {v} - \mathbf {b} \right| _ {\infty} ^ {\beta_ {\prime}}\right) \\ \end{array} +$$ + +We may also write (31) as a linear combination of monomials + +$$ +P _ {\mathbf {a}, \mathbf {b}} ^ {\beta , \beta_ {\prime}} f (\mathbf {u}, \mathbf {v}) = \sum_ { \begin{array}{l} 0 \leq | \gamma | < \beta \\ 0 \leq | \gamma | < \beta_ {\prime} \end{array} } c _ {\gamma , \gamma^ {\prime}} \mathbf {u} ^ {\gamma} \mathbf {v} ^ {\gamma^ {\prime}}, \tag {33} +$$ + +for suitable coefficients $c_{\gamma, \gamma'}$ . For convenience, we omit the dependency on $\mathbf{a}$ and $\mathbf{b}$ in $c_{\gamma, \gamma'}$ . Since $\partial^{\gamma, \gamma'} P_{\mathbf{a}, \mathbf{b}}^{\beta, \beta'} f(\mathbf{u}, \mathbf{v})|_{(\mathbf{u} = 0, \mathbf{v} = 0)} = \gamma! \gamma'! c_{\gamma, \gamma'}$ , we must have + +$$ +c_{\boldsymbol {\gamma},\boldsymbol{\gamma}^{\prime}} = \sum_{\substack{\boldsymbol {\gamma}\leq \boldsymbol {\alpha}\& |\boldsymbol {\alpha}| < \beta \\ \boldsymbol{\gamma}^{\prime}\leq \boldsymbol {\alpha}_{I}\& |\boldsymbol {\alpha}_{I}| < \beta ,}}(\partial^{\boldsymbol {\alpha} + \boldsymbol{\alpha}_{I}}f)(\mathbf{a},\mathbf{b})\frac{(-\mathbf{a})^{\boldsymbol{\alpha} - \boldsymbol{\gamma}}(-\mathbf{b})^{\boldsymbol{\alpha}_{I} - \boldsymbol{\gamma}_{I}}}{\boldsymbol{\gamma}!\boldsymbol{\gamma}_{I}!(\boldsymbol{\alpha} - \boldsymbol{\gamma})!(\boldsymbol{\alpha}_{I} - \boldsymbol{\gamma}_{I})!}. +$$ + +Notice that since $\mathbf{a}\in [0,1]^r$ $\mathbf{b}\in [0,1]^{r'}$ , and $f\in \mathcal{H}_{r,r'}^{\beta ,\beta_r}([0,1]^r,[0,1]^{r'},K)$ + +$$ +\left| c _ {\boldsymbol {\gamma} \boldsymbol {\gamma} ^ {\prime}} \right| \leq K / (\boldsymbol {\gamma}! \boldsymbol {\gamma} ^ {\prime},!) \quad \text {a n d} \sum_ {\substack {\boldsymbol {\gamma} \geq 0 \\ \boldsymbol {\gamma} ^ {\prime} \geq 0}} \left| c _ {\boldsymbol {\gamma}, \boldsymbol {\gamma} ^ {\prime}} \right| \leq K \prod_ {i = 1} ^ {r} \prod_ {j = 1} ^ {r _ {\prime}} \sum_ {\gamma^ {(i)} \geq 0} \sum_ {\gamma^ {(j)} \geq 0} \frac {1}{\gamma^ {(i)} !} \frac {1}{\gamma^ {(j)} !} = K e ^ {r + r _ {\prime}}, \tag{34} +$$ + +where $\gamma = (\gamma^{(1)},\dots ,\gamma^{(r)})$ and $\gamma_{\prime} = (\gamma_{\prime}^{(1)},\dots ,\gamma_{\prime}^{(r_{\prime})})$ + +Consider the set of grid points + +$$ +\begin{array}{l} \mathbf {D} (M) := \left\{\mathbf {u} _ {\ell^ {(1)}} = \left(\ell_ {j} ^ {(1)} / M _ {1}\right) _ {j = 1, \dots , r} \text {a n d} \mathbf {v} _ {\ell^ {(2)}} = \left(\ell_ {j} ^ {(2)} / M _ {2}\right) _ {j = 1, \dots , r}, \right. \\ : \ell^ {(1)} = (\ell_ {1} ^ {(1)}, \dots , \ell_ {r} ^ {(1)}) \in \{0, 1, \dots , M _ {1} \} ^ {r}, \\ \boldsymbol {\ell} ^ {(2)} = (\ell_ {1} ^ {(2)}, \ldots , \ell_ {r} ^ {(2)}) \in \{0, 1, \ldots , M _ {2} \} ^ {r _ {\prime}}, M _ {1} = M ^ {\widetilde {\beta} / \beta}, M _ {2} = M ^ {\widetilde {\beta} / \beta_ {\prime}} \}. \\ \end{array} +$$ + +The cardinality of this set is $(M_1 + 1)^r \cdot (M_2 + 1)^{r'}$ . We write $\mathbf{u}_{\ell^{(1)}} = (u_{\ell^{(1)}}^{(j)})_{j=1,\dots,r}$ and $\mathbf{v}_{\ell^{(2)}} = (v_{\ell^{(2)}}^{(j)})_{j=1,\dots,r'}$ to denote the components of $\mathbf{u}_{\ell^{(1)}}$ and $\mathbf{v}_{\ell^{(2)}}$ respectively. With slight abuse of notation we denote $\mathbf{w} = (\mathbf{u}, \mathbf{v}) = (u^{(1)}, \dots, u^{(r)}, v^{(1)}, \dots, v^{(r'})}$ , $\ell = (\ell^{(1)}, \ell^{(2)}) = (\ell_{1}^{(1)}, \dots, \ell_{r}^{(1)}, \ell_{1}^{(2)}, \dots, \ell_{r'}^{(2)})$ and $\mathbf{w}_{\ell} = (w_{\ell}^{(j)})_{j=1,\dots,r+r'} = (\mathbf{u}_{\ell^{(1)}}, \mathbf{v}_{\ell^{(2)}}) = (u_{\ell^{(1)}}^{(1)}, \dots, u_{\ell^{(1)}}^{(r)}, v_{\ell^{(2)}}^{(1)}, \dots, u_{\ell^{(2)}}^{(r'}))$ . Define + +$$ +\begin{array}{l} P ^ {\beta , \beta_ {t}} f (\mathbf {u}, \mathbf {v}) \\ = P ^ {\beta , \beta_ {t}} f (\mathbf {w}) \\ := \sum_ {\mathbf {w} _ {\ell} \in \mathbf {D} (M)} P _ {\mathbf {w} _ {\ell}} ^ {\beta , \beta_ {\prime}} f (\mathbf {w}) \prod_ {j = 1} ^ {r + r _ {\prime}} \left(1 - M _ {j} | w ^ {(j)} - w _ {\ell} ^ {(j)} |\right) _ {+} \\ = \sum_ {\mathbf {u} _ {\ell^ {(1)}}, \mathbf {v} _ {\ell^ {(2)}} \in \mathbf {D} (M)} P _ {\mathbf {u} _ {\ell^ {(1)}}, \mathbf {v} _ {\ell^ {(2)}}} ^ {\beta , \beta_ {\prime}} f (\mathbf {u}, \mathbf {v}) \left(\prod_ {j = 1} ^ {r} (1 - M _ {1} | u ^ {(j)} - u _ {\ell^ {(1)}} ^ {(j)} |) _ {+}\right) \left(\prod_ {j = 1} ^ {r _ {\prime}} (1 - M _ {2} | v ^ {(j)} - v _ {\ell^ {(2)}} ^ {(j)} |) _ {+}\right), \\ \end{array} +$$ + +where $M_{j} = M_{1}$ for $j = 1,\dots ,r$ and $M_{j} = M_{2}$ for $j = r + 1,\ldots ,r + r_{t}$ + +Lemma 5. If $f \in \mathcal{H}_{r,r'}^{\beta,\beta_r}([0,1]^r, [0,1]^{r_r}, K)$ , then $\| P^{\beta,\beta_r}f - f \|_{L^\infty[0,1]^{r + r'}} \leq KM^{-\widetilde{\beta}}$ . + +Proof. Since for all $\mathbf{w} = (w^{(1)},\dots ,w^{(r + r_{\prime})})\in [0,1]^{r + r_{\prime}}$ + +$$ +\sum_ {\mathbf {w} _ {\ell} \in \mathbf {D} (M)} \prod_ {j = 1} ^ {r + r _ {\prime}} \left(1 - M _ {j} \left| w ^ {(j)} - w _ {\ell} ^ {(j)} \right|\right) _ {+} = \prod_ {j = 1} ^ {r + r _ {\prime}} \sum_ {\ell = 0} ^ {M _ {j}} \left(1 - M _ {j} \left| w ^ {(j)} - \ell / M _ {j} \right|\right) _ {+} = 1, \tag {35} +$$ + +we have + +$$ +\begin{array}{l} f (\mathbf {w}) = f (\mathbf {u}, \mathbf {v}) \\ = \sum_{\substack{\mathbf{u}_{\ell^{(1)}},\mathbf{v}_{\ell^{(2)}}\in \mathbf{D}(M):\\ \| \mathbf{u} - \mathbf{u}_{\ell^{(1)}}\|_{\infty}\leq 1 / M_{1}\\ \| \mathbf{v} - \mathbf{v}_{\ell^{(2)}}\|_{\infty}\leq 1 / M_{2}}}f(\mathbf{u},\mathbf{v})\left(\prod_{j = 1}^{r}(1 - M_{1}|u^{(j)} - u^{(j)}_{\ell^{(1)}}|)_{+}\right)\left(\prod_{j = 1}^{r_{\prime}}(1 - M_{2}|v^{(j)} - v^{(j)}_{\ell^{(2)}}|)_{+}\right) \\ \end{array} +$$ + +and with (32), + +$$ +\begin{array}{l} \left| P ^ {\beta , \beta_ {\prime}} f (\mathbf {u}, \mathbf {v}) - f (\mathbf {u}, \mathbf {v}) \right| \leq \max _ {\mathbf {u} _ {\ell^ {(1)}}, \mathbf {v} _ {\ell^ {(2)}} \in \mathbf {D} (M):} \left| P _ {\mathbf {u} _ {\ell^ {(1)}}, \mathbf {v} _ {\ell^ {(2)}}} ^ {\beta , \beta_ {\prime}} f (\mathbf {u}, \mathbf {v}) - f (\mathbf {u}, \mathbf {v}) \right| \\ \begin{array}{l} \| \mathbf {u} - \mathbf {u} _ {\ell (1)} \| _ {\infty} \leq 1 / M _ {1} \\ \| \mathbf {v} - \mathbf {v} _ {\ell (2)} \| _ {\infty} \leq 1 / M _ {2} \end{array} \\ \leq K \left(M _ {1} ^ {- \beta} \vee M _ {2} ^ {- \beta_ {\prime}}\right) = K M ^ {- \widetilde {\beta}}. \\ \end{array} +$$ + +![](images/ba83e0eb211ba241838e60689094de111567b78570e028df35a0fe1ea7a2b735.jpg) + +In the next few steps, we describe how to build a network that approximates $P^{\beta, \beta_{t}} f$ . + +Lemma 6. Let $M, m$ , be any positive integer. Denote $M_1 = M^{\widetilde{\beta} / \beta}$ , $M_2 = M^{\widetilde{\beta} / \beta'}$ , $M = (M_1 + 1)^r (M_2 + 1)^{r'}$ and $r_{\mathrm{sum}} = r + r'$ . Then there exists a network + +$$ +\operatorname {H a t} ^ {\mathrm {r} _ {\text {s u m}}} \in \mathcal {F} (2 + (m + 5) \lceil \log_ {2} (\mathrm {r} _ {\text {s u m}}) \rceil , \mathrm {r} _ {\text {s u m}}, 2 \mathrm {r} _ {\text {s u m}} \mathrm {M}, \mathrm {r} _ {\text {s u m}} \mathrm {M}, 6 \mathrm {r} _ {\text {s u m}} \mathrm {M}, \dots , 6 \mathrm {r} _ {\text {s u m}} \mathrm {M}, \mathrm {M}), s, 1) +$$ + +with $s \leq 37\mathsf{r}_{\mathrm{sum}}^2\mathsf{M}(m + 5)\lceil \log_2(\mathsf{r}_{\mathrm{sum}})\rceil$ , such that $\mathrm{Hat}^r \in [0,1]^{\mathbb{M}}$ and for any $\mathbf{u} = (u^{(1)},\dots,u^{(j)}) \in [0,1]^r$ and for any $\mathbf{v} = (v^{(1)},\dots,v^{(j)}) \in [0,1]^{r'}$ + +$$ +\begin{array}{l} \left| \operatorname {H a t} ^ {r _ {\text {s u m}}} (\mathbf {u}, \mathbf {v}) - \left\{\left(\prod_ {j = 1} ^ {r} \left(1 / M _ {1} - | u ^ {(j)} - u _ {\ell^ {(1)}} ^ {(j)} |\right) _ {+}\right) \times \right. \right. \\ \left. \left(\prod_ {j = 1} ^ {r _ {\prime}} (1 / M _ {2} - | v ^ {(j)} - v _ {\ell^ {(2)}} ^ {(j)} |) _ {+}\right) \right\} _ {\mathbf {u} _ {\ell^ {(1)}}, \mathbf {v} _ {\ell^ {(2)}} \in \mathbf {D} (M)} \Bigg | _ {\infty} \leq r _ {\mathrm {s u m}} ^ {2} 2 ^ {- m}. \\ \end{array} +$$ + +For any $\mathbf{u}_{\ell^{(1)}},\mathbf{v}_{\ell^{(2)}}\in \mathbf{D}(M)$ , the support of the function $(\mathbf{u},\mathbf{v})\mapsto (\mathrm{Hat}^{r + r_{\prime}}(\mathbf{u},\mathbf{v}))_{\mathbf{u}_{\ell^{(1)}},\mathbf{v}_{\ell^{(2)}}}$ is moreover contained in the support of the function + +$$ +(\mathbf {u}, \mathbf {v}) \mapsto \left\{\left(\prod_ {j = 1} ^ {r} (1 / M - | u ^ {(j)} - u _ {\boldsymbol {\ell} ^ {(1)}} ^ {(j)} |) _ {+}\right) \left(\prod_ {j = 1} ^ {r _ {\prime}} (1 / M - | v ^ {(j)} - v _ {\boldsymbol {\ell} ^ {(2)}} ^ {(j)} |) _ {+}\right) \right\}. +$$ + +Proof. Step 1: (For $r + r_{\prime} = 1$ ) Without loss of generality we consider the case when $r = 1$ and $r_{\prime} = 0$ . We compute the functions $\{(u^{(j)} - \ell /M_1)_+\}_{j = 1,\ell = 0}^{r,M_1}$ and $\{(\ell /M_1 - u^{(j)})_+\}_{j = 1,\ell = 0}^{r,M_1}$ for the first hidden layer of the network. This requires $2r(M_{1} + 1)$ units (nodes) and $2r(M_{1} + 1)$ non-zero parameters. + +For the second hidden layer we compute the functions $(1 / M_1 - |u^{(j)} - \ell /M_1|)_{+} = (1 / M_1 - (u^{(j)} - \ell /M_1)_+ - (\ell /M_1 - u^{(j)})_+)$ using the output $(u^{(j)} - \ell /M_1)_+$ and $(\ell /M_1 - u^{(j)})_+$ from the output of the first hidden layer. This requires $r(M_1 + 1) + r_r(M_2 + 1)$ units (nodes) and $2r(M_1 + 1)$ non-zero parameters. This proves the result for the base case when $r + r_r = 1$ + +Step 2: For $r + r_{t} > 1$ , we compose the obtained network with networks that approximately compute the following + +$$ +\left\{\left(\prod_ {j = 1} ^ {r} (1 / M _ {1} - | u ^ {(j)} - u _ {\boldsymbol {\ell} ^ {(1)}} ^ {(j)} |) _ {+}\right) \left(\prod_ {j = 1} ^ {r _ {\prime}} (1 / M _ {2} - | v ^ {(j)} - v _ {\boldsymbol {\ell} ^ {(2)}} ^ {(j)} |) _ {+}\right) \right\} _ {\mathbf {u} _ {\boldsymbol {\ell} ^ {(1)}}, \mathbf {v} _ {\boldsymbol {\ell} ^ {(2)}} \in \mathbf {D} (M)}. +$$ + +For fixed $\mathbf{u}_{\ell^{(1)}}$ and $\mathbf{v}_{\ell^{(2)}}$ , and from the use of Lemma 8 there exist $\mathrm{Mult}_m^{r + r'}$ networks in the class + +$$ +\mathcal {F} \left(2 + (m + 5) \lceil \log_ {2} (r + r _ {\prime}) \rceil , (r + r _ {\prime}, 2 (r + r _ {\prime}), r + r _ {\prime}, 6 (r + r _ {\prime}), 6 (r + r _ {\prime}), \dots , 6 (r + r _ {\prime}), 1)\right) +$$ + +computing $(\prod_{j=1}^{r}(1 / M_1 - |u^{(j)} - u_{\ell^{(1)}}|)_+)\times (\prod_{j=1}^{r'}(1 / M_2 - |v^{(j)} - v_{\ell^{(2)}}|)_+)$ up to an error that is bounded by $(r + r')^2 2^{-m}$ . Observe that we have two extra hidden layers to compute $(1 / M_1 - |u^{(j)} - u_{\ell^{(1)}}|)_+)$ and $(1 / M_2 - |v^{(j)} - v_{\ell^{(2)}}|)_+)$ for fixed $\mathbf{u}_{\ell^{(1)}}$ and $\mathbf{v}_{\ell^{(2)}}$ respectively, before we enter into the multinomial computation by regime invoking Lemma 8. Observe that the number of parameters in this network is upper bounded by $37(r + r')^2 (m + 5)\lceil \log_2(r + r') \rceil$ . + +Now we use the parallelization technique to have $(M_1 + 1)^r \cdot (M_1 + 1)^r$ parallel architecture for all elements of $\mathbf{D}(M)$ . This provides the existence of the network with the number of non-zero parameters bounded by $37(r + r_r)^2 (M_1 + 1)^r (M_2 + 1)^{r'}(m + 5)\lceil \log_2(r + r_r)\rceil$ + +By Lemma 8, for any $\mathbf{x} \in \mathbb{R}^r$ , $\mathrm{Mult}_m^r(\mathbf{x}) = 0$ if one of the components of $\mathbf{x}$ is zero. This shows that for any $\mathbf{u}_{\ell^{(1)}}, \mathbf{v}_{\ell^{(2)}} \in \mathbf{D}(M)$ , the support of the function $(\mathbf{u}, \mathbf{v}) \mapsto (\mathrm{Hat}^{r + r'}(\mathbf{u}, \mathbf{v}))_{\mathbf{u}_{\ell^{(1)}}, \mathbf{v}_{\ell^{(2)}}}$ is contained in the support of the function $(\mathbf{u}, \mathbf{v}) \mapsto \left(\prod_{j=1}^{r} (1 / M - |u^{(j)} - u_{\ell^{(1)}}^{(j)})|) + \prod_{j=1}^{r'} (1 / M - |v^{(j)} - v_{\ell^{(2)}}^{(j)})|\right)$ . + +Proof of Theorem 5. All the constructed networks in this proof are of the form $\mathcal{F}(L,\mathbf{p},s) = \mathcal{F}(L,\mathbf{p},s,\infty)$ with $F = \infty$ . Denote $M_{1} = M^{\widetilde{\beta} /\beta}$ , $M_2 = M^{\widetilde{\beta} /\beta '}$ , $\beta_{\mathrm{sum}} = \beta +\beta_{t}$ , and $\mathsf{r}_{\mathrm{sum}} = r + r_{t}$ . Let $M$ be the largest integer such that $\mathsf{M} = (M_1 + 1)^r (M_2 + 1)^{r'}\leq N$ and define $L^{*}\coloneqq (m + 5)\lceil \log_{2}(\beta_{\mathrm{sum}}\lor \mathsf{r}_{\mathrm{sum}})\rceil$ . Thanks to (34), (33) and Lemma 9, we can add one hidden layer to the network $\mathrm{Mon}_{m,\beta_{\mathrm{sum}}}^{\mathsf{r}_{\mathrm{sum}}}$ to obtain a network + +$$ +Q _ {1} \in \mathcal {F} \left(2 + L ^ {*}, (r, 6 \lceil \beta \rceil C _ {\mathrm {r} _ {\text {s u m}}, \beta_ {\text {s u m}}}, \dots , 6 \lceil \beta \rceil C _ {\mathrm {r} _ {\text {s u m}}, \beta_ {\text {s u m}}}, C _ {\mathrm {r} _ {\text {s u m}}, \beta_ {\text {s u m}}}, \mathrm {M})\right), +$$ + +such that $Q_{1}(\mathbf{u},\mathbf{v})\in [0,1]^{\mathsf{M}}$ and for any $\mathbf{u}\in [0,1]^{r}$ and for any $\mathbf{v}\in [0,1]^{r'}$ + +$$ +\left| Q _ {1} (\mathbf {u}, \mathbf {v}) - \left(\frac {P ^ {\beta , \beta_ {\prime}} f (\mathbf {u} , \mathbf {v})}{B} + \frac {1}{2}\right) _ {\mathbf {u} _ {\ell^ {(1)}}, \mathbf {v} _ {\ell^ {(2)}} \in \mathbf {D} (M)} \right| _ {\infty} \leq \beta_ {\text {s u m}} ^ {2} 2 ^ {- m} \tag {36} +$$ + +with $B \coloneqq \lceil 2Ke^{\mathbf{r}_{\mathrm{sum}}}\rceil$ . The total number of non-zero parameters in the $Q_{1}$ network is $6\mathrm{r}_{\mathrm{sum}}(\beta_{\mathrm{sum}} + 1)C_{\mathrm{r}_{\mathrm{sum}},\beta_{\mathrm{sum}}} + 42(\beta_{\mathrm{sum}} + 1)^{2}C_{\mathrm{r}_{\mathrm{sum}},\beta_{\mathrm{sum}}}^{2}(L^{*} + 1) + C_{\mathrm{r}_{\mathrm{sum}},\beta_{\mathrm{sum}}}\mathsf{M}$ . + +Recall that the network $\mathrm{Hat}^{\mathbf{r}_{\mathrm{sum}}}$ computes the products of hat functions (splines) $(\prod_{j=1}^{r}(1/M_1 - |u^{(j)} - u_{\ell^{(1)}}|)_+)(\prod_{j=1}^{r'}(1/M_2 - |v^{(j)} - v_{\ell^{(2)}}|)_+)$ up to an error that is bounded by $\mathbf{r}_{\mathrm{sum}}^2 2^{-m}$ . It requires at most $37\mathbf{r}_{\mathrm{sum}}^2 NL^*$ active parameters. Observe that $C_{\mathbf{r}_{\mathrm{sum}}, \beta_{\mathrm{sum}}} \leq (\beta_{\mathrm{sum}} + 1)^{\mathbf{r}_{\mathrm{sum}}} \leq N$ by the definition of $C_{r,\beta}$ and the assumptions on $N$ . By Lemma 6, the networks $Q_1$ and $\mathrm{Hat}^{\mathbf{r}_{\mathrm{sum}}}$ can be embedded into a joint parallel network $(Q_1, \mathrm{Hat}^{\mathbf{r}_{\mathrm{sum}}})$ with $2 + L^*$ hidden layers of size $(\mathbf{r}_{\mathrm{sum}}, 6(\mathbf{r}_{\mathrm{sum}} + \lceil \beta_{\mathrm{sum}} \rceil)N, \ldots, 6(\mathbf{r}_{\mathrm{sum}} + \lceil \beta_{\mathrm{sum}} \rceil)N, 2M)$ . Using $C_{r,\beta} \vee (M + 1)^r \leq N$ again, the number of non-zero parameters in the combined network $(Q_1, \mathrm{Hat}^r)$ is bounded by + +$$ +\begin{array}{l} 6 \mathsf {r} _ {\mathrm {s u m}} (\beta_ {\mathrm {s u m}} + 1) C _ {\mathsf {r} _ {\mathrm {s u m}}, \beta_ {\mathrm {s u m}}} + 4 2 (\beta_ {\mathrm {s u m}} + 1) ^ {2} C _ {\mathsf {r} _ {\mathrm {s u m}}, \beta_ {\mathrm {s u m}}} ^ {2} (L ^ {*} + 1) + C _ {\mathsf {r} _ {\mathrm {s u m}}, \beta_ {\mathrm {s u m}}} \mathsf {M} + 3 7 \mathsf {r} _ {\mathrm {s u m}} ^ {2} N L ^ {*} \\ \leq 4 2 \left(\mathrm {r} _ {\text {s u m}} + \beta_ {\text {s u m}} + 1\right) ^ {2} C _ {\mathrm {r} _ {\text {s u m}}, \beta_ {\text {s u m}}} N \left(1 + L ^ {*}\right) \tag {37} \\ \leq 8 4 \left(\mathrm {r} _ {\text {s u m}} + \beta_ {\text {s u m}} + 1\right) ^ {3 + \mathrm {r} _ {\text {s u m}}} N (m + 5), \\ \end{array} +$$ + +where for the last inequality, we used $C_{\mathbf{r}_{\mathrm{sum}}, \beta_{\mathrm{sum}}} \leq (\beta_{\mathrm{sum}} + 1)^{\mathbf{r}_{\mathrm{sum}}}$ , the definition of $L^*$ and that for any $x \geq 1$ , $1 + \lceil \log_2(x) \rceil \leq 2 + \log_2(x) \leq 2(1 + \log(x)) \leq 2x$ . + +Next, we pair the $(\mathbf{u}_{\ell^{(1)}},\mathbf{v}_{\ell^{(2)}})$ -th entry of the output of $Q_{1}$ and $\mathrm{Hat}^r$ and apply to each of the M pairs the Multm network described in Lemma 7. In the last layer, we add all entries. By Lemma 7 this requires at most $24(m + 5)\mathsf{M} + \mathsf{M}\leq 25(m + 5)N$ active parameters for the M multiplications and the sum. Using Lemma 7, Lemma 6, (36) and triangle inequality, there exists a network $Q_{2}\in \mathcal{F}(2 + L^{*} + m + 6,\left(\mathsf{r}_{\mathrm{sum}},6(\mathsf{r}_{\mathrm{sum}} + \lceil \beta_{\mathrm{sum}}\rceil)\right)N,\ldots ,6(\mathsf{r}_{\mathrm{sum}} + \lceil \beta_{\mathrm{sum}}\rceil)N,1))$ such that for any $\mathbf{u}\in [0,1]^r$ and for any $\mathbf{v}\in [0,1]^{r'}$ + +$$ +\left| Q _ {2} (\mathbf {u}, \mathbf {v}) - \sum_ {\mathbf {u} _ {\ell^ {(1)}}, \mathbf {v} _ {\ell^ {(2)}} \in \mathbf {D} (M)} \left(\frac {P ^ {\beta , \beta_ {t}} f (\mathbf {u} , \mathbf {v})}{B} + \frac {1}{2}\right) \left(\prod_ {j = 1} ^ {r} \left(1 / M _ {1} - | u ^ {(j)} - u _ {\ell^ {(1)}} ^ {(j)} |\right) _ {+}\right) \right. +$$ + +$$ +\left. \left(\prod_ {j = 1} ^ {r,} (1 / M _ {2} - | v ^ {(j)} - v _ {\boldsymbol {\ell} ^ {(2)}} ^ {(j)} |) _ {+}\right) \right| +$$ + +$$ +\leq \sum_{\substack{\mathbf{u}_{\boldsymbol {\ell}^{(1)}},\mathbf{v}_{\boldsymbol{\ell}^{(2)}}\in \mathbf{D}(M):\\ \| \mathbf{u} - \mathbf{u}_{\boldsymbol{\ell}^{(1)}}\|_{\infty}\leq 1 / M_{1}\\ \| \mathbf{v} - \mathbf{v}_{\boldsymbol{\ell}^{(2)}}\|_{\infty}\leq 1 / M_{2}}}(1 + r_{\text{sum}}^{2} + \beta_{\text{sum}}^{2})2^{-m} +$$ + +$$ +\leq \left(1 + r _ {\text {s u m}} ^ {2} + \beta_ {\text {s u m}} ^ {2}\right) 2 ^ {r - m}. \tag {38} +$$ + +Here, the first inequality follows from the fact that the support of $(\mathrm{Hat}^{r + r_{\ell}}(\mathbf{u},\mathbf{v}))_{\mathbf{u}_{\ell (1)},\mathbf{v}_{\ell (2)}}$ is contained in the support of $\left(\prod_{j = 1}^{r}(1 / M - |u^{(j)} - u_{\ell^{(1)}}^{(j)})| + \prod_{j = 1}^{r'}(1 / M - |v^{(j)} - v_{\ell^{(2)}}^{(j)})|_+\right)$ (see Lemma 6). Because of (37), the network $Q_{2}$ has at most + +$$ +1 0 9 \left(\mathrm {r} _ {\text {s u m}} + \beta_ {\text {s u m}} + 1\right) ^ {3 + \mathrm {r} _ {\text {s u m}}} N (m + 5) \tag {39} +$$ + +non-zero parameters. + +To obtain a network reconstruction of the function $f$ , it remains to scale and shift the output entries. This is not entirely trivial because of the bounded parameter weights in the network. Recall that $B = \lceil 2Ke^{r} \rceil$ . The network $x \mapsto BM_1^r M_2^{r'}x$ is in the class $\mathcal{F}(3, (1, M_1^r M_2^{r'}, 1, \lceil 2Ke^r \rceil, 1))$ with shift vectors $\mathbf{v}_j$ are all equal to zero and weight matrices $W_j$ with all entries equal to one. Because of $N \geq (K + 1)e^{\mathrm{rsum}}$ , the number of parameters of this network is bounded by $2M_1^r M_2^{r'} + 2\lceil 2Ke^r \rceil \leq 6N$ . This shows existence of a network in the class $\mathcal{F}(4, (1, 2, 2M_1^r M_2^{r'}, 2, 2\lceil 2Ke^r \rceil, 1))$ computing $a \mapsto BM_1^r M_2^{r'}(a - c)$ with $c := 1 / (2M_1^r M_2^{r'})$ . This network computes in the first hidden layer $(a - c)_+$ and $(c - a)_+$ and then applies the network $x \mapsto BM_1^r M_2^{r'}x$ to both units. In the output layer, the second value is subtracted from the first one. This requires at most $6 + 12N$ active parameters. + +Because of (38) and (35), there exists a network $Q_{3}$ in + +$$ +\mathcal {F} \big ((m + 1 3) + L ^ {*}, (\mathrm {r} _ {\text {s u m}}, 6 (\mathrm {r} _ {\text {s u m}} + \lceil \beta_ {\text {s u m}} \rceil)) N, \dots , 6 (\mathrm {r} _ {\text {s u m}} + \lceil \beta_ {\text {s u m}} \rceil) N, 1) \big) +$$ + +such that + +$$ +\left| Q _ {3} (\mathbf {u}, \mathbf {v}) - \sum_ {\mathbf {u} _ {\ell^ {(1)}}, \mathbf {v} _ {\ell^ {(2)}} \in \mathbf {D} (M)} P ^ {\beta , \beta_ {\prime}} f (\mathbf {u}, \mathbf {v}) \left(\prod_ {j = 1} ^ {r} \left(1 / M _ {1} - | u ^ {(j)} - u _ {\ell^ {(1)}} ^ {(j)} |\right) _ {+}\right) \right. +$$ + +$$ +\left(\prod_ {j = 1} ^ {r _ {\prime}} (1 / M _ {2} - | v ^ {(j)} - v _ {\ell^ {(2)}} ^ {(j)} |) _ {+}\right) \Bigg | +$$ + +$$ +\leq (2 K + 1) M _ {1} ^ {r} M _ {2} ^ {r _ {\prime}} \left(1 + r _ {\text {s u m}} ^ {2} + \beta_ {\text {s u m}} ^ {2}\right) \left(2 e\right) ^ {r _ {\text {s u m}}} 2 ^ {- m}, \quad \text {f o r a l l} (\mathbf {u}, \mathbf {v}) \in [ 0, 1 ] ^ {r _ {\text {s u m}}}. +$$ + +With (39), the number of non-zero parameters of $Q_{3}$ is bounded by + +$$ +1 0 9 (\mathbf {r} _ {\mathrm {s u m}} + \boldsymbol {\beta} _ {\mathrm {s u m}} + 1) ^ {3 + \mathbf {r} _ {\mathrm {s u m}}} N (m + 6). +$$ + +Observe that by construction $\mathsf{M} = (M_1 + 1)^r (M_2 + 1)^{r'}\leq N\leq (3M_1)^r (3M_2)^{r'} = 3^{\mathsf{r}_{\mathrm{sum}}}M^{\widetilde{r}}$ and hence $M^{-\widetilde{\beta}}\leq$ $N^{-\widetilde{\beta} /\widetilde{r}}3^{\mathsf{r}_{\mathrm{sum}}\widetilde{\beta} /\widetilde{r}}$ . Together with Lemma 5, the result follows. + +# L.1. Embedding properties of neural network function classes + +We denote $\mathcal{F}(L,\pmb {p})$ as the class of neural networks with $L$ hidden layers and $\pmb {p}\in \mathbb{N}^{L + 2}$ nodes per layer. The class $\mathcal{F}(L,\pmb {p})$ is subset of $\mathcal{F}(L,\pmb {p})$ with the sparsity parameter $s$ . + +For the approximation of a function by a network, we first construct smaller networks computing simpler objects. Let $\mathbf{p} = (p_0,\dots ,p_{L + 1})$ and $\mathbf{p}' = (p_0',\dots ,p_{L + 1}')$ . To combine networks, we make frequent use of the following rules. + +Enlarging: $\mathcal{F}(L, \mathbf{p}, s) \subseteq \mathcal{F}(L, \mathbf{q}, s')$ whenever $\mathbf{p} \leq \mathbf{q}$ componentwise and $s \leq s'$ . + +Composition: Suppose that $f \in \mathcal{F}(L, \mathbf{p})$ and $g \in \mathcal{F}(L', \mathbf{p}')$ with $p_{L+1} = p_0'$ . For a vector $\mathbf{v} \in \mathbb{R}^{p_L + 1}$ we define the composed network $g \circ \sigma_{\mathbf{v}}(f)$ which is in the space $\mathcal{F}(L + L' + 1, (\mathbf{p}, p_1', \dots, p_{L' + 1}')$ . In most of the cases that we consider, the output of the first network is non-negative and the shift vector $\mathbf{v}$ will be taken to be zero. + +Additional layers/depth synchronization: To synchronize the number of hidden layers for two networks, we can add additional layers with an identity weight matrix, such that + +$$ +\mathcal {F} (L, \mathbf {p}, s) \subset \mathcal {F} (L + q, (\underbrace {p _ {0} , \dots , p _ {0}} _ {q \text {t i m e s}}, s + q p _ {0}). \tag {40} +$$ + +Parallelization: Suppose that $f, g$ are two networks with the same number of hidden layers and the same input dimension, that is, $f \in \mathcal{F}(L, \mathbf{p})$ and $g \in \mathcal{F}(L, \mathbf{p}^{\prime})$ with $p_0 = p_0'$ . The parallelized network $(f, g)$ computes $f$ and $g$ simultaneously in a joint network in the class $\mathcal{F}(L, (p_0, p_1 + p_1', \dots, p_{L+1} + p_{L+1}'))$ . + +# L.2. Technical lemmas for the proof of Theorem 5 + +We use $\mathcal{F}(L,\mathbf{r})$ to denote a fully connected network with $L$ deep layers and $\mathbf{r}\in \mathbb{N}_0^{L + 2}$ representing the nodes in each layer. + +The following technical lemmas are required for the proof of Theorem 5. Lemma 7, Lemma 8, and Lemma 9 restate Lemma A.2, Lemma A.3, and Lemma A.4 from (Schmidt-Hieber, 2020), respectively. + +Lemma 7. For any positive integer $m$ , there exists a network $\mathrm{Mult}_m \in \mathcal{F}(m + 4, (2,6,6,\ldots,6,1))$ , such that $\mathrm{Mult}_m(x,y) \in [0,1]$ , + +$$ +\left| \operatorname {M u l t} _ {m} (x, y) - x y \right| \leq 2 ^ {- m}, \quad f o r a l l x, y \in [ 0, 1 ], +$$ + +and $\mathrm{Mult}_m(0,y) = \mathrm{Mult}_m(x,0) = 0$ + +Lemma 8. For any positive integer $m$ , there exists a network + +$$ +\operatorname {M u l t} _ {m} ^ {r} \in \mathcal {F} ((m + 5) \lceil \log_ {2} r \rceil , (r, 6 r, 6 r, \dots , 6 r, 1)) +$$ + +such that $\mathrm{Mult}_m^r\in [0,1]$ and + +$$ +\left| \operatorname {M u l t} _ {m} ^ {r} (\mathbf {x}) - \prod_ {i = 1} ^ {r} x _ {i} \right| \leq r ^ {2} 2 ^ {- m}, \quad f o r a l l \mathbf {x} = (x _ {1}, \dots , x _ {r}) \in [ 0, 1 ] ^ {r}. +$$ + +Moreover, $\mathrm{Mult}_m^r (\mathbf{x}) = 0$ if one of the components of $\mathbf{x}$ is zero. + +The number of monomials with degree $|\alpha| < \gamma$ is denoted by $C_{r,\gamma}$ . Obviously, $C_{r,\gamma} \leq (\gamma + 1)^r$ since each $\alpha_i$ has to take values in $\{0, 1, \dots, \lfloor \gamma \rfloor\}$ . + +Lemma 9. For $\gamma >0$ and any positive integer $m$ , there exists a network + +$$ +\operatorname {M o n} _ {m, \gamma} ^ {r} \in \mathcal {F} \big (1 + (m + 5) \lceil \log_ {2} (\gamma \vee 1) \rceil , (r, 6 \lceil \gamma \rceil C _ {r, \gamma}, \dots , 6 \lceil \gamma \rceil C _ {r, \gamma}, C _ {r, \gamma}) \big), +$$ + +such that $\mathrm{Mon}_{m,\gamma}^r\in [0,1]^{C_{r,\gamma}}$ and + +$$ +\left| \operatorname {M o n} _ {m, \gamma} ^ {r} (\mathbf {x}) - \left(\mathbf {x} ^ {\boldsymbol {\alpha}}\right) _ {| \boldsymbol {\alpha} | < \gamma} \right| _ {\infty} \leq \gamma^ {2} 2 ^ {- m}, \quad f o r a l l \mathbf {x} \in [ 0, 1 ] ^ {r}. +$$ \ No newline at end of file diff --git a/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/images.zip b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..66f56d77861fc064463ed8f3fbd1a802554a5b61 --- /dev/null +++ b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2609d50505be99e9f78989847985c7e38431f4a44d723c76c5b7b6bc149b5aed +size 1348875 diff --git a/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/layout.json b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..58c12b7800012f397c0ff72af419180303d66649 --- /dev/null +++ b/alikelihoodbasedapproachtodistributionregressionusingconditionaldeepgenerativemodels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b58f53b02179cd5ddda1d0062548a53bfbbc1d940469998861e25fbb8937907a +size 1671496 diff --git a/amachinelearningapproachtodualityinstatisticalphysics/c94859fa-c78d-4d19-9ca0-c7fe5ab10733_content_list.json b/amachinelearningapproachtodualityinstatisticalphysics/c94859fa-c78d-4d19-9ca0-c7fe5ab10733_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..73e9cdb4a22a52a589b9d0959373e5807c90ed98 --- /dev/null +++ b/amachinelearningapproachtodualityinstatisticalphysics/c94859fa-c78d-4d19-9ca0-c7fe5ab10733_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed76556ac87213168f804ab5c07b40e24c28150d49d269667f99d52442603a2d +size 106942 diff --git a/amachinelearningapproachtodualityinstatisticalphysics/c94859fa-c78d-4d19-9ca0-c7fe5ab10733_model.json b/amachinelearningapproachtodualityinstatisticalphysics/c94859fa-c78d-4d19-9ca0-c7fe5ab10733_model.json new file mode 100644 index 0000000000000000000000000000000000000000..03d60b2461e62c7bc0b23caf5f41fec27802d268 --- /dev/null +++ b/amachinelearningapproachtodualityinstatisticalphysics/c94859fa-c78d-4d19-9ca0-c7fe5ab10733_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e1069463bc827fefa86d7d24bc151c6f2334f5ab247ca3814eac758fcf3ad28 +size 128693 diff --git a/amachinelearningapproachtodualityinstatisticalphysics/c94859fa-c78d-4d19-9ca0-c7fe5ab10733_origin.pdf b/amachinelearningapproachtodualityinstatisticalphysics/c94859fa-c78d-4d19-9ca0-c7fe5ab10733_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d811ed645073fc953a0dfe43f2c84be2f8abc825 --- /dev/null +++ b/amachinelearningapproachtodualityinstatisticalphysics/c94859fa-c78d-4d19-9ca0-c7fe5ab10733_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8540f4ae92d9584c374c25f53503b0c9894693ac6be1307b9c45d16cdd7893cf +size 11125857 diff --git a/amachinelearningapproachtodualityinstatisticalphysics/full.md b/amachinelearningapproachtodualityinstatisticalphysics/full.md new file mode 100644 index 0000000000000000000000000000000000000000..15051c6890b6644a5bda78651f30356aeb5f0053 --- /dev/null +++ b/amachinelearningapproachtodualityinstatisticalphysics/full.md @@ -0,0 +1,508 @@ +# A Machine Learning Approach to Duality in Statistical Physics + +Prateek Gupta1 Andrea E. V. Ferrari23 Nabil Iqbal45 + +# Abstract + +The notion of duality – that a given physical system can have two different mathematical descriptions – is a key idea in modern theoretical physics. Establishing a duality in lattice statistical mechanics models requires the construction of a dual Hamiltonian and a map from the original to the dual observables. By using neural networks to parameterize these maps and introducing a loss function that penalises the difference between correlation functions in original and dual models, we formulate the process of duality discovery as an optimization problem. We numerically solve this problem and show that our framework can rediscover the celebrated Kramers-Wannier duality for the 2d Ising model, numerically reconstructing the known mapping of temperatures. We further investigate the 2d Ising model deformed by a plaquette coupling and find families of “approximate duals”. We discuss future directions and prospects for discovering new dualities within this framework. + +# 1. Background + +A key concept in physics is duality, i.e. the idea that the same physical system can have two different mathematical descriptions. Duality sits at the heart of modern theoretical physics. In this work we seek to formalize the notion of duality in statistical physics in a manner that allows modern machine learning techniques to be used to systematically search for dualities. + +*Equal contribution 1Max Planck Institute for Human Development, Berlin, Germany 2Deutsches Elektronen-Synchrotron DESY, Germany 3School of Mathematics, The University of Edinburgh 4Department of Mathematical Sciences, Durham University, UK 5Amsterdam Machine Learning Laboratory, University of Amsterdam, Netherlands. Correspondence to: Prateek Gupta . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +$^{1}$ Our implementation is publicly available at https://github.com/pg2455/physics_duality + +Background on duality: Consider a statistical physics model with microstates $\sigma$ and Hamiltonian functional $H[\beta, \sigma]$ , where $\beta$ are macroparameters such as the temperature. The model is determined by its partition function $Z = \sum_{\sigma} e^{-H[\beta, \sigma]}$ . However, in nature we often have access to sets of expectation values of observables $O_{\alpha}(\sigma)$ (some real-valued functions of the microstates, e.g. correlation functions, with $\alpha$ being an arbitrary label) + +$$ +\langle O _ {\alpha} (\sigma) \rangle_ {H} = \frac {1}{Z} \sum_ {\sigma} O _ {\alpha} (\sigma) \exp (- H [ \beta , \sigma ]). \tag {1} +$$ + +It is a profound physical fact that occasionally there are alternative representations of these sets of correlation functions (see e.g. (Savit, 1980; Kramers & Wannier, 1941b;a; Peskin, 1978; Dasgupta & Halperin, 1981; Coleman, 1975; Wegner, 1971) for influential examples). That is, there exists another set of microstates $\tilde{\sigma}$ , another Hamiltonian $\tilde{H}[\tilde{\beta},\tilde{\sigma}]$ and for each observable $O_{\alpha}(\sigma)$ a dual observable $\tilde{O}_{\alpha}(\tilde{\sigma}_i)$ such that + +$$ +\left\langle O _ {\alpha} (\sigma) \right\rangle_ {H} = \left\langle \tilde {O} _ {\alpha} (\tilde {\sigma}) \right\rangle_ {\tilde {H}}. \tag {2} +$$ + +When this happens, we have a duality—the same physical system has at least two distinct mathematical descriptions, which may be useful for different reasons. + +A prototypical example of such a duality is Kramers-Wannier duality for the 2d Ising model (Kramers & Wannier, 1941b). The 2d Ising model consists of spins $\sigma_{i} = \pm 1$ living on the sites of a square lattice at temperature $\beta^{-1}$ , with Hamiltonian that sums over neighbouring spins $\langle ij\rangle$ + +$$ +H [ \beta , \sigma ] = - \beta \sum_ {\langle i j \rangle} \sigma_ {i} \sigma_ {j}. \tag {3} +$$ + +It is a remarkable fact that the model described by (3) is precisely equivalent to a different 2d Ising model model with spins $\tilde{\sigma}_i = \pm 1$ living on the dual lattice, with a dual Hamiltonian of the same functional form + +$$ +\tilde {H} [ \tilde {\beta}, \tilde {\sigma} ] = - \tilde {\beta} \sum_ {\langle i j \rangle} \tilde {\sigma} _ {i} \tilde {\sigma} _ {j} \tag {4} +$$ + +but with $\tilde{\beta}$ satisfying + +$$ +\sinh (2 \beta) \sinh (2 \tilde {\beta}) = 1. \tag {5} +$$ + +![](images/17e98426dec58798031313f0a946beb7597eee3086b148cd7bf97be11b3f0fae.jpg) +Figure 1. The two-point product of spins in the original frame $\sigma_{i}\sigma_{j}$ is related to the product of spins $\tilde{\sigma}_{i^{*}}\tilde{\sigma}_{j^{*}}$ in the dual frame, where $i^{*},j^{*}$ are related to $ij$ as shown. + +Note that this maps low temperatures to high temperatures. The fact that the functional form of the Hamiltonian is the same is exceptional, and in this case one can call the duality a self-duality. + +Importantly, all observables constructed from the $\sigma_{i}$ can be mapped to observables of the $\tilde{\sigma}_{i}$ . Consider for instance two neighbouring spins $\sigma_{i}$ and $\sigma_{j}$ . We can build an observable $O_{ij} = \sigma_i\sigma_j$ , which we call a link product. Then the KW duality implies that + +$$ +\left\langle O _ {i j} \dots \right\rangle_ {H} = \left\langle \tilde {O} _ {i j} (\tilde {\sigma}) \dots \right\rangle_ {\tilde {H}}, \quad \tilde {O} _ {i j} (\tilde {\sigma}) = e ^ {- 2 \tilde {\beta} \tilde {\sigma} _ {i *} \tilde {\sigma} _ {j *}} \tag {6} +$$ + +where the notation $\tilde{\sigma}_{i*}$ refers to sites on the dual lattice such that the link connecting sites $i^*$ and $j^*$ intersects the link connecting $i$ and $j$ , as shown in Figure 1. The $\cdots$ indicate that this is an operator equation which holds for arbitrary insertions of operators and thus can be used to construct any expectation value of an even number of the $\sigma_{i}$ . Appropriate products of the link products determine all correlation functions. $^3$ + +Deformations of this prototypical duality have explicitly been studied in some special cases (Strycharski & Koza, 2013; Cobanera et al., 2011; Aasen et al., 2016). However, even in this controlled setup a lot remains to be understood and a fully systematic approach is not available. For instance, to our knowledge an explicit study of dual models to the plaquette model + +$$ +H [ \beta , \sigma ] = - \beta \sum_ {\langle i j \rangle} \sigma_ {i} \sigma_ {j} - \kappa \sum_ {\langle i j k l \rangle} \sigma_ {i} \sigma_ {j} \sigma_ {k} \sigma_ {l}, \tag {7} +$$ + +where the second sum is a sum over plaquettes (squares) $\langleijkl\rangle$ , has not yet been performed. + +In this work we tackle the problem of finding statistical physics dualities using machine learning. In particular, starting from an original model $(H,O)$ determined by a Hamiltonian $H$ and selected observables $O$ , we formulate an optimization problem whose solution can recover both this model as well as dual descriptions $(\tilde{H},\tilde{O})$ . As a first step, we will focus on the 2d Ising model with Hamiltonian (3) and observable $O_{ij} = \sigma_i\sigma_j$ , as well as on the plaquette model (7). We demonstrate that the optimization problem recovers the known dual to the 2d Ising model, thus offering an automated discovery of a duality. We furthermore give evidence for the absence of certain self-dualities of the plaquette model. As we shall see, also this negative result highlights interesting physical features. + +Previous work: The problem of learning the parameters in a Hamiltonian from data is precisely that of training a Boltzmann machine, and has a very long history. Our case differs from the classical situation in that we are simultaneously learning a mapping of observables. + +Other work on using machine learning to probe dualities in statistical physics includes (Betzler & Krippendorf, 2020). Section 3 of that work has some overlap with ours, where the key differences are: (1) in that work the input into the duality mapping is spin configurations sampled in the original frame, after which a second step of sampling is done: this is not exactly the usual setup for duality in physics, where one usually just samples once (importantly, in a dual frame) and then performs a deterministic mapping, as in our work. (2) It seems that the loss function used in that work cannot be formulated unless the duality mapping of temperatures is known already, and thus that this work cannot be used to find new dualities, which our formalism allows. + +We also note work in the context of duality in quantum field theory (Bao et al., 2020). + +# 2. Methodology + +We now explain how, starting from the Hamiltonian $H[\beta, \sigma]$ of some statistical model on a lattice, we can learn candidates $\tilde{H}[\tilde{\beta}, \tilde{\sigma}]$ for dual models as well as a dictionary between original and dual observables. This includes learning the fact that the dual model is defined on a different lattice, such as the dual lattice. + +Framework and loss function: We assume that $\tilde{H}$ can be written in terms of local couplings of spins: + +$$ +\tilde {H} [ \tilde {\beta}, \tilde {\sigma} _ {i} ] = - \tilde {\beta} \sum_ {\langle i j \rangle} \tilde {\sigma} _ {i} \tilde {\sigma} _ {j} - \tilde {\kappa} \sum_ {\langle i j k l \rangle} \tilde {\sigma} _ {i} \tilde {\sigma} _ {j} \tilde {\sigma} _ {k} \tilde {\sigma} _ {l} - \dots \tag {8} +$$ + +![](images/676a43cb3648c5daf3032744e82a1a0b8bb41e327a225522361568faa5d3812f.jpg) +Figure 2. We parametrize $G$ as a neural network that takes neighboring links of a given link (in this case # 6) as its input. The assignment on horizontal links is related to that on vertical ones by a rotation and reflection. + +where the couplings $(\tilde{\beta},\tilde{\kappa},etc.)$ are parameters to be learned. We would like to find dual representations of the link products $O_{ij}$ we described for the Ising model. We assume that the link product in the original model is mapped to some functions of nearby link products in the dual model, more precisely + +$$ +\tilde {O} _ {i j} (\tilde {\sigma}) = G \left(\left\{\tilde {\sigma} _ {k} \tilde {\sigma} _ {l} \right\}\right) \tag {9} +$$ + +where $\{\tilde{\sigma}_k\tilde{\sigma}_l\}$ is a set of link products such as the one shown in Figure 2. + +$G$ is designed to be sufficiently flexible to recover models on lattices related in various ways to the original one. Note that a choice must be made about how to relate the assignment of link products neighbouring a horizontal link to the assignment of link products neighbouring a vertical link, as multiple choices are consistent with rotational invariance. In Figure 2 we display the choice used, which relates them by a rotation composed with a reflection. As we will see later, this choice is important for recovering the geometry of the dual lattice. + +We now construct a loss function $\mathcal{L}$ that is minimized when all correlation functions of $O_{ij}$ and $\tilde{O}_{ij}$ agree on the two sides of the duality. This is similar to the matching of moments of two distributions, which is a standard problem, and for which one can construct general kernels that are minimized only when all of the moments of two distributions agree (see e.g. (Li et al., 2015)). Unfortunately, in the present case we cannot use kernels because of one conceptual and one technical problem: 1) certain moments need not be matched, as per Footnote 2, and 2) no notion of locality is embedded in standard moment matching. In the present case, correlation functions of faraway spins carry little information, and thus attempting to match their moments is a waste of computation. + +![](images/e7edde3d87dd8b483095ba4654dc79893a6c64f120ae27a2a01063a5c6f3faf1.jpg) +Figure 3. Examples of three features showing link products considered. + +Instead we explicitly match features - i.e. moments of a small number of nearby link products, as shown in Figure 3 - which we then spatially average over the lattice. Denoting these features as $\phi^a$ with $a$ running over features, we then construct the loss + +$$ +\mathcal {L} (G, \tilde {H}) = \sum_ {a} \ell^ {a} \ell^ {a} \quad \ell^ {a} = \left\langle \phi^ {a} [ G (\tilde {\sigma} _ {i}) ] \right\rangle_ {\tilde {H}} - \left\langle \phi^ {a} [ \sigma_ {i} ] \right\rangle_ {H} \tag {10} +$$ + +$\ell^a$ can be thought of as a vector in feature space indicating how far apart the two theories are. + +For the 2d Ising model, it is clear that this loss can be minimized in two scenarios: (a) $\tilde{H} = H$ and $G(\tilde{\sigma}_i\tilde{\sigma}_j) = \tilde{\sigma}_i\tilde{\sigma}_j$ , i.e., the original model is rediscovered, or (b) $\tilde{H} \neq H$ and $G(\tilde{\sigma}_i\tilde{\sigma}_j) \neq \tilde{\sigma}_i\tilde{\sigma}_j$ , representing a nontrivial dual model where (selected) moments nevertheless perfectly match those of the original model. The plaquette model has no dual that is known explicitly. + +Optimization: We now need to solve the following optimization problem: + +$$ +G ^ {*}, \tilde {H} ^ {*} = \underset {G, \tilde {H}} {\arg \min } \mathcal {L} (G, \tilde {H}) \tag {11} +$$ + +$G$ is represented by a neural network with parameters $\theta$ , $G = G_{\theta}$ . + +Algorithm 1 outlines the procedure for optimization. Given a trial set of parameters $\theta$ and couplings for the dual Hamiltonian $\tilde{\beta}_a$ , we simultaneously perform Markov Chain Monte Carlo (MCMC) sampling from the original and dual Hamiltonians using a standard Metropolis algorithm to obtain spin configurations $\sigma_i$ and $\tilde{\sigma}_i$ drawn from the appropriate distributions respectively. We can then evaluate the expectation values in (10), and compute the loss $\mathcal{L}$ . + +To minimize it we also need to compute gradients $\partial_{\theta}\mathcal{L}$ and $\partial_{\tilde{\beta}_a}\mathcal{L}$ . For $\theta$ this can be done straightforwardly using conventional automatic differentiation techniques. For the $\tilde{\beta}_a$ we cannot backpropagate through a stochastic sampler, but explicit differentiation shows that we can relate the gradients to expectation values that can be evaluated through MCMC sampling from the dual Hamiltonian. For concreteness we demonstrate the argument with only a single nonzero coupling $\tilde{\beta}$ in (8), but the generalization to other couplings (and in particular the plaquette coupling $\tilde{\kappa}$ ) is immediate. For any + +function of spins $\mathcal{O}[\tilde{\sigma}]$ we have + +$$ +\langle \mathcal {O} \rangle_ {\tilde {H}} \equiv \frac {1}{Z (\tilde {\beta})} \sum_ {\{\tilde {\sigma} _ {i} \}} \mathcal {O} [ \tilde {\sigma} ] e ^ {\left(\tilde {\beta} \sum_ {\langle i j \rangle} \tilde {\sigma} _ {i} \tilde {\sigma} _ {j}\right)} \tag {12} +$$ + +where $Z(\tilde{\beta}) \equiv \sum_{\{\tilde{\sigma}_i\}} e^{\left(\tilde{\beta} \sum_{\langle ij \rangle} \tilde{\sigma}_i \tilde{\sigma}_j\right)}$ and the sum over $\{\sigma_i\}$ runs over all spin configurations. Now we have + +$$ +\partial_ {\tilde {\beta}} \mathcal {L} = 2 \sum_ {a} \ell^ {a} \partial_ {\tilde {\beta}} \left\langle \phi^ {a} \left[ G \left(\tilde {\sigma} _ {i}\right) \right] \right\rangle_ {\tilde {H}}, \tag {13} +$$ + +where we have used the definition of $\ell^a$ in (10). From (12) the gradient of any observable with respect to $\tilde{\beta}$ is + +$$ +\partial_ {\tilde {\beta}} \langle \mathcal {O} \rangle_ {\tilde {H}} = - \langle \mathcal {O} \rangle_ {\tilde {H}} \left\langle \sum_ {\langle i j \rangle} \tilde {\sigma} _ {i} \tilde {\sigma} _ {j} \right\rangle_ {\tilde {H}} + \sum_ {\langle i j \rangle} \left\langle \tilde {\sigma} _ {i} \tilde {\sigma} _ {j} \mathcal {O} \right\rangle_ {\tilde {H}} \tag {14} +$$ + +where the first term comes from differentiating $Z(\tilde{\beta})$ and the second from differentiating inside the Boltzmann measure weighting each configuration in (12). Using this expression to evaluate (14) for $\mathcal{O} = \phi^a [G(\tilde{\sigma}_i)]$ we find: + +$$ +\partial_ {\tilde {\beta}} \mathcal {L} = - 2 \sum_ {a} \ell^ {a} \left\langle \left(\sum_ {\langle i j \rangle} \tilde {\sigma} _ {i} \tilde {\sigma} _ {j} \right\rangle_ {\tilde {H}} - \sum_ {\langle i j \rangle} \tilde {\sigma} _ {i} \tilde {\sigma} _ {j}\right) \phi^ {a} [ G _ {\theta} (\tilde {\sigma}) \tag {15} +$$ + +We can now evaluate the expectation value by MCMC sampling from the dual Hamiltonian. We note that this evaluation is computationally expensive, as each gradient step requires us to equilibrate an MCMC chain. For training conventional Boltzmann machines one can use more efficient approaches such as contrastive divergence (Carreira-Perpinan & Hinton, 2005). Due to the presence of the mapping $G$ , we are not aware of a similarly efficient algorithm in our case, and indeed all likelihood-based approaches seem conceptually difficult. + +Algorithm 1 Machine learning for finding statistical mechanical duality + +1: Inputs: $\beta$ , $\eta$ (learning rate), $N$ (number of samples) +2: Initialize: $\tilde{\beta}_0\in \mathbb{R}$ $\theta \in \mathbb{R}^d$ +3: for each epoch $t = 1,2,\ldots ,T$ do +4: Draw $N$ samples $\{\sigma_i\}_{i = 1}^N\sim p(\sigma |\beta)$ +5: Draw $N$ samples $\{\tilde{\sigma}_i\}_{i = 1}^N\sim p(\tilde{\sigma} |\tilde{\beta})$ where $\tilde{\beta}\neq \beta$ +6: Compute the loss $\mathcal{L} = \frac{1}{N}\sum_{i = 1}^{N}\mathcal{L}(\sigma_i,G_\theta (\tilde{\sigma}_i))$ +7: Compute the gradients $\partial_{\tilde{\beta}}\mathcal{L}$ and $\partial_{\theta}\mathcal{L}$ +8: Update the parameters: + +$$ +\tilde {\beta} _ {t + 1} \leftarrow \tilde {\beta} _ {t} - \eta \partial_ {\tilde {\beta}} \mathcal {L} +$$ + +$$ +\theta_ {t + 1} \leftarrow \theta_ {t} - \eta \partial_ {\theta} \mathcal {L} +$$ + +9: if $\mathcal{L}$ has not improved for the last $X$ epochs then +10: Stop the optimization +11: end if +12: end for + +Improving convergence through variance reduction in gradient estimation. Theoretically, computing gradients as described above should be sufficient. In practice, we observe significant noise, which hinders the optimization process. Computing gradients using MCMC inherently has high variance, making the optimization procedure highly sensitive to inefficient sampling. We find this problem to be especially severe in the case of two or more couplings. + +To address this, we leverage the fact that in our training procedure, the target system remains unchanged across steps. This allows us to aggregate the target feature vector over multiple steps, thereby stabilizing it over time. Let $t^a = \langle \phi^a [\sigma_i]\rangle_H$ denote the running expectation of the target feature after a sufficient number of steps, such that its variance is minimized. The difference in feature vectors can be written as + +$$ +\ell^ {a} = \left\langle \phi^ {a} \left[ G \left(\tilde {\sigma} _ {i}\right) \right] \right\rangle_ {\tilde {H}} - t ^ {a} \tag {16} +$$ + +For the second issue, we mitigate the variance in MCMC-based gradient estimation using control variates, a common variance reduction technique. Practical constraints limit our $\tilde{H}$ ability to obtain sufficiently large samples that accurately reflect the underlying distribution. To counter this, we introduce a constant baseline as a control variate (Mohamed et al., 2020; Greensmith et al., 2004). Since the target stabilizes over time, our baseline includes the target feature itself, effectively reducing variance in the gradient estimation process. Thus, gradients are estimated as follows: + +$$ +\begin{array}{l} \partial_ {\tilde {\beta}} \mathcal {L} = - 2 \sum_ {a} \ell^ {a} \Bigg \langle \left(\sum_ {\langle i j \rangle} \langle \tilde {\sigma} _ {i} \tilde {\sigma} _ {j} \rangle_ {\tilde {H}} - \sum_ {\langle i j \rangle} \tilde {\sigma} _ {i} \tilde {\sigma} _ {j}\right) \times \\ \left. \left(\phi^ {a} \left[ G _ {\theta} (\tilde {\sigma}) \right] - t ^ {a}\right) \right\rangle_ {\tilde {H}}. \tag {17} \\ \end{array} +$$ + +Note that the extra term here relative to (14) is that in $t^a$ ; as usual for such baselines, it is proportional to $\partial_{\tilde{\beta}}\log p$ and thus vanishes in expectation, but reduces the variance. + +# 3. Experiments + +In this section, we describe some simple experiments using the above machinery. + +Neural Network architecture for $G$ : For a given link product in the dual frame we assemble the 7 nearby links shown in Fig. 2 into a 7-dimensional vector $\mathbf{f}_{\langle ij\rangle}\in (\mathbb{Z}_2)^7$ where each element of the vector is the product of the two spins living on the two ends of the link. We consider a simplistic neural network acting on this input, with parameters formed by $\theta_{1}\in \mathbb{R}^{7}$ , and scalars $\theta_{2}$ and $\theta_{3}$ . We opt for hard attention using Gumbel-Softmax (Jang et al., 2016) so + +that only a few of the seven nearby links are utilized in the prediction task. Thus, the mapping is defined by, + +$$ +G _ {\theta} \left(\mathbf {f} _ {\langle i j \rangle}\right) = \theta_ {2} \cdot \text {G u m b e l - S o f t m a x} \left(\theta_ {1}\right) ^ {T} \mathbf {f} _ {\langle i j \rangle} + \theta_ {3} \tag {18} +$$ + +As the elements of $\mathbf{f}_{\langle ij\rangle}$ are $\pm 1$ , a very simple network provides a very expressive function. In our experiments, we initialize $\theta_{2}$ and $\theta_{3}$ from a uniform distribution, $\mathcal{U}(-1,1)$ and $\theta_{1}$ from a normal distribution, $\mathcal{N}(0,1)$ + +# 3.1. Original 2d Ising model + +We take our original Hamiltonian $H$ to be that of the 2d Ising model (3), and we take the dual Hamiltonian $\tilde{H}$ in (8) to have only one non-zero parameter $\tilde{\beta}$ (and so $\tilde{\kappa} = 0$ , etc.). + +![](images/df8b3ecbd7ba2240bacfc7b1b03a09b3eedbe260c11a3983ffc6b8ae88f96e79.jpg) +Figure 4. Final $\tilde{\beta}$ as found by the deep learning framework closely matches that of the theoretical results. Points are scaled by the negative logarithm of the best loss such that the size of the points is inversely proportional to the loss. We cap the minimum size so that smaller points are visible. The loss is a minimum along two fronts, i.e., original frame $\beta = \pm \tilde{\beta}$ and the dual frame along the lines $\sinh(2\beta)\sinh(2\tilde{\beta}) = 1$ . + +Rediscovery of the 2d Ising duality. In Figure 4, we show the result of deploying the above machinery on different model values of $\beta$ on an $8 \times 8$ lattice with periodic boundary conditions. For each value of the input $\beta$ , we ran a total of 10 optimizations, five from each of the two initializations of $\tilde{\beta}$ , i.e., $\tilde{\beta}_0 = 0.2$ and $\tilde{\beta}_0 = 0.5$ . Due to the randomness involved in MCMC sampling, each seed is expected to be an independent run. + +We record the value of $\tilde{\beta}$ obtained. There are three branches of solutions: the original model $\tilde{\beta} = \beta$ , the dual model $\sinh(2\beta)\sinh(2\tilde{\beta}) = 1$ , and an antiferromagnetic analogue of the original model $\tilde{\beta} = -\beta$ . The latter is equivalent to the original frame, and is obtained by making the change of variables $\sigma_{i} \rightarrow -\sigma_{i}$ on every other site, thus flipping the sign of $\beta \rightarrow -\beta$ . Note that the existence of the dual branch of solutions can be viewed as a numerical "rediscovery" of the KW duality line + +$$ +\sinh (2 \beta) \sinh (2 \tilde {\beta}) = 1 \tag {19} +$$ + +![](images/a5832059850464c244d27d3aeef9203c3efb1ee7070d85b5edf52b0e25c1a83b.jpg) +Figure 5. Emergence of dual lattice: e.g. if four original links (marked by 6) form a square, the corresponding four links that are referenced by the neighbour mapping (marked by 2) in Figure 2 form a cross, as expected for the dual lattice. + +Interestingly, we find that the method does not perform reliably as we approach the phase transition $\beta = \beta_{c} \approx 0.44$ , where the dual and original branches coincide. In addition, we find that it does not work equally well for $\beta > \beta_{c}$ , when the original frame is in the symmetry-broken phase. We show the same plot for this phase in Supplementary Material. This is somewhat reminiscent of known difficulties in learning parameters of Hamiltonians at high $\beta$ (see e.g. Appendix B of (Haah et al., 2024)) and deserves further study. + +Further details on the experiments (including an exploration on how they depend on the system size) are shown in the Supplementary Material. + +It is interesting to ask how the model recovers the structure of the dual lattice, as well as the dual observables. The attention mechanism used encourages the model to use only a single link of the input, and for the runs that find the dual temperature this ends up using the links numbered either 2 or 5 instead of the original 6 in Figure 2. As we show in an example in Figure 5, this is equivalent to finding the dual lattice from the original. Note that here it is important that we relate horizontal to vertical links by the composition of a rotation and reflection as shown in Figure 2; other choices will not result in the possibility of finding the dual lattice, and indeed in our experiments they do not find a duality. The optimized values of $G_{\theta}$ closely match theoretical results $\tilde{O}_{ij}(\tilde{\sigma}) = e^{-2\tilde{\beta}\tilde{\sigma}_{i*}\tilde{\sigma}_{j*}}$ , as shown in more details through the sampled training trajectories in the Supplementary Material. + +In this approach, the one-to-one mapping of $\beta$ to $\tilde{\beta}$ is only found numerically; one could possibly supplement this numerical determination with symbolic regression (Schmidt & Lipson, 2009) to obtain an analytic formula such as (19), but in more complicated examples of the duality we do not expect there to necessarily exist a simple analytic formula and thus have not explored this. + +![](images/34c70f86d58a657d897374b6ba1a2e3cabcd3029fc2647ee6af25f15e1daa8d3.jpg) +Figure 6. We display the both the target couplings $(\beta, \kappa)$ and the output couplings $(\tilde{\beta}, \tilde{\kappa})$ from the optimization procedure. We also indicate theoretical duals to models with $(\beta \neq 0, \kappa = 0)$ . Note that duals to models with $\kappa \neq 0$ are not known. Similar to Figure 4, the size of the points is inversely proportional to the loss. The optimization often finds the original frame $(\beta, \kappa)$ (or its antiferromagnetic image $(- \beta, \kappa)$ ). When the target $\kappa = 0$ , duals are still recovered, though accompanied by clusters along the lines $\tilde{\beta} + \tilde{\kappa} = \text{const}$ , the reason for which we discuss in Section 3.2. + +# 3.2. Plaquette 2d Ising model + +We now turn to a slight generalization of the familiar Ising model by adding an extra 4-spin coupling: + +$$ +H [ \beta , \kappa ; \sigma_ {i} ] = - \beta \sum_ {\langle i j \rangle} \sigma_ {i} \sigma_ {j} - \kappa \sum_ {(i j k l)} \sigma_ {i} \sigma_ {j} \sigma_ {k} \sigma_ {l} \tag {20} +$$ + +where in the second term we take the product of four spins around an elementary square plaquette. This "2d Ising plaquette model" is no longer exactly solvable and has been previously studied as a nontrivial testbed for ML approaches to statistical physics problems (see e.g. (Huang & Wang, 2017; Wang, 2017)). This model again has a disordered phase at small $(\beta, \kappa)$ and an ordered phase at larger couplings. For completeness we present a simple mean-field description of the phase diagram in Appendix A. As mentioned in the introduction, no precise Kramers-Wannier duality for this exact model is known for finite $\kappa$ . + +We now discuss the results from applying the machinery above to search for a duality with the same functional form, i.e. + +$$ +H [ \tilde {\beta}, \tilde {\kappa}; \tilde {\sigma} _ {i} ] = - \tilde {\beta} \sum_ {\langle i j \rangle} \tilde {\sigma} _ {i} \tilde {\sigma} _ {j} - \tilde {\kappa} \sum_ {(i j k l)} \tilde {\sigma} _ {i} \tilde {\sigma} _ {j} \tilde {\sigma} _ {k} \tilde {\sigma} _ {l} \tag {21} +$$ + +The results are shown in Figure 6. We ran a total of 300 ex + +periments, corresponding to 20 runs for each combination of $(\beta ,\kappa)$ in the set $\{0.15,0.2,0.25,0.3,0.35\} \times \{0.0,0.1,0.2\}$ . Here we see that the output from the optimization often recovers the original frame $(\beta ,\kappa)$ (or, as above, its antiferromagnetic image $(-\beta ,\kappa)$ ). However we do not find any new dual theories when $\kappa \neq 0$ . + +This is somewhat expected. Recall that away from the conventional 2d Ising model, one does not necessarily expect the dual Hamiltonian to take precisely the same functional form – i.e. have exactly the same nonzero couplings – as the original. Thus, our analysis gives evidence against such an hypothetical fortuitous scenario. A more systematic approach would require us to turn on a larger number of couplings (e.g. we could imagine allowing for all couplings that couple spins in a neighbourhood of a given size). + +We should still however ask whether - now that model $\tilde{\kappa}$ is allowed to vary - we can still find the standard expected KW duals to theories with the target $\kappa = 0$ , which are shown as circles in Figure 6. Though we find these, we also find clusters of theories along lines of the form $\tilde{\beta} + \tilde{\kappa} =$ const emerging from the known duals. To understand the physics behind this surprising fact, note that this happens when the dual model is deep in the ordered phase. Consider now a typical configuration of spins in this phase. To good approx + +imation, the spins will all be pointing in the same direction, i.e. we may imagine $\tilde{\sigma}_i = 1$ for almost all $i$ , with occasional very rare spin flips to $\tilde{\sigma}_i = -1$ . From the Hamiltonian (21) we can compute that the energy cost to flip a spin against this background is $8(\tilde{\beta} + \tilde{\kappa})$ , so the probability to flip the spin (as compared to keeping it constant) behaves as $p \sim e^{-8(\tilde{\beta} + \tilde{\kappa})}$ . This single spin flip probability – which depends only on the combination $\tilde{\beta} + \tilde{\kappa}$ – will determine essentially all of the observables, as the chance of flipping two nearby spins is itself even smaller. Thus we see that almost all observables depend only on $\tilde{\beta} + \tilde{\kappa}$ , and the optimization algorithm finds it difficult to distinguish points along this line. + +This "approximate duality" is not specific to this model and will essentially happen any time we are dealing with a dual frame which is deep in an ordered phase. It reflects the fact that all systems which can be described by a dilute gas approximation (i.e. described by a density of dilute objects such as rare flipped spins) have a kind of universality in that all observables are determined by a single parameter: the probability of the rare event, in our case $e^{-8(\hat{\beta} + \kappa)}$ . In this sense matching this parameter alone will result in a "dual" description. To localize the system along the line we need to increase the precision of our observables so that they can be sensitive to even lower probability events involving the interaction of multiple rare events. In practice this will likely require more sample-efficient optimization techniques. + +Empirical support for approximate duality. We now show that a broad set of moments – including correlation length – is accurately matched across approximate duals. To do so in a completely generalizable fashion, (a) we evaluate moments that were not included in the training loss, (b) we compute these moments on $24 \times 24$ lattices, beyond the training regime, (c) we include approximate duals along the hypothesized line for comparison. Due to computational constraints, training directly on large lattices like $24 \times 24$ is infeasible. Instead, we apply learned mappings $G_{\theta}$ from $8 \times 8$ lattices to estimate features on larger systems without retraining. + +Figure 7 shows that the average moments across all approximate duals for $\beta_0 \in \{0.2, 0.25, 0.3\}$ exactly match that of the theoretical dual frames. Due to the lack of space, we provide an extensive comparison in the supplementary material. + +Impact of variance reduction on convergence. We compare our proposed algorithm, which incorporates variance reduction techniques for gradient estimation in (17), with the theoretically derived gradients from (15) in this section. + +To quantify deviations, we define the $\Delta$ as the maximum absolute deviation in $\beta$ , $G_{\theta}(+1)$ , $G_{\theta}(-1)$ , $\kappa$ . Figure 8 presents the number of experiments where $\Delta$ remains below + +![](images/5ce4e32f3c6ab6f41f4dd32d8b88a1c245c2ebc6e57c20ef9d49d80d1a048a01.jpg) +Figure 7. The moments formed from the product of consecutive links forming a linear chain in a lattice of size $24 \times 24$ match across approximate duals found from the framework across $\beta_0 \in \{0.2, 0.25, 0.3\}$ and their corresponding theoretical duals. We cover extensive comparisons on other types of moments in the supplementary material. + +a given threshold $\epsilon$ . Ideally, we aim to maximize the area under this curve. + +We conduct 10 experiments for each combination of $(\beta, \kappa)$ in the set $\{0.25\} \times \{0.0, 0.1\}$ , evaluating both conditions: with and without variance reduction. The dominance of blue lines (with variance reduction) over orange lines (no variance reduction) highlights that methods without variance reduction techniques exhibit poor convergence. + +![](images/3a851b86f308fb25c9e8895825af59a85cb4b2cb82d423be682674dccfc0769c.jpg) +Figure 8. Here we benchmark the control variate technique that we use, determining how many of our runs recover a known target theory to within a given tolerance $\epsilon$ . As the tolerance is relaxed more and more runs are counted; the area under this curve is a measure of the success of the algorithm. We see a clear increase in efficiency from using the variance reduction technique. + +Interpreting model learning behavior. Figure 10 provides a visual representation of mappings learned by the models for $\sigma_{i}\sigma_{j} = \pm 1$ , in the optimization results obtained from Figure 6. Notably, the majority of runs converge to + +![](images/7ffc847aab45c699228fb1410ac194406f3d1cf97d00aab6a767f7285da3ab82.jpg) +Figure 9. Left. The attention mechanism generally picks a single link to determine the observable. In the labeling of Figure 2, we display the links chosen at the endpoint of the run for cases where $\kappa = 0$ and where $\kappa \neq 0$ . Note that when $\kappa = 0$ generally link 6 is obtained (which indicates the rediscovery of the original theory), and when $\kappa \neq 0$ there is a reasonable chance to find links 2 or 5, indicating a mapping to the dual lattice and Kramers-Wannier duality, as explained around Figure 5. Right, we demonstrate that runs where links $(2,5,6)$ are chosen generally have much lower loss and attention entropy. + +![](images/84b63e44562f3693f42fd402b2c6d4f4d93497e2b2ab2d2bf5f8010d308824ad.jpg) + +the expected mappings, either learning the original mapping in the ferromagnetic phase with $G_{\theta}(x) = x$ or in the anti-ferromagnetic phase with $G_{\theta}(x) = -x$ . The results that align with "approximate duality" exhibit mapping values close to those expected under perfect duality when $\kappa = 0$ . This visualization gives a close look into what models are actually learning at an internal level. + +To further investigate which mappings the models predominantly learned, we examine the frequency of selected links in the left panel of Figure 9. As discussed earlier, only links numbered 2 and 5 correspond to the correct dual mapping, while link 6 represents the original link. Our optimization results predominantly select links 2, 5 or 6, with the majority favoring the original link, particularly in cases where $\kappa \neq 0$ . On the right panel of Figure 9, we plot, as a function of the loss, the entropy of link selection computed as $\sum_{l=0}^{6} \theta_{1l} * \log \theta_{1l}$ , where $l$ corresponds to the links. Interestingly, as indicated by the spatial clustering of blue and orange dots, optimization results with lower uncertainty in link selection (i.e., lower entropy) exhibit a higher probability of selecting the correct link. These optimization runs also achieve lower loss values, reaching as low as $1e - 7$ . Thus, a high entropy in link selection is associated with suboptimal optimization outcomes. + +![](images/2ab6207c8981f9e4530959d629aa8ad363349e2ef7046e1bb7c0827be5d23aa8.jpg) +Figure 10. We display the mapping functions found by the algorithm, plotting $G_{\theta}(+1)$ against $G_{\theta}(-1)$ and indicating the trivial ferromagnetic solution (where $G_{\theta}(x) = x$ ), the antiferromagnetic solution (where $G_{\theta}(x) = -x$ ) and the non-trivial duality (where $G_{\theta}(x) = \exp(-2\tilde{\beta}x)$ ). The FM and AFM clusters contain many runs. + +# 4. Conclusions + +Above we have explained how the process of finding dualities can be automated, demonstrating the mechanism by "rediscovering" the well-known Kramers-Wannier duality of + +the 2d Ising model, and by testing our system on the more general plaquette model. This is only a proof of principle, and much work remains to be done. + +For example, as discussed in Section 2, at present we match a number of features which are constructed by hand. It would be ideal to find a kernel that allows matching of all the required moments while simultaneously giving lower weight to those involving faraway spins. On the operational side, it would be helpful to have a more efficient way of training; contrastive divergence fails here as there appears to be no simple way to map the likelihood of a single spin configuration across the duality. + +On the physics side, we hope to use such techniques to find new dualities or to understand approximate dualities. One direction that we have initiated above is to search for Kramers-Wannier duals of deformed Ising models, where extra spin-spin couplings such as the plaquette term above have been added to the action. While some results exist for specific models (Strycharski & Koza, 2013; Cobanera et al., 2011; Aasen et al., 2016), we are not aware of a completely general approach that provides very explicit results. Our experiments show that adding more couplings generically increases the difficulty, highlighting the need for more sample-efficient techniques. Finally, a less concrete but far more exciting direction would be if one could use the approach to find entirely new dualities, unconnected to any existing ones. We hope to return to this in the future. + +# Acknowledgments + +We are very grateful to Roberto Bondesan, Arkya Chaterjee, Tarun Grover, Tyler Helmuth, Theo Jacobson, John McGreevy, Takuo Matsubara, Salvatore Pace and Tin Sulejmanpasic for helpful discussions. We thank the anonymous referees for their useful feedback. This work was supported by a grant from the Simons Foundation (PD-Pivot Fellow00004147, NI). NI is supported in part by the STFC under grant number ST/T000708/1. AEVF was in part supported by the EPSRC Grant EP/W020939/1 "3d N=4 TQFTs". This work has made use of the Hamilton HPC Service of Durham University. + +# Impact Statement + +Our work holds significant potential to advance knowledge in statistical physics. At this stage, we do not anticipate any negative societal impacts. + +# References + +Aasen, D., Mong, R. S. K., and Fendley, P. Topological Defects on the Lattice I: The Ising model. J. Phys. A, 49(35):354001, 2016. doi: 10.1088/1751-8113/49/35/ + +354001. +Bao, J., Franco, S., He, Y.-H., Hirst, E., Musiker, G., and Xiao, Y. Quiver Mutations, Seiberg Duality and Machine Learning. Phys. Rev. D, 102(8):086013, 2020. doi: 10.1103/PhysRevD.102.086013. +Betzler, P. and Krippendorf, S. Connecting Dualities and Machine Learning. *Fortsch. Phys.*, 68(5):2000022, 2020. doi: 10.1002/prop.202000022. +Carreira-Perpinan, M. A. and Hinton, G. On contrastive divergence learning. In International workshop on artificial intelligence and statistics, pp. 33-40. PMLR, 2005. +Cobanera, E., Ortiz, G., and Nussinov, Z. The Bond-Algebraic Approach to Dualities. Adv. Phys., 60:679-798, 2011. doi: 10.1080/00018732.2011.619814. +Coleman, S. R. The Quantum Sine-Gordon Equation as the Massive Thirring Model. Phys. Rev. D, 11:2088, 1975. doi: 10.1103/PhysRevD.11.2088. +Dasgupta, C. and Halperin, B. Phase transition in a lattice model of superconductivity. Physical Review Letters, 47 (21):1556, 1981. +Greensmith, E., Bartlett, P. L., and Baxter, J. Variance reduction techniques for gradient estimates in reinforcement learning. Journal of Machine Learning Research, 5:1471-1530, 2004. URL http://www.jmlr.org/papers/volume5/greensmith04a/greensmith04a.pdf. +Haah, J., Kothari, R., and Tang, E. Learning quantum Hamiltonians from high-temperature Gibbs states and real-time evolutions. Nature Phys., 20(6):1027-1031, 2024. doi: 10.1038/s41567-023-02376-x. +Huang, L. and Wang, L. Accelerated monte carlo simulations with restricted boltzmann machines. Phys. Rev. B, 95:035105, Jan 2017. doi: 10.1103/PhysRevB.95.035105. URL https://link.aps.org/doi/10.1103/PhysRevB.95.035105. +Jang, E., Gu, S., and Poole, B. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. +Kardar, M. Statistical physics of fields. Cambridge University Press, 2007. +Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. +Kramers, H. A. and Wannier, G. H. Statistics of the Two-Dimensional Ferromagnet. Part II. Phys. Rev., 60:263-276, 1941a. doi: 10.1103/PhysRev.60.263. + +Kramers, H. A. and Wannier, G. H. Statistics of the two-dimensional ferromagnet. part i. Phys. Rev., 60:252-262, Aug 1941b. doi: 10.1103/PhysRev. 60.252. URL https://link.aps.org/doi/10. 1103/PhysRev.60.252. +Li, Y., Swersky, K., and Zemel, R. Generative moment matching networks. In International conference on machine learning, pp. 1718-1727. PMLR, 2015. +Mohamed, S., Rosca, M., Figurnov, M., and Mnih, A. Monte carlo gradient estimation in machine learning. Journal of Machine Learning Research, 21:1-63, 2020. URL http://jmlr.org/papers/v21/19-346.html. +Paszke, A., Gross, S., Chintala, S., Chanan, G., Yang, E., DeVito, Z., Lin, Z., Desmaison, A., Antiga, L., and Lerer, A. Automatic differentiation in pytorch. 2017. +Peskin, M. E. Mandelstam 't Hooft Duality in Abelian Lattice Models. Annals Phys., 113:122, 1978. doi: 10. 1016/0003-4916(78)90252-X. +Savit, R. Duality in Field Theory and Statistical Systems. Rev. Mod. Phys., 52:453, 1980. doi: 10.1103/RevModPhys.52.453. +Schmidt, M. and Lipson, H. Distilling free-form natural laws from experimental data. science, 324(5923):81-85, 2009. +Strycharski, A. and Koza, Z. The dual model for an ising model with nearest and next-nearest neighbors. Journal of Physics A: Mathematical and Theoretical, 46(29):295003, 2013. +Wang, L. Exploring cluster monte carlo updates with boltzmann machines. Phys. Rev. E, 96: 051301, Nov 2017. doi: 10.1103/PhysRevE.96.051301. URL https://link.aps.org/doi/10.1103/PhysRevE.96.051301. +Wegner, F. J. Duality in generalized ising models and phase transitions without local order parameters. Journal of Mathematical Physics, 12(10):2259-2272, 1971. doi: http://dx.doi.org/10.1063/1.1665530. URL http://scitation.aip.org/content/aip/journal/jmp/12/10/10.1063/1.1665530. + +# A. Mean-field discussion of plaquette model + +Here we establish some basic features of the plaquette model defined by + +$$ +H [ \beta , \kappa ; \sigma_ {i} ] = - \beta \sum_ {\langle i j \rangle} \sigma_ {i} \sigma_ {j} - \kappa \sum_ {(i j k l)} \sigma_ {i} \sigma_ {j} \sigma_ {k} \sigma_ {l} \tag {22} +$$ + +There is no known exact solution to this model for all $\beta, \kappa$ . On general grounds we expect a disordered phase at small $(\beta, \kappa)$ and an ordered phase for larger $(\beta, \kappa)$ . We present a simple mean-field discussion of the Hamiltonian to confirm this expectation, noting that while we expect gross features of the phase diagram to survive, it is not expected to be quantitatively correct in $d = 2$ . + +Denote the true probability distribution for this model by + +$$ +p _ {\beta , \kappa} (\sigma_ {i}) = \frac {1}{Z (\beta , \kappa)} \exp (- H [ \beta , \kappa ; \sigma_ {i} ]) \tag {23} +$$ + +As usual we perform a mean-field treatment by postulating a simpler distribution $q_{\phi}(\sigma_i)$ labeled by some variational parameters $\phi_{i}$ and minimize the KL divergence between the true distribution and the variational one: + +$$ +D _ {K L} \left(q _ {\phi} \| p _ {\beta , \kappa}\right) \equiv \left\langle \log \frac {q _ {\phi} \left(\sigma_ {i}\right)}{p _ {\beta , \kappa} \left(\sigma_ {i}\right)} \right\rangle_ {q} = \left\langle H [ \beta , \kappa ; \sigma_ {i} ] + \log q _ {\phi} (\sigma_ {i}) \right\rangle_ {q _ {\phi}} + \text {c o n s t} \tag {24} +$$ + +The constant contains the intractable partition function $Z(\beta, \kappa)$ , but it is independent of the variational parameters and so can be neglected. In physics this is precisely the minimization of the free energy $E - TS$ , where our choice of where to place the factors of $\beta$ means that factors of $T$ appear slightly differently. We now pick a trial $q_{\phi}$ which is factorized on the sites, i.e. + +$$ +q _ {\phi} \left[ \sigma_ {i} \right] = \prod_ {i} \frac {\exp \left(\phi_ {i} \sigma_ {i}\right)}{2 \cosh \left(\phi_ {i}\right)} \tag {25} +$$ + +where our variational parameter $\phi_{i}$ on each site can be thought of loosely as a classical coarse-grained field. This is the most general factorized distribution for a binary variable. + +Computing the KL divergence for the choice where $\phi_i = \phi$ is constant on all sites we find + +$$ +D _ {K L} \left(q _ {\phi} \| p _ {\beta , \kappa}\right) = - 2 \beta \tanh ^ {2} \phi - \kappa \tanh ^ {4} \phi + \phi \tanh \phi - \log (2 \cosh (\phi)) \tag {26} +$$ + +This function always has a stationary point at $\phi = 0$ due to the $\mathbb{Z}_2$ symmetry $\phi \rightarrow -\phi$ . Exploration of the minima indeed shows that this stationary point is a minimum of the free energy for small $(\beta, \kappa)$ but is no longer a minimum at large $(\beta, \kappa)$ . The existence of a minimum of the free energy at a nonzero value of $\phi$ indicates an ordered phase with spontaneous breaking of the $\mathbb{Z}_2$ symmetry. + +We focus on the limiting cases: at $\kappa = 0$ there is a second order transition at $\beta = \frac{1}{4}$ (this is the standard result for the mean-field treatment of the 2d Ising model), and at $\beta = 0$ there is a first-order transition at $\kappa \approx 0.688$ , where the precise value was found numerically through balancing the free energy at the trivial and nontrivial minima of (26). Numerical exploration shows that the phase transition line connects these two points straightforwardly. + +We include this discussion for completeness, noting that the quantitative features are unlikely to survive (e.g. note the well- appreciated fact that even at $\kappa = 0$ the true value for the transition at $\beta \approx 0.44$ differs significantly from the mean-field estimate $\beta_{MF} = 0.25$ ). For that reason we have not found the precise location of the change from second-order to first-order, as it is unlikely to be accurate for the real model. However the topology of the phase diagram is likely to have the shape shown, as is borne out by our numerical experiments. + +# B. Neural network training + +Our models are all implemented in PyTorch (Paszke et al., 2017). We used the Adam (Kingma & Ba, 2014) optimizer with the learning rate of 0.01. Moreover, we used the early stopping criterion to stop the training if the loss didn't improve over 200 epochs. We ran the sampler in each experiment to generate 1000 samples for the lattice. We ran the training for a maximum of 25000 epochs, and our runs took about 1-3 hours each. The experiments in the main paper are run on the lattice size of $8 \times 8$ . + +# C. Typical training curves + +We provide some further details on our experimental results. The plots below are representative and were obtained with the control variate technique. + +Figure 11 shows runs for $\beta = 0.25$ grouped by $\beta_0$ and frame discovered by the runs, illustrating how the training progresses under different scenarios. For the seeds where either the dual or original frame is recovered, the loss goes to 0. Further, we track the entropy of Gumbel-Softmax $(\theta_1)$ to assess how the algorithm is weighing each feature. A value of 0 corresponds to a strong preference for one out of the seven input links. + +![](images/7ea91dbc1b6187d9616eedc900b3316df2f17a0cec0362148fdd1669257d0b20.jpg) +A + +![](images/f160900a836cf56d2db5a67aa9e21fb0df904b35a60b49b9449398b300670c1c.jpg) +B + +C +![](images/e0c2587644aa03776172c8b44097c070becf9cfe228de328871a141f5e9c3890.jpg) +$\beta_0 = 0.2$ , Recovered frame: original $\beta_0 = 0.6$ , Recovered frame: dual $\beta_0 = 0.6$ , Recovered frame: original + +![](images/102bb0dd6c458e6ef312fdd01e637bb21e57cce426a1c80bf980cd0fc52c9db5.jpg) +D +Figure 11. Training progress for runs from $\beta = 0.25$ , grouped by $\beta_0$ and the final frame discovered to showcase the trajectory of various metrics. We show exponentially smoothed moving average of the following metrics: (A) Loss, (B) $\beta$ , (C) Mapping of observables, (D) Entropy of Gumbel-Softmax $(\theta_1)$ For (B) and (C) we denote theoretically expected values in original and dual frames by the dashed lines. Note that these runs are for recovering the original 2d-Ising model. + +# D. Scaling to bigger lattices + +Figure 12 shows the fraction of instances in which either $\tilde{\beta}$ , $\beta$ , or $-\beta$ were successfully recovered. We observe that the convergence rate improves as the lattice size increases to $10 \times 10$ , $12 \times 12$ , and $14 \times 14$ . + +![](images/33a73d62f1cbf26b392cc1789c99118b780c67401232d0efe051c1d9c3503155.jpg) +Figure 12. Fraction of optimization results with a maximum deviation, $\Delta$ less than threshold, $\epsilon$ for optimization runs on $\beta = 0.25$ . We observe that increasing N beyond eight results in only a marginal improvement in performance. + +# E. Post-phase transition performance + +Figure 13 shows a plot similar to Figure 4 but for the phase transition phase, $\beta >\beta_{c}$ . We observe that the method does not work as well as with the lower $\beta$ s. + +![](images/dcdfd396b0697e7557ba46b105e49f4fae73659194a9eef551aab980a1a2da18.jpg) +Figure 13. Optimization results for post-phase transition don't work as well as before the phase transition. + +# F. Empirical support for approximate duals + +We now provide evidence to show that a broad set of moments—including correlation length—is accurately matched across approximate duals. This close agreement suggests that the essential physics is preserved; as discussed in the main text we believe this largely follows from the fact that the single-spin-flip probability determines much of the physics in this regime. + +To assess generalization, we compare feature statistics between approximate duals (both found from our experiments in the paper and from the hypothesised line $\beta +\kappa = const$ ) and the corresponding theoretical duals. Importantly, + +- We evaluate various features not included in the training loss +- We compute these features on larger lattices of size $24 \times 24$ , beyond the training regime +- We include approximate duals along the hypothesised line for comparison + +Due to computational constraints, training directly on large lattices like $24 \times 24$ is infeasible. Instead, we apply the learned mappings from $8 \times 8$ lattices to estimate features on larger systems without retraining. + +In all the plots, the top panel shows average feature values across all approximate duals for $\beta_0\in \{0.2,0.25,0.3\}$ - the original-frame $\beta$ values that yielded these approximate duals, and the lower panels show individual approximate duals (marked by x). Squares mark the features corresponding to theoretical dual configurations. + +We consider three categories of features. For each category, we present two plots: (Framework) one based on approximate duals found by our framework, and (Hypothesized) another based on duals inferred from the hypothesized line $\beta +\kappa =$ const, where the constant is chosen to intersect the known dual point $\beta_{dual}$ . + +- Product of consecutive links in a linear chain in a lattice of size 24x24: There are 24 such features (not used in the training loss). Figure 14 & 15 shows the plots for approximate duals found by the framework and those from the hypothesised approximate duals. Both sets of approximate duals closely match theoretical expectations +- 13 features constructed from link products used in the training loss: Figure 16 & 17 shows the plots for approximate duals found by the framework and those from the hypothesised approximate duals. These features match well across both sets of approximate duals, despite being trained on smaller 8x8 lattices. +- 101 Features constructed from all possible (up to gauge equivalence) link products in a grid (not used in the training loss): Figure 18 & 19 shows the plots for approximate duals found by the framework and those from the hypothesised approximate duals. Even this exhaustive set of features shows strong alignment with the theoretical dual, reinforcing the robustness of our approach. + +![](images/15cb74b4e599ac99734f43cd497f80aadb9c124816cb23ef9eda396bbedcd817.jpg) + +![](images/a32a615506e3900d126e9fae013af640159d18f2a0889110875289a567676e01.jpg) + +![](images/55e05de27d0f1a8208e46347dab42b70519d42194156531dc2a1de7bc619f404.jpg) + +![](images/f6e27144d7c4aa15784d48a79be52b40ff0203bd32bcfe1fe4413a9df230efda.jpg) +Figure 14. (Framework) The moments (product of consecutive links in a linear chain in a lattice of size $24 \times 24$ ) computed from the approximate duals found by our framework closely match those of theoretical duals. + +![](images/001c75ed9806089634c3a4833e9e31868d570f3bc7a46919057d8b2176028b29.jpg) + +![](images/7ef1212ab2a518a82b3ddff502ff39b5bf3e14db6cc1b34f01fb1c758d4f756f.jpg) + +![](images/96c0db33f6b7e6df1eaf5cde4c41fd7dd35a517cd73cc5e559758efc7274ed79.jpg) + +![](images/829b1650b4c95a95bafe82b83117ef78687fb62a8c99daa06c4d07e306501ef0.jpg) +Figure 15. (Hypothesis). The moments (product of consecutive links in a linear chain in a lattice of size $24\mathrm{x}24$ ) computed from the approximate duals along the hypothesized line ( $\beta + \kappa = const$ ) closely match those of theoretical duals. + +![](images/0821b673683bd1b492110a18c3d1f45a5b173db65d1ce27b688a46bd8ee57cd6.jpg) + +![](images/1e63c79563627056ca63fc9b27c558c7cc67c83e6f71d4b30b9d8780faf1ec9f.jpg) + +![](images/ef307d3fc98eea2712ffce95ccb47a1810c0abc2cab8ca059deec357eabca521.jpg) + +![](images/e75401af6a50e67f15133190594c843f28132eaa6c09824154cb7a8ded00d599.jpg) +Figure 16. (Framework) The moments (13 features constructed from link products used in the training loss) computed from the approximate duals found by our framework closely match those of theoretical duals. + +![](images/7d530ead1027b674fd5ab8784eb9f8f9d4b1a7eefe49d5ae374c4a8420820910.jpg) + +![](images/074981d8802809e1565061935987ced6a7833f2be48c8e6eb720be6ea8cf59ea.jpg) +Original frame $(\beta ,\kappa) = (0.20,0)$ + +![](images/811897cb27e7d44a0b67550b2a40dcb9aa3a242620d5f778443d787900c42c94.jpg) +Original frame $(\beta ,\kappa) = (0.25,0)$ + +![](images/692fd3984b4ca8b1af1d4c678feb62fdd6382202f10cfebedadf18b163b12e07.jpg) +Original frame $(\beta ,\kappa) = (0.30,0)$ +Figure 17. (Hypothesis) The moments (13 features constructed from link products used in the training loss) computed from the approximate duals along the hypothesized line ( $\beta + \kappa = const$ ) closely match those of theoretical duals. + +![](images/476dcf50f9a4442e3459c9ece4686430fc5b836c1d6c32db862d702b7d30c47f.jpg) + +![](images/e9f133a230d014509fd65eae04cf88c1c3aba03b052fec4b42e989c28577f60d.jpg) +Original frame $(\beta ,\kappa) = (0.20,0)$ + +![](images/b99b02eb10fd8d778637359a5d8ef5031e9b2864d4a9871e876ac8f698026de4.jpg) +Original frame $(\beta ,\kappa) = (0.25,0)$ + +![](images/58b25c90d74bb67fa2c39eb3089da89277d6474c805dc259a5b9f494c51e34bc.jpg) +Original frame $(\beta ,\kappa) = (0.30,0)$ +Figure 18. (Framework) The moments (101 Features constructed from all possible (up to gauge equivalence) link products in a grid (not used in the training loss) computed from the approximate duals found by our framework closely match those of theoretical duals. + +![](images/7d2cb4bb5054ada39b9e58f8fd244d6c49d5c54386ac50bfbac62a0fd82959d0.jpg) + +![](images/5102ab44bd1fcd7d5f3f0ef93b7e18d53012f6121901c5f6b53531e4b5db5b45.jpg) +Original frame $(\beta ,\kappa) = (0.20,0)$ + +![](images/9f0fd81ba99ad9342530e2609bb5bea83584be5490c6d49315b05a65b2b8931e.jpg) +Original frame $(\beta ,\kappa) = (0.25,0)$ + +![](images/665aed87073f94f8b83c9aa6ad71bdaf4f2f671f631797ea469983701a5e8b2b.jpg) +Original frame $(\beta ,\kappa) = (0.30,0)$ +Figure 19. (Hypothesis) The moments (101 Features constructed from all possible (up to gauge equivalence) link products in a grid (not used in the training loss) computed from the approximate duals along the hypothesized line ( $\beta + \kappa = const$ ) closely match those of theoretical duals. \ No newline at end of file diff --git a/amachinelearningapproachtodualityinstatisticalphysics/images.zip b/amachinelearningapproachtodualityinstatisticalphysics/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..8d871b586bd96e57520a57265ff54db43af1c25b --- /dev/null +++ b/amachinelearningapproachtodualityinstatisticalphysics/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc58bddffc00f2e2cfcaa3ea016af58fa91ad337c2ad29cdc7a058e9d6d65697 +size 1671115 diff --git a/amachinelearningapproachtodualityinstatisticalphysics/layout.json b/amachinelearningapproachtodualityinstatisticalphysics/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ce2ceef5dd9b896e08dda577914d52a67f78d211 --- /dev/null +++ b/amachinelearningapproachtodualityinstatisticalphysics/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ff4892b8872417dc834c29b7bd2ab108018cb52740cb260ddc857461c3c415d +size 694340 diff --git a/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/42d259ac-890f-463d-85aa-cf5c10ce33bc_content_list.json b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/42d259ac-890f-463d-85aa-cf5c10ce33bc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f315a4dea65fd8856c2cc3936ebcf879d90a0c77 --- /dev/null +++ b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/42d259ac-890f-463d-85aa-cf5c10ce33bc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddc26cf2ff0f5c488b4a2418805701fa38cccded0bb89b1be54f262df70f6c13 +size 244068 diff --git a/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/42d259ac-890f-463d-85aa-cf5c10ce33bc_model.json b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/42d259ac-890f-463d-85aa-cf5c10ce33bc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..77d9603b1abfae94964dbf5b020857ed9ec786b1 --- /dev/null +++ b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/42d259ac-890f-463d-85aa-cf5c10ce33bc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c78731a7a25f9d799d41da48c69478b943c1f81993eb945d709330bc5f1c549 +size 294340 diff --git a/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/42d259ac-890f-463d-85aa-cf5c10ce33bc_origin.pdf b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/42d259ac-890f-463d-85aa-cf5c10ce33bc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b7cab22537c3bfd2d9a3cac89be8935ae0e7c7a0 --- /dev/null +++ b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/42d259ac-890f-463d-85aa-cf5c10ce33bc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0cc14d7478c5176bd643677843e8c0c7dc5d416c97d95b4d63c3c3837a3d7df2 +size 3417861 diff --git a/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/full.md b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3eb68c767ec80685d9d27c2c6ff36feb08dbc009 --- /dev/null +++ b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/full.md @@ -0,0 +1,1172 @@ +# A Manifold Perspective on the Statistical Generalization of Graph Neural Networks + +Zhiyang Wang $^{*1}$ Juan Cerviño $^{*2}$ Alejandro Ribeiro + +# Abstract + +Graph Neural Networks (GNNs) extend convolutional neural networks to operate on graphs. Despite their impressive performances in various graph learning tasks, the theoretical understanding of their generalization capability is still lacking. Previous GNN generalization bounds ignore the underlying graph structures, often leading to bounds that increase with the number of nodes - a behavior contrary to the one experienced in practice. In this paper, we take a manifold perspective to establish the statistical generalization theory of GNNs on graphs sampled from a manifold in the spectral domain. As demonstrated empirically, we prove that the generalization bounds of GNNs decrease linearly with the size of the graphs in the logarithmic scale, and increase linearly with the spectral continuity constants of the filter functions. Notably, our theory explains both node-level and graph-level tasks. Our result has two implications: i) guaranteeing the generalization of GNNs to unseen data over manifolds; ii) providing insights into the practical design of GNNs, i.e., restrictions on the discriminability of GNNs are necessary to obtain a better generalization performance. We demonstrate our generalization bounds of GNNs using synthetic and multiple real-world datasets. + +# 1. Introduction + +Graph convolutional neural networks (GNNs) (Scarselli et al., 2008; Defferrard et al., 2016; Bruna et al., 2014) have emerged as one of the leading tools for processing graph-structured data. There is abundant evidence of their + +*Equal contribution $^{1}$ Department of Electrical and Systems Engineering, University of Pennsylvania, Philadelphia, USA $^{2}$ Laboratory of Information and Decision Systems (LIDS), Massachusetts Institute of Technology, Cambridge, USA. Correspondence to: Zhiyang Wang , Juan Cervino . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +empirical success across various fields, including but not limited to weather prediction (Lam et al., 2023), protein structure prediction in biochemistry (Jumper et al., 2021; Strokach et al., 2020), resource allocation in wireless communications (Wang et al., 2022a), social network analysis in sociology (Fan et al., 2020), point cloud in 3D model reconstruction (Shi & Rajkumar, 2020) and learning simulators (Fortunato et al., 2022). + +The effectiveness of GNNs relies on their empirical ability to predict over unseen data. This capability is evaluated theoretically with statistical generalization in deep learning theory (Kawaguchi et al., 2017), which quantifies the difference between the empirical risk (i.e. training error) and the statistical risk (i.e. testing error). Despite the abundant evidence of GNNs' generalization capabilities in practice, developing concrete theories to explain their generalization is an active area of research. Many recent works have studied the generalization bounds of GNNs without any dependence on the underlying model responsible for generating the graph data (Scarselli et al., 2018; Garg et al., 2020; Verma & Zhang, 2019). Generalization analysis on graph classification, when graphs are drawn from random limit models, is also studied in a series of works (Ruiz et al., 2023; Maskey et al., 2022; 2024; Levie, 2024). In this work, we take the manifold perspective to formulate graph data on continuous topological spaces, i.e., manifolds. We emphasize that manifolds are realistic models to generate graph data that enable rigorous theoretical analysis and a deep understanding of the behaviors of GNNs. + +We explore the generalization bound of GNNs through the lens of manifold theory on both node-level and graph-level tasks in the spectral domain. The graphs are constructed based on points randomly sampled from underlying manifolds, indicating that the manifold can be viewed as a statistical model for these discretely sampled points. As deep learning architectures have been established over manifolds (Wang et al., 2022b; Chew et al., 2024), the convergence of GNNs to manifold neural networks (MNNs) and the algebraical equivalence of these two frameworks facilitate a detailed generalization understanding of GNNs through spectral analysis. We demonstrate that, with an appropriate graph construction based on the sampled points from the + +manifold, the generalization gap between empirical and statistical risks decreases with the number of sampled points in the graphs (Figure 1c) on both node-level and graph-level tasks. More importantly, the generalization gap increases linearly with the continuity constants of frequency response functions of graph filters composing the GNN (Figure 1d). We observe that with spectral continuous filters, the GNNs are generalizable across different nodes or graphs generated from the same underlying manifold. This provides insight into the practical graph filter design from a spectral perspective. Moreover, the theoretical results indicate a trade-off between the discriminability and generalization capability of GNNs, suggesting that restrictions on the discriminability of GNNs are necessary to maintain generalization performance. + +We introduce a novel unified analysis of the generalization of GNNs to unseen nodes and graphs, by relating the GNNs with MNNs in the spectral domain. We further propose restrictions on the discriminability of GNNs from the spectral perspective which results from assumptions on the continuity of the filter frequency response functions. We provide extensive experiments both on synthetic and real-world datasets to verify our generalization conclusions. Our contribution is four-fold: + +1. We prove the generalization bound of GNNs on graphs generated from an underlying manifold on both node-level (Theorem 1) and graph-level (Theorem 2) by relating the algebraically equivalent GNNs and MNN in the spectral domain. +2. We provide novel generalization gap bounds that decrease linearly with the nodes of the graph in the logarithmic scale, and increase linearly with the spectral continuity constants (Assumption 1) of the filter functions. +3. We uncover an important trade-off between the discriminability and the generalization gap of GNNs, which guides practical GNN designs. +4. We verify the dependence of our generalization gaps on parameters, especially the continuity parameter, with a synthetic dataset - chair manifold - and eight real-world datasets - ArXiv, CiteSeer, etc. + +# 2. Related works + +# 2.1. Generalization bounds of GNNs + +Node level tasks We first give a brief recap of the generalization bounds of GNNs on node level tasks. In (Scarselli et al., 2018), the authors give a generalization bound of GNNs with a Vapnik-Chervonenkis dimension of GNNs. + +The authors in (Verma & Zhang, 2019) analyze the generalization of a single-layer GNN based on stability analysis, which is further extended to a multi-layer GNN in (Zhou & Wang, 2021). In (Ma et al., 2021), the authors give a novel PAC-Bayesian analysis on the generalization bound of GNNs across arbitrary subgroups of training and testing datasets. The authors derive generalization bounds for GNNs via transductive uniform stability and transductive Rademacher complexity in (Esser et al., 2021; Cong et al., 2021; Tang & Liu, 2023). The authors in (Yehudai et al., 2021) propose a size generalization analysis of GNNs correlated to the discrepancy between local distributions of graphs. Different from these works, we consider a continuous manifold model when generating the graph data, which is theoretically powerful and realistic when characterizing real-world data. Furthermore, the generalization bounds proved in these works either grow with the size of the graph (Esser et al., 2021; Tang & Liu, 2023; Scarselli et al., 2018), with the node degree of the graphs (Cong et al., 2021) or the maximum eigenvalues of the graph (Verma & Zhang, 2019). Notably, our generalization bound decreases with the size of the graph given that it depends on the spectral properties of the filter functions over the manifold. + +Graph level tasks There are also related works on the generalization analysis of GNNs on graph-level tasks. In (Garg et al., 2020), the authors form the generalization bound via Rademacher complexity. The authors in (Liao et al., 2020) build a PAC-Bayes framework to analyze the generalization capabilities of graph convolutional networks (Kipf & Welling, 2016) and message-passing GNNs (Gilmer et al., 2017), based on which the authors in (Ju et al., 2023) improve the results and prove a lower bound. The bounds either grow with the number of nodes (Liao et al., 2020) or the degree of the graphs (Garg et al., 2020) while our bound decreases with the number of nodes in the graph given that it better approximates the underlying model – the manifold. The works in (Maskey et al., 2022; 2024; Levie, 2024) are most related to ours, which also consider the generalization of GNNs on a graph limit model, in their case a graphon. Different from our setting, the authors see the graph limit as a random continuous model. They study the generalization of graph classification problems with message-passing GNNs with graphs belonging to the same category sampled from a continuous limit model. The generalization bound grows with the model complexity and decreases with the number of nodes in the graph. We show that a GNN trained on a single graph sampled from each manifold is enough, and can generalize and classify unseen graphs sampled from the manifold set. + +![](images/9d48fff0db02273371323befcccc43e11bd273ea1d9f482390fece551ee103a0.jpg) +(a) Chair Manifold + +![](images/831a4eb13106399a4a8344590f4f065543526aa5f46a5b3a1859aae021b6c6f9.jpg) +(b) Sampled Chair + +![](images/10c87f6bb701782c645e1b0acd8e41ded545d8c8cda239756fc9fe682b8997a2.jpg) +(c) Gen. Gap vs. Num. of Nodes +Figure 1: Synthetic experimental results are shown on the uniformly sampled chair manifold. We construct a graph with different numbers of nodes, fix the weights of a GNN, and compute the generalization gap. We construct the graph by computing the edges for nodes that are $\epsilon$ close (cf. equation 3). In Figure 1c, we fix the spectral continuity constant (see Assumption 1) and vary the number of nodes. As our theory predicts, we see that a smaller spectral continuity constant translates into a smaller generalization gap – as the blue line is below the green line which is below the orange line. In Figure 1d we fix the number of nodes in the graph and vary the spectral continuity constant in the GNN. For the same number of nodes, a larger spectral continuity constant translates into a larger generalization gap. + +![](images/274115007ba90cec27412cf6702c515cefc0065a58d90aa28e8b23410809a639.jpg) +(d) Gen. Gap vs. Continuity Constants + +# 2.2. Neural networks on manifolds + +Geometric deep learning has been proposed in (Bronstein et al., 2017) with neural network architectures raised in manifold space. The authors in (Monti et al., 2017) and (Chakraborty et al., 2020) provide neural network architectures for manifold-valued data. In (Wang et al., 2024b) and (Wang et al., 2022b), the authors define convolutional operation over manifolds and see the manifold convolution as a generalization of graph convolution, which establishes the limit of neural networks on large-scale graphs as manifold neural networks (MNNs). The authors in (Wang et al., 2024a; Chew et al., 2023; Johnson et al., 2025) further establish the relationship between GNNs and MNNs with non-asymptotic convergence results for different graph constructions. Some studies have used graph samples to infer properties of the underlying manifold itself. These properties include the validity of the manifold assumption (Fefferman et al., 2016), the manifold dimension (Farahmand et al., 2007) and the complexity of these inferences (Narayanan & Niyogi, 2009; Aamari & Knop, 2021). Other research has focused on prediction and classification using manifolds and manifold data, proposing various algorithms and methods. Impressive examples include the Isomap algorithm (Choi & Choi, 2004; Wu & Chan, 2004; Yang et al., 2016a) and other manifold learning techniques (Talwalkar et al., 2008). These techniques aim to infer manifold properties without analyzing the generalization capabilities of GNNs operated on the sampled manifold. + +# 3. Preliminaries + +# 3.1. Graph neural networks + +Setup An undirected graph $\mathbf{G} = (\mathcal{V},\mathcal{E},\mathcal{W})$ contains a node set $\nu$ with $N$ nodes and an edge set $\mathcal{E}\subseteq \mathcal{V}\times \mathcal{V}$ . The weight function $\mathcal{W}:\mathcal{E}\to \mathbb{R}$ assigns values to the edges. We + +define the graph Laplacian $\mathbf{L} = \mathrm{diag}(\mathbf{A}\mathbf{1}) - \mathbf{A}$ where $\mathbf{A} \in \mathbb{R}^{N \times N}$ is the weighted adjacency matrix. Graph signals are functions mapping nodes to a feature value. We write it as a vector $\mathbf{x} \in \mathbb{R}^N$ , with each entry $[\mathbf{x}]_i$ representing the function value on node $i$ . + +Graph convolutions and frequency response A graph convolutional filter $\mathbf{h}_{\mathbf{G}}$ is composed of consecutive graph shifts by graph Laplacian, defined as $\mathbf{h}_{\mathbf{G}}(\mathbf{L})\mathbf{x} = \sum_{k=0}^{K-1} h_k \mathbf{L}^k \mathbf{x}$ with $\{h_k\}_{k=0}^{K-1}$ as filter parameters. We replace $\mathbf{L}$ with eigendecomposition $\mathbf{L} = \mathbf{V} \boldsymbol{\Lambda} \mathbf{V}^H$ , where $\mathbf{V}$ is the eigenvector matrix and $\boldsymbol{\Lambda}$ is a diagonal matrix with eigenvalues $\{\lambda_{i,N}\}_{i=1}^{N}$ as the entries. The spectral representation of a graph filter is + +$$ +\mathbf {V} ^ {H} \mathbf {h} _ {\mathbf {G}} (\mathbf {L}) \mathbf {x} = \sum_ {k = 1} ^ {K - 1} h _ {k} \boldsymbol {\Lambda} ^ {k} \mathbf {V} ^ {H} \mathbf {x} = \hat {h} (\boldsymbol {\Lambda}) \mathbf {V} ^ {H} \mathbf {x}. \quad (1) +$$ + +This leads to a point-wise frequency response of the graph convolution as $\hat{h} (\lambda) = \sum_{k = 0}^{K - 1}h_k\lambda^k$ + +Graph neural networks A graph neural network (GNN) is a layered architecture, where each layer consists of a bank of graph convolutional filters followed by a point-wise nonlinearity $\sigma : \mathbb{R} \to \mathbb{R}$ . Specifically, the $l$ -th layer of a GNN that produces $F_{l}$ output features $\{\mathbf{x}_{l}^{p}\}_{p=1}^{F_{l}}$ with $F_{l-1}$ input features $\{\mathbf{x}_{l-1}^{q}\}_{q=1}^{F_{l-1}}$ is written as + +$$ +\mathbf {x} _ {l} ^ {p} = \sigma \left(\sum_ {q = 1} ^ {F _ {l - 1}} \mathbf {h} _ {\mathbf {G}} ^ {l p q} (\mathbf {L}) \mathbf {x} _ {l - 1} ^ {q}\right), \tag {2} +$$ + +for each layer $l = 1,2\dots ,L$ . The graph filter $\mathbf{h}_{\mathbf{G}}^{lpq}(\mathbf{L})$ maps the $q$ -th feature of layer $l - 1$ to the $p$ -th feature of layer $l$ . We denote the GNN as a mapping $\Phi_{\mathbf{G}}(\mathbf{H},\mathbf{L},\mathbf{x})$ where $\mathbf{H}\in \mathcal{H}\subset \mathbb{R}^P$ denotes a set of the graph filter + +coefficients with a finite $P$ dimension at all layers and $\mathcal{H}$ denotes the set of all possible parameter sets. + +# 3.2. Manifold neural networks + +Setup We consider a $d$ -dimensional compact, smooth and differentiable Riemannian submanifold $\mathcal{M}$ embedded in a M-dimensional space $\mathbb{R}^{\mathsf{M}}$ with finite volume. This induces a measure $\mu$ which has a non-vanishing Lipschitz continuous density $\rho$ with respect to the Riemannian volume over the manifold with $\rho : \mathcal{M} \to (0,\infty)$ , assumed to be bounded as $0 < \rho_{\min} \leq \rho(x) \leq \rho_{\max} < \infty$ for all $x \in \mathcal{M}$ . The manifold data supported on each point $x \in \mathcal{M}$ is defined by scalar functions $f : \mathcal{M} \to \mathbb{R}$ (Wang et al., 2024b). We use $L^2(\mathcal{M})$ to denote $L^2$ functions over $\mathcal{M}$ with respect to measure $\mu$ . The manifold with probability density function $\rho$ is equipped with a weighted Laplace operator (Grigor'yan, 2006), generalizing the Laplace-Beltrami operator as + +$$ +\mathcal {L} _ {\rho} f = - \frac {1}{2 \rho} \mathrm {d i v} (\rho^ {2} \nabla f), \tag {3} +$$ + +with div denoting the divergence operator of $\mathcal{M}$ and $\nabla$ denoting the gradient operator of $\mathcal{M}$ (Bronstein et al., 2017; Gross & Meinrenken, 2023). + +Manifold convolutions and frequency responses The manifold convolution operation is defined relying on the Laplace operator $\mathcal{L}_{\rho}$ and on the heat diffusion process over the manifold (Wang et al., 2024b). For a function $f \in L^{2}(\mathcal{M})$ as the initial heat condition over $\mathcal{M}$ , the heat condition diffused by a unit time step can be explicitly written as $e^{-\mathcal{L}_{\rho}} f$ . A manifold convolutional filter (Wang et al., 2024b) can be defined in a diffuse-and-sum manner as + +$$ +g (x) = \mathbf {h} \left(\mathcal {L} _ {\rho}\right) f (x) = \sum_ {k = 0} ^ {K - 1} h _ {k} e ^ {- k \mathcal {L} _ {\rho}} f (x), \tag {4} +$$ + +with the $k$ -th diffusion scaled with a filter parameter $h_k \in \mathbb{R}$ . We consider the case in which the Laplace operator is self-adjoint, positive-semidefinite and the manifold $\mathcal{M}$ is compact. In this case, $\mathcal{L}_{\rho}$ has real, positive and discrete eigenvalues $\{\lambda_i\}_{i=1}^{\infty}$ , written as $\mathcal{L}_{\rho} \phi_i = \lambda_i \phi_i$ where $\phi_i$ is the eigenfunction associated with eigenvalue $\lambda_i$ . The eigenvalues are ordered in increasing order as $0 = \lambda_1 \leq \lambda_2 \leq \lambda_3 \leq \ldots$ , and the eigenfunctions are orthonormal and form an eigenbasis of $L^2(\mathcal{M})$ . When mapping a manifold signal onto the eigenbasis $[\hat{f}]_i = \langle f, \phi_i \rangle_{\mathcal{M}} = \int_{\mathcal{M}} f(x) \phi_i(x) \mathrm{d}\mu(x)$ , the manifold convolution can be seen in the spectral domain as + +$$ +[ \hat {g} ] _ {i} = \sum_ {k = 0} ^ {K - 1} h _ {k} e ^ {- k \lambda_ {i}} [ \hat {f} ] _ {i}. \tag {5} +$$ + +Hence, the frequency response of manifold filter is given by $\hat{h} (\lambda) = \sum_{k = 0}^{K - 1}h_ke^{-k\lambda}$ . + +Manifold neural networks A manifold neural network (MNN) is constructed by cascading $L$ layers, each of which contains a bank of manifold convolutional filters and a pointwise nonlinearity $\sigma : \mathbb{R} \to \mathbb{R}$ . The output manifold function of each layer $l = 1, 2, \dots, L$ can be explicitly denoted as + +$$ +f _ {l} ^ {p} (x) = \sigma \left(\sum_ {q = 1} ^ {F _ {l - 1}} \mathbf {h} _ {l} ^ {p q} \left(\mathcal {L} _ {\rho}\right) f _ {l - 1} ^ {q} (x)\right), \tag {6} +$$ + +where $f_{l - 1}^q$ , $1 \leq q \leq F_{l - 1}$ is the $q$ -th input feature from layer $l - 1$ and $f_{l}^{p}$ , $1 \leq p \leq F_{l}$ is the $p$ -th output feature of layer $l$ . We denote MNN as a mapping $\Phi (\mathbf{H},\mathcal{L}_{\rho},f)$ , where $\mathbf{H} \in \mathcal{H} \subset \mathbb{R}^P$ is a collective set of filter parameters in all the manifold convolutional filters. + +# 4. Generalization analysis of GNNs based on manifolds + +We consider a manifold $\mathcal{M}$ as defined in Section 3.2, with a weighted Laplace operator $\mathcal{L}_{\rho}$ as defined in equation 3. Since functions $f \in L^{2}(\mathcal{M})$ characterize information over manifold $\mathcal{M}$ , we restrict our analysis to a finite-dimensional subset of $L^{2}(\mathcal{M})$ up to some eigenvalue of $\mathcal{L}_{\rho}$ , defined as a bandlimited signal. + +Definition 1. A manifold signal $f \in L^{2}(\mathcal{M})$ is bandlimited if there exists some $\lambda > 0$ such that for all eigenpairs $\{\lambda_i, \phi_i\}_{i=1}^{\infty}$ of the weighted Laplacian $\mathcal{L}_{\rho}$ when $\lambda_i > \lambda$ , we have $\langle f, \phi_i \rangle_{\mathcal{M}} = 0$ . + +Suppose we are given a set of $N$ i.i.d. randomly sampled points $X_{N} = \{x_{i}\}_{i = 1}^{N}$ over $\mathcal{M}$ , with $x_{i}\in \mathcal{M}$ sampled according to measure $\mu$ . We construct a graph $\mathbf{G}(\mathcal{V},\mathcal{E},\mathcal{W})$ on these $N$ sampled points $X_{N}$ , where each point $x_{i}$ is a vertex of graph $\mathbf{G}$ , i.e. $\mathcal{V} = X_N$ . Each pair of vertices $(x_{i},x_{j})$ is connected with an edge while the weight attached to the edge $\mathcal{W}(x_i,x_j)$ is determined by a kernel function $K_{\epsilon}$ . The kernel function is decided by the Euclidean distance $\| x_{i} - x_{j}\|$ between these two points. The graph Laplacian denoted as $\mathbf{L}_N$ can be calculated based on the weight function (Merris, 1995). The constructed graph Laplacian with an appropriate kernel function has been proved to approximate the Laplace operator $\mathcal{L}_{\rho}$ of $\mathcal{M}$ (Calder & Trillos, 2022; Belkin & Niyogi, 2008; Dunson et al., 2021). We present the following two definitions of $K_{\epsilon}$ . + +Definition 2 (Gaussian kernel based graph (Belkin & Niyogi, 2008)). The graph $\mathbf{G}(X_N,\mathcal{E},\mathcal{W})$ can be constructed in $(x_{i},x_{j})\in \mathcal{E}$ , as a dense graph degree when the kernel function is defined as + +$$ +\begin{array}{l} \mathcal {W} \left(x _ {i}, x _ {j}\right) = K _ {\epsilon , 1} \left(\frac {\left\| x _ {i} - x _ {j} \right\| ^ {2}}{\epsilon}\right) (7) \\ = \frac {1}{N} \frac {1}{\epsilon^ {d / 2 + 1} (4 \pi) ^ {d / 2}} e ^ {- \frac {\| x _ {i} - x _ {j} \| ^ {2}}{4 \epsilon}}. (8) \\ \end{array} +$$ + +![](images/cd75aa9f911912d32375e867ce7d02a4535dcb4bb623c18b24aa5117a4ad3dd0.jpg) +Figure 2: Frequency response illustration + +The weight function of a Gaussian kernel based graph is defined on unbounded support (i.e. $[0, \infty)$ ), which connects $x_{i}$ and $x_{j}$ regardless of the distance between them. This results in a dense graph with $N^2$ edges. In particular, this Gaussian kernel based graph has been widely used to define the weight value function due to the good approximation properties of the corresponding graph Laplacians to the manifold Laplace operator (Dunson et al., 2021; Belkin & Niyogi, 2008; Xie et al., 2013). + +Definition 3 ( $\epsilon$ -graph (Calder & Trillos, 2022)). The graph $\mathbf{G}(X_N, \mathcal{E}, \mathcal{W})$ can be constructed as an $\epsilon$ -graph with the kernel function defined as + +$$ +\begin{array}{l} \mathcal {W} \left(x _ {i}, x _ {j}\right) = K _ {\epsilon , 2} \left(\frac {\left\| x _ {i} - x _ {j} \right\| ^ {2}}{\epsilon}\right) (9) \\ = \frac {1}{N} \frac {d + 2}{\epsilon^ {d / 2 + 1} \alpha_ {d}} \mathbb {1} _ {[ 0, 1 ]} \left(\frac {\| x _ {i} - x _ {j} \| ^ {2}}{\epsilon}\right), (10) \\ \end{array} +$$ + +with $(x_{i},x_{j})\in \mathcal{E}$ , where $\alpha_{d}$ is the volume of a unit ball of dimension $d$ and $\mathbb{1}$ is the characteristic function. + +The weight function of an $\epsilon$ -graph is defined on a bounded support, i.e., only nodes that are within a certain distance of one another can be connected by an edge. It has also been shown to provide a good approximation of the manifold Laplace operator (Calder & Trillos, 2022). + +# 4.1. Manifold label prediction via node label prediction + +Suppose we have an input manifold signal $f \in L^{2}(\mathcal{M})$ and a label (i.e. target) manifold signal $g \in L^{2}(\mathcal{M})$ over $\mathcal{M}$ . With an MNN $\Phi(\mathbf{H}, \mathcal{L}_{\rho}, \cdot)$ , we predict the target value $g(x)$ based on input $f(x)$ at each point $x \in \mathcal{M}$ . By sampling $N$ points $X_{N}$ over this manifold, we can approximate this problem in a discrete graph domain. Consider a graph $\mathbf{G}(X_{N}, \mathcal{E}, \mathcal{W})$ constructed with $X_{N}$ as either a Gaussian kernel based graph (Definition 2) or an $\epsilon$ -graph (Definition 3) equipped with the graph Laplacian $\mathbf{L}_N$ . Suppose we are given graph signal $\{\mathbf{x}, \mathbf{y}\}$ sampled from $\{f, g\}$ to train a GNN $\Phi_{\mathbf{G}}(\mathbf{H}, \mathbf{L}_N, \cdot)$ , explicitly written as + +$$ +[ \mathbf {x} ] _ {i} = f (x _ {i}), \quad [ \mathbf {y} ] _ {i} = g (x _ {i}) \quad \text {f o r a l l} x _ {i} \in X _ {N}. \tag {11} +$$ + +We assume that the filters in MNN $\Phi (\mathbf{H},\mathcal{L}_{\rho},\cdot)$ and GNN $\Phi_{\mathbf{G}}(\mathbf{H},\mathbf{L}_N,\cdot)$ satisfy a continuity assumption as follows, which is illustrated in Figure 2. + +AS 1. The frequency response function of the filter satisfies + +$$ +\left| \hat {h} (\lambda) \right| = \mathcal {O} (\lambda^ {- d}), \quad \left| \hat {h} ^ {\prime} (\lambda) \right| \leq C _ {L} \lambda^ {- d - 1}, \quad \lambda \in (0, \infty), \tag {12} +$$ + +with $C_L$ a spectral continuity constant that regularizes the smoothness of the filter function. + +To introduce the first of our two main results, we require introducing two assumptions. + +AS 2. (Normalized Lipschitz nonlinearity) The nonlinearity $\sigma$ is normalized Lipschitz continuous, i.e., $|\sigma(a) - \sigma(b)| \leq |a - b|$ , with $\sigma(0) = 0$ . + +AS 3. (Normalized Lipschitz loss function) The loss function $\ell$ is normalized Lipschitz continuous, i.e., $|\ell(y_i, y) - \ell(y_j, y)| \leq |y_i - y_j|$ , with $\ell(y, y) = 0$ . + +Assumption 2 is satisfied by most activations used in practice such as ReLU, modulus and sigmoid. + +The generalization gap is evaluated between the empirical risk over the discrete graph model and the statistical risk over manifold model, with the manifold model viewed as a statistical model since the expectation of the sampled point is with respect to the measure $\mu$ over the manifold. The empirical risk over the sampled graph that we trained to minimize is therefore defined as + +$$ +R _ {\mathbf {G}} (\mathbf {H}) = \frac {1}{N} \sum_ {i = 1} ^ {N} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x}) \right] _ {i}, [ \mathbf {y} ] _ {i}\right). \tag {13} +$$ + +The statistical risk over the manifold is defined as + +$$ +R _ {\mathcal {M}} (\mathbf {H}) = \int_ {\mathcal {M}} \ell \left(\Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)\right) \mathrm {d} \mu (x). \tag {14} +$$ + +The generalization gap is defined to be + +$$ +G A = \sup _ {\mathbf {H} \in \mathcal {H}} | R _ {\mathcal {M}} (\mathbf {H}) - R _ {\mathbf {G}} (\mathbf {H}) |. \tag {15} +$$ + +Theorem 1. Suppose the GNN and MNN with filters satisfying Assumption 1 have $L$ layers with $F$ features in each layer and the input signal is bandlimited (Definition 1). Under Assumptions 2 and 3 it holds in probability at least $1 - \delta$ that + +$$ +\begin{array}{l} G A \leq F ^ {L} C _ {3} \left(\frac {\log N}{N}\right) ^ {\frac {1}{d}} \tag {16} \\ + L F ^ {L - 1} \left(\left(C _ {1} C _ {L} + C _ {2}\right) \sqrt {\frac {\epsilon}{N}} + \frac {\pi^ {2} \sqrt {\log (1 / \delta)}}{6 N}\right), \\ \end{array} +$$ + +when $d \geq 3$ . If $d = 2$ , the first term would be $F^L C_3 \frac{(\log N)^{3/4}}{N^{1/2}}$ , with $C_1, C_2$ , and $C_3$ depending on the geometry of $\mathcal{M}$ , $C_L$ is the spectral continuity constant in Assumption 1. + +1. When the graph is constructed with a Gaussian kernel equation 7, then $\epsilon \sim \left(\frac{\log(C / \delta)}{N}\right)^{\frac{2}{d + 4}}$ . +2. When the graph is constructed as an $\epsilon$ -graph as equation 9, then $\epsilon \sim \left(\frac{\log(CN / \delta)}{N}\right)^{\frac{2}{d + 4}}$ . + +Proof. See Appendix D for proof and the definitions of $C_1$ , $C_2$ and $C_3$ . + +Theorem 1 shows that the generalization gap decreases approximately linearly with the number of nodes $N$ in the logarithmic scale, that is, $\log(GA) = \tilde{\mathcal{O}}(-\log N)$ with $\tilde{\mathcal{O}}$ as the $\mathcal{O}$ notation that ignores logarithmic orders, and that it also increases with the dimension of the underlying manifold $d$ . Another observation is that the generalization gap scales with the size of the GNN architecture. Most importantly, we note the bound increases linearly with the spectral continuity constant $C_L$ (Assumption 1) – a smaller $C_L$ leads to a smaller generalization gap bound, and thus a better generalization capability. While a smaller $C_L$ leads to a smoother GNN, it discriminates fewer spectral components and, therefore, possesses worse discriminability. Consequently, we may observe a larger training loss with these smooth filters, as filters with worse discriminability encompass a smaller hypothesis function class and deteriorate the GNNs' approximation to the target functions during training. Since the testing loss can be upper bounded by the sum of training loss and the bound of generalization gap, on a smoother GNN (a smaller $C_L$ ), the performance on the training data will be closer to the performance on unseen testing data. Therefore, having a GNN with a smaller spectral continuity constant $C_L$ can guarantee more generalizable performance over unseen data from the same manifold. This also indicates that similar testing performance can be achieved by either a GNN with smaller training loss and worse generalization or a GNN with larger training loss and better generalization. In all, this indicates that there exists an optimal point to take the best advantage of the trade-off between a smaller generalization gap and better discriminability, resulting in a smaller testing loss decided by the spectral continuity constant of the GNN. + +# 4.2. Manifold classification via graph classification + +Suppose we have a set of manifolds $\{\mathcal{M}_k\}_{k = 1}^K$ , each of which is $d_{k}$ -dimensional, smooth, compact, differentiable and embedded in $\mathbb{R}^{\mathsf{M}}$ with measure $\mu_{k}$ . Each manifold $\mathcal{M}_k$ equipped with a weighted Laplace operator $\mathcal{L}_{\rho_k,k}$ is labeled with $y_{k}\in \mathbb{R}$ . We assume to have access to $N_{k}$ randomly sampled points according to measure $\mu_{k}$ over each manifold $\mathcal{M}_k$ and construct $K$ graphs $\{\mathbf{G}_k\}_{k = 1}^K$ with graph Laplacians $\mathbf{L}_{N_k,k}$ . The GNN $\Phi_{\mathbf{G}}(\mathbf{H},\mathbf{L}_{N..},\mathbf{x}.)$ is trained on this set of graphs with $\mathbf{x}_k$ as the input graph signal sampled from the manifold signal $f_{k}\in L^{2}(\mathcal{M}_{k})$ and + +$y_{k}\in \mathbb{R}$ as the scalar target label. The final output of the GNN is set to be the average of the output signal values on each node while the output of MNN $\Phi (\mathbf{H},\mathcal{L}_{\rho ,..},f.)$ is the statistical average value of the output signal over the manifold. A loss function $\ell$ evaluates the difference between the output of GNN and MNN with the target label. The empirical risk of the GNN is + +$$ +R _ {\mathbf {G}} (\mathbf {H}) = \sum_ {k = 1} ^ {K} \ell \left(\frac {1}{N _ {k}} \sum_ {i = 1} ^ {N _ {k}} [ \boldsymbol {\Phi} (\mathbf {H}, \mathbf {L} _ {N _ {k}, k}, \mathbf {x} _ {k}) ] _ {i}, y _ {k}\right). \tag {17} +$$ + +While the output of MNN is the average value over the manifold, the statistical risk is defined based on the loss evaluated between the MNN output and the label as + +$$ +R _ {\mathcal {M}} (\mathbf {H}) = \sum_ {k = 1} ^ {K} \ell \left(\int_ {\mathcal {M} _ {k}} \Phi (\mathbf {H}, \mathcal {L} _ {\rho_ {k}, k}, f _ {k}) (x) \mathrm {d} \mu_ {k} (x), y _ {k}\right). \tag {18} +$$ + +The generalization gap is therefore + +$$ +G A = \sup _ {\mathbf {H} \in \mathcal {H}} | R _ {\mathcal {M}} (\mathbf {H}) - R _ {\mathbf {G}} (\mathbf {H}) |. \tag {19} +$$ + +Theorem 2. Suppose the GNN and MNN with filters satisfying Assumption 1 have $L$ layers with $F$ features in each layer and the input signal is bandlimited (Definition 1). Under Assumptions 2 and 3 it holds in probability at least $1 - \delta$ that + +$$ +\begin{array}{l} G A \leq L F ^ {L - 1} \sum_ {k = 1} ^ {K} \left(C _ {1} C _ {L} + C _ {2}\right) \left(\sqrt {\frac {\epsilon_ {k}}{N _ {k}}}\right) \tag {20} \\ \left. + \frac {\pi^ {2} \sqrt {\log (1 / \delta)}}{6 N _ {k}}\right) + F ^ {L} C _ {3} \sum_ {k = 1} ^ {K} \left(\frac {\log N _ {k}}{N _ {k}}\right) ^ {\frac {1}{d _ {k}}}, \\ \end{array} +$$ + +when $d \geq 3$ . If $d = 2$ , the last term would be $F^L C_3 \sum_{k=1}^{K} \frac{(\log N_k)^{3/4}}{N_k^{1/2}}$ , with $C_1, C_2,$ and $C_3$ depending on the geometry of $\mathcal{M}$ , $C_L$ is the spectral continuity constant in Assumption 1. + +1. When the graphs are constructed with a Gaussian kernel equation 7, then $\epsilon_{k} \sim \left(\frac{\log(C / \delta)}{N_{k}}\right)^{\frac{2}{d_{k} + 4}}$ . +2. When the graphs are constructed as $\epsilon$ -graphs as equation 9, then $\epsilon_k \sim \left(\frac{\log(CN_k / \delta)}{N_k}\right)^{\frac{2}{d_k + 4}}$ . + +Proof. See Appendix F for proof and the definitions of $C_1$ , $C_2$ and $C_3$ . + +![](images/70ae1f1940d7c61f54484c9890d306c735c735bb165b407c5f71dc4f1c88fa1f.jpg) + +![](images/cde2ba11ce0d380affd89065671eaf6ac90420cad5269f3b21d43b842bf81e8a.jpg) + +![](images/ee4d16a5352c09993f606c29bc01e63df9891ae751415ce9dc6f1ce12693516b.jpg) + +![](images/199012d760161416193cf2b338d69a8f6a53893e83483e8ba9fabba0cef35ad4.jpg) + +![](images/6e1f17322637524f9ac89c519960b0e4232427045010e977a5e85553d979d8e3.jpg) + +![](images/0306025ead7e1644d5db786bfb5ff1a892eb2906f06abb345f47c92c6e65f135.jpg) + +![](images/aea6b84d5ae80f6ce69776356a61c9df6882f5cf61ad2a4960d622e4bc8c353f.jpg) + +![](images/c1cf7f5d8446278eabb2df01a698abb311c7868204d3a48cecc16f5374b9987d.jpg) + +![](images/7bd3a401862f2f6e5e34e9130fcffa16b26569295937876360e5e859008c6671.jpg) + +![](images/5f75b81c96995183ce7b660f46b9952a44f90864b2ae72ee5d7d4627b7c7162a.jpg) +(a) Arxiv: Two Layers + +![](images/b25933f6960996a46a847e2afec17076c2fd47e7e11b5fbae91f877076825203.jpg) +(b) Arxiv: Three Layers + +![](images/c58c3bb38c8f3708d2b41d696260c27ac4e6350948dcbc4436f6759654e00dfb.jpg) +(c) Arxiv: Two Layers (Loss) +(d) Arxiv: Three Layers (Loss) + +![](images/775c6cff50fbdb1b51e872a33bbd5064b96f0b49a7ffaf024c46d3fcef7b65d5.jpg) + +![](images/18be9848733a06d4a630ef96abff25fa3ad1a6d66230069255cadcdda92e766e.jpg) + +![](images/10486b1cc33ca56e5a27320069a04e15590845d8f729e6b87fe9389afe644d12.jpg) + +![](images/982d63daa02b9e9333a06f741df87893fc1bff187a894086b742ee8525887bbb.jpg) + +![](images/e00f3a36b3169877bd7aac35eb55f73c75cb4292aca3a1df9fca3c86f58fc7ea.jpg) +(e) Cora +(h) Amazon-Ratings +Figure 3: Merged visualization of all datasets: Arxiv (top row), Planetoid (middle row), and Heterophilic and CoAuthors datasets (bottom row). Each row provides accuracy and loss generalization gaps across different configurations and datasets. + +![](images/81882e3e6f0160d21be51b78c927808e6c6131d7d51f895194bf10265cf05956.jpg) +(f)CiteSeer +(i) Roman-Empire + +![](images/c5b7311c363a21fab997103dc083c63577d42df410aaef6cc85ca7d385f6041e.jpg) +(j) CoAuthors CS + +![](images/e98c7102dacb5f75a8a781d182022ad751dc249d9bde0a5c0e89cfbbf312263d.jpg) +(g) PubMed +(k) CoAuthors Physics + +Theorem 2 shows that a single graph sampled from the underlying manifold with large enough sampled points $N_{k}$ from each manifold $\mathcal{M}_k$ can provide an effective approximation to classify the manifold itself. The generalization gap also attests that the trained GNN can generalize to classify other unseen graphs sampled from the same manifold. Similar to the generalization result in node-level tasks, the generalization gap decreases with the number of points sam + +pled over each manifold while increasing with the manifold dimension. A higher dimensional manifold, i.e. higher complexity, needs more samples to guarantee the generalization. The generalization gap also shows a trade-off between the generalization and discriminability as the bound increases linearly with the spectral continuity constant $C_L$ . That is, to guarantee that a GNN for graph classification can generalize effectively, we must impose restrictions on the continuity of + +![](images/70c21bc710e88a5313294436b767b0d8fc7315fc5f1daeee65894b9f8e0aea86.jpg) +(a) Accuracy gap vs nodes +(b) Test accuracy vs nodes + +![](images/37856a167bc20f0fb9cc1b85c1a945633d64d5b99481230714c00345e71f5be7.jpg) +(c) Accuracy gap vs regularizer +(d) Test accuracy vs regularizer +Figure 4: Spectral continuity constant effect on generalization gap and test accuracy. + +its filter functions, which in turn limits the filters' ability to discriminate between different graph features. + +We note that our assumption of a constant number of features can be generalized to include a different number of features in each layer for both node and graph classification. + +# 5. Experiments + +In this section, we empirically study the generalization gap in 8 real-world datasets. The task is to predict the label of a node given a set of features. The datasets vary in the number of nodes from 169, 343 to 3, 327, and in the number of edges from 1, 166, 243 to 9, 104. The feature dimension also varies from 8, 415 to 300 features, and the number of classes of the node label from 40 to 3. In all cases, we vary the number of nodes in the training set by partitioning it in $\{1, 2, 4, 8, 16, 32, 64, 32, 64, 128, 256, 512, 1024\}$ partitions when possible. For both the training and testing sets, we computed the loss in cross-entropy loss, and the accuracy in percentage (\%). Our main goal is to show that the rate presented in Theorem 1 holds in practice. In Figure 3, we plot the generalization gap of the accuracy in the logarithmic scale for a two-layered GNN (Figure 3a), and for a three-layered GNN (Figure 3b). On the upper side, we can see that the generalization bound decreases with the number of nodes and that outside of the strictly overfitting regime (when the training loss is below $95\%$ ), the generalization gap shows a linear decay, as depicted in the dashed line. The same behavior can be seen in Figures 3c, and 3d which correspond to the loss for 2 and 3 layered GNNs. As predicted by our theory, the generalization gap increases with the number of features and layers in the GNN. The behavior of the training and testing accuracy as a function of the number of nodes is intuitive. For the training loss, when the number of nodes in the training set is small, the GNN can overfit the training data. As the number of features increases, the GNN's capacity to overfit also increases. In Figures 3e to 3k, we present the accuracy generalization gaps for 2 and 3 layers with 32 and 64 features. In the overfitting regime, the rate of our generalization bound seems to hold - decreases linearly with the number of nodes in the logarithmic scale. In the non-overfitting regime, our rate holds for the points + +whose training accuracy is below $95\%$ . Also, we validate that the bound increases both with the number of features and the number of layers. + +To measure the impact of the spectral continuity constant $C_L$ , we add a regularizer to the cross-entropy loss (see Appendix J.3). We vary the value of the regularizer, noting that a larger regularizer translates into a smaller $C_L$ and therefore a smoother function. In Figures 4a and 4c we see the empirical manifestation of the bound that we showed (cf. Theorem 1) – a GNN with a smaller $C_L$ (a larger regularizer) will attain a smaller generalization gap. We can see that a larger regularizer (smaller continuity constant $C_L$ , green line, regularizer 0.01) attains a smaller generalization gap, and as the regularization decreases ( $C_L$ increases), the generalization gap increases. The effect of having smaller spectral continuity constants $C_L$ is the lack of discriminability of the GNN. As can be seen in Figures 4b and 4d, the test error decreases when the multiplier is too large ( $C_L$ too small). Therefore, a spectral regularizer not too large can be shown to guarantee good test accuracy, but if the regularizer is too large, the test accuracy will be hurt by the lack of discriminability of the GNN as shown in Figure 4d. In all, we verify the fact that a GNN with a smoother spectral response will have a smaller generalization gap as shown in Theorem 1. + +# 6. Conclusion + +We study the statistical generalization of GNNs from a manifold perspective. We consider graphs sampled from manifolds and prove that GNNs could effectively generalize to unseen data from the manifolds when the number of sampled points is large enough and the filter functions are continuous in the spectral domain. We verify our theoretical results on both synthetic and real-world datasets. The impact of this paper is to show a better understanding of GNN generalization capabilities from a spectral perspective relying on a continuous model. Our work also motivates the practical design of large-scale GNNs. Specifically, in order to achieve a better generalization, it is essential to restrict the discriminability of GNNs by putting assumptions on the spectral continuity of the filter functions in the GNNs. + +# Impact Statement + +In this work, we explore the statistical generalization of GNNs from a manifold perspective by considering graphs sampled from manifolds. The impact of our work relies on showing that GNNs can effectively generalize to unseen data from the manifolds when the number of sampled points is large enough and the filter functions are continuous in the spectral domain. Our work also motivates the practical design of large-scale GNNs given that training on larger graphs attains a smaller generalization gap. Lastly, we observe that other than training on larger graphs, it is essential to restrict the discriminability of GNNs by putting assumptions on the spectral continuity of the filter functions in the GNNs. + +# References + +Aamari, E. and Knop, A. Statistical query complexity of manifold estimation. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, pp. 116-122, 2021. +Arendt, W., Nittka, R., Peter, W., and Steiner, F. Weyl's law: Spectral properties of the Laplacian in mathematics and physics. Mathematical analysis of evolution, information, and complexity, pp. 1-71, 2009. +Belkin, M. and Niyogi, P. Towards a theoretical foundation for laplacian-based manifold methods. Journal of Computer and System Sciences, 74(8):1289-1308, 2008. +Billio, M., Getmansky, M., Lo, A. W., and Pelizzon, L. Econometric measures of connectedness and systemic risk in the finance and insurance sectors. Journal of financial economics, 104(3):535-559, 2012. +Bronstein, M. M., Bruna, J., LeCun, Y., Szlam, A., and Vandergheynst, P. Geometric deep learning: going beyond Euclidean data. IEEE Signal Processing Magazine, 34 (4):18-42, 2017. +Bruna, J., Zaremba, W., Szlam, A., and Lecun, Y. Spectral networks and locally connected networks on graphs. In International Conference on Learning Representations (ICLR2014), CBLS, April 2014, 2014. +Calder, J. and Trillos, N. G. Improved spectral convergence rates for graph Laplacians on $\varepsilon$ -graphs and k-NN graphs. Applied and Computational Harmonic Analysis, 60:123-175, 2022. +Cervino, J., Ruiz, L., and Ribeiro, A. Learning by transference: Training graph neural networks on growing graphs. IEEE Transactions on Signal Processing, 71:233-247, 2023. +Chakraborty, R., Bouza, J., Manton, J. H., and Vemuri, B. C. Manifoldnet: A deep neural network for manifold-valued data with applications. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(2):799-810, 2020. +Chew, J., Hirn, M., Krishnaswamy, S., Needell, D., Perlmutter, M., Steach, H., Viswanath, S., and Wu, H.-T. Geometric scattering on measure spaces. Applied and Computational Harmonic Analysis, 70:101635, 2024. +Chew, J. A., Needell, D., and Perlmutter, M. A convergence rate for manifold neural networks. In 2023 International Conference on Sampling Theory and Applications (SampTA), pp. 1-5. IEEE, 2023. +Choi, H. and Choi, S. Kernel Isomap. *Electronics letters*, 40(25):1612-1613, 2004. + +Cong, W., Ramezani, M., and Mahdavi, M. On provable benefits of depth in training graph convolutional networks. Advances in Neural Information Processing Systems, 34: 9936-9949, 2021. +Defferrard, M., Bresson, X., and Vandergheynst, P. Convolutional neural networks on graphs with fast localized spectral filtering. Advances in neural information processing systems, 29, 2016. +Degroot, M. H. Reaching a consensus. Journal of the American Statistical Association, 69(345):118-121, 1974. doi: 10.1080/01621459.1974.10480137. URL https://www.tandfonline.com/doi/abs/10.1080/01621459.1974.10480137. +Dunson, D. B., Wu, H.-T., and Wu, N. Spectral convergence of graph Laplacian and heat kernel reconstruction in $L^{\infty}$ from random samples. Applied and Computational Harmonic Analysis, 55:282-336, 2021. +Esser, P., Chennuru Vankadara, L., and Ghoshdastidar, D. Learning theory can (sometimes) explain generalisation in graph neural networks. Advances in Neural Information Processing Systems, 34:27043-27056, 2021. +Evans, L. Measure theory and fine properties of functions. Routledge, 2018. +Fan, W., Ma, Y., Li, Q., Wang, J., Cai, G., Tang, J., and Yin, D. A graph neural network framework for social recommendations. IEEE Transactions on Knowledge and Data Engineering, 34(5):2033-2047, 2020. +Farahmand, A. M., Szepesvári, C., and Audibert, J.-Y. Manifold-adaptive dimension estimation. In Proceedings of the 24th international conference on Machine learning, pp. 265-272, 2007. +Fefferman, C., Mitter, S., and Narayanan, H. Testing the manifold hypothesis. Journal of the American Mathematical Society, 29(4):983-1049, 2016. +Fortunato, M., Pfaff, T., Wirnsberger, P., Pritzel, A., and Battaglia, P. Multiscale meshgraphnets. In ICML 2022 2nd AI for Science Workshop, 2022. +García Trillos, N., Gerlach, M., Hein, M., and Slepčev, D. Error estimates for spectral convergence of the graph Laplacian on random geometric graphs toward the Laplace-Beltrami operator. Foundations of Computational Mathematics, 20(4):827-887, 2020. +Garg, V., Jegelka, S., and Jaakkola, T. Generalization and representational limits of graph neural networks. In International Conference on Machine Learning, pp. 3419-3430. PMLR, 2020. + +Gilmer, J., Schoenholz, S. S., Riley, P. F., Vinyals, O., and Dahl, G. E. Neural message passing for quantum chemistry. In International conference on machine learning, pp. 1263-1272. PMLR, 2017. +Grigor'yan, A. Heat kernels on weighted manifolds and applications. Cont. Math, 398(2006):93-191, 2006. +Gross, G. and Meinrenken, E. *Manifolds, vector fields, and differential forms: an introduction to differential geometry*. Springer Nature, 2023. +He, J., Kanatsoulis, C. I., and Ribeiro, A. Network alignment with transferable graph autoencoders. arXiv preprint arXiv:2310.03272, 2023. +Johnson, D. R., Chew, J. A., Brouwer, E. D., Krishnaswamy, S., Needell, D., and Perlmutter, M. Manifold filtercombine networks, 2025. URL https://arxiv.org/abs/2307.04056. +Ju, H., Li, D., Sharma, A., and Zhang, H. R. Generalization in graph neural networks: Improved PAC-Bayesian bounds on graph diffusion. In International Conference on Artificial Intelligence and Statistics, pp. 6314-6341. PMLR, 2023. +Jumper, J., Evans, R., Pritzel, A., Green, T., Figurnov, M., Ronneberger, O., Tunyasuvunakool, K., Bates, R., Žídek, A., Potapenko, A., et al. Highly accurate protein structure prediction with AlphaFold. Nature, 596(7873):583-589, 2021. +Kawaguchi, K., Kaelbling, L. P., and Bengio, Y. Generalization in deep learning. arXiv preprint arXiv:1710.05468, 1(8), 2017. +Keriven, N., Bietti, A., and Vaiter, S. Convergence and stability of graph convolutional networks on large random graphs. Advances in Neural Information Processing Systems, 33:21512-21523, 2020. +Kipf, T. N. and Welling, M. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2016. +Lam, R., Sanchez-Gonzalez, A., Willson, M., Wirnsberger, P., Fortunato, M., Alet, F., Ravuri, S., Ewalds, T., Eaton-Rosen, Z., Hu, W., et al. Learning skillful medium-range global weather forecasting. Science, 382(6677):1416-1421, 2023. +Le, T. and Jegelka, S. Limits, approximation and size transferability for GNNs on sparse graphs via graphops. Advances in Neural Information Processing Systems, 36, 2024. + +Lee, J., Kim, H., Lee, J., and Yoon, S. Transfer learning for deep learning on graph-structured data. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 31, 2017. +Levie, R. A graphon-signal analysis of graph neural networks. Advances in Neural Information Processing Systems, 36, 2024. +Levie, R., Huang, W., Bucci, L., Bronstein, M., and Kutyniok, G. Transferability of spectral graph convolutional neural networks. Journal of Machine Learning Research, 22(272):1-59, 2021. +Liao, R., Urtasun, R., and Zemel, R. A PAC-Bayesian approach to generalization bounds for graph neural networks. In International Conference on Learning Representations, 2020. +Lovász, L. Large networks and graph limits, volume 60. American Mathematical Soc., 2012. +Ma, J., Deng, J., and Mei, Q. Subgroup generalization and fairness of graph neural networks. Advances in Neural Information Processing Systems, 34:1048-1061, 2021. +Maskey, S., Levie, R., Lee, Y., and Kutyniok, G. Generalization analysis of message passing neural networks on large random graphs. Advances in neural information processing systems, 35:4805-4817, 2022. +Maskey, S., Levie, R., and Kutyniok, G. Transferability of graph neural networks: an extended graphon approach. Applied and Computational Harmonic Analysis, 63:48-83, 2023. +Maskey, S., Kutyniok, G., and Levie, R. Generalization bounds for message passing networks on mixture of graphons. arXiv preprint arXiv:2404.03473, 2024. +Merris, R. A survey of graph Laplacians. Linear and Multilinear Algebra, 39(1-2):19-31, 1995. +Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S., and Dean, J. Distributed representations of words and phrases and their compositionality. Advances in neural information processing systems, 26, 2013. +Monti, F., Boscaini, D., Masci, J., Rodola, E., Svoboda, J., and Bronstein, M. M. Geometric deep learning on graphs and manifolds using mixture model CNNs. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5115-5124, 2017. +Narayanan, H. and Niyogi, P. On the sample complexity of learning smooth cuts on a manifold. In $COLT$ , 2009. + +Osher, S., Shi, Z., and Zhu, W. Low dimensional manifold model for image processing. SIAM Journal on Imaging Sciences, 10(4):1669-1690, 2017. +Parada-Mayorga, A., Wang, Z., and Ribeiro, A. Graphon pooling for reducing dimensionality of signals and convolutional operators on graphs. IEEE Transactions on Signal Processing, 2023. +Peyre, G. Manifold models for signals and images. Computer vision and image understanding, 113(2):249-260, 2009. +Platonov, O., Kuznedelev, D., Diskin, M., Babenko, A., and Prokhorenkova, L. A critical look at the evaluation of gnns under heterophily: Are we really making progress? In International Conference on Learning Representations, 2023. +Ramakrishna, R., Wai, H.-T., and Scaglione, A. A user guide to low-pass graph signal processing and its applications: Tools and applications. IEEE Signal Processing Magazine, 37(6):74-85, 2020. +Ruiz, L., Chamon, L., and Ribeiro, A. Graphon neural networks and the transferability of graph neural networks. Advances in Neural Information Processing Systems, 33: 1702-1712, 2020. +Ruiz, L., Chamon, L. F., and Ribeiro, A. Transferability properties of graph neural networks. IEEE Transactions on Signal Processing, 2023. +Scarselli, F., Gori, M., Tsoi, A. C., Hagenbuchner, M., and Monfardini, G. The graph neural network model. IEEE transactions on neural networks, 20(1):61-80, 2008. +Scarselli, F., Tsoi, A. C., and Hagenbuchner, M. The Vapnik-Chervonenkis dimension of graph and recursive neural networks. Neural Networks, 108:248-259, 2018. +Shchur, O., Mumme, M., Bojchevski, A., and Gunnemann, S. Pitfalls of graph neural network evaluation. arXiv preprint arXiv:1811.05868, 2018. +Shi, W. and Rajkumar, R. Point-GNN: Graph neural network for 3D object detection in a point cloud. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 1711-1719, 2020. +Shi, Y. and Xu, B. Gradient estimate of an eigenfunction on a compact Riemannian manifold without boundary. Annals of Global Analysis and Geometry, 38:21-26, 2010. +Strokach, A., Becerra, D., Corbi-Verge, C., Perez-Riba, A., and Kim, P. M. Fast and flexible protein design using deep graph neural networks. Cell systems, 11(4):402-411, 2020. + +Talmon, R., Mallat, S., Zaveri, H., and Coifman, R. R. Manifold learning for latent variable inference in dynamical systems. IEEE Transactions on Signal Processing, 63 (15):3843-3856, 2015. +Talwalkar, A., Kumar, S., and Rowley, H. Large-scale manifold learning. In 2008 IEEE Conference on Computer Vision and Pattern Recognition, pp. 1-8. IEEE, 2008. +Tang, H. and Liu, Y. Towards understanding generalization of graph neural networks. In International Conference on Machine Learning, pp. 33674-33719. PMLR, 2023. +Verma, S. and Zhang, Z.-L. Stability and generalization of graph convolutional neural networks. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 1539-1548, 2019. +Von Luxburg, U., Belkin, M., and Bousquet, O. Consistency of spectral clustering. The Annals of Statistics, pp. 555-586, 2008. +Wang, K., Shen, Z., Huang, C., Wu, C.-H., Dong, Y., and Kanakia, A. Microsoft academic graph: When experts are not enough. Quantitative Science Studies, 1(1):396-413, 2020. +Wang, Z., Eisen, M., and Ribeiro, A. Learning decentralized wireless resource allocations with graph neural networks. IEEE Transactions on Signal Processing, 70:1850-1863, 2022a. +Wang, Z., Ruiz, L., and Ribeiro, A. Convolutional neural networks on manifolds: From graphs and back. In 2022 56th Asilomar Conference on Signals, Systems, and Computers, pp. 356-360. IEEE, 2022b. +Wang, Z., Ruiz, L., and Ribeiro, A. Geometric graph filters and neural networks: Limit properties and discriminability trade-offs. IEEE Transactions on Signal Processing, 2024a. +Wang, Z., Ruiz, L., and Ribeiro, A. Stability to deformations of manifold filters and manifold neural networks. IEEE Transactions on Signal Processing, pp. 1-15, 2024b. doi: 10.1109/TSP.2024.3378379. +Wu, Y. and Chan, K. L. An extended Isomap algorithm for learning multi-class manifold. In Proceedings of 2004 International Conference on Machine Learning and Cybernetics (IEEE Cat. No. 04EX826), volume 6, pp. 3429-3433. IEEE, 2004. +Wu, Z., Song, S., Khosla, A., Yu, F., Zhang, L., Tang, X., and Xiao, J. 3D Shapenets: A deep representation for volumetric shapes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1912-1920, 2015. + +Xie, Y., Ho, J., and Vemuri, B. C. Multiple atlas construction from a heterogeneous brain MR image collection. IEEE transactions on medical imaging, 32(3):628-635, 2013. +Yang, B., Xiang, M., and Zhang, Y. Multi-manifold discriminant Isomap for visualization and classification. Pattern Recognition, 55:215-230, 2016a. +Yang, Z., Cohen, W., and Salakhudinov, R. Revisiting semi-supervised learning with graph embeddings. In International conference on machine learning, pp. 40-48. PMLR, 2016b. +Yehudai, G., Fetaya, E., Meirom, E., Chechik, G., and Maron, H. From local structures to size generalization in graph neural networks. In International Conference on Machine Learning, pp. 11975-11986. PMLR, 2021. +Zhou, X. and Wang, H. The generalization error of graph convolutional networks may enlarge with more layers. Neurocomputing, 424:97-106, 2021. +Zhu, Q., Yang, C., Xu, Y., Wang, H., Zhang, C., and Han, J. Transfer learning of graph neural networks with ego-graph information maximization. Advances in Neural Information Processing Systems, 34:1766-1779, 2021. + +# Contents + +1 Introduction 1 +2 Related works 2 + +2.1 Generalization bounds of GNNs 2 +2.2 Neural networks on manifolds 3 + +3 Preliminaries 3 + +3.1 Graph neural networks 3 +3.2 Manifold neural networks 4 + +4 Generalization analysis of GNNs based on manifolds 4 + +4.1 Manifold label prediction via node label prediction 5 +4.2 Manifold classification via graph classification 6 + +5 Experiments 8 +6 Conclusion 8 + +A Induced manifold signals 15 +B Convergence of GNN to MNN 15 +C Local Lipschitz continuity of MNNs 19 +D Proof of Theorem 1 21 +E Corollary of Theorem 1 23 +F Proof of Theorem 2 24 +G Further references 25 +H Filter Assumption 25 + +I Manifold Assumption 25 +J Experiment details and further experiments 25 + +J.1 ModelNet10 and ModelNet40 graph classification tasks 26 +J.2 Node classification training details and datasets 27 +J.3 Spectral Continuity Constant Regularizer 28 + +J.3.1 Arxiv dataset 28 + +J.3.2 Cora dataset 28 +J.3.3 CiteSeer dataset 31 +J.3.4 PubMed dataset 32 +J.3.5 Coauthors CS dataset 32 +J.3.6 Coauthors Physics dataset 33 +J.3.7 Heterophilous Amazon ratings dataset 34 +J.3.8 Heterophilous Roman Empire dataset 35 + +# A. Induced manifold signals + +The graph signal attached to this constructed graph $\mathbf{G}$ can be seen as the discretization of the continuous function over the manifold. Suppose $f\in L^{2}(\mathcal{M})$ , the graph signal $\mathbf{x}_N$ is composed of discrete data values of the function $f$ evaluated at $X_{N}$ , i.e. $[\mathbf{x}_N]_i = f(x_i)$ for $i = 1,2\dots ,N$ . With a sampling operator $\mathbf{P}_N:L^2 (\mathcal{M})\to L^2 (X_N)$ , the discretization can be written as + +$$ +\mathbf {x} _ {N} = \mathbf {P} _ {N} f. \tag {21} +$$ + +Let $\mu_N$ be the empirical measure of the random sample as + +$$ +\mu_ {N} = \frac {1}{N} \sum_ {i = 1} ^ {N} \delta_ {x _ {i}}. \tag {22} +$$ + +Let $\{V_i\}_{i=1}^N$ be the decomposition (García Trillos et al., 2020) of $\mathcal{M}$ with respect to $X_N$ with $V_i \subset B_r(x_i)$ , where $B_r(x_i)$ denotes the closed metric ball of radius $r$ centered at $x_i \in \mathcal{M}$ with respect to the Euclidean distance in the Euclidean ambient space. The decomposition can be achieved by the optimal transportation map $T: \mathcal{M} \to X_N$ , which is defined by the $\infty$ -Optimal Transport distance between $\mu$ and $\mu_N$ . + +$$ +d _ {\infty} (\mu , \mu_ {N}) := \min _ {T: T _ {\#} \mu = \mu_ {N}} \operatorname {e s s u p} _ {x \in \mathcal {M}} d (x, T (x)), \tag {23} +$$ + +where $T_{\#}\mu = \mu_N$ indicates that $\mu (T^{-1}(V)) = \mu_N(V)$ for every $V_{i}$ of $\mathcal{M}$ . This transportation map $T$ induces the partition $V_{1},V_{2},\dots V_{N}$ of $\mathcal{M}$ , where $V_{i}\coloneqq T^{-1}(\{x_{i}\})$ with $\mu (V_i) = \frac{1}{N}$ for all $i = 1,\dots N$ . The radius of $V_{i}$ can be bounded as $r\leq A(\log N / N)^{1 / d}$ when the manifold dimension $d\geq 3$ and $r\leq A(\log N)^{3 / 4} / N^{1 / 2}$ when $d = 2$ with $A$ related to the geometry of $\mathcal{M}$ (García Trillos et al., 2020)[Theorem 2]. + +The manifold function induced by the graph signal $\mathbf{x}_N$ over the sampled graph $\mathbf{G}$ is defined by + +$$ +\left(\mathbf {I} _ {N} \mathbf {x} _ {N}\right) (x) = \sum_ {i = 1} ^ {N} [ \mathbf {x} ] _ {i} \mathbb {1} _ {x \in V _ {i}}, \text {f o r a l l} x \in \mathcal {M} \tag {24} +$$ + +where we denote $\mathbf{I}_N:L^2 (X_N)\to L^2 (\mathcal{M})$ as the inducing operator. + +# B. Convergence of GNN to MNN + +The convergence of GNN on sampled graphs to MNN provides the support for the generalization analysis. We first introduce the inner product over the manifold. The inner product of signals $f, g \in L^{2}(\mathcal{M})$ is defined as + +$$ +\langle f, g \rangle_ {\mathcal {M}} = \int_ {\mathcal {M}} f (x) g (x) d \mu (x), \tag {25} +$$ + +where $\mathrm{d}\mu (x)$ is the volume element with respect to the measure $\mu$ over $\mathcal{M}$ . Similarly, the norm of the manifold signal $f$ is + +$$ +\| f \| _ {\mathcal {M}} ^ {2} = \langle f, f \rangle_ {\mathcal {M}}. \tag {26} +$$ + +Proposition 1. Let $\mathcal{M} \subset \mathbb{R}^{\mathsf{M}}$ be an embedded manifold with weighted Laplace operator $\mathcal{L}_{\rho}$ and a bandlimited manifold signal $f$ . Graph $\mathbf{G}_N$ is constructed based on a set of $N$ i.i.d. randomly sampled points $X_N = \{x_1, x_2, \dots, x_N\}$ according to measure $\mu$ over $\mathcal{M}$ . A graph signal $\mathbf{x}$ is the sampled manifold function values at $X_N$ . The graph Laplacian $\mathbf{L}_N$ is calculated based on equation 7 or equation 9 with $\epsilon$ as the graph parameter. Let $\Phi(\mathbf{H}, \mathcal{L}_{\rho}, \cdot)$ be a MNN on $\mathcal{M}$ equation 6 with $L$ layers and $F$ features in each layer. Let $\Phi_{\mathbf{G}}(\mathbf{H}, \mathbf{L}_N, \cdot)$ be the GNN with the same architecture applied to the graph $\mathbf{G}_N$ . Then, with the filters satisfy Assumption 1 and nonlinearities as normalized Lipschitz continuous, it holds in probability at least $1 - \delta$ that + +$$ +\frac {1}{N} \sum_ {i = 1} ^ {N} \| \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x}) - \mathbf {P} _ {N} \boldsymbol {\Phi} (\mathbf {H}, \mathcal {L} _ {\rho}, \mathbf {I} _ {N} \mathbf {x}) \| _ {2} \leq L F ^ {L - 1} \left(C _ {1} \sqrt {\epsilon} + C _ {2} \sqrt {\frac {\log (1 / \delta)}{N}}\right) \tag {27} +$$ + +where $C_1, C_2$ are constants defined in the following proof. + +Proposition 2. (Wang et al., 2024a)[Proposition 2, Proposition 4] Let $\mathcal{M} \subset \mathbb{R}^{\mathsf{M}}$ be equipped with Laplace operator $\mathcal{L}_{\rho}$ , whose eigendecomposition is given by $\{\lambda_i, \phi_i\}_{i=1}^{\infty}$ . Let $\mathbf{L}_N$ be the discrete graph Laplacian of graph weights defined as equation 7 (or equation 9), with spectrum $\{\lambda_{i,N}, \phi_{i,N}\}_{i=1}^{N}$ . Fix $K \in \mathbb{N}^{+}$ and assume that $\epsilon = \epsilon(N) \geq (\log(C/\delta)/N)^{2/(d+4)}$ (or $\epsilon = \epsilon(N) \geq (\log(CN/\delta)/N)^{2/(d+4)}$ ). Then, with probability at least $1-\delta$ , we have + +$$ +\left| \lambda_ {i} - \lambda_ {i, N} \right| \leq C _ {\mathcal {M}, 1} \lambda_ {i} \sqrt {\epsilon}, \quad \left\| a _ {i} \phi_ {i, N} - \phi_ {i} \right\| \leq C _ {\mathcal {M}, 2} \frac {\lambda_ {i}}{\theta_ {i}} \sqrt {\epsilon}, \tag {28} +$$ + +with $a_{i}\in \{-1,1\}$ for all $i < K$ and $\theta$ the eigengap of $\mathcal{L}$ , i.e., $\theta_{i} = \min \{\lambda_{i} - \lambda_{i - 1},\lambda_{i + 1} - \lambda_{i}\}$ . The constants $C_{\mathcal{M},1}$ , $C_{\mathcal{M},2}$ depend on $d$ and the volume, the injectivity radius and sectional curvature of $\mathcal{M}$ . + +Proof. Because $\{x_1, x_2, \dots, x_N\}$ is a set of randomly sampled points from $\mathcal{M}$ , based on Theorem 19 in (Von Luxburg et al., 2008) we can claim that + +$$ +\left| \langle \mathbf {P} _ {N} f, \mathbf {P} _ {N} \phi_ {i} \rangle - \langle f, \phi_ {i} \rangle_ {\mathcal {M}} \right| = O \left(\sqrt {\frac {\log (1 / \delta)}{N}}\right). \tag {29} +$$ + +This also indicates that + +$$ +\left| \| \mathbf {P} _ {N} f \| ^ {2} - \| f \| _ {\mathcal {M}} ^ {2} \right| = O \left(\sqrt {\frac {\log (1 / \delta)}{N}}\right), \tag {30} +$$ + +which indicates $\| \mathbf{P}_Nf\| = \| f\|_{\mathcal{M}} + O((\log (1 / \delta) / N)^{1 / 4})$ . We suppose that the input manifold signal is $\lambda_{M}$ -bandlimited with $M$ spectral components. We first write out the filter representation as + +$$ +\begin{array}{l} \left\| \mathbf {h} \left(\mathbf {L} _ {N}\right) \mathbf {P} _ {N} f - \mathbf {P} _ {N} \mathbf {h} \left(\mathcal {L} _ {\rho}\right) f \right\| = \left\| \sum_ {i = 1} ^ {N} \hat {h} \left(\lambda_ {i, N}\right) \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} - \sum_ {i = 1} ^ {M} \hat {h} \left(\lambda_ {i}\right) \langle f, \phi_ {i} \rangle_ {\mathcal {M}} \mathbf {P} _ {N} \phi_ {i} \right\| \\ \leq \left\| \sum_ {i = 1} ^ {M} \hat {h} \left(\lambda_ {i, N}\right) \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} - \sum_ {i = 1} ^ {M} \hat {h} \left(\lambda_ {i}\right) \langle f, \phi_ {i} \rangle_ {\mathcal {M}} \mathbf {P} _ {N} \phi_ {i} + \sum_ {i = M + 1} ^ {N} \hat {h} \left(\lambda_ {i, N}\right) \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} \right\| (32) \\ \leq \left\| \sum_ {i = 1} ^ {M} \hat {h} \left(\lambda_ {i, N}\right) \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} - \sum_ {i = 1} ^ {M} \hat {h} \left(\lambda_ {i}\right) \langle f, \phi_ {i} \rangle_ {\mathcal {M}} \mathbf {P} _ {N} \phi_ {i} \right\| + \left\| \sum_ {i = M + 1} ^ {N} \hat {h} \left(\lambda_ {i, N}\right) \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} \right\| (33) \\ \end{array} +$$ + +The first part of equation 33 can be decomposed with the triangle inequality as + +$$ +\begin{array}{l} \left\| \sum_ {i = 1} ^ {M} \hat {h} \left(\lambda_ {i, N}\right) \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} - \sum_ {i = 1} ^ {M} \hat {h} \left(\lambda_ {i}\right) \langle f, \phi_ {i} \rangle_ {\mathcal {M}} \mathbf {P} _ {N} \phi_ {i} \right\| \\ \leq \left\| \sum_ {i = 1} ^ {M} \left(\hat {h} \left(\lambda_ {i, N}\right) - \hat {h} \left(\lambda_ {i}\right)\right) \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} \right\| + \left\| \sum_ {i = 1} ^ {M} \hat {h} \left(\lambda_ {i}\right) \left(\langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} - \langle f, \phi_ {i} \rangle_ {\mathcal {M}} \mathbf {P} _ {N} \phi_ {i}\right) \right\|. \tag {34} \\ \end{array} +$$ + +In equation 34, the first part relies on the difference of eigenvalues and the second part depends on the eigenvector difference. The first term in equation 34 is bounded with Cauchy-Schwartz inequality as + +$$ +\begin{array}{l} \left\| \sum_ {i = 1} ^ {M} \left(\hat {h} \left(\lambda_ {i, n}\right) - \hat {h} \left(\lambda_ {i}\right)\right) \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} \right\| \leq \sum_ {i = 1} ^ {M} \left| \hat {h} \left(\lambda_ {i, N}\right) - \hat {h} \left(\lambda_ {i}\right) \right| | \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle | (35) \\ \leq \left\| \mathbf {P} _ {N} f \right\| \sum_ {i = 1} ^ {M} \left| \hat {h} ^ {\prime} \left(\lambda_ {i}\right) \right| \left| \lambda_ {i, N} - \lambda_ {i} \right| (36) \\ \leq \left\| \mathbf {P} _ {N} f \right\| \sum_ {i = 1} ^ {M} C _ {\mathcal {M}, 1} C _ {L} \sqrt {\epsilon} \lambda_ {i} ^ {- d} (37) \\ \leq \left\| \mathbf {P} _ {N} f \right\| C _ {L} C _ {\mathcal {M}, 1} \sqrt {\epsilon} \sum_ {i = 1} ^ {M} i ^ {- 2} (38) \\ \leq \left(\| f \| _ {\mathcal {M}} + \left(\frac {\log (1 / \delta)}{N}\right) ^ {\frac {1}{4}}\right) C _ {\mathcal {M}, 1} \sqrt {\epsilon} \frac {\pi^ {2}}{6} := A _ {1} (N) (39) \\ \end{array} +$$ + +In equation 37, it depends on the filter assumption in Assumption 1. In equation 38, we implement Weyl's law (Arendt et al., 2009) which indicates that eigenvalues of Laplace operator scales with the order $\lambda_{i}\sim i^{2 / d}$ . The last inequality comes from the fact that $\sum_{i = 1}^{\infty}i^{-2} = \frac{\pi^2}{6}$ . The second term in equation 34 can be bounded with the triangle inequality as + +$$ +\begin{array}{l} \left\| \sum_ {i = 1} ^ {M} \hat {h} (\lambda_ {i}) \left(\langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} - \langle f, \phi_ {i} \rangle_ {\mathcal {M}} \mathbf {P} _ {N} \phi_ {i}\right) \right\| \\ \leq \left\| \sum_ {i = 1} ^ {M} \hat {h} (\lambda_ {i}) \left(\langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} - \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \mathbf {P} _ {N} \phi_ {i}\right) \right\| \\ + \left\| \sum_ {i = 1} ^ {M} \hat {h} \left(\lambda_ {i}\right) \left(\left\langle \mathbf {P} _ {N} f, \phi_ {i, N} \right\rangle \mathbf {P} _ {N} \phi_ {i} - \left\langle f, \phi_ {i} \right\rangle_ {\mathcal {M}} \mathbf {P} _ {N} \phi_ {i}\right) \right\| \tag {40} \\ \end{array} +$$ + +The first term in equation 40 can be bounded with inserting the eigenfunction convergence result in Proposition 2 as + +$$ +\begin{array}{l} \left\| \sum_ {i = 1} ^ {M} \hat {h} (\lambda_ {i}) \left(\langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle \phi_ {i, N} - \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle_ {\mathcal {M}} \mathbf {P} _ {N} \phi_ {i}\right) \right\| \\ \leq \sum_ {i = 1} ^ {M} \left| \hat {h} \left(\lambda_ {i}\right) \right| \| \mathbf {P} _ {N} f \| \| \phi_ {i, N} - \mathbf {P} _ {N} \phi_ {i} \| (41) \\ \leq \sum_ {i = 1} ^ {M} \left(\lambda_ {i} ^ {- d + 1}\right) \frac {C _ {\mathcal {M} , 2} \sqrt {\epsilon}}{\theta_ {i}} \left(\| f \| _ {\mathcal {M}} + \left(\frac {\log (1 / \delta)}{N}\right) ^ {\frac {1}{4}}\right) (42) \\ \leq \sum_ {i = 1} ^ {M} \left(\lambda_ {i} ^ {- d + 1}\right) \max _ {i = 1, \dots , M} \theta_ {i} ^ {- 1} C _ {\mathcal {M}, 2} \sqrt {\epsilon} \left(\| f \| _ {\mathcal {M}} + \left(\frac {\log (1 / \delta)}{N}\right) ^ {\frac {1}{4}}\right) (43) \\ := A _ {2} (M, N). (44) \\ \end{array} +$$ + +Considering the filter assumption in Assumption 1, the second term in equation 40 can be written as + +$$ +\begin{array}{l} \left\| \sum_ {i = 1} ^ {M} \hat {h} \left(\lambda_ {i, N}\right) \left(\left\langle \mathbf {P} _ {N} f, \phi_ {i, N} \right\rangle \mathbf {P} _ {N} \phi_ {i} - \left\langle f, \phi_ {i} \right\rangle_ {\mathcal {M}} \mathbf {P} _ {N} \phi_ {i}\right) \right\| \\ \leq \sum_ {i = 1} ^ {M} \left| \hat {h} \left(\lambda_ {i, N}\right) \right| \left| \left\langle \mathbf {P} _ {N} f, \phi_ {i, N} \right\rangle - \left\langle f, \phi_ {i} \right\rangle_ {\mathcal {M}} \right| \| \mathbf {P} _ {N} \phi_ {i} \| (45) \\ \leq \sum_ {i = 1} ^ {M} \left(\lambda_ {i, N} ^ {- d}\right) \left| \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle - \langle f, \phi_ {i} \rangle_ {\mathcal {M}} \right| \left(1 + \left(\frac {\log (1 / \delta)}{N}\right) ^ {\frac {1}{4}}\right) (46) \\ \leq \sum_ {i = 1} ^ {M} \left(1 + C _ {\mathcal {M}, 1} \sqrt {\epsilon}\right) ^ {- d} \left(\lambda_ {i} ^ {- d}\right) \left| \langle \mathbf {P} _ {N} f, \phi_ {i, N} \rangle - \langle f, \phi_ {i} \rangle_ {\mathcal {M}} \right| \left(1 + \left(\frac {\log (1 / \delta)}{N}\right) ^ {\frac {1}{4}}\right) (47) \\ \leq \frac {\pi^ {2}}{6} \left| \left\langle \mathbf {P} _ {N} f, \phi_ {i, N} \right\rangle - \left\langle f, \phi_ {i} \right\rangle_ {\mathcal {M}} \right| \left(1 + \left(\frac {\log (1 / \delta)}{N}\right) ^ {\frac {1}{4}}\right) := A _ {3} (N) (48) \\ \end{array} +$$ + +The term $|\langle \mathbf{P}_Nf,\phi_{i,N}\rangle -\langle f,\phi_i\rangle_{\mathcal{M}}|$ can be decomposed by inserting a term $\langle \mathbf{P}_Nf,\mathbf{P}_N\phi_i\rangle$ as + +$$ +\begin{array}{l} \left| \left\langle \mathbf {P} _ {N} f, \phi_ {i, N} \right\rangle - \left\langle f, \phi_ {i} \right\rangle_ {\mathcal {M}} \right| \leq \left| \left\langle \mathbf {P} _ {N} f, \phi_ {i, N} \right\rangle - \left\langle \mathbf {P} _ {N} f, \mathbf {P} _ {N} \phi_ {i} \right\rangle + \left\langle \mathbf {P} _ {N} f, \mathbf {P} _ {N} \phi_ {i} \right\rangle - \left\langle f, \phi_ {i} \right\rangle_ {\mathcal {M}} \right| (49) \\ \leq \left| \left\langle \mathbf {P} _ {N} f, \phi_ {i, N} \right\rangle - \left\langle \mathbf {P} _ {N} f, \mathbf {P} _ {N} \phi_ {i} \right\rangle \right| + \left| \left\langle \mathbf {P} _ {N} f, \mathbf {P} _ {N} \phi_ {i} \right\rangle - \left\langle f, \phi_ {i} \right\rangle_ {\mathcal {M}} \right| (50) \\ \leq \left\| \mathbf {P} _ {N} f \right\| \left\| \phi_ {i, N} - \mathbf {P} _ {N} \phi_ {i} \right\| + | \langle \mathbf {P} _ {N} f, \mathbf {P} _ {N} \phi_ {i} \rangle - \langle f, \phi_ {i} \rangle_ {\mathcal {M}} | (51) \\ \leq \left(\| f \| _ {\mathcal {M}} + \left(\frac {\log (1 / \delta)}{N}\right) ^ {\frac {1}{4}}\right) \frac {C _ {\mathcal {M} , 2} \lambda_ {i} \sqrt {\epsilon}}{\theta_ {i}} + \sqrt {\frac {\log (1 / \delta)}{N}} (52) \\ \end{array} +$$ + +Then equation equation 47 can be bounded as + +$$ +\begin{array}{l} \left\| \sum_ {i = 1} ^ {M} \hat {h} (\lambda_ {i, N}) \big (\langle \mathbf {P} _ {N} f, \boldsymbol {\phi} _ {i, N} \rangle \mathbf {P} _ {N} \boldsymbol {\phi} _ {i} - \langle f, \boldsymbol {\phi} _ {i} \rangle_ {\mathcal {M}} \mathbf {P} _ {N} \boldsymbol {\phi} _ {i} \big) \right\| \\ \leq \sum_ {i = 1} ^ {M} (1 + C _ {\mathcal {M}, 1} \sqrt {\epsilon}) ^ {- d} \left(\lambda_ {i} ^ {- d}\right) \left(\left\| f \| _ {\mathcal {M}} + \left(\frac {\log (1 / \delta)}{N}\right) ^ {\frac {1}{4}}\right) \frac {C _ {\mathcal {M} , 2} \lambda_ {i} \sqrt {\epsilon}}{\theta_ {i}} + \sqrt {\frac {\log (1 / \delta)}{N}}\right) \left(1 + \left(\frac {\log (1 / \delta)}{N}\right) ^ {\frac {1}{4}}\right) (53) \\ \leq \frac {\pi^ {2}}{6} \max _ {i = 1, \dots , M} \frac {C _ {\mathcal {M} , 2} \sqrt {\epsilon}}{\theta_ {i}} \left(\| f \| _ {\mathcal {M}} + \left(\frac {\log (1 / \delta)}{N}\right) ^ {\frac {1}{4}}\right) + \frac {\pi^ {2}}{6} \sqrt {\frac {\log (1 / \delta)}{N}} (54) \\ \end{array} +$$ + +The second term in equation 33 can be bounded with the eigenvalue difference bound in Proposition 2 as + +$$ +\begin{array}{l} \left\| \sum_ {i = M + 1} ^ {N} \hat {h} \left(\lambda_ {i, N}\right) \left\langle \mathbf {P} _ {N} f, \phi_ {i, N} \right\rangle \phi_ {i, N} \right\| \leq \sum_ {i = M + 1} ^ {N} \left(\lambda_ {i, N} ^ {- d}\right) \left(\| f \| _ {\mathcal {M}} + \left(\frac {\log (1 / \delta)}{N}\right) ^ {\frac {1}{4}}\right) (55) \\ \leq \sum_ {i = M + 1} ^ {\infty} \left(\lambda_ {i, N} ^ {- d}\right) \| f \| _ {\mathcal {M}} (56) \\ \leq \left(1 + C _ {\mathcal {M}, 1} \sqrt {\epsilon}\right) ^ {- d} \sum_ {i = M + 1} ^ {\infty} \left(\lambda_ {i} ^ {- d}\right) \| f \| _ {\mathcal {M}} (57) \\ \leq M ^ {- 1} \| f \| _ {\mathcal {M}} := A _ {4} (M). (58) \\ \end{array} +$$ + +We note that the bound is made up by terms $A_{1}(N) + A_{2}(M,N) + A_{3}(N) + A_{4}(M)$ , related to the bandwidth of manifold signal $M$ and the number of sampled points $N$ . This makes the bound scale with the order + +$$ +\left\| \mathbf {h} \left(\mathbf {L} _ {N}\right) \mathbf {P} _ {N} f - \mathbf {P} _ {N} \mathbf {h} \left(\mathcal {L} _ {\rho}\right) f \right\| \leq C _ {1} ^ {\prime} \sqrt {\epsilon} + C _ {2} ^ {\prime} \sqrt {\epsilon} \theta_ {M} ^ {- 1} + C _ {3} ^ {\prime} \sqrt {\frac {\log (1 / \delta)}{N}} + C _ {4} ^ {\prime} M ^ {- 1}, \tag {59} +$$ + +with $C_1' = C_L C_{\mathcal{M},1} \frac{\pi^2}{6} \| f \|_{\mathcal{M}}$ , $C_2' = C_{\mathcal{M},2} \frac{\pi^2}{6}$ , $C_3' = \frac{\pi^2}{6}$ and $C_4' = \| f \|_{\mathcal{M}}$ . As $N$ goes to infinity, for every $\delta > 0$ , there exists some $M_0$ , such that for all $M > M_0$ it holds that $A_4(M) \leq \delta / 2$ . There also exists $n_0$ , such that for all $N > n_0$ , it holds that $A_1(N) + A_2(M_0, N) + A_3(N) \leq \delta / 2$ . We can conclude that the summations converge as $N$ goes to infinity. We see $M$ large enough to have $M^{-1} \leq \delta'$ , which makes the eigengap $\theta_M$ also bounded by some constant. We combine the first two terms as + +$$ +\left\| \mathbf {h} \left(\mathbf {L} _ {N}\right) \mathbf {P} _ {N} f - \mathbf {P} _ {N} \mathbf {h} \left(\mathcal {L} _ {\rho}\right) f \right\| \leq \left(C _ {1} C _ {L} + C _ {2}\right) \sqrt {\epsilon} + \frac {\pi^ {2}}{6} \sqrt {\frac {\log (1 / \delta)}{N}}, \tag {60} +$$ + +with $C_1 = C_{\mathcal{M},1}\frac{\pi^2}{6}\| f\|_{\mathcal{M}}$ and $C_2 = C_{\mathcal{M},2}\frac{\pi^2}{6}\theta_{\delta ' - 1}^{-1}$ . To bound the output difference of MNNs, we need to write in the form of features of the final layer + +$$ +\left\| \Phi_ {\mathbf {G}} \left(\mathbf {H}, \mathbf {L} _ {N}, \mathbf {P} _ {N} f\right) - \mathbf {P} _ {N} \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f)\right) \| = \left\| \sum_ {q = 1} ^ {F} \mathbf {x} _ {n, L} ^ {q} - \sum_ {q = 1} ^ {F} \mathbf {P} _ {N} f _ {L} ^ {q} \right\| \leq \sum_ {q = 1} ^ {F} \left\| \mathbf {x} _ {n, L} ^ {q} - \mathbf {P} _ {N} f _ {L} ^ {q} \right\|. \tag {61} +$$ + +By inserting the definitions, we have + +$$ +\left\| \mathbf {x} _ {n, l} ^ {p} - \mathbf {P} _ {N} f _ {l} ^ {p} \right\| = \left\| \sigma \left(\sum_ {q = 1} ^ {F} \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \mathbf {x} _ {n, l - 1} ^ {q}\right) - \mathbf {P} _ {N} \sigma \left(\sum_ {q = 1} ^ {F} \mathbf {h} _ {l} ^ {p q} \left(\mathcal {L} _ {\rho}\right) f _ {l - 1} ^ {q}\right) \right\| \tag {62} +$$ + +with $\mathbf{x}_{n,0} = \mathbf{P}_N f$ as the input of the first layer. With a normalized point-wise Lipschitz nonlinearity, we have + +$$ +\begin{array}{l} \left\| \mathbf {x} _ {n, l} ^ {p} - \mathbf {P} _ {N} f _ {l} ^ {p} \right\| \leq \left\| \sum_ {q = 1} ^ {F} \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \mathbf {x} _ {n, l - 1} ^ {q} - \mathbf {P} _ {N} \sum_ {q = 1} ^ {F} \mathbf {h} _ {l} ^ {p q} \left(\mathcal {L} _ {\rho}\right) f _ {l - 1} ^ {q} \right\| (63) \\ \leq \sum_ {q = 1} ^ {F} \left\| \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \mathbf {x} _ {n, l - 1} ^ {q} - \mathbf {P} _ {N} \mathbf {h} _ {l} ^ {p q} \left(\mathcal {L} _ {\rho}\right) f _ {l - 1} ^ {q} \right\| (64) \\ \end{array} +$$ + +The difference can be further decomposed as + +$$ +\begin{array}{l} \left\| \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \mathbf {x} _ {n, l - 1} ^ {q} - \mathbf {P} _ {N} \mathbf {h} _ {l} ^ {p q} \left(\mathcal {L} _ {\rho}\right) f _ {l} ^ {q} \right\| \\ \leq \left\| \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \mathbf {x} _ {n, l - 1} ^ {q} - \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \mathbf {P} _ {N} f _ {l - 1} ^ {q} + \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \mathbf {P} _ {N} f _ {l - 1} ^ {q} - \mathbf {P} _ {N} \mathbf {h} _ {l} ^ {p q} \left(\mathcal {L} _ {\rho}\right) f _ {l - 1} ^ {q} \right\| (65) \\ \leq \left\| \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \mathbf {x} _ {n, l - 1} ^ {q} - \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \mathbf {P} _ {N} f _ {l - 1} ^ {q} \right\| + \left\| \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \mathbf {P} _ {N} f _ {l - 1} ^ {q} - \mathbf {P} _ {N} \mathbf {h} _ {l} ^ {p q} \left(\mathcal {L} _ {\rho}\right) f _ {l - 1} ^ {q} \right\| (66) \\ \end{array} +$$ + +The second term can be bounded with equation 59 and we denote the bound as $\Delta_N$ for simplicity. The first term can be decomposed by Cauchy-Schwartz inequality and non-amplifying of the filter functions as + +$$ +\left\| \mathbf {x} _ {n, l} ^ {p} - \mathbf {P} _ {N} f _ {l} ^ {p} \right\| \leq \sum_ {q = 1} ^ {F} \Delta_ {N} \| \mathbf {x} _ {n, l - 1} ^ {q} \| + \sum_ {q = 1} ^ {F} \| \mathbf {x} _ {l - 1} ^ {q} - \mathbf {P} _ {N} f _ {l - 1} ^ {q} \|. \tag {67} +$$ + +To solve this recursion, we need to compute the bound for $\| \mathbf{x}_l^p\|$ . By normalized Lipschitz continuity of $\sigma$ and the fact that $\sigma (0) = 0$ , we can get + +$$ +\left\| \mathbf {x} _ {l} ^ {p} \right\| \leq \left\| \sum_ {q = 1} ^ {F} \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \mathbf {x} _ {l - 1} ^ {q} \right\| \leq \sum_ {q = 1} ^ {F} \left\| \mathbf {h} _ {l} ^ {p q} \left(\mathbf {L} _ {N}\right) \right\| \left\| \mathbf {x} _ {l - 1} ^ {q} \right\| \leq \sum_ {q = 1} ^ {F} \left\| \mathbf {x} _ {l - 1} ^ {q} \right\| \leq F ^ {l - 1} \| \mathbf {x} \|. \tag {68} +$$ + +Insert this conclusion back to solve the recursion, we can get + +$$ +\left\| \mathbf {x} _ {n, l} ^ {p} - \mathbf {P} _ {N} f _ {l} ^ {p} \right\| \leq l F ^ {l - 1} \Delta_ {N} \| \mathbf {x} \|. \tag {69} +$$ + +Replace $l$ with $L$ we can obtain + +$$ +\left\| \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {P} _ {N} f) - \mathbf {P} _ {N} \boldsymbol {\Phi} (\mathbf {H}, \mathcal {L} _ {\rho}, f)) \right\| \leq L F ^ {L - 1} \Delta_ {N}, \tag {70} +$$ + +when the input graph signal is normalized. By replacing $f = \mathbf{I}_N\mathbf{x}$ , we can conclude the proof. + +# C. Local Lipschitz continuity of MNNs + +We propose that the outputs of MNN defined in equation 6 are locally Lipschitz continuous within a certain area, which is stated explicitly as follows. + +Proposition 3. (Local Lipschitz continuity of MNNs) Assume that the assumptions in Theorem 1 hold. Let MNN be $L$ layers with $F$ features in each layer, suppose the manifold filters are nonamplifying with $|\hat{h}(\lambda)| \leq 1$ and the nonlinearities normalized Lipschitz continuous, then there exists a constant $C'$ such that + +$$ +\left| \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x) - \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (y) \right| \leq F ^ {L} C ^ {\prime} \operatorname {d i s t} (x - y), \quad \text {f o r a l l} x, y \in B _ {r} (\mathcal {M}), \tag {71} +$$ + +where $B_r(\mathcal{M})$ is a ball with radius $r$ over $\mathcal{M}$ with respect to the geodesic distance. + +Proof. The output of MNN can be written explicitly as + +$$ +\begin{array}{l} \left. \left| \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x) - \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (y) \right| = \left| \sigma \left(\sum_ {q = 1} ^ {F} \mathbf {h} _ {L} ^ {q} \left(\mathcal {L} _ {\rho}\right) f _ {L - 1} ^ {q} (x)\right) - \sigma \left(\sum_ {q = 1} ^ {F} \mathbf {h} _ {L} ^ {q} \left(\mathcal {L} _ {\rho}\right) f _ {L - 1} ^ {q} (y)\right) \right| \right. (72) \\ \leq \left| \sum_ {q = 1} ^ {F} \mathbf {h} _ {L} ^ {q} \left(\mathcal {L} _ {\rho}\right) f _ {L - 1} ^ {q} (x) - \sum_ {q = 1} ^ {F} \mathbf {h} _ {L} ^ {q} \left(\mathcal {L} _ {\rho}\right) f _ {L - 1} ^ {q} (y) \right| \leq F \max _ {q = 1, \dots , F} \left| \mathbf {h} _ {L} ^ {q} \left(\mathcal {L} _ {\rho}\right) f _ {L - 1} ^ {q} (x) - \mathbf {h} _ {L} ^ {q} \left(\mathcal {L} _ {\rho}\right) f _ {L - 1} ^ {q} (y) \right|. (73) \\ \end{array} +$$ + +We have $f_{L - 1}^{q}(x) = \sigma \left(\sum_{p = 1}^{F}\mathbf{h}_{L - 1}^{p}f_{L - 2}^{p}(x)\right)$ . The process can be repeated recursively by expanding $f_{L - 1}^{q}(x)$ and $f_{L - 1}^{q}(y)$ , and finally, we can have + +$$ +\left| \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x) - \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (y) \right| \leq F ^ {L} \left| \mathbf {h} _ {L} \left(\mathcal {L} _ {\rho}\right) \dots \mathbf {h} _ {1} \left(\mathcal {L} _ {\rho}\right) f (x) - \mathbf {h} _ {L} \left(\mathcal {L} _ {\rho}\right) \dots \mathbf {h} _ {1} \left(\mathcal {L} _ {\rho}\right) f (y) \right|. \tag {74} +$$ + +With $f$ as a $\lambda$ -bandlimited manifold signal, we suppose $g = \mathbf{h}_L(\mathcal{L}_\rho)\dots \mathbf{h}_1(\mathcal{L}_\rho)f$ . As $\langle f,\phi_i\rangle = 0$ for all $i > M$ , $g$ is also bandlimited and possesses $M$ spectral components. The gradient can be bounded according to (Shi & Xu, 2010) combined with the non-amplifying property of the filter function as + +$$ +\left\| \nabla g \right\| _ {\infty} \leq C \sum_ {\lambda_ {i} \leq \lambda} \left| \hat {h} (\lambda_ {i}) \right| ^ {L} \lambda_ {i} ^ {\frac {d + 1}{2}} \| f \| _ {\mathcal {M}} \leq C \sum_ {\lambda_ {i} \leq \lambda} \lambda_ {i} ^ {\frac {d + 1}{2}} \| f \| _ {\mathcal {M}} \tag {75} +$$ + +From Theorem 4.5 in (Evans, 2018), $g$ is locally Lipschitz continuous as + +$$ +\left| g (x) - g (y) \right| \leq C ^ {\prime} \operatorname {d i s t} (x - y), \quad \text {w i t h} x, y \in B _ {r} (\mathcal {M}), \tag {76} +$$ + +where $B_r(\mathcal{M})$ is a closed ball with radius $r$ with $C'$ depending on the geometry of $\mathcal{M}$ . + +Combining the above, we have the continuity of the output of MNN as + +$$ +\left| \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x) - \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (y) \right| \leq F ^ {L} C ^ {\prime} \operatorname {d i s t} (x - y), \quad \text {w i t h} x, y \in B _ {r} (\mathcal {M}), \tag {77} +$$ + +which concludes the proof. + +# D. Proof of Theorem 1 + +Proof. To analyze the difference between the empirical risk and statistical risk, we introduce an intermediate term which is the induced version of the sampled MNN output. We define $\mathbf{I}_N$ as the inducing operator based on the decomposition $\{V_i\}_{i=1}^N$ defined in Section A. This intermediate term is written explicitly as + +$$ +\overline {{\Phi}} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x) = \mathbf {I} _ {N} \mathbf {P} _ {N} \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x) = \sum_ {i = 1} ^ {N} \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) \left(x _ {i}\right) \mathbb {1} _ {x \in V _ {i}}, \text {f o r a l l} x \in \mathcal {M}, \tag {78} +$$ + +where $x_{i}\in X_{N}$ are sampled points from the manifold. + +Suppose $\mathbf{H}\in \arg \min_{\mathbf{H}\in \mathcal{H}}R_{\mathcal{M}}(\mathbf{H})$ , we have + +$$ +G A = \sup _ {\mathbf {H} \in \mathcal {H}} | R _ {\mathbf {G}} (\mathbf {H}) - R _ {\mathcal {M}} (\mathbf {H}) | \tag {79} +$$ + +The difference between $R_{\mathbf{G}}(\mathbf{H})$ and $R_{\mathcal{M}}(\mathbf{H})$ can be decomposed as + +$$ +\begin{array}{l} \left| R _ {\mathbf {G}} (\mathbf {H}) - R _ {\mathcal {M}} (\mathbf {H}) \right| \\ = \left| \frac {1}{N} \sum_ {i = 1} ^ {N} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x}) \right] _ {i}, [ \mathbf {y} ] _ {i}\right) - \int_ {\mathcal {M}} \ell \left(\boldsymbol {\Phi} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)\right) d \mu (x) \right| (80) \\ = \left| \frac {1}{N} \sum_ {i = 1} ^ {N} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x}) \right] _ {i}, [ \mathbf {y} ] _ {i}\right) - \int_ {\mathcal {M}} \ell \left(\overline {{\boldsymbol {\Phi}}} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)\right) d \mu (x) \right. \\ + \int_ {\mathcal {M}} \ell (\overline {{\Phi}} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)) \mathrm {d} \mu (x) - \int_ {\mathcal {M}} \ell (\Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)) \mathrm {d} \mu (x) \Bigg | (81) \\ \leq \left| \frac {1}{N} \sum_ {i = 1} ^ {N} \ell ([ \Phi_ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x}) ] _ {i}, [ \mathbf {y} ] _ {i}) - \int_ {\mathcal {M}} \ell (\overline {{\Phi}} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)) d \mu (x) \right| \\ + \left| \int_ {\mathcal {M}} \ell \left(\overline {{\Phi}} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)\right) \mathrm {d} \mu (x) - \int_ {\mathcal {M}} \ell \left(\Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)\right) \mathrm {d} \mu (x) \right| (82) \\ \end{array} +$$ + +We analyze the two terms in equation 82 separately, with the first term bounded based on the convergence of GNN to MNN and the second term bounded with the smoothness of manifold functions. + +The first term in equation 82 can be written as + +$$ +\begin{array}{l} \left| \frac {1}{N} \sum_ {i = 1} ^ {N} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x}) \right] _ {i}, [ \mathbf {y} ] _ {i}\right) - \int_ {\mathcal {M}} \ell \left(\overline {{\boldsymbol {\Phi}}} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)\right) d \mu (x) \right| (83) \\ = \frac {1}{N} \left| \sum_ {i = 1} ^ {N} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x}) \right] _ {i}, [ \mathbf {y} ] _ {i}\right) - \sum_ {i = 1} ^ {N} \ell \left(\boldsymbol {\Phi} (\mathbf {H}, \mathcal {L} _ {\rho}, f) \left(x _ {i}\right), g \left(x _ {i}\right)\right) \right| (84) \\ \leq \frac {1}{N} \sum_ {i = 1} ^ {N} \left| \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x}) \right] _ {i}, [ \mathbf {y} ] _ {i}\right) - \ell \left(\boldsymbol {\Phi} (\mathbf {H}, \mathcal {L} _ {\rho}, f) \left(x _ {i}\right), g \left(x _ {i}\right)\right) \right| (85) \\ \leq \frac {1}{N} \sum_ {i = 1} ^ {N} \left| \left[ \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x}) \right] _ {i} - \boldsymbol {\Phi} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x _ {i}) \right| (86) \\ \leq \frac {1}{N} \| \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x}) - \mathbf {P} _ {N} \boldsymbol {\Phi} (\mathbf {H}, \mathcal {L} _ {\rho}, \mathbf {I} _ {N} \mathbf {x}) \| _ {1} (87) \\ \leq \frac {1}{\sqrt {N}} L F ^ {L - 1} \left(\left(C _ {1} C _ {L} + C _ {2}\right) \sqrt {\epsilon} + \frac {\pi^ {2}}{6} \sqrt {\frac {\log (1 / \delta)}{N}}\right) (88) \\ \end{array} +$$ + +From equation 83 to equation 84, we use the definition of induced manifold signal defined in equation 78. We utilize the Lipschitz continuity assumption on loss function from equation 85 to equation 86. From equation 86 to equation 87, it + +depends on the fact that $\mathbf{x}$ is a single-entry vector and that $[\mathbf{y}]_i$ is the value sampled from target manifold function $g$ evaluated on $x_{i}$ . Finally the bound depends on the convergence of GNN on the sampled graph to the MNN as stated in Proposition 1. + +The second term is decomposed as + +$$ +\begin{array}{l} \left| \int_ {\mathcal {M}} \ell \left(\overline {{\Phi}} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)\right) \mathrm {d} \mu (x) - \int_ {\mathcal {M}} \ell \left(\Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)\right) \mathrm {d} \mu (x) \right| (89) \\ \leq \left| \sum_ {i = 1} ^ {N} \int_ {V _ {i}} \ell (\overline {{\Phi}} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)) d \mu (x) - \sum_ {i = 1} ^ {N} \int_ {V _ {i}} \ell (\Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)) d \mu (x) \right| (90) \\ \leq \sum_ {i = 1} ^ {N} \int_ {V _ {i}} \left| \ell \left(\overline {{\Phi}} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)\right) - \ell \left(\Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x), g (x)\right) \right| d \mu (x) (91) \\ \leq \sum_ {i = 1} ^ {N} \int_ {V _ {i}} \left| \overline {{\Phi}} (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x) - \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x) \right| d \mu (x) (92) \\ \leq \sum_ {i = 1} ^ {N} \int_ {V _ {i}} | \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x _ {i}) - \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x) | \mathrm {d} \mu (x) (93) \\ \end{array} +$$ + +From equation 89 to equation 90, it relies on the decomposition of the MNN output over $\{V_i\}_{i=1}^N$ . From equation 91 to equation 92, we use the Lipschitz continuity of loss function. From equation 92 to equation 93, we use the definition of $\overline{\Phi}(\mathbf{H}, \mathcal{L}_\rho, f)$ . Proposition 3 indicates that the MNN outputs are Lipschitz continuous within a certain range, which leads to + +$$ +\begin{array}{l} \sum_ {i = 1} ^ {N} \int_ {V _ {i}} | \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x _ {i}) - \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x) | \mathrm {d} \mu (x) \\ \leq \sum_ {i = 1} ^ {N} \int_ {V _ {i}} F ^ {L} C _ {3} \left(\frac {\log N}{N}\right) ^ {\frac {1}{d}} \mathrm {d} \mu (x) (94) \\ = F ^ {L} C _ {3} \left(\frac {\log N}{N}\right) ^ {\frac {1}{d}} \sum_ {i = 1} ^ {N} \int_ {V _ {i}} \mathrm {d} \mu (x) (95) \\ \leq F ^ {L} C _ {3} \left(\frac {\log N}{N}\right) ^ {\frac {1}{d}}, (96) \\ \end{array} +$$ + +when $d \geq 3$ . If $d = 2$ , the bound would be + +$$ +\sum_ {i = 1} ^ {N} \int_ {V _ {i}} | \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x _ {i}) - \Phi (\mathbf {H}, \mathcal {L} _ {\rho}, f) (x) | d \mu (x) \leq F ^ {L} C _ {3} \frac {\left(\log N\right) ^ {\frac {3}{4}}}{N ^ {\frac {1}{2}}}. \tag {97} +$$ + +Combining equation 88 and equation 96 (or equation 97), we can conclude the proof. + +# E. Corollary of Theorem 1 + +Corollary 1. Suppose the GNN with filters satisfying Assumption 1 have $L$ layers with $F$ features in each layer and the input signal is bandlimited (Definition 1). Suppose graphs $\mathbf{G}_1$ with $N_1$ nodes and $\mathbf{G}_2$ with $N_2$ nodes are sampled from the same underlying manifold $\mathcal{M}$ . Under Assumptions 2 and 3 it holds in probability at least $1 - \delta$ that + +$$ +\begin{array}{l} \sup _ {\mathbf {H} \in \mathcal {H}} \left| \frac {1}{N _ {1}} \sum_ {i = 1} ^ {N _ {1}} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G} _ {1}} (\mathbf {H}, \mathbf {L} _ {N _ {1}}, \mathbf {x} _ {1}) \right] _ {i}, [ \mathbf {y} _ {1} ] _ {i}\right) - \frac {1}{N _ {2}} \sum_ {i = 1} ^ {N _ {2}} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G} _ {2}} (\mathbf {H}, \mathbf {L} _ {N _ {2}}, \mathbf {x} _ {2}) \right] _ {i}, [ \mathbf {y} _ {2} ] _ {i}\right) \right| \leq \\ L F ^ {L - 1} \left(\left(C _ {1} C _ {L} + C _ {2}\right) \frac {\sqrt {\epsilon} \left(\sqrt {N _ {1}} + \sqrt {N _ {2}}\right)}{\sqrt {N _ {1} N _ {2}}} + \frac {\pi^ {2} \left(N _ {1} + N _ {2}\right) \sqrt {\log (1 / \delta)}}{6 N _ {1} N _ {2}}\right) + F ^ {L} C _ {3} \left(\frac {\log N _ {1}}{N _ {1}}\right) ^ {\frac {1}{d}} + F ^ {L} C _ {3} \left(\frac {\log N _ {2}}{N _ {2}}\right) ^ {\frac {1}{d}}, \tag {98} \\ \end{array} +$$ + +with $C_1, C_2,$ and $C_3$ depending on the geometry of $\mathcal{M}$ , $C_L$ is the spectral continuity constant in Assumption 1. + +Proof. By importing the statistical risk over the manifold $R_{\mathcal{M}}(\mathbf{H})$ in equation 14, the bound can be derived with a triangle inequality as + +$$ +\begin{array}{l} \sup _ {\mathbf {H} \in \mathcal {H}} \left| \frac {1}{N _ {1}} \sum_ {i = 1} ^ {N _ {1}} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G} _ {1}} (\mathbf {H}, \mathbf {L} _ {N _ {1}}, \mathbf {x} _ {1}) \right] _ {i}, [ \mathbf {y} _ {1} ] _ {i}\right) - \frac {1}{N _ {2}} \sum_ {i = 1} ^ {N _ {2}} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G} _ {2}} (\mathbf {H}, \mathbf {L} _ {N _ {2}}, \mathbf {x} _ {2}) \right] _ {i}, [ \mathbf {y} _ {2} ] _ {i}\right) \right| \\ = \sup _ {\mathbf {H} \in \mathcal {H}} \left| \frac {1}{N _ {1}} \sum_ {i = 1} ^ {N _ {1}} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G} _ {1}} (\mathbf {H}, \mathbf {L} _ {N _ {1}}, \mathbf {x} _ {1}) \right] _ {i}, [ \mathbf {y} _ {1} ] _ {i}\right) - R _ {\mathcal {M}} (\mathbf {H}) + R _ {\mathcal {M}} (\mathbf {H}) - \frac {1}{N _ {2}} \sum_ {i = 1} ^ {N _ {2}} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G} _ {2}} (\mathbf {H}, \mathbf {L} _ {N _ {2}}, \mathbf {x} _ {2}) \right] _ {i}, [ \mathbf {y} _ {2} ] _ {i}\right) \right| (99) \\ \leq \sup _ {\mathbf {H} \in \mathcal {H}} \left| \frac {1}{N _ {1}} \sum_ {i = 1} ^ {N _ {1}} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G} _ {1}} (\mathbf {H}, \mathbf {L} _ {N _ {1}}, \mathbf {x} _ {1}) \right] _ {i}, [ \mathbf {y} _ {1} ] _ {i}\right) - R _ {\mathcal {M}} (\mathbf {H}) \right| + \sup _ {\mathbf {H} \in \mathcal {H}} \left| \frac {1}{N _ {2}} \sum_ {i = 1} ^ {N _ {2}} \ell \left(\left[ \boldsymbol {\Phi} _ {\mathbf {G} _ {2}} (\mathbf {H}, \mathbf {L} _ {N _ {2}}, \mathbf {x} _ {2}) \right] _ {i}, [ \mathbf {y} _ {2} ] _ {i}\right) - R _ {\mathcal {M}} (\mathbf {H}) \right|. (100) \\ \end{array} +$$ + +Inserting the result in Theorem 1 concludes the proof. + +# F. Proof of Theorem 2 + +Proof. We can write the difference as + +$$ +\begin{array}{l} \left| R _ {\mathbf {G}} (\mathbf {H}) - R _ {\mathcal {M}} (\mathbf {H}) \right| \\ \leq \sum_ {k = 1} ^ {K} \left| \ell \left(\frac {1}{N} \sum_ {i = 1} ^ {N} \left[ \boldsymbol {\Phi} _ {\mathbf {G}} \left(\mathbf {H}, \mathbf {L} _ {N, k}, \mathbf {x} _ {k}\right) \right] _ {i}, y _ {k}\right) - \ell \left(\int_ {\mathcal {M} _ {k}} \boldsymbol {\Phi} (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) \mathrm {d} \mu_ {k} (x), y _ {k}\right) \right| \tag {101} \\ \end{array} +$$ + +Based on the property of absolute value inequality and the Lipschitz continuity assumption of loss function (Assumption 3), we have + +$$ +\begin{array}{l} \left| \ell \left(\frac {1}{N} \sum_ {i = 1} ^ {N} [ \Phi_ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N, k}, \mathbf {x} _ {k}) ] _ {i}, y _ {k}\right) - \ell \left(\int_ {\mathcal {M} _ {k}} \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) \mathrm {d} \mu_ {k} (x), y _ {k}\right) \right| \\ \leq \left| \frac {1}{N} \sum_ {i = 1} ^ {N} \left[ \boldsymbol {\Phi} _ {\mathbf {G}} \left(\mathbf {H}, \mathbf {L} _ {N, k}, \mathbf {x} _ {k}\right) \right] _ {i} - \int_ {\mathcal {M} _ {k}} \boldsymbol {\Phi} \left(\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}\right) \mathrm {d} \mu_ {k} (x) \right| \tag {102} \\ \end{array} +$$ + +We insert an intermediate term $\Phi (\mathbf{H},\mathcal{L}_{\rho ,k},f_k)(x_i)$ as the value evaluated on the sampled point $x_{i}$ , which leads to + +$$ +\begin{array}{l} \left| \frac {1}{N} \sum_ {i = 1} ^ {N} \left[ \Phi_ {\mathbf {G}} \left(\mathbf {H}, \mathbf {L} _ {N, k}, \mathbf {x} _ {k}\right) \right] _ {i} - \int_ {\mathcal {M} _ {k}} \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) \mathrm {d} \mu_ {k} (x) \right| (103) \\ \leq \left| \frac {1}{N} \sum_ {i = 1} ^ {N} \left[ \Phi_ {\mathbf {G}} \left(\mathbf {H}, \mathbf {L} _ {N, k}, \mathbf {x} _ {k}\right) \right] _ {i} - \frac {1}{N} \sum_ {i = 1} ^ {N} \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) (x _ {i}) \right| + \\ \left| \frac {1}{N} \sum_ {i = 1} ^ {N} \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) \left(x _ {i}\right) - \int_ {\mathcal {M} _ {k}} \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) \mathrm {d} \mu_ {k} (x) \right| (104) \\ \end{array} +$$ + +The first term in equation 104 can be bounded similarly as equation 87, which is explicitly written as + +$$ +\begin{array}{l} \left| \frac {1}{N} \sum_ {i = 1} ^ {N} \left[ \Phi_ {\mathbf {G}} \left(\mathbf {H}, \mathbf {L} _ {N, k}, \mathbf {x} _ {k}\right) \right] _ {i} - \frac {1}{N} \sum_ {i = 1} ^ {N} \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) \left(x _ {i}\right) \right| (105) \\ \leq \frac {1}{N} \| \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x} _ {k}) - \mathbf {P} _ {N} \boldsymbol {\Phi} (\mathbf {H}, \mathcal {L} _ {\rho}, f _ {k}) \| _ {1} (106) \\ \leq \frac {1}{\sqrt {N}} \| \boldsymbol {\Phi} _ {\mathbf {G}} (\mathbf {H}, \mathbf {L} _ {N}, \mathbf {x} _ {k}) - \mathbf {P} _ {N} \boldsymbol {\Phi} (\mathbf {H}, \mathcal {L} _ {\rho}, f _ {k}) \| _ {2} (107) \\ \leq \frac {1}{\sqrt {N}} \left(\left(C _ {1} C _ {L} + C _ {2}\right) \sqrt {\epsilon} + \frac {\pi^ {2}}{6} \sqrt {\frac {\log (1 / \delta)}{N}}\right) (108) \\ \end{array} +$$ + +The second term is + +$$ +\begin{array}{l} \left| \frac {1}{N} \sum_ {i = 1} ^ {N} \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) (x _ {i}) - \int_ {\mathcal {M} _ {k}} \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) \mathrm {d} \mu_ {k} (x) \right| (109) \\ = \left| \sum_ {i = 1} ^ {N} \int_ {V _ {i}} \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) (x _ {i}) \mathrm {d} \mu_ {k} (x) - \sum_ {i = 1} ^ {N} \int_ {V _ {i}} \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) (x) \mathrm {d} \mu_ {k} (x) \right| (110) \\ \leq \sum_ {i = 1} ^ {N} \int_ {V _ {i}} | \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) (x _ {i}) - \Phi (\mathbf {H}, \mathcal {L} _ {\rho , k}, f _ {k}) (x) | d \mu_ {k} (x) (111) \\ \leq F ^ {L} C _ {3} \left(\frac {\log N}{N}\right) ^ {\frac {1}{d}} (112) \\ \end{array} +$$ + +This depends on the Lipschitz continuity of the output manifold function in Proposition 3. + +# G. Further references + +Graphon theory Different from the manifold model we are using, some research constructs graphs derived from graphons, which can be viewed as a random limit graph model. This research has focused on their convergence, stability, as well as transferability (Ruiz et al., 2020; Maskey et al., 2023; Keriven et al., 2020). In (Parada-Mayorga et al., 2023), a graphon is used as a pooling tool in GNNs. Despite its utility, the graphon presents several limitations compared to the manifold model we use. Firstly, the graphon model assumes an infinite degree at every node (Lovasz, 2012), which is not the case in the manifold model. Additionally, graphons offer limited insight into the underlying model; visualizing a graphon is challenging, except in the stochastic block model case. Manifolds, however, are more interpretable, especially when based on familiar shapes like spheres and 3D models (see Figures ?? and ??). Finally, the manifold model supports a wider range of characterizable models, making it a more realistic choice. + +Transferability of GNNs The transferability of GNNs has been extensively studied by examining the differences in GNN outputs across graphs of varying sizes as they converge to a limit model. This analysis, however, often lacks statistical generalization. Several studies have explored GNN transferability with graphon models, proving bounds on the differences in GNN outputs (Ruiz et al., 2023; 2020; Maskey et al., 2023). Other research has demonstrated how increasing graph size during GNN training can improve generalization to large-scale graphs (Cervino et al., 2023). The transferability of GNNs has also been investigated in the context of graphs generated from general topological spaces (Levie et al., 2021) and manifolds (Wang et al., 2024a). Furthermore, a novel graphop operator has been proposed as a limit model for both dense and sparse graphs, with proven transferability results (Le & Jegelka, 2024). Further research has focused on transfer learning for GNNs by measuring distances between graphs without assuming a limit model (Lee et al., 2017; Zhu et al., 2021). Finally, a transferable graph transformer has been proposed and empirically validated (He et al., 2023). + +# H. Filter Assumption + +In the main results, we assume that the filters in GNN and MNN satisfy Assumption 1. This may lead to limited discriminability in high-frequency spectrum. While this is a reasonable assumption, high-frequency signals on graphs or manifolds can fluctuate significantly between adjacent entries, leading to instability and learning challenges. We expect a degree of local homogeneity, which translates to low-frequency signals. This assumption is supported by empirical evidence in various domains, including opinion dynamics, econometrics, and graph signal processing (Degroot, 1974; Billio et al., 2012; Ramakrishna et al., 2020). Moreover, several other effective learning techniques, such as Principal Component Analysis (PCA) and Isomap, implicitly employ low-pass filtering. Therefore, we believe that the filter assumption is not restrictive and is well-supported by both practical applications and theoretical considerations. + +# I. Manifold Assumption + +In this paper, we considered the case in which graphs are sampled from manifolds. This is an assumption that has been widely used in practice. From dynamical systems (Talmon et al., 2015) to images (Peyre, 2009; Osher et al., 2017), assuming an underlying low dimensional manifold is a common practice. Real-world graphs, like the ones considered in the node prediction experiments, can be assumed to be sampled from $d$ -dimensional manifolds. To support this argument, in Figure 5, we plot the 100 largest eigenvalues of the Laplacian matrix associated with each graph. By doing this, we show a fast decay in the values of the eigenvalues progress. This decay shows that the information is mostly supported on a subset of the eigenvalues thus reinforcing the idea that it comes from a low dimensional manifold. + +# J. Experiment details and further experiments + +We consider the following datasets: OGBN-Arxiv (Wang et al., 2020; Mikolov et al., 2013), Cora (Yang et al., 2016b), CiteSeer (Yang et al., 2016b), PubMed (Yang et al., 2016b), Coauthors CS (Shchur et al., 2018), Coauthors Physics (Shchur et al., 2018), Amazon-rating (Platonov et al., 2023), and Roman-Empire (Platonov et al., 2023), details of the datasets can be found in Table 1. + +All experiments were done using a NVIDIA GeForce RTX 3090, and each set of experiments took at most 10 hours to complete. In total, we run 10 datasets, which amounts for around 100 hours of GPU use. All datasets used in this paper are public, and free to use. They can be downloaded using the pytorch package (https://pytorch-geometric.readthedocs.io/en/latest/modules/datasets.html), the ogb package (https://ogb.stanford. + +![](images/06fc4215f2f5ac4295aacc7e68313986ff77f4f2573937cabcfb2f5faff3c74f.jpg) +(a) Amazon + +![](images/f3bc95e39b32d1b7ed200fb445d76d4fefbbe5348c7d751313e0254fb2d703a9.jpg) +(b) CiteSeer + +![](images/604d14859f1af56f409a25912feeb8363d1217d1f5d720cb6221c0f1bbaa79c2.jpg) +(c) CS + +![](images/900dcd590c547aea1b07d30054f004b5a1b1b62cba1a61f346a4c64ff01cc381.jpg) + +![](images/03ae65b079e643e78111ea566ce0813da122cbf99e03620b125ca506853c8fef.jpg) +(e) Cora + +![](images/04f1e6fa341d45200680f521a2b517f2efba610410c1d9d43ed79387732ea39d.jpg) +(f) OBGN-Arxiv + +![](images/f5689c0878d07cb945772a723c261ad4856d70316a58ad879464c6a8c48d21ee.jpg) +(g) PudMed +Figure 5: Top 100 eigenvalues of the graph for each dataset considered in the node classification problem. + +![](images/cf64a78672eff6c1fbe0043fd00af6dfcd1e30e57d09117710a2bdc03a51b23a.jpg) +(d) Physics +(h) Roman + +edu/docs/nodeprop/) and the Princeton ModelNet project (https://modelnet.cs.princeton.edu/). In total, the datasets occupy around 5 GB. However, they do not need to be all stored at the same time, as the experiments that we run can be done in series. + +# J.1. ModelNet10 and ModelNet40 graph classification tasks + +ModelNet10 dataset (Wu et al., 2015) includes 3,991 meshed CAD models from 10 categories for training and 908 models for testing as Figure 6 shows. ModelNet40 dataset includes 38,400 training and 9,600 testing models as Figure 7 shows. In each model, $N$ points are uniformly randomly selected to construct graphs to approximate the underlying model, such as chairs, tables. + +![](images/66de569884d5b4ac968c8c20bb5a581beb2063e1a1343702f194422339cf6dc1.jpg) + +![](images/9003bf9b606144d26ac1e8010b5059559d7419925ac9761187c8f889eaba2468.jpg) +Figure 6: Point cloud models in ModelNet10 with $N = 300$ sampled points in each model, corresponding to bathtub, chair, desk, table, toiler, and bed. + +![](images/9ead92abb66c7e5b0f000d5f410730fb5ade797aad13687faf42f313d1b0c054.jpg) + +![](images/95a095789044c3985b57043df38aa42a97d77f066728885937e9ed7c6c55ca29.jpg) + +![](images/ee8d98c1eb2158466eae017704a0f6b2cb6344addf5245f8d2ddcdd4dc337ac3.jpg) + +![](images/d69256b9854b99a388926863347c6e91a695996c0cdad236ac3aab6bc7e13f6b.jpg) + +![](images/bfa45ca1d25abf803a36533bb1c6aaca8d5f741d9740f40ca05aa803def63112.jpg) + +![](images/bf9068fcef564cf59733d1e40056fb0e0c8893057333dfa2467bf05035ea50af.jpg) + +![](images/d596f3eb87ac63709fe55597e4a0f6cb1e9fe63b0599ab425da2bb1ae5fd8f23.jpg) + +![](images/3758009ea4a114aa4c9be4fa274b5ea541374302335d3d7ace303940bdcd0b71.jpg) + +![](images/8163f09ca0271f861d8331dcd61106fa426c361e67796fc4d042d83ba3b1fdec.jpg) +Figure 7: Point cloud models from ModelNet40 with $N = 300$ sampled points in each model, corresponding to airplane, person, car, guitar, plant, and bottle. + +![](images/8931713dc21af5ccbbd4d474b52263cad7f3f4f4a9b74f0cafd5e4d806b050f3.jpg) + +The weight function of the constructed graph is determined as equation 7 with $\epsilon = 0.1$ . We calculate the Laplacian matrix for each graph as the input graph shift operator. In this experiment, we implement GNNs with different numbers of layers + +![](images/4e9b49ff8781735ca2c387f93dd4582b8311074013644ee2c0f767b511a185fc.jpg) +(a) Differences of the outputs of 3-layer GNNs. + +![](images/a0dba6a112a904334a5e7011de0ea5e2517fe4770807ccc8a7ad3797bcb6ae2e.jpg) +(b) Differences of the outputs of 4-layer GNNs. +Figure 8: Graph outputs differences of GNNs with different architectures on ModelNet40 dataset. + +and hidden units with $K = 5$ filters in each layer. All the GNN architectures are trained by minimizing the cross-entropy loss. We implement an ADAM optimizer with the learning rate set as 0.005 along with the forgetting factors 0.9 and 0.999. We carry out the training for 40 epochs with the size of batches set as 10. We run 5 random dataset partitions and show the average performances and the standard deviation across these partitions. + +# J.2. Node classification training details and datasets + +In this section, we present the results for node classification. In this paragraph we present the common details for all datasets, we will next delve into each specific detail inside the dataset subsection that follows. + +
NameNodesEdgesFeaturesNumber of ClassesReference
Arxiv169,3431,166,24312840(Wang et al., 2020; Mikolov et al., 2013)
Cora2,70810,5561,4337(Yang et al., 2016b)
CiteSeer3,3279,1043,7036(Yang et al., 2016b)
PubMed19,71788,6485003(Yang et al., 2016b)
Coauthor Physics18,333163,7886,80515(Shchur et al., 2018)
Coauthor CS34,493495,9248,4155(Shchur et al., 2018)
Amazon-ratings24,49293,0503005(Platonov et al., 2023)
Roman-empire22,66232,92730018(Platonov et al., 2023)
+ +Table 1: Details of the datasets considered in the experiments. + +In all datasets, we used the graph convolutional layer GCN, and trained for 1000 epochs. For the optimizer, we used AdamW, with using a learning rate of 0.01, and 0 weight decay. We trained using the graph convolutional layer, with a varying number of layers and hidden units. For dropout, we used 0.5. We trained using the cross-entropy loss. In all cases, we trained 2 and 3 layered GNNs. + +To compute the linear approximation in the plots, we used the mean squared error estimator of the form + +$$ +\mathbf {y} = s * \log (\mathbf {n}) + p. \tag {113} +$$ + +Where $s$ is the slope, $p$ is the point, and $\mathbf{n}$ is the vector with the nodes in the training set for each experiment. Note that we repeated each experiment for 10 independent runs. In all experiments, we compute the value of $s$ and $p$ that minimize the mean square error over the mean of the experiment runs, and we compute the Pearson correlation index over those values. + +Our experiment shows that our bound shows the same rate dependency as the experiments. That is to say, in the logarithmic scale, the generalization gap of GNNs is linear with respect to the logarithm of the number of nodes. In most cases, the + +Pearson correlation index is above 0.9 in absolute value, which indicates a strong linear relationship. We noticed that the linear relationship changes the slope in the overfitting regime, and in the non-overfitting regime. That is to say, when the GNN is overfitting the training set, the generalization gap decreases at a much slower rate than it does with the GNN does not have the capacity to do so. Therefore, in the case in which the GNN overfits the training set for all nodes when computed $s$ using all the samples in the experiment. On the other hand, when the number of nodes is large enough that the GNN cannot overfit the training set, then we computed the $s$ and $p$ with the nodes in the non-overfitting regime. + +# J.3. Spectral Continuity Constant Regularizer + +We add a regularization term to the loss to better control the value of the spectral continuity constant (defined in Assumption 1) while training. To do so, given a convolutional filter $\mathbf{h} \in \mathbb{R}^K$ , its associated spectral continuity constant is + +$$ +R (\mathbf {h}) = \sum_ {k = 0} ^ {K - 1} k \left| h _ {k} \right| \lambda_ {\max } ^ {k - 1}, \tag {114} +$$ + +Where $\lambda_{max}$ is the largest eigenvalue of the graph $\mathbf{G}$ . + +# J.3.1.ARXIV DATASET + +For this datasets, we trained 2, 3, 4 layered GNN. We also used a learning rate scheduler ReduceLROnPlateau with mode min, factor 0.5, patience 100 and a minimum learning rate of 0.001. + +![](images/e33219b0e2cce32f29d2dc930045d9c96aba3a801f87de84635fe3e2ecc3d247.jpg) + +![](images/5433c8723795abd1e5c6b8d329333199ae6a673511ac3c14ac155fdfcff9177c.jpg) + +![](images/2280e64f9e58944c48b0ed46ee409f52c4a7d62e74e79830adff8dfdbce4b5a6.jpg) + +![](images/e0d1f145ea68f237eba8f1cb98f4571d0b05484bd6ae78d3f1e834d77e2768dc.jpg) +(a) Two Layers + +![](images/7416698eead0c877b5bce7f2999bc3a2db41edf744a70d59c1e6e7f31b3ceaff.jpg) +(b) Three Layers + +![](images/2528c09c6af62d6f5d91cae7ce5116241f208777b2e2e77c7f05330238f50867.jpg) +(c) Four Layers +Figure 9: Generalization gap for the OGBN-Arxiv dataset on the accuracy as a function of the number of nodes in the training set. + +# J.3.2. CORA DATASET + +For the Cora dataset, we used the standard one, which can be obtained running torch/geometric.datasets.Plenetoid(root="./data",name='Cora'). + +![](images/3ee5134d18de1ab879f084c79f7363e03af71789e3086dffdb6620c995faebcb.jpg) + +![](images/12f6cb1343580ae1a6bb31654faa2b8a8e74ec0ad82fd4f9063c6a223b410946.jpg) + +![](images/505f6759bf97e1ae2acfa0e94b6eb06915e08ade9bc89e21fa6f81838e7eb450.jpg) + +![](images/e88edef6367d90711648a53c4ca9ac61a075567e0b6284d2e3c7aa20f1f15f71.jpg) +(a) Two Layers + +![](images/414b0b2f751b29466dcf0a4b67c133e8a94534d885876538bb76143c3e36fa0d.jpg) +(b) Three Layers + +![](images/868d8c0dad1d13fdbf04ee1bb828221810d497c80612d47194638f3bd88c5482.jpg) +(c) Four Layers +Figure 10: Generalization gap for the OGBN-arxiv dataset on the loss (cross-entropy) as a function of the number of nodes in the training set. + +![](images/9279d566a6e259e6512bb388204ad5aadefbefa1423200ff7a97c6d4a5c02f14.jpg) +(a) Accuracy + +![](images/b1760fc6e7cdac3e2b24b0cd182e0394588b085d28a2c3cf82e8f6f9015e44bb.jpg) +Figure 11: Values of slope (a) and point (b) corresponding to the linear fit $(a*\log (N) + b)$ of Figures 10 and 9. + +![](images/06321d6d46e1bca5ef96a7a8672b527361fabeeb05c87094b80c0c56165e79d5.jpg) +(b) Loss + +![](images/862270e4e4e991982464c60be7b0119e9785f44616d512476e062744fddc8923.jpg) + +![](images/f8b8501bfa9e62dfaecc43b0df155adb91d334a7365b12542e96af6ea67d01b3.jpg) + +
TypeLay.Feat.SlopePointPearson Correlation Coefficient
Accuracy264-6.301e-013.621e+00-9.980e-01
Accuracy2128-6.034e-013.663e+00-9.985e-01
Accuracy2256-5.347e-013.493e+00-9.952e-01
Accuracy2512-5.328e-013.605e+00-9.975e-01
Accuracy364-6.271e-013.600e+00-9.987e-01
Accuracy3128-5.730e-013.567e+00-9.970e-01
Accuracy3256-4.986e-013.393e+00-9.910e-01
Accuracy3512-4.529e-013.315e+00-9.934e-01
Accuracy464-5.343e-013.236e+00-9.971e-01
Accuracy4128-5.096e-013.299e+00-9.987e-01
Accuracy4256-4.827e-013.337e+00-9.920e-01
Accuracy4512-4.264e-013.229e+00-9.927e-01
Loss264-6.853e-012.265e+00-9.975e-01
Loss2128-6.562e-012.311e+00-9.988e-01
Loss2256-5.907e-012.174e+00-9.968e-01
Loss2512-5.848e-012.280e+00-9.989e-01
Loss364-6.739e-012.228e+00-9.980e-01
Loss3128-6.229e-012.224e+00-9.976e-01
Loss3256-5.581e-012.111e+00-9.942e-01
Loss3512-5.141e-012.057e+00-9.955e-01
Loss464-6.039e-011.964e+00-9.980e-01
Loss4128-5.701e-012.014e+00-9.991e-01
Loss4256-5.379e-012.051e+00-9.951e-01
Loss4512-4.810e-011.957e+00-9.937e-01
+ +Table 2: Details of the linear approximation of the Arxiv Dataset. Note that in this case, we used only the values of the generalization gap whose training error is below $95\%$ . + +
TypeLay.Feat.SlopePointPearson Correlation Coefficient
Accuracy216-2.839e - 012.022e + 00-9.803e - 01
Accuracy232-2.917e - 012.014e + 00-9.690e - 01
Accuracy264-3.006e - 012.021e + 00-9.686e - 01
Accuracy316-2.656e - 011.996e + 00-9.891e - 01
Accuracy332-2.637e - 012.008e + 00-9.679e - 01
Accuracy364-2.581e - 011.981e + 00-9.870e - 01
Loss216-3.631e - 019.406e - 01-9.250e - 01
Loss232-4.228e - 019.638e - 01-9.657e - 01
Loss264-4.991e - 011.067e + 00-9.776e - 01
Loss316-4.131e - 011.276e + 00-9.753e - 01
Loss332-4.605e - 011.385e + 00-9.730e - 01
Loss364-4.589e - 011.455e + 00-9.756e - 01
+ +Table 3: Details of the linear approximation of the Cora Dataset. Note that in this case we used all the values given that the training accuracy is $100\%$ for all nodes. + +![](images/044b6c15012c844abf00aa32674f4b7e6ca92d86dbdf504956008dac8b806618.jpg) + +![](images/8d851457b00eff446cf25347e6de0e3c7dfd3472c422aa59340bb42da7e1b222.jpg) + +![](images/46c446794d8a89289581ebed534822a6a344e3993dcf4bbe18527a5b90d1cca0.jpg) + +![](images/908199831d2c287a64f36a941b585ca9eed5b8676c2303606be74a803b2ec61e.jpg) +(a) Generalization Gap. + +![](images/ead6b3355daff72d0cf96f41955252f55a088e75d3b25e0c2aef6491d2551965.jpg) +(b) 2 Layers + +![](images/df158bd46e4838e2ff640ac4627afea78de94b0f5d58acffbc5441af54ca37d3.jpg) +(c) 3 Layers +Figure 12: Generalization gap, testing, and training losses with respect to the number of nodes in the Cora dataset. The top row is in accuracy, and the bottom row is the cross-entropy loss. + +# J.3.3. CITESEER DATASET + +For the CiteSeer dataset, we used the standard one, which can be obtained running torch/geometric.datasets.Plenetoid(root="./data",name='CiteSeer'). + +![](images/45024cfef0f48b4e2fafab99153cabfbf89f771da0fb5667daa9df98be306878.jpg) + +![](images/dbd29ddd8de9d5123715f8ad86217964d5f71367ba2119c68bca6371ff079787.jpg) + +![](images/8b413b99e6966dc5856329822eefcf40b3abcf54ab850b731583a981e7e8cf1b.jpg) + +![](images/7804060c3bc7bc9a37fe341bae9bc35cf2cc5f9d7a5d730079b790d44661e5ab.jpg) +(a) Generalization Gap + +![](images/b7b0bc6b7d7487f50ecd8796a1be6ef9f690a094e2409c79bdbc1e6845467f3d.jpg) +(b) 2 Layers + +![](images/b682d72490fbebd6bdf9c443c25f9ecbc689507754bc34489794ba99dbbb6de7.jpg) +(c) 3 Layers +Figure 13: Generalization gap, testing, and training losses with respect to the number of nodes in the CiteSeer dataset. The top row is in accuracy, and the bottom row is the cross-entropy loss. + +
TypeLay.Feat.SlopePointPearson Correlation Coefficient
Accuracy216-1.699e - 011.972e + 00-9.518e - 01
Accuracy232-1.856e - 011.978e + 00-9.714e - 01
Accuracy264-1.749e - 011.966e + 00-9.534e - 01
Accuracy316-1.585e - 011.956e + 00-9.721e - 01
Accuracy332-1.659e - 011.963e + 00-9.721e - 01
Accuracy364-1.658e - 011.967e + 00-9.702e - 01
Loss216-1.049e - 017.757e - 01-5.924e - 01
Loss232-1.762e - 017.646e - 01-7.981e - 01
Loss264-2.186e - 018.384e - 01-9.120e - 01
Loss316-1.802e - 011.169e + 00-8.345e - 01
Loss332-1.629e - 011.200e + 00-8.767e - 01
Loss364-5.917e - 021.283e + 00-2.562e - 01
+ +Table 4: Details of the linear approximation of the CiteSeer Dataset. Note that in this case we used all the values given that the training accuracy is $100\%$ for all nodes. + +# J.3.4. PUBMED DATASET + +For the PubMed dataset, we used the standard one, which can be obtained running torch/geometric.datasets.Plenetoid(root="./data",name='PubMed'). + +![](images/9e53d5ecc653e705e5d15c344de94c5e3c97737adb0fb8edec939858194a431c.jpg) + +![](images/2970d308c6056c7746ed292de44af9123216a1a9ff296cb80388d74ea8023bb6.jpg) + +![](images/d3ba03c4daa22a342cb8ae5df97184604560de2ad7c0d0e60a2f9833d16e0f9a.jpg) + +![](images/582a82d0ea64fa41e0ac5bdeecad38be59a344558945d4166287488d54634038.jpg) +(a) Generalization Gap + +![](images/6b20820c8f5d67ba438379e0330bcaef3735c854054af1dc4c4a1ed6fc37bf17.jpg) +(b) 2 Layers + +![](images/6509f926b7ee2b0c635678c306551ea5dc6a14fb2a305aa8b06fb5e1734cf151.jpg) +(c) 3 Layers +Figure 14: Generalization gap, testing, and training losses with respect to the number of nodes in the PubMed dataset. The top row is in accuracy, and the bottom row is the cross-entropy loss. + +# J.3.5. COAUTHORS CS DATASET + +For the CS dataset, we used the standard one, which can be obtained running torch/geometric.datasets.Coauthor(root="./data", name='CS'). In this case, given that there are no training and testing sets, we randomly partitioned the datasets and used $90\%$ of the samples for training and the + +
TypeLay.Feat.SlopePointPearson Correlation Coefficient
Accuracy216-2.523e - 011.834e + 00-9.942e - 01
Accuracy232-2.433e - 011.812e + 00-9.583e - 01
Accuracy264-2.764e - 011.869e + 00-9.761e - 01
Accuracy316-2.748e - 011.844e + 00-9.910e - 01
Accuracy332-2.661e - 011.861e + 00-9.712e - 01
Accuracy364-2.558e - 011.827e + 00-9.890e - 01
Loss216-4.166e - 017.695e - 01-9.718e - 01
Loss232-4.733e - 017.852e - 01-9.137e - 01
Loss264-4.368e - 017.547e - 01-9.718e - 01
Loss316-4.424e - 011.067e + 00-9.549e - 01
Loss332-5.518e - 011.223e + 00-9.655e - 01
Loss364-5.246e - 011.169e + 00-9.632e - 01
+ +Table 5: Details of the linear approximation of the PubMed Dataset. Note that in this case we used all the values given that the training accuracy is $100\%$ for all nodes. + +remaining $10\%$ for testing. + +![](images/b20e8b8cd62c2bed55478213366b8155d1f997808e5052cf25f9a19b9d05810a.jpg) + +![](images/656482b82cc7d98b8c7a9e8965f6790b823dcf4c253ed5d5f65c90913128960e.jpg) + +![](images/da9ed9016ab77bd4989a28b23ce724378dcf0e5554b1c232db846c324313e895.jpg) + +![](images/ffaa6baedc1d70ab3e0df6f6c4010ab9f9103e20f72b82522fd055432792ba94.jpg) +(a) Generalization Gap + +![](images/88c4009e11c444662c6ef550ec7a5e2c52f7d7275946ef0d442484fb4093d024.jpg) +(b) 2 Layers + +![](images/16b5cbfdb475f6e728d6f239c5197d18284493618a071306100bf423a6484b40.jpg) +(c) 3 Layers +Figure 15: Generalization gap, testing, and training losses with respect to the number of nodes in the CS dataset. The top row is in accuracy, and the bottom row is the cross-entropy loss. + +# J.3.6. COAUTHORS PHYSICS DATASET + +For the Physics dataset, we used the standard one, which can be obtained running torch/geometric.datasets.Coauthor(root="./data", name='Physics'). In this case, given that there are no training and testing sets, we randomly partitioned the datasets and used $90\%$ of the samples for training and the remaining $10\%$ for testing. + +![](images/58cdbded2ec8d2def33398255bf597555f7c14ba8067d1a4f1530a1fd6e2f6ad.jpg) +(a) Linear fit for accuracy generalization gap + +![](images/407260afaacaa594557f5ea6e75eb7ba1beeda17339ecf1de01cd862a35ce1e2.jpg) +(b) Linear fit for loss generalization gap + +Figure 16: Generalization gaps as a function of the number of nodes in the training set in the CS dataset. + +
TypeLay.Feat.SlopePointPearson Correlation Coefficient
Accuracy232-2.138e - 011.659e + 00-9.007e - 01
Accuracy264-2.250e - 011.685e + 00-8.969e - 01
Accuracy332-1.979e - 011.695e + 00-9.009e - 01
Accuracy364-1.862e - 011.646e + 00-8.980e - 01
Loss232-2.523e - 016.273e - 01-8.244e - 01
Loss264-2.933e - 017.762e - 01-7.925e - 01
Loss332-3.558e - 011.207e + 00-8.924e - 01
Loss364-3.560e - 011.256e + 00-8.568e - 01
+ +Table 6: Details of the linear approximation of the CS Dataset. Note that in this case we used all the values given that the training accuracy is $100\%$ for all nodes. + +
TypeLay.Feat.SlopePointPearson Correlation Coefficient
Accuracy232-1.524e-011.235e+00-9.064e-01
Accuracy264-1.478e-011.218e+00-9.145e-01
Accuracy332-1.227e-011.190e+00-9.328e-01
Accuracy364-1.268e-011.200e+00-8.826e-01
Loss232-1.111e-01-5.257e-02-7.591e-01
Loss264-9.684e-02-7.335e-02-7.696e-01
Loss332-1.410e-012.875e-01-8.280e-01
Loss364-1.068e-012.388e-01-7.679e-01
+ +Table 7: Details of the linear approximation of the Physics Dataset. Note that in this case we used all the values given that the training accuracy is $100\%$ for all nodes. + +# J.3.7. HETEROPHIOUS AMAZON RATINGS DATASET + +For the Amazon dataset, we used the standard one, which can be obtained running torch/geometric.datasets.HeterophilousGraphDataset(root="./data", name='Amazon'). + +![](images/3dea709abf0ba4109f2e742ab5e8a2a36b8b189b9b2010e25bf8ea811c9ecc8a.jpg) + +![](images/bccba4b193561bb093d183610bae253b371cfaf6d753de6c6c317c9b90ecf859.jpg) + +![](images/6885ffa6d373ca517dcf79bdf72cf80032556ad95039cb6c740adf1ff21fa737.jpg) + +![](images/67fc01c9ab5f81d2cb1b6d4d8a55611d656b54105e38765f205002140254c8bd.jpg) +(a) Generalization Gap + +![](images/553fd6003a130d6438970ee9095e6f503820be34364f5565ff4c689629d227c1.jpg) +(b) 2 Layers + +![](images/f178dc6246982219eec33f7fa835eebe63036014efb3cefd83d9c72514daa033.jpg) +(c) 3 Layers +Figure 17: Generalization gap, testing, and training losses with respect to the number of nodes in the Physics dataset. The top row is in accuracy, and the bottom row is the cross-entropy loss. + +![](images/06f9f43887e83499a2445e5f7ead1cd6054684d66e7c058746b98a244e0719d2.jpg) +(a) Linear fit for accuracy generalization gap + +![](images/9b023c989edd5f84164158c00980a54d11207debbea0d7ce906f903d34827cc0.jpg) +(b) Linear fit for loss generalization gap +Figure 18: Generalization Gaps as a function of the number of nodes in the training set in the Physics dataset. + +In this case, we used the 10 different splits that the dataset has assigned. + +# J.3.8. HETEROPHIOUS ROMAN EMPIRE DATASET + +For the Roman dataset, we used the standard one, which can be obtained running torch/geometric.datasets.HeterophilousGraphDataset(root="./data", name='Roman')). In this case, we used the 10 different splits that the dataset has assigned. + +![](images/759110d8fa7c7648b03092a4db0dc9c1ba9c968b632b1fd5bf38d15853ff022c.jpg) + +![](images/a3e2a562b174dd1b2f278ea87dc7a17ce58e9b125f3595c8b43a9b9c830f25d9.jpg) + +![](images/4c567b729d38658e33c9f5fa7f9f0dee5ac0b65c97cf96db8b5b3469829e748d.jpg) + +![](images/9e93eb1e35018a3bbcea909b84b976a3395aaddbd97ccd9ca37dd4b853518e2b.jpg) +(a) Generalization Gap + +![](images/39a111caa116e40783b0289eb36757a5c6c7c5a0c2aa800608e3d2877ef3db79.jpg) +(b) 2 Layers + +![](images/a1d5610de71d70401e21a1e72be429bd47bdbb6bd83343d15a2a6314b869dc83.jpg) +(c) 3 Layers +Figure 19: Generalization gap, testing, and training losses with respect to the number of nodes in the Amazon dataset. The top row is in accuracy, and the bottom row is the cross-entropy loss. + +![](images/13bd9864d1b5dbe1ffe394774db0a82e3676f008e00942e3380eb8ba95e158c0.jpg) +(a) Linear fit for accuracy generalization gap + +![](images/27f13060335d43f7962ed2343d05ecc4805a13d835677a766e09cba4cbd050d2.jpg) +(b) Linear fit for loss generalization gap +Figure 20: Generalization Gaps as a function of the number of nodes in the training set in the Amazon dataset. + +
TypeLay.Feat.SlopePointPearson Correlation Coefficient
Accuracy232-7.693e-014.236e+00-9.914e-01
Accuracy264-7.788e-014.404e+00-9.972e-01
Accuracy332-7.268e-014.101e+00-9.868e-01
Accuracy364-7.354e-014.257e+00-9.921e-01
Loss232-1.086e+003.971e+00-9.968e-01
Loss264-1.096e+004.189e+00-9.985e-01
Loss332-1.134e+004.339e+00-9.965e-01
Loss364-1.154e+004.629e+00-9.991e-01
+ +![](images/d9c065266a45923f93bc52d4d340efc29916f6392505f5e470f8484e1d422d96.jpg) + +![](images/6a47d5e3593654ef3467d883e228df4aa92e11e2d9a630ad861d559bee201e8e.jpg) + +![](images/7b5ffb792a0ac727a257f061c081c3b4c2ce7822d3477466f8ddbde7d6bffdee.jpg) + +![](images/65ed282a089e35d0e63639d4383ef1ebd9a6645ea0cb34cac9428f1df76eb033.jpg) +(a) Generalization Gap + +![](images/d28e2facaabe692964827e1530e99de67e1f9c69ef397827d5e2845577ce0987.jpg) +(b) 2 Layers + +![](images/0d17f706d039c0e9fed58bc0f6abe6624d27fc6f2eb59d1a3174245798123f67.jpg) +(c) 3 Layers + +Table 8: Details of the linear approximation of the Amazon Dataset. Note that in this case we used only the values of the generalization gap whose training error is below $95\%$ . + +
TypeLay.Feat.SlopePointPearson Correlation Coefficient
Accuracy232-8.408e - 014.644e + 00-9.963e - 01
Accuracy264-7.435e - 014.477e + 00-1.000e + 00
Accuracy332-9.476e - 015.049e + 00-9.956e - 01
Accuracy364-9.145e - 015.182e + 00-1.000e + 00
Loss232-1.006e + 003.829e + 00-9.992e - 01
Loss264-9.656e - 013.915e + 00-1.000e + 00
Loss332-1.244e + 004.764e + 00-9.994e - 01
Loss364-1.225e + 005.011e + 00-1.000e + 00
+ +Table 9: Details of the linear approximation of the Roman Dataset. Note that in this case we used only the values of the generalization gap whose training error is below $95\%$ + +![](images/0ccf804fadbaba3234a24c198f4d051f2f1c7615ba2a33adfff311d3208d9edc.jpg) +(a) Linear fit for accuracy generalization gap + +![](images/828e0f5a36690944c323aaf93f5a2bce55aa36ddbb0d6b2b91571e4213c67199.jpg) +(b) Linear fit for loss generalization gap +Figure 22: Generalization Gaps as a function of the number of nodes in the training set in the Roman dataset. \ No newline at end of file diff --git a/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/images.zip b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ca1808921ad849cf589bf51fa3ff36233ef9ce19 --- /dev/null +++ b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdbc0bf994f5508e338a139daf80efffff9f2aa31b2e27b78deec54274192167 +size 3717521 diff --git a/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/layout.json b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5e55f2b3480ae5b5780b92998413815253d1aa0b --- /dev/null +++ b/amanifoldperspectiveonthestatisticalgeneralizationofgraphneuralnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8073b70e14b820071abea59f5fd31a15bf126520455ac2e9babc9344b13b2a1 +size 1454189 diff --git a/amarketforaccuracyclassificationundercompetition/c5ca5328-5d31-4800-8e46-bc6f6cf15dd1_content_list.json b/amarketforaccuracyclassificationundercompetition/c5ca5328-5d31-4800-8e46-bc6f6cf15dd1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..201a351c144457c085366fe4c9e623ee86ffd882 --- /dev/null +++ b/amarketforaccuracyclassificationundercompetition/c5ca5328-5d31-4800-8e46-bc6f6cf15dd1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac5f6cc76953915bfd118cfb024715bc158df8a402dfc324e4f2455669aee8e0 +size 194834 diff --git a/amarketforaccuracyclassificationundercompetition/c5ca5328-5d31-4800-8e46-bc6f6cf15dd1_model.json b/amarketforaccuracyclassificationundercompetition/c5ca5328-5d31-4800-8e46-bc6f6cf15dd1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2033a25936b027a9cb61e385fc92d54adcda7718 --- /dev/null +++ b/amarketforaccuracyclassificationundercompetition/c5ca5328-5d31-4800-8e46-bc6f6cf15dd1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9be0a4bfd9dba854030e27cbdfbe0d79e34ee5d996d5e79f6a521e838167de56 +size 230741 diff --git a/amarketforaccuracyclassificationundercompetition/c5ca5328-5d31-4800-8e46-bc6f6cf15dd1_origin.pdf b/amarketforaccuracyclassificationundercompetition/c5ca5328-5d31-4800-8e46-bc6f6cf15dd1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f172818ab52a5fef9d350184e39c4a33fea9a2a4 --- /dev/null +++ b/amarketforaccuracyclassificationundercompetition/c5ca5328-5d31-4800-8e46-bc6f6cf15dd1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b16cdb3e65776ad7d1beabee7aa0a5d3f7af2a7a10dd244ad621cb9df031ac3a +size 1517226 diff --git a/amarketforaccuracyclassificationundercompetition/full.md b/amarketforaccuracyclassificationundercompetition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8907b2192df4ab31df919d1d89b1678cc8937f4d --- /dev/null +++ b/amarketforaccuracyclassificationundercompetition/full.md @@ -0,0 +1,899 @@ +# A Market for Accuracy: Classification under Competition + +Ohad Einav1 Nir Rosenfeld1 + +# Abstract + +Machine learning models play a key role for service providers looking to gain market share in consumer markets. However, traditional learning approaches do not take into account the existence of additional providers, who compete with each other for consumers. Our work aims to study learning in this market setting, as it affects providers, consumers, and the market itself. We begin by analyzing such markets through the lens of the learning objective, and show that accuracy cannot be the only consideration. We then propose a method for classification under competition, so that a learner can maximize market share in the presence of competitors. We show that our approach benefits the providers as well as the consumers, and find that the timing of market entry and model updates can be crucial. We display the effectiveness of our approach across a range of domains, from simple distributions to noisy datasets, and show that the market as a whole remains stable by converging quickly to an equilibrium. + +# 1. Introduction + +Machine learning models play an essential role in consumer markets of today. Across many domains, firms that offer products and services can significantly gain by attaining better predictions about their users, or providing better predictions for them. In a sense, this has made accuracy itself a commodity which consumers pursue; consider how user choices have come to depend on the quality of personalized predictions in recommendation systems, media platforms, online marketplaces, or health analytics services. The increasing demand for accurate predictions incentivizes firms to improve their predictions, which in turn creates a 'supply' of accuracy—a process which results in the formation of what we refer to as accuracy markets. + +In accuracy markets, firms seek to maximize their market share by competing with other firms over who provides more users with accurate predictions. This paper aims to study such markets from three perspectives, namely of: (i) the firms (or 'learners') that compete in the market, (ii) the population of potential users, and (iii) the market itself. We follow the market model proposed by Ben-Porat & Tennen-holtz (2017; 2019), but focus on classification (rather than regression), which we argue is more natural for this setting. The main idea is that users choose a firm if it provides them with accurate predictions; if multiple such firms exist, then ties are broken randomly. When there is only one firm in the market (a monopoly), then maximal market share can be attained by maximizing accuracy directly—which is also optimal for users. However, once there is competition, each firm must take into account the predictions of all other firms, as it depends on their choice of classifiers. This dependence forms an oligopoly market in which the interests of the firms no longer necessarily align with user welfare, defined as the ratio of users for whom at least one firm is accurate. + +The main result of Ben-Porat & Tennenholtz (2019) is that if firms in such markets can successfully compute a best (or better) response (i.e., find a model that maximizes market share conditioned on all other models remaining fixed), then dynamics will converge to a pure Nash equilibrium. This is insightful, but leaves many questions unanswered: When can best-response classifiers be found efficiently, and how? What kind of equilibria can be reached, and what will happen on the way there? How will the market be shared by the different firms? And will outcomes be beneficial for users? Our goal is to shed light on these issues and others, using theoretical analysis and empirical evaluation, and as they relate to the learning firms, the users, and the market. + +From the perspective of the learner, our results show that finding the best-response classifier is as hard—but also not harder than—solving a standard classification problem. In fact, given the predictions (or classifiers) of all other players, maximizing market share corresponds to maximizing a particular weighted accuracy objective. This means that although solving this exactly is hard, standard learning techniques (e.g., using proxy losses) can be highly effective in + +practice. It also provides the learner flexibility in choosing the model class to work with, as it sees fit under standard considerations (e.g., data size, compute capacity). Interestingly, however, we see that the choice of when to respond bears significant implications on outcomes for the learner. This brings to focus questions regarding the pioneering of a new market, entering an existing one, and maintaining user loyalty (or its harmful counterpart of user lock-in practices). + +From the perspective of the market, our analysis suggests that most markets will exhibit strong anti-coordination (the other alternative being the existence of a single dominant strategy, which is possible but rare). In particular, market forces push firms to secure exclusive access to certain user sectors, and firms compete over who secures the larger sectors. Notably, gaining access first does not guarantee exclusivity; in fact, for simple markets with two firms we show that firms engage in a chicken-like game, where moving first is disadvantageous. Our analysis reveals that, despite competition, firms are in a sense cooperating: when one firms acts to increase its market share, this also serves to increase the market shares of the other. Empirically, we observe that for larger markets with more firms outcomes are more nuanced, although the order of play remains highly significant. + +From the perspective of users, a direct result of the market is that competition improves welfare. What may be surprising is how efficient the market is: Empirically, we observe that welfare increases quickly and attains the maximum possible value with only a few firms, and after one round of updates. For the latter, we give theoretical grounding for why this can happen. One reason is that our model for the market enables efficient outcomes to materialize—as long as information flows freely. This has policy implications: a social planner that seeks to maximize welfare should incentive firms (or introduce regulation) to make their models public. Thus, transparency becomes an operational consideration which, in a utilitarian sense, works in favor of both firms and users. + +We end with a series of experiments using synthetic and real data that demonstrate the underlying mechanics of accuracy markets and how they operate. Our results demonstrate that learning in such markets can be feasible, that competition converges quickly, and that the market is typically highly efficient and favorable to users. Results also highlight the importance of adjusting the objective to account for competition, and show how lacking to do so (and optimizing accuracy naively) can be detrimental to both firms and users. For the market, we present analysis revealing how it decomposes across firms, and measure concentration and market power. We also show the importance of timing market entry and model updates, the relation between performance and model class capacity, and the constructive role of information sharing. These results underscore the dynamics of accuracy markets and showcase the importance + +of adapting to competition. + +# 2. Related work + +Studying the dynamics of machine learning models competing for market share has been a budding line of research. Ben-Porat & Tennenholtz (2017; 2019) present a regression learning task where providers wish to maximize their market share of users by reducing prediction errors to below a given threshold. Their focus is on the equilibrium dynamics in the induced game between the providers. Employing a similar setting, Jagadeesan et al. (2024) focus on the effects of competition dynamics on social welfare, showing that better data representation does not necessarily translate to better welfare; some of our results echo theirs. Feng et al. (2022) study the bias-variance tradeoff in competitive settings. Yao et al. (2023; 2024a;b) introduce a competition setting for content creation and study welfare, equilibrium behaviors, and best-response dynamics. Ginart et al. (2021), Dean et al. (2024), and Su & Dean (2024) study how competitors specialize when user choices influence the observable data of each competitor. Our work puts emphasis on the learning task itself, and studies its effects on market dynamics and outcomes. + +More generally, our research relates to the growing literature on strategic learning. The majority of work in this field models users as strategic agents that can manipulate their features (e.g., Hardt et al., 2016; Levanon & Rosenfeld, 2021). In contrast, we model users as choosing among alternatives, and put emphasis on the strategic role that learning must assume to contend with competition. The idea that users can choose a provider has been considered in Koren (2023) and Horowitz et al. (2024), but only for binary choice (i.e., join or drop out) and under uncertainty. Our work differs in that it supports choices between multiple firms in a competitive market. In a recent paper, Chen et al. (2025) study strategic learning with externalities; interestingly, their construction also gives rise to a potential game (as ours does), but between users (rather than providers). Our work also draws connections to the field of performative prediction (Perdomo et al., 2020), which studies how (re)training models can gradually change the underlying data distribution. As we show, this perspective applies to our approach when considered from the viewpoint of a single competing provider. + +# 3. Setup + +In our competitive learning setting, users are described by features $x \in \mathcal{X}$ and labels $y \in \mathcal{Y}$ , over which there is an unknown joint distribution $p(x,y)$ . There are $n$ service providing firms, $s_1, \ldots, s_n$ , who provide prediction services to users, and together form a market. Given a training set $S = \{(x_i, y_i)\}_{i=1}^m$ , each service provider $s_i$ learns a classi- + +fier $h_i$ from some model class $H_i$ . Each user $x$ then chooses a provider among those offering an accurate prediction: + +$$ +s (x) \in \left\{s _ {i}: h _ {i} (x) = y \right\} \tag {1} +$$ + +If multiple providers are accurate, then $s(x)$ is determined by a random tie-breaking rule. When no providers offer an accurate prediction, we denote the null choice by $s(x) = \varnothing$ . Welfare is defined as the ratio of users that obtain service: + +$$ +W (\boldsymbol {h}) = \mathbb {E} _ {p} [ \mathbb {1} \{s (x) \geq 1 \} ] \tag {2} +$$ + +where $\pmb{h} = (h_1, \dots, h_n)$ are all classifiers in the market. + +The goal of service providers is to maximize their market share, defined as the expected ratio of users that choose them. For each provider $s_i$ , this depends on its choice of learned model $h_i$ , but also on the set of all other models, $h_{-i}$ . Formally, the market share of service provider $s_i$ is defined as: + +$$ +\mu_ {i} = \mu \left(h _ {i} \mid h _ {- i}\right) = \mathbb {E} _ {p} \left[ \mathbb {P} [ s (x) = s _ {i} ] \right] \tag {3} +$$ + +where probability is w.r.t. how $s(x)$ is chosen from the set of accurate providers in Eq. (1). For simplicity we assume ties are broken uniformly at random, namely $\mathbb{P}[s(x) = s_i] = 1 / \kappa(x)$ where $\kappa(x) = |\{s_j : s(x) \in s_j\}|$ . This conforms to the setting of Ben-Porat & Tennenholtz (2017; 2019). + +When the market includes only a single provider, maximizing market share is equivalent to maximizing accuracy: + +$$ +\operatorname {a r g m a x} _ {h \in H} \mathbb {E} _ {p} [ \mathbb {1} \{y = h (x) \} ] \tag {4} +$$ + +which is the standard objective of supervised learning, and in this case also maximizes welfare by definition. However, once there is competition, this connection breaks since each provider's market share becomes dependent on all others. Thus, the naïve approach of maximizing accuracy as a proxy becomes suboptimal, and the question of how providers maximize their market share must be considered jointly. + +Competitive learning as a game. For a given distribution $p$ , if we think of each provider $s_i$ as a player and interpret Eq. (3) as their utility, then this defines a game, which we refer to as an accuracy game. The strategy space for each $s_i$ is the set of all models in its model class $H_i$ , and each tuple $\pmb{h} = (h_1, \dots, h_n)$ defines a game state. We will assume the game is played on the empirical distribution induced by $S$ , but that final payoffs are given by expected market share w.r.t. $p$ . Note the game remains well-defined when players have their own $S_i \sim p_i$ , although current equilibrium results do not hold for this setting. In terms of information, we work in the full information setting where all players have complete access to the payoff matrix. However, as we will see, optimal strategies for providers require strictly less information. + +Dynamics. To understand how game states progress, we will explore dynamics in which providers can update their predictive models over time, and in response to others. Assume w.l.o.g. that providers are ordered, $s_1 \prec s_2 \prec \dots \prec s_n$ . Then at round $t$ , each provider in turn chooses their $h_i$ by playing best response, defined as: + +$$ +h _ {i} ^ {t} = \operatorname {B R} \left(h _ {- i} ^ {t}\right) = \underset {h \in H _ {i}} {\operatorname {a r g m a x}} \mu (h \mid h _ {- i} ^ {t}) \tag {5} +$$ + +That is, providers respond by choosing the optimal classifier $h_i$ assuming all others classifiers remain fixed, namely $h_{-i}^{t} = (h_{1}^{t},\dots h_{i - 1}^{t},h_{i + 1}^{t - 1},h_{n}^{t - 1})$ and for some choice of initial classifiers $\{h_i^0\}$ . We refer to $h_i^t$ as the best-response classifier of $s_i$ , but note it need not be unique. Since solving Eq. (5) can be computationally infeasible, we will also consider approximate best responses that replace $\mu (h\mid h_{-i}^{t})$ with a tractable surrogate objective (see Sec. 5). + +Equilibrium. We will be interested in studying the game's equilibria, focusing mostly on pure Nash equilibrium (PNE). These are defined as states $h$ in which no provider has incentive to unilaterally deviate from its chosen strategy: + +$$ +\forall i \in [ n ], h ^ {\prime} \in H _ {i}: \quad \mu \left(h _ {i} \mid h _ {- i}\right) \geq \mu \left(h ^ {\prime} \mid h _ {- i}\right) \tag {6} +$$ + +Ben-Porat & Tennenholtz (2017) prove that the game is a type of potential game (Monderer & Shapley, 1996).2 Since the game is played on the empirical distribution, which implies that the set of all possible predictions is finite (even if $H$ is not), a direct result is that a PNE exists and is reachable via a finite sequence of best responses (Eq. (5)). Note that multiple equilibria may exist, and that these may differ significantly in market shares, market concentration, and induced welfare. Furthermore, not all equilibria can necessarily be reached via best-response dynamics, and the equilibrium that is reached can depend on the initial game state (i.e., choice of first classifiers) and the order of play. + +# 4. Analysis + +In this section we set out to analyze basic properties of accuracy markets. To permit tractable analysis, here we focus on simple two player markets. We start with a restricted model class, and then proceed to consider more general classes. Proofs for all results are deferred to Appendix A. + +We begin with some basic notation and properties that are useful for games with $n = 2$ . Fix $p$ , and consider some $H$ . For each provider $s_i$ , denote the accuracy of its chosen $h_i$ as: + +$$ +a _ {i} = \mathbb {E} _ {p} [ 1 \{h _ {i} (x) = y \} ] \tag {7} +$$ + +
h1h2
1/2a1, 1/2a11/2(a1 + δ12), 1/2(a2 + δ21)
1/2(a2 + δ21), 1/2(a1 + δ12)1/2a2, 1/2a2
+ +Table 1: Payoff matrix of the $2 \times 2$ game + +We define the partial discrepancy of $h_i$ relative to $h_j$ as: + +$$ +\delta_ {i j} = \delta_ {i} \left(h _ {j}\right) = \mathbb {E} _ {p} \left[ \mathbb {1} \left\{h _ {i} (x) = y \wedge h _ {j} (x) \neq y \right\} \right] \tag {8} +$$ + +which sums points on which $h_i$ is correct on but $h_j$ is wrong. + +Proposition 1. Let $h_i, h_j$ , then $\mu(h_i \mid h_j) = \frac{1}{2}(a_i + \delta_{ij})$ . + +This implies that there are two ways to increase market share: by improving overall accuracy $(a_{i})$ , or by being exclusively correct on more points $(\delta_{ij})$ . Thus, the choice of $h$ should consider how these two terms trade off. Note that points in $\delta_{ij}$ are counted twice, since they are also included in $a_{i}$ . + +Interestingly, as long as the classifiers are distinct, then whoever has higher accuracy also secures a larger market share: + +Proposition 2. For any $h_i \neq h_j$ , it holds that: + +$$ +\mu \left(h _ {i} \mid h _ {j}\right) > \mu \left(h _ {j} \mid h _ {i}\right) \Leftrightarrow a _ {i} > a _ {j} \tag {9} +$$ + +This, however, should not be taken to imply that maximizing accuracy is a good strategy, since providers seek to maximize their absolute market share—not their market share in relation to others. Regardless of the other's market share, a provider may switch to an equally accurate classifier3 or even sacrifice in accuracy to gain greater discrepancy—if this results in market share increasing. Empirically we observe that sacrificing accuracy is both common and effective. + +# 4.1. Warmup: $2 \times 2$ accuracy markets + +Consider a simple setting with $n = 2$ providers and a shared model class of size two, $H = \{h_1, h_2\}$ . For example, these could be two available pre-trained models, or an existing model that is already in deployment and a new model that is a possible alternative. Such $2 \times 2$ games are fully determined by the tuple $(a_1, a_2, \delta_{12}, \delta_{21})$ —see Table 1. This formulation enables a characterization of all possible equilibria: + +Theorem 1. Let $H = \{h_1, h_2\}$ . Then for any $p$ , the game admits one of two following types: + +1. Dominant-strategy: either $(h_1, h_1)$ or $(h_2, h_2)$ is a PNE +2. Anti-coordination: both $(h_1, h_2)$ and $(h_2, h_1)$ are PNEs + +In the latter case, the game admits a chicken-like $^4$ structure: one provider obtains a larger market share by choosing the 'better' classifier, while the other must settle for the smaller share. Note that better here does not mean more accurate, as outcomes at equilibrium also depend on discrepancy. The proof of Thm. 1 relies on the following result: + +Lemma 1. Providers will choose differing strategies at equilibrium if and only if $|a_1 - a_2| \leq \frac{1}{3} (\delta_{12} + \delta_{21})$ . + +Thus, anti-coordination emerges when $h_1, h_2$ are sufficiently similar in terms of accuracy, but note that the condition is fairly lenient. Empirically, we observe that chicken play is by far the more prevalent scenario, and that the order of play (which is only hinted to here) is highly significant. We next show that the above properties hold more broadly. + +# 4.2. Accuracy markets with threshold classifiers + +Keeping $n = 2$ , consider a more general accuracy game in which $y \in \{0,1\}$ , inputs are scalar $(x \in \mathbb{R})$ , and $H$ comprises threshold classifiers $h_{\tau}(x) = \mathbb{1}\{x > \tau\}$ . This also captures settings with general inputs $x$ where there is a pre-trained score function $f(x)$ and each $s_i$ can set its own thresholds as $h_i(x) = \mathbb{1}\{f(x) > \tau_i\}$ ; i.e., competition revolves around different ways to 'set the bar' w.r.t. $f(x)$ . + +Our next result shows that under certain conditions, even though $H$ includes a continuum of models, the game simplifies significantly. Consider the following common property: + +Definition 1 (MLR). Let $p(x,y)$ be continuous in $x$ , and $f_{y}$ the PDF of each conditional $p(x|y)$ for $y \in \{0,1\}$ . We say that $p$ exhibits a (strict) monotone likelihood ratio (MLR) if the density ratio $\rho(x) = \frac{f_1(x)}{f_0(x)}$ is (strictly) increasing. + +We show that MLR entails a simple closed-form solution to the best-response classifier against any other classifier: + +Theorem 2. Fix $n = 2$ , and let $H = \{h_{\tau}\}$ be a class of threshold classifiers over $d = 1$ . Let $p$ be such that it is strictly MLR in some interval $[a, b]$ . Then for any $\tau \in [a, b]$ : + +$$ +\mathrm {B R} _ {[ a, b ]} (\tau) \in \left\{\max \{a, \rho^ {- 1} (1 / 2) \}, \min \{b, \rho^ {- 1} (2) \} \right\} +$$ + +where $\mathrm{BR}_{[a,b]}(\tau)$ is the best-response to $\tau$ from the set $[a,b]$ . + +Thm. 2 states that of all thresholds in the range where MLR holds, the set of candidates for a best-response classifier reduces to just two. For natural cases in which the extreme choices of $\tau < a$ and $\tau > b$ are not optimal, the structure of the game simplifies even further. + +Corollary 1. For $n = 2$ and $H = \{h_{\tau}\}$ , any accuracy game played on an MLR region of $p$ reduces to a $2 \times 2$ game. Hence, all results from Sec. 4.1 hold. + +Note the reduced model class is $H = \{\rho^{-1}(1/2), \rho^{-1}(2)\}$ .6 This is not by chance: under MLR, these ratios are precisely the points in which accuracy and discrepancy balance each other. Interestingly, this partitions the population into three segments: mostly negative points, mostly positive, and a mixed subpopulation. Providers then compete over who obtains exclusive access to the more rewarding segments. + +Thm. 2 can be generalized to any 1D distribution: + +Theorem 3. Fix $n = 2$ , and let $H = \{h_{\tau}\}$ be a class of threshold classifiers. Then for any interval $[a, b]$ and any $\tau$ : + +$$ +\mathrm {B R} _ {[ a, b ]} (\tau) \in \{a, b, \tau \} \cup P _ {+} ^ {- 1} (1 / 2) \cup P _ {+} ^ {- 1} (2) +$$ + +where $P_{+}^{-1}(z) = \{\tau :\rho (\tau) = z\wedge \rho^{\prime}(\tau) > 0\}$ + +For reasonable distributions, it is likely that $|P_{+}^{-1}(z)| < c$ for some small constant $c$ . This then implies that $H$ effectively reduces to include only $O(c)$ candidate strategies. + +The above results also have implications on dynamics: + +Proposition 3. For $n = 2$ and $H = \{h_{\tau}\}$ , best-response dynamics converge after one round. + +We therefore receive that for threshold classifiers, not only is calculating the best-response a simple task, but the market also converges immediately. The difference from the MLR setting is that there can now be multiple equilibria, and convergence can depend on the initial choices of $\{h_i^0\}$ . + +Best-response dynamics imply that model updates can improve market share only for the provider that responds. Interestingly, in the above setting, we can show that a best-response by one player improves outcomes also for the other. + +Proposition 4. Let $h_i^0 = h_{opt}$ , $\forall i$ . Then for each $s_i$ , market share $\mu_i$ increases even when the other $s_j$ best-responds. + +Empirically, we observe that this form of implicit cooperation emerges also in broader settings. For $n > 2$ , outcomes improve once all other players have responded. + +# 4.3. Accuracy markets for general model classes + +For general classes and $n = 2$ , several properties of the market can still be established. The first considers providers: + +Proposition 5. If $h_i^0 = h^0 \forall i,$ for some $h^0$ , then $\mu_i^* \geq \mu_i^0$ . + +That is, if providers start at the same initial classifier, then all of them will provably gain from competition. This directly implies that competition also improves welfare for users: + +Corollary 2. Fix initial classifier $\mathbf{h}^0 \forall i$ , and let $\mathbf{h}^*$ be the set of classifiers at equilibrium. Then $W(\mathbf{h}^*) \geq W(\mathbf{h}^0)$ . + +In terms of the market, we can bound its concentration: + +Proposition 6. Let $\pmb{h}^{*} = (h_{i}, h_{j})$ be any equilibrium. Then $\mu(h_{i}|h_{j}) \leq 2 \cdot \mu(h_{j}|h_{i})$ . + +Thus, despite the tendency for differentiation under competition, no player can dominate more than $2/3$ of the market. + +General accuracy markets. Empirically, many of our above results hold also for any number of players and general model classes: quick convergence, implicit cooperation, an incentive to differentiate, sacrificing accuracy for market share, bounded market concentration, and high welfare. Some results however do not carry over to $n > 2$ ; for example, the order of play becomes much more intricate, and whether moving first is good or bad can depend on context. Importantly, our results hold despite the intractability of computing best responses exactly, and by using our method for learning approximate best responses—presented next. + +# 5. Method + +We now turn to the question of how to implement a best response, i.e., by solving Eq. (5) for any setting. Our main observation is that a provider's market share objective (Eq. (3)) can be rewritten as a weighted expected accuracy objective with a particular choice of per-example weights: + +$$ +\mu_ {i} = \mathbb {E} _ {p} \left[ w _ {i} (x) \cdot \mathbb {1} \left\{h _ {i} (x) = y \right\} \right], \quad w _ {i} (x) = \frac {1}{1 + \kappa_ {- i} (x)} \tag {10} +$$ + +where $\kappa_{-i}(x) = |\{s_j\neq s_i:h_j(x) = y\} |$ , i.e., the number of other providers that are correct on $x$ . Thus, weights $w_{i}(x)$ determine the importance of input $x$ for provider $i,$ and inform the objective of which inputs to target, or avoid. + +Hardness. In terms of tractability, our results are mixed: + +Observation 1. For any choice of $H$ , and given $w_{i}$ , computing the best-response classifier $h_{i} = \mathrm{BR}(h_{-i})$ is just as hard as maximizing expected accuracy over $H$ . + +This holds since weights in Eq. (10) simply modify the data distribution, a change to which learning algorithms should be agnostic.7 Unfortunately, because maximizing the expected 0-1 accuracy is computationally intractable (and statistically challenging) for the vast majority of classification problems, computing a best-response classifier exactly will mostly be infeasible. The bright side is that this is precisely the problem that machine learning practice aims to solve. + +![](images/c9c5e383a4c7b06180636cf7b0970b30c30c0f7514ad2167b6e5989f51653bae.jpg) +Figure 1: Two-player threshold market. (Left:) Data consists of two class-conditional Gaussians $p(x \mid y) = \mathcal{N}(ay, \sigma_y)$ . Beginning at $h^{\mathrm{opt}}$ , providers compete over who gets the better classifier, $h_2$ , which secures exclusive access to the larger sector of positive users (blue). (Center:) The game as played over time. Each best response improves market share for both providers, but the second mover ( $s_2$ ) prevails. (Right:) Outcomes for increasingly distanced $p(x \mid y)$ (here $\sigma_y = \sigma$ ). Equilibrium classifiers are pulled further away, and sacrifice accuracy for increased market share. + +![](images/7563df68559a9c61e26b97620ebfb8c99518cf883a185cebc4a5c1bc693f3f93.jpg) + +![](images/d60727fb0cc1838972814b41e47af6dd0a22c3c5d417711610c72826d4e8a7c6.jpg) + +Hence, any solution that works well for general machine learning tasks should also work well to learn best responses. + +Learning (approximate) best-response classifiers. Since the game is played on the empirical distribution, we can adapt any method of empirical risk minimization that supports custom example weights, i.e., that aims to solve: + +$$ +\hat {h} _ {i} = \underset {h \in H} {\operatorname {a r g m i n}} \frac {1}{m} \sum_ {j = 1} ^ {m} w _ {i} \left(x _ {j}\right) \ell \left(y _ {j}, h \left(x _ {j}\right)\right) + \lambda R (h) \tag {11} +$$ + +where $\ell$ is a proxy loss (e.g., hinge loss or cross-entropy) and $R$ is an (optional) regularization term. This approach applies to any type of data and choice of model class $H$ . We refer to $\hat{h}_i$ as the approximate best-response classifier of $s_i$ . Note that optimizing $\hat{h}_i$ depends on the other classifiers $h_{-i}$ only through the example weights $w_i(x_j)$ . This means that computing the empirical best-response classifier requires only access to the number of other providers that are correct on each data point—not to the actual classifiers in $h_{-i}$ . Also, we can observe that the average weight $\frac{1}{|S|} \sum_{i \in S} w_i$ has an intuitive meaning: it is the maximum possible market share that could be achieved by a perfect classifier, i.e., when all its predictions are correct. The actual $\mu_i$ is then this optimal market share minus the weighted loss incurred by the chosen classifier $\hat{h}_i$ . + +Performativity. Eq. (4) casts maximizing market share as a problem of learning under distribution shift, where shift is due to competition, as expressed by weights $w_{i}(x)$ . From the perspective of a single provider $s_i$ at time $t$ , weights $w_{i}^{t}(x)$ describe how the market has changed in response to its own actions, i.e., the choice of $h_i^{t - 1}$ . This reveals that learning in a market setting is of a performative nature: the choice of classifier at the current time step $t$ shapes the (effective) distribution at the next, $p_i^{t + 1}(x,y)$ . When there + +are only two providers, performativity is stateless, meaning that $p_i^{t+1}$ depends only on the current $h_i^t$ through how $s_j$ will best-respond; this relates to the common (and simpler) setting often studied in performative prediction (Perdomo et al., 2020). When $n > 2$ , dynamics become stateful, i.e., are path-dependent, and so choices accumulate over time—a generally much more challenging setting (Brown et al., 2022; Li & Wai, 2022). Luckily, our market construction adds structure that makes it a tractable instance. An interesting point to make is that performativity in our setting has no 'real' effect on the distribution. Rather, it only changes how providers should perceive the distribution in order to effectively maximize their utility in the market. + +# 6. Experiments + +We now present our empirical investigation of learning in accuracy markets. We begin by demonstrating the basic mechanics of competitive learning on simple synthetic data which allows us to compute best-response classifiers exactly. Then we switch to real data and apply our method from Sec. 5 to accuracy markets across multiple datasets and various learning algorithms. Code is publicly available at https://github.com/BML-Technion/market4acc. + +# 6.1. Synthetic data + +To gain an understanding of how accuracy markets work, consider a simple setting with $n = 2$ providers, binary labels $y \in \{\pm 1\}$ , univariate features $x \in \mathbb{R}$ sampled from class-conditional Gaussians $x \sim p(x \mid y) = \mathcal{N}(ay, \sigma_y)$ , and threshold classifiers $H = \{h_{\tau}(x) = 1 \mid x > \tau\} \mid \tau \in \mathbb{R}$ . Figure 1 (left) illustrates this setup for $a = 1, \sigma_{-1} = 2$ , and $\sigma_{+1} = 1$ , and shows the learned classifiers at equilibrium, $h_1$ and $h_2$ ; as Thm. 2 suggests, these are precisely $\rho^{-1}(1/2)$ and $\rho^{-1}(2)$ . Note how the region between $h_1$ and + +Table 2: Learning in accuracy markets. Results show outcomes of best-response dynamics, implemented as training by Eq. (11). All runs were initialized to $h^0 = h^{\mathrm{opt}}$ , and converged after at most $t = 2$ rounds. Results include % increase at equilibrium of market share (min and max over providers), market concentration (HHI = $\sum_{i} \mu_{i}^{2}$ ), and welfare. Standard errors of the experiments are insignificant and shown in Appx. D.1. + +
COMPAS-arrestCOMPAS-violentAdult
min μmax μHHIwelfaremin μmax μHHIwelfaremin μmax μHHIwelfare
# providers2+25.4%+31.0%+64.5%+28.2%+41.8%+61.2%+130.6%+51.5%+4.0%+30.5%+39.8%+17.3%
3+38.7%+48.5%+106.2%+43.5%+46.8%+82.5%+163.7%+61.6%+2.9%+41.7%+51.8%+22.1%
4+38.0%+66.9%+121.9%+48.4%+48.5%+94.6%+172.0%+63.9%+6.1%+39.4%+51.2%+22.0%
5+36.8%+83.2%+128.7%+50.1%+48.7%+94.6%+172.3%+64.0%+11.7%+33.2%+51.4%+22.7%
6+38.7%+80.4%+127.9%+50.2%+48.5%+89.0%+172.3%+64.2%+10.5%+41.6%+53.7%+23.2%
+ +$h_2$ (hatches) is split between the providers: $s_1$ is exclusively correct on positive examples, and $s_2$ on negatives. The regions to the right of $h_1$ and left of $h_2$ are shared. + +Fig. 1 (center) shows how market shares $\mu_1, \mu_2$ evolve over rounds of best-responses. Here we initialize $h_1^0 = h_2^0 = h^{\mathrm{opt}}$ where $h^{\mathrm{opt}}$ is the optimal classifier (i.e., which maximizes accuracy on $p$ ). In line with our results from Sec. 4.2, dynamics converge after one round, i.e., each provider responds once, and so $h_1 = h_1^1$ and $h_2 = h_2^1$ . Although $s_1$ moves first and improves $\mu_1$ , this not only improves $\mu_2$ for $s_2$ , but also to a greater extent than that of $s_1$ . When $s_2$ then moves, again both $\mu_1, \mu_2$ increase, but $\mu_2$ retains its advantage over $\mu_1$ . Hence, $s_2$ 'wins' the chicken game by playing second and obtaining access to the larger exclusive subgroup of positives. Regardless of who wins, users gain from the competition since welfare $(= \mu_1 + \mu_2)$ always increases. + +Fig. 1 (right) shows how outcomes change for matching gaussians $(\sigma_{+1},\sigma_{-1} = 1)$ when the class-conditional distributions $p(x|y = -1)$ and $p(x|y = 1)$ are pulled closer together, achieved by decreasing $a$ . When the distributions are far away, $h_1$ and $h_2$ are at $h^{\mathrm{opt}}$ and so fully share the market. But as overlap increases, several effects take place. First, $h_1$ and $h_2$ grow further apart and become more distinct in who they target, causing the exclusivity regions to grow in size. Second, since classification becomes harder, the maximal attainable accuracy decreases. The accuracies of $h_1,h_2$ also decrease, but at a faster rate—a result of specialization. Third, we see that welfare—as the sum of market shares—begins at its maximal value of 1 (when the Gaussians are perfectly separable), then decreases when the exclusivity doesn't extend to the tails, and finally returns to 1 when the providers play opposite thresholds. We explore additional aspects on non-matching Gaussians in Appendix D.4. + +# 6.2. Real data + +Our goal in this section is to explore accuracy markets under our three perspectives: (learning) providers, users, and the market. We experiment with three datasets: COMPAS-Arrest, COMPAS-Violence, and Adult, and consider several + +learning algorithms, including linear SVMs, boosted trees (using XGBoost), and random forests. These generally work well for standard accuracy tasks on the above datasets. Appendix C includes full details on datasets, methods, and our experimental setup. Appendix D includes additional experiments that extend and complement those presented here. + +Learning. Table 2 shows performance under several measures of interest across multiple datasets and for varying number of providers. Here we show results for Linear SVMs, but note that other learning algorithms exhibit overall similar trends (see Appendix D.1). All results are averaged over 10 random train-test splits. The table describes outcomes after $t = 2$ rounds, which we found sufficed to obtain near-convergence across all settings—regardless of training set size, model class complexity, and the use of a proxy objective to implement (approximate) best responses. + +In terms of market share improvement, we see that competition is helpful for all providers; nonetheless, there can be a large gap between the minimal and maximal improvement. In the COMPAS datasets, this gap begins at smaller values, but grows as $n$ increases. For Adult, whose baseline accuracy is higher, the gap remains mostly stable, but is large to begin with. As competition progresses, the market becomes more concentrated, which also generally increases with $n$ . Overall welfare gains are quite high, reaching up to $+65\%$ . + +Market outcomes. Figure 2 shows how the market is partitioned across providers at equilibrium. Here we focus on COMPAS-Arrest with XGBoost and $n = 3$ providers; providers are numbered by their order of play (i.e., $s_1 \prec s_2 \prec s_3$ ), where this order is preserved across rounds. The plot shows for each provider $s_i$ its total market share (bottom left) and accuracy on the entire population (top left) due to its final learned $h_i$ . The plot also shows the decomposition of the market across all subsets of providers: what proportion is exclusive to $s_1$ , what is joint to $s_2$ and $s_3$ , what is shared by all, etc. (right). Here we see that $s_1$ who moved first, attained the largest market share (36%). However, its accuracy is significantly lower than others, + +![](images/1c9032d64a46d8b376c2d829ebec00cc45c6bb34ecd7474858bc0db1fdeab41c.jpg) +Figure 2: Market share. An example for $n = 3$ where the first mover ( $s_1$ ) dominates the market, achieved by sacrificing overall accuracy for exclusive access to a large user sector. Other providers are left to share the remaining sector. + +and below $50\%$ . The subsets plot reveals the reason: $s_1$ was able to gain exclusive access to $28.5\%$ of the market; it shares an additional $19\%$ with all providers, but only $1\%$ with each of them alone. In contrast, $s_2$ and $s_3$ share almost all of their users, either as a pair $(44\%)$ or along with $s_1$ . This shows how $s_1$ has come to dominate the market by learning a classifier $h_1$ that sacrifices accuracy in order to effectively target an exclusive user sector. The low overall accuracy of $h_1$ suggests that naively optimizing for accuracy without considering the effects of competition can be highly suboptimal in terms of market outcomes. + +Order of play. Whereas our $2 \times 2$ analysis from Sec. 4.1 suggested that the game either has a dominant strategy or a chicken-like structure (which implies that moving second is preferable), we see in Fig. 2 that for $n > 2$ providers reality is more complex, and in fact moving first allows to dominate the market. Interestingly, this first move induces a 2-player game on the other providers whose equilibrium admits a dominant strategy. To quantify this phenomenon, and assert its robustness across methods, we ran experiments for every combination of datasets and model classes, listed in Appendix C. For each experiment, namely for each combination of model class and dataset, the final market shares were calculated for each provider along with his/her relative position of play, i.e., at what position did the provider perform a best-response. Additionally, each experiment was performed for competitions with 2,3,4,5, and 6 players, so that we can compare dynamics across different market saturations. Figure 3 shows the order of play comparisons, averaged out across all of the experiments that were described above. When the competition game is played with $n = 2$ providers, we see a clear preference to be the provider that moves last, characterized by the market share term $\mu_{2}$ . + +![](images/3ab88d21bdd77d030b09a2a7d938c749b7112752bffae295f5dd6cbafca700bc.jpg) +Figure 3: Influence of order of play on market share. The orange densities measure the difference in market share between the provider that moved 2nd and the provider that moved 1st, and the blue densities measure the difference in market share between the provider that moved 2nd and the provider that moved 3rd, for $n > 2$ . Dashed lines inside the densities represent the $25\%, 50\%$ , and $75\%$ quantiles of values, respectively, from bottom to top. + +The vast majority of experiments showed a significant gain in market share, as seen by the fact that the $25\%$ quantile of values already shows a net-positive gain from moving last. We also note that the expected (mean) competitive advantage of moving last is $3.6\%$ with a median of $4.8\%$ . Given that for 2 players with equal model classes, the market share of a single provider will never exceed $\frac{2}{3} = 0.67$ (see Proposition 6), then a $4.8\%$ difference in market share is quite significant. + +When the competition game is played with $n \geq 3$ providers, however, we observe an entirely different dynamic. Figure 3 provides two densities: The orange density is as in the 2- provider setting $(\mu_{2} - \mu_{1})$ . The blue density is the difference in market share between the player who moved 2nd versus the player who moved 3rd $(\mu_{2} - \mu_{3})$ . We find here that the ratios have switched: it is in fact more advantageous to be the provider that moves 1st, as evidenced by the negative orientation of the orange density plot. The next interesting thing that we note is the seeming insignificance of order-of-play beyond the first two positions, as we can observe that the blue density hovers around 0 with relatively low variance. This alludes to the premise put stated above that in competitive settings with 3 or more players, the person who moves 1st is in essence "grabbing his territory", which then induces all of the other players to play among themselves for the other resources, i.e., consumers. + +User welfare. Our result in Cor. 2 states that competition is conducive to welfare. It remains to consider how conducive it is, as well as how quickly welfare improves. Fig. 4 left shows how welfare changes over time and for increasing number of providers $n$ . Here we focus on COMPAS-arrest and LinearSVC, with other settings shown in Appendix D.3. + +![](images/dd1cfaa12b13400cc2806d967922377a253bb4feefcde012bee4c3bb65f48402.jpg) +Figure 4: Welfare over rounds. Competition consistently increases welfare over time, until convergence. Welfare improves with the number of providers (left), but (perhaps counterintuitively) decreases with the quality of data (right). + +The plot shows a clear trend of welfare increasing throughout competition. It also makes apparent the effect of $n$ : as the number of providers increases, welfare climbs higher and faster. For $n = 2$ , welfare attains a maximum of 0.85, reached only at the second round. For $n = 3$ , welfare maximizes at 0.95 by the end of the first round. Notice that welfare reaches the upper bound of 1 already at $n = 5$ and before the end of the first round (i.e., before all providers have moved). With $n = 6$ providers, this occurs even earlier. + +The above depicts accuracy markets as highly efficient. On the one hand, our market setting allows for the free flow of information, and models users as making informed (rational) decisions—which are necessary to enable efficient outcomes. But on the other, providers are restricted in that they cannot compute best-responses exactly. We therefore take the results above to again suggest that maximizing market share using proxy objectives can work well in practice. + +Since market share should generally align with accuracy, another interesting question is how does the capacity to maximize accuracy affect the overall welfare. For a different setting of competing predictors, Jagadeesan et al. (2024) argue that increased capacity can result in lower welfare for users. We show that this occurs quite distinctly in our setting as well: When the complexity goes down, maximizing accuracy may be harder, but gaining discrepancy is easier, as there are more users to specialize on. Following the idea of controlling capacity by the quality of representation, we implement this by varying the number of features available for learning. Fig. 4 (right) shows welfare for increasing number of features and for $n = 2$ (see Appendix D.3 for more settings). As expected, at time $t = 0$ , better representations entail higher accuracy, and therefore higher welfare. But once providers respond, the trend inverts: restricting learning to use only two features attains the optimal welfare of 1, while using all features gives welfare of 0.84. + +# 7. Discussion + +This work studies learning in a competitive setting where classifiers are trained to increase market share. From a learning perspective, our main message is that while maximizing accuracy naively is likely not a good strategy, optimizing a weighted accuracy objective that correctly encodes competition can be very effective. Although technically similar, the transition to market-induced objectives has implications on the market and consequently on user welfare. In our market model competition promotes welfare, but this relies on model transparency, efficient information flow, and calculated user decisions. Realistic markets are likely to fall short of such ideals: firms may prefer to keep models private, informational advantages can be exploited, and user behavior can be far from rational. The fact that most service sectors currently include only a few competing platforms (consider media, social, e-commerce, finance, housing, etc.) should raise concerns of oligopolistic behavior, notably collusion and lock-in practices. This requires deliberation of appropriate regulation for these emerging accuracy markets. + +# Impact Statement + +Our work considers the role of machine learning in fostering markets in which utility to consumers derives from personalized accuracy. The market model we study is inspired by real markets of this type, but as a model, makes several simplifying assumptions that merit consideration before drawing conclusions about actual markets. One assumption is that there is a single underlying distribution that is fixed and accessible to all providers. Although this is a common assumption in standard machine learning, under competition it has further implications. When data distributions differ across providers, or even when the distribution is the same but samples are different (which is plausible), it is no longer clear if pure equilibrium exists or is reachable through reasonable dynamics. Another assumption is that users choose a provider who is accurate on their own input. This applies in some cases, such as personalized recommendations: users likely know their preferences, but do not know if (and which) content items match them—but can make conclusions once recommended. More generally however, we consider our model as a simplification of outcomes that materialize and stabilize over time, such as provider reputation, social learning, or confirmation in hindsight. Another alternative is that users interact with a platform not once but many times; if the platform has access to some personalized examples, then competition can revolve around future expected outcomes. A final assumption is that users are rational and choose by maximizing utility independently at each time step. This can be a reasonable assumption in settings where users have both incentive and resources to invest effort in bettering their choices, and when sufficient + +time passes between rounds to enable switching providers. More generally, user behavior is likely to play a key role in market outcomes, and can benefit from more realistic modeling. It is also likely that competition can drive providers to exploit users' behavioral weaknesses—an additional reason for establishing appropriate regulations and norms. + +# Acknowledgments + +The authors would like to thank Fan Yao, Moran Koren, Omer Ben-Porat, and Eden Saig for their insightful remarks and valuable suggestions. This work is supported by the Israel Science Foundation grant no. 278/22. + +# References + +Angwin, J., Larson, J., Mattu, S., and Kirchner, L. Machine bias. propublica, may 23, 2016, 2016. +Ben-Porat, O. and Tennenholtz, M. Best response regression. Advances in Neural Information Processing Systems, 30, 2017. +Ben-Porat, O. and Tennenholtz, M. Regression equilibrium. In Proceedings of the 2019 ACM Conference on Economics and Computation, pp. 173-191, 2019. +Brown, G., Hod, S., and Kalemaj, I. Performative prediction in a stateful world. In International conference on artificial intelligence and statistics, pp. 6045-6061. PMLR, 2022. +Chen, Y., Hossain, S., Micha, E., and Procaccia, A. Strategic classification with externalities. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=o6CXkEEettn. +Dean, S., Curmei, M., Ratliff, L., Morgenstern, J., and Fazel, M. Emergent specialization from participation dynamics and multi-learner retraining. In Dasgupta, S., Mandt, S., and Li, Y. (eds.), Proceedings of The 27th International Conference on Artificial Intelligence and Statistics, volume 238 of Proceedings of Machine Learning Research, pp. 343–351. PMLR, 02–04 May 2024. URL https://proceedings.mlr.press/v238/dean24a.html. +Feng, Y., Gradwohl, R., Hartline, J., Johnsen, A., and Nekipelov, D. Bias-variance games. In Proceedings of the 23rd ACM Conference on Economics and Computation, EC '22. ACM, July 2022. doi: 10.1145/3490486.3538248. URL http://dx.doi.org/10.1145/3490486.3538248. +Ginart, T., Zhang, E., Kwon, Y., and Zou, J. Competing ai: How does competition feedback affect machine learning? + +In International Conference on Artificial Intelligence and Statistics, pp. 1693-1701. PMLR, 2021. +Hardt, M., Megiddo, N., Papadimitriou, C., and Wootters, M. Strategic classification. In Proceedings of the 2016 ACM conference on innovations in theoretical computer science, pp. 111-122, 2016. +Horowitz, G., Sommer, Y., Koren, M., and Rosenfeld, N. Classification under strategic self-selection. arXiv preprint arXiv:2402.15274, 2024. +Jagadeesan, M., Jordan, M., Steinhardt, J., and Haghtalab, N. Improved bayes risk can yield reduced social welfare under competition. Advances in Neural Information Processing Systems, 36, 2024. +Koren, M. The gatekeeper effect: The implications of prescreening, self-selection, and bias for hiring processes. arXiv preprint arXiv:2312.17167, 2023. +Levanon, S. and Rosenfeld, N. Strategic classification made practical. In International Conference on Machine Learning, pp. 6243-6253. PMLR, 2021. +Li, Q. and Wai, H.-T. State dependent performative prediction with stochastic approximation. In International Conference on Artificial Intelligence and Statistics, pp. 3164-3186. PMLR, 2022. +Marx, C., Calmon, F., and Ustun, B. Predictive multiplicity in classification. In International Conference on Machine Learning, pp. 6765-6774. PMLR, 2020. +Monderer, D. and Shapley, L. S. Potential games. Games and economic behavior, 14(1):124-143, 1996. +Paes, L. M., Cruz, R., Calmon, F. P., and Diaz, M. On the inevitability of the rashomon effect. In 2023 IEEE International Symposium on Information Theory (ISIT), pp. 549-554. IEEE, 2023. +Perdomo, J., Zrnic, T., Mendler-Dünner, C., and Hardt, M. Performative prediction. In International Conference on Machine Learning, pp. 7599-7609. PMLR, 2020. +Semenova, L., Rudin, C., and Parr, R. On the existence of simpler machine learning models. In Proceedings of the 2022 ACM Conference on Fairness, Accountability, and Transparency, pp. 1827-1858, 2022. +Su, J. and Dean, S. Learning from streaming data when users choose. In Salakhutdinov, R., Kolter, Z., Heller, K., Weller, A., Oliver, N., Scarlett, J., and Berkenkamp, F. (eds.), Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 46772-46803. PMLR, 21-27 Jul 2024. URL https://proceedings.mlr.press/v235/su24a.html. + +Valiant, L. G. A theory of the learnable. Communications of the ACM, 27(11):1134-1142, 1984. +Yao, F., Li, C., Nekipelov, D., Wang, H., and Xu, H. How bad is top- $k$ recommendation under competing content creators? In International Conference on Machine Learning, pp. 39674-39701. PMLR, 2023. +Yao, F., Li, C., Sankararaman, K. A., Liao, Y., Zhu, Y., Wang, Q., Wang, H., and Xu, H. Rethinking incentives in recommender systems: are monotone rewards always beneficial? Advances in Neural Information Processing Systems, 36, 2024a. +Yao, F., Liao, Y., Wu, M., Li, C., Zhu, Y., Yang, J., Liu, J., Wang, Q., Xu, H., and Wang, H. User welfare optimization in recommender systems with competing content creators. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 3874-3885, 2024b. + +# A. Proofs + +Notations. In the proofs below, we may use the multiple notations for partial discrepancy interchangeably, namely $\delta_{ij} = \delta_{h_i}(h_j)$ . This is for readability and ease of portrayal. Similarly, in place of $\mu$ (market share), sometimes there can be written $U$ , for utility. These terms are also interchangeable. Lastly, the terms "player" and "provider" are interchangeable as well, since both refer to the learner. + +Before delving in to the proofs of the individual statements from the main paper, we will start with showing a helpful observation that sits at the crux of competitive dynamics, and will help with many of the proofs below. + +Observation 2. For any 2 classifiers $h_i, h_j$ with accuracies $a_i, a_j$ , it stands: $a_i - \delta_{ij} = a_j - \delta_{ji}$ . + +Proof. Visual proof by building a confusion matrix split up by accuracy on the label: + +$$ +\begin{array}{c c} h _ {j} = y & h _ {j} \neq y \\ \hline a _ {i} - \delta_ {i j} & \delta_ {i j} \\ \hline \delta_ {j i} & 1 - a _ {i} - \delta_ {j i} \\ \hline = a _ {j} & = 1 - a _ {j} \end{array} = a _ {i} +$$ + +Explanation of the table: + +- the cells are partitioned by buckets according to the correctness of the classifiers. This helps us understand the discrepancy and overlap of accurate predictions between the classifiers. +- We can immediately observe that the 1st row sums to $a_i$ , and the 1st column sums to $a_j$ . Similarly, the 2nd row and 2nd column sum up to $1 - a_i, 1 - a_j$ , respectively. So too, $d_{ij}$ and $\delta_{ji}$ are in the top right and bottom left cell by definition. + +From the sums of the rows and columns, we observe the following equality from the top-left cell: + +$$ +a _ {i} - \delta_ {i j} = a _ {j} - \delta_ {j i} \tag {12} +$$ + +# Proposition 1 (Market Share). + +Proof. from the definition of our problem setting, classifier $h_j$ gets: + +- Full market share on the points that only $h_j$ is correct on: $\frac{1}{n} \sum_{i=1}^{n} \mathbb{1}\{h_j(x) = y_i \wedge h_i(x) \neq y_i\}$ +- Half market share on the points that they are both correct on: $\frac{1}{2} \cdot \frac{1}{n} \sum_{i=1}^{n} \mathbb{1}\{h_j(x) = y_i \wedge h_i(x) = y_i\}$ + +By the definition of partial discrepancy (Eq. 8), the first bullet is exactly $\delta_{h_j}(h_i)$ , and the second bullet is equal to $\frac{1}{2} (a_j - \delta_{h_j}(h_i))$ . + +We then receive: $U(h_{j}|h_{i}) = \delta_{h_{j}}(h_{i}) + \frac{1}{2} (a_{j} - \delta_{h_{j}}(h_{i})) = \frac{1}{2} (a_{j} + \delta_{h_{j}}(h_{i}))$ + +Proposition 2 (Market share $\leftrightarrow$ accuracy). We will first prove a helpful claim: + +Helpful claim 1. For any 2 classifiers $h_1, h_2$ i with accuracies $a_1, a_2$ , respectively, it stands that $\delta_{12} > \delta_{21} \Leftrightarrow a_1 > a_2$ . + +Proof. From Observation 2, $a_1 - \delta_{12} = a_2 - \delta_{21}$ , meaning: $a_1 = a_2 + \delta_{12} - \delta_{21}$ . Therefore: + +$$ +\begin{array}{l} a _ {1} > a _ {2} \Leftrightarrow a _ {1} - a _ {2} \geq 0 \\ \Leftrightarrow a _ {2} + \delta_ {1 2} - \delta_ {2 1} - a _ {2} \geq 0 \\ \Leftrightarrow \delta_ {1 2} - \delta_ {2 1} \geq 0 \\ \Leftrightarrow \delta_ {1 2} \geq \delta_ {2 1} \\ \end{array} +$$ + +Where the 2nd inequality comes from substituting $a_1 = a_2 + \delta_{12} - \delta_{21}$ + +We will now prove Proposition 2: + +Proof. From Proposition 1, We know: $\mu (h_1|h_2) = a_1 + \delta_{12}$ , and $\mu (h_2|h_1) = a_2 + \delta_{21}$ . + +$$ +\begin{array}{l} \mu \left(h _ {1} \mid h _ {2}\right) > \mu \left(h _ {2} \mid h _ {1}\right) \\ \Leftrightarrow a _ {1} + \delta_ {1 2} > a _ {2} + \delta_ {2 1} \tag {13} \\ \Leftrightarrow a _ {1} > a _ {2} \\ \end{array} +$$ + +Where the last inequality follows from Helpful claim 1. + +Lemma 1. We will start with a helpful claim: + +Helpful claim 2. Let $h_1, h_2 \in \mathcal{H}$ . Then: + +- $U(h_{1}|h_{2}) > U(h_{2}|h_{2})\Leftrightarrow \delta_{h_{1}} > \frac{1}{2}\delta_{h_{2}}$ +- $U(h_{2}|h_{1}) > U(h_{1}|h_{1}) \Leftrightarrow \delta_{h_{2}} > \frac{1}{2}\delta_{h_{1}}$ + +Additionally, the above inequalities hold if and only if $|\delta_{h_1} - \delta_{h_2}| < \frac{1}{3} (\delta_{12} + \delta_{21})$ . + +Proof. From Proposition 1 we know that $U(h_{1}|h_{1}) = \frac{1}{2} a_{1}, U(h_{2}|h_{2}) = \frac{1}{2} a_{2}, U(h_{i}|h_{j}) = \frac{1}{2} (a_{i} + \delta_{ij})$ . Therefore, + +$$ +\begin{array}{l} U \left(h _ {1} \mid h _ {2}\right) > U \left(h _ {2} \mid h _ {2}\right) \Leftrightarrow \frac {1}{2} \left(a _ {1} + \delta_ {1 2}\right) > \frac {1}{2} \left(a _ {2}\right) \\ \Leftrightarrow a _ {1} + \delta_ {h _ {1}} > a _ {1} + \delta_ {h _ {2}} - \delta_ {h _ {1}} \\ \Leftrightarrow \delta_ {h _ {1}} > \delta_ {h _ {2}} - \delta_ {h _ {1}} \tag {14} \\ \Leftrightarrow 2 \delta_ {h _ {1}} > \delta_ {h _ {2}} \\ \Leftrightarrow \delta_ {h _ {1}} > \frac {1}{2} \delta_ {h _ {2}} \\ \end{array} +$$ + +Where the substitution of the RHS in the 2nd line comes from Observation 2. + +Similarly, + +$$ +\begin{array}{l} U \left(h _ {2} \mid h _ {1}\right) > U \left(h _ {1} \mid h _ {1}\right) \Leftrightarrow a _ {2} + \delta_ {h _ {2}} > a _ {1} \\ \Leftrightarrow a _ {2} + \delta_ {h _ {2}} > a _ {2} + \delta_ {h _ {1}} - \delta_ {h _ {2}} \\ \Leftrightarrow \delta_ {h _ {2}} > \delta_ {h _ {1}} - \delta_ {h _ {2}} \tag {15} \\ \Leftrightarrow 2 \delta_ {h _ {2}} > \delta_ {h _ {1}} \\ \Leftrightarrow \delta_ {h _ {2}} > \frac {1}{2} \delta_ {h _ {1}} \\ \end{array} +$$ + +Now assume that the inequalities hold, meaning $\delta_{h_1} > \frac{1}{2}\delta_{h_2}$ and $\delta_{h_2} > \frac{1}{2}\delta_{h_1}$ . Then, + +$$ +\begin{array}{l} \delta_ {h _ {1}} > \frac {1}{2} \delta_ {h _ {2}} \rightarrow \delta_ {h _ {1}} + \delta_ {h _ {2}} > \frac {3}{2} \delta_ {h _ {2}} \\ \rightarrow \delta_ {h _ {2}} < \frac {2}{3} \left(\delta_ {h _ {1}} + \delta_ {h _ {2}}\right) \tag {16} \\ \end{array} +$$ + +Similarly, $\delta_{h_1} < \frac{2}{3} (\delta_{h_1} + \delta_{h_2})$ . This means that $\max \{\delta_{h_1}, \delta_{h_2}\} < \frac{2}{3} (\delta_{h_1} + \delta_{h_2})$ , and therefore $|\delta_{h_1} - \delta_{h_2}| < \frac{1}{3} (\delta_{h_1} + \delta_{h_2})$ . [Note that all derivations apply both ways, meaning if $|\delta_{h_1} - \delta_{h_2}| < \frac{1}{3} (\delta_{h_1} + \delta_{h_2})$ , then $\delta_{h_1} > \frac{1}{2}\delta_{h_2}$ and $\delta_{h_2} > \frac{1}{2}\delta_{h_1}$ .] + +Using Helpful claim 2, the proof of Lemma 1 is almost immediate: from Observation 2 we know that $a_1 - a_2 = \delta_{12} - \delta_{21}$ . + +The 2 players will choose differing strategies in the $2 \times 2$ game if and only if $U(h_{1} | h_{2}) > U(h_{2} | h_{2})$ and $U(h_{2} | h_{1}) > U(h_{1} | h_{1})$ , which holds if and only if $\delta_{h_{1}} > \frac{1}{2} \delta_{h_{2}}$ and $\delta_{h_{2}} > \frac{1}{2} \delta_{h_{1}}$ , which holds if and only if $|\delta_{h_{1}} - \delta_{h_{2}}| < \frac{1}{3} (\delta_{12} + \delta_{21})$ . Since we know $a_{1} - a_{2} = \delta_{12} - \delta_{21}$ , this proves Lemma 1. + +Theorem 1 (2x2 PNEs.) From the inequalities in Lemma 1, we receive the conditions for which the providers play anti-coordinated strategies. + +If one of these inequalities doesn't hold, meaning either $U(h_{1}|h_{2}) < U(h_{2}|h_{2})$ or $U(h_{2}|h_{1}) < U(h_{1}|h_{1})$ , then the dominant strategy is $h_1, h_2$ , respectively, depending on which inequality does not hold. + +# Theorem 2 (Threshold best-responses under MLR). + +Proof. Firstly, we note that since $g$ is continuous and increasing strongly in $[a,b]$ , $g^{-1}$ is well defined. + +We will split $[a,b]$ into sub-intervals $[a,h],[h,b]$ and calculate the best response in each interval: + +Let $h$ be the strategy we are responding to. + +It is clear that for all strategies in $[a,h]$ , the utility on all points in $[h,b]$ is constant, since the classification on those points is the same. So within the interval $[a,h]$ , the player is looking to maximize $U_{[a,h]}$ . Similarly, when considering the best response in interval $[h,b]$ , we need only maximize $U_{[h,b]}$ , since for all points in the interval $U_{[a,h]}$ is the same. + +Let $U_{[a,b]}(h|h) = c$ . + +It stands that $\forall h_1\in [a,h]$ + +$$ +U _ {[ a, b ]} (h _ {1} | h) - c = \int_ {h _ {1}} ^ {h} f _ {1} (x) - \frac {1}{2} f _ {0} (x) d x +$$ + +This is a straightforward expression of the utility. Any points outside $[h_1, h]$ have an identical classification for both $h$ and $h_1$ , and so the only difference in utility is found inside the interval $[h_1, h]$ , which $h_1$ classifies as positive and $h$ classifies as negative. Therefore the gain in utility is $\int_{h_1}^h f_1(x) dx$ , but the loss on the negative points is $\frac{1}{2} \int_{h_1}^h f_0(x) dx$ , since the utility on those points would be otherwise shared with $h$ . + +Similarly, $\forall h_1\in [h,b]$ + +$$ +U _ {[ a, b ]} (h _ {1} | h) - c = \int_ {h} ^ {h _ {1}} f _ {0} (x) - \frac {1}{2} f _ {1} (x) d x +$$ + +Therefore, $BR_{[a,h]}(h) = \operatorname*{argmax}_{h_1\in [a,h]}U_{[a,b]}(h_1|h) = \operatorname*{argmax}_{h_1\in [a,h]}\int_{h_1}^h f_1(x) - \frac{1}{2} f_0(x)dx.$ + +And $BR_{[h,b]}(h) = \operatorname*{argmax}_{h_1\in [h,b]}U_{[a,b]}(h_1|h) = \operatorname*{argmax}_{h_1\in [h,b]}\int_{h_1}^h f_0(x) - \frac{1}{2} f_1(x)dx.$ + +We will divide into cases based on the value of $g(h)$ : + +Case 1: $1/2 \leq g(h) \leq 2$ : + +We will calculate $BR_{[a,h]}(h)$ . Since $g$ is strictly increasing in $[a,b]$ , the value $f_0(x) - \frac{1}{2} f_1(x)$ is positive for all points $x$ where $g(x) \geq \frac{1}{2}$ . + +Therefore, $\forall h_1 < h_2 \in [a,h]$ , if $g(h_1) \geq \frac{1}{2}$ then $U_{[a,h]}(h_1|h) \geq U_{[a,h]}(h_2|h)$ + +In this case: $BR_{[a,h]}(h) = \max \left(a, g^{-1}(1/2)\right)$ , since in the case where $\forall h_1 \in [a,h], g(h_1) > \frac{1}{2}$ , then the maximum utility is found at $a$ . + +Similarly, the same argument holds to derive that: $BR_{[h,b]}(h) = \max \left(b,g^{-1}(2)\right)$ + +Case 2: $g(h) > 2$ : + +In this case, $\forall h_1 > h$ it stands that $U_{[h,b]}(h_1|h) < U_{[h,b]}(h|h)$ , since the value $f_0(x) - \frac{1}{2} f_1(x)$ is negative for all points in $[h,b]$ . + +Therefore the best-response is found in the interval $[a, h]$ , in which case the derivation from the previous case holds, and so $BR_{[a,h]}(h) = \max \left(a, g^{-1}(1/2)\right)$ . + +Case 3: $g(h) < 1 / 2$ : + +In this case, $\forall h_1 < h$ it stands that $U_{[a,h]}(h_1|h) < U_{[a,h]}(h|h)$ , since the value $f_0(x) - \frac{1}{2} f_1(x)$ is negative for all points in $[a,h]$ . + +Therefore the best-response is found in the interval $[h, b]$ , in which case the derivation from the previous case holds, and so $BR_{[h,b]}(h) = \max \left(b, g^{-1}(2)\right)$ . + +So across all cases, we find that in the interval $[a,b]$ , there are only 2 possible best responses: + +$\max \left(b,g^{-1}(2)\right)$ , and $\min \left(a,g^{-1}(1 / 2)\right)$ . + +# Corollary 1. + +Proof. Immediate from the fact that the strategy space of both players can be reduced to the 2 candidate best-responses stipulated in Theorem 2. $\square$ + +# Theorem 3 (General threshold best-responses). + +Proof. As in the proof of Theorem 2, We will split $[a,b]$ into sub-intervals $[a,h],[h,b]$ and calculate the set of possible best responses for each interval: + +Let $h$ be the strategy/threshold we are responding to. We will rewrite the explicit forms for $U_{[a,b]}$ : + +$$ +\forall h _ {1} \in [ a, h ]: +$$ + +$$ +U _ {[ a, b ]} (h _ {1} | h) - c = \int_ {h _ {1}} ^ {h} f _ {1} (x) - \frac {1}{2} f _ {0} (x) d x +$$ + +$$ +\forall h _ {1} \in [ h, b ]: +$$ + +$$ +U _ {[ a, b ]} (h _ {1} | h) - c = \int_ {h _ {1}} ^ {h} f _ {0} (x) - \frac {1}{2} f _ {1} (x) d x +$$ + +Where $c = U_{[a,b]}(h|h)$ . + +As explained in the proof of Theorem 2, to calculate the best response in $[a,h]$ , it is sufficient to maximize $U_{[a,h]}$ ; and to calculate the best-response in $[h,b]$ , it is sufficient to maximize $U_{[h,b]}$ . + +We will calculate the best response in $[a,h]$ : + +Helpful claim 3. Let $(h_1, h_2)$ be any open interval in $[a, h]$ such that $\forall x \in (h_1, h_2)$ it holds that $g(x) > \frac{1}{2}$ . + +Then $\forall x\in (h_1,h_2]\to U_{[a,h]}(h_1|h) > U_{[a,h]}(x|h)$ . + +Proof. Let $x \in (h_1, h_2]$ . + +Using the derivations above of relative market shares between thresholds, we will compare the market shares of $x$ and $h_1$ : + +$$ +U _ {[ a, h ]} (h _ {1} | h) - U _ {[ a, h ]} (x | h) = \int_ {h _ {1}} ^ {x} f _ {1} (u) - \frac {1}{2} f _ {0} (u) d u. +$$ + +Since we are given that in the segment $[h_1, x]$ , $g > \frac{1}{2}$ , then it follows that $\forall u, f_1(u) - \frac{1}{2} f_0(u) > 0$ , and therefore the integral must be positive and hence $U_{[a,h]}(h_1|h) - U_{[a,h]}(x|h) > 0$ . + +Helpful claim 4. Let $(h_1, h_2)$ be any interval in $[a, h]$ such that $\forall x \in (h_1, h_2)$ it holds that $g(x) < \frac{1}{2}$ . + +Then $\forall x\in [h_1,h_2)\to U_{[a,h]}(h_2|h) > U_{[a,h]}(x|h).$ + +Proof. We will show that $U_{[a,h]}(h_2|h) - U_{[a,h]}(x|h) > 0$ , in a similar manner to Helpful claim 3: + +Let $x \in (h_1, h_2]$ . We will compare the market shares of $x$ and $h_1$ : + +$$ +U _ {[ a, h ]} (h _ {2} | h) - U _ {[ a, h ]} (x | h) = \int_ {x} ^ {h _ {1}} f _ {0} (u) - \frac {1}{2} f _ {1} (u) d u. +$$ + +Since we are given that in the segment $[x, h_2]$ , $g < \frac{1}{2}$ , then it follows that $\forall u, f_0(u) - \frac{1}{2} f_1(u) > 0$ , and therefore the integral must be positive and hence $U_{[a,h]}(h_2|h) - U_{[a,h]}(x|h) > 0$ . + +Using the helpful claims, we can see that $BR_{[a,h]}(h) \in \{a,h\} \cup P_+^{-1}(1/2)$ : + +Let $h_1 \notin \{a, h\} \cup P_+^{-1}(1/2)$ . + +Case $1 - g(h_{1}) > \frac{1}{2}$ + +Let $(x,y) \subseteq [a,h]$ be the largest consecutive interval that includes $h_1$ such that $\forall h' \in (x,y) \to g(h') > \frac{1}{2}$ . Since $f_0, f_1$ are continuous, then we know $g$ is continuous. Therefore, either $g(x) = \frac{1}{2}$ and $g'(x) > 0$ , or $x = a$ . From Helpful claim 3, we receive that $U_{[a,h]}(x|h) > U_{[a,h]}(h_1|h)$ , and therefore $h_1$ cannot be a best response. + +Case 2 - $g(h_1) < \frac{1}{2}$ : + +Let $(x,y)\subseteq [a,h]$ be the largest consecutive interval that includes $h_1$ such that $\forall h^{\prime}\in (x,y)\to g(h^{\prime}) < \frac{1}{2}$ . Since $f_{0},f_{1}$ are continuous, then we know $g$ is continuous. Therefore, either $g(y) = \frac{1}{2}$ and $g^{\prime}(x) > 0$ , or $y = h$ . From Helpful claim 4, we receive that $U_{[a,h]}(y|h) > U_{[a,h]}(h_1|h)$ , and therefore $h_1$ cannot be a best response. + +We define similar claims to calculate the set of possible best responses in $[h, b]$ : + +Helpful claim 5. Let $(h_1, h_2)$ be any open interval in $[h, b]$ such that $\forall x \in (h_1, h_2)$ it holds that $g(x) > 2$ . + +Then $\forall x\in (h_1,h_2]\to U_{[h,b]}(h_1|h) > U_{[a,h]}(x|h)$ . + +Proof. We will show that $U_{[h,b]}(h_1|h) - U_{[h,b]}(x|h) > 0$ : + +Let $x \in (h_1, h_2]$ . We will compare the market shares of $x$ and $h_1$ : + +$$ +U _ {[ h, b ]} (h _ {1} | h) - U _ {[ h, b ]} (x | h) = \int_ {h _ {1}} ^ {x} \frac {1}{2} f _ {1} (u) - f _ {0} (u) d u. +$$ + +Since we are given that in the segment $[x, h_2]$ , $g > 2$ , then it follows that $\forall u, \frac{1}{2} f_1(u) - f_0(u) > 0$ , and therefore the integral must be positive and hence $U_{[h,b]}(h_1|h) - U_{[h,b]}(x|h) > 0$ . + +Helpful claim 6. Let $(h_1, h_2)$ be any open interval in $[h, b]$ such that $\forall x \in (h_1, h_2)$ it holds that $g(x) < 2$ . + +Then $\forall x\in [h_1,h_2)\to U_{[a,h]}(h_2|h) > U_{[a,h]}(x|h)$ . + +Proof. We will show that $U_{[h,b]}(h_2|h) - U_{[h,b]}(x|h) > 0$ : + +Let $x \in (h_1, h_2]$ . We will compare the market shares of $x$ and $h_1$ : + +$$ +U _ {[ h, b ]} (h _ {2} | h) - U _ {[ h, b ]} (x | h) = \int_ {x} ^ {h _ {2}} f _ {0} (u) - \frac {1}{2} f _ {1} (u) d u. +$$ + +Since we are given that in the segment $[x, h_2]$ , $g < 2$ , then it follows that $\forall u, f_0(u) - \frac{1}{2} f_1(u) > 0$ , and therefore the integral must be positive and hence $U_{[h,b]}(h_2|h) - U_{[h,b]}(x|h) > 0$ . + +![](images/1d5fb979fea4f52219eec14040398244b84438b5d3174c39f95bb11b710573ad.jpg) + +Using the helpful claims, we can see that $BR_{[h,b]} \in \{h,b\} \cup P_+^{-1}(2)$ : + +Let $h_1 \notin \{b\} \cup P_+^{-1}(2)$ . + +Case $1 - g(h_{1}) > 2$ + +Let $(x,y)\subseteq [a,b]$ be the largest consecutive interval that includes $h_1$ such that $\forall h^{\prime}\in (x,y)\to g(h^{\prime}) > 2$ . Since $f_{0},f_{1}$ are continuous, then we know $g$ is continuous. Therefore, either $g(x) = 2$ and $g^{\prime}(x) > 0$ , or $x = a$ . From Helpful claim 5, we receive that $U_{[a,h]}(x|h) > U_{[a,h]}(h_1|h)$ , and therefore $h_1$ cannot be a best response. + +Case 2 $-g(h_{1}) < 2$ : + +Let $(x,y)\subseteq [h,b]$ be the largest consecutive interval that includes $h_1$ such that $\forall h^{\prime}\in (x,y)\to g(h^{\prime}) < 2$ . Since $f_{0},f_{1}$ are continuous, then we know $g$ is continuous. Therefore, either $g(y) = 2$ and $g^{\prime}(x) > 0$ , or $y = b$ . From Helpful claim 5, we receive that $U_{[a,h]}(y|h) > U_{[a,h]}(h_1|h)$ , and therefore $h_1$ cannot be a best response. + +![](images/250ab21611a31bb88a475b2ef6cf39ccacae75676c2e51dfea6e2b461b0c348c.jpg) + +# Proposition 3 (Convergence after 1 round). + +Proof. Let $h$ be any starting classifier. + +At timestep $t = 0$ , we assume both players are at $h$ . + +At timestep $t = 1$ , player i plays $h_i^1 = BR(h)$ , and player j plays $h_j^1 = BR(h_1^1)$ . + +Let $h_{min} = \min \{h_i^1, h_j^1\}$ , $h_{max} = \max \{h_i^1, h_j^1\}$ . + +Firstly, we will argue that there exists an optimal-accuracy classifier $h_{opt}$ such that $h_{opt} \in [h_{min}, h_{max}]$ : + +Assume for the sake of contradiction that this isn't the case. Then there must exist some $h_{opt}$ either to the left of $h_{min}$ or to the right of $h_{max}$ . Let's assume w.l.o.g that there exists some $h_{opt} > h_{max}$ . Then $\mu(h_{opt}|h_{min}) > \mu(h_{max}|h_{min})$ : $a_{opt} > a_{max}$ by definition, and $\delta_{opt,min} > \delta_{max,min}$ , since when $h_{min} < h_{max} < h_{opt}$ , then $\delta_{max,min} \subset \delta_{opt,min}$ .9 + +Therefore, exists some $h_{opt} \in [h_{min}, h_{max}]$ . + +We now argue that $(h_i^1, h_j^1)$ is a PNE. + +Assume without loss of generality $h_i^1 < h_{opt}$ . This generalization is without loss since we are proving a best-response equilibrium symmetrically for both thresholds, so it does not matter which player is on which side of $h_{opt}$ . + +From the proof of Theorem 3, we know that $h_i^1 =$ ________ argmax ________ $U(h|h_{opt})$ . + +$$ +h \in \{a, h _ {o p t}, P _ {+} ^ {- 1} (1 / 2) \} +$$ + +[if $h_i^1 = h_{opt}$ we are done.] + +We know then that $h_j^1 \geq h_{opt}$ . + +Assume for the sake of contradiction that $h_j^1 < h_{opt}$ + +Then $\delta_{h_{opt}}(h_i^1) > \delta_{h_j^1}(h_i^1)$ , and from the optimality of $h_{opt}$ : $a_{opt} \geq a_{h_j^1}$ , and therefore $U(h_{opt}|h_i^1) > U(h_j^1|h_i^1)$ , contradiction to $h_j^1$ being a best-response. + +Now, $h_j^1 \geq h_{opt} > h_i^1$ . + +We will argue $h_i^1$ is a best-response to $h_j^1$ : + +$\forall h \in (h_{opt}, h_j^1]$ , the utility of $h_{opt}$ is greater, similarly to how was argued above. + +$\forall h < h_{opt}$ , if $h_i^1$ is a best-response to $h_{opt}$ , then it must also be a best-response to $h_j^1$ , since the accuracy stays the same and the discrepancy grows in an equal amount for all classifiers $h < h_{opt}$ . + +Therefore, both classifiers $h_i^1$ , $h_j^1$ are best responses to each other and therefore are a PNE. + +# Proposition 4 ("I improve, you improve"). + +Proof. From the proof of convergence in Proposition 3, we receive that in all threshold games, the players go to either side of an optimal classifier $h_{opt}$ . + +Assume that player $i$ moved to as an initial best-response $h_i^1$ to some $h^{opt}$ . Then player $j$ 's best-response $h_j^1$ is such that $h_{opt}$ is between $h_i^1$ and $h_j^1$ . Since $h_j^1$ is a BR, we know the market share of player $j$ increases (weakly). + +For player $i$ , from Proposition 1, $\mu_{i} = \frac{1}{2}(a_{i} + \delta_{ij})$ . + +$a_{i}$ remains the same, but $\delta_{ij}$ increase because $h_j^1$ went further away to the other side of $h_{opt}$ , and as explained in the proof of Proposition 3, $\delta_{h_i^1,opt} \subset \delta_{h_i^1,h_j^1}$ . + +Therefore $\mu_{i}$ increases as well. + +# Proposition 5 (Market share increases during competition). + +Proof. Assume the players started from $h^0$ : + +$$ +\mu (h ^ {0} | h ^ {0}) = \frac {1}{2} a ^ {0} +$$ + +Let $(h_1, h_2)$ be anyt equilibrium. + +$$ +\mu \left(h _ {1} \mid h _ {2}\right) = \frac {1}{2} \left(a _ {1} + \delta_ {1 2}\right) +$$ + +We will prove $a_1 + \delta_{12} \geq a^0$ : + +Assume $a_1 + \delta_{12} < a^0$ + +Then $a^0 + \delta_{h^{0,2}} > a_1 + \delta_{12}$ , contradiction to $h_1$ being a best-response to $h_2$ . + +Corollary 2 (Welfare increases during competition). This is immediate from Proposition 5 since $SW = \sum_{i} \mu_{i}$ . + +# Proposition 6 + +Proof. Let $h_1, h_2$ be any PNE. + +Assume for the sake of contradiction that $\mu (h_1|h_2) > 2\cdot \mu (h_2|h_1)$ + +From Proposition 1 we receive that $\mu (h_2|h_1) = \frac{1}{2} (a_2 + \delta_{21})$ + +We will show that $\mu (h_1|h_1) = \frac{1}{2} a_1 > \frac{1}{2} (a_2 + \delta_{21}) = \mu (h_2|h_1)$ : + +W know that $\mu (h_1|h_2) > 2\cdot \mu (h_2|h_1)\Rightarrow a_1 + \delta_{12} > 2\cdot (a_2 + \delta_{21})$ + +We also know $\delta_{12} \leq a_1$ , by definition of partial discrepancy. + +Therefore $a_1 + a_1 \geq a_1 + \delta_{12} > 2 \cdot (a_2 + \delta_{21})$ + +And so: $a_1 > a_2 + \delta_{21} \Rightarrow \mu(h_1|h_1) > \mu(h_2|h_1)$ , contradiction to $(h_1, h_2)$ being a PNE. + +# B. Additional theoretical results + +# B.1. Characterization of our problem setting as a congestion game. + +In Section 3, we mentioned that our problem setting is proven to have a PNE, a result shown by (Ben-Porat & Tennenholtz, 2019) through the use of an exact potential function. Additionally, (Monderer & Shapley, 1996) show that every potential game is isomorphic to some congestion game; this connection however is not always readily evident. We show here the exact reduction of our problem setting to a congestion game, and highlight that the cost function is negative, which may be counterintuitive to more classic settings of congestion games. + +Observation 3. Our problem setting is reduced to the congestion game $(N,M,(H_i)_{i\in N},(c_j)_{j\in M})$ Where: + +- $N$ is the number of players +- $M$ is the samples in the training set upon which the players want to gain market share +- $H_{i}$ is the hypothesis class available to player $i$ +- $c_{j}(k) = -\frac{1}{k}$ is the cost function assigned to each sample, where $k$ is the number of companies accurate on consumer $j$ . + +Proof. Firstly, we will show that the game that is defined above is indeed a congestion game. We can observe this almost immediately, as the cost function (while negative) is monotone increasing with $n_j$ , and the cost is per-sample (equal for each player). + +Additionally, the hypothesis class $H_{i}$ has a one-to-one function $a: H \to \mathbb{P}(M)$ which is $a(h) = \{(x,y) \in M : h(x) = y\}$ . Therefore, each strategy $h$ is equivalent to the strategy $a(h)$ and this is a subset of the facilities $M$ . + +From the game that is defined, we receive a potential function $\Phi$ such that $\forall i$ , $\Delta \Phi = \Delta C_{i}$ . + +The potential function is: $\Phi (\vec{h}) = \sum_{j = 1}^{m}\sum_{k = 1}^{n_j}c_j(k)$ + +(For each sample, we take the sum of $c(1), \ldots, c(n_j)$ , and since $c$ is monotone increasing, minimizing the potential means minimizing both players being accurate for the same classifier) + +Now, we will show that our problem setting reduces to this game by showing the equivalence between maximizing the player utility in the problem setting and minimizing the player cost in the above congestion game, meaning, $\forall i$ , $\Delta U_i = -\Delta C_i$ . + +Let $s_i^k$ be the number of samples that player $i$ is accurate on along with $k - 1$ other players. + +We observe that + +$$ +C _ {i} (\vec {h}) = \sum_ {j \in a _ {i} (h _ {i})} c _ {j} (n _ {j} (\vec {h})) = \sum_ {k = 1} ^ {n} s _ {i} ^ {k} \cdot c (k) = - \sum_ {k = 1} ^ {n} s _ {i} ^ {k} \cdot \frac {1}{k} = - U _ {i} (\vec {h}) +$$ + +(where the middle equality comes from rearranging the samples in bins of how many other players were accurate, and and then the cost is constant in that bin). + +# C. Experimental details + +# C.1. Data details + +All of the experiments on real data were studied on 3 datasets: compas-arrest, compas-violent, and adult. The compas datasets originated from studies of recidivism in the United States (Angwin et al., 2016), and are used to predict if a criminal will be rearrested for general crimes and violent crimes, respectively. The adult dataset is used to predict whether the an individual's income exceeds $50K. + +# Preprocessing Details: + +- Adult: The adult dataset was imported in python through the `uciml` library. All of the categorical features were one-hot encoded, and numerical features remain unprocessed. To enable a balanced learning task, SMOTE resampling was + +applied from the imblearn package to attain a $50\%$ positive class ratio. After the above preprocessing, 10,000 samples were chosen randomly, resulting in a dataset with $n = 10,000$ samples and $d = 100$ features. + +- COMPAS-Arrest/Violent: The COMPAS-Arrest dataset was preprocessed for analysis by Marx et al. (2020), and a copy of their csv files are included in their code. The csv files can be found at : + +https://github.com/charliemarx/pmtools/tree/master/data. + +Both datasets contain $d = 21$ preprocessed binary (previously one-hot encoded) features. The COMPAS-Arrest dataset contains $n = 6, 172$ samples and has a positive class ratio of $45.5\%$ . + +The COMPAS-Violent dataset also originally had 6,172 samples, however the positive ratio was $88.8\%$ . Therefore SMOTE upsampling was applied to the negative class to bring the positive ratio to $50\%$ . The total number of samples for which we use COMPAS-Violent is then $n = 10,960$ . + +# C.2. Model Class details + +For our empirical analysis, we analyzed results of the experiments with 3 model class variants that were used as the effective strategy space of the service providers. We note that since the objective of this work is to understand the ability of providers to learn based on the importance of the samples, we kept the hyperparameter tuning minimal, so as not to forcefully overfit the data. + +# 1. Linear SVM: + +- Hyperparameters: The regularization parameter $C = 1.0$ . Other hyperparameters were left as default. +- Hyperparameter tuning was performed on the values of $C$ , but we observed no significant difference in the ability of providers to best-respond. +- The model was implemented using the LinearSVC class from the sklearn package. +- sample weights from our method were passed using the sample weight parameter of the fit method. + +# 2. XGboost: + +- Hyperparameters: + +- Learning rate: 0.3 +- Max tree depth: 6 +- all other hyperparameters remained the default, in particular performing row and column subsampling of 1. + +- the loss metric used for boosting is log-loss +- the model was implemented using the XGBoost classifier class from the xgboost package +- We note that some basic hyperparameter tuning was performed using a grid search, but default values yielded satisfactory results. + +# 3. Random Forest: + +- Hyperparameters: + +Number of estimators: 10 +- Max tree depth: the default, meaning all nodes were expanded until all of the leaves are pure or contain a single sample. +- all other hyperparameters remained the default. + +- the loss metric used for boosting is log-loss +- the model was implemented using the RandomForestClassifier class from the sklearn package +- Hyperparameters were minimally tuned, and the default values were primarily used. + +# C.3. General implementation details + +Test and validation set. For all experiments, the dataset was split into training, validation, and test sets. The test set comprised $20\%$ of the data and was held out for final performance evaluation. The validation set, also comprising $20\%$ of the data, was used for hyperparameter tuning when applicable. In cases where no hyperparameter tuning was performed, the validation set was not utilized, and so only the training and test sets were used. + +Experiment Splits. To ensure integrity and mitigate the effect of random variations in the data, each experiment was conducted over 10 random splits of the dataset. For each split, the data was shuffled and divided into training, validation, and test sets according to the above proportions. The reported results in the following sections include standard errors calculated across these 10 splits, providing an estimate of variability in the model performance. + +Code. All of our code is implemented in Python. All of our experiments are reproducible and attached as supplementary material. + +Hardware. All experiments were run in the PyCharm IDE on a single MacBook Pro laptop, with 16GB of RAM, and M2 processor, and with no GPU support. However, the experiments to create the table metrics were cumbersome on the IDE, and so the PyCharm heap size was raised to 8K MegaBytes in order to enlarge the stack. The total runtime for all the results takes roughly 12 minutes. + +# D. Additional experimental results + +# D.1. Main results for additional settings + +In this appendix we showcase additional insights from our main results when tested on additional model classes. + +Table 3: XGboost performance + +
AdultCOMPAS-arrestCOMPAS-violent
min μmax μHHIwelfaremin μmax μHHIwelfaremin μmax μHHIwelfare
# providers2+1.1%+2.1%+3.2%+1.6%+20.5%+39.0%+69.3%+29.7%+26.7%+54.6%+100.0%+40.7%
3+1.7%+3.3%+5.2%+2.6%+34.5%+57.8%+105.8%+43.0%+35.7%+68.9%+120.5%+47.7%
4+2.4%+3.8%+6.2%+3.1%+35.3%+66.3%+116.1%+46.4%+36.3%+66.1%+125.8%+49.8%
5+2.4%+4.6%+7.2%+3.5%+37.2%+78.0%+122.0%+48.1%+43.3%+68.6%+128.6%+50.8%
6+2.0%+5.0%+7.2%+3.5%+40.2%+73.1%+124.0%+49.1%+43.4%+69.3%+130.8%+51.6%
+ +XGboost Table 3 shows the learning performance of the service providers when using XGBoost as the model class for training and inference. The details of the Xgboost implementation and hyperparameters can be found in Appendix C.2. A comparison of interest is the general improvements of the players relative to the Linear model class. We can notice that the welfare improvement, which is equal to the total market share of all players, is significantly lower for both the Adult and COMPAS-ARREST dataset. This does not indicate that the total welfare is lower, but rather that due to the increased expressiveness of the XGboost model, the starting welfare began at a higher value. + +Another point of interest is how the HHI (the measure of imbalance in market share between the providers) persists across model classes, regardless of expressivity. This further highlights the importance of taking into account the market dynamics and the order of play when competing with other providers. + +Table 4: Random forest performance + +
AdultCOMPAS-arrestCOMPAS-violent
min μmax μHHIwelfaremin μmax μHHIwelfaremin μmax μHHIwelfare
# providers2+2.9%+3.9%+6.9%+3.4%+20.6%+36.1%+65.3%+28.3%+25.7%+53.0%+96.1%+39.3%
3+4.1%+5.8%+10.1%+4.9%+30.9%+58.7%+98.9%+40.3%+34.3%+71.8%+118.9%+46.9%
4+4.5%+6.5%+11.3%+5.5%+33.0%+70.5%+111.8%+44.7%+33.5%+70.6%+124.5%+49.2%
5+4.5%+7.5%+12.5%+6.1%+34.2%+81.0%+117.0%+46.0%+41.7%+75.1%+128.3%+50.5%
6+5.2%+8.0%+13.5%+6.5%+37.4%+78.2%+119.5%+47.3%+38.6%+75.7%+130.3%+51.2%
+ +Random Forest In a similar manner, Table 4 presents the results on competition where the providers are employing a Random Forest model, whose details can be found in Appendix C.2. We can observe that the results resemble those of the XGboost model class, which can be expected due to the similarity in nature of all Decision Tree models. + +Standard errors of experiments As mentioned in Appendix C, each experiment was run over 10 train-test splits and the metric values were averaged out over those splits. Table 5 portrays, for each metric, the maximum variation of the standard error among the three model classes analyzed. We note that all of the errors are below $5\%$ , and most of the errors are well below $3\%$ . + +Table 5: Max standard errors of experiments across all model classes + +
AdultCOMPAS-arrestCOMPAS-violent
min μmax μHHIwelfaremin μmax μHHIwelfaremin μmax μHHIwelfare
# providers2±1.9%±4.4%±2.1%±2.6%±1.0%±2.6%±1.2%±1.3%±1.0%±2.9%±1.4%±1.1%
3±0.8%±1.9%±1.0%±2.0%±1.2%±3.5%±0.8%±2.7%±0.8%±2.5%±0.8%±2.3%
4±0.7%±2.0%±2.1%±4.2%±0.9%±2.9%±0.7%±3.2%±0.7%±2.2%±1.2%±3.2%
5±0.9%±2.2%±1.1%±3.2%±1.0%±3.5%±0.7%±4.4%±0.7%±2.2%±0.8%±3.6%
6±0.8%±1.9%±2.4%±3.4%±1.0%±3.2%±0.8%±4.4%±0.6%±2.1%±1.0%±2.7%
+ +# D.2. Competition Dynamics + +Market Share In order to provide a more comprehensive analysis of how the market shares of the providers move through the best responses in the competition, Figure 5 shows, for each number of players competing for market share, the shifts in market share of each provider based on their positions in the game (order of play). + +We can observe a few key points: + +1. Market Stability. Across all variations of the number of players, the market shares of the player converge almost immediately to their final respective values. This convergence occurs even before every player offered a single best-response, i.e., by the end of Round 1. +2. Order of play. In line with what is expressed in Section 6.2, The order of play when offering a best-response is important, and varies as a function of the number of players. For $n = 2$ providers, playing second can offer a significant competitive advantage. When shifting to markets with $n \geq 3$ providers, however, we observe a significant advantage to the 1st mover, as discussed in Section 6.2. +3. General market share trend. Regardless of the order of play, and as alluded to in Table 3, the market share rises for all players, which supports the empirical claim that providers that are competing are in a way collaborating to figure out how optimally divide the market. +4. Generalization to an unseen test set. The performance on the unseen test set closely mirrors that observed during training, highlighting the robustness of the competition method. The similarity in performance demonstrates that the model can calculate a best-response without overfitting, and underscores the ability of the framework to maintain accuracy in line with that expected from traditional ML methods. + +# D.3. Welfare + +Welfare behaviors in additional settings. Figure 6 shows the social welfare across the model classes described in Appendix C.2, namely LinearSVC, XGBoost, and RandomForest. The test welfare are shown for the COMPAS-arrest dataset, and are portrayed for each model class and each game varying the nubmer of players. We can see that, as in Section 6.2, the welfare gets maximized very early for the Linear model class, but hits a non-maximal plateau for the Decision Trees. This is another example of the non-monotonic nature of social welfare: in many cases providers having less expressiveness in their models will in fact benefit the consumers. + +Welfare across asymmetry in data. The social welfare trends across different levels of data representations can also behave in a surprising manner, as shown in Section 6.2 and explained in great detail by (Jagadeesan et al., 2024). As a portrayal of this phenomenon across different competition settings, Figure 7 plots the social welfare across experiments of 2,3, and 4 players, respectively. We can observe, that while no as blatant as with $n = 2$ providers, the general trend across all player formats is that the social welfare increases as an inverse proportion to the richness of the data representations. + +![](images/c78cd550e897acd041751634fc916c1fcacf58a1d284c22995f8b82f8e8d58c0.jpg) +Figure 5: Competition Dynamics with XGboost models on the COMPAS-Arrest dataset. Utilities of individual players are shown for Train (Left) and Test (Right), in markets involving 2,3,4,5,and 6 players (Top to Bottom) + +# D.4. Synthetic Data + +In Section 6.1, we showed an example of the chicken dynamic between asymmetrical class-conditioned gaussians. Additionally, we performed an overlap analysis between symmetric gaussians, where for each measure of distance between the means, or overlap, we calculated the best-response thresholds and performance metrics. Figure 8 (Left) shows the above analysis on asymmetric gaussians, namely $\sigma_{-1} = 2$ , $\sigma_{+1} = 1$ . As in Section 6.1, at each overlap the thresholds of the players are initialized at $h_1^0 = h_2^0 = h_{opt}$ , where $h_{opt}$ is the naively optimal classifier that maximizes accuracy on the distributions. Here too, and as is guaranteed by Theorem 3, the best-response dynamics converge after just one round. In this case of asymmetry between the class-conditioned Gaussians, we notice a distinctly different behavior. while $h_1$ remains in the same proximity to $h_{opt}$ as in the symmetric case, threshold $h_2$ has a "tipping point", where it suddenly jumps to the far end of both distributions. From the accuracy graph we can also see a sudden drop in accuracy coming from model $h_2$ . In regards to the market share, however, the provider that gets a spike in market share is in fact the one who played $h_1$ and remains close to the optimal, while the market share of $h_2$ simply shows a gradual increase, with no reference to a tipping point. + +![](images/8924d49ea8e7e9dda42c8fa0d6a5a9b4a52acb928c250ef94e9d0e1919daf834.jpg) +Figure 6: Social Welfares across model classes on the test set for the COMPAS arrest dataset. Each plot calculates the social welfare at each timestep and for each experiment that varies the number of players. + +This phenomenon is understandable when we look at Theorem 3, that states that the best-response may be at the far end of the distributions. This occurs when either of the values $g^{-1}(1/2), g^{-1}(2)$ stops existing, where $g(x) = \frac{f_1(x)}{f_0(x)}$ is the MLR function. In these cases, the left or right threshold (depending on which value of $g^{-1}$ disappears) will continue to gain by moving to the far end of the interval. This is precisely what is shown in Figure 8 (Right); at a certain overlap ( $\sim -1$ ), there is no threshold $h$ for which $g(h) = 2$ , and so the gain in discrepancy for $h_2$ will continue to outweigh the loss in accuracy, and $h_2$ ends up at the far right end. The market share of $h_1$ is then suddenly increased, since while its accuracy remains the same, the discrepancy from $h_2$ is now significantly greater. + +# D.5. Asymmetrical power between players + +Another interesting question we can ask from the perspective of the learners/providers is, if a provider were to invest cost and effort to gain better data, how would this help them in competition? In naïve settings, i.e. single-provider markets, the answer to this is straightforward: more data = better accuracy. In accuracy markets, however, the specialization needs to be considered as well, and as we have seen (Section 6.2), the behavior of the market when altering the data quality can be counter-intuitive. To measure the gain to be had when improving data, we ran experiments where one of the providers has access to more features than its counterpart/s. For each of 2 possible move positions (1st or 2nd), two metrics were considered: + +1) The provider's gain in market share over himself if he weren't to improve his data (i.e. the data is identical for all parties), which measures the provider's marginal gain from improving data +2) The provider's gain in $\Delta \mu$ from the next-best provider versus the setting where he didn't improve his data, which measures + +![](images/5dddd6dbe6d9230c9437f9d485730fc585512e1a9e7519914485c4cde7ef115e.jpg) +Social welfare across different number of features COMPAS arrest dataset +Figure 7: Comparison of social welfare on the COMPAS arrest test set when varying the number of features available to use for model training (and inference). + +![](images/31380cd885d3ee49c55c6554fafb36bed06daae8ff01255a4169bffbea8b490e.jpg) +Figure 8: Dynamics of the best-response game on threshold classifiers with asymmetric gaussians. The metrics at each level of proximity between the Gaussians are shown (Left). The thresholds at the "tipping point" (Right) can be seen to be very far apart. The hatches represent the sectors of exclusivity. + +![](images/55d039faa07ad5deb759661b396cab1ff2e4387da73a30532d81f8cc5d2816b8.jpg) + +the impact of the data investment on the concentration of the market as a whole. + +Table 6 shows the above metrics for markets with 2,3, and 4 providers, and for various possibilities of data improvement. + +We can observe a few interesting trends: + +1. $\Delta \mu$ from regular setting. One of our central insights from Section 6.2 is that when $n = 2$ providers, moving second is beneficial, and when $n > 2$ , the opposite is true, and moving first is better. In the case of investing in better data, and when comparing the provider's market gain vs. himself in a regular setting, we see an inverse effect. + +For $n = 2$ , better data creates market gains only when you are the first mover, as in certain lopsided markets the gain is $>12\%$ . For example, in the case where the better-data provider has 15 features, and the other providers have 3 features, we can observe a $12\%$ gain, which measures the benefit of investing in the additional 12 features. + +When the provider moves second, however, investing in more data does not translate to higher market share, in fact the provider loses significant market share, and would have been better off retaining the same primitive data as the other competitors. This phenomenon gets exacerbated further the more the provider invests in better data; For example, if one were to utilize all 21 features of the dataset when the competitors have access to only 9 features, the advantaged provider would see a $-12.35\%$ loss in market share. + +For markets where $n > 2$ , it is the other way around. When the advantaged provider moves first, he may see a decrease in market share from the regular setting where he didn't gain extra data; When moving 2nd, the data gain proves helpful. This stands in polar contrast to the case where $n = 2$ , and perhaps understandably so: It seems that wherever the providers have an initial advantage when the data is symmetrical, they would lose that advantage when investing in more data, perhaps hinting at the idea of decreasing marginal returns in investments. + +2. $\Delta \mu$ from the next-best provider. When comparing the difference across data-variation experiments in market shares between providers, we notice that the trend behaves similarly to how we have seen in the order-of-play results of Section 6.2. We can observe that, interestingly, if a provider improved his absolute market-share relative to himself, this doesn't translate to the provider improving his market share relative to others. Take for example the cases where $n > 2$ and the provider moves 2nd. As stated above and as can be seen in Table 6, the added data advantage in this setting helps the provider gain in absolute market share. The market gain relative to the other providers, however, has an inverse result, and in many cases the competitors end up with a better overall utility. This tells us that in these settings, when the advantaged provider goes second, the total welfare (as the sum of individual market shares) increases. + +Table 6: Asymmetrical power between players. Results are shown for markets with 2,3,and 4 providers, respectively. Rows are shown for each choice of number of features for the provider with better data,and the columns for the number of features of the other providers. Table results are shown for using XGboost trees on the compas-arrest dataset, that contains 21 features in total. +# features of the worse data + +
# providersmove position# features: better dataΔμ from regular settingΔμ from next best provider
369121518369121518
2first63.20%-14.37%
98.96%5.34%-1.17%-3.97%
1212.82%9.41%4.76%14.04%12.21%1.01%
1512.66%9.15%4.99%0.48%14.48%12.41%2.17%-10.96%
1811.85%8.76%5.43%0.60%-0.33%13.46%11.86%3.69%-9.43%-10.63%
2110.10%7.01%2.53%-3.44%-3.42%-3.11%9.98%8.02%-1.16%-14.89%-14.12%-13.96%
second6-4.98%20.32%
9-8.78%-4.38%17.55%14.03%
12-13.36%-5.26%-8.40%15.92%17.19%5.15%
15-13.95%-5.62%-9.91%-0.33%15.91%17.74%3.98%12.64%
18-14.55%-6.17%-10.28%-1.32%-0.81%14.88%17.09%3.53%11.06%10.35%
21-16.46%-8.38%-12.35%-3.29%-2.97%-2.27%9.92%13.09%-0.89%5.76%5.74%7.20%
3first6-0.48%51.86%
90.25%1.93%57.14%55.02%
12-6.79%-2.88%-1.58%40.07%46.39%30.02%
15-4.65%-3.75%-1.33%-0.41%45.18%44.24%31.88%18.26%
18-3.09%-2.55%-1.53%-0.99%-0.65%51.18%47.61%31.82%17.21%18.85%
21-10.45%-7.13%-3.11%-2.65%-2.56%-1.44%30.02%37.01%30.14%16.38%17.40%17.42%
second61.43%-27.44%
99.68%9.78%-11.53%-8.80%
1215.39%12.55%5.81%-7.08%-6.05%-7.29%
1515.10%12.33%5.51%0.47%-8.34%-7.49%-8.85%-15.49%
1814.97%12.24%5.40%0.84%-0.25%-8.39%-7.48%-9.09%-14.97%-16.66%
2114.63%11.25%5.74%-0.04%-0.11%-0.42%-7.84%-7.53%-8.84%-13.25%-13.49%-12.83%
4first61.09%24.08%
9-12.59%5.66%-8.55%13.93%
12-8.11%3.04%0.82%-1.02%-0.21%16.63%
15-7.90%2.01%-3.05%-0.67%-0.51%-1.72%9.94%16.75%
18-8.18%2.04%-2.28%-0.90%-0.60%-1.00%-1.90%11.50%16.96%15.68%
21-7.66%1.64%-3.96%-2.22%-2.36%-1.32%-0.35%-2.98%8.00%12.08%10.02%12.10%
second66.64%-11.54%
914.80%11.58%-11.82%-0.20%
1221.42%16.05%9.82%-4.49%-3.83%-9.99%
1521.13%15.91%9.61%0.00%-4.75%-3.78%-10.45%-16.16%
1821.03%15.72%9.24%0.10%0.46%-4.97%-4.63%-10.51%-16.32%-15.31%
2119.48%13.98%8.23%-0.69%-0.73%-0.35%-7.57%-6.54%-13.06%-18.51%-18.15%-17.31%
\ No newline at end of file diff --git a/amarketforaccuracyclassificationundercompetition/images.zip b/amarketforaccuracyclassificationundercompetition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..af27102d5b513890b62599d3821a0441f3c059f7 --- /dev/null +++ b/amarketforaccuracyclassificationundercompetition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18609a05ddb5f1b6e458891b4936ea4c6c661c18f73969e8c0f654698f39d8a4 +size 982282 diff --git a/amarketforaccuracyclassificationundercompetition/layout.json b/amarketforaccuracyclassificationundercompetition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5c0b90e82e4c158eace07683c54e393e888310c8 --- /dev/null +++ b/amarketforaccuracyclassificationundercompetition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3af4d155b40553a37925d351f29c98fc09db780e3b0d77892faac2105487bbe4 +size 1297286 diff --git a/amathematicalframeworkforaihumanintegrationinwork/86ac7cff-a0f9-45c1-b258-acb4af87d426_content_list.json b/amathematicalframeworkforaihumanintegrationinwork/86ac7cff-a0f9-45c1-b258-acb4af87d426_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ba8c04ba04a6259a53ecd16fb82fd386408d8772 --- /dev/null +++ b/amathematicalframeworkforaihumanintegrationinwork/86ac7cff-a0f9-45c1-b258-acb4af87d426_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b793da3c8e855e7adacd0b3c41e59937ba77417b4ef82688fa1d4be0465478e0 +size 266474 diff --git a/amathematicalframeworkforaihumanintegrationinwork/86ac7cff-a0f9-45c1-b258-acb4af87d426_model.json b/amathematicalframeworkforaihumanintegrationinwork/86ac7cff-a0f9-45c1-b258-acb4af87d426_model.json new file mode 100644 index 0000000000000000000000000000000000000000..21eb56cb1bb0af5e6ba4bab5c66bc7671ecee8d0 --- /dev/null +++ b/amathematicalframeworkforaihumanintegrationinwork/86ac7cff-a0f9-45c1-b258-acb4af87d426_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ede8b581afa7528143e84db2898073b21b9ab6b34672a680b2b2f84fb98428a +size 321640 diff --git a/amathematicalframeworkforaihumanintegrationinwork/86ac7cff-a0f9-45c1-b258-acb4af87d426_origin.pdf b/amathematicalframeworkforaihumanintegrationinwork/86ac7cff-a0f9-45c1-b258-acb4af87d426_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..426252b16efeb4c1b9e8ed283cb656a7a0cfa20b --- /dev/null +++ b/amathematicalframeworkforaihumanintegrationinwork/86ac7cff-a0f9-45c1-b258-acb4af87d426_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dbcbedffcccbdaabc79e115966e6079539486e8c0e507096b87b40f7fd950834 +size 4626986 diff --git a/amathematicalframeworkforaihumanintegrationinwork/full.md b/amathematicalframeworkforaihumanintegrationinwork/full.md new file mode 100644 index 0000000000000000000000000000000000000000..06df403c7dc8ac51da3c682bb817c01faebfa061 --- /dev/null +++ b/amathematicalframeworkforaihumanintegrationinwork/full.md @@ -0,0 +1,1188 @@ +# A Mathematical Framework for AI-Human Integration in Work + +L. Elisa Celis $^{1}$ Lingxiao Huang $^{2}$ Nisheeth K. Vishnoi $^{1}$ + +# Abstract + +The rapid rise of Generative AI (GenAI) tools has sparked debate over their role in complementing or replacing human workers across job contexts. We present a mathematical framework that models jobs, workers, and worker-job fit, introducing a novel decomposition of skills into decision-level and action-level subskills to reflect the complementary strengths of humans and GenAI. We analyze how changes in subskill abilities affect job success, identifying conditions for sharp transitions in success probability. We also establish sufficient conditions under which combining workers with complementary subskills significantly outperforms relying on a single worker. This explains phenomena such as productivity compression, where GenAI assistance yields larger gains for lower-skilled workers. We demonstrate the framework's practicality using data from O*NET and Big-bench Lite, aligning real-world data with our model via subskill-division methods. Our results highlight when and how GenAI complements human skills, rather than replacing them. + +# 1. Introduction + +The rapid emergence of capabilities in Generative Artificial Intelligence (GenAI) has drawn global attention. Multimodal models like OpenAI's GPT-4 and DeepMind's Gemini seamlessly interpret and generate text and images, transforming tasks such as content creation, summarization, and contextual understanding (OpenAI, 2023; DeepMind, 2023). Similarly, models like OpenAI's Codex and GitHub Copilot show strong performance in code generation and debugging (OpenAI, 2024; Jaffe et al., 2024). Notably, GPT-4 scores on standardized tests, including SAT, GRE, and AP, are comparable to those of human test-takers (OpenAI, 2023). + +$^{1}$ Yale University, USA. $^{2}$ State Key Laboratory of Novel Software Technology, New Cornerstone Science Laboratory, Nanjing University, China. Correspondence to: Nisheeth K. Vishnoi . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +These advances have intensified focus on their implications for work and workers. Institutions such as the BBC (Annabelle Liang, 2024; Chris Vallance, 2023), the IMF (Cazzaniga et al.), and the World Economic Forum (Shine & Whiting, 2023), along with many researchers (Brynolfsson et al., 2023; Felten et al., 2023; Noy & Zhang, 2023; Agarwal et al., 2023; Angelova et al., 2023; Cabrera et al., 2023; Vaccaro et al., 2024; Jaffe et al., 2024; Otis et al., 2024), have explored the evolving labor landscape. A growing view holds that GenAI may recompose, rather than eliminate, work. Autor (2024) argues that GenAI has the potential to enable middle-skill workers to take on tasks traditionally reserved for high-skill experts. Still, some see GenAI as a disruptive force: the IMF estimates that nearly $40\%$ of jobs could be affected, raising concerns about large-scale displacement (Cazzaniga et al.; Chris Vallance, 2023; Microsoft, 2023; Paradis, 2024; Kochhar, 2023). Others emphasize complementarity: GenAI tools can enhance human capabilities rather than replace them (Acemoglu & Johnson, 2023). Empirical studies show that such tools improve the performance of less experienced workers, narrowing the productivity gap with more skilled professionals (Brynolfsson et al., 2023; Noy & Zhang, 2023). This raises a central question: Do GenAI tools substitute for human workers—or enable them to succeed in new ways? + +Recent studies have empirically examined GenAI's impact on various aspects of work, including accuracy, productivity, and implementation cost (Agarwal et al., 2023; Brynjolfsson et al., 2023; Vaccaro et al., 2024; Jaffe et al., 2024; Klimnikin et al., 2024; Brodsky, 2024; Anthropic, 2023; Guo et al., 2025). Vaccaro et al. (2024), for example, analyzed 106 experiments comparing human-AI collaboration to human- or AI-only performance on job tasks. They found that while collaboration improves outcomes in content creation, it lags in decision-making, underscoring the nuanced ways GenAI complements human skills. Brynjolfsson et al. (2023) and Jaffe et al. (2024) studied GenAI integration in real-world workflows, showing measurable productivity gains. In one case, AI-assisted customer service agents resolved $14\%$ more issues per hour, suggesting that GenAI can amplify human efficiency. Other work has highlighted implementation barriers: studies such as Klimnikin et al. (2024); Brodsky (2024) identify hidden costs and operational challenges that hinder widespread GenAI adoption. + +This paper focuses on understanding the impact of GenAI on job accuracy. Addressing this requires modeling jobs, worker abilities (whether human or AI), and how these abilities relate to job performance. A key resource we draw on is the Occupational Information Network ( $O^{*}NET$ ) (U.S. Department of Labor, Employment and Training Administration, 2023), a comprehensive database maintained by the U.S. Department of Labor that provides standardized descriptions of thousands of jobs. For example, $O^{*}NET$ characterizes Computer Programmers by skills (e.g., Programming, Written Comprehension, Oral Expression), tasks (e.g., Correcting errors, Developing websites), and knowledge areas. Each skill is rated by importance and required proficiency—for instance, Writing might be rated 56/100 for importance and 46/100 for proficiency. While $O^{*}NET$ offers rich and structured data, it does not specify how tasks depend on skills, nor how to evaluate performance at the level of a skill, task, or job (see Section E for more detail). Recent work has begun to address these limitations using compositional and task-skill dependency models (Arora & Goyal, 2023; Okawa et al., 2023; Yu et al., 2024). + +Metrics for evaluating human workers include Key Performance Indicators (KPIs) (KPI.org, 2024), customer feedback, peer reviews, and productivity measures. For example, KPIs might assess a programmer's ability to fix a certain number of bugs within a set timeframe, while customer feedback evaluates the perceived quality of service. However, such metrics often conflate outcomes with underlying competencies, making it difficult to isolate a worker's ability on specific skills. In contrast, GenAI tools are typically evaluated using skill-specific benchmarks in areas such as coding, writing, and mathematical reasoning (Borji, 2022; Bubeck et al., 2023; bench authors, 2023; OpenAI, 2023; Abdin et al., 2024; Yu et al., 2024; Reid & Vempala, 2024; He et al., 2024). For instance, bench authors (2023) introduced the BIG-bench Lite (BBL) dataset, which evaluates 24 skills, including code generation, by comparing the performance of GenAI models and human workers (see Section E.2). One representative task, Automatic Debugging, tests whether a model can infer the state of a program given partial code—e.g., determining the value of a variable at a specific line without executing the program. + +While GenAI tools perform well on structured or repetitive tasks, they often struggle with skills that require contextual understanding, planning, or emotional intelligence (Bender et al., 2021; Arora & Goyal, 2023; Services, 2024; Mahowald et al., 2024). These limitations are compounded by noisy and narrowly scoped evaluations, making it difficult to draw reliable conclusions about performance (Miller, 2024; bench authors, 2023). Consider a company that sets a KPI target of fixing 20 bugs per week. If a programmer fixes 18, their score would be $18/20 = 90\%$ . But such metrics conflate distinct abilities: reasoning skills (e.g., diagnosing + +the root cause) and action skills (e.g., implementing the fix). This conflation obscures the underlying sources of success or failure, leading to biased or incomplete evaluations. In addition, evaluations are rarely standardized across settings, and lab-based assessments often fail to capture the broader skillsets required in real-world jobs (Microsoft, 2023; Vaccaro et al., 2024). In summary, significant challenges remain in evaluating human workers and GenAI tools: (i) The conflation of reasoning and action, leading to inaccurate performance attributions. (ii) The statistical noise inherent in limited-scope evaluations. (iii) The lack of standardization, creating inconsistencies across assessments. + +Our contributions. We introduce a mathematical framework to assess job accuracy by modeling jobs, workers, and success metrics. A key feature is the division of skills into two types of subskills: decision-level (problem solving) and action-level (solution execution) (Section 2). Skill difficulty is modeled on a continuum [0, 1], where 0 represents the easiest and 1 the hardest. Workers, whether human or AI, are characterized by ability profiles $(\alpha_{1},\alpha_{2})$ , representing decision- and action-level abilities. These profiles quantify a worker's capability for each skill $s\in [0,1]$ , incorporating variability through probability distributions. Jobs are modeled as collections of tasks, each requiring multiple skills. We define a job-success probability metric, combining error rates across skills and tasks to evaluate overall performance (Equation (1)). This framework addresses challenges in evaluation by isolating abilities, accounting for noise, and providing a metric for accuracy. Our main results include: + +- Phase transitions: small changes in average ability can cause sharp jumps in job success (Theorem 3.2). +- Merging benefit: combining workers with complementary subskills yields superadditive gains (Theorem 3.3). +- Compression effect: our model explains the productivity compression observed by Brynjolfsson et al. (2023), where GenAI narrows the performance gap between low- and high-skilled workers (Corollary 3.4). +- Empirical validation: we apply our framework to real-world data from O*NET and BIG-bench Lite, aligning task descriptions and GenAI evaluations with subskill-based models (Section 4). +- Interventions and extensions: we explore upskilling strategies through ability/noise interventions (Section D.1), and extend our analysis to dependent subskills and worker combinations (Figures 3, 4.2). +- Bias and noise: we analyze how misestimated ability profiles distort evaluations (Section D.2). + +Our findings inform strategies for integrating GenAI into the workplace, including combining human and AI strengths, designing fairer evaluations, and supporting targeted upskilling. Additional related work is reviewed in Section A. + +# 2. Model + +The job model. We model a job as a collection of $m \geq 1$ tasks, where each task $T_{i}$ requires a subset of $n \geq 1$ skills. This induces a bipartite task-skill dependency graph where edges connect tasks to the skills they depend on (Figure 12), aligning with prior work (Arora & Goyal, 2023; Okawa et al., 2023; Yu et al., 2024). + +Each skill $j$ is decomposed into two subskills: a decision-level component (e.g., problem-solving, diagnosis) and an action-level component (e.g., execution, implementation), following distinctions made in cognitive and labor models (Licklider, 1960; Kahneman, 2011; Inga et al., 2023). For example, the skill "programming" involves both solving a problem (decision-level) and implementing a solution in code (action-level). This decomposition allows for more precise modeling of ability, especially for evaluating hybrid human-AI work. Adapting from O*NET, each skill $j \in [n]$ is associated with subskill difficulties $s_{j1}, s_{j2} \in [0,1]$ , where 0 indicates the easiest and 1 the hardest. These scores are used to index the worker's ability distributions. This representation mirrors the proficiency levels used in O*NET and simplifies the mathematical formulation; see Section E. + +The worker model. We model a worker by two ability profiles, $\alpha_{1}$ and $\alpha_{2}$ , which govern their decision-level and action-level subskills, respectively. Each profile maps a subskill difficulty $s\in [0,1]$ to a probability distribution over $[0,1]$ , from which a performance value is drawn, representing the worker's effectiveness on that subskill. This reflects the stochastic nature of skill performance (Sadeeq, 2023; Bubeck et al., 2023). We consider ability profiles in which, for each subskill difficulty $s\in [0,1]$ , the worker has an average ability $E(s)$ , and their actual performance is modeled by adding a stochastic noise term $\varepsilon (s)$ . The resulting ability value is used to define the worker's distribution over outcomes for that subskill. + +We study two natural noise models: (i) Uniform noise: The noise term $\varepsilon(s)$ is sampled from a scaled uniform distribution: $\varepsilon(s) \sim \min\{E(s), 1 - E(s)\}$ . Unif[- $\sigma$ , $\sigma$ ], where $\sigma \in [0,1]$ controls the noise level. The scaling ensures that the perturbed value remains within the valid range [0,1]. This model provides a simple yet effective way to introduce bounded variability and is often used in our analysis. (ii) Truncated normal noise: Here, we model $\varepsilon(s)$ using a truncated normal distribution: $\varepsilon(s) \sim \mathrm{TrunN}(E(s), \sigma^2; 0,1)$ , where the mean is $E(s)$ , the variance is $\sigma^2$ , and the support is clipped to remain within [0,1]. This model captures fluctuations consistent with human performance variability and is aligned with empirical measurements of GenAI tool behavior (bench authors, 2023) (see Figure 9). + +We assume that the average ability function $E(s)$ , which maps subskill difficulty $s \in [0,1]$ to expected performance, + +is monotonically decreasing in $s$ . That is, workers are not expected to perform worse on easier subskills ( $s = 0$ denotes the easiest and $s = 1$ the hardest). + +Linear ability profile. A natural used form is the linear function: $E(s) \coloneqq c - (1 - a)s$ , for parameters $a, c \in [0,1]$ satisfying $a + c \geq 1$ . Here, $c$ represents the worker's maximum ability (attained at $s = 0$ ), and $1 - a$ is the rate at which ability decreases with difficulty. This profile aligns with evaluations of GenAI tools (Hendrycks et al., 2021; bench authors, 2023); see also Figure 11 and Section B.1 for Big-bench Lite analysis. As a special case, setting $a = 1$ yields a constant ability function $E(s) \equiv c$ , where the worker has uniform performance across all subskills. + +Polynomial ability profile. To model nonlinear improvements, we also consider the polynomial form: $E(s) = 1 - s^{\beta}$ , where $\beta \geq 0$ controls the sensitivity of ability to difficulty. Larger values of $\beta$ produce sharper gains in ability as $s \to 0$ , representing workers whose skills improve rapidly as tasks become easier. + +Note that nearby subskills (e.g., $s = 0.7$ and 0.8) yield similar values of $E(s)$ , reflecting the smoothness of the ability profile and inducing implicit correlations across adjacent subskills. Section B.1 provides additional visualizations of these profiles under uniform noise. Section B.2 shows that these profiles satisfy stochastic dominance (Definition B.1): for any fixed $s \in [0,1]$ and threshold $x \in [0,1]$ , the probability $\operatorname{Pr}_{X \sim \alpha(s)}[X \geq x]$ increases monotonically with the average ability. + +Measuring job-worker fit. To evaluate how well a worker fits a job, we define a sequence of aggregation functions that compute error rates at the subskill, skill, task, and job levels, based on the worker's ability profiles $(\alpha_{1},\alpha_{2})$ + +For each skill $j \in [n]$ , let $s_{j1}, s_{j2} \in [0,1]$ denote the difficulty levels of its decision-level and action-level subskills. We define the random subskill error rate as: $\zeta_{j\ell} := 1 - X$ , where $X \sim \alpha_{\ell}(s_{j\ell})$ , for $\ell \in \{1,2\}$ . That is, $\zeta_{j\ell}$ represents the probability of failure (or error rate) for the $\ell$ -th subskill of skill $j$ , drawn from the worker's ability distribution. + +To compute the error rate for skill $j$ , we apply a skill error function $h:[0,1]^2 \to [0,1]$ , which aggregates the two subskill error rates $\zeta_{j1}$ and $\zeta_{j2}$ . This gives the overall error rate for skill $j$ , combining both decision-level and action-level performance. We assume a common skill error function $h$ for all skills, typically chosen as the average $h(a,b) = \frac{a + b}{2}$ or the maximum $h(a,b) = \max \{a,b\}$ (KPI.org, 2024; Walker, 2023), both of which are monotonic. + +Similarly, to compute the error rate for a task $T_{i}$ , we apply a task error function $g:[0,1]^*\to [0,1]$ , which maps the error rates of the skills in $T_{i}$ to a task-level error: $g(\{h(\zeta_{j1},\zeta_{j2})\}_{j\in T_i})$ . + +Finally, we define a job error function $f:[0,1]^m \to [0,1]$ , which aggregates the task error rates into a single overall job error rate: $\operatorname{Err}(\zeta) := f(g(\{h(\zeta_{j1},\zeta_{j2})\}_{j\in T_1}),\ldots ,g(\{h(\zeta_{j1},\zeta_{j2})\}_{j\in T_m}))$ . + +In our empirical analysis (Section 4), we instantiate $g$ and $f$ as weighted averages, where the weights reflect the importance of individual skills and tasks. More generally, we assume that $h$ , $g$ , and $f$ are monotonic: improving subskill abilities cannot increase the resulting error rate. + +Given a threshold $\tau \in [0,1]$ , we say a job succeeds if the job error rate satisfies $\mathsf{Err}(\zeta) \leq \tau$ . The job success probability for a worker with profiles $(\alpha_{1},\alpha_{2})$ is then defined as: + +$$ +P \left(\alpha_ {1}, \alpha_ {2}, h, g, f, \tau\right) := \Pr_ {\zeta j \ell} [ \operatorname {E r r} (\zeta) \leq \tau ]. \tag {1} +$$ + +In the special case of noise-free abilities, the job success probability becomes binary, taking values in $\{0,1\}$ . + +# 3. Theoretical results + +This section presents our theoretical results on how the job success probability $P(1)$ varies with worker ability parameters. We fix the job instance throughout: task-skill structure $\{T_i\}$ , subskill difficulties $\{s_{j\ell}\}$ , aggregation functions $h, g, f$ , and success threshold $\tau$ . Given this setup, $P(\alpha_1, \alpha_2, h, g, f, \tau)$ , abbreviated as $P$ , depends only on $\alpha_1$ and $\alpha_2$ . We begin by analyzing a single worker with decision- and action-level profiles parameterized by average ability $\mu_\ell \geq 0$ and noise level $\sigma_\ell \geq 0$ for $\ell \in \{1, 2\}$ . Fixing $\mu_2, \sigma_1, \sigma_2$ , we show that $P$ undergoes a sharp phase transition as $\mu_1$ crosses a critical value (Theorem 3.2). + +Next, we study the benefits of merging two workers with complementary abilities. Given workers A and B with profiles $(\alpha_{1}^{(A)},\alpha_{2}^{(A)})$ and $(\alpha_{1}^{(B)},\alpha_{2}^{(B)})$ , we consider all four possible combinations of decision-level and action-level profiles: $(\alpha_{1}^{(A)},\alpha_{2}^{(A)}),(\alpha_{1}^{(A)},\alpha_{2}^{(B)}),(\alpha_{1}^{(B)},\alpha_{2}^{(A)}),(\alpha_{1}^{(B)},\alpha_{2}^{(B)})$ . Theorem 3.3 gives conditions under which merging improves success probability. We conclude with Corollary 3.4, which connects this analysis to the productivity compression observed in Brynjolfsson et al. (2023). + +# 3.1. Notation and assumptions + +We begin with a structural observation: since the error aggregation functions $h, g, f$ are all monotonic, their composition Err is also monotonic in the subskill error rates $\zeta_{j\ell}$ . Hence, to show that the job success probability $P$ increases with $\mu_1$ , it suffices to show that higher $\mu_1$ leads to lower values of $\zeta_{j1}$ . Recall that $\zeta_{j\ell} = 1 - X$ , where $X \sim \alpha_{\ell}(s_{j\ell})$ . Thus, lower error rates correspond to higher sampled ability values. This follows from stochastic dominance: for any $s, x \in [0,1]$ , $\operatorname{Pr}_{X \sim \alpha_{\ell}(s)}[X \geq x]$ increases with $\mu_{\ell}$ ; see Proposition B.1. + +Independent noise assumption. We assume independence across the random noise realizations at the subskill level. This assumption pertains only to execution noise: once the ability profiles $\alpha_{1}$ and $\alpha_{2}$ are fixed, the realized performances across subskills are modeled as independent draws. The ability profiles themselves may still induce correlations—e.g., via a smooth expected ability function $E(s)$ where adjacent subskills have similar mean performance. + +Assumption 3.1 (Noise independence). For all $j \in [n]$ and $\ell \in \{1,2\}$ , the subskill error rates $\zeta_{j\ell}$ are independent drawn from $\alpha_{\ell}(s_{j\ell})$ . + +This modeling choice is standard for both human and GenAI workers. For example, GenAI tools often produce conditionally independent task outputs given a fixed model state. We explore noise-dependent settings in Section 4 and extend our theoretical analysis to such settings in Section C.5. In particular, we find that strong correlations in noise reduce the sensitivity of $P$ to changes in ability parameters. + +Notation on sensitivity to ability parameters. To study how the job success probability $P$ varies with ability, we begin by analyzing the expected job error rate: $\mathsf{Err}_{\mathrm{avg}}(\mu_1,\sigma_1,\mu_2,\sigma_2)\coloneqq \mathbb{E}_{\zeta}[\mathsf{Err}(\zeta)]$ , where the expectation is taken over the subskill error rates $\zeta_{j\ell} = 1 - X$ with $X\sim \alpha_{\ell}(s_{j\ell})$ . This quantity captures the average error rate for a fixed job instance and ability parameters $(\mu_{1},\sigma_{1}),( \mu_{2},\sigma_{2})$ . To quantify the impact of decision-level ability on average error, we consider $\left|\frac{\partial\mathsf{Err}_{\mathrm{avg}}}{\partial\mu_{\ell}}\right|$ . This measures how sensitive the average job error is to changes in $\mu_{\ell}$ holding the other parameters fixed. Given fixed values of the noise levels and the other ability parameter, the minimum influence of $\mu_{1}$ on the expected job error is defined as: + +$$ +\operatorname {M i n D e r} _ {\mu_ {1}} \left(\sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) := \inf _ {\mu_ {1} \geq 0} \left| \frac {\partial \operatorname {E r r} _ {\text {a v g}}}{\partial \mu_ {1}} \left(\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) \right|. +$$ + +A large value of $\mathrm{MinDer}_{\mu_1}$ indicates that small increases in decision-level ability $\mu_{1}$ can significantly reduce the expected job error. $\mathrm{MinDer}_{\mu_2}(\mu_1,\sigma_1,\sigma_2)$ is defined similarly. + +As an example, consider $\mathsf{Err}(\zeta) = \frac{1}{2n}\sum_{j,\ell}\zeta_{j\ell}$ be average over all subskills and $\alpha_{\ell}(s) = 1 - (1 - a_{\ell})s + \varepsilon_{\ell}(s)$ be linear profiles, where $\varepsilon_{\ell}(s)\sim \min \{(1 - a_{\ell})s,1 - (1 - a_{\ell})s\} \cdot \mathrm{Unif}[-\sigma_{\ell},\sigma_{\ell}]$ . We compute that $\left|\frac{\partial\mathsf{Err}_{\mathrm{avg}}}{\partial a_{\ell}}\right| = \frac{1}{2n}\sum_{j\in [n]}s_{j\ell}$ . This implies that $\mathrm{MinDer}_{\mu_1} = \frac{1}{2n}\sum_{j\in [n]}s_{j1}$ and $\mathrm{MinDer}_{\mu_2} = \frac{1}{2n}\sum_{j\in [n]}s_{j2}$ . + +Lipschitz assumption. We assume the job error function $\operatorname{Err}$ is $L$ -Lipschitz with respect to $\ell_1$ -norm: + +$$ +\left| \operatorname {E r r} \left(\zeta\right) - \operatorname {E r r} \left(\zeta^ {\prime}\right) \right| \leq L \cdot \| \zeta - \zeta^ {\prime} \| _ {1} \quad \text {f o r a l l} \zeta , \zeta^ {\prime} \in [ 0, 1 ] ^ {2 n}. +$$ + +When Err is the average of subskill errors, $L = \frac{1}{2n}$ . + +# 3.2. Threshold effect in job success probability + +We now quantify how the success probability $P$ changes with decision-level ability $\mu_{1}$ , holding other parameters fixed. We prove a sharp threshold behavior: once the expected job error crosses the success threshold $\tau$ , even small changes in $\mu_{1}$ can cause the success probability to jump from near zero to near one. This phenomenon—formalized below—shows a phase transition in job success probability, controlled by a critical ability level $\mu_{1}^{c}$ . + +Theorem 3.2 (Phase transition in job success probability). Fix the job instance, action-level ability $\mu_{2}$ , and noise levels $\sigma_{1}, \sigma_{2}$ . Let $\mu_{1}^{c}$ be the unique value such that the expected job error equals the success threshold: + +$$ +\operatorname {E r r} _ {\text {a v g}} \left(\mu_ {1} ^ {c}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) = \tau . +$$ + +Let $\theta \in (0, 0.5)$ be a confidence level, and define the transition width: $\gamma_1 := \frac{L \sqrt{n(\sigma_1^2 + \sigma_2^2) \cdot \ln(1 / \theta)}}{\mathrm{MinDer}_{\mu_1}(\sigma_1, \mu_2, \sigma_2)}$ , where $L$ is the Lipschitz constant of the job error function. Then the job success probability satisfies: + +$$ +P \leq \theta i f \mu_ {1} \leq \mu_ {1} ^ {c} - \gamma_ {1} a n d P \geq 1 - \theta i f \mu_ {1} \geq \mu_ {1} ^ {c} + \gamma_ {1}. +$$ + +Theorem 3.2 shows that increasing $\mu_{1}$ by approximately $2\gamma_{1}$ transitions the success probability $P$ from at most $\theta$ to at least $1 - \theta$ . A smaller value of $\gamma_{1}$ implies that even modest gains in decision-level ability can have a significant impact on job success. Conversely, a slight increase in the threshold $\tau$ can sharply reduce $P$ . As expected, $\gamma_{1}$ increases with the Lipschitz constant $L$ and total noise variance $n(\sigma_1^2 +\sigma_2^2)$ , and decreases with the sensitivity $\mathrm{MinDer}_{\mu_1}$ . The core technical step is to relate the probability $P$ to the expectation $\mathrm{Err}_{\mathrm{avg}}$ , using a concentration bound under the independence assumption (Assumption 3.1), via McDiarmid's inequality (Kontorovich, 2014). + +Illustrative example: linear ability profiles. Consider a random job with $m$ tasks, each requiring $k$ randomly chosen skills from a pool of $n$ . Let all aggregation functions $h, g, f$ be averages. In the balanced case, the job error simplifies to: $\mathsf{Err}(\zeta) = \frac{1}{2n}\sum_{j=1}^{n}(\zeta_{j1} + \zeta_{j2})$ , with $L = \frac{1}{2n}$ . Suppose the ability profile is linear with noise: $\alpha_{\ell}(s) = 1 - (1 - a_{\ell})s + \varepsilon(s)$ , where $\varepsilon(s) \sim \min\{1 - (1 - a_{\ell})s, (1 - a_{\ell})s\} \cdot \mathrm{Unif}[-\sigma, \sigma]$ , and assume $s_{j\ell} \sim \mathrm{Unif}[0,1]$ . Then the expected subskill difficulty is 0.5 and $\mathrm{MinDer}_{\mu_1}(\sigma_1, \mu_2, \sigma_2) = \frac{1}{2n}\sum_j s_{j1} \approx 0.25$ . Thus, $\gamma_1 = O(\sigma \sqrt{\ln(1/\theta)/n})$ . This implies that elite workers (small $\sigma$ ) or large jobs (large $n$ ) experience sharper transitions in job success with ability. + +Figure 1 shows this empirically. For $\sigma = 0.1$ , increasing $a_1$ by just $4.3\%$ (from 0.492 to 0.513) raises $P$ from 0.2 to 0.8. As $\sigma$ decreases, the transition sharpens, validating our theoretical prediction. Figure 1(c) shows that for jobs + +with $P \geq 0.5$ , either increasing $a_1$ or reducing $\sigma$ effectively improves success. + +Generalization. In Section C.1, we prove a generalized form of Theorem 3.2 that accommodates arbitrary noise models $\varepsilon(s)$ , leveraging the notion of a subgaussian constant to quantify the dispersion of $\varepsilon(s)$ . In Section C.2, we further extend the analysis to non-linear aggregation rules (e.g., max) and alternative ability profiles (e.g., constant, polynomial). The resulting transition width $\gamma_1$ varies from $O(1/n)$ to $O(1)$ , depending on the functional form and the underlying distributional assumptions. + +# 3.3. Merging workers to improve job success + +The phase transition result (Theorem 3.2) shows that small increases in ability parameters can sharply increase the success probability $P$ . We now apply this insight to demonstrate how merging two workers with complementary skills can result in a significant performance gain, especially relevant in settings combining humans and GenAI tools. + +Suppose Worker 1 $(W_{1})$ has stronger decision-level ability, while Worker 2 $(W_{2})$ excels in action-level execution. Let the decision-level profiles be denoted $\alpha_{1}^{(\ell)}\sim (\mu_{1}^{(\ell)},\sigma_{1}^{(\ell)})$ and action-level profiles $\alpha_{2}^{(\ell)}\sim (\mu_{2}^{(\ell)},\sigma_{2}^{(\ell)})$ for $\ell \in \{1,2\}$ . Assume $\mu_1^{(1)} > \mu_1^{(2)}$ and $\mu_2^{(1)} < \mu_2^{(2)}$ , i.e., $W_{1}$ is stronger in decision skills, and $W_{2}$ in action skills. + +We define a merged worker $W_{12}$ that uses the decision-level ability of $W_{1}$ and the action-level ability of $W_{2}$ : $\alpha_{1}^{(12)} := \alpha_{1}^{(1)}, \quad \alpha_{2}^{(12)} := \alpha_{2}^{(2)}$ . Let $P_{12}$ denote the success probability of $W_{12}$ , and $P_{2}$ that of $W_{2}$ . We now give conditions under which the merged worker has substantially higher success probability than either of the original workers. + +Theorem 3.3 (Success gain from merging complementary workers). Fix the job instance. Let $\theta \in (0,0.5)$ be a confidence level, and define: + +$$ +\gamma_ {1} ^ {(1)} := \frac {L \cdot \sqrt {n \left((\sigma_ {1} ^ {(1)}) ^ {2} + (\sigma_ {2} ^ {(2)}) ^ {2}\right) \cdot \ln (1 / \theta)}}{\operatorname {M i n D e r} _ {\mu_ {1}} (\sigma_ {1} ^ {(1)} , \mu_ {2} ^ {(2)} , \sigma_ {2} ^ {(2)})}, a n d \gamma_ {1} ^ {(2)} := +$$ + +$$ +\frac {L \cdot \sqrt {n \left((\sigma_ {1} ^ {(2)}) ^ {2} + (\sigma_ {2} ^ {(2)}) ^ {2}\right) \cdot \ln (1 / \theta)}}{\mathrm {M i n D e r} _ {\mu_ {1}} (\sigma_ {1} ^ {(2)} , \mu_ {2} ^ {(2)} , \sigma_ {2} ^ {(2)})}. I f +$$ + +$$ +\mathsf {E r r} _ {\mathsf {a v g}} (\mu_ {1} ^ {(1)} - \gamma_ {1} ^ {(1)}, \sigma_ {1} ^ {(1)}, \mu_ {2} ^ {(2)}, \sigma_ {2} ^ {(2)}) \leq \tau \leq +$$ + +$$ +\mathsf {E r r} _ {a v g} (\boldsymbol {\mu} _ {1} ^ {(2)} + \boldsymbol {\gamma} _ {1} ^ {(2)}, \boldsymbol {\sigma} _ {1} ^ {(2)}, \boldsymbol {\mu} _ {2} ^ {(2)}, \boldsymbol {\sigma} _ {2} ^ {(2)}), +$$ + +then under Assumption 3.1, we have: $P_{12} - P_2\geq 1 - 2\theta$ + +Gain from merging complementary workers. If the average error function $\mathsf{Err}_{\mathrm{avg}}$ is fully determined by the ability parameters, and $\mathsf{Err}_{\mathrm{avg}}(\mu_1^{(1)} - \gamma_1^{(1)},\sigma_1^{(1)},\mu_2^{(2)},\sigma_2^{(2)}) = \tau = \mathsf{Err}_{\mathrm{avg}}(\mu_1^{(2)} + \gamma_1^{(2)},\sigma_1^{(2)},\mu_2^{(2)},\sigma_2^{(2)})$ , then it follows that $\mu_{1}^{(1)} = \mu_{1}^{(2)} + \gamma_{1}^{(1)} + \gamma_{1}^{(2)}$ . This implies that if $W_{1}$ 's + +![](images/ee21df07b300b26e4c3421ee2d77de75876fa5d85dabcaf6be9e1a784fdcf931.jpg) +(a) $P$ v.s. $a_1$ + +![](images/f59246d8660abd22c8da92f9ccb08a28f18288ae84a27363309399809f482c61.jpg) +(b) $P$ v.s. $\sigma$ + +![](images/3e68b5e09c69e98be0909ce0ed6be4e1783185104fae6037ad0836cd4194b21c.jpg) +(c) Heatmap of $P$ + +![](images/2f7e61aaba89ad07ba368e3b89b903b4b1015e5cb61c5b544818363a9393d6b0.jpg) +Figure 1. Plots illustrating the relationship between the success probability $P(\alpha_{1}, \alpha_{2}, h, g, f, \tau)$ and the parameters $a_{1}, \sigma$ for the linear ability example of Theorem 3.2 with default settings of $(n, m, \tau, a_{2}) = (20, 20, 0.25, 0.4)$ and subskill numbers $s_{j\ell} \sim \mathrm{Unif}[0,1]$ . +(a) $(a_{1}^{(1)}, a_{2}^{(1)}) = (0.5, 0.4)$ +Figure 2. Heatmaps of the probability gain $\Delta = \max \{P_1, P_2, P_{12}, P_{21}\} - \max \{P_1, P_2\}$ by merging two workers for different ranges of $(a_1^{(2)}, a_2^{(2)})$ for the linear ability example of Theorem 3.3 with default settings of $(n, m, \sigma, \tau) = (20, 20, 0.5, 0.25)$ . The region enclosed by the dotted lines in each heatmap indicates where the corresponding job success probability is the highest among the four. For instance, in Figure 2(a) with $(a_1^{(1)}, a_2^{(1)}) = (0.5, 0.4)$ , we observe that when $a_1^{(2)} + a_2^{(2)} < 0.9$ and $a_2^{(2)} > 0.43$ , $P_{12}$ is significantly larger than both $P_1$ and $P_2$ by an amount of 0.6. Similarly, when $a_1^{(2)} + a_2^{(2)} < 0.9$ and $a_1^{(2)} > 0.52$ , $P_{21}$ is significantly larger than both $P_1$ and $P_2$ . We note that the rapid color shifts in the heatmaps reflect an abrupt change in $\Delta$ , indicative of a phase transition phenomenon in $P$ . + +![](images/e6672832468192b2f0bebe59897de6bb19f3eb423d11d07857bc8db1430d8f40.jpg) +(b) $(a_1^{(1)}, a_2^{(1)}) = (0.5, 0.2)$ + +![](images/e8a46aa526f7017ec38c88269b2cf406f682dfc4310ca618f5ae1af05d1275f3.jpg) +(c) $(a_{1}^{(1)}, a_{2}^{(1)}) = (0.3, 0.4)$ + +decision-level ability exceeds $W_{2}$ 's by this margin, then their combination $W_{12}$ can substantially outperform $W_{2}$ alone in job success probability. + +Illustration with linear ability profiles. Let $\mathsf{Err}(\zeta) = \frac{1}{2n}\sum_{j,\ell}\zeta_{j\ell}$ and assume subskill difficulties $s_{j\ell} \sim \mathrm{Unif}[0,1]$ . Let each worker $\ell \in \{1,2\}$ have a linear ability function $\alpha_{\ell}^{(i)}(s) = 1 - (1 - a_{\ell}^{(i)})s + \varepsilon(s)$ , where $\varepsilon(s) \sim \min \{(1 - a_{\ell}^{(i)})s, 1 - (1 - a_{\ell}^{(i)})s\} \cdot \mathrm{Unif}[-\sigma, \sigma]$ , and assume a common noise level $\sigma$ for both workers. We analyze when merging $W_1$ and $W_2$ leads to a gain over either alone. If $a_{\ell}^{(2)} \leq a_{\ell}^{(1)}$ , then $W_1$ is optimal. But if $a_1^{(1)} \geq a_1^{(2)}$ and $a_2^{(1)} \leq a_2^{(2)}$ , merging $(P_{12})$ leads to a nontrivial gain. + +If $a_1^{(1)} \geq a_1^{(2)} + O(\sigma \sqrt{\ln(1 / \theta) / n})$ and $a_2^{(1)} \leq a_2^{(2)} - O(\sigma \sqrt{\ln(1 / \theta) / n})$ , then by Theorem 3.3, $P_{12} - P_{\ell} \geq 1 - 2\theta$ for $\ell \in \{1, 2\}$ . The gain grows as $\sigma$ decreases, making the merging criteria easier to satisfy. + +Figure 2 illustrates this effect. For example, when $a_1^{(1)} = 0.5 = a_1^{(2)} + 0.1$ and $a_2^{(1)} = 0.4 = a_2^{(2)} - 0.1$ , we observe $P_{12} = 1$ while $P_1 = P_2 = 0.4$ , yielding a gain of 0.6. + +Implications. Our analysis informs both job-worker fit and human-AI collaboration strategies. Theorem 3.2 demon- + +strates the impact of targeted upskilling, especially for highability, low-variance workers. Section D.1 explores the partial derivative landscape to identify when such interventions are most effective. + +If $W_{1}$ represents a human worker and $W_{2}$ a GenAI system (as motivated in Section 1), Theorem 3.3 shows that even modest GenAI advantages in action-level tasks can lead to meaningful gains in $P_{12}$ . As human action-level ability decreases, $P_{1}$ falls but $P_{12}$ remains stable, widening the gap $P_{12} - P_{1}$ . This mirrors recent empirical findings (Brynjolfsson et al., 2023; Noy & Zhang, 2023) and contributes to the productivity compression effect, further analyzed in Section 3.4. Thus, combining GenAI with human decision-making yields a productivity amplification effect rather than a replacement dynamic. Organizations should invest in decision-level skill development and in reducing ability noise through workflows and training. + +Finally, our results also highlight the risk of biased evaluations: underestimating $P$ can exclude strong candidates (see Section D.2). Moreover, realizing the gains of merging hinges on accurate evaluations of both human and AI abilities (see also (Somers, 2023)). Section D.2 also quantifies how imperfect evaluations can negate these gains. + +# 3.4. Application: Explaining productivity compression + +Brynjolfsson et al. (2023) studied the effect of GenAI tools on customer service productivity, measured by resolutions per hour (RPH). They found that AI assistance disproportionately benefited lower-skilled workers, increasing their RPH by up to $36\%$ and narrowing the productivity gap relative to higher-skilled workers. We now show how Theorem 3.3 provides a theoretical explanation for this effect. + +Let $W_{1}$ and $W_{2}$ be two human workers with the same families of ability profiles. Assume $\mu_2^{(2)} > \mu_2^{(1)}$ , indicating that $W_{2}$ is more skilled than $W_{1}$ at the action level. Let $W_{\mathrm{AI}}$ be a GenAI tool sharing the same family of ability profiles as the human workers. For $\ell \in \{1, 2\}$ , let $P_{\ell}$ denote the job success probability of $W_{\ell}$ before merging with $W_{\mathrm{AI}}$ , and let $P_{\ell}'$ be the corresponding probability after merging. Assuming the job competition time is stable, note that the job success probability $P$ is proportional to the productivity measure RPH (resolutions per hour). Hence, $|P_{2} - P_{1}|$ and $|P_{2}' - P_{1}'|$ represent the productivity gap between $W_{1}$ and $W_{2}$ before and after merging, respectively. We define the productivity compression as + +$$ +\mathrm {P C} = \left| P _ {2} - P _ {1} \right| - \left| P _ {2} ^ {\prime} - P _ {1} ^ {\prime} \right|, +$$ + +which measures how much the productivity gap is reduced by merging. A larger PC indicates that AI assistance more effectively narrows the gap. As a consequence of Theorem 3.3, we obtain the following corollary, deriving conditions on the worker parameters to lower-bound PC. + +Corollary 3.4 (Productivity compression). Fix the job instance. Suppose both human workers have the same decision-level abilities: + +$$ +\mu_ {1} ^ {(1)} = \mu_ {1} ^ {(2)} = \mu_ {1} ^ {\star} > \mu_ {1} ^ {(\mathrm {A I})}, \quad \sigma_ {1} ^ {(1)} = \sigma_ {1} ^ {(2)} = \sigma_ {1} ^ {(\mathrm {A I})} = \sigma_ {1} ^ {\star}. +$$ + +Let $\theta \in (0, 0.5)$ be a confidence level, and for each $\ell \in$ + +$$ +\begin{array}{l} \{1, 2, \mathrm {A I} \}, d e f i n e \gamma_ {2} ^ {(\ell)} := \frac {L \cdot \sqrt {n \left((\sigma_ {1} ^ {\star}) ^ {2} + (\sigma_ {2} ^ {(\ell)}) ^ {2}\right) \cdot \ln (1 / \theta))}}{\operatorname {M i n D e r} _ {\mu_ {2}} (\sigma_ {2} ^ {(\ell)} , \mu_ {1} ^ {\star} , \sigma_ {1} ^ {\star})}. I f \\ \max \left\{\operatorname {E r r} _ {\text {a v g}} \left(\mu_ {1} ^ {\star}, \sigma_ {1} ^ {\star}, \mu_ {2} ^ {(\mathrm {A I})} - \gamma_ {2} ^ {(\mathrm {A I})}, \sigma_ {2} ^ {(\mathrm {A I})}\right), \right. \\ \left. \operatorname {E r r} _ {\text {a v g}} \left(\mu_ {1} ^ {\star}, \sigma_ {1} ^ {\star}, \mu_ {2} ^ {(2)} - \gamma_ {2} ^ {(2)}, \sigma_ {2} ^ {(2)}\right) \right\} \leq \tau \leq \\ \mathsf {E r r} _ {\text {a v g}} \left(\mu_ {1} ^ {\star}, \sigma_ {1} ^ {\star}, \mu_ {2} ^ {(1)} + \gamma_ {2} ^ {(1)}, \sigma_ {2} ^ {(1)}\right), \\ \end{array} +$$ + +then under Assumption 3.1, we have: $\mathrm{PC}\geq 1 - 2\theta$ + +This result implies that if the AI assistant outperforms the lower-skilled worker by at least $\gamma_2^{(1)} + \gamma_2^{(\mathrm{AI})}$ , the productivity gap can shrink significantly. To our knowledge, this is one of the first formal models explaining the productivity compression effect under realistic assumptions. + +In Section C.4, we provide the proof of Corollary 3.4 and further extend this analysis to the case where the GenAI tool uses a different ability profile family, confirming that our framework generalizes beyond identical distributions. + +# 4. Empirical results + +We demonstrate the usability of our framework using real-world data and validate our theoretical findings in both noise-dependent settings and scenarios involving the merging of workers with distinct ability profiles. Key results are summarized below, with full implementation details provided in Section E. We further validate the robustness of our findings across alternative modeling choices in Section E.4. + +# 4.1. Data, subskills, abilities, and parameters + +We derive job and worker data from O*NET and Big-bench Lite. To bridge missing parameters, we introduce a general subskill division method. As a running example, consider the job of Computer Programmers. + +Deriving job data. O*NET states that the Computer Programmer job as requires $n = 18$ skills and $m = 17$ tasks, and provides their descriptions. It also gives proficiency levels for each skill, represented by $s = (.41, .43, .45, .45, .45, .46, .46, .46, .46, .48, .5, .5, .52, .54, .55, .55, .57, .7)$ , where $s_j \in [0,1]$ denotes the skill's criticality for the job. O*NET also provides task and skill importance scores, which inform the choice of $g$ and $f$ . + +Deriving workers' abilities. We begin by considering lab evaluations from Big-bench Lite (bench authors, 2023) for both human workers and GenAI tools (specifically PaLM (Chowdhery et al., 2023)). For example, we model the ability profiles of a human worker $(W_{1})$ and a GenAI tool $(W_{2})$ as $\alpha^{(1)}(s) = \mathrm{TrunN}(1 - 0.78s + 0.22, 0.013; 0, 1)$ , and $\alpha^{(2)}(s) = \mathrm{TrunN}(1 - 0.92s + 0.08, 0.029; 0, 1)$ . + +An approach for subskill division. Subskill division becomes essential for analyzing worker performance. We first use GPT-4o to determine the decision-level degree for each skill, given by $\lambda = (0, 0, 1, 1, 1, .6, .7, .4, .4, 0, .3, 1, 1, .6, .7, .6, 0, .4)$ . Using a skill proficiency $s_j$ and its decision-level degree $\lambda_j$ , we compute subskill numbers as $s_{j1} = \lambda_j s_j$ , $s_{j2} = (1 - \lambda_j) s_j$ . These values are listed in Eq. (11). This formulation ensures that subskill numbers $s_{j1}$ and $s_{j2}$ are linear functions of $s_j$ and $\lambda_j$ , maintaining the property that $s_{j1} + s_{j2} = s_j$ . Further examples are in Section E.3. + +We decompose skill ability profiles $\alpha$ into subskill ability profiles $\alpha_{1}$ and $\alpha_{2}$ . For $\alpha(s) \sim \mathrm{TrunN}(1 - (1 - a)s, \sigma^{2}; 0, 1)$ with decision-level degree $\lambda \in [0, 1]$ , we set $\alpha_{1}(s) = \alpha_{2}(s) = \mathrm{TrunN}(1 - (1 - a)s, \sigma^{2}/2; 0, 1)$ , so that the distribution of $\zeta_{j1} + \zeta_{j2}$ approximates first drawing $X \sim \alpha(s_{j})$ and then outputting $1 - X$ . Thus, skill profiles can be (approximately) reconstructed by setting the skill success probability function as $h(\zeta_{1}, \zeta_{2}) = \zeta_{1} + \zeta_{2}$ . Thus, we obtain $\alpha_{\ell}^{(1)}(s) = \mathrm{TrunN}(1 - 0.78s, 0.0065; 0, 1)$ , $\alpha_{\ell}^{(2)}(s) = \mathrm{TrunN}(1 - 0.92s, 0.0145; 0, 1)$ . + +Constructing the task-skill dependency. Using task and skill descriptions from O*NET, we employ GPT-4o to generate task-skill dependencies $T_{i} \subseteq [n]$ for each task $i \in [m]$ . Details are provided in Section E.3. + +Choice of error functions and threshold. We set the skill error function as $h(\zeta_1, \zeta_2) = \zeta_1 + \zeta_2$ to ensure consistency with the skill ability function $\alpha$ derived from Big-bench Lite. Task and job error functions, $g$ and $f$ , are weighted averages based on the importance of skills and tasks from O*NET, resulting in $\mathsf{Err}(\zeta) = \sum_{j \in [n]} w_j (\zeta_{j1} + \zeta_{j2})$ . (See Eq.(13) for details.) We set the threshold $\tau = 0.45$ , representing a medium job requirement. + +Summary. In this manner, all necessary job and worker attributes can be extracted from sources such as O*NET and Big-bench Lite, with GPT-4o (or similar models) assisting in estimating skill proficiencies, decision-level intensities, and task-skill mappings. This subskill decomposition method is generic and can be applied to other job and worker datasets, making it practical across diverse domains. + +We note that O*NET and Big-bench Lite offer complementary but biased views of work. O*NET emphasizes tasks involving judgment, creativity, and interpersonal skills, potentially under-representing emerging digital or computational activities. Conversely, Big-bench Lite focuses on structured, rule-based problems where GenAI systems tend to excel. Empirical insights should therefore be interpreted in light of these distributions, as each dataset highlights different aspects of human-AI complementarity. + +# 4.2. Evaluating worker-job fit with dependent abilities + +Theorem 3.2 assumes independent subskill abilities (Assumption 3.1), but this may not hold in practice. For instance, a worker's current state—such as fatigue or motivation—can influence their abilities (J. et al., 1976), creating dependencies between subskill error rates $\zeta_{j\ell}$ . This raises the question: Under such dependencies, can a slight increase in ability still lead to a dramatic nonlinear rise in success probability? + +Choice of parameters. We set $\alpha_{1}(s) = \mathrm{TrunN}(1 - (1 - a)s,0.0065;0,1)$ and $\alpha_{2}(s) = \mathrm{TrunN}(1 - 0.78s,0.0065;0,1)$ to model a human worker, where the parameter $a$ controls the decision-level ability. For $s\in [0,1]$ , let $F_{s}$ denote the cumulative density function of $\alpha_{1}(s)$ . To introduce dependency between subskills, we assume that the worker has a random status $\beta \sim \mathrm{Unif}[0,1]$ . For each subskill, $\zeta_{j\ell}\sim 1 - \alpha_{\ell}(s_{j\ell})$ with probability $1 - p$ and $\zeta_{j\ell} = 1 - F_{s_{j\ell}}^{-1}(\beta)$ with probability $p$ . As $p$ increases, the dependency between the $\zeta_{j\ell}$ s strengthens. Specifically, when $p = 0$ , all $\zeta_{j\ell}$ s are independent. Conversely, when $p = 1$ , all $\zeta_{j\ell}$ s are fully determined by the worker's status $\beta$ , making them highly correlated. + +Analysis. We plot the job success probability $P$ in Figure 3 as the ability parameter $a$ and dependency parameter $p$ vary. Figure 3(a) shows that phase transitions in $P$ persist even when subskills are dependent ( $p > 0$ ), although the transition window narrows as $p$ decreases. For example, when $p = 0$ , increasing $a$ by 0.27 (from 0.07 to 0.34) raises $P$ from 0.2 to 0.8, whereas for $p = 0.4$ , a greater increase in $a$ (0.44) is needed. Figure 3(b) shows that for fixed $a$ , $P$ increases monotonically with $p$ when $P < 0.5$ and decreases monotonically when $P > 0.5$ , similar to the trend in $P$ vs. $\sigma$ (Figure 1(b)). This is because the variance of $\mathrm{Err}(\zeta)$ increases with both $p$ and $\sigma$ . These results show that workers with loosely coupled subskills (low $p$ ) experience sharper gains in $P$ from ability improvements, underscoring the value of reducing skill interdependencies. + +# 4.3. Merging two workers with distinct ability profiles + +We empirically examine the utility of merging two workers ( $W_{1}$ and $W_{2}$ ). Theorem 3.3 assumes identical ability profile families, ensuring that $W_{1}$ consistently outperforms $W_{2}$ across all decision-level (action-level) subskills, or vice versa. In practice, however, this may not hold—e.g., a GenAI tool may surpass a human in some action-level subskills but not others. This raises the question: Does the sharp increase in job success probability from merging persist when workers have ability profiles from different families? + +Choice of parameters. We set the subskill ability profiles of $W_{1}$ to be linear: $\alpha_{1}^{(1)}(s) = \alpha_{2}^{(1)}(s) = \mathrm{TrunN}(1 - 0.78s, 0.0065; 0, 1)$ , representing a human worker. For the second worker $(W_{2})$ , we define $\alpha_{1}^{(2)} = \mathrm{TrunN}(1 - (1 - a)s, 0.0145; 0, 1)$ and $\alpha_{2}^{(2)} = \mathrm{TrunN}(c, 0.0145; 0, 1)$ . This models a GenAI tool that excels at easier decision-level subskills but degrades with difficulty, while maintaining strong and uniform action-level abilities. + +We analyze which decision- and action-level subskills should be assigned to each worker and quantify the resulting gain in job success probability. + +If the average of $\alpha_{1}^{(1)}(s)$ exceeds that of $\alpha_{1}^{(2)}(s)$ (i.e., $a < 0.22$ ), all decision-level subskills are assigned to $W_{1}$ ; otherwise ( $a \geq 0.22$ ), to $W_{2}$ . Because the two workers' action-level abilities differ non-monotonically, neither dominates the other across all subskills. This renders the uniform merging strategy from Section 3.3 sub-optimal. Instead, we select the action-level subskill provider based on difficulty: the average of $\alpha_{2}^{(1)}(s)$ is $1 - 0.78s$ , while for $\alpha_{2}^{(2)}(s)$ it is constant at $c$ . Thus, for $s_{j2} \leq \frac{1 - c}{0.78}$ , $W_{1}$ has higher expected ability and is chosen; otherwise, $W_{2}$ is selected. This creates a merged worker $W_{\text{merge}}$ whose decision-level ability is linear and action-level ability is piecewise linear with a breakpoint at $s_{j2} = \frac{1 - c}{0.78}$ . Let $P_{\text{merge}}$ denote the job success probability of this merged worker. + +![](images/9d211cafd0b6040c9c4b92e24903ba2b880193da59758dd0e587ef563813baa6.jpg) +(a) $P$ v.s. $a$ + +![](images/f6b52048148939d42d58341a663ddfda9acfb90417207fc6b9c0ed04565ac8bc.jpg) +(b) $P$ v.s. $p$ + +![](images/79092b438247a5947f1f405094ec7a10b5f1e0087d02fb8c93be55bc88a7e09e.jpg) +(c) Heatmap of $P$ + +![](images/eb2e90861cb5a4bbdfbd3f07e805f613785f6f0ddfd7a2fedb84a09d99fd89a5.jpg) +Figure 3. Plots illustrating the relationship between the success probability $P(\alpha_{1}, \alpha_{2}, h, g, f, \tau)$ and the ability parameter $a$ and dependency parameter $p$ for the Computer Programmer example with default settings of $(\sigma, \tau) = (0.08, 0.45)$ . +(a) Heatmap of $P_{merge}$ +Figure 4. Heatmaps of the merged job success probability $P_{\mathrm{merge}}$ and the corresponding probability gain $\Delta = P_{\mathrm{merge}} - \max \{P_1, P_2\}$ , shown across different values of the ability parameters $(a, c)$ for the Computer Programmers example with default threshold $\tau = 0.45$ . Rapid color transitions reflect persistent phase shifts in both $P_{\mathrm{merge}}$ and $\Delta$ , even when worker profiles differ. Compared to Figure 2, the narrower bright region in Figure 4(b) suggests that merging distinct profiles yields more gradual improvements than merging identical ones. + +![](images/e50f9018bbe8c8501e8e234b3b0f7f4bffe2308acb6b912a6461b208ba2a168b.jpg) +(b) Heatmap of $\Delta$ + +Analysis. Figure 4.2 plots the heatmaps of job success probability $P_{merge}$ and probability gains $\Delta = P_{merge} - \max \{P_1, P_2\}$ as ability parameters $a$ and $c$ vary. When $a \leq 0.22$ (i.e., $W_2$ has lower decision-level ability than $W_1$ ) and $c \in [0.78, 0.82]$ , we observe $P_{merge} = 1$ while $P_1, P_2 \leq 0.6$ , indicating a probability gain of at least $P_{merge} - P_\ell \geq 0.4$ . This occurs because $c$ first reaches 0.78, triggering a sharp increase in $P_{merge}$ as predicted by Theorem 3.2, and later reaches 0.82, aligning $P_2$ with the trend in Figure 2. The range of $c$ is narrower than that of $\alpha_2^{(2)}$ in Figure 2 since increasing $c$ results in a smooth transition in action-level subskills from $W_1$ to $W_2$ . Conversely, when $\alpha_2^{(2)}$ surpasses $\alpha_2^{(1)}$ , all action-level subskills shift abruptly, causing a more sudden transition. These findings confirm that the nonlinear probability gain from merging persists even when workers specialize in different action-level subskills, affirming our hypothesis. + +# 5. Conclusions, limitations, and future work + +This work examines the evolving impact of GenAI tools in the workforce by introducing a mathematical framework to assess job success probability in worker-job configurations. By decomposing skills into decision-level and action-level subskills, the framework enables fine-grained analysis and + +offers insights into effective human-AI collaboration. Our theoretical results identify conditions under which job success probability changes sharply with worker ability, and show that merging workers with complementary subskills can substantially enhance performance, reinforcing the view that GenAI tools augment, rather than replace, human expertise. This includes explaining the phenomenon of productivity compression, where GenAI assistance disproportionately benefits lower-skilled workers, narrowing performance gaps, consistent with empirical findings from recent field studies. + +We demonstrate how the framework integrates with real-world datasets such as O*NET and Big-bench Lite, highlighting its practical relevance. Empirical results validate theoretical insights, even under relaxed assumptions. + +Our analysis focuses primarily on job success probability. In practice, performance also depends on factors such as efficiency, time, and cost. Incorporating these dimensions would yield a more comprehensive view of worker-job fit and inform workforce optimization strategies. + +Moreover, the datasets used may not fully capture the complexity of skill attribution in dynamic work settings. O*NET reflects static, survey-based assessments, while LLM-based estimates from Big-bench may embed modeling biases. Incorporating empirical benchmarks (e.g., HumanEval for coding, customer support transcripts) could strengthen the framework's empirical grounding. + +Our model underscores the importance of improving evaluation mechanisms to better reflect the strengths and limitations of human and AI capabilities. More broadly, this work contributes to the growing literature on AI and work by offering a quantitative lens to study the interplay between human expertise and GenAI systems. As AI continues to reshape labor markets, balancing human skill and automation remains a critical challenge. + +This paper offers a step toward quantifying that balance; further research is needed to refine models, incorporate behavioral studies, and promote equitable and effective human-AI collaboration in an evolving workplace. + +# Impact statement + +This paper introduces a framework for assessing workerjob fit for both human and AI workers, aiming to advance workforce optimization in an era of rapid technological change. Our insights and methodologies contribute to more effective allocation of human and AI resources, improving job success probability and facilitating productive humanAI collaboration. + +The societal implications are twofold. On one hand, the framework empowers organizations to make data-driven workforce decisions, enhancing productivity and job satisfaction. On the other, it highlights challenges such as biases in ability evaluation and the evolving role of GenAI in labor markets, underscoring the need for careful consideration to prevent exclusion or unfair treatment of workers. + +While our work may influence hiring practices and perceptions of human-AI collaboration, these outcomes should be interpreted within the broader goal of equitable and efficient workforce optimization. We do not identify any immediate ethical concerns beyond these considerations. + +# Acknowledgments + +This work was funded by NSF Awards IIS-2045951 and CCF-2112665, and in part by grants from Tata Sons Private Limited, Tata Consultancy Services Limited, Titan, and New Cornerstone Science Foundation. + +# References + +Workforce optimization. https://en.wikipedia.org/wiki/Workforce_optimization. +Abdin, M., Aneja, J., Behl, H., Bubeck, S., Eldan, R., Gunasekar, S., Harrison, M., Hewett, R. J., Javaheripi, M., Kauffmann, P., et al. Phi-4 technical report. arXiv preprint arXiv:2412.08905, 2024. +Acemoglu, D. The simple macroeconomics of ai. Economic Policy, 40(121):13-58, 2025. +Acemoglu, D. and Autor, D. Skills, tasks and technologies: Implications for employment and earnings. In Handbook of labor economics, volume 4, pp. 1043-1171. Elsevier, 2011. +Acemoglu, D. and Johnson, S. https://www.imf.org/en/Publications/fandd/issues/2023/12/Rebalancing-AI-Acemoglu-Johnson, Dec 2023. +Agarwal, N., Moehring, A., Rajpurkar, P., and Salz, T. Combining human expertise with artificial intelligence: Experimental evidence from radiology. + +SSRN Electronic Journal, 2023. URL https://api-semanticscholar.org/CorpusID:259701939. +Angelova, V., Dobbie, W., and Yang, C. Algorithmic recommendations and human discretion. SSRN Electronic Journal, 2023. URL https://api.sementicscholar.org/CorpusID:253373458. +Annabelle Liang. AI to hit $40\%$ of jobs and worsen inequality, IMF says. BBC, January 2024. +Anthropic. Claude: An AI assistant by Anthropic. https://www.anthropic.com, 2023. Available at: https://www.anthropic.com. +Arora, S. and Goyal, A. A theory for emergence of complex skills in language models. CoRR, abs/2307.15936, 2023. +Autor, D. Applying AI to Rebuild Middle Class Jobs. NBER Working Papers 32140, National Bureau of Economic Research, Inc, February 2024. URL https://ideas.repec.org/p/nbr/nberwo/32140.html. +bench authors, B. Beyond the imitation game: Quantifying and extrapolating the capabilities of language models. Transactions on Machine Learning Research, 2023. ISSN 2835-8856. URL https://openreview.net/forum?id=uyTL5Bvosj. +Bender, E. M., Gebru, T., McMillan-Major, A., and Shmitchell, S. On the dangers of stochastic parrots: Can language models be too big? In Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, pp. 610-623. ACM, 2021. doi: 10.1145/3442188.3445922. +Borji, A. Limitations of AI in understanding human emotions. Cognitive Computation, 14(2):235-245, 2022. doi: 10.1007/s12559-021-09867-0. +Brodsky, S. The hidden costs of AI: How generative models are reshaping corporate budgets, 2024. URL https://www.ibm.com/blog/ai-economics-compute-cost/?utm_source=chatgpt.com. +Brynolfsson, E., Li, D., and Raymond, L. Generative AI at work. SSRN Electronic Journal, 2023. URL https://api.sementicscholar.org/CorpusID:258298324. +Bubeck, S., Chandrasekaran, V., Eldan, R., Gehrke, J. A., Horvitz, E., Kamar, E., Lee, P., Lee, Y. T., Li, Y.-F., Lundberg, S. M., Nori, H., Palangi, H., Ribeiro, M. T., and Zhang, Y. Sparks of artificial general intelligence: Early experiments with GPT-4. ArXiv, abs/2303.12712, + +2023. URL https://api_semanticscholar.org/CorpusID:257663729. +Cabrera, Á. A., Perer, A., and Hong, J. I. Improving humanai collaboration with descriptions of AI behavior. Proceedings of the ACM on Human-Computer Interaction, 7 (CSCW1):1-21, 2023. +Cazzaniga, M., Jaumotte, F., Li, L., Melina, G., Panton, A. J., Pizzinelli, C., Rockall, E., and Tavares, M. M. Gen-AI: Artificial intelligence and the future of work. URL https://api_semanticscholar.org/CorpusID:267002337. +Celis, L. E., Mehrotra, A., and Vishnoi, N. K. Interventions for ranking in the presence of implicit bias. In $FAT^{*}$ , pp. 369-380. ACM, 2020. +Chowdhery, A., Narang, S., Devlin, J., Bosma, M., Mishra, G., Roberts, A., Barham, P., Chung, H. W., Sutton, C., Gehrmann, S., Schuh, P., Shi, K., Tsvyashchenko, S., Maynez, J., Rao, A., Barnes, P., Tay, Y., Shazeer, N., Prabhakaran, V., Reif, E., Du, N., Hutchinson, B., Pope, R., Bradbury, J., Austin, J., Isard, M., Gur-Ari, G., Yin, P., Duke, T., Levskaya, A., Ghemawat, S., Dev, S., Michalewski, H., Garcia, X., Misra, V., Robinson, K., Fedus, L., Zhou, D., Ippolito, D., Luan, D., Lim, H., Zoph, B., Spiridonov, A., Sepassi, R., Dohan, D., Agrawal, S., Omernick, M., Dai, A. M., Pillai, T. S., Pellat, M., Lewkowycz, A., Moreira, E., Child, R., Polozov, O., Lee, K., Zhou, Z., Wang, X., Saeta, B., Diaz, M., First, O., Catasta, M., Wei, J., Meier-Hellstern, K., Eck, D., Dean, J., Petrov, S., and Fiedel, N. Palm: Scaling language modeling with pathways. J. Mach. Learn. Res., 24:240:1-240:113, 2023. +Chris Vallance. AI could replace equivalent of 300 million jobs - report. BBC, March 2023. +DeepMind. Gemini: A family of multimodal models, 2023. URL https://www_deepmind.com/blog/google-deepmind-unveils-gemini. +Dillion, D., Tandon, N., Gu, Y., and Gray, K. Can AI language models replace human participants? Trends in Cognitive Sciences, 2023. +Eloundou, T., Manning, S., Mishkin, P., and Rock, D. GPTs are GPTs: An early look at the labor market impact potential of large language models. arXiv preprint arXiv:2303.10130, 2023. +Felten, E. W., Raj, M., and Seamans, R. C. How will language modelers like ChatGPT affect occupations and industries? SSRN Electronic Journal, 2023. URL https://api.sementicscholar.org/CorpusID:257280473. + +Fosso Wamba, S., Guthrie, C., Queiroz, M. M., and Minner, S. ChatGPT and generative artificial intelligence: an exploratory study of key benefits and challenges in operations and supply chain management. International Journal of Production Research, pp. 1-21, 2023. +Guo, D., Yang, D., Zhang, H., Song, J., Zhang, R., Xu, R., Zhu, Q., Ma, S., Wang, P., Bi, X., et al. DeepSeek-R1: Incentivizing reasoning capability in LLMs via reinforcement learning. arXiv preprint arXiv:2501.12948, 2025. +Harding, J., D'Alessandro, W., Laskowski, N., and Long, R. AI language models cannot replace human research participants. *Ai & Society*, pp. 1-3, 2023. +He, Z., Liu, Y., Zheng, J., Qin, B., Yao, J., Xuan, R., and Yang, X. FlagEvalMM: A flexible framework for comprehensive multimodal model evaluation, 2024. URL https://github.com/flageval-baai/FlagEvalMM. +Hendrycks, D., Burns, C., Basart, S., Zou, A., Mazeika, M., Song, D., and Steinhardt, J. Measuring massive multitask language understanding. In International Conference on Learning Representations, 2021. +Inga, J., Ruess, M., Robens, J. H., Nelius, T., Rothfuß, S., Kille, S., Dahlinger, P., Lindenmann, A., Thomaschke, R., Neumann, G., Matthiesen, S., Hohmann, S., and Kiesel, A. Human-machine symbiosis: A multivariate perspective for physically coupled human-machine systems. International Journal of Human-Computer Studies, 170:102926, 2023. ISSN 1071-5819. doi: https://doi.org/10.1016/j.ijhcs.2022.102926. +J., Richard, and Hackman. Motivation through the design of work: Test of a theory. Organizational Behavior and Human Performance, 16:250-279, 1976. URL https://apisemantic scholar.org/CorpusID:8618462. +Jaffe, S., Parikh, N., Butler, J. L., Farach, A., Cambon, A., Hecht, B., Schwarz, M., Teevan, J., Andersen, R., Bermejo-Cano, M., Bono, J., Buscher, G., Chen, C., Clarke, S., Counts, S., Dillon, E., Edelman, B. G., Gruber-Gremlich, U., Hilke, C., Hanrahan, B., Ho, S., Houck, B., Khemka, M., Kewenig, V., Kleiner, M., Knudsen, E., Manivannan, S., Meijer, M., Neville, J., Ngo, N., Ngwe, D., Peckham, R., Peng, S., Presson, N., Rangan, N., Rangareddy, R., Rintel, S., Rodriguez, R., Rotella, K., Safavi, T., Sarkar, A., Scott, A. E., Sellen, A., Shah, C., Simkute, A., Smith, T., Srinath, S., Suri, S., Tai, A.-J., Tankelevitch, L., Wan, M., Wang, L., White, R. W., and Yang, L. Generative AI in real-world workplaces the second microsoft report on AI and productivity research. 2024. URL https://apisemantic scholar.org/CorpusID:271694119. + +Kahneman, D. Thinking, Fast and Slow. Farrar, Straus and Giroux, New York, 2011. ISBN 978-0374275631. +Kleinberg, J. M. and Raghavan, M. Selection problems in the presence of implicit bias. In ITCS, volume 94 of LIPIcs, pp. 33:1-33:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2018. +Klubnikin, A., Analyst, I., Likhadzed, V., CEO, I., Stashevsky, K., and CTO, I. Evaluating the cost of generative AI for effective implementation in your organization, 2024. URL https://itrexgroup.com/blog/ calculating-the-cost-of-generative-ai/?utm_source=chatgpt.com. +Kochhar, R. Which U.S. workers are more exposed to AI on their jobs?, Jul 2023. +Kontorovich, A. Concentration in unbounded metric spaces and algorithmic stability. In International conference on machine learning, pp. 28-36. PMLR, 2014. +KPI.org. What is a key performance indicator (KPI)? https://www.kpi.org/kpi-basics/, 2024. +Licklider, J. Man-Computer Symbiosis, volume HFE-1. IRE Transactions on Human Factors in Electronics, 1960. doi: 10.1109/THFE2.1960.4503259. +Lo, W., Yang, C.-M., Zhang, Q., and Li, M. Increased productivity and reduced waste with robotic process automation and generative AI-powered ioe services. Journal of Web Engineering, 23(1):53-87, 2024. +Mahowald, K., Ivanova, A. A., Blank, I. A., Kanwisher, N., Tenenbaum, J. B., and Fedorenko, E. Dissociating language and thought in large language models. Trends in Cognitive Sciences, 28:517-540, 2024. URL https://api_semanticscholar.org/CorpusID:268551442. +Microsoft.AI at work:Here now comes the hard part,2023. +Miller, E. Adding error bars to evals: A statistical approach to language model evaluations. 2024. +Naveh, Y., Richter, Y., Altshuler, Y., Gresh, D. L., and Connors, D. P. Workforce optimization: Identification and assignment of professional workers using constraint programming. IBM Journal of Research and Development, 51(3.4):263-279, 2007. doi: 10.1147/rd.513.0263. +Noy, S. and Zhang, W. Experimental evidence on the productivity effects of generative artificial intelligence. Science, 381:187 - 192, 2023. URL https://api.sementicscholar.org/CorpusID:257394529. + +Okawa, M., Lubana, E. S., Dick, R. P., and Tanaka, H. Compositional abilities emerge multiplicatively: Exploring diffusion models on a synthetic task. CoRR, abs/2310.09336, 2023. +OpenAI. GPT-4 technical report. 2023. +OpenAI. Learning to reason with LLMs. https://openai.com/index/ learning-to-reason-with-llms/, 2024. +Otis, N., Clarke, R. P., Delecourt, S., Holtz, D., and Koning, R. The uneven impact of generative AI on entrepreneurial performance. SSRN Electronic Journal, 2024. URL https://api.sementicscholar.org/CorpusID:267135395. +Paradis, T. AI will reshape the global labor force. Employers will need to help their workers keep up. Business Insider, August 2024. +Reid, M. and Vempala, S. S. Does gpt really get it? a hierarchical scale to quantify human vs AI's understanding of algorithms. ArXiv, abs/2406.14722, 2024. URL https://api.sementicscholar.org/CorpusID:270688183. +Sadeeq, U. Noise: A flaw in human judgment. Vikalpa, 48: 163-165, 2023. +Services, T. C. AI for business study: The combined power of AI and generative AI. https://www.tcs.com/insights/blogs/ai-business-study, 2024. +Sharma, S. Benefits or concerns of AI: A multistakeholder responsibility. Futures, pp. 103328, 2024. +Shine, I. and Whiting, K. These are the jobs most likely to be lost – and created – because of AI. World Economic Forum, May 2023. +Sinclair, A. and for Employment Studies, I. Workforce Planning: A Literature Review. Institute for Employment Studies, 2004. +Somers, M. How generative AI can boost highly skilled workers' productivity, 2023. Accessed: 2025-01-28. +Stade, E. C., Stirman, S. W., Ungar, L. H., Boland, C. L., Schwartz, H. A., Yaden, D. B., Sedoc, J., DeRubeis, R. J., Willer, R., and Eichstaedt, J. C. Large language models could change the future of behavioral healthcare: a proposal for responsible development and evaluation. npj Mental Health Research, 3(1):12, 2024. +U.S. Department of Labor, Employment and Training Administration. O*NET Online. National Center for O*NET Development, 2023. https://www.onetonline.org/. + +Vaccaro, M., Almaatouq, A., and Malone, T. W. When combinations of humans and AI are useful: A systematic review and meta-analysis. Nature human behaviour, 2024. URL https://api.sementicscholar.org/CorpusID:269741352. +van Handel, R. Probability in High Dimension. 2014. Lecture notes, available at https://web.math.princeton.edu/~ryan/Lectures14.pdf. +Vershynin, R. High-Dimensional Probability: An Introduction with Applications in Data Science. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 2018. ISBN 9781108415194. doi: 10.1017/9781108231596. +Walker, J. Everything wrong with DORA metrics. Aviator Blog, January 2023. +Wang, Y., Ma, X., Zhang, G., Ni, Y., Chandra, A., Guo, S., Ren, W., Arulraj, A., He, X., Jiang, Z., Li, T., Ku, M., Wang, K., Zhuang, A., Fan, R., Yue, X., and Chen, W. MMLU-Pro: A more robust and challenging multitask language understanding benchmark. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks, 2024. +White, C., Dooley, S., Roberts, M., Pal, A., Feuer, B., Jain, S., Shwartz-Ziv, R., Jain, N., Saifullah, K., Naidu, S., Hegde, C., LeCun, Y., Goldstein, T., Neiswanger, W., and Goldblum, M. Livebench: A challenging, contamination-free LLM benchmark. 2024. +Will Knight. Openai upgrades its smartest AI model with improved reasoning skills. WIRED, December 2024. +Yu, D., Kaur, S., Gupta, A., Brown-Cohen, J., Goyal, A., and Arora, S. SKILL-MIX: a flexible and expandable family of evaluations for AI models. In ICLR. OpenReview.net, 2024. + +# A. Additional related work + +Workforce optimization seeks to align employee skills with organizational objectives to improve productivity, efficiency, and satisfaction (Sinclair & for Employment Studies, 2004; wik; Services, 2024; Naveh et al., 2007). Although this area has been extensively studied empirically, theoretical models that systematically evaluate worker-job fit remain limited. + +The emergence of GenAI tools has reignited debates around automation and its impact on skilled labor (Dillion et al., 2023; Harding et al., 2023; Stade et al., 2024). Recent work demonstrates AI's proficiency in complex tasks—from expert-level reasoning (OpenAI, 2024; Will Knight, 2024) to high performance on domain-specific benchmarks such as LiveBench and MMLU-Pro (White et al., 2024; Wang et al., 2024). These advances underscore the need for principled frameworks to assess human-AI complementarity (Yu et al., 2024; Hendrycks et al., 2021). + +Several studies compare human and AI capabilities across domains (Brynjolfsson et al., 2023; Noy & Zhang, 2023; Sharma, 2024; Eloundou et al., 2023). However, existing models often conflate decision-making and execution, overlooking their distinct roles in work. Our framework explicitly separates decision-level and action-level subskills, enabling a more granular analysis of how AI systems complement human abilities. + +Research on the labor implications of AI suggests that GenAI tends to augment lower-skilled workers (Acemoglu & Autor, 2011), consistent with our finding that AI enhances action-level subskills while decision-level abilities remain critical. Studies on AI-driven productivity gains (Noy & Zhang, 2023; Lo et al., 2024; Fosso Wamba et al., 2023) offer additional empirical support for our model's predictions. Integrating real-world data to further validate our theoretical insights is an important direction for future work. + +Recent work by Acemoglu (2025) presents a macroeconomic model that analyzes the effects of AI on productivity, wages, and inequality via equilibrium-based task allocation between labor and capital. While developed independently, their assumptions—such as task decomposition, differential AI performance across task types, and heterogeneity in worker productivity—resonate with our framework's decomposition of skills and modeling of worker ability. The key distinction lies in scope: their model addresses aggregate, market-level outcomes, whereas ours focuses on job-level success and collaboration between individual workers. + +# B. Properties of ability profiles + +This section discusses the properties of several ability profiles. + +# B.1. Monotonicity, variability, and visualization for ability profiles + +Below, we formalize three ability profiles: constant, linear, and polynomial with additive uniform noise. + +- Constant profile. We consider a constant profile $\alpha \equiv c + \varepsilon$ for some $c \in [0,1]$ and $\varepsilon$ distributed according to a certain noise distribution, e.g., $\varepsilon \sim \min\{c, 1 - c\} \cdot \mathrm{Unif}[-\sigma, \sigma]$ for some $\sigma \in [0,1]$ . When $\sigma = 0$ , $\alpha \equiv c$ is a constant function. This model is useful for skills where ability does not vary with increased experience, such as automated processes handled by GenAI tools, where the output remains consistent regardless of operational duration. The scale of two parameters $c$ and $\sigma$ determines the performance of $\alpha$ . Parameter $c$ determines the average ability of constant profiles, where $c = 0$ represents the worst ability and $c = 1$ represents the best ability. Moreover, fixing $\sigma$ , the ability of a constant profile rises smoothly from the worst to the best as $c$ increases from 0 to 1. Also note that $\mathrm{Var}[\alpha(s)] = \min\{c, 1 - c\} \cdot \frac{\sigma^2}{3}$ . Thus, parameter $\sigma$ reflects the variability of $\alpha$ . +- Linear profile. We consider a linear profile $\alpha(s) = c - 1 - (1 - a)s + \varepsilon(s)$ for some $a, c \in [0,1]$ and noise $\varepsilon(s) \sim \min \{(1 - a)s, 1 - (1 - a)s\} \cdot \mathrm{Unif}[-\sigma, \sigma]$ for some $\sigma \in [0,1]$ . When $a > 0$ , this model is apt for scenarios involving workers whose ability to develop a skill increases linearly with the ease of the skill. Note that for any $s \in [0,1]$ , $E(s) = c - (1 - a)s$ is a monotone increasing function of both $c$ and $a$ . Thus, the average ability of a linear profile rises smoothly from the worst to the best as $a$ (or $c$ ) increases from 0 to 1. In this paper, we usually set $c = 1$ such that $E(0) = 1$ , representing the highest ability for the easiest subskill. +- Polynomial profile. We consider a polynomial profile $\alpha(s) = 1 - s^{\beta} + \varepsilon(s)$ , for some parameter $\beta \geq 0$ and noise $\varepsilon(s) \sim \min\{s^{\beta}, 1 - s^{\beta}\} \cdot \mathrm{Unif}[-\sigma, \sigma]$ for some $\sigma \in [0,1]$ . This function can be used to model how decision-making subskills often improve nonlinearly with the easiness of the skill. The unique parameter, $\beta$ , allows us to adjust the + +sensitivity of the ability function to changes in $s$ , where $\beta = 0$ represents the worst ability $\alpha \equiv \varepsilon(s)$ and $\beta = \infty$ represents the best ability $\alpha \equiv 0$ . Moreover, higher values of $\beta$ indicate a more pronounced increase in average ability as $s$ approaches 1. + +We plot constant, linear, and polynomial profiles with additive uniform noise in Figure 5. In these models, we know that ability profiles are usually characterized by a parameter measuring the average ability (e.g., $c$ for constant profiles, $a$ for linear profiles, and $\beta$ for polynomial profiles) and a parameter $\sigma$ measuring the variability. A key problem in this paper is quantifying how these parameters affect the performance of workers in a given job. Intuitively, the quality of an ability profile typically improves as the average ability increases or the variability decreases. + +![](images/9582188b5dc3b6cf96ac4ad9089492c8b1cffbe0d2d8125f8f699ed7f2c4e15e.jpg) +(a) Constant profiles + +![](images/641cbab8891c76502110628f5e536a25e447113299210dafa3f90b6705e98e26.jpg) +(b) Linear profiles when $c = 1$ + +![](images/be8ae9205d21aae59cfa2c6e70ff8c8f82e6486ba678dce6095f40ca1906be3d.jpg) +(c) Polynomial profiles +Figure 5. Plots by varying the ability parameter for various families of ability profiles with an additive uniform noise when the noise level $\sigma = 0.1$ . Observe that the width of the domain $\alpha(s)$ is the largest when the average ability $E(s) = 0.5$ and is the smallest (0) when $E(s) \equiv 0$ or 1. This noise level indicates that the best worker always completes the subskill flawlessly ( $\alpha(s) \equiv 1$ ), the worst worker always fails at the subskill ( $\alpha(s) \equiv 0$ ), while the performance of a medium worker exhibits greater variability. + +# B.2. Stochastic dominance for ability profiles + +We first define the stochastic dominance property for ability profiles. + +Definition B.1 (Stochastic dominance for ability profiles). Let $\alpha, \alpha'$ be two ability profiles parameterized by ability parameter $\mu, \mu'$ , respectively, and the same noise parameter $\sigma$ . Suppose $\mu \leq \mu'$ . We say $\alpha$ has stochastic dominance over $\alpha'$ if for any $s \in [0,1]$ and $x \geq 0$ : + +$$ +\operatorname * {P r} _ {\zeta \sim \alpha (s)} [ \zeta \geq x ] \leq \operatorname * {P r} _ {\zeta^ {\prime} \sim \alpha^ {\prime} (s)} [ \zeta^ {\prime} \geq x ]. +$$ + +We propose the following proposition that shows that the studied ability profiles have stochastic dominance properties. + +Proposition B.1 (Stochastic dominance for ability profiles). The following hold: + +- Constant profile Let $\alpha \equiv c + \varepsilon$ for some $c \in [0,1]$ and $\varepsilon \sim \min \{c, 1 - c\} \cdot \mathrm{Unif}[-\sigma, \sigma]$ for some $\sigma \in [0,1]$ . Let $\alpha' \equiv c' + \varepsilon(s)$ for some $c' \in [0,1]$ with $c \leq c'$ and $\varepsilon(s) \sim \mathrm{Unif}[-\sigma, \sigma]$ . Then $\alpha$ has stochastic dominance over $\alpha'$ . +- Slope parameter for linear profile Let $\alpha(s) = 1 - (1 - a)s + \varepsilon(s)$ for some $a \in [0,1]$ and noise $\varepsilon(s) \sim \min \{(1 - a)s, 1 - (1 - a)s\} \cdot \mathrm{Unif}[-\sigma, \sigma]$ . Let $\alpha'(s) = 1 - (1 - a')s + \varepsilon(s)$ for some $a' \in [0,1]$ with $a \leq a'$ and noise $\varepsilon(s) \sim \mathrm{Unif}[-\min \{(1 - a')s, 1 - (1 - a')s\} \sigma, \min \{(1 - a')s, 1 - (1 - a')s\} \sigma]$ . Then $\alpha$ has stochastic dominance over $\alpha'$ . +- Polynomial profile Let $\alpha(s) = 1 - s^{\beta} + \varepsilon(s)$ for some $\beta \in [0,1]$ and noise $\varepsilon(s) \sim \min\{s^{\beta}, 1 - s^{\beta}\}$ . Unif[- $\sigma, \sigma$ ]. Let $\alpha'(s) = 1 - s^{\beta'} + \varepsilon(s)$ for some $\beta' \in [0,1]$ with $\beta \leq \beta'$ and noise $\varepsilon(s) \sim \text{Unif}[-\min\{s^{\beta'}, 1 - s^{\beta'}\} \sigma, \min\{s^{\beta'}, 1 - s^{\beta'}\} \sigma]$ . Then $\alpha$ has stochastic dominance over $\alpha'$ . + +The first two items ensure that ability profiles satisfy stochastic dominance with respect to both ability parameters $c$ and $a$ . + +Proof of Proposition B.1. We prove for each family of ability profiles. + +Constant profile. For any $x \geq 0$ , we have + +$$ +\operatorname * {P r} _ {\zeta \sim \alpha (s)} [ \zeta \geq x ] = \min \left\{1, \max \left\{0, \frac {x - (1 - c) + \min \left\{c , 1 - c \right\} \cdot \sigma}{2 \min \left\{c , 1 - c \right\} \cdot \sigma} \right\} \right\}, +$$ + +Note that when $1 - c \leq 0.5$ , we have + +$$ +\frac {x - (1 - c) + \min \{c , 1 - c \} \cdot \sigma}{2 \min \{c , 1 - c \} \cdot \sigma} = - \frac {1}{2 \sigma} + 0. 5 + \frac {x}{2 (1 - c) \sigma}, +$$ + +which is increasing with $c$ . When $1 - c > 0.5$ , we have + +$$ +\frac {x - (1 - c) + \min \left\{c , 1 - c \right\} \cdot \sigma}{2 \min \left\{c , 1 - c \right\} \cdot \sigma} = \frac {1}{2 \sigma} + 0. 5 - \frac {1 - x}{2 c \sigma}, +$$ + +which is increasing with $c$ . Overall, $\operatorname{Pr}_{\zeta \sim \alpha(s)}[\zeta \geq x]$ is increasing with $c$ . Thus, since $c \leq c'$ , we have $\operatorname{Pr}_{\zeta \sim \alpha(s)}[\zeta \geq x] \leq \operatorname{Pr}_{\zeta' \sim \alpha'(s)}[\zeta' \geq x]$ . + +Linear profile. For any $x \in [0,1]$ and $s \in [0,1]$ , we have + +$$ +\operatorname * {P r} _ {\zeta \sim \alpha (s)} [ \zeta \geq x ] = \min \left\{1, \max \left\{0, \frac {x - (1 - a) s + \min \left\{(1 - a) s , 1 - (1 - a) s \right\} \sigma}{2 \min \left\{(1 - a) s , 1 - (1 - a) s \right\} \sigma} \right\} \right\}. +$$ + +Note that when $(1 - a)s\leq 0.5$ , we have + +$$ +\frac {x - (1 - a) s + \min \left\{(1 - a) s , 1 - (1 - a) s \right\} \sigma}{2 \min \left\{(1 - a) s , 1 - (1 - a) s \right\} \sigma} = - \frac {1}{2 \sigma} + 0. 5 + \frac {x}{2 (1 - a) s \sigma}, +$$ + +which is increasing with $a$ . When $(1 - a)s > 0.5$ , we have + +$$ +\frac {x - (1 - a) s + \min \left\{(1 - a) s , 1 - (1 - a) s \right\} \sigma}{2 \min \left\{(1 - a) s , 1 - (1 - a) s \right\} \sigma} = \frac {1}{2 \sigma} + 0. 5 - \frac {1 - x}{2 (1 - (1 - a) s) \sigma}, +$$ + +which is increasing with $a$ . Overall, $\operatorname{Pr}_{\zeta \sim \alpha(s)}[\zeta \geq x]$ is increasing with $a$ . Since $a \leq a'$ , we have $\operatorname{Pr}_{\zeta \sim \alpha(s)}[\zeta \geq x] \leq \operatorname{Pr}_{\zeta' \sim 1 - \alpha'(s)}[\zeta' \geq x]$ . + +Polynomial profile. For any $x \in [0,1]$ and $s \in [0,1]$ , we have + +$$ +\operatorname * {P r} _ {\zeta \sim \alpha (s)} [ \zeta \geq x ] = \min \left\{1, \max \left\{0, \frac {x - s ^ {\beta} + \min \left\{s ^ {\beta} , 1 - s ^ {\beta} \right\} \sigma}{2 \min \left\{s ^ {\beta} , 1 - s ^ {\beta} \right\} \sigma} \right\} \right\}. +$$ + +Note that when $s^\beta \leq 0.5$ , we have + +$$ +\frac {x - s ^ {\beta} + \min \left\{s ^ {\beta} , 1 - s ^ {\beta} \right\} \sigma}{2 \min \left\{s ^ {\beta} , 1 - s ^ {\beta} \right\} \sigma} = - \frac {1}{2 \sigma} + 0. 5 + \frac {x}{2 s ^ {\beta} \sigma}, +$$ + +which is increasing with $\beta$ . When $s^{\beta} > 0.5$ , we have + +$$ +\frac {x - s ^ {\beta} + \min \left\{s ^ {\beta} , 1 - s ^ {\beta} \right\} \sigma}{2 \min \left\{s ^ {\beta} , 1 - s ^ {\beta} \right\} \sigma} = \frac {1}{2 \sigma} + 0. 5 - \frac {1 - x}{2 (1 - s ^ {\beta}) \sigma}, +$$ + +which is increasing with $\beta$ . Overall, $\operatorname{Pr}_{\zeta \sim \alpha(s)}[\zeta \geq x]$ is increasing with $\beta$ . Since $\beta \leq \beta'$ , we have $\operatorname{Pr}_{\zeta \sim \alpha(s)}[\zeta \geq x] \leq \operatorname{Pr}_{\zeta' \sim \alpha'(s)}[\zeta' \geq x]$ . + +Thus, we complete the proof of Proposition B.1. + +# C. Proofs of results in Section 3 and extensions + +In this section, we provide the omitted proofs of the results in Section 3 and demonstrate how to extend them to accommodate general and dependent noise models. We further extend the analysis of linear ability profiles from Section 3.2 to alternative choices of job error functions and ability profile families (see Section C.2). + +# C.1. Proof of Theorem 3.2: Phase transition in success probability + +We prove a generalized version of Theorem 3.2 that accommodates arbitrary noise models $\varepsilon(s)$ , extending beyond the uniform and truncated normal distributions introduced in Section 2. + +We first need the following notion that captures the dispersion degree of ability profiles $(\alpha_{1},\alpha_{2})$ + +Definition C.1 (Subgaussian constant and maximum dispersion). Let $\alpha_{\ell}$ be parameterized by $\mu_{\ell},\sigma_{\ell}\geq 0$ . For each subskill $s_{j\ell}$ , define the smallest constant $\mathrm{sg}_{j\ell}(\mu_{\ell},\sigma_{\ell})$ such that for all $\beta \in \mathbb{R}$ + +$$ +\mathbb {E} _ {X \sim \alpha_ {\ell} (s _ {j \ell})} \left[ e ^ {\beta (X - \mathbb {E} [ X ])} \right] \leq \exp (\frac {\mathrm {s g} _ {j \ell} (\mu_ {\ell} , \sigma_ {\ell}) ^ {2} \beta^ {2}}{2}). +$$ + +We define the subgaussian constant as: + +$$ +\operatorname {sg}\bigl(\mu_{1},\sigma_{1},\mu_{2},\sigma_{2}\bigr):= \sum_{j\in [n],\ell \in \{1,2\}}\operatorname{sg}_{j\ell}(\mu_{\ell},\sigma_{\ell})^{2}. +$$ + +Given $\sigma_1, \mu_2, \sigma_2$ , the maximum dispersion over $\mu_1$ is defined as: + +$$ +\operatorname {M a x D i s p} _ {\mu_ {1}} (\sigma_ {1}, \mu_ {2}, \sigma_ {2}) := \sup _ {\mu_ {1} \geq 0} \operatorname {s g} (\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}). +$$ + +$\mathrm{MaxDisp}_{\mu_2}(\sigma_2,\mu_1,\sigma_1)$ is defined similarly. + +Intuitively, the subgaussian constant $\mathrm{sg}_{j\ell}$ quantifies the variability of a subskill's ability distribution around its mean (van Handel, 2014; Vershynin, 2018). The maximum dispersion MaxDisp captures the cumulative uncertainty across all subskills by aggregating the subgaussian parameters. For example, under uniform noise $\varepsilon(s)$ , we have $\mathrm{sg}_{j\ell} \leq \sigma_{\ell}^{2}/4$ , yielding $\mathrm{MaxDisp}_{\mu_1}(\sigma_1, \mu_2, \sigma_2) \leq n(\sigma_1^2 + \sigma_2^2)/4$ . Under truncated normal noise, $\mathrm{sg}_{j\ell} \leq \sigma_{\ell}^{2}$ , giving $\mathrm{MaxDisp}_{\mu_1}(\sigma_1, \mu_2, \sigma_2) \leq n(\sigma_1^2 + \sigma_2^2)$ . As the noise parameters $\sigma_{\ell}$ increase, MaxDisp also increases, reflecting greater dispersion in ability. In the deterministic case where $\sigma_1 = \sigma_2 = 0$ , we have $\mathrm{MaxDisp} = 0$ , indicating no uncertainty in abilities. + +We propose the following generalized version of Theorem 3.2, where the term $n(\sigma_1^2 + \sigma_2^2)$ in $\gamma_1$ (designed for both uniform and truncated normal noises) is replaced by the more general quantity $\mathrm{MaxDisp}_{\mu_1}(\sigma_1, \mu_2, \sigma_2)$ . + +Theorem C.1 (Extension of Theorem 3.2 to general noise models). Fix the job instance, action-level ability $\mu_{2}$ , and noise levels $\sigma_{1},\sigma_{2}$ . Let $\mu_1^c$ be the unique value such that the expected job error equals the success threshold: + +$$ +\operatorname {E r r} _ {\text {a v g}} \left(\mu_ {1} ^ {c}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) = \tau . +$$ + +Let $\theta \in (0, 0.5)$ be a confidence level, and define the transition width: $\gamma_1 := \frac{L \sqrt{\operatorname*{MaxDisp}_{\mu_1} (\sigma_1, \mu_2, \sigma_2) \cdot \ln(1 / \theta)}}{\operatorname*{MinDer}_{\mu_1} (\sigma_1, \mu_2, \sigma_2)}$ , where $L$ is the Lipschitz constant of the job error function. Then the job success probability satisfies: + +$$ +P \leq \theta \text {i f} \mu_ {1} \leq \mu_ {1} ^ {c} - \gamma_ {1} \text {a n d} P \geq 1 - \theta \text {i f} \mu_ {1} \geq \mu_ {1} ^ {c} + \gamma_ {1}. +$$ + +For preparation, we first introduce the following variant of McDiarmid's inequality. Given a random variable $X$ on $\mathbb{R}$ , we define $\| X\|_{\psi_2}$ to be the smallest number $a\geq 0$ such that for any $\beta \in \mathbb{R},\mathbb{E}\left[e^{\beta X}\right]\leq e^{\beta^2 a^2 /2}$ . + +Theorem C.2 (Refinement of Theorem 1 in (Kontorovich, 2014)). Let $G: \mathbb{R}^T \to \mathbb{R}$ be a 1-lipschitz function. Suppose $X_1, \ldots, X_T$ are independent random variables. Then we have for any $t > 0$ , + +$$ +\operatorname * {P r} _ {X _ {1}, \ldots , X _ {T}} \left[ G (X _ {1}, \ldots , X _ {T}) \geq \mathbb {E} \left[ G (X _ {1}, \ldots , X _ {T}) \right] + t \right] \leq e ^ {- \frac {2 t ^ {2}}{\sum_ {j \in [ T ]} \| X _ {j} - \mathbb {E} [ X _ {j} ] \| _ {\psi_ {2}} ^ {2}}}, +$$ + +and + +$$ +\operatorname * {P r} _ {X _ {1}, \ldots , X _ {T}} \left[ G (X _ {1}, \ldots , X _ {T}) \leq \mathbb {E} \left[ G (X _ {1}, \ldots , X _ {T}) \right] - t \right] \leq e ^ {- \frac {2 t ^ {2}}{\sum_ {j \in [ T ]} \| X _ {j} - \mathbb {E} [ X _ {j} ] \| _ {\psi_ {2}} ^ {2}}}. +$$ + +The theorem provides a concentration bound for the function value of $G$ when its input variables are independent subgaussian. Now we are ready to prove Theorem C.1. + +Proof of Theorem C.1. Recall that Err is a function of $2n$ realized subskill abilities $\zeta_{j\ell}$ . By Assumption 3.1, $\zeta_{j\ell}$ s are independent random variables. Moreover, by Definition C.1, we know that + +$$ +\mathrm {s g} _ {j} (\mu_ {\ell}, \sigma_ {\ell}) = \| \zeta_ {j \ell} - \mathbb {E} _ {\zeta \sim 1 - \alpha_ {\ell} (s _ {j \ell})} [ \zeta ] \| _ {\psi_ {2}} ^ {2}, +$$ + +and hence, + +$$ +\mathrm {s g} (\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}) = \sum_ {j \in [ n ], \ell \in \{1, 2 \}} \mathrm {s g} _ {j} (\mu_ {\ell}, \sigma_ {\ell}) = \sum_ {j \in [ n ], \ell \in \{1, 2 \}} \| \zeta_ {j \ell} - \mathbb {E} _ {\zeta \sim 1 - \alpha_ {\ell} (s _ {j \ell})} [ \zeta ] \| _ {\psi_ {2}} ^ {2}. +$$ + +Since Err is $L$ -lipschitz, function $\frac{1}{L} \cdot \mathrm{Err}$ is 1-lipschitz. Also, recall that $\mathrm{Err}_{\mathrm{avg}}(\mu_1, \sigma_1, \mu_2, \sigma_2) := \mathbb{E}_{\zeta_{j\ell} \sim 1 - \alpha_\ell(s_{j\ell})}[\mathrm{Err}(\zeta)]$ . + +Now we plugin $T = 2n$ , $G = \frac{1}{L} \cdot \mathsf{Err}$ , $X_{j}\mathsf{s}$ being $\zeta_{j\ell}\mathsf{s}$ in Theorem C.2. We obtain that for any $t > 0$ + +$$ +\begin{array}{l} \operatorname * {P r} _ {\zeta_ {j \ell}} [ \mathsf {E r r} (\zeta) \geq \mathsf {E r r} _ {\mathrm {a v g}} (\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}) + t ] = \operatorname * {P r} _ {\zeta_ {j \ell}} \left[ \frac {1}{L} \cdot \mathsf {E r r} (\zeta) \geq \frac {1}{L} \cdot \mathsf {E r r} _ {\mathrm {a v g}} (\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}) + \frac {t}{L} \right] \\ \leq e ^ {- \frac {2 t ^ {2}}{L ^ {2} \mathrm {s g} (\mu_ {1} , \sigma_ {1} , \mu_ {2} , \sigma_ {2})}}, \\ \end{array} +$$ + +and + +$$ +\Pr_ {\zeta_ {j \ell}} \left[ \operatorname {E r r} (\zeta) \leq \operatorname {E r r} _ {\text {a v g}} \left(\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) - t \right] \leq e ^ {- \frac {2 t ^ {2}}{L ^ {2} \operatorname {s g} \left(\mu_ {1} , \sigma_ {1} , \mu_ {2} , \sigma_ {2}\right)}}. \tag {2} +$$ + +Note that $\mathrm{MaxDisp}_{\mu_1}(\sigma_1,\mu_2,\sigma_2)\geq \mathrm{sg}(\mu_1,\sigma_1,\mu_2,\sigma_2)$ . Thus, when $t = L\cdot \sqrt{\mathrm{MaxDisp}_{\mu_1}(\sigma_1,\mu_2,\sigma_2)\cdot\ln\frac{1}{\theta}}$ , we have + +$$ +\operatorname * {P r} _ {\zeta_ {j \ell}} [ \mathsf {E r r} (\zeta) \geq \mathsf {E r r} _ {\mathrm {a v g}} (\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}) + t ] \leq \theta \text {a n d} \operatorname * {P r} _ {\zeta_ {j \ell}} [ \mathsf {E r r} (\zeta) \leq \mathsf {E r r} _ {\mathrm {a v g}} (\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}) - t ] \leq \theta . +$$ + +This implies that if $\operatorname{Err}_{\mathrm{avg}}(\mu_1, \sigma_1, \mu_2, \sigma_2) \leq \tau - t$ + +$$ +\Pr_ {\zeta_ {j \ell}} [ \operatorname {E r r} (\zeta) \leq \tau ] \geq 1 - \Pr_ {\zeta_ {j \ell}} [ \operatorname {E r r} (\zeta) > \operatorname {E r r} _ {\text {a v g}} \left(\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) + t ] \geq 1 - \theta . \tag {3} +$$ + +Also, if $\mathsf{Err}_{\mathrm{avg}}(\mu_1,\sigma_1,\mu_2,\sigma_2)\geq \tau +t$ + +$$ +\operatorname * {P r} _ {\zeta_ {j \ell}} [ \mathsf {E r r} (\zeta) \leq \tau ] \leq \operatorname * {P r} _ {\zeta_ {j \ell}} [ \mathsf {E r r} (\zeta) > \mathsf {E r r} _ {\mathrm {a v g}} (\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}) - t ] \leq \theta . \tag {4} +$$ + +Recall that $\gamma_{1} := \frac{L\sqrt{\operatorname*{MaxDisp}_{\mu_{1}}(\sigma_{1},\mu_{2},\sigma_{2})\cdot\ln(1 / \theta)}}{\operatorname*{MinDer}_{\mu_{1}}(\sigma_{1},\mu_{2},\sigma_{2})} = \frac{t}{\operatorname*{MinDer}_{\mu_{1}}(\sigma_{1},\mu_{2},\sigma_{2})}$ . Then it suffices to prove the following lemma. + +Lemma C.3. Let $t > 0$ . Under Assumption 3.1, if $\mu_1 \leq \mu_1^c - \frac{t}{\mathrm{MinDer}_{\mu_1}(\sigma_1, \mu_2, \sigma_2)}$ , then $\mathsf{Err}_{avg}(\mu_1, \sigma_1, \mu_2, \sigma_2) \geq \tau + t$ ; and if $\mu_1 \geq \mu_1^c + \frac{t}{\mathrm{MinDer}_{\mu_1}(\sigma_1, \mu_2, \sigma_2)}$ , then $\mathsf{Err}_{avg}(\mu_1, \sigma_1, \mu_2, \sigma_2) \leq \tau - t$ . + +Proof. We first prove that $\frac{\partial\mathrm{Err}_{\mathrm{avg}}}{\partial\mu_1} (\mu_1,\sigma_1,\mu_2,\sigma_2)\leq 0$ . It suffices to prove that for any $\mu ,\mu^{\prime}$ with $\mu \geq \mu^{\prime}$ $\mathrm{Err}_{\mathrm{avg}}(\mu ,\sigma_1,\mu_2,\sigma_2)\leq \mathrm{Err}_{\mathrm{avg}}(\mu ',\sigma_1,\mu_2,\sigma_2)$ . Let $\alpha_{1}$ be parameterized by $(\mu ,\sigma_{1})$ $\alpha_{1}^{\prime}$ be parameterized by $(\mu^{\prime},\sigma_{1})$ and $\alpha_{2}$ be parameterized by $(\mu_{2},\sigma_{2})$ . By Proposition B.1, we know that $\alpha_{1}^{\prime}$ has stochastic dominance over $\alpha_{1}$ . Thus, for every $j\in [n]$ , there exists a coupling of $(\zeta ,\zeta ')$ for $\zeta \sim 1 - \alpha_{1}(s_{j\ell})$ and $\zeta^\prime \sim 1 - \alpha_1'(s_j\ell)$ such that $\zeta \leq \zeta '$ . Let $\pi_{j}$ be the joint probability density function of $(\zeta ,\zeta ')$ . We have $\int_{\zeta '} \pi_j(\zeta ,\zeta ')d\zeta = \alpha_1(s_{j1})(\zeta)$ and $\int_{\zeta}\pi_{j}(\zeta ,\zeta^{\prime})d\zeta = \alpha_{1}^{\prime}(s_{j1})(\zeta)$ . Let $\pi_{j}$ be the joint probability density function of $(\zeta_{j1},\zeta_{j1}^{\prime})$ . We have $\int_{\zeta '}\pi_j(\zeta ,\zeta ')d\zeta = \alpha_1(s_{j1})(\zeta)$ and $\int_{\zeta}\pi_{j}(\zeta ,\zeta^{\prime})d\zeta = \alpha_{1}^{\prime}(s_{j1})(\zeta)$ Then we have + +$$ +\begin{array}{l} \mathsf {E r r} _ {\mathrm {a v g}} (\mu , \sigma_ {1}, \mu_ {2}, \sigma_ {2}) = \mathbb {E} _ {\zeta_ {j \ell} \sim 1 - \alpha_ {\ell} (s _ {j \ell})} [ \mathsf {E r r} (\zeta) ] \\ = \int \prod_ {j} \pi_ {j} \left(\zeta_ {j \ell}, \zeta_ {j \ell} ^ {\prime}\right) \operatorname {E r r} (\zeta) d \zeta_ {j \ell} \quad \text {(A s s u m p t i o n 3 . 1 a n d D e f n . o f} \pi_ {j}) \\ \leq \int \prod_ {j} \pi_ {j} \left(\zeta_ {j \ell}, \zeta_ {j \ell} ^ {\prime}\right) \operatorname {E r r} \left(\zeta^ {\prime}\right) d \zeta_ {j \ell} \quad (\text {M o n t o n i c i t y o f E r r}) \\ \leq \mathbb {E} _ {\zeta_ {j 1} \sim 1 - \alpha_ {1} ^ {\prime} (s _ {j 1}), \zeta_ {j 2} \sim 1 - \alpha_ {2} (s _ {j 2})} [ \mathsf {E r r} (\zeta) ] \quad \left(\int_ {\zeta} \pi_ {j} (\zeta , \zeta^ {\prime}) d \zeta = \alpha_ {1} ^ {\prime} (s _ {j 1}) (\zeta)\right) \\ \leq \operatorname {E r r} _ {\operatorname {a v g}} \left(\mu^ {\prime}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}\right). \\ \end{array} +$$ + +Thus, if $\mu_1 < \mu_1^c - \frac{t}{\mathrm{MinDer}_{\mu_1}(\sigma_1, \mu_2, \sigma_2)}$ , we have + +$$ +\begin{array}{l} \operatorname {E r r} _ {\operatorname {a v g}} \left(\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) \geq \operatorname {E r r} _ {\operatorname {a v g}} \left(\mu_ {1} ^ {c}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) + \left(\mu_ {1} ^ {c} - \mu_ {1}\right) \cdot \operatorname {M i n D e r} _ {\mu_ {1}} \left(\sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) \quad (\text {D e f n . o f M i n D e r} _ {\mu_ {1}} \left(\sigma_ {1}, \mu_ {2}, \sigma_ {2}\right)) \\ \geq \tau + \frac {t}{\operatorname {M i n D e r} _ {\mu_ {1}} \left(\sigma_ {1} , \mu_ {2} , \sigma_ {2}\right)} \cdot \operatorname {M i n D e r} _ {\mu_ {1}} \left(\sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) \quad \left(\operatorname {E r r} _ {\text {a v g}} \left(\mu_ {1} ^ {c}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) = \tau\right) \\ = \tau + t. \\ \end{array} +$$ + +Similarly, we can prove that if $\mu_1 > \mu_1^c + \frac{t}{\mathrm{MinDer}_{\mu_1}(\sigma_1, \mu_2, \sigma_2)}$ , then $\mathrm{Err}_{\mathrm{avg}}(\mu_1, \sigma_1, \mu_2, \sigma_2) < \tau - t$ . This completes the proof of Lemma C.3. + +Combined with Lemma C.3, we have completed the proof. + +# C.2. Bounding $\gamma_{1}$ for alternative choices of error functions and ability profiles + +Similar to the illustrative example in Section 3.2, we analyze the window $\gamma_{1}$ in Theorem 3.2 for alternative choices of the error functions $h,g,f$ and ability profiles $\alpha_{1},\alpha_{2}$ . We consider uniform noise such that $\mathrm{MinDer}_{\mu_1}(\sigma_1,\mu_2,\sigma_2)\leq \frac{n\sigma^2}{4}$ . Then the key is to bound the Lipschitz constant $L$ and $\mathrm{MinDer}_{\mu_1}(\sigma_1,\mu_2,\sigma_2)$ . + +Analysis for max functions. Let $h, g, f$ be max such that $\mathsf{Err}(\zeta) = \max_{j \in [n], \ell \in \{1,2\}} \zeta_{j\ell}$ . Suppose the ability profile is linear with noise: $\alpha_{\ell}(s) = 1 - (1 - a_{\ell})s + \varepsilon(s)$ , where $\varepsilon(s) \sim \mathrm{Unif}[-\sigma, \sigma]$ . We can compute that + +$$ +P = \prod_ {j \in [ n ], \ell \in \{1, 2 \}} \Pr [ \zeta_ {j \ell} \leq \tau ]. +$$ + +Below, we analyze the window of the phase transition for this case from both the positive and negative sides of the parameter range. + +A positive example. Assume all $s_{j\ell} = 0.5$ , $a_1^c = a_2 = 0.5$ , and $\tau = 0.75 + \frac{\sigma}{4} - \frac{\sigma}{4n}$ . Then each $\operatorname*{Pr}[\zeta_{j\ell} \leq \tau]$ is $1 - \frac{1}{2n}$ , implying that + +$$ +P = \prod_ {j \in [ n ], \ell \in \{1, 2 \}} \operatorname * {P r} [ \zeta_ {j \ell} \leq \tau ] = (1 - \frac {1}{2 n}) ^ {2 n} \approx 1 / e. +$$ + +Let $\gamma_{1} = 4\sigma /n$ . On one hand, if $a_1 = a_1^c -\gamma_1$ , we can compute that for each $j\in [n]$ $\operatorname *{Pr}[\zeta_{j1}\leq \tau ]\leq 1 - \frac{2}{n}$ Then + +$$ +P \leq (1 - \frac {1}{2 n}) ^ {n} \cdot (1 - \frac {2}{n}) ^ {n} \leq 1 / e ^ {2} < 0. 1 4. +$$ + +On the other hand, if $a_1 = a_1^c + \gamma_1$ , $\operatorname{Pr}[\zeta_{j1} \leq \tau] = 1$ for each $j \in [n]$ . Then + +$$ +P = (1 - \frac {1}{2 n}) ^ {n} \geq 0. 6. +$$ + +Thus, increasing $a_1$ from below $a_1^c - \gamma_1$ to above $a_1^c + \gamma_1$ results in a probability gain of 0.46. The window of this phase transition is only $\gamma_1 = O(\sigma / n)$ , which is even sharper than the $O(\sigma / \sqrt{n})$ window observed for the average error function. + +A negative example. Assume all $s_{j\ell} = 0$ except that $s_{11} = 1$ , $a_1^c = a_2 = 0.5$ , $\sigma = 0.25$ and $\tau = 0.5$ . Then + +$$ +P = \prod_ {j \in [ n ], \ell \in \{1, 2 \}} \Pr [ \zeta_ {j \ell} \leq \tau ] = \Pr [ \zeta_ {1 1} \leq 0. 5 ] = 0. 5. +$$ + +We can also compute that for $a_1 \in (0.35, 0.65)$ , + +$$ +P = \Pr [ \zeta_ {1 1} \leq 0. 5 ] = 0. 5 - \frac {a _ {1} - 0 . 5}{\min \left\{a _ {1} , 1 - a _ {1} \right\}}, +$$ + +which is close to a linear function of $a_1$ . Then the window of phase transition is $O(1)$ , yielding a smooth, non-abrupt transition. + +Analysis for weighted average functions. We still select the skill error function $h(\zeta_1, \zeta_2) = \frac{1}{2} (\zeta_1 + \zeta_2)$ as the average function. Given an importance vector $w \in [0, 1]^n$ for skills (e.g., derived from O*NET), we select the task error function + +$$ +g (\{h _ {j} \} _ {j \in T _ {i}}) = \frac {1}{\sum_ {j \in T _ {j}} w _ {j}} \sum_ {j \in T _ {j}} w _ {j} h _ {j}, +$$ + +to be the weighted average function, where $\frac{1}{\sum_{j\in T_j}w_j}$ is a normalization factor. Give an importance vector $v\in [0,1]^m$ for tasks (e.g., derived from O*NET), we select the job error function + +$$ +f (g _ {1}, \ldots , g _ {m}) = \frac {1}{\sum_ {i \in [ m ]} v _ {i}} \sum_ {i \in [ m ]} v _ {i} g _ {i}, +$$ + +to be the weighted average function, where $\frac{1}{\sum_{i\in[m]}v_i}\sum_{i\in [m]}$ is a normalization factor. Then we have that their composition function is: + +$$ +\operatorname {E r r} (\zeta) = \sum_ {j \in [ n ]} \frac {1}{2} \sum_ {i \in [ m ]: j \in T _ {i}} \frac {v _ {i}}{\sum_ {i ^ {\prime} \in [ m ]} v _ {i ^ {\prime}}} \frac {w _ {j}}{\sum_ {j ^ {\prime} \in [ T _ {i} ]} w _ {j ^ {\prime}}} \left(\zeta_ {j 1} + \zeta_ {j 2}\right). \tag {5} +$$ + +We have the following observation for the Lipschitzness of Err. + +Proposition C.4 (Lipschitzness of Err in Equation (5)). The lipschitzness constant of Err in Equation (5) is $L \leq \frac{1}{2} \max_{j \in [n]} \sum_{i \in [m]: j \in T_i} \frac{v_i}{\sum_{i' \in [m]} v_{i'}} \frac{w_j}{\sum_{j' \in [T_i]} w_{j'}}$ . + +For instance, when each $w_{j} = \frac{1}{n}$ and $v_{i} = \frac{1}{m}$ , we have $L \leq \frac{1}{2} \max_{j \in [n]} \sum_{i \in [m]: j \in T_{i}} \frac{1}{m|T_{i}|}$ . Specifically, when each $T_{i}$ contains $k$ skills and each skill appears in $\frac{km}{n}$ tasks, we have $L \leq \frac{1}{2n}$ . Suppose the ability profile is linear with noise: $\alpha_{\ell}(s) = 1 - (1 - a_{\ell})s + \varepsilon(s)$ , where $\varepsilon(s) \sim \text{Unif}[-\sigma, \sigma]$ . Similarly, we can compute that + +$$ +\mathrm {M i n D e r} _ {a _ {1}} (\sigma , a _ {2}, \sigma) = \frac {1}{2} \sum_ {j \in [ n ]} \sum_ {i \in [ m ]: j \in T _ {i}} \frac {v _ {i}}{\sum_ {i ^ {\prime} \in [ m ]} v _ {i ^ {\prime}}} \frac {w _ {j}}{\sum_ {j ^ {\prime} \in [ T _ {i} ]} w _ {j ^ {\prime}}} s _ {j 1}. +$$ + +Then we have the following bound for $\gamma_{1}$ : + +$$ +\gamma_ {1} = \frac {L \sqrt {0 . 5 n \sigma^ {2} \cdot \ln (1 / \theta)}}{\mathrm {M i n D e r} _ {\mu_ {1}} (\sigma_ {1} , \mu_ {2} , \sigma_ {2})} \leq \frac {\max _ {j \in [ n ]} \sum_ {i \in [ m ] : j \in T _ {i}} \frac {v _ {i}}{\sum_ {i ^ {\prime} \in [ m ]} v _ {i ^ {\prime}}} \frac {w _ {j}}{\sum_ {j ^ {\prime} \in [ T _ {i} ]} w _ {j ^ {\prime}}} \cdot \sqrt {0 . 5 n \sigma^ {2} \cdot \ln (1 / \theta)}}{\sum_ {j \in [ n ]} \sum_ {i \in [ m ] : j \in T _ {i}} \frac {v _ {i}}{\sum_ {i ^ {\prime} \in [ m ]} v _ {i ^ {\prime}}} \frac {w _ {j}}{\sum_ {j ^ {\prime} \in [ T _ {i} ]} w _ {j ^ {\prime}}} s _ {j 1}}. +$$ + +Analysis for constant profiles. We select $\alpha_{\ell} = c_{\ell} + \min \{c_{\ell},1 - c_{\ell}\}$ Unif[-σ,σ] as constant profiles with noise level σ as detailed in Section B.1. We still let $\mathsf{Err}(\zeta) = \frac{1}{2n}\sum_{j = 1}^{n}(\zeta_{j1} + \zeta_{j2})$ , where $L\leq \frac{1}{2n}$ . Note that MinDer $c_{1}(\sigma ,c_{2},\sigma) = \frac{1}{2}$ Then we have the following bound for $\gamma_{1}$ .. + +$$ +\gamma_ {1} = \frac {L \sqrt {0 . 5 n \sigma^ {2} \cdot \ln (1 / \theta)}}{\mathrm {M i n D e r} _ {c _ {1}} (\sigma , c _ {2} , \sigma)} \leq \sigma \cdot \sqrt {\frac {\ln (1 / \theta)}{2 n}}. +$$ + +Analysis for polynomial profiles. We select $\alpha_{\ell} \equiv 1 - s^{\beta_{\ell}} + \min \left\{s^{\beta_{\ell}}, 1 - s^{\beta_{\ell}}\right\}$ Unif $[- \sigma, \sigma]$ as polynomial profiles with noise level $\sigma$ . We still let $\mathsf{Err}(\zeta) = \frac{1}{2n} \sum_{j=1}^{n} (\zeta_{j1} + \zeta_{j2})$ , where $L \leq \frac{1}{2n}$ . Then we have + +$$ +\left| \frac {\partial \mathsf {E r r} _ {\mathrm {a v g}}}{\partial \beta_ {1}} (\beta_ {1}, \sigma , \beta_ {2}, \sigma) \right| = \frac {\beta_ {1}}{2 n} \sum_ {j = 1} ^ {n} s _ {j 1} ^ {\beta_ {1} - 1}. +$$ + +Note that this partial derivative is 0 when $\beta_{1} = 0$ , which results in $\mathrm{MinDer}_{\beta_1}(\sigma ,\beta_2,\sigma) = 0$ and $\gamma_{1} = \infty$ . + +However, by the proof of Theorem C.1, it suffices to bound the partial derivative for $\beta_{1}\in [\beta_{1}^{c} - \gamma_{1},\beta_{1}^{c} + \gamma_{1}]$ instead of the entire domain $\mathbb{R}_{\geq 0}$ . Suppose we know that $[\beta_1^c -\gamma_1,\beta_1^c +\gamma_1]\subseteq [0.5,2]$ ; this implies that + +$$ +\frac {\beta_ {1}}{2 n} \sum_ {j = 1} ^ {n} s _ {j 1} ^ {\beta_ {1} - 1} \geq \frac {1}{4 n} \sum_ {j = 1} ^ {n} s _ {j 1}. +$$ + +![](images/17ea4ba70001fcec5de9534f7ffad07f93611050d4232adaf3b4f5cc43938d36.jpg) +Figure 6. Heatmaps of productivity compression value $\mathrm{PC} = (P_2 - P_1) - (P_2' - P_1')$ by merging a low-skilled human worker with action-level ability parameter $a_1$ and a high-skilled human worker with action-level ability parameter $a_2$ with a GenAI tool for different ranges of $(a_1, a_2)$ for the Computer Programmers example with default settings of $\tau = 0.45$ . + +Thus, we have the following bound for $\gamma_{1}$ : + +$$ +\gamma_ {1} = \frac {L \sqrt {0 . 5 n \sigma^ {2} \cdot \ln (1 / \theta)}}{\frac {1}{4 n} \sum_ {j = 1} ^ {n} s _ {j 1}} \leq \sigma \cdot \sqrt {\frac {2 n \cdot \ln (1 / \theta)}{\sum_ {j = 1} ^ {n} s _ {j 1}}}. +$$ + +# C.3. Proof of Theorem 3.3: Success gain from merging complementary workers + +Similar to Section C.1, we extend Theorem 3.3 to handle a general noise model $\varepsilon(s)$ . The only difference is still the introduction of MaxDisp. + +Theorem C.5 (Extension of Theorem 3.3 to general noise models). Fix the job instance. Let $\theta \in (0,0.5)$ be a confidence level, and define: $\gamma_1^{(1)} := \frac{L\cdot\sqrt{\mathrm{MaxDisp}_{\mu_1}(\sigma_1^{(1)},\mu_2^{(2)},\sigma_2^{(2)})\cdot\ln(1 / \theta)}}{\mathrm{MinDer}_{\mu_1}(\sigma_1^{(1)},\mu_2^{(2)},\sigma_2^{(2)})}$ , and $\gamma_1^{(2)} := \frac{L\cdot\sqrt{\mathrm{MaxDisp}_{\mu_1}(\sigma_1^{(2)},\mu_2^{(2)},\sigma_2^{(2)})\cdot\ln(1 / \theta)}}{\mathrm{MinDer}_{\mu_1}(\sigma_1^{(2)},\mu_2^{(2)},\sigma_2^{(2)})}$ . If + +$$ +\mathsf {E r r} _ {a v g} (\mu_ {1} ^ {(1)} - \gamma_ {1} ^ {(1)}, \sigma_ {1} ^ {(1)}, \mu_ {2} ^ {(2)}, \sigma_ {2} ^ {(2)}) \leq \tau \leq \mathsf {E r r} _ {a v g} (\mu_ {1} ^ {(2)} + \gamma_ {1} ^ {(2)}, \sigma_ {1} ^ {(2)}, \mu_ {2} ^ {(2)}, \sigma_ {2} ^ {(2)}), +$$ + +then under Assumption 3.1, we have: $P_{12} - P_2\geq 1 - 2\theta$ + +Proof. If $\operatorname{Err}_{\mathrm{avg}}(\mu_1^{(2)} + \gamma_1^{(2)}, \sigma_1^{(2)}, \mu_2^{(2)}, \sigma_2^{(2)}) \geq \tau$ , by the proof of Theorem 3.2, we know that + +$$ +\mathsf {E r r} _ {\mathrm {a v g}} (\mu_ {1} ^ {(2)}, \gamma_ {1} ^ {(2)}, \mu_ {2} ^ {(2)}, \sigma_ {2} ^ {(2)}) \geq \tau + \gamma_ {1} ^ {(2)} \mathrm {M i n D e r} _ {\mu_ {1}} (\sigma_ {1} ^ {(2)}, \mu_ {2} ^ {(2)}, \sigma_ {2} ^ {(2)}) = \tau + L \cdot \sqrt {\operatorname {M a x D i s p} _ {\mu_ {1}} (\sigma_ {1} ^ {(2)} , \mu_ {2} ^ {(2)} , \sigma_ {2} ^ {(2)}) \cdot \ln (1 / \theta)}. +$$ + +By Inequality (4), we conclude that $P_{2} \leq \theta$ . Similarly, by $\mathsf{Err}_{\mathrm{avg}}(\mu_1^{(1)} - \gamma_1^{(1)}, \sigma_1^{(1)}, \mu_2^{(2)}, \sigma_2^{(2)}) \leq \tau$ and Inequality (3), we can obtain $P_{12} \geq 1 - \theta$ . Thus, $\Delta_{2} \geq 1 - 2\theta$ , which completes the proof. + +# C.4. Proof of Corollary 3.4 and extension to distinct ability profiles + +Similar to Section C.1, we extend Theorem 3.3 to handle a general noise model $\varepsilon(s)$ . The only difference is still the introduction of MaxDisp. + +Corollary C.6 (Extension of Corollary 3.4 to general noise models). Fix the job instance. Suppose both human workers have the same decision-level abilities: + +$$ +\mu_ {1} ^ {(1)} = \mu_ {1} ^ {(2)} = \mu_ {1} ^ {\star} > \mu_ {1} ^ {\mathrm {(A I)}}, \quad \sigma_ {1} ^ {(1)} = \sigma_ {1} ^ {(2)} = \sigma_ {1} ^ {\mathrm {(A I)}} = \sigma_ {1} ^ {\star}. +$$ + +Let $\theta \in (0, 0.5)$ be a confidence level, and for each $\ell \in \{1, 2, \mathrm{AI}\}$ , define $\gamma_2^{(\ell)} := \frac{L \cdot \sqrt{\operatorname*{MaxDisp}_{\mu_2}(\sigma_2^{(\ell)}, \mu_1^{\star}, \sigma_2^{\star}) \cdot \ln(1 / \theta)}}{\operatorname*{MinDer}_{\mu_2}(\sigma_2^{(\ell)}, \mu_1^{\star}, \sigma_1^{\star})}$ . If + +$\max \left\{\mathsf{Err}_{avg}(\mu_1^\star, \sigma_1^\star, \mu_2^{(\mathrm{AI})} - \gamma_2^{(\mathrm{AI})}, \sigma_2^{(\mathrm{AI})}), \mathsf{Err}_{avg}(\mu_1^\star, \sigma_1^\star, \mu_2^{(2)} - \gamma_2^{(2)}, \sigma_2^{(2)})\right\} \leq \tau \leq \mathsf{Err}_{avg}(\mu_1^\star, \sigma_1^\star, \mu_2^{(1)} + \gamma_2^{(1)}, \sigma_2^{(1)}),$ + +then under Assumption 3.1, we have: $\mathrm{PC}\geq 1 - 2\theta$ + +Proof. By the assumption on the decision-level abilities, the merging of $W_{\ell}$ and $W_{\mathrm{AI}}$ must utilize a decision-level ability profile parameterized by $(\mu_1^\star, \sigma_1^\star)$ . Since $\mathsf{Err}_{\mathrm{avg}}(\mu_1^\star, \sigma_1^\star, \mu_2^{(2)} - \gamma_2^{(2)}, \sigma_2^{(2)}) \leq \tau \leq \mathsf{Err}_{\mathrm{avg}}(\mu_1^\star, \sigma_1^\star, \mu_2^{(1)} + \gamma_2^{(1)}, \sigma_2^{(1)})$ , it follows from Theorem 3.3 that $P_2 - P_1 \geq 1 - 2\theta$ . Also, since $\mathsf{Err}_{\mathrm{avg}}(\mu_1^\star, \sigma_1^\star, \mu_2^{(AI)} - \gamma_2^{(AI)}, \sigma_2^{(AI)}) \leq \tau \leq \mathsf{Err}_{\mathrm{avg}}(\mu_1^\star, \sigma_1^\star, \mu_2^{(1)} + \gamma_2^{(1)}, \sigma_2^{(1)})$ , it follows from Theorem 3.3 that $P_1' - P_1 \geq 1 - 2\theta$ . Also note that $P_1' \leq P_2'$ . Hence, + +$$ +\mathrm {P C} = \left| P _ {2} - P _ {1} \right| - \left| P _ {2} ^ {\prime} - P _ {1} ^ {\prime} \right| = P _ {2} - P _ {1} + P _ {1} ^ {\prime} - P _ {2} ^ {\prime}. +$$ + +If the merging of $W_{2}$ and $W_{\mathrm{AI}}$ utilizes $W_{2}$ 's action-level abilities, we have $P_{2} = P_{2}^{\prime}$ and hence, + +$$ +\mathrm {P C} = P _ {2} - P _ {1} + P _ {1} ^ {\prime} - P _ {2} ^ {\prime} = P _ {1} ^ {\prime} - P _ {1} \geq 1 - 2 \theta . +$$ + +Otherwise, if the merging of $W_{2}$ and $W_{\mathrm{AI}}$ utilizes $W_{\mathrm{AI}}$ 's action-level abilities, we have $P_2' = P_1'$ and hence, + +$$ +\mathrm {P C} = P _ {2} - P _ {1} + P _ {1} ^ {\prime} - P _ {2} ^ {\prime} = P _ {2} - P _ {1} \geq 1 - 2 \theta . +$$ + +Overall, we have completed the proof. + +Evaluating productivity compression with distinct ability profiles. Similar to Section 4, we investigate whether the productivity compression effect induced by AI assistance persists when the ability profiles of human workers and GenAI originate from different functional families. + +Choice of parameters. We set the decision-level ability profiles of $W_{1}$ and $W_{2}$ to be linear with $\alpha_{1}^{(1)}(s) = \alpha_{1}^{(2)}(s) = \mathrm{TrunN}(1 - 0.78s, 0.0065; 0, 1)$ , and define their action-level ability profiles as $\alpha_{\ell}^{(2)}(s) = \mathrm{TrunN}(1 - (1 - a_{\ell})s, 0.0065; 0, 1)$ . We assume $a_{2} > a_{1}$ , representing two human workers with distinct skill levels. The parameter ranges are set as $a_{1} \in [0, 0.2]$ and $a_{2} \in [0.3, 1]$ , motivated by the observation that $a = 0.22$ corresponds to a job success probability of 0.55, characterizing a medium-skilled worker. For the GenAI tool $W_{\mathrm{AI}}$ , we define the decision-level ability as $\alpha_{1}^{(\mathrm{AI})}(s) = \mathrm{TrunN}(1 - 0.92s, 0.0145; 0, 1)$ and the action-level ability as $\alpha_{2}^{(\mathrm{AI})}(s) = \mathrm{TrunN}(0.8, 0.0145; 0, 1)$ , such that the decision-level ability is consistently weaker than that of $W_{\ell}$ . We adopt the same merging scheme between human workers $W_{\ell}$ and the GenAI tool $W_{\mathrm{AI}}$ . Recall that for $\ell \in \{1, 2\}$ , $P_{\ell}$ denotes the job success probability of $W_{\ell}$ before merging with $W_{\mathrm{AI}}$ , and $P_{\ell}'$ denotes the corresponding probability after merging. + +Analysis. Figure 6 presents a heatmap of PC $\coloneqq (P_{2} - P_{1}) - (P_{2}^{\prime} - P_{1}^{\prime})$ as the ability parameters $a_1$ and $a_2$ vary. We observe that PC increases with the ability gap $a_2 - a_1$ , indicating that the benefit of merging is more pronounced for lower-skilled workers. For instance, when $a_1 = 0.1$ and $a_2 = 0.8$ , the productivity compression reaches $\mathrm{PC} = 0.8$ . These findings confirm that the productivity compression effect from human-AI collaboration persists even when workers specialize in different action-level subskills, thereby affirming our hypothesis. + +# C.5. Extending Theorem 3.2 to noise-dependent settings + +We consider the noise-dependent setting introduced in Section 4. In this setting, a dependency parameter $p \in [0,1]$ controls whether subskill errors are drawn from a shared latent factor $\beta$ (with probability $p$ ) or independently (with probability $1 - p$ ). The following theorem extends Theorem 3.2, which corresponds to the independent case $p = 0$ , to general $p \in [0,1]$ . Notably, the sensitivity window $\gamma_{1}$ vanishes as $p \to 1$ , indicating that stronger dependencies smooth out abrupt transitions. + +Theorem C.7 (Phase transition in noise-dependent settings). Fix the job instance, action-level ability $\mu_{2}$ , and noise levels $\sigma_{1},\sigma_{2}$ . Let $\mu_1^c$ be the unique value such that the expected job error equals the success threshold: + +$$ +\mathsf {E r r} _ {a v g} \left(\mu_ {1} ^ {c}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}\right) = \tau . +$$ + +Let $\theta \in (0,0.5)$ be a confidence level, $p\in [0,1]$ be a dependency parameter, and define the transition width: $\gamma_{1}\coloneqq$ $\frac{L\sqrt{\mathrm{MaxDisp}_{\mu_1}(\sigma_1,\mu_2,\sigma_2)}\cdot\max\{\sqrt{\ln\frac{2(1 - p)}{\theta}},\sqrt{n\ln\frac{2p}{\theta}}\}}{\mathrm{MinDer}_{\mu_1}(\sigma_1,\mu_2,\sigma_2)},$ where $L$ is the Lipschitz constant of the job error function. Then the job success probability satisfies: + +$$ +P \leq \theta i f \mu_ {1} \leq \mu_ {1} ^ {c} - \gamma_ {1} a n d P \geq 1 - \theta i f \mu_ {1} \geq \mu_ {1} ^ {c} + \gamma_ {1}. +$$ + +![](images/78d93188052f48c6a2ae47e8d39e401d985a7ce96c92855336224ce38317dde2.jpg) +(a) $|P'|$ v.s. $a$ + +![](images/0437d2787483399f86b1b3413d80280de79b54a5975032ce291b2e6da9f001f0.jpg) +(b) $|P'|$ v.s. $\sigma$ +Figure 7. Plots illustrating the relationship between the absolute derivatives $|P_a'|$ and $|P_{\sigma}^{\prime}|$ and $a, \sigma$ for the Computer Programmers example with default settings of $(a, \sigma, \tau) = (0.22, 0.08, 0.45)$ . + +Proof. The main difference is that the probability bound by Inequality (2) in the proof of Theorem 3.2 changes to be: + +$$ +\operatorname * {P r} _ {\zeta_ {j \ell}} [ \mathsf {E r r} (\zeta) \leq \mathsf {E r r} _ {\mathrm {a v g}} (\mu_ {1}, \sigma_ {1}, \mu_ {2}, \sigma_ {2}) - t ] \leq (1 - p) \cdot e ^ {- \frac {2 t ^ {2}}{L ^ {2} \mathrm {s g} (\mu_ {1} , \sigma_ {1} , \mu_ {2} , \sigma_ {2})}} + p \cdot e ^ {- \frac {2 t ^ {2}}{L ^ {2} n \cdot \mathrm {s g} (\mu_ {1} , \sigma_ {1} , \mu_ {2} , \sigma_ {2})}}. +$$ + +The choice of $\gamma_{1}$ ensures the right-hand side to be at most $\theta$ , which completes the proof. + +# D. Additional implications of theoretical results + +We empirically analyze the impact of workers' ability profiles on job success probability. In Section D.1, we illustrate how our framework can be used to determine strategies to upskill workers. In Section D.2, we analyze the impact of evaluation bias on workers' abilities. + +# D.1. Evaluating intervention effectiveness: Boosting ability v.s. reducing noise + +As discussed in Section 3 (see also Figure 5(b)), both increasing the ability parameter and reducing the noise level are efficient interventions for increasing the job success probability. We consider the "Computer Programmers" example with independent abilities across subskills $(p = 1)$ in Section 4. Then, the job error function Err is defined as in Equation (13) and the subskill numbers are as in Equation (11). We set the subskill ability profiles to be $\alpha_{1}^{(1)}(s) = \mathrm{TrunN}(1 - (1 - a)s,\sigma^{2} / 2;0,1)$ and $\alpha_{2}^{(1)}(s) = \mathrm{TrunN}(1 - 0.78s,\sigma^{2} / 2;0,1)$ , representing a human worker. We investigate which parameter- $a$ , $\sigma$ -has the greatest impact on $P$ . This analysis is crucial for guiding strategies to upskill workers for specific jobs. To this end, we first compute the derivatives of $P$ with respect to $a$ and $\sigma$ . We denote $|P_a^{\prime}|$ and $|P_{\sigma}^{\prime}|$ as the absolute values of the derivative of $P$ with respect to $a$ and $\sigma$ , respectively. We plot them in Figure 7 for the default parameters $(a,\sigma,\tau) = (0.22,0.08,0.45)$ . + +Figure 7(a) reveals that for $\sigma = 0.08$ , when $a \in [0, 0.15]$ , $|P_a'|$ is larger; while when $a \in [0.15, 1]$ , $|P_\sigma'|$ is larger. In Figure 7(b), for $a = 0.22$ , $|P_\sigma'|$ is always larger for any $\sigma \in [0, 1]$ . Thus, in this specific example, depending on the ranges of $(a, \sigma)$ , either $|P_a'|$ or $|P_\sigma'|$ may be larger, demonstrating that no single parameter universally outweighs the others in importance. + +# D.2. Analyzing the impact of inaccurate ability evaluation + +We demonstrate how Theorem 3.2 highlights the importance of accurately evaluating workers' abilities for companies. Specifically, we consider the scenario where a worker's ability evaluations are biased and discuss the consequences of this bias. Mathematically, let the worker's true decision-level ability parameter be $\mu_{1}$ , while the observed parameter is $\widehat{\mu_1} = \beta \mu_1$ for some $\beta \in (0,1)$ , reflecting bias in the evaluation process. This bias model is informed by and builds upon a substantial body of research on selection processes in biased environments (Kleinberg & Raghavan, 2018; Celis et al., 2020). Below, we quantify the impact of such bias $\beta$ on workers. + +![](images/ba030a95d04a94d772c61e9fbf254b0cdef0fdeef9d841987c043727259faf2e.jpg) +Figure 8. Plots illustrating the relationship between the ratio $r_{\beta}$ and the bias parameter $\beta$ for the Computer Programmers example with default settings of $\tau = 0.45$ . + +Theoretical analysis. Suppose parameters $\mu_{\ell}^{\star},\sigma_{\ell}^{\star}$ satisfy that $\mathrm{Err}_{\mathrm{avg}}(\mu_1^\star ,\sigma_1^\star ,\mu_2^\star ,\sigma_2^\star) = \tau$ . Let $\theta \in (0,0.5)$ . Let $\gamma_{1}\coloneqq$ $\frac{L\cdot\sqrt{\mathrm{MaxDisp}_{\mu_1}(\sigma_1,\mu_2,\sigma_2)\cdot\ln\frac{1}{\theta}}}{\mathrm{MinDer}_{\mu_1}(\sigma_1,\mu_2,\sigma_2)}$ According to Theorem 3.2, if $\mu_{1}\geq \mu_{1}^{\star} + \gamma_{1}$ , the job success probability $P(\alpha_{1},\alpha_{2},h,g,f,\tau)\geq$ $1 - \theta$ , indicating that the worker fits the job. However, the evaluated success probability $\widehat{P}$ is based on a weaker ability profile $\widehat{\alpha}$ , parameterized by $(\widehat{\mu_1},\sigma_1)$ . From Theorem 3.2, if $\widehat{\mu}_1\leq \mu_1^\star -\gamma_1$ , the evaluated success probability $\widehat{P}\leq \theta$ implying that the evaluation process concludes the worker does not fit the job. Since $\widehat{\mu_1} = \beta \mu_1$ , we conclude that $\widehat{P}\leq \theta$ if $\mu_{1}\leq \frac{1}{\beta} (\mu_{1}^{\star} - \gamma_{1})$ . Note that $\frac{1}{\beta} (\mu_1^\star -\gamma_1) > \mu_1^\star +\gamma_1$ when $\beta < \frac{\mu_1^\star - \gamma_1}{\mu_1^\star + \gamma_1}$ . Recall that $\gamma_{1} = O(\sigma \sqrt{\frac{\ln\frac{1}{\theta}}{n}})$ in the linear ability example shown in Section 3.3, which is o(1) when $\sigma \ll \frac{1}{\sqrt{\ln\frac{1}{\theta}}}$ or $n\gg \ln \frac{1}{\theta}$ . Thus, the condition $\beta < \frac{\mu_1^\star - \gamma_1}{\mu_1^\star + \gamma_1}$ is $\beta < 1 - o(1)$ . Consequently, for workers with ability parameter $\mu_{1}\in [\mu_{1}^{\star} + \gamma_{1},\frac{1}{\beta} (\mu_{1}^{\star} - \gamma_{1})]$ , the evaluated success probability $\widehat{P}\leq \theta$ , while the true success probability $P\geq 1 - \theta$ . Thus, even a slight bias in ability evaluations can lead to dramatic errors in predicting the worker's job success probability, potentially causing companies to lose qualified workers. + +Simulation for one worker. We study the ratio of high-qualified workers with $P \geq 0.8$ who are mistakenly evaluated as insufficiently qualified with $\widehat{P} \leq 0.6$ due to evaluation bias. Again, we take the example of "Computer Programmers" as an illustration. We set the decision-level ability profile to be $\mathrm{TrunN}(1 - (1 - a)s, 0.0065; 0, 1)$ and the action-level ability profile to be $\mathrm{TrunN}(1 - 0.78s, 0.0065; 0, 1)$ , representing human workers. We assume the ability parameter $a$ follows from the density Unif[0, 1] for mathematical simplicity (can be changed to e.g., a truncated normal distribution). By Figure 3(a), we know that $P \geq 0.8$ if $a \geq 0.34$ . Thus, $66\%$ of workers are highly qualified for this job. In contrast, $\widehat{P} \leq 0.6$ if $\widehat{a} = \beta a \leq 0.25$ , i.e., $a \leq \frac{0.25}{\beta}$ . Thus, high-qualified workers with ability parameter $a \in [0.34, \frac{0.25}{\beta}]$ are mistakenly evaluated as insufficiently qualified. Then, the ratio of these workers among high-qualified workers is $r_{\beta} = \min \left\{1, \max \left\{0, \frac{0.25}{\beta} - 0.34\right\} / 0.66\right\}$ ; see Figure 8 for a visualization. We note that $r_{\beta} > 0$ when $\beta \leq 0.64$ , and it increases super-linearly to 1 as $\beta$ decreases from 0.64 to 0.25. + +Simulation for merging two workers. Next, we study how inaccurate ability estimation affects the gain in success probability from the merging process. We extend our merging analysis by introducing a trust parameter $\lambda$ to the merging experiment in Section 4, which models imperfect merging by letting the estimated ability $\hat{c} = \lambda c$ deviate from the true action-level ability $c$ of worker $W_{2}$ . We then assign action-level subskills to $W_{2}$ when its scaled ability, $\lambda c$ , exceeds $W_{1}$ 's ability (i.e., $1 - 0.78 s_{j2} \leq \lambda c$ , even though $W_{2}$ completes skills at level $c$ ). + +Figure 9 plots the probability gain $\Delta = P_{\mathrm{merge}} - \max \{P_1, P_2\}$ across different values of $c$ and $\lambda$ . We find that even modest errors in $\lambda$ can sharply reduce $\Delta$ . For example, when $\lambda = 1.14$ and $c = 0.2$ , the probability gain becomes $\Delta = -0.2$ , indicating that merging reduces job success. This illustrates the critical importance of accurate ability estimation, and complements the findings in Section D.2 on belief-driven merging. + +![](images/ffabaa5d89c078ce3e8e674e48cc4e76cfaffc343024e4a3c0169646df5be9c2.jpg) +(a) $\Delta$ v.s. $c$ + +![](images/1a4148241ac023761bc1f1134ed8849fb2a4a08f986ce275e3d27bde035f265f.jpg) +(b) $\Delta$ v.s. $\lambda$ +Figure 9. Plots illustrating the relationship between the probability gain $\Delta = P_{\text{merge}} - \max \{P_1, P_2\}$ and the $W_2$ 's action-level ability parameter $c$ and trust parameter $\lambda$ to $W_2$ 's action-level ability for the Computer Programmers example with default settings of $\tau = 0.45$ . Here, $\lambda > 1$ indicates an overestimate of $W_2$ 's action-level ability, while $\lambda < 1$ indicates an underestimate. We assign action-level subskills to $W_2$ if its evaluated ability $\lambda c$ dominates that of $W_1$ , i.e., $1 - 0.78 s_{j2} \leq \lambda c$ . Notably, the probability gain $\Delta$ can be negative due to the imperfect merging introduced by the trust parameter. + +![](images/760d7611fb664c3ad226d6f1e67dcd75ac6b0fae598c0d7f197e46931a29fcbf.jpg) +(c) Heatmap of $\Delta$ + +# E. Omitted details from Section 4 + +We provide additional details for the examples stated in Section 4. + +O*NET. O*NET, developed by the U.S. Department of Labor, is a comprehensive database providing standardized descriptions of occupations, including required skills, knowledge, abilities, and work activities. It helps job seekers, employers, educators, and policymakers understand workforce needs and trends. O*NET aids career exploration, job description development, curriculum design, and labor market analysis. Employers use it to identify workforce needs, while educators align training programs with job market demands. O*NET provides skill proficiency levels but lacks granularity in distinguishing decision-making from action-based abilities. GenAI excels in technical execution but struggles with strategic problem-solving. Enhancing O*NET to capture these distinctions would improve AI-human job interaction analysis and workforce planning. + +# E.1. Details of deriving job data from O*NET + +The job of "Computer Programmer" consists of $n = 18$ skills and $m = 17$ tasks, together with their descriptions (link: https://www.onetonline.org/link/summary/15-1251.00). O*NET also offers the importance of each task, which may influence the choice of job error function $f$ . The task importance vector is + +$$ +v = (. 8 6, . 8 5, . 8 4, . 7 9, . 7 6, . 7 4, . 6 5, . 6 4, . 6 3, . 5 7, . 5 7, . 5 6, . 6 3, . 5 6, . 4 9, . 4 6), \tag {6} +$$ + +where $v_{i}$ indicates the importance level of task $i$ . Additionally, O*NET offers the importance and proficiency level of each skill. The skill importance vector is + +$$ +w = (. 5, . 5 3, . 5 3, . 5 3, . 5, . 6, . 5 6, . 5 6, . 5 6, . 6 3, . 6 3, . 6, . 5 3, . 5 3, . 6 9, . 6 9, . 6 9, . 9 4) \in [ 0, 1 ] ^ {n}, \tag {7} +$$ + +where $w_{j}$ indicates the importance level of skill $j$ , which may influence the choice of task error function $g$ . The skill proficiency vector is + +$$ +s = (. 4 1, . 4 3, . 4 5, . 4 5, . 4 5, . 4 6, . 4 6, . 4 6, . 4 8, . 5, . 5 2, . 5 4, . 5 5, . 5 5, . 5 7, . 7) \in [ 0, 1 ] ^ {n}, \tag {8} +$$ + +where $s_j$ represents the criticality of skill $j$ for this job. We summarize how to derive this data in Figure 10. The derived data for tasks and skills are summarized in Tables 1 and 2, respectively. + +# E.2. Details of deriving workers' abilities from Big-bench Lite + +We show how to formulate ability profiles for human workers and GenAI tools via skill evaluations in Big-bench Lite (bench authors, 2023). BIG-bench Lite (BBL) is a curated subset of the Beyond the Imitation Game Benchmark (BIG-bench), designed to evaluate large language models efficiently. While BIG-bench contains over 200 diverse tasks, BBL selects 24 representative tasks covering domains such as code understanding, multilingual reasoning, logical deduction, and social bias + +![](images/0d281955cdb06f0d9f335d78dfbf3b8942b28cee3350e77192569e9b486993a8.jpg) + +# O-NET OnLine + +![](images/b63d6e0e3edc7a0164c3da5ddeca67ac120c9f53563738db2fbb308f8d93caf1.jpg) + +Q electrician + +![](images/f0205109ea4f9ceff51b715142c0ed3eb53d2e4f55fa99f4ce10a9f92af6691d.jpg) + +Go + +![](images/a7c8b0a919191628349231b42762a171636d6806f606befe4a1d23fddf40a760.jpg) + +# Computer Programmers 15-1251.00 + +![](images/74058e60f832fcd0be3a7575b7a4c8ecf8100a7417aed9488215665ece6640c7.jpg) + +Create, modify, and test the code and scripts that allow computer applications to run. Work from specifications drawn up by software and web developers or other individuals. May develop and write computer programs to store, locate, and retrieve specific documents, data, and information. + +Sample of reported job titles: Analyst Programmer, Application Programmer, Computer Programmer, Computer Programmer Analyst, Internet Programmer, Java Developer, Programmer, Programmer Analyst, Web Applications Programmer, Web Programmer + +![](images/013c5d44a857f699300aa46d265bb0743337419135d270e8bb9e65cb9a23a5f4.jpg) + +![](images/9ed8015e916a3cdd83bb23223daf69ed2ac4725823cca0d0d7209650b1826c21.jpg) + +# Occupation-Specific Information + +# Tasks + +X.35f17 + +Write, analyze, review, and rewrite programs, using workflow chart and diagram, and applying knowledge of computer capabilities, subject matter, and +symbolic logic. +- Correct errors by making appropriate changes and recicking the program to ensure that the desired results are produced. +Write, update, and maintain computer programs or software packages to handle specific jobs such as tracking inventory, storing or retrieving data, or +controlling other equipment. +Consult with managerial, engineering, and technical personnel to clarify program intent, identify problems, and suggest changes. + +![](images/d96104e7d7544be43a5419a70f946399268bd6ed183d32dbe32697a65e5069bb.jpg) +(a) List of Tasks +(c) Task importance $v_{i}$ + +# Worker Requirements + +# Skills + +All 18 disolwed + +Programming $\rightarrow$ Writing computer programs for various purposes + +Active listening - Giving full attention to what other people are saying, taking time to understand the points being made, asking questions or +Active Listening - giving full attention to what other people appropriate, and not interrupting at inappropriate times. + +Complex Problem Solving - Identifying complex problems and reviewing related information to develop and evaluate options and implement solutions. + +Critical Thinking - Using logic and reasoning to identify the strengths and weaknesses of alternative solutions, conclusions, or approaches to problems. +Quality Control Analysis - Conducting tests and inspections of products, services, or processes to evaluate quality or performance. +Reading Comprehension - Understanding written sentences and paragraphs in work-related documents. +Systems Analysis - Determining how a system should work and how changes in conditions, operations, and the environment will affect outcomes. +- Judgment and Decision Making — Considering the relative costs and benefits of potential actions to choose +Writing-Communicating effectively in writing as appropriate for the needs of the audience. +Active Learning Understanding the Implications of no Mathematics Using mathematics to solve problems +- Mathematics - Using Mathematics to solve problems. +- Operations Analysis - Analyzing needs and product requirements to create a design. +Social Perceptiveness - Being aware of others' reactions and understanding why they react as they do. +Speaking - Talking to others to convey information effectively. +Systems Evaluation - Identifying measures or indicators of system performance and the actions needed to improve or correct performance, relative to +the goals of the system. +Time Management - Managing one's own time and the time of others. +Coordination - Adjusting actions in relation to others' actions. +Monitoring Monitoring/Assessing performance of yourself, other individuals, or organizations to make improvements or take corrective action. + +![](images/23f3dc20390b742cec525da6316d5d021f9dc7b561b5ab2e00291e41074d08c9.jpg) +(b) List of skills +(d) Skill importance $s_j$ + +![](images/ed22f452e53208fbc4326c27212de30ff8b0321ab5c26586197d402142aa34ef.jpg) +(e) Skill proficiency $w_{j}$ : Step 1 +Figure 10. Deriving job data for computer programmers from O*NET. Subfigures (a) and (b) are on the "Summary" page of the job (link: https://www.onetonline.org/link/summary/15-1251.00). Subfigures (c) and (d) are on the "Details" page. Subfigures (e) and (f) show how to obtain skill proficiencies $s_j$ s from O*NET. + +![](images/ee1448da7234c64f3af4b9f05694614201b9867000fe7b1dab6540f03e299ed6.jpg) +(f) Skill proficiency $w_{j}$ : Step 2 + +Table 1. Data for tasks associated with the job of "Computer Programmers." + +
Task idTask nameImportance (v%)
1Write, analyze, review, and rewrite programs, using workflow chart and diagram, and applying knowledge of computer capabilities, subject matter, and symbolic logic86
2Correct errors by making appropriate changes and rechecking the program to ensure that the desired results are produced85
3Perform or direct revision, repair, or expansion of existing programs to increase operating efficiency or adapt to new requirements84
4Write, update, and maintain computer programs or software packages to handle specific jobs such as tracking inventory, storing or retrieving data, or controlling other equipment79
5Consult with managerial, engineering, and technical personnel to clarify program intent, identify problems, and suggest changes76
6Conduct trial runs of programs and software applications to be sure they will produce the desired information and that the instructions are correct74
7Prepare detailed workflow charts and diagrams that describe input, output, and logical operation, and convert them into a series of instructions coded in a computer language65
8Compile and write documentation of program development and subsequent revisions, inserting comments in the coded instructions so others can understand the program64
9Consult with and assist computer operators or system analysts to define and resolve problems in running computer programs63
10Perform systems analysis and programming tasks to maintain and control the use of computer systems software as a systems programmer57
11Write or contribute to instructions or manuals to guide end users57
12Investigate whether networks, workstations, the central processing unit of the system, or peripheral equipment are responding to a program's instructions57
13Assign, coordinate, and review work and activities of programming personnel56
14Train subordinates in programming and program coding63
15Develop Web sites56
16Train users on the use and function of computer programs49
17Collaborate with computer manufacturers and other users to develop new programming methods46
+ +Table 2. Data for skills associated with the job of "Computer Programmer"; sorted in an increasing order of proficiency. + +
Skill idSkill nameImportance (w%)Proficiency (s%)Decomposition (λ)Decision (sj1)Action (sj2)
1Coordination5041000.41
2Social Perceptiveness5343000.43
3Mathematics534510.450
4Time Management534510.450
5Monitoring504510.450
6Systems Analysis60450.60.270.18
7Judgment and Decision Making56460.70.3220.138
8Writing56460.40.1840.276
9Active Learning56460.40.1840.276
10Speaking5348000.48
11Quality Control Analysis63500.30.150.35
12Reading Comprehension605010.50
13Systems Evaluation535210.520
14Operations Analysis53540.60.3240.216
15Complex Problem Solving69550.70.3850.165
16Critical Thinking69550.60.330.22
17Active Listening6957000.57
18Programming94700.40.280.42
+ +assessment. bench authors (2023) assessed the accuracies of the best human rater, the average human rater, and the best LLM for these skills in Big-bench Lite. By Figure 1(c) of (bench authors, 2023), we know that the best LLM refers to PaLM (Chowdhery et al., 2023). + +Our goal is to formulate the ability profile of a human worker using the data for the average human rater, and formulate the ability profile for a GenAI tool using the data for the best LLM. Their accuracies for 24 skills are summarized in Table 3. Note that the accuracy corresponds to the average ability of workers. Thus, to formulate ability profiles, we need to know the proficiencies of these skills and the variance in the workers' abilities. Below, we illustrate how to derive this data. + +Deriving skill proficiencies. We use GPT-4o to derive proficiencies for the 24 skills and obtain a skill proficiency vector in $[0,1]^{24}$ : + +$$ +s = (0,. 8 7,. 6 5, 1,. 3 3,. 9 8,. 6 0,. 8 0,. 9 1,. 2 7, 0,. 2 0,. 2 0,. 7 5,. 7 1,. 2 5,. 0 0,. 7 3,. 0 7,. 9 1,. 6 4,. 0 0,. 6 4,. 5 0). +$$ + +The prompt is: "Table 3. Given the list of 24 skills in Big-bench Lite, please construct a 24-vector $s$ where $s_j$ represents the proficiency level of skill $j$ with 0 for the easiest and 1 for the hardest." + +Deriving the ability profiles. Given accuracies in Table 3, we have the accuracies of the average human rater and the best LLM. Combining the accuracies and the skill proficiency vector $s$ , we observe that linear functions can fit skill ability profiles of the average human rater and LLM; see Figure 11. We fit the ability of the average human rater by $1 - 0.78s$ whose estimation variance is 0.013. Also, we fit the ability of the LLM by $1 - 0.92s$ , whose estimation variance is 0.029. Additionally, by Figure App.9 of (bench authors, 2023), we observe that the noise distribution of abilities is close to a truncated normal distribution. Overall, we formulate the ability profiles of a human worker $(W_{1})$ and a GenAI tool $(W_{2})$ to be + +$$ +\alpha^ {(1)} (s) = \mathrm {T r u n N} (1 - 0. 7 8 s + 0. 2 2, 0. 0 1 3; 0, 1) \mathrm {a n d} \alpha^ {(2)} (s) = \mathrm {T r u n N} (1 - 0. 9 2 s + 0. 0 8, 0. 0 2 9; 0, 1), \qquad (9) +$$ + +respectively, where $\mathrm{TrunN}(\mu, \sigma^2; 0, 1)$ is a truncated normal distribution with mean $\mu$ and variance $\sigma^2$ on interval $[0, 1]$ . These ability profiles represent that both human workers and GenAI tools excel in easier skills but struggle with more challenging ones. + +![](images/40322f680c28003fc4d8eb32d05f25098cd6cd0d93ca76275cc0c9ca6573387c.jpg) +Figure 11. Accuracies of the average human rater and LLM v.s. skill proficiency for tasks in Big-bench Lite. We use linear functions to fit the plots. We fix the constant parameter $c = 1$ for ease of analysis such that the slope parameter $a$ can vary from 0 to 1. The variances for human and LLM are 0.013 and 0.029, respectively. + +# E.3. Details for subskill division, task-skill dependency, and the choices of error functions + +This section details how our framework can be adapted to the derived data from O*NET and Big-bench Lite. + +Deriving decision-level degree of skills. To derive subskill numbers, we first need to know the decision-level degree of a skill. Suppose the decision-level subskill contributes $\lambda_{j}$ -fraction and the action-level subskill contributes $(1 - \lambda_{j})$ -fraction for some $\lambda_{j} \in [0,1]$ . This quantization $\lambda_{j}$ depends on both the skills and the considered jobs. + +To this end, we first use GPT-4o to obtain the description of the decision and action aspects of each skill. According to the descriptions, we also distinguish whether both the decision and action-level aspects can be evaluated separately. The prompt + +Table 3. Accuracies of average human raters and the best LLM for 24 skills in BIG-bench Lite; information from Figure 4 of (bench authors, 2023). "NA" represents that the accuracy is unclear from the figure. + +
SkillAccuracy of average human raterAccuracy of the best LLM
autoDebugging0.15NA
BBQlite.json0.730.73
code_line_description0.60.46
conceptual_combinations0.830.48
conlang TranslationNA0.5
emoji Movie0.940.9
formal_fallacies0.550.53
hindu knowledgeNA0.75
known_unknows0.80.68
language_identificationNA0.36
linguistics_puzzlesNANA
logic_grid Puzzle0.40.36
logical_deduction0.40.36
misconceptions_russianNA0.68
novel_concepts0.650.57
operators0.460.36
parsinlu_readng_comprehensionNA0
play_DIALOG_same_orDIFFERENTNA0.63
repeat_copy_logic0.390.12
strangeStories0.80.63
strategyqa0.620.6
symbol_interpretation0.380.25
vitaminfactverification0.630.57
winowhyNA0.59
+ +is "# Table 2. Given the list of skills for the job of Computer programmers from O*NET, please provide the description of the decision-level and action-level aspects for each skill. Moreover, for each skill, determine which one of its decision and action aspects is more essential and whether both decision-level and action-level aspects can be evaluated separately. Output a LaTeX table in a box containing the above information." See Table 4 for a summary. For instance, the decision and action aspects of "Active Listening" are "Understanding Context" and "Engagement", respectively. It is an action-type skill and the decision and action aspects are difficult to be assessed separately. For such inseparable skills, we set $\lambda_{j} = 0$ for action ones and $\lambda_{j} = 1$ for decision ones. For the remaining separable skills, we use GPT-4o to derive a decision-level degree $\lambda_{j}$ . This concludes the generation of the following vector $\lambda$ for decision-level degree: + +$$ +\lambda = (0, 0, 1, 1, 1, . 6, . 7, . 4, . 4, 0, . 3, 1, 1, . 6, . 7, . 6, 0, . 4) \in [ 0, 1 ] ^ {n}. \tag {10} +$$ + +The prompt is "Table 4. For each skill $j$ with "Separable = Y", please construct a decision-level degree $\lambda_j \in [0,1]$ representing the decision-level degree while $1 - \lambda_j$ represents the action-level degree of skill $j$ ." + +Deriving subskill numbers from skill proficiency and decision-level degree. First, we note that we can not measure the decision and action aspects of some skills separately. We take "Active Listening" as an example to illustrate how to determine subskill numbers for these skills. It is an action skill with $\lambda_{j} = 0$ . Then, the difficulty of the decision-level subskill should be the easiest one, while the action-level subskill should be equal to the skill proficiency. This corresponds to $(s_{j1}, s_{j2}) = (0, s_{j})$ . The case of $\lambda_{j} = 1$ is symmetric. Thus, we provide the following assumption. + +Assumption E.1 (Extreme points for subskill allocation). We assume if $\lambda_{j} = 1$ , $(s_{j1}, s_{j2}) = (s_{j}, 0)$ ; and if $\lambda_{j} = 0$ , $(s_{j1}, s_{j2}) = (0, s_{j})$ . + +For the remaining skills $j$ that can be well divided into decision and action aspects, we have $\lambda_j \in (0,1)$ . To determine $s_{j1}$ and $s_{j2}$ , we first analyze the desired properties of them. We take Programming as an example. + +Table 4. Subskill descriptions. In the column of "Separable", "Y" represents that the decision-level and action-level aspects of skills can be tested separately; "N" represents that the skill can not be tested independently; and finally, "Decision"/"Action" represents that skills cannot be tested separately but can be tested independently, and the main aspect is decision/action, respectively. For "N" skills, a possibility is to use group-based assessments, e.g., assign a group project with clear dependencies among team members to test Social Perceptiveness + Coordination; or simulate a customer service scenario where candidates must listen to customer concerns and respond effectively to test Speaking + Active Listening. + +
Skill idSkill nameDecisionActionSeparable
1CoordinationPlanning Interactions - Identifying interdependenciesAdjusting Actions - Modifying behavior to align with othersN, action
2Social PerceptivenessRecognizing Cues - Understanding social signalsResponse - Adjusting behavior based on social understandingN, action
3MathematicsConceptual Analysis - Choosing appropriate methodsCalculation - Executing mathematical computationsDecision
4Time ManagementPrioritization - Deciding task importanceScheduling - Allocating time to tasksN, decision
5MonitoringIdentifying Key Indicators - Determining what to monitorObservation - Actively tracking performanceDecision
6Systems AnalysisSystem Design - Understanding how changes affect outcomesApplication - Using systems knowledge to modify systemsY
7Judgment and Decision MakingWeighing Options - Assessing risks and benefitsExecution - Choosing and enacting the best courseY
8WritingPlanning Content - Structuring and organizing ideasExecution - Writing clearly and coherentlyY
9Active ListeningUnderstanding Context - Interpreting informationEngagement - Showing attentiveness through responsesN, action
10SpeakingContent Selection - Deciding what to conveyDelivery - Articulating information effectivelyN, action
11Quality Control AnalysisStandards Evaluation - Deciding quality benchmarksInspection - Physically testing or inspecting outcomesY
12Reading ComprehensionInterpretation - Extracting key ideas from textApplication - Using information in a practical contextDecision
13Systems EvaluationAssessing Performance - Setting criteria for evaluationMonitoring - Observing system function relative to criteriaN, decision
14Operations AnalysisDetermining Requirements - Identifying needsImplementation - Designing solutions based on analysisY
15Complex Problem SolvingAnalyzing Options - Identifying potential solutionsImplementation - Applying solutions to problemsY
16Critical ThinkingEvaluating Alternatives - Comparing pros and consLogical Application - Applying chosen solutionY
17Active LearningIdentifying Relevance - Deciding useful informationApplication - Using new information to solve tasksY
18ProgrammingDesigning Algorithms - Choosing the best approachWriting Code - Implementing code in specific languagesY
+ +- Fixing $\lambda_{j}$ and increasing $s_j$ (i.e., increasing the programming difficulty), we expect that the difficulties of both decision and action aspects increase, leading to an increase in $s_{j1}$ and $s_j2$ . +- Fixing $s_j$ and increasing $\lambda_j$ (i.e., increasing the importance of decision-making in programming), we expect that $s_{j1}$ is closer to $s_j$ . Specifically, when $\lambda_j = 1$ , we have $s_{j1} = s_j$ by Assumption E.1. Moreover, we expect that $s_{j2}$ decreases since the requirement of action-level becomes easier. Symmetrically, as $\lambda_j$ decreases, we expect that $s_{j1}$ decreases and $s_{j2}$ is closer to $s_j$ . + +These desired properties motivate the following assumption. + +Assumption E.2 (Monotonicity for subskill allocation). We assume 1) $s_{j1}$ and $s_{j2}$ are monotonically increasingly as $s_j$ ; and 2) When $\lambda_j$ increases from 0 to 1, $s_{j1}$ is monotonically increasing from 0 to $s_j$ while $s_{j2}$ is monotonically decreasing from $s_j$ to 0. + +Finally, note that $s_{j1}$ and $s_{j2}$ are derived from skill proficiency $s_j$ and $\lambda_j$ only affects the allocation instead of the total skill difficulty. Thus, we would like a recovery of $s_j$ using $s_{j1}$ and $s_{j2}$ . Observed from Assumption E.1, we may expect that $s_{j1} + s_{j2} = s_j$ holds. Accordingly, we have the following assumption. + +Assumption E.3 (Subskill complementarity assumption). We assume that $s_{j1} + s_{j2} = s_j$ + +Under Assumptions E.1-E.3, we conclude the following unified form of $s_{j1}$ and $s_{j2}$ : + +$$ +s _ {j 1} = \psi (\lambda_ {j}) s _ {j} \mathrm {a n d} s _ {j 2} = (1 - \psi (\lambda_ {j})) s _ {j}, +$$ + +where $\psi (\cdot):[0,1]\to [0,1]$ is a monotonically increasing function with $\psi (0) = 0$ and $\psi (1) = 1$ . The easiest way is to select $\psi (\lambda) = \lambda$ , which results in + +$$ +\begin{array}{l} s _ {1} = (0, 0, . 4 5, . 4 5, . 4 5, . 2 7, . 3 2 2, . 1 8 4, . 1 8 4, 0, . 1 5, . 5, . 5 2, . 3 2 4, . 3 8 5, . 3 3, 0, . 2 8) \in [ 0, 1 ] ^ {n} \text {a n d} \\ s _ {2} = (. 4 1, . 4 3, 0, 0, 0, . 1 8, . 1 3 8, . 2 7 6, . 2 7 6, . 4 8, . 3 5, 0, 0, . 2 1 6, . 1 6 5, . 2 2, . 5 7, . 4 2) \in [ 0, 1 ] ^ {n}. \tag {11} \\ \end{array} +$$ + +This choice makes $s_{j1}$ and $s_{j2}$ proportional to $\lambda_j$ . Other choices of $\psi$ include $\psi(\lambda) = \lambda^2$ , $\psi(\lambda) = \frac{\lambda}{\lambda + 1 - (1 - \lambda)e^{-\lambda}}$ , and so on. + +Deriving subskill ability profiles. We provide an approach to decompose skill ability profiles $\alpha$ to subskill ability profiles $\alpha_{1}$ and $\alpha_{2}$ . When $\alpha(s) \sim \mathrm{TrunN}(1 - (1 - a)s, \sigma^{2}; 0, 1)$ and the decision-level degree is $\lambda \in [0, 1]$ , we set + +$$ +\alpha_ {1} (s) = \alpha_ {2} (s) = \operatorname {T r u n N} (1 - (1 - a) s, \sigma^ {2} / 2; 0, 1). +$$ + +This formula ensures that + +$$ +\begin{array}{l} 1 - \alpha_ {1} (s _ {j 1}) + 1 - \alpha_ {2} (s _ {j 2}) = 2 - \operatorname {T r u n N} (1 - (1 - a) s _ {j 1}, \sigma^ {2} / 2; 0, 1) - \operatorname {T r u n N} (1 - (1 - a) s _ {j 2}, \sigma^ {2} / 2; 0, 1) \\ \approx \mathrm {T r u n N} ((1 - a) (s _ {j 1} + s _ {j 2}), \sigma^ {2}; 0, 1) \approx 1 - \mathrm {T r u n N} (1 - (1 - a) (s _ {j 1} + s _ {j 2}), \sigma^ {2}; 0, 1) = 1 - \alpha (s _ {j}), \\ \end{array} +$$ + +where the last equation applies the property that $s_{j1} + s_{j2} = s_j$ . This ensures that the distribution of $h(\zeta_{j1},\zeta_{j2})$ is close to first draw $X \sim \alpha (s_j)$ and then outputs $1 - X$ . Thus, we can (approximately) recover the skill ability profile via such subskill ability division by setting the skill success probability function $h(\zeta_1,\zeta_2) = \zeta_1 + \zeta_2$ . Consequently, we have + +$$ +\alpha_ {\ell} ^ {(1)} (s) = \operatorname {T r u n N} (1 - 0. 7 8 s, 0. 0 0 6 5; 0, 1) \text {a n d} \alpha_ {\ell} ^ {(2)} (s) = \operatorname {T r u n N} (1 - 0. 9 2 s, 0. 0 1 4 5; 0, 1). \tag {12} +$$ + +In conclusion, we provide an approach to divide the data on skills into subskill numbers and ability profiles. + +Details for deriving task-skill dependency. Given the descriptions of tasks and skills for the job of "Computer Programmers", we use GPT-4o to generate the task-skill dependency $T_{i}$ s; see Figure 12. The prompt is: "Tables 1 and 2. Given a list of $m = 17$ tasks with their descriptions and a list of $n = 18$ skills with their descriptions in the job of Computer Programmers, please construct a subset $T_{i} \subseteq [n]$ for each task $i \in [m]$ that contains all skills $j$ associated to task $i$ ." The resulting task-skill dependency is: $T_{1} = [6,8,9,16,18]$ , $T_{2} = [5,7,11,16,18]$ , $T_{3} = [5,13,14,16,18]$ , $T_{4} = [1,4,13,18]$ , $T_{5} = [2,7,10,17]$ , $T_{6} = [6,11,16,18]$ , $T_{7} = [6,8,9,18]$ , $T_{8} = [8,11,16,18]$ , $T_{9} = [1,2,10,17]$ , $T_{10} = [5,13,14,18]$ , $T_{11} = [2,8,9,10]$ , $T_{12} = [7,13,14,18]$ , $T_{13} = [1,4,7,10]$ , $T_{14} = [7,8,16,18]$ , $T_{15} = [6,11,16,18]$ , $T_{16} = [7,10,17,18]$ , and $T_{17} = [9,16,17,18]$ . + +![](images/a78987b789c74555dfa71f268c9fa5926b0a412a32c409b6d67d0ad09eb2e210.jpg) +Task-Skill Relationship Graph (Adjusted for Readability) +Figure 12. Task-skill dependency graph for the Computer Programmers example. In this graph, $T_{1} = [6,8,9,16,18]$ , $T_{2} = [5,7,11,16,18]$ , $T_{3} = [5,13,14,16,18]$ , $T_{4} = [1,4,13,18]$ , $T_{5} = [2,7,10,17]$ , $T_{6} = [6,11,16,18]$ , $T_{7} = [6,8,9,18]$ , $T_{8} = [8,11,16,18]$ , $T_{9} = [1,2,10,17]$ , $T_{10} = [5,13,14,18]$ , $T_{11} = [2,8,9,10]$ , $T_{12} = [7,13,14,18]$ , $T_{13} = [1,4,7,10]$ , $T_{14} = [7,8,16,18]$ , $T_{15} = [6,11,16,18]$ , $T_{16} = [7,10,17,18]$ , and $T_{17} = [9,16,17,18]$ . + +Choice of error functions. As discussed above, we select the skill error function $h$ to be $h(\zeta_1,\zeta_2)\coloneqq \zeta_1 + \zeta_2$ that takes realized subskill abilities $\zeta_{1},\zeta_{2}$ as inputs and outputs a skill completion quality. This choice of $h$ aims to recover the derived skill ability function $\alpha$ from Big-bench Lite. Using the skill importance $w$ , we select the task error function $g$ to be $g((h_j)_{j\in T_i})\coloneqq \frac{1}{\sum_{j\in T_i}w_j}\sum_{j\in T_i}w_j\cdot h_j$ that takes associated skill completion qualities of task $i$ as inputs and outputs a task completion quality. This choice of $g$ highlights the different importance of skills for the job. Finally, using the task importance $v$ , we select the job error function $f$ to be $f(g_{1},\ldots ,g_{m})\coloneqq \frac{1}{\sum_{j\in T_{i}}v_{i}}\sum_{i\in [m]}v_{i}\cdot g_{i}$ that takes all task completion qualities as inputs and outputs a job completion quality. Combining with the task-skill dependency, we can compute the following function of job error rate composed by $h,g,f$ : for any $\zeta \in [0,1]^{2n}$ , + +$$ +\begin{array}{l} \operatorname {E r r} (\zeta) := 0. 0 4 \left(\zeta_ {1, 1} + \zeta_ {1, 2}\right) + 0. 0 4 \left(\zeta_ {2, 1} + \zeta_ {2, 2}\right) + 0. 0 3 \left(\zeta_ {4, 1} + \zeta_ {4, 2}\right) + 0. 0 3 \left(\zeta_ {5, 1} + \zeta_ {5, 2}\right) + 0. 0 5 \left(\zeta_ {6, 1} + \zeta_ {6, 2}\right) \\ + 0. 0 7 \left(\zeta_ {7, 1} + \zeta_ {7, 2}\right) + 0. 0 6 \left(\zeta_ {8, 1} + \zeta_ {8, 2}\right) + 0. 0 5 \left(\zeta_ {9, 1} + \zeta_ {9, 2}\right) + 0. 0 6 \left(\zeta_ {1 0, 1} + \zeta_ {1 0, 2}\right) + 0. 0 5 \left(\zeta_ {1 1, 1} + \zeta_ {1 1, 2}\right) \\ + 0. 0 5 \left(\zeta_ {1 3, 1} + \zeta_ {1 3, 2}\right) + 0. 0 4 \left(\zeta_ {1 4, 1} + \zeta_ {1 4, 2}\right) + 0. 1 1 \left(\zeta_ {1 6, 1} + \zeta_ {1 6, 2}\right) + 0. 0 6 \left(\zeta_ {1 7, 1} + \zeta_ {1 7, 2}\right) \\ + 0. 2 6 \left(\zeta_ {1 8, 1} + \zeta_ {1 8, 2}\right). \tag {13} \\ \end{array} +$$ + +Overall, we show how to derive all the data for using our framework. We can simulate that the job success probabilities of $W_{1}$ and $W_{2}$ are $P_{1} = 0.55$ and $P_{2} = 0.00$ , respectively. We also provide a flow chart to summarize this procedure; see Figure 13. We remark that we can compute $P_{1}$ and $P_{2}$ even without subskill division, i.e., only using data including skill proficiencies as in Equation (8), skill ability profile as in Equation (9), and the function of job error rate as in Equation (13). For $\tau = 0.45$ , we obtain that $P_{1} = 0.84$ and $P_{2} = 0.00$ . The value of $P_{1}$ is different but not too far from that computed using the subskill division, which is convincing of the reasonability of our subskill division approaches. + +![](images/55cacf037b6deda168022e686d8874921c3482e1d042234c8ba54e71796ad12f.jpg) +Figure 13. A flow chart for the Computer Programmers example that illustrates how to use our framework to assess job-worker fit. + +# E.4. Robustness across alternative modeling choices + +Besides the use of the derived job and worker data in Section 4, we also do simulations with alternative modeling choices to validate the robustness of our findings. + +Alternative error functions. We replace the job/task error aggregation functions $g$ and $f$ with max to simulate more fragile task environments; see Figures 14 and 15. The main patterns remain consistent with those for average error functions, though line-crossings disappear due to monotonicity in the max-based error aggregation. + +Alternative ability distributions. We substitute truncated normals with uniform noise in ability profiles (Figures 16 and 17), verifying that our key findings hold across distributions. + +Robustness to task-skill graph variations. We randomly modify 5 edges in the task-skill dependency graph (Figures 18 and 19). Despite these changes, the phase transition behavior and heatmaps remain stable. + +![](images/e39cb0ceb0caf6e0c52eefe9425899de29ab05c250bcfacf80e0b323a510f8d9.jpg) +(a) $P$ v.s. $a$ + +![](images/2e6de13c23d654587beecabac2c002abeeb9a8c5b5001240916216019f1e69a6.jpg) +(b) $P$ v.s. $p$ +Figure 14. Plots illustrating the relationship between the success probability $P(\alpha_{1}, \alpha_{2}, h, g, f, \tau)$ and the ability parameter $a$ and dependency parameter $p$ for the Computer Programmers example with default settings of $(\sigma, \tau) = (0.08, 0.6)$ , replacing the error functions $g, f$ from weighted average in Section 4 to max. Note that we increase $\tau$ from 0.45 (for weighted average) to 0.6 (for max), since the resulting error rate of max is higher. The job structure and worker ability profiles follow the same design as Figure 3 in our main paper, demonstrating the robustness of our empirical results for the job error rate function JER. + +![](images/3332055f598cfa9bc101329f29e34192aabe415ab732fe050d0cf95fd8a33795.jpg) +(c) Heatmap of $P$ + +![](images/58ecf0f5289f15ec74656036c40110921189a31e85484dbcbfe19a2e554b8819.jpg) +(a) Heatmap of $P_{merge}$ +Figure 15. Heatmaps of job success probability $P_{merge}$ and the probability gain $\Delta = P_{merge} - \max \{P_1, P_2\}$ by merging two workers for different ranges of $(a, c)$ for the Computer Programmers example with default settings of $\tau = 0.6$ , replacing the error functions $g, f$ from weighted average in Section 4 to max. Note that we increase $\tau$ from 0.45 (for weighted average) to 0.6 (for max), since the resulting error rate of max is higher. The job structure and worker ability profiles follow the same design as Figure 4 in our main paper, demonstrating the robustness of our empirical results for the job error rate function JER. + +![](images/d49f9972254a514b9b9a8bf90a526cc489d1c04795cae3a84defdf45b3b303ca.jpg) +(b) Heatmap of $\Delta$ + +![](images/85ec8d51a611c8a44cfda802625913a6325aa12326692f24d1893008b53b5eb8.jpg) +(a) $P$ v.s. $a$ +Figure 16. Plots illustrating the relationship between the success probability $P(\alpha_{1}, \alpha_{2}, h, g, f, \tau)$ and the ability parameter $a$ and dependency parameter $p$ for the Computer Programmers example with default settings of $(\sigma, \tau) = (0.2, 0.4)$ , replacing the truncated normal noise in Section 4 with the uniform noise. Setting $\sigma = 0.2$ ensures that the variance of the uniform distribution matches that of the truncated normal distribution. The job structure and the job error rate function JER follow the same design as Figure 3 in our main paper, demonstrating the robustness of our empirical results for worker ability profiles. + +![](images/06afc5cbdc37ed50f03013b237e3c01ec13919e1ed7908f07a879fb71e4a265f.jpg) +(b) $P$ v.s. $p$ + +![](images/89cdcc4f579377a91fb6fbbe8c2ac75c59becf6098c094a78114ecd2988169c2.jpg) +(c) Heatmap of $P$ + +![](images/c1d7811eb62999462f9289c4557f40ef7963bd3c847af0a9afa40797edbd0faf.jpg) +(a) Heatmap of $P_{merge}$ + +![](images/09c5dcb4fc88fafad9eb38b694fcbcc7083935bbecb323a6e220ffa39b3a7549.jpg) +(b) Heatmap of $\Delta$ +Figure 17. Heatmaps of job success probability $P_{merge}$ and the probability gain $\Delta = P_{merge} - \max \{P_1, P_2\}$ by merging two workers for different ranges of $(a, c)$ for the Computer Programmers example with default settings of $(\sigma_1, \sigma_2, \tau) = (0.2, 0.29, 0.4)$ , replacing the truncated normal noise in Section 4 with the uniform noise. The variance parameters $\sigma_1$ and $\sigma_2$ are chosen so that the variance of the uniform noise for both workers aligns with that of the truncated normal distribution. The job structure and the job error rate function JER follow the same design as Figure 4 in our main paper, demonstrating the robustness of our empirical results for worker ability profiles. + +![](images/d687b93c2cb2ecd39b4f2712123922fbe702d74a2ed30eae2c784f0c7044a2cb.jpg) +(a) $P$ v.s. $a$ + +![](images/5e480d4ee1954b90b39246937daed5a1e2ed4092df5c0616e52c1855648e5a47.jpg) +(b) $P$ v.s. $p$ + +![](images/c503b5e37dd2d69e7435cfa9f4d218460370f2248d1884db7e83674030a70f22.jpg) +(c) Heatmap of $P$ +Figure 18. Plots illustrating the relationship between the success probability $P(\alpha_{1}, \alpha_{2}, h, g, f, \tau)$ and the ability parameter $a$ and dependency parameter $p$ for the Computer Programmers example with default settings of $(\sigma, \tau) = (0.08, 0.45)$ , randomly shifting five edges in the task-skill dependency graph. The worker ability profiles and the job error rate function JER follow the same design as Figure 3 in our main paper, demonstrating the robustness of our empirical results for job structure. + +![](images/4bf7b0fa058664599d3268b4fc4f4ca6d8222207eaad1da1254986bec346db2d.jpg) +(a) Heatmap of $P_{merge}$ +Figure 19. Heatmaps of job success probability $P_{merge}$ and the probability gain $\Delta = P_{merge} - \max \{P_1, P_2\}$ by merging two workers for different ranges of $(a, c)$ for the Computer Programmers example with default settings of $\tau = 0.45$ , randomly shifting five edges in the task-skill dependency graph. The worker ability profiles and the job error rate function JER follow the same design as Figure 4 in our main paper, demonstrating the robustness of our empirical results for job structure. + +![](images/96acccb39ba8eb15b44fab28b760db1e03c746d1c9e61ee4a8d23e18f74e00bd.jpg) +(b) Heatmap of $\Delta$ \ No newline at end of file diff --git a/amathematicalframeworkforaihumanintegrationinwork/images.zip b/amathematicalframeworkforaihumanintegrationinwork/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..28e5a4d7eef88face6fa1dbb0d5a95d1b89bccbe --- /dev/null +++ b/amathematicalframeworkforaihumanintegrationinwork/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91fc1db4ac266809f8b1221b61517da4f2f15c20b8240b60056c309c704ded57 +size 2051508 diff --git a/amathematicalframeworkforaihumanintegrationinwork/layout.json b/amathematicalframeworkforaihumanintegrationinwork/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3cfacdd03d431ee7f47eb9135794a3cbdc6c5195 --- /dev/null +++ b/amathematicalframeworkforaihumanintegrationinwork/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b01c0f225072418ccaea884e600a45b52746ed20db2ec3399dd4dfe56a262aeb +size 2043946 diff --git a/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/7ff3b432-f87e-458a-85f2-63658f0a8b25_content_list.json b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/7ff3b432-f87e-458a-85f2-63658f0a8b25_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..88d3bf5e0ba1dad67ceb999d9df93a7c35d36dbb --- /dev/null +++ b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/7ff3b432-f87e-458a-85f2-63658f0a8b25_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ddfd46c086773e4cbc1c032d3ca1746d27bbc3e276f12322fc602a6f34ff799 +size 135400 diff --git a/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/7ff3b432-f87e-458a-85f2-63658f0a8b25_model.json b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/7ff3b432-f87e-458a-85f2-63658f0a8b25_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8657ae9888a6f52f6ac8d934f094e17ba5a02eff --- /dev/null +++ b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/7ff3b432-f87e-458a-85f2-63658f0a8b25_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd03272207446d89874be64cbee4ac20770e8df4640a817711fd20cd1e4c1ae7 +size 160200 diff --git a/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/7ff3b432-f87e-458a-85f2-63658f0a8b25_origin.pdf b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/7ff3b432-f87e-458a-85f2-63658f0a8b25_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9fc73f6e5c600eefc7eec363c395690f95728e8f --- /dev/null +++ b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/7ff3b432-f87e-458a-85f2-63658f0a8b25_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2eb99ae6eb2667d4f1fb7dfdf7485db0798aa506f42730242ed68f9cb43f777 +size 444801 diff --git a/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/full.md b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..30e5378fb2e48d79bffc5af5c023f761c07b570e --- /dev/null +++ b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/full.md @@ -0,0 +1,624 @@ +# A Memory Efficient Randomized Subspace Optimization Method for Training Large Language Models + +Yiming Chen $^{*1}$ Yuan Zhang $^{*2}$ Yin Liu $^{1}$ Kun Yuan $^{3}$ Zaiwen Wen + +# Abstract + +The memory challenges associated with training Large Language Models (LLMs) have become a critical concern, particularly when using the Adam optimizer. To address this issue, numerous memory-efficient techniques have been proposed, with GaLore standing out as a notable example designed to reduce the memory footprint of optimizer states. However, these approaches do not alleviate the memory burden imposed by activations, rendering them unsuitable for scenarios involving long context sequences or large minibatches. Moreover, their convergence properties are still not well-understood in the literature. In this work, we introduce a Randomized Subspace Optimization framework for pre-training and fine-tuning LLMs. Our approach decomposes the high-dimensional training problem into a series of lower-dimensional subproblems. At each iteration, a random subspace is selected, and the parameters within that subspace are optimized. This structured reduction in dimensionality allows our method to simultaneously reduce memory usage for both activations and optimizer states. We establish comprehensive convergence guarantees and derive rates for various scenarios, accommodating different optimization strategies to solve the subproblems. Extensive experiments validate the superior memory and communication efficiency of our method, achieving performance comparable to GaLore and Adam. + +*Equal contribution ${}^{1}$ Beijing International Center for Mathematical Research, Peking University, Beijing, China ${}^{2}$ Center for Data Science, Peking University, Beijing, China ${}^{3}$ Center for Machine Learning Research, Peking University, Beijing, China. Correspondence to: Kun Yuan . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +# 1. Introduction + +Large Language Models (LLMs) have achieved remarkable success across various domains (Achiam et al., 2023; Brown, 2020; Dubey et al., 2024), primarily driven by the increasing scale of datasets and model parameters. The Adam optimizer (Kingma, 2014; Loshchilov & Hutter, 2019) is widely recognized as the default choice for training these models, owing to its operation efficiency and robust performance. + +However, as the scale of LLMs continues to grow, the associated memory demands have emerged as a significant bottleneck. This challenge stems from the need to store optimizer states, such as first-order and second-order moments, alongside the activations required for gradient computations. For instance, training a LLaMA-7B model necessitates 28GB of memory to store optimizer states in FP16 precision (Zhao et al., 2024a), while a GPT-3 model with 175B parameters requires an extraordinary 1.4TB memory in FP32 precision. Additionally, in scenarios involving long sequence lengths or large mini-batches, activation memory dominates as the primary constraint (Zhang et al., 2024b). These substantial memory requirements necessitate either deploying additional GPUs or reducing batch sizes. However, increasing the number of GPUs introduces additional communication overhead, potentially limiting training scalability (Malladi et al., 2023), while smaller batch sizes prolong training time due to reduced throughput. + +Memory-efficient training algorithms. Significant efforts have been made to address the memory overhead in LLMs training. One line of research focuses on parameter-efficient methods, such as Low-Rank Adaptation (LoRA) and its variants (Hu et al., 2022; Lialin et al., 2023; Xia et al., 2024), which constrain trainable parameters to low-rank subspaces for each weight matrix. Similarly, sparsity-based techniques (Thangarasa et al., 2023) reduce memory usage by training only a subset of weights. These strategies decrease the number of trainable parameters, thereby reducing the memory requirements for storing gradients and optimizer states. Another research direction aims to achieve memory savings through the compression of optimizer states. For instance, GaLore and its variants (Chen et al., 2024b; Hao et al., 2024; He et al., 2024; Zhao et al., 2024a) project gradients onto low-rank subspaces, leveraging the compressed gradients + +to compute the first- and second-order moments, which significantly reduces their memory footprint. Alternatively, Adam-mini (Zhang et al., 2024a) uses block-wise second-order moments for learning rate adjustments to reduce memory redundancy. A recent study, Apollo (Zhu et al., 2024), reinterprets Adam as an adaptive learning rate algorithm applied to the gradient. Instead of the coordinate-wise approach used in Adam, it employs a column-wise adaptive learning rate, thereby effectively reducing the memory overhead associated with optimizer states. + +Limitations in existing approaches. Despite the progress in memory-efficient algorithms for training LLMs, two critical limitations persist in the aforementioned approaches: + +L1. Inability to reduce activations. While the aforementioned approaches effectively reduce memory associated with optimizer states, they fail to address the memory burden posed by activations. This limitation stems from their reliance on computing full-rank gradients, which necessitates storing the complete activations. As a result, these methods are unsuitable for scenarios involving long context sequences or large mini-batches. +L2. Insufficient convergence guarantees. While the aforementioned approaches demonstrate strong empirical performance, their theoretical convergence properties remain less understood. For instance, GaLore (Zhao et al., 2024a) provides convergence analysis only for fixed projection matrices, rather than for the periodically updated projection matrices used in practical implementations. This lack of comprehensive theoretical guarantees raises concerns about whether these methods reliably converge to the desired solution and the rates at which such convergence occurs. + +Main results and contributions. In this work, we propose a method that concurrently reduces memory consumption for both the optimizer states and activations. The central idea behind our approach is to decompose the original high-dimensional training problem into a series of lower-dimensional subproblems. Specifically, at each iteration, we randomly select a subspace and optimize the parameters within this subspace. After completing the optimization in one subspace, we switch to a different subspace and continue the process. Since each subproblem operates in a lower-dimensional space, it requires smaller gradients and optimizer states. As we will demonstrate, the reduced dimensionality of the subproblems also leads to a significant reduction in the memory required for storing activations. Furthermore, the smaller scale of the subproblems results in reduced communication overhead when training across multiple workers. Our main contributions are as follows: + +C1. Subspace method for LLM training. We introduce + +a Randomized Subspace Optimization (RSO) framework for LLM training, which decomposes the original training problem into a series of lower-dimensional subproblems. This decomposition simultaneously reduces the memory required for optimizer states and activations, effectively addressing Limitation L1. Furthermore, the framework can reduce communication overhead in distributed training scenarios. + +C2. Theoretical convergence guarantees. We provide a comprehensive convergence analysis for the RSO framework. The established guarantees and rates apply across various scenarios. These include subproblems solved using zeroth-order, first-order, or second-order algorithms, as well as optimization methods like gradient descent, momentum gradient descent, adaptive gradient descent, and their stochastic variants. This addresses Limitation L2. Notably, we present refined convergence guarantees for scenarios where subproblems are solved using the Adam optimizer. +C3. Improved experimental performances. We conduct extensive experiments to evaluate the proposed RSO framework. The experimental results demonstrate that our approach significantly enhances memory efficiency compared to state-of-the-art methods, such as GaLore and LoRA. Additionally, our method achieves faster training speeds by reducing communication overhead, outperforming both GaLore and Adam while maintaining comparable performance levels. These findings highlight the practical values of our approach. + +# 2. Related Works + +Parameter-efficient methods. A promising approach to memory-efficient training involves parameter-efficient methods, which reduce the number of trainable parameters and consequently lower the memory required for storing optimizer states. For example, (Hu et al., 2022) propose Low-Rank Adaptation (LoRA), which restricts trainable parameters to a low-rank subspace for each weight matrix. Similarly, (Thangarasa et al., 2023) incorporate sparsity by training only a subset of weights. While these methods effectively reduce memory consumption, the reduction in trainable parameters can sometimes lead to suboptimal model performance (Biderman et al., 2024). To address this limitation, recent advancements suggest using multiple LoRA updates to enable high-rank weight updates (Lialin et al., 2023; Xia et al., 2024). However, in pre-training settings, this approach still relies on a full-rank weight training phase as a warm-up before transitioning to low-rank training (Lialin et al., 2023), thereby limiting its memory efficiency. + +Optimizer-efficient methods. An alternative approach to memory savings focuses on compressing optimizer states + +while maintaining the number of trainable parameters. GaLore (Zhao et al., 2024a) achieves this by compressing the gradient matrix through a projection onto a subspace and leveraging the compressed gradient to compute first- and second-order moments. This projection reduces the gradient size and is typically derived via the Singular Value Decomposition (SVD) of the true gradient (Zhao et al., 2024a). To mitigate the computational cost of SVD, alternative methods have been proposed, such as using random matrices (Hao et al., 2024; He et al., 2024) or generating the projection matrix through online Principal Component Analysis (PCA) (Liang et al., 2024). Fira (Chen et al., 2024a) and LDAdam (Robert et al., 2024) employ an error-feedback mechanism. The former combines the true gradient with the GaLore update to improve performance, while the latter explicitly accounts for both gradient and optimizer state compression. Apollo (Zhu et al., 2024) interprets Adam as an adaptive learning rate algorithm and uses compressed optimizer states directly as scaling factors for the true gradient. Additionally, Adafactor (Shazeer & Stern, 2018) discards the first-order moment and approximates the second-order moment with two low-rank matrices, while Adam-mini (Zhang et al., 2024a) proposes that block-wise second-order moments are sufficient for adjusting learning rates. (Das, 2024) integrates the GaLore method with a natural gradient optimizer to enhance performance. BAdam (Luo et al., 2024) and BlockLLM (Ramesh et al., 2024) incorporate block coordinate descent strategies into LLM training, restricting the number of parameters optimized in each epoch to reduce the memory overhead associated with optimizer states. Meanwhile, (Wen et al., 2025) applies wavelet transforms to compress gradients beyond the low-rank structures. + +Activation-efficient methods. Although the aforementioned methods effectively reduce memory consumption for optimizer states, they do not address the memory costs associated with activations. To reduce activations, zeroth-order (ZO) algorithms have been introduced in LLM training (Malladi et al., 2023). These methods can be further improved through variance reduction techniques (Gautam et al., 2024), while (Zhao et al., 2024b) utilizes ZO approaches to approximate a natural gradient algorithm. Moreover, (Chen et al., 2024b) proposes a novel ZO framework to enhance performance. Unlike first-order (FO) methods, ZO algorithms approximate gradients by finite differences in function values, eliminating the need for explicit gradient computation. This approach bypasses backpropagation and activation storage, significantly reducing memory demands. However, due to their slower convergence rates (Berahas et al., 2022; Duchi et al., 2015; Nesterov & Spokoiny, 2017), ZO methods are primarily suitable for fine-tuning applications. Similarly, FO methods can achieve activation savings by layer-wise training (Lai et al., 2024), but their use also predominantly targets fine-tuning phases. + +System-based methods. Several system-level techniques have been proposed to improve memory efficiency. Activation checkpointing (Chen et al., 2016) reduces memory usage by recomputing activations on demand rather than storing them throughout the entire iteration, though this comes at the cost of increased computational complexity. Quantization (Dettmers et al., 2023) lowers memory consumption by using lower-bit data representations, but this may introduce a trade-off between memory efficiency and training precision. Additionally, methods such as those introduced by (Ren et al., 2021; Zhang et al., 2023a) reduce GPU memory usage by offloading data to non-GPU resources, which can lead to additional communication overhead. + +# 3. Preliminaries + +This section introduces the optimization framework for LLM pre-training and fine-tuning, followed by a review of several memory-efficient methods. + +# 3.1. LLM Optimization + +When addressing the pre-training or fine-tuning of LLMs, the problem can be formulated as follows: + +$$ +\min _ {\boldsymbol {W}} f (\boldsymbol {W}) := \mathbb {E} _ {\xi} [ F (\boldsymbol {W}; \xi) ], \tag {1} +$$ + +where $\mathbf{W} = \{W_{\ell}\}_{\ell = 1}^{\mathcal{L}}$ represents the set of trainable parameters with a total dimension of $d$ . Here, $W_{\ell} \in \mathbb{R}^{m_{\ell} \times n_{\ell}}$ denotes the weight matrix for the $\ell$ -th layer, and $\mathcal{L}$ is the total number of layers. The function $F(\mathbf{W}; \xi)$ is the loss function, which depends on the random variable $\xi$ representing individual data samples. + +To address the optimization problem defined in (1), commonly used approaches include SGD (Bottou, 2010), Momentum SGD (Sutskever et al., 2013), and Adam (Kingma, 2014). The iterative update rule for Adam is as follows: + +$$ +\mathbf {M} ^ {t} = \beta_ {1} \cdot \mathbf {M} ^ {t - 1} + (1 - \beta_ {1}) \cdot \nabla F (\boldsymbol {W} ^ {t}; \xi^ {t}), \tag {2a} +$$ + +$$ +\mathbf {V} ^ {t} = \beta_ {2} \cdot \mathbf {V} ^ {t - 1} + (1 - \beta_ {2}) \cdot (\nabla F (\boldsymbol {W} ^ {t}; \xi^ {t})) ^ {2}, \tag {2b} +$$ + +$$ +\hat {\mathbf {M}} ^ {t} = \mathbf {M} ^ {t} / \left(1 - \beta_ {1} ^ {t}\right), \quad \hat {\mathbf {V}} _ {t} = \mathbf {V} _ {t} / \left(1 - \beta_ {2} ^ {t}\right), \tag {2c} +$$ + +$$ +\boldsymbol {W} ^ {t + 1} = \boldsymbol {W} ^ {t} - \alpha \cdot \hat {\mathbf {M}} ^ {t} / (\sqrt {\hat {\mathbf {V}} ^ {t}} + \epsilon). \tag {2d} +$$ + +Here, $\mathbf{M}$ and $\mathbf{V}$ represent the first-order and second-order moments, respectively, and $\epsilon > 0$ is a small constant. + +# 3.2. Memory Consumption in LLM Training + +The key memory components involved in the training process include four primary elements: model parameters, optimizer states, gradients, and activations. The model component stores parameters required for training. In the case of the Adam optimizer, the optimizer states are represented by the first and second moment estimates, denoted as $\mathbf{M}$ and + +![](images/ef2d5f449d9830cfc6176f5a1a244d2df5cb91f67c41a7b397bcc4f1fadef9e6.jpg) +Figure 1. Memory components involved in training the LLaMA-1B model using the Adam optimizer under varying batch sizes. The reported values indicate memory usage in GB. + +V. The gradient corresponds to the memory cost associated with $\nabla F(\boldsymbol{W};\xi)$ . With the Adam optimizer, both the optimizer state and the gradient are determined by the number of trainable parameters, see recursions (2a)-(2b). + +Another significant memory cost arises from the activations, which represent the intermediate values computed during forward propagation. Unlike the optimizer state and gradients, the memory for activations depends on multiple factors, including model size, batch size, and sequence length. + +Figure 1 illustrates the memory consumption during the training of the LLaMA-1B model. For small batch sizes, the optimizer state constitutes a substantial portion of the memory usage. In contrast, for large batch sizes, activations dominate and account for nearly the entire memory cost. + +# 3.3. Memory-efficient Method + +As previously discussed, the optimizer state imposes a substantial memory overhead. To address this challenge, GaLore (Zhang et al., 2023b) introduces a projection technique that generates a compressed representation of the optimizer state, eliminating the need to store its full version. Consequently, the update rule of GaLore is as follows: + +$$ +\tilde {\mathbf {M}} ^ {t} = \beta_ {1} \cdot \tilde {\mathbf {M}} ^ {t - 1} + (1 - \beta_ {1}) \cdot \boldsymbol {P} ^ {\top} \nabla F (\boldsymbol {W} ^ {t}; \xi^ {t}), \quad (3 a) +$$ + +$$ +\tilde {\mathbf {V}} ^ {t} = \beta_ {2} \cdot \tilde {\mathbf {V}} ^ {t - 1} + (1 - \beta_ {2}) \cdot \left(\boldsymbol {P} ^ {\top} \nabla F \left(\boldsymbol {W} ^ {t}; \xi^ {t}\right)\right) ^ {2}, \tag {3b} +$$ + +$$ +\hat {\mathbf {M}} _ {t} = \tilde {\mathbf {M}} _ {t} / \left(1 - \beta_ {1} ^ {t}\right), \quad \hat {\mathbf {V}} _ {t} = \tilde {\mathbf {V}} _ {t} / \left(1 - \beta_ {2} ^ {t}\right), \tag {3c} +$$ + +$$ +\boldsymbol {W} ^ {t + 1} = \boldsymbol {W} ^ {t} - \alpha \cdot \boldsymbol {P} \hat {\mathbf {M}} _ {t} / (\sqrt {\hat {\mathbf {V}}} _ {t} + \epsilon). \tag {3d} +$$ + +Here, $P$ represents the projection matrix, which maps the gradient matrix onto a lower-dimensional subspace. Specifically, GaLore selects $P$ as the top left singular vectors of the gradient matrix, capturing its most important components. + +Since the projected gradient $P^{\top}\nabla F(\boldsymbol{W}^{t};\xi^{t})$ lies within a low-dimensional subspace, the associated optimizer states $\tilde{\mathbf{M}}$ and $\tilde{\mathbf{V}}$ in GaLore are also substantially reduced in size. + +This leads to notable memory savings compared to the Adam optimizer. However, as shown in Figure 1, the optimizer state contributes significantly to memory costs primarily when using a small batch size. Conversely, with larger batch sizes—more practical in many scenarios—the memory efficiency advantages of GaLore diminish, as activation memory becomes the dominant component of overall memory consumption. + +# 4. Randomized Subspace Optimization + +In this section, we present the randomized subspace optimization (RSO) method, tailored explicitly for the pretraining and fine-tuning of LLMs. + +# 4.1. Algorithm Framework + +As previously discussed, the memory overhead in LLM training primarily stems from the large scale of the models. In other words, the primary source of memory consumption arises from the high dimensionality of the LLM training problem (1). This observation motivates us to decompose the original problem into a series of lower-dimensional subproblems. By partitioning the problem into smaller components, we can effectively reduce memory usage, as each subproblem requires less memory to process. + +Similar to the random coordinate descent (Wright, 2015), which optimizes the objective function one coordinate at a time, we address problem (1) incrementally, subspace by subspace. The proposed update rules are as follows: + +$$ +\tilde {\boldsymbol {B}} ^ {k} \approx \underset {\boldsymbol {B}} {\arg \min } \left\{f \left(\boldsymbol {W} ^ {k} + \boldsymbol {P} ^ {k} \boldsymbol {B}\right) + \frac {1}{2 \eta^ {k}} \| \boldsymbol {B} \| ^ {2} \right\}, \tag {4a} +$$ + +$$ +\boldsymbol {W} ^ {k + 1} = \boldsymbol {W} ^ {k} + \boldsymbol {P} ^ {k} \tilde {\boldsymbol {B}} ^ {k}, \tag {4b} +$$ + +Here, $f(\pmb{W}^k + \pmb{P}^k\pmb{B}) = \mathbb{E}_{\xi}[F(\pmb{W}^k + \pmb{P}^k\pmb{B}; \xi)]$ in which $\pmb{P}^k = \{P_\ell^k\}_{\ell=1}^\mathcal{L}$ denotes the subspace projection matrices. Each $P_\ell^k \in \mathbb{R}^{m_\ell \times r_\ell}$ is a randomly selected matrix with $r_\ell \ll m_\ell$ . The parameters $\pmb{B} = \{B_\ell\}_{\ell=1}^\mathcal{L}$ consist of variables with significantly smaller dimensions compared to $\pmb{W}$ . Specifically, in the $\ell$ -th layer, $B_\ell$ has dimensions $r_\ell \times n_\ell$ , whereas $W_\ell$ has dimensions $m_\ell \times n_\ell$ . A proximal term $\| \pmb{B} \|^2 := \sum_{\ell} \| B_\ell \|_F^2$ is introduced to (4a) to ensure convergence, with coefficient $\eta^k$ to regulate its influence. + +In the $k$ -th iteration, a subspace projection matrix $P^k$ is randomly selected, and the subproblem in (4a) is solved. This process approximately minimizes the objective function within the chosen subspace. Upon solving the subproblem, the current parameters are updated, and a new subspace projection matrix, $P^{k + 1}$ , is selected for the subsequent iteration. When addressing the subproblem in (4a), standard optimizers such as GD, SGD, momentum SGD or Adam can be employed. Notably, obtaining an exact solution in (4a) is not required; an inexact solution suffices for the proposed + +approach. The RSO algorithm is presented in Algorithm 1. + +# Algorithm 1 Randomized Subspace Optimization + +Input: Initialization $W^0$ + +Output: Solution $\mathbf{W}^K$ . + +1: for $k = 0,1,\dots ,K - 1$ do +2: Sample $P^k$ according to a given distribution. +3: Solve subproblem (4a) and obtain the approximate solution $\tilde{B}^k$ using a given optimizer such as Adam. +4: Update the weights by $\pmb{W}^{k + 1} = \pmb{W}^k + \pmb{P}^k\tilde{\pmb{B}}^k$ . +5: end for + +# 4.2. Memory Efficiency + +We now demonstrate that the proposed RSO approach offers superior memory efficiency. Unlike other memory-efficient methods (e.g., GaLore, Adam-mini, Apollo, etc.) that primarily focus on reducing the memory usage of optimizer states, the RSO method additionally achieves substantial savings in gradient and activation memory requirements. + +Memory for optimizer states. When solving (4a), the reduced dimensionality of the subproblem significantly decreases the memory requirements for optimizer states. For instance, the memory required for both the first-order and second-order moment estimates in each subproblem is $r_{\ell}n_{\ell}$ parameters per $\ell$ -th layer, which is substantially lower than the $m_{\ell}n_{\ell}$ memory overhead in the standard Adam optimizer. + +Memory for gradients. Specifically, for the subproblems in (4a), it is sufficient to compute the gradient with respect to $B$ , i.e., $\nabla_{B}F(\boldsymbol{W}^{k} + \boldsymbol{P}^{k}\boldsymbol{B};\xi)$ , rather than calculating the full-dimensional gradient $\nabla_{\boldsymbol{W}}F(\boldsymbol{W}^{k};\xi)$ with respect to the original weight matrix $\boldsymbol{W}$ , as outlined in the GaLore recursion in (3a)-(3b). This results in considerable memory savings associated with the gradient computation. + +Memory for activations. The RSO method not only reduces memory usage for gradients but also significantly minimizes the memory required to store activations. For example, consider a neural network where the $\ell$ -th layer is defined as follows: + +$$ +(\text {A d a m}): \quad Z _ {\ell} = Y _ {\ell} \cdot W _ {\ell}, \quad y = L \left(Z _ {\ell}\right). \tag {5} +$$ + +$$ +\left(\mathrm {R S O}\right): \quad Z _ {\ell} = Y _ {\ell} \cdot \left(W _ {\ell} + P _ {\ell} B _ {\ell}\right), \quad y = L \left(Z _ {\ell}\right). \tag {6} +$$ + +Expression (5) represents the forward process of Adam, where the $\ell$ -th layer is associated with the weight matrix $W_{\ell}$ , while (6) corresponds to the RSO method associated with the weight matrix $B_{\ell}$ . Here, $Y_{\ell} \in \mathbb{R}^{s_{\ell} \times m_{\ell}}$ denotes the output of the previous layer (i.e., the activation), and $Z_{\ell}$ serves as the input to the next layer. The function $L(\cdot)$ , encompassing all subsequent layers and the loss function, depends only on $Z_{\ell}$ and not on $Y_{\ell}$ . Thus, once $Z_{\ell}$ is computed, $Y_{\ell}$ is no longer required for calculating the loss $y$ . + +
AlgorithmMemory
Optimizer StatesActivations
RSO24nr8bsn + 4bsr + 2bs2
GaLore24nr15bsn + 2bs2
LoRA48nr15bsn + 2bs2
Adam24n215bsn + 2bs2
+ +Table 1. Memory analysis of different algorithms in terms of optimizer states and activations for one typical transformer block. Here, $s$ , $b$ , and $n$ represent the sequence length, batch size, and embedding dimension, respectively. The intermediate dimension of the feed-forward network is assumed to be $4n$ . + +In the backward-propagation process, Adam and RSO computes the weight gradient as follows: + +$$ +(\text {A d a m}): \quad \frac {\partial y}{\partial W _ {\ell}} = Y _ {\ell} ^ {\top} \frac {\partial y}{\partial Z _ {\ell}}, \tag {7} +$$ + +$$ +\left(\mathrm {R S O}\right): \quad \frac {\partial y}{\partial B _ {\ell}} = \left(Y _ {\ell} P _ {\ell}\right) ^ {\top} \frac {\partial y}{\partial Z _ {\ell}}. \tag {8} +$$ + +Adam requires storing the activation $Y_{\ell} \in \mathbb{R}^{s_{\ell} \times m_{\ell}}$ in (7) to compute gradients with respect to $W_{\ell}$ . In contrast, RSO only needs to store $Y_{\ell}P_{\ell} \in \mathbb{R}^{s_{\ell} \times r_{\ell}}$ to compute gradients with respect to $B_{\ell}$ . Since $r_{\ell} \ll m_{\ell}$ , this approach achieves significant memory savings. As a result, the RSO method substantially reduces the memory overhead associated with activations in layers of the form (6). + +We analyze the memory overhead of the proposed RSO method for a typical transformer block. Table 1 summarizes the results, comparing memory usage for optimizer states and activations across various algorithms. Details of this memory analysis is presented in Appendix A. + +# 4.3. Communication Efficiency + +As previously mentioned, the RSO algorithm solves smaller subproblems at each iteration, resulting in gradients with reduced dimensionality compared to methods like Adam and GaLore, which rely on full-dimensional gradients. This reduction in gradient size enables RSO to achieve improved communication efficiency. + +Specifically, in a data-parallel framework such as Distributed Data Parallel (DDP), the model is replicated across multiple devices, with each device computing gradients on its local data batch. These gradients are then aggregated across devices, necessitating gradient communication. By operating with lower-dimensional gradients, the RSO method effectively reduces communication overhead compared to existing approaches. + +
Subproblem SolverSubproblem ComplexityTotal Complexity
Zero-Order (ZO) Methods
Stochastic ZO Method (Shamir, 2013)O((∑l=1Lnlrl)2ε-2)O((∑l=1Lnlrl)2ε-3)
First-Order (FO) Methods
GDO(log ε-1)O(ε-1)
Accelerated GD (Nesterov et al., 2018)O(log ε-1)O(ε-1)
SGD (Bottou et al., 2018)O(ε-1)O(ε-2)
Momentum SGD (Yuan et al., 2016)O(ε-1)O(ε-2)
Adam-family (Guo et al., 2024)O(ε-1)O(ε-2)
Second-Order (SO) Methods
Newton's method (Boyd & Vandenberghe, 2004)O(log(log ε-1))O(ε-1)
Stochastic Quasi-Newton method (Byrd et al., 2016)O(ε-1)O(ε-2)
+ +Table 2. The sample complexities of the RSO method with various subproblem solvers. For the ZO solver, it refers to the number of stochastic function value evaluations; for the FO solver, it refers to the number of deterministic/stochastic gradient computations; and for the SO solver, it refers to the number of deterministic/stochastic Hessian or estimated Hessian computations. $\tilde{O} (\cdot)$ hides logarithm terms. + +# 5. Convergence Analysis + +In this section, we present the convergence guarantees for the RSO method. To account for the use of various optimizers in solving the subproblem (4a), we assume that, at each iteration $k$ , the chosen optimizer produces an expected $\epsilon$ -inexact solution. Such an expected $\epsilon$ -inexact solution is defined below: + +Definition 5.1 (Expected $\epsilon$ -inexact solution). A solution $\tilde{B}^k$ is said to be an expected $\epsilon$ -inexact solution if it satisfies: + +$$ +\mathbb {E} \left[ g ^ {k} \left(\tilde {\boldsymbol {B}} ^ {k}\right) \right] - g ^ {k} \left(\boldsymbol {B} _ {\star} ^ {k}\right) \leq \epsilon , \tag {9} +$$ + +where $g^{k}(\pmb {B})\coloneqq f(\pmb{W}^{k} + \pmb{P}^{k}\pmb {B}) + \frac{1}{2\eta^{k}}\| \pmb {B}\|^{2}$ , and $B_{\star}^{k}$ is the optimal solution define as $B_{\star}^{k}\coloneqq \arg \min_{\pmb{B}}g^{k}(\pmb {B})$ . + +When $\eta^k$ is properly chosen, it can be guaranteed that $g^{k}(\pmb {B})$ is a strongly convex function hence $\pmb{B}_{\star}^{k}$ is unique. + +To establish convergence guarantees for the RSO algorithm, we require the following assumptions: + +Assumption 5.2. The objective function $f(\mathbf{W})$ is $L$ -smooth, i.e., it holds for any $\mathbf{W}^1$ and $\mathbf{W}^2$ that + +$$ +\| \nabla f (\boldsymbol {W} ^ {1}) - \nabla f (\boldsymbol {W} ^ {2}) \| \leq L \| \boldsymbol {W} ^ {1} - \boldsymbol {W} ^ {2} \|, +$$ + +where $\| \pmb {W}\| \coloneqq \sqrt{\sum_{\ell = 1}^{\mathcal{L}}\|W_{\ell}\|_{F}^{2}}$ for any $\pmb {W} = \{W_{\ell}\}_{\ell = 1}^{\mathcal{L}}$ + +Assumption 5.3. The random matrix $\pmb{P} = \{P_{\ell}\}_{\ell=1}^{\mathcal{L}}$ is sampled from a distribution such that $P_{\ell}^{\top}P_{\ell} = (m_{\ell}/r_{\ell})I_{r_{\ell}}$ and $\mathbb{E}[P_{\ell}P_{\ell}^{\top}] = I_{m_{\ell}}$ for each $\ell$ . + +Remark 5.4. In practice, when $m_{\ell} \gg r_{\ell}$ , sampling each $P_{\ell}$ from a normal distribution $\mathcal{N}(0, \frac{1}{r_{\ell}})$ yields an approximation $P_{\ell}^{\top} P_{\ell} \approx (m_{\ell} / r_{\ell}) I_{r_{\ell}}$ . This approach provides computational efficiency. However, to rigorously satisfy Assumption + +5.3, $P_{\ell}$ should be drawn from a Haar distribution or constructed as a random coordinate matrix (see (Kozak et al., 2023), Examples 1 and 2 for further details). + +The following theorem establish the convergence rate of the RSO algorithm. Detailed proofs are provided in Appendix B. + +Theorem 5.5. Under Assumptions 5.2 and 5.3, let each subproblem in (4b) be solved starting from the initial point $\pmb{B}^{0} = \mathbf{0}$ to an expected $\epsilon$ -inexact solution $\tilde{\pmb{B}}^k$ with suitable choice of $\eta^k$ . The sequence $\{\pmb{W}^k\}$ generated by the RSO method satisfies the following bound: + +$$ +\frac {1}{K} \sum_ {k = 0} ^ {K - 1} \mathbb {E} \| \nabla f (\boldsymbol {W} ^ {k}) \| ^ {2} \leq \frac {1 8 \hat {L} \Delta_ {0}}{K} + 1 8 \hat {L} \epsilon , \tag {10} +$$ + +where $\Delta_0\coloneqq f(\pmb {W}^0) - f^*$ and $\hat{L}\coloneqq \max_{\ell}\{m_{\ell} / r_{\ell}\} L$ + +Sample complexity with different optimizers. When all subproblems are solved to expected $\epsilon$ -inexact solutions, the RSO method achieves an $\epsilon$ -stationary point within $O(\epsilon^{-1})$ iterations. As each iteration requires solving the subproblem (4a), the total sample complexity of the RSO method depends on the solver employed for this subproblem. For instance, since gradient descent solves (4a) in $O(\log \epsilon^{-1})$ inner iterations, the RSO method using gradient descent attains a total sample complexity of $O(\epsilon^{-1}\log \epsilon^{-1})$ . Table 2 summarizes the sample complexities for the RSO method when equipped with various solvers, including zeroth-order, first-order, and second-order scenarios with optimizers such as gradient descent, momentum gradient descent, adaptive gradient descent, and their stochastic variants. + +Comparable complexity with vanilla Adam. It is observed + +
Algorithm60M130M350M1B
Adam*34.06 (0.22G)25.08 (0.50G)18.80 (1.37G)15.56 (4.99G)
GaLore*34.88 (0.14G)25.36 (0.27G)18.95 (0.49G)15.64 (1.46G)
LoRA*34.99 (0.16G)33.92 (0.35G)25.58 (0.69G)19.21 (2.27G)
ReLoRA*37.04 (0.16G)29.37 (0.35G)29.08 (0.69G)18.33 (2.27G)
RSO34.55(0.14G)25.34 (0.27G)18.86 (0.49G)15.86 (1.46G)
r/dmodel128 / 256256 / 768256 / 1024512 / 2048
Training Tokens (B)1.12.26.413.1
+ +Table 3. Comparison of validation perplexity and estimated memory usage for optimizer states across different algorithms during the pre-training of LLaMA models of various sizes on the C4 dataset. The optimizer states are stored in BF16 format. Results marked with * are sourced from (Zhao et al., 2024a). + +
CoLASTS-BMRPCRTESST2MNLIQNLIQQPAvg
Adam62.2490.9291.3079.4294.5787.1892.3392.2886.28
GaLore (rank=4)60.3590.7392.2579.4294.0487.0092.2491.0685.89
LoRA (rank=4)61.3890.5791.0778.7092.8986.8292.1891.2985.61
RSO (rank=4)62.4790.6292.2578.7094.8486.6792.2990.9486.10
GaLore (rank=8)60.0690.8292.0179.7894.3887.1792.2091.1185.94
LoRA (rank=8)61.8390.8091.9079.0693.4686.9492.2591.2285.93
RSO (rank=8)64.6290.7193.5679.4295.1886.9692.4491.2686.77
+ +Table 4. Evaluation of various fine-tuning methods on the GLUE benchmark using the pre-trained RoBERTa-Base model. The average score across all tasks is provided. + +in Table 2 that RSO with Adam to solve subproblem has sample complexity $O(\epsilon^{-2})$ , which is on the same order as vanilla Adam (Kingma, 2014) without subspace projection. + +# 6. Experiments + +In this section, we present numerical experiments to evaluate the effectiveness of our RSO method. We assess its performance on both pre-training and fine-tuning tasks across models of varying scales. Additionally, we compare the memory usage and time cost of our RSO method with existing approaches to highlight its advantages in memory and communication efficiency. In all tests, the RSO method uses the Adam optimizer with a fixed number of steps to solve each subproblem. The random projection matrices $\pmb{P} = \{P_{\ell}\}_{\ell=1}^{\mathcal{L}}$ are independently sampled from a normal distribution $\mathcal{N}(0,1 / r_{\ell})$ for each layer. We set all $r_{\ell}$ to the same value, which we define as the "rank" of our method to facilitate consistent comparison with other approaches that explicitly specify a rank parameter. + +# 6.1. Pre-training with RSO + +Experimental setup. We evaluate the performance of our RSO method on LLaMA models with sizes ranging from 60M to 7B parameters. The experiments are conducted + +using the C4 dataset, a large-scale, cleaned version of Common Crawl's web corpus, which is primarily intended for pre-training language models and word representations (Raffel et al., 2020). We compare our method against LoRA (Hu et al., 2022), GaLore (Zhao et al., 2024a), ReLoRA (Lialin et al., 2023), and Adam (Kingma, 2014) as baseline methods. We adopt the same configurations as those reported in (Zhao et al., 2024a), and the detailed settings for pre-training are provided in Appendix D.1. + +Main results. As shown in Table 3, under the same rank constraints, RSO outperforms other memory-efficient methods in most cases. We also report the estimated memory overhead associated with optimizer states. From Table 3, we observe that for LLaMA-350M, RSO achieves nearly the same performance as Adam while reducing the memory required for optimizer states by $64.2\%$ . For LLaMA-1B, this reduction increases to $70.7\%$ . The results for LLaMA-7B are provided in Appendix C.1. + +# 6.2. Fine-tuning with RSO + +Experimental setup. We extend the application of our RSO algorithm to fine-tuning tasks. Specifically, we fine-tune pre-trained RoBERTa models (Liu et al., 2019) on the GLUE benchmark (Wang et al., 2019), which encompasses a diverse range of tasks, including question answering, sen + +![](images/71d92fb1a99a566dfb0846237012abe4da07c6d56e1aff679470f52d7d1765cd.jpg) +Figure 2. Comparison of peak memory usage (in GB) per device for RSO and GaLore during LLaMA training with varying ranks. All hyperparameters, except rank, are consistent with (Zhao et al., 2024a). Adam's memory usage is reported for LLaMA-350M and LLaMA-1B but excluded for LLaMA-7B due to an out-of-memory (OOM) error. + +![](images/6a734997730b57a3aa903c3d44da3d595db5c12cabd5517837ffaa0d64a39b58.jpg) + +![](images/a1d368edc41443430741387494bf04e0b94866ab289281402d084a26e9185ef5.jpg) + +
MethodLLaMA-1B (Seconds)LLaMA-7B (Seconds)
Seq 64Seq 128Seq 256Seq 64Seq 128Seq 256
RSO0.941.703.292.402.944.60
GaLore1.121.843.357.868.269.12
Adam1.111.813.327.848.23OOM
+ +Table 5. Comparison of iteration time (in seconds) for different methods in LLaMA training across various sequence lengths. All hyperparameters, except sequence length, follow (Zhao et al., 2024a). LLaMA-1B runs on $4 \times$ A800 GPUs, while LLaMA-7B uses $8 \times$ A800 GPUs. SVD decomposition time in GaLore is excluded. Additionally, for LLaMA-7B with a sequence length of 256, the Adam optimizer encounters an out-of-memory (OOM) error. + +timent analysis, and semantic textual similarity. Detailed settings can be found in Appendix D.2. + +Main results. As shown in Table 4, our RSO method surpasses other memory-efficient approaches and delivers performance comparable to Adam across most datasets in the GLUE benchmark. Notably, RSO significantly outperforms Adam on the CoLA and MRPC datasets when the rank is set to 8. Additional fine-tuning experiments on LLaMA and OPT models are provided in Appendix C.2. + +# 6.3. Memory and Communication Efficiency + +To evaluate the memory and communication efficiency of our proposed method, we measure the peak memory usage and iteration time during the pre-training of LLaMA models of various sizes. + +RSO method requires less memory overhead. Figure 2 illustrates the actual memory usage during the training of LLaMA models. As shown, the RSO method incurs significantly lower memory overhead compared to GaLore and Adam. This reduction is attributed to RSO's ability to save memory for activations and use low-dimensional gradients. For instance, in the case of LLaMA-7B with a rank of 64, the RSO method achieves over a $40\%$ reduction in memory overhead compared to GaLore. + +Additionally, in Figure 2, the memory gap between RSO and + +GaLore widens as the rank decreases. This is because, as indicated in Table 1, the RSO method further reduces memory consumption for activations with lower ranks, whereas GaLore does not benefit in this regard. For LLaMA-350M and LLaMA-1B, GaLore's memory usage is observed to be comparable to that of Adam, as activation memory dominates in these cases. However, RSO still achieves superior memory efficiency due to its reduced activation cost. + +RSO method requires less time per iteration. Table 5 presents a comparison of the time required for one iteration across different methods when training LLaMA models. As shown, the RSO method requires significantly less time compared to GaLore or Adam due to its improved communication efficiency, achieved by reducing the dimensionality of gradients. For example, when training LLaMA-7B with a sequence length of 64, the time required by RSO is only one-third that of GaLore or Adam. Notably, while GaLore involves SVD decomposition (which is excluded from this measurement), RSO demonstrates even greater efficiency in training time. + +As shown in Table 5, the difference in iteration time between RSO and other approaches becomes more pronounced as model size increases or sequence length decreases. This phenomenon can be attributed to the communication overhead, which primarily stems from the synchronization of gradients across devices. Such overhead is more closely tied to model size while being less affected by sequence length. + +In contrast, the computational overhead is highly sensitive to sequence length. Therefore, RSO exhibits a more substantial advantage when the sequence length is considerably smaller than the model size, as communication overhead constitutes a larger fraction of the total iteration time under these conditions. + +# 7. Conclusion + +We propose a Randomized Subspace Optimization (RSO) method, aiming for Large Language Model (LLM) pretraining and fine-tuning. By decomposing the original training problem into small subproblems, our method achieves both memory and communication efficiency, while reach same level performance compared with GaLore and Adam. + +We outline two directions for future work on the RSO method. First, further reduction of memory overhead for activations could be explored. While part of the activation memory has already been reduced, the remaining portion might be further optimized through alternative strategies for partitioning the original problem. Second, it is worth investigating the performance of various methods for solving the subproblems. Given the low-dimensional nature of the subproblems, exploring the application of second-order methods could be particularly promising. + +# Impact Statement + +This study focuses on improving the memory efficiency of large language model (LLM) training. By enabling LLM training on devices with lower memory capacity, our approach helps reduce resource consumption and carbon emissions associated with LLM training. Furthermore, this enhancement may make LLM training more accessible to smaller institutions and research teams operating under constrained budgets. + +# Acknowledgments + +The computational resources were supported by the Center for Intelligent Computing and Song-Shan Lake HPC Center (SSL-HPC) in Great Bay University, Dongguan, China. This work was supported in part by National Key Research and Development Program of China under the grant numbers 2024YFA1012902 and 2024YFA1012903, and the National Natural Science Foundation of China under the grant numbers 12331010, 12288101, 12401408 and W2441021. Kun Yuan is also supported by AI for Science Institute, Beijing, China, and National Engineering Laboratory for Big Data Analytics and Applications. We also thank the anonymous reviewers for their valuable feedback. + +# References + +Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F. L., Almeida, D., Altenschmidt, J., Altman, S., Anadkat, S., et al. GPT-4 technical report. arXiv preprint arXiv:2303.08774, 2023. +Berahas, A. S., Cao, L., Choromanski, K., and Scheinberg, K. A theoretical and empirical comparison of gradient approximations in derivative-free optimization. *Foundations of Computational Mathematics*, 22(2):507-560, 2022. +Biderman, D., Portes, J., Ortiz, J. J. G., Paul, M., Greengard, P., Jennings, C., King, D., Havens, S., Chiley, V., Frankle, J., et al. Lora learns less and forgets less. arXiv preprint arXiv:2405.09673, 2024. +Bottou, L. Large-scale machine learning with stochastic gradient descent. In Proceedings of COMPSTAT'2010: 19th International Conference on Computational Statistics, Paris France, August 22-27, 2010 Keynote, Invited and Contributed Papers, pp. 177-186. Springer, 2010. +Bottou, L., Curtis, F. E., and Nocedal, J. Optimization methods for large-scale machine learning. SIAM review, 60(2):223-311, 2018. +Boyd, S. and Vandenberghe, L. Convex optimization. Cambridge university press, 2004. +Brown, T. B. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020. +Byrd, R. H., Hansen, S. L., Nocedal, J., and Singer, Y. A stochastic quasi-newton method for large-scale optimization. SIAM Journal on Optimization, 26(2):1008-1031, 2016. +Chen, T., Xu, B., Zhang, C., and Guestrin, C. Training deep nets with sublinear memory cost. arXiv preprint arXiv:1604.06174, 2016. +Chen, X., Feng, K., Li, C., Lai, X., Yue, X., Yuan, Y., and Wang, G. Fira: Can we achieve full-rank training of llms under low-rank constraint? arXiv preprint arXiv:2410.01623, 2024a. +Chen, Y., Zhang, Y., Cao, L., Yuan, K., and Wen, Z. Enhancing zeroth-order fine-tuning for language models with low-rank structures. arXiv preprint arXiv:2410.07698, 2024b. +Das, A. Natural galore: Accelerating galore for memory-efficient llm training and fine-tuning. arXiv preprint arXiv:2410.16029, 2024. + +Dettmers, T., Pagnoni, A., Holtzman, A., and Zettlemoyer, L. Qlora: Efficient finetuning of quantized LLMs. Advances in neural information processing systems, 36: 10088-10115, 2023. +Dubey, A., Jauhri, A., Pandey, A., Kadian, A., Al-Dahle, A., Letman, A., Mathur, A., Schelten, A., Yang, A., Fan, A., et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024. +Duchi, J. C., Jordan, M. I., Wainwright, M. J., and Wibisono, A. Optimal rates for zero-order convex optimization: The power of two function evaluations. IEEE Transactions on Information Theory, 61(5):2788-2806, 2015. +Gautam, T., Park, Y., Zhou, H., Raman, P., and Ha, W. Variance-reduced zeroth-order methods for fine-tuning language models. In International Conference on Machine Learning, pp. 15180-15208. PMLR, 2024. +Guo, Z., Xu, Y., Yin, W., Jin, R., and Yang, T. Unified convergence analysis for adaptive optimization with moving average estimator. arXiv preprint arXiv:2104.14840, 2024. +Hao, Y., Cao, Y., and Mou, L. Flora: Low-rank adapters are secretly gradient compressors. In International Conference on Machine Learning, pp. 17554-17571. PMLR, 2024. +He, Y., Li, P., Hu, Y., Chen, C., and Yuan, K. Subspace optimization for large language models with convergence guarantees. arXiv preprint arXiv:2410.11289, 2024. +Hu, E. J., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., Chen, W., et al. Lora: Low-rank adaptation of large language models. In International Conference on Learning Representations, 2022. +Kingma, D. P. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. +Kozak, D., Molinari, C., Rosasco, L., Tenorio, L., and Villa, S. Zeroth-order optimization with orthogonal random directions. Mathematical Programming, 199(1):1179-1219, 2023. +Lai, X., Tian, Z., Chen, Y., Li, Y., Yuan, Y., Liu, S., and Jia, J. Lisa: Reasoning segmentation via large language model. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9579-9589, 2024. +Lialin, V., Muckatira, S., Shivagunde, N., and Rumshisky, A. Relora: High-rank training through low-rank updates. In The Twelfth International Conference on Learning Representations, 2023. + +Liang, K., Liu, B., Chen, L., and Liu, Q. Memory-efficient LLM training with online subspace descent. arXiv preprint arXiv:2408.12857, 2024. +Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019. +Loshchilov, I. and Hutter, F. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019. +Luo, Q., Yu, H., and Li, X. Badam: A memory efficient full parameter optimization method for large language models. Advances in Neural Information Processing Systems, 37: 24926-24958, 2024. +Malladi, S., Gao, T., Nichani, E., Damian, A., Lee, J. D., Chen, D., and Arora, S. Fine-tuning language models with just forward passes. Advances in Neural Information Processing Systems, 36:53038-53075, 2023. +Nesterov, Y. and Spokoiny, V. Random gradient-free minimization of convex functions. Foundations of Computational Mathematics, 17(2):527-566, 2017. +Nesterov, Y. et al. Lectures on convex optimization, volume 137. Springer, 2018. +Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, P. J. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of machine learning research, 21 (140):1-67, 2020. +Ramesh, A. V., Ganapathiraman, V., Laradji, I. H., and Schmidt, M. Blockllm: Memory-efficient adaptation of llms by selecting and optimizing the right coordinate blocks. arXiv preprint arXiv:2406.17296, 2024. +Ren, J., Rajbhandari, S., Aminabadi, R. Y., Ruwase, O., Yang, S., Zhang, M., Li, D., and He, Y. Zero-offload: Democratizing billion-scale model training. In 2021 USENIX Annual Technical Conference (USENIX ATC 21), pp. 551-564, 2021. +Robert, T., Safaryan, M., Modoranu, I.-V., and Alistarh, D. LDadam: Adaptive optimization from low-dimensional gradient statistics. arXiv preprint arXiv:2410.16103, 2024. +Shamir, O. On the complexity of bandit and derivative-free stochastic convex optimization. In Conference on learning theory, pp. 3-24. PMLR, 2013. +Shazeer, N. and Stern, M. Adafactor: Adaptive learning rates with sublinear memory cost. In International Conference on Machine Learning, pp. 4596-4604. PMLR, 2018. + +Sutskever, I., Martens, J., Dahl, G., and Hinton, G. On the importance of initialization and momentum in deep learning. In International conference on machine learning, pp. 1139-1147. PMLR, 2013. +Thangarasasa, V., Gupta, A., Marshall, W., Li, T., Leong, K., DeCoste, D., Lie, S., and Saxena, S. SPDF: Sparse pretraining and dense fine-tuning for large language models. In Uncertainty in Artificial Intelligence, pp. 2134-2146. PMLR, 2023. +Vaswani, A. Attention is all you need. Advances in Neural Information Processing Systems, 2017. +Wang, A., Singh, A., Michael, J., Hill, F., Levy, O., and Bowman, S. R. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In International Conference on Learning Representations, 2019. +Wen, Z., Luo, P., Wang, J., Deng, X., Zou, J., Yuan, K., Sun, T., and Li, D. Breaking memory limits: Gradient wavelet transform enhances LLMs training. arXiv preprint arXiv:2501.07237, 2025. +Wright, S. J. Coordinate descent algorithms. Mathematical Programming, 151(1):3-34, 2015. +Xia, W., Qin, C., and Hazan, E. Chain of lora: Efficient finetuning of language models via residual learning. arXiv preprint arXiv:2401.04151, 2024. +Yuan, K., Ying, B., and Sayed, A. H. On the influence of momentum acceleration on online learning. Journal of Machine Learning Research, 17(192):1-66, 2016. +Zhang, H., Zhou, Y., Xue, Y., Liu, Y., and Huang, J. G10: Enabling an efficient unifiedgpu memory and storage architecture with smart tensor migrations. In Proceedings of the 56th Annual IEEE/ACM International Symposium on Microarchitecture, pp. 395-410, 2023a. +Zhang, Y., Chen, C., Li, Z., Ding, T., Wu, C., Ye, Y., Luo, Z.-Q., and Sun, R. Adam-mini: Use fewer learning rates to gain more. arXiv preprint arXiv:2406.16793, 2024a. +Zhang, Y., Li, P., Hong, J., Li, J., Zhang, Y., Zheng, W., Chen, P.-Y., Lee, J. D., Yin, W., Hong, M., et al. Revisiting zeroth-order optimization for memory-efficient llm fine-tuning: A benchmark. In International Conference on Machine Learning, pp. 59173-59190. PMLR, 2024b. +Zhang, Z., Liu, B., and Shao, J. Fine-tuning happens in tiny subspaces: Exploring intrinsic task-specific subspaces of pre-trained language models. In The 61st Annual Meeting of the Association For Computational Linguistics, 2023b. + +Zhao, J., Zhang, Z., Chen, B., Wang, Z., Anandkumar, A., and Tian, Y. Galore: Memory-efficient LLM training by gradient low-rank projection. In International Conference on Machine Learning, pp. 61121-61143. PMLR, 2024a. +Zhao, Y., Dang, S., Ye, H., Dai, G., Qian, Y., and Tsang, I. W. Second-order fine-tuning without pain for LLMs: A Hessian informed zeroth-order optimizer. arXiv preprint arXiv:2402.15173, 2024b. +Zhu, H., Zhang, Z., Cong, W., Liu, X., Park, S., Chandra, V., Long, B., Pan, D. Z., Wang, Z., and Lee, J. Apollo: SGD-like memory, adamw-level performance. arXiv preprint arXiv:2412.05270, 2024. + +# A. Memory Complexity Analysis + +In this section, we analyze the memory overhead of our proposed RSO algorithm for one typical transformer block. + +# A.1. Transformer Structure + +Transformers (Vaswani, 2017) have become a foundational component of LLMs. Here, we focus on the forward and backward propagation processes within a single transformer block using our RSO algorithm. + +Forward Propagation. Consider the input $X \in \mathbb{R}^{s \times n}$ to a transformer block, where $s$ is the sequence length and $n$ is the embedding dimension. The attention mechanism within the transformer block performs the following linear operations: + +$$ +Q = X \left(W _ {q} + P _ {q} B _ {q}\right), \quad K = X \left(W _ {k} + P _ {k} B _ {k}\right), \quad V = X \left(W _ {v} + P _ {v} B _ {v}\right), \tag {11} +$$ + +where $W_{q}, W_{k}, W_{v} \in \mathbb{R}^{n \times n}$ are the original weight matrices, $P_{q}, P_{k}, P_{v} \in \mathbb{R}^{n \times r}$ are the projection matrices, and $B_{q}, B_{k}, B_{v} \in \mathbb{R}^{r \times n}$ are the low-rank weight matrices used in the RSO method for each subproblem. These intermediate values are then combined as follows: + +$$ +\tilde {A} _ {s} = Q K ^ {\top}, \quad A _ {s} = \sigma_ {s} \left(\frac {\tilde {A} _ {s}}{\sqrt {n}}\right), \quad A _ {h} = A _ {s} V, \quad A _ {o} = A _ {h} \left(W _ {o} + P _ {o} B _ {o}\right), \tag {12} +$$ + +where $\sigma_{s}$ represents the softmax activation function, and $W_{o} \in \mathbb{R}^{n \times n}$ is the output projection matrix. + +Next, the feed-forward network consists of two fully-connected layers, which are computed as: + +$$ +\tilde {Z} _ {1} = A _ {o} \left(W _ {1} + P _ {1} B _ {1}\right), \quad Z _ {1} = \sigma \left(\tilde {Z} _ {1}\right), \quad Z _ {2} = Z _ {1} \left(W _ {2} + P _ {2} B _ {2}\right), \tag {13} +$$ + +where $W_{1} \in \mathbb{R}^{n \times 4n}$ and $W_{2} \in \mathbb{R}^{4n \times n}$ are the weights of the feed-forward layers. We assume that the intermediate dimension of the feed-forward network is four times the embedding dimension. Similarly, $P_{1} \in \mathbb{R}^{n \times r}$ , $P_{2} \in \mathbb{R}^{4n \times r}$ are the projection matrices, and $B_{1} \in \mathbb{R}^{r \times 4n}$ , $B_{2} \in \mathbb{R}^{r \times n}$ are the low-rank trainable parameters for RSO. The function $\sigma$ represents the activation function. + +For the Adam and GaLore methods, there are no $P$ and $B$ matrices, as they directly work with the original weight matrices. In the case of the LoRA method, each projection matrix $P$ is replaced by a trainable parameter $A$ . + +Backward Propagation. To calculate the gradients of all the weight matrices, the backward propagation begins with the partial gradient of the loss function $F$ with respect to the output of this block, denoted as $\mathcal{D}Z_2 \coloneqq \frac{\partial F}{\partial Z_2}$ . Here, we use $\mathcal{D}$ to represent the derivative of $F$ with respect to any matrix. Note that in our RSO algorithm, we compute the gradient with respect to $B$ , the low-rank trainable parameters, instead of the original weight matrix $W$ . The gradients for the weights in the feed-forward network are computed as follows: + +$$ +\mathcal {D} B _ {2} = \left(Z _ {1} P _ {2}\right) ^ {\top} \mathcal {D} Z _ {2}, \mathcal {D} \tilde {Z} _ {1} = \mathcal {D} Z _ {2} \left(W _ {2} + P _ {2} B _ {2}\right) ^ {\top} \odot \sigma^ {\prime} (\tilde {Z} _ {1}), \mathcal {D} B _ {1} = \left(A _ {o} P _ {1}\right) ^ {\top} \mathcal {D} \tilde {Z} _ {1}, \mathcal {D} A _ {o} = \mathcal {D} \tilde {Z} _ {1} \left(W _ {1} + P _ {1} B _ {1}\right) ^ {\top}. \tag {14} +$$ + +For the attention mechanism, the gradients for the corresponding matrices are calculated as: + +$$ +\mathcal {D} B _ {o} = \left(A _ {h} P _ {o}\right) ^ {\top} \mathcal {D} A _ {o}, \quad \mathcal {D} A _ {h} = \mathcal {D} A _ {o} \left(W _ {o} + P _ {o} B _ {o}\right) ^ {\top}, \quad \mathcal {D} A _ {s} = \mathcal {D} A _ {h} V ^ {\top}. \tag {15} +$$ + +To compute the gradients for the matrices $Q, K, V$ , the following equations are used: + +$$ +\mathcal {D} V = A _ {s} ^ {\top} \mathcal {D} A _ {h}, \quad \mathcal {D} Q = \left[ \mathcal {D} A _ {s} \odot \frac {1}{\sqrt {n}} \sigma_ {s} ^ {\prime} \left(\frac {\tilde {A} _ {s}}{\sqrt {n}}\right) \right] K, \quad \mathcal {D} K = \left[ \mathcal {D} A _ {s} \odot \frac {1}{\sqrt {n}} \sigma_ {s} ^ {\prime} \left(\frac {\tilde {A} _ {s}}{\sqrt {n}}\right) \right] ^ {\top} Q. \tag {16} +$$ + +The gradients for the low-rank weight matrices $B_{q}, B_{k}, B_{v}$ are computed as follows: + +$$ +\mathcal {D} B _ {v} = \left(X P _ {v}\right) ^ {\top} \mathcal {D} V, \quad \mathcal {D} B _ {q} = \left(X P _ {q}\right) ^ {\top} \mathcal {D} Q, \quad \mathcal {D} B _ {k} = \left(X P _ {k}\right) ^ {\top} \mathcal {D} K. \tag {17} +$$ + +Finally, to ensure that the backward propagation process can continue, the derivative with respect to the input $X$ must also be calculated. This is given by: + +$$ +\mathcal {D} X = \mathcal {D} Q \left(W _ {q} + P _ {q} B _ {q}\right) ^ {\top} + \mathcal {D} K \left(W _ {k} + P _ {k} B _ {k}\right) ^ {\top} + \mathcal {D} V \left(W _ {v} + P _ {v} B _ {v}\right) ^ {\top}. \tag {18} +$$ + +When using the Adam or GaLore algorithms, the derivatives must be computed with respect to the original weight matrix $W$ instead of the low-rank matrix $B$ . As a result, all occurrences of $\mathcal{DB}$ need to be replaced with $\mathcal{DW}$ . For example, the derivatives with respect to $W_{q}, W_{k}$ , and $W_{v}$ are computed as follows: + +$$ +\mathcal {D} W _ {v} = X ^ {\top} \mathcal {D} V, \quad \mathcal {D} W _ {q} = X ^ {\top} \mathcal {D} Q, \quad \mathcal {D} W _ {k} = X ^ {\top} \mathcal {D} K. +$$ + +# A.2. Memory for Optimizer States Analysis + +For Adam algorithm, the trainable parameters include $W_{q}, W_{k}, W_{v}, W_{o}, W_{1}, W_{2}$ . It is straightforward to compute the total number of parameters as $12n^{2}$ . Consequently, the optimizer states, considering both the first-order and second-order moments, require $24n^{2}$ storage. + +For RSO method, the trainable weights for each subproblem are $B_{q}, B_{k}, B_{v}, B_{o}, B_{1}, B_{2}$ , with a total of $12nr$ parameters per subproblem, leading to an optimizer state storage requirement of $24nr$ . LoRA trains an additional matrix $A$ (corresponding to the matrix $P$ used above), resulting in twice the optimizer state memory required compared to RSO. GaLore projects each gradient matrix from $\mathbb{R}^{n \times n}$ to $\mathbb{R}^{r \times n}$ , resulting in the same optimizer state memory requirement of $24nr$ . + +# A.3. Memory for Activations Analysis + +From the backward propagation process, it is evident that the activations generated during forward propagation are required. Specifically, in (11), the matrices $X, Q, K, V$ need to be stored, resulting in the following memory requirement: $M_1 = 4sn$ . + +However, in our RSO algorithm, $X$ is only needed to compute $\mathcal{DB}_q, \mathcal{DB}_k, \mathcal{DB}_v$ , where only the projections $XP_v, XP_q, XP_k$ are required. By setting $P_q = P_k = P_v = P$ , we only need to store $XP$ , reducing the memory requirement to $\tilde{M}_1 = 3sn + sr$ . + +Additionally, in (12), the matrices $\tilde{A}_s, A_s, A_h, A_o$ must be stored, requiring $M_2 = 2s^2 + 2sn$ . It is worth noting that $\frac{\tilde{A}_s}{\sqrt{n}}$ does not need to be stored, as $A_s$ can be used to recover it due to the properties of the softmax function. For the RSO algorithm, storing $A_h$ and $A_o$ is unnecessary, as $A_hP_o$ and $A_oP_1$ suffice. Consequently, the memory requirement is reduced to $\tilde{M}_2 = 2s^2 + 2sr$ . + +For the feed-forward network in (13), the matrices $\tilde{Z}_1, Z_1, Z_2$ need to be stored, resulting in a memory requirement of $M_3 = 9sn$ . In the RSO algorithm, $Z_1$ can be replaced with $Z_1P_2$ , reducing the memory requirement to $\tilde{M}_3 = 5sn + sr$ . + +Combining these results, the total memory cost for activations in the RSO algorithm is + +$$ +\tilde {M} _ {\mathrm {t o t a l}} = 8 s n + 2 s ^ {2} + 4 s r, +$$ + +compared to the memory cost in Adam or GaLore: + +$$ +M _ {\mathrm {t o t a l}} = 1 5 s n + 2 s ^ {2}. +$$ + +As the LoRA method trains parameters $A$ (corresponding to $P$ in our method), it requires the same activations as Adam, resulting in the same memory overhead as Adam or GaLore. + +# B. Convergence Analysis + +In this section, we present the convergence analysis of the RSO algorithm and provide a detailed proof of Theorem 5.5. + +Under Assumption 5.3, the following properties hold and can be straightforwardly derived: + +$$ +\| \boldsymbol {P} \boldsymbol {W} \| = \sqrt {\sum_ {\ell} \operatorname {t r} \left(W _ {\ell} ^ {\top} P _ {\ell} ^ {T} P _ {\ell} W _ {\ell}\right)} \leq \sqrt {\max _ {\ell} \left\{m _ {\ell} / r _ {\ell} \right\}} \| \boldsymbol {W} \|, +$$ + +where $\mathbf{W} = \{W_{\ell}\}_{\ell = 1}^{\mathcal{L}}$ denotes any family of matrices with $W_{\ell}\in \mathbb{R}^{m_{\ell}\times r_{\ell}}$ . For simplicity, we will not explicitly reference these properties when they are used. + +Lemma B.1. Under Assumptions 5.2 and 5.3, $g^{k}(\pmb{B})$ is $\left(\frac{1}{\eta^k} - \hat{L}\right)$ -strongly convex and $\left(\frac{1}{\eta^k} + \hat{L}\right)$ -smooth, with $0 < \eta < 1 / \hat{L}$ and $\hat{L} = \max_{\ell} \{m_{\ell} / r_{\ell}\} L$ . + +Proof. We denote the gradient of $f$ with respect to the parameters in the $\ell$ -th layer by $\nabla_{\ell}f(\pmb{W})$ . Let $h^{k}(\pmb{B}) \coloneqq f(\pmb{W}^{k} + \pmb{P}^{k}\pmb{B})$ . It can be shown that $h^{k}$ is $\hat{L}$ -Lipschitz smooth, as follows: + +$$ +\begin{array}{l} \| \nabla h ^ {k} (\pmb {B} ^ {1}) - \nabla h ^ {k} (\pmb {B} ^ {2}) \| ^ {2} = \sum_ {\ell = 1} ^ {\mathcal {L}} \left\| \left(\frac {\partial f}{\partial B _ {l} ^ {1}} (\pmb {W} ^ {k} + \pmb {P} ^ {k} \pmb {B} _ {\ell} ^ {1}) - \frac {\partial f}{\partial B _ {\ell} ^ {2}} (\pmb {W} ^ {k} + \pmb {P} ^ {k} \pmb {B} ^ {2})\right) \right\| _ {F} ^ {2} \\ = \sum_ {\ell = 1} ^ {\mathcal {L}} \left\| \left(P _ {\ell} ^ {k}\right) ^ {\top} \left(\nabla_ {\ell} f \left(\boldsymbol {W} ^ {k} + \boldsymbol {P} ^ {k} \boldsymbol {B} ^ {1}\right) - \nabla_ {\ell} f \left(\boldsymbol {W} ^ {k} + \boldsymbol {P} ^ {k} \boldsymbol {B} ^ {2}\right)\right) \right\| _ {F} ^ {2} \\ \leq \sum_ {\ell = 1} ^ {\mathcal {L}} \| P _ {\ell} ^ {k} \| _ {F} ^ {2} \| \nabla_ {\ell} f (\boldsymbol {W} ^ {k} + \boldsymbol {P} ^ {k} \boldsymbol {B} ^ {1}) - \nabla_ {\ell} f (\boldsymbol {W} ^ {k} + \boldsymbol {P} ^ {k} \boldsymbol {B} ^ {2})) \| _ {F} ^ {2} \\ \leq \max _ {\ell} \left(\frac {m _ {\ell}}{r _ {\ell}}\right) \sum_ {\ell = 1} ^ {\mathcal {L}} \| \nabla_ {\ell} f (\pmb {W} ^ {k} + \pmb {P} ^ {k} \pmb {B} ^ {1}) - \nabla_ {\ell} f (\pmb {W} ^ {k} + \pmb {P} ^ {k} \pmb {B} ^ {2})) \| _ {F} ^ {2} \\ = \max _ {\ell} \left(\frac {m _ {\ell}}{r _ {\ell}}\right) \| \nabla f (\pmb {W} ^ {k} + \pmb {P} ^ {k} \pmb {B} ^ {1}) - \nabla f (\pmb {W} ^ {k} + \pmb {P} ^ {k} \pmb {B} ^ {2})) \| ^ {2} \\ \leq L ^ {2} \max _ {\ell} \left(\frac {m _ {\ell}}{r _ {\ell}}\right) \| \boldsymbol {P} ^ {k} \boldsymbol {B} ^ {1} - \boldsymbol {P} ^ {k} \boldsymbol {B} ^ {2} \| ^ {2} \leq \hat {L} ^ {2} \| \boldsymbol {B} ^ {1} - \boldsymbol {B} ^ {2} \| ^ {2}. \\ \end{array} +$$ + +As $h^k$ is $\hat{L}$ -Lipschitz smooth, we can conclude that $g^{k}(\pmb {B}) = h^{k}(\pmb {B}) + \frac{1}{2\eta^{k}}\| \pmb {B}\|^{2}$ is $(\frac{1}{\eta^k} +\hat{L})$ -smooth. Furthermore, we have the inequality + +$$ +| h ^ {k} (\boldsymbol {B} ^ {2}) - h ^ {k} (\boldsymbol {B} ^ {1}) - \langle \nabla h ^ {k} (\boldsymbol {B} ^ {1}), \boldsymbol {B} ^ {2} - \boldsymbol {B} ^ {1} \rangle | \leq \frac {\hat {L}}{2} \| \boldsymbol {B} ^ {1} - \boldsymbol {B} ^ {2} \| ^ {2}. +$$ + +Based on this inequality, with the definition of $g^{k}$ , we have + +$$ +\begin{array}{l} g ^ {k} (\boldsymbol {B} ^ {2}) \geq g ^ {k} (\boldsymbol {B} ^ {1}) - \frac {1}{2 \eta^ {k}} \| \boldsymbol {B} ^ {1} \| ^ {2} + \frac {1}{2 \eta^ {k}} \| \boldsymbol {B} ^ {2} \| ^ {2} + \langle \nabla h ^ {k} (\boldsymbol {B} ^ {1}), \boldsymbol {B} ^ {2} - \boldsymbol {B} ^ {1} \rangle - \frac {\hat {L}}{2} \| \boldsymbol {B} ^ {1} - \boldsymbol {B} ^ {2} \| ^ {2} \\ = g ^ {k} \left(\boldsymbol {B} _ {1}\right) + \left\langle \nabla h ^ {k} \left(\boldsymbol {B} _ {1}\right) + \frac {1}{\eta^ {k}} \boldsymbol {B} _ {1}, \boldsymbol {B} _ {2} - \boldsymbol {B} _ {1} \right\rangle + \left(\frac {1}{2 \eta^ {k}} - \frac {\hat {L}}{2}\right) \| \boldsymbol {B} _ {1} - \boldsymbol {B} _ {2} \| ^ {2} \\ = g ^ {k} \left(\boldsymbol {B} _ {1}\right) + \left\langle \nabla g ^ {k} \left(\boldsymbol {B} _ {1}\right), \boldsymbol {B} _ {2} - \boldsymbol {B} _ {1} \right\rangle + \left(\frac {1}{2 \eta^ {k}} - \frac {\hat {L}}{2}\right) \| \boldsymbol {B} _ {1} - \boldsymbol {B} _ {2} \| ^ {2}, \\ \end{array} +$$ + +which shows that $g^{k}(\pmb{B})$ is $\left(\frac{1}{\eta^k} - \hat{L}\right)$ -strongly convex when $0 < \eta < 1 / \hat{L}$ . + +Theorem B.2 (Theorem 5.5). Under Assumptions 5.2 and 5.3, let the subproblem (4b) is solved from the initial point $\pmb{B}^{0} = \mathbf{0}$ to an expected $\epsilon$ -inexact solution $\tilde{\pmb{B}}^k$ with $\eta^k = \frac{1}{2\hat{L}}$ , the sequence $\{\pmb{W}^k\}$ generated by the RSO method satisfies + +$$ +\frac {1}{K} \sum_ {k = 0} ^ {K - 1} \mathbb {E} [ \| \nabla f (\boldsymbol {W} ^ {k}) \| ^ {2} ] \leq \frac {1 8 \hat {L} (f (\boldsymbol {W} ^ {0}) - f ^ {\star})}{K} + 1 8 \hat {L} \epsilon . \tag {19} +$$ + +Proof. For simplicity, we denote $\mu \coloneqq \frac{1}{\eta^k} -\hat{L}$ . As $g^{k}(\pmb {B})$ is $\mu$ -strongly convex, $\forall \pmb {B}$ , we have + +$$ +g ^ {k} (\pmb {B} _ {\star} ^ {k}) \leq g ^ {k} (\pmb {B}) - \frac {\mu}{2} \| \pmb {B} _ {\star} ^ {k} - \pmb {B} \| ^ {2}. +$$ + +Let $B = 0$ and using the definition of $\bar{B}^k$ , we can obtain a descent condition as + +$$ +\mathbb {E} \left[ g ^ {k} \left(\tilde {\boldsymbol {B}} ^ {k}\right) \right] \leq g ^ {k} (\boldsymbol {0}) - \frac {\mu}{2} \| \boldsymbol {B} _ {\star} ^ {k} \| ^ {2} + \epsilon . +$$ + +Taking the expectation with respect to the initial condition $\pmb{W}^k$ and random matrix $\pmb{P}^k$ , by the tower rule, it can be derived + +$$ +\mathbb {E} \left[ g ^ {k} \left(\tilde {\boldsymbol {B}} ^ {k}\right) \right] \leq \mathbb {E} \left[ g ^ {k} (\boldsymbol {0}) \right] - \frac {\mu}{2} \mathbb {E} \left[ \| \boldsymbol {B} _ {\star} ^ {k} \| ^ {2} \right] + \epsilon . +$$ + +Telescoping the above inequality from $k = 0$ to $K - 1$ , we have + +$$ +\sum_ {k = 0} ^ {K - 1} \frac {\mu}{2} \mathbb {E} [ \| \boldsymbol {B} _ {\star} ^ {k} \| ^ {2} ] \leq \sum_ {k = 0} ^ {K - 1} \mathbb {E} [ g ^ {k} (\mathbf {0}) ] - \sum_ {k = 0} ^ {K - 1} \mathbb {E} [ g ^ {k} (\tilde {\boldsymbol {B}} ^ {k}) ] + \epsilon . +$$ + +Notice that, by the update rule of (4b), $g^{k + 1}(\mathbf{0}) = f(\mathbf{W}^{k + 1}) = f(\mathbf{W}^k + \mathbf{P}^k\tilde{\mathbf{B}}^k) = g^k (\tilde{\mathbf{B}}^k) - \frac{1}{2\eta^k}\| \tilde{\mathbf{B}}^k\| ^2$ , the terms in the RHS of the above inequality can be canceled with each other and resulting in the following inequality: + +$$ +\sum_ {k = 0} ^ {K - 1} \frac {\mu}{2} \mathbb {E} [ \| \boldsymbol {B} _ {\star} ^ {k} \| ^ {2} ] \leq g ^ {0} (\boldsymbol {0}) - \mathbb {E} [ g ^ {K - 1} (\tilde {\boldsymbol {B}} ^ {K - 1}) ] - \sum_ {k = 0} ^ {K - 2} \frac {1}{2 \eta^ {k}} \mathbb {E} [ \| \tilde {\boldsymbol {B}} ^ {k} \| ^ {2} ] + \epsilon . +$$ + +Dividing $K$ on both sides and using the fact $g^{K - 1}(\tilde{\pmb{B}}^{K - 1})\geq f(\pmb{W}^{K - 1} + \pmb{P}^{K - 1}\tilde{\pmb{B}}^{K - 1})\geq f^{\star}$ , we can derive + +$$ +\frac {1}{K} \sum_ {k = 0} ^ {K - 1} \frac {\mu}{2} \mathbb {E} [ \| B _ {\star} ^ {k} \| ^ {2} ] + \frac {1}{K} \sum_ {k = 0} ^ {K - 2} \frac {1}{2 \eta^ {k}} \mathbb {E} [ \| \tilde {B} ^ {k} \| ^ {2} ] \leq \frac {g ^ {0} (\mathbf {0}) - f ^ {\star}}{K} + \epsilon . +$$ + +Next, we need to establish the connection between $\| B_{\star}^{k}\|^{2}$ and the final stationary measure $\| \nabla f(\pmb{W}^k)\|^2$ . As $g^{k}(\pmb{B})$ is $(1 / \eta^{k} + \hat{L})$ -smooth, $\forall \pmb{B}$ it holds that + +$$ +\left(\hat {L} + \frac {1}{\eta^ {k}}\right) ^ {2} \| \boldsymbol {B} - \boldsymbol {B} _ {\star} ^ {k} \| ^ {2} \geq \| \nabla g ^ {k} (\boldsymbol {B}) - \nabla g ^ {k} (\boldsymbol {B} _ {\star} ^ {k}) \| ^ {2} = \| \nabla g ^ {k} (\boldsymbol {B}) \| ^ {2}. +$$ + +With $B = 0$ , it holds + +$$ +\frac {1}{K} \sum_ {k = 0} ^ {K - 1} \frac {\mu}{2} \left(\hat {L} + \frac {1}{\eta^ {k}}\right) ^ {- 2} \mathbb {E} [ \| \nabla g ^ {k} (\mathbf {0}) \| ^ {2} ] \leq \frac {f \left(\boldsymbol {W} _ {0}\right) - f ^ {\star}}{K} + \epsilon . \tag {20} +$$ + +Furthermore, notice that $\nabla g^{k}(\mathbf{0}) = (\pmb{P}^{k})^{\top}\nabla f(\pmb{W}^{k})$ and the random matrix $\pmb{P}^{k}$ is sampled independently to $\pmb{W}^{k}$ , for any fixed $\pmb{W}^{k}$ , we have + +$$ +\begin{array}{l} \mathbb {E} _ {\boldsymbol {P} ^ {k}} [ \| \nabla g ^ {k} (\boldsymbol {0}) \| ^ {2} ] = \sum_ {\ell} \mathbb {E} _ {P _ {\ell} ^ {k}} [ \mathrm {T r} (\nabla_ {\ell} f (\boldsymbol {W} ^ {k}) ^ {\top} P _ {\ell} ^ {k} (P _ {\ell} ^ {k}) ^ {\top} \nabla_ {\ell} f (\boldsymbol {W} ^ {k})) ] \\ = \sum_ {\ell} \mathbb {E} _ {P _ {\ell} ^ {k}} \left[ \operatorname {T r} \left(P _ {\ell} ^ {k} \left(P _ {\ell} ^ {k}\right) ^ {\top} \nabla_ {\ell} f \left(\boldsymbol {W} ^ {k}\right) \nabla_ {\ell} f \left(\boldsymbol {W} ^ {k}\right) ^ {\top}\right) \right] \\ = \sum_ {\ell} \operatorname {T r} \left(\mathbb {E} _ {P _ {\ell} ^ {k}} \left[ P _ {\ell} ^ {k} \left(P _ {\ell} ^ {k}\right) ^ {\top} \right] \nabla_ {\ell} f (\boldsymbol {W} ^ {k}) \nabla_ {\ell} f (\boldsymbol {W} ^ {k}) ^ {\top}\right) \\ = \sum_ {\ell} \| \nabla_ {\ell} f (\boldsymbol {W} ^ {k}) \| _ {F} ^ {2} = \| \nabla f (\boldsymbol {W} ^ {k}) \| ^ {2}. \\ \end{array} +$$ + +Taking expectation with the respect to the randomness in $\pmb{W}^k$ , we can claim $\mathbb{E}[\| \nabla g^k (\mathbf{0})\|^2 = \mathbb{E}[\| \nabla f(\pmb{W}^k)\|^2]$ . Inserting this result back to (20) with $\eta^k = \frac{1}{2\hat{L}}$ , it can be written as + +$$ +\frac {1}{K} \sum_ {k = 0} ^ {K - 1} \mathbb {E} [ \| \nabla f (\boldsymbol {W} ^ {k}) \| ^ {2} ] \leq \frac {1 8 \hat {L} (f (\boldsymbol {W} ^ {0}) - f ^ {\star})}{K} + 1 8 \hat {L} \epsilon . +$$ + +Thus we complete the proof. + +# C. More Experimental Results + +# C.1. Pre-training on LLaMA-7B Model + +Table 6 compares the performance of our RSO method with GaLore and Adam on the LLaMA-7B model, where evaluations are conducted for 50K steps due to limited computational resources. We also report the memory overhead and total training time for each method. As shown in the table, RSO exhibits performance comparable to that of GaLore and Adam. Notably, RSO requires less than half the training time of the other methods. + +
MethodMemory (GB)Training Time (h)Perplexity
Adam78.9221615.43
GaLore75.3313415.59
RSO54.816415.99
+ +Table 6. Comparison of various pre-training methods for the LLaMA-7B model on the C4 dataset. Perplexity is reported at 50K steps. The training is conducted on $8\times$ A800 GPUs. The actual memory cost per device and the total training time are also reported. RSO and GaLore are configured with a batch size of 16, while Adam uses a batch size of 8. + +# C.2. Fine-tuning on LLaMA and OPT Models + +Table 7 compares RSO with other fine-tuning methods on LLaMA and OPT models across two datasets. As shown in the table, RSO outperforms other memory-efficient methods in terms of accuracy on most tasks. + +
ModelWinoGrandeCopa
AdamLoRAGaLoreRSOAdamLoRAGaLoreRSO
LLaMA-7B64.470.970.971.084.084.085.086.0
LLaMA-13B73.376.674.674.790.092.092.092.0
OPT-1.3B60.457.358.358.976.073.072.074.0
OPT-6.7B62.264.766.869.278.080.080.082.0
+ +Table 7. Comparison of various methods for fine-tuning LLaMA and OPT models on the WinoGrande and COPA datasets. The test accuracy for each method is reported. + +
ParamsHiddenIntermediateHeadsLayersStepsData amount
60M51213768810K1.3 B
130M7682048121220K2.6 B
350M10242736162460K7.8 B
1 B204854612432100K13.1 B
7 B4096110083232150K19.7 B
+ +Table 8. Hyperparameter configurations for LLaMA models of different scales, along with the corresponding number of training steps. Due to limited computational resources, only the first 50K steps are completed for LLaMA-7B. + +# D. Experimental Details + +# D.1. Pre-training Experimental Setup + +For the pre-training of LLaMA models across all scales, we adopt a configuration consistent with that used in (Zhao et al., 2024a). The main model hyperparameters and training steps for each method are summarized in Table 8. Specifically, in the RSO method, the Adam optimizer is used to perform multiple steps for solving each subproblem, resulting in an outer-inner iteration structure: the outer iterations correspond to subproblem updates, while the inner iterations represent Adam steps. For a fair comparison, we report the total number of inner iterations as the number of RSO steps. In all experiments, the maximum sequence length is set to 256, and the total training batch size is fixed at 512, corresponding to approximately 131K tokens per batch. A linear warm-up of the learning rate is applied over the first $10\%$ of training steps, followed by a cosine annealing schedule that decays the learning rate to $10\%$ of its initial value. + +For the RSO method, the learning rate is selected from the set $\{0.05, 0.02, 0.01\}$ . Consistent with the configuration used in GaLore, a learning rate scaling factor is applied to the weights of all multi-head attention and feed-forward layers in the model. The number of Adam steps used to solve each subproblem is set to either 200 or 500 depending on the specific experiment. + +A Memory Efficient Randomized Subspace Optimization Method for Training Large Language Models + +
TaskMNLISST-2MRPCCoLAQNLIQQPRTESTS-B
Batch Size1616163216161616
Epochs3030303030303030
Learning Rate (Rank = 4)1E-053E-053E-053E-051E-051E-051E-051E-05
Learning Rate (Rank = 8)1E-052E-052E-051E-051E-052E-052E-053E-05
Scaling Factor{8, 16, 32}
Steps per Subproblem{300, 500}
Max Sequence Length512
+ +Table 9. Hyperparameter settings for fine-tuning the RoBERTa-Base model on the GLUE benchmark using the RSO method with different rank configurations. + +# D.2. Fine-tuning Experimental Setup + +Fine-tuning on the GLUE Benchmark. To fine-tune the pre-trained RoBERTa-Base model on the GLUE benchmark, we train for 30 epochs using a batch size of 16 across all tasks, except for CoLA, which uses a batch size of 32. Consistent with the GaLore setting, a learning rate scaling factor is applied to the weights of all multi-head attention and feed-forward layers. Detailed hyperparameter configurations are listed in Table 9. + +Fine-tuning on the WinoGrande and COPA Datasets. For fine-tuning LLaMA and OPT models on the WinoGrande and COPA datasets, we randomly sample 1,000 training examples, 500 validation examples, and 1,000 test examples from each dataset. All experiments are run for 1,000 training steps. The corresponding hyperparameter settings are summarized in Table 10. + +
ExperimentHyperparametersValues
FTBatch Size16
Learning Rate{1E-07, 1E-06, 1E-05}
Weight Decay0
LoRABatch Size16
Learning Rate{1E-07, 1E-06, 5E-06}
Rank8
Weight Decay0
GaLoreBatch Size16
Learning Rate{1E-07, 1E-06, 5E-06}
Rank8
SVD Update Interval{300, 500}
Scaling Factor{4, 8}
Weight Decay0
RSOBatch Size16
Learning Rate{1E-07, 1E-06, 5E-06}
Rank8
Steps per Subproblem{300, 500}
Scaling Factor{4, 8}
Weight Decay0
+ +Table 10. Hyperparameter settings for fine-tuning LLaMA and OPT models on the WinoGrande and COPA datasets. \ No newline at end of file diff --git a/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/images.zip b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..cdc986d87faf205bcc2e23d1dd46cda871275ea0 --- /dev/null +++ b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49ab7b3b1cc3b735e6f9108f28e935f24cf68861a0fdf0d5d69723fd784060e8 +size 884090 diff --git a/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/layout.json b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..33caeb1b07db3b21a6fc5b3e2c009b1795b6f5b0 --- /dev/null +++ b/amemoryefficientrandomizedsubspaceoptimizationmethodfortraininglargelanguagemodels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27b452752894430e968df44463b267c404d5e27aab0270c73f38727a63bf84b7 +size 711315 diff --git a/ametalearnerforheterogeneouseffectsindifferenceindifferences/278f9fac-7835-43ec-b626-d923f0fca493_content_list.json b/ametalearnerforheterogeneouseffectsindifferenceindifferences/278f9fac-7835-43ec-b626-d923f0fca493_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d85108b1dc19b75c230bd38b796925b50b18089e --- /dev/null +++ b/ametalearnerforheterogeneouseffectsindifferenceindifferences/278f9fac-7835-43ec-b626-d923f0fca493_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed65cce49ca5389c2aa07dd3221a5fdcecdd1c5ed7a4a543ce23e58200c274ff +size 226259 diff --git a/ametalearnerforheterogeneouseffectsindifferenceindifferences/278f9fac-7835-43ec-b626-d923f0fca493_model.json b/ametalearnerforheterogeneouseffectsindifferenceindifferences/278f9fac-7835-43ec-b626-d923f0fca493_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3da3023957c8f652f99dec42ae958156240da09f --- /dev/null +++ b/ametalearnerforheterogeneouseffectsindifferenceindifferences/278f9fac-7835-43ec-b626-d923f0fca493_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:381347f5d01a8641f5dce3655c5e6a057c8e6d6f8ec2df198af9d3dcd8f27e59 +size 255919 diff --git a/ametalearnerforheterogeneouseffectsindifferenceindifferences/278f9fac-7835-43ec-b626-d923f0fca493_origin.pdf b/ametalearnerforheterogeneouseffectsindifferenceindifferences/278f9fac-7835-43ec-b626-d923f0fca493_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e16b9a05d4cecae9fc4cf8ff1f643042f6a4b433 --- /dev/null +++ b/ametalearnerforheterogeneouseffectsindifferenceindifferences/278f9fac-7835-43ec-b626-d923f0fca493_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac168f7b09f6219f9c33a23d07af793c1892ebd1f06aa28f40a0f0b461ec3bae +size 996044 diff --git a/ametalearnerforheterogeneouseffectsindifferenceindifferences/full.md b/ametalearnerforheterogeneouseffectsindifferenceindifferences/full.md new file mode 100644 index 0000000000000000000000000000000000000000..eb304be10788462c4b2efd1c31b14c0251cdbf17 --- /dev/null +++ b/ametalearnerforheterogeneouseffectsindifferenceindifferences/full.md @@ -0,0 +1,1128 @@ +# A Meta-learner for Heterogeneous Effects in Difference-in-Differences + +Hui Lan1 Haoge Chang2 Eleanor Dillon3 Vasilis Syrgkanis4 + +# Abstract + +We address the problem of estimating heterogeneous treatment effects in panel data, adopting the popular Difference-in-Differences (DiD) framework under the conditional parallel trends assumption. We propose a novel doubly robust metalearner for the Conditional Average Treatment Effect on the Treated (CATT), reducing the estimation to a convex risk minimization problem involving a set of auxiliary models. Our framework allows for the flexible estimation of the CATT, when conditioning on any subset of variables of interest using generic machine learning. Leveraging Neyman orthogonality, our proposed approach is robust to estimation errors in the auxiliary models. As a generalization to our main result, we develop a meta-learning approach for the estimation of general conditional functionals under covariate shift. We also provide an extension to the instrumented DiD setting with non-compliance. Empirical results demonstrate the superiority of our approach over existing baselines. + +# 1. Introduction + +Difference-in-Differences estimators have become a foundational tool for causal inference in economics (Roth et al., 2023), social sciences (Chiu et al., 2023) and healthcare (Wang et al., 2024) for evaluating causal effects of policy interventions or treatments when both pre- and post-treatment outcomes are observed. In contrast to cross-sectional data, having panel data enables researchers to work with different assumptions that are often considered more plausible in application. Due to the non-random assignment of treatments, + +*Part of this work is done during an internship at Microsoft Research. **Vasilis Syrgkanis and Hui Lan are Supported by NSF Award IIS-2337916. Institute of Computational and Mathematical Engineering, Stanford University, Stanford, USA Department of Economics, Columbia University Microsoft Research, New England Department of Management Science and Engineering, Stanford University, Stanford, USA. Correspondence to: Hui Lan . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +estimating the causal effect of a treatment or intervention in observational studies often requires strong assumptions, such as conditional exogeneity, which rules out unobserved confounding. Panel data consist of repeated observations of the same units over time, which allows researchers to control for certain types of unobserved, time-invariant characteristics. Due to its flexibility and robustness in handling nonexperimental data, the DiD approach has gained significant traction in empirical research, especially in the evaluation of policy interventions (e.g. Thome et al., 2024, etc.), labor market changes (e.g. Card & Krueger, 1994; Rossin-Slater et al., 2013; Pierce & Schott, 2016, etc.), environmental regulations (e.g. Gao et al., 2020, etc.), and public health (e.g. Finkelstein et al., 2012; Dimick & Ryan, 2014, etc.). + +Despite several recent methodological advances in the DiD literature (Roth et al., 2023; Chiu et al., 2023), most state-of-the-art approaches are still only able to generate average causal effects, or at best group average causal effects for predefined subpopulations. On the contrary, in many empirical applications, especially on large-scale datasets that stem from digital platforms, practitioners are interested in treatment effect heterogeneity for personalized decision making. The estimation of heterogeneous treatment effects has gained considerable attention in recent years due to its potential to uncover variation in how different subpopulations respond to an intervention. Motivated by the success of machine learning techniques in learning complex tasks, many studies have employed them in learning heterogeneous treatment effects, see for instance Shalit et al., 2017; Shi et al., 2019; Künzel et al., 2019; Nie & Wager, 2021; Oprescu et al., 2019; Kennedy, 2023, etc. However, estimating heterogeneous treatment effects for panel data remains relatively unexplored in literature. + +In this paper, we explore the estimation of heterogeneous treatment effects of a binary treatment using panel data under the canonical parallel trends condition used in DiD setups (e.g. Ashenfelter & Card, 1984; Card & Krueger, 1994, etc.). The parallel trends assumption posits that, in the absence of treatment, the treated and control units would have followed similar trends over time. Recent research has explored different approaches in addressing limitations of traditional methods (e.g. Roth et al., 2023). One line of work focuses on relaxing the unconditional parallel trends assumption by taking into account systematic differences + +in the time trends due to other (observed) characteristics through the conditional parallel trends condition (e.g. Heckman et al., 1997; Sant'Anna & Zhao, 2020, etc.). Another line of research tackles the challenges of estimating average treatment effects under treatment effect heterogeneity over time for multi-period settings (e.g. Sun & Abraham, 2021; Callaway & Sant'Anna, 2021, etc.). This paper synthesizes the insights from these two lines of works, and extends the framework to incorporate heterogeneous treatment effects across any dimension, in a flexible manner. + +We propose a doubly robust estimation framework for the conditional average treatment effect on the treated (CATT), and show that the mean squared error (MSE) of the learned model is robust to the estimation error of auxiliary models that need to be estimated. While there are doubly robust estimators proposed for unconditional ATT with panel data (e.g. Sant'Anna & Zhao, 2020; Callaway & Sant'Anna, 2021), there does not exist one for the heterogeneous effect. In contrast to the conditional average treatment effect (CATE), the asymmetry of the CATT allows our proposed method to avoid estimating a conditional outcome model under treatment, which can be hard to learn given a unbalanced dataset with a small number of treated units. We also draw the connection to the literature on debiasing under covariate shift (Chernozhukov et al., 2023), and provide an extension of our main result to a unifying framework for general conditional functionals, encompassing many widely encountered empirical problems such as conditional prediction powered inference under co-variate shift, heterogeneous long-term effects via surrogates based on historical data and heterogeneous treatment effects tailored to target sub-populations. Moreover, we extend our main result to the case of a binary instrument (or exposure to treatment) with two-sided noncompliance, and provide a doubly robust estimator for the conditional local average treatment effect of the exposed. + +Similar to Ogburn et al., 2015, Semenova & Chernozhukov, 2021 and Oprescu et al., 2019, we consider a framework that allows for the conditional parallel trends assumption to condition on a high dimensional set of observed covariates, denoted as $W$ . This conditioning strengthens the plausibility of the assumptions and improves the robustness of the resulting estimators. Our focus is on the estimation of the average treatment effect on the treated (ATT) while conditioning on any subset, $X$ , of the covariates $W$ . Estimating the projection of heterogeneous treatment effects onto a subset of covariates is particularly advantageous for interpretation, when the goal is to uncover heterogeneity with respect to a set of key features that are of most interest. For instance, in medical applications, we might have high-dimensional imaging data that can be used to predict the outcome, while we are only interested in understanding how the treatment effect is modified by other features such as age, bone density, etc. Furthermore, this framework can be + +helpful for decision making when trying to leverage the findings to deploy a personalized policy on a larger population for which only a subset of covariates is available. + +We demonstrate using synthetic and semi-synthetic experiments that the proposed meta-learner outperforms prior baselines. Finally, we applied our method on a real-world case study on the effects of raising minimum wage on teen employment. Our flexible doubly robust meta-learner automatically identified dimensions and patterns of heterogeneity that had not been highlighted in prior literature. In particular, our method uncovered that the county population plays a significant role on the magnitude of the treatment effect of raising the minimum wage on teen employment and even though this effect can be quite large and negative for small counties, it becomes negligible and close to zero on large counties. We developed an out-of-sample validation pipeline and showcased that the patterns of heterogeneity identified by our methodology are statistically significant. + +# 2. Problem Statement + +We consider the standard setup in the DiD framework. We observe a balanced panel with $n$ units and $T$ periods. We denote time by $t = 0, \dots, T - 1$ . The units are assumed to be an i.i.d sample from a superpopulation. For each unit $i$ , we observe a time series of outcomes $\{Y_{it}\}_{t=1}^{T}$ , a time series of binary treatment status $\{D_{it}\}_{t=1}^{T}$ , and time-invariant covariates $W_i$ . For simplicity, we restrict our discussion to $T = 2$ periods in this section and Section 3. We discuss extensions to the multi time period setting in Section 5. + +We adopt the potential outcomes framework and assume for unit $i$ at time $t$ , the outcome is generated as: + +$$ +Y _ {i, t} = D _ {i, t} Y _ {i, t} (1) + (1 - D _ {i, t}) Y _ {i, t} (0) +$$ + +where $Y_{i,t}(d)$ denotes the potential outcome at time $t$ under treatment $d$ . For brevity of notation, we may drop the unit subscript $i$ . We assume that both the treated and untreated groups are untreated at $t = 0$ , and the treated group becomes treated at $t = 1$ , while the control group remains untreated. Our target estimand is the conditional average treatment effect on the treated (CATT), conditioning on any subset $X$ of the covariates $W$ : + +$$ +\theta_ {0} (X) = \mathbb {E} [ Y _ {1} (1) - Y _ {1} (0) | D = 1, X ]. +$$ + +# 2.1. Assumptions and Identification + +Panel data allows us to disentangle unobserved confounding to some degree by leveraging both cross-sectional and time-series variations. In this section, we focus on the conditional parallel trends assumption that is commonly employed in the empirical literature to identify treatment effects for panel data. This assumption posits that the untreated outcome will + +evolve in parallel for both the treated and untreated group, for units with the same observed characteristics $W$ . + +Assumption 2.1 (Conditional Parallel Trends). + +$$ +\begin{array}{l} \mathbb {E} \left[ Y _ {1} (0) - Y _ {0} (0) \mid D _ {1} = 1, W \right] \\ = \mathbb {E} \left[ Y _ {1} (0) - Y _ {0} (0) \mid D _ {1} = 0, W \right] \\ \end{array} +$$ + +Conditioning on covariates makes the assumption more plausible, as it allows the treatment assignment to depend on any baseline trends that are predictable from the observed covariates. A practical motivation comes from the abundance of pre-treatment outcome data (for time periods before $t = 0$ ). It could be reasonable to condition on the full outcome history to try to account for cases where the magnitude of the growth (or decline) through time might depend on the base outcome level. For instance, employees with a higher salary usually receive higher pay raises through time. + +Assumption 2.2 (No-anticipation Assumption). + +$$ +\mathbb {E} \left[ Y _ {0} (0) - Y _ {0} (1) \mid D _ {1} = 1, W \right] = 0 +$$ + +In practical applications, Assumption 2.1 is imposed with the full set of covariates $W$ for plausibility, as we expect more covariates to be able to capture more confounding. However, we might only be interested in the heterogeneity of the treatment effect in a smaller and interpretable subset of the covariates $X \subset W$ . + +Proposition 2.3. Under Assumptions 2.1 and 2.2, the CATT, $\theta_0(X)$ , can be identified as: + +$$ +\theta_ {0} (X) = \mathbb {E} \left[ Y _ {1} - Y _ {0} - g _ {0} (X) \mid D = 1, X \right], +$$ + +where $g_0(x)\coloneqq \mathbb{E}[Y_1(0) - Y_0(0)|D = 0,W = w]$ + +# 3. DR-Learner for CATT + +In the special case when $W = X$ , the statistical problem that results from Proposition 2.3 is identical to the estimation of the conditional average treatment effect under conditional ignorance with outcomes $Y_{1} - Y_{0}$ (even though, the resulting statistical model can only be interpreted as a CATT, due to the one-sided nature of the parallel trends assumption). For discussion, see Appendix C. + +However, when $X \subset W$ , this equivalence no longer holds and prior approaches for CATE estimation under conditional exogeneity is no longer applicable and can lead to biased results even in the limit of infinite samples. For instance, the simplest identification formula for the CATE and its accompanying estimation estimation strategy, the $T$ -Learner, would estimate the statistical model: + +$$ +\tau_ {0} (X) = \mathbb {E} \left[ g _ {1} (W) - g _ {0} (W) \mid X \right], +$$ + +where $g_{d}(W) = \mathbb{E}[Y_{1} - Y_{0} \mid D = d, W]$ . However, under the conditional parallel trends assumption it is no longer the case that $\mathbb{E}[Y_{1} - Y_{0} \mid D = 1, W] = \mathbb{E}[Y_{1}(1) - Y_{0}(1) \mid W]$ , since the parallel trends assumption crucially does not make any restriction that the trends under treatment are conditionally parallel between treated and control units. Therefore $\mathbb{E}[g_{1}(W) \mid X] \neq \mathbb{E}[Y_{1}(1) - Y_{0}(1) \mid X]$ , which subsequently implies that $\tau_{0}(X) \neq \theta_{0}(X)$ . This difference will be more pronounced for datasets where there is a big difference in the covariate distribution between the treated and un-treated groups. + +Thus, when $X \subset W$ , the statistical problem that we need to solve based on the identification formula in Proposition 2.3 is inherently different than the statistical problem of estimate a CATE. Hence, we need to develop novel meta-learners, specifically for the CATT, that enjoy local robustness properties analogous to the robustness properties of methods that have been developed for the CATE in prior work (Nie & Wa-ger, 2021; Foster & Syrgkanis, 2023; Oprescu et al., 2019; Kennedy, 2023). Our main result will be a doubly-robust meta learner for the CATT. + +The simplest plug-in meta-learning approach for the CATT is to construct an estimate $\hat{g}_0$ of the baseline growth model $g_0$ using generic ML techniques (since it corresponds to the regression problem of predicting the difference $Y_{1} - Y_{0}$ from covariate $W$ , using samples only from the control population, i.e., $D = 0$ ) and then estimate a CATT model by learning a second-stage regression model that predicts the label $Y_{1} - Y_{0} - \hat{g}_{0}(W)$ from covariates $X$ , using samples only from the treated population, i.e., $D = 1$ . + +It is well-known (Chernozhukov et al., 2018) that using ML estimators in a plug-in manner may cause large estimation bias due to, for example, regularization and model mis-specification. A doubly-robust estimator alleviates this concern as it is less sensitive to errors in the baseline growth model $\hat{g}_0$ , and allows for consistent estimation under weaker statistical conditions. + +To present our main result, we need to present a set of preliminary definitions and assumptions. To avoid ill-posed extrapolations between the treated and untreated groups, we need the following overlap condition: + +Assumption 3.1 (Sufficient Overlap). For all $W$ , there exist $c > 0$ such that $c \leq \mathbb{P}(D = 1|W) \leq 1 - c$ . + +A key concept related to robustness is that of Neyman orthogonality: + +Definition 3.2 (Conditional Neyman Othogonality). Let $m(Z; \theta, \eta)$ be a moment for the target estimand $\theta(\cdot)$ with nuisance functions $\eta = (\eta_1, \eta_2, \ldots)$ . Such moment is Neyman orthogonal if the directional derivatives with respect to all nuisance functions $\eta$ is zero when evaluated at the true + +nuisances, i.e. + +$$ +\left. \partial_ {\eta} \mathbb {E} [ m (Z; \theta_ {0}, \eta) | W ] \right| _ {\eta = \eta_ {0}} = 0 +$$ + +Lemma 3.3 (Doubly Robust CATT on Subspace of Covariates). Under Assumptions 2.1, 2.2 and 3.1, the true CATT $\theta_0$ is a solution to the following conditional moment equation: + +$$ +\mathbb {E} \left[ \left(\frac {D - \pi_ {0} (W)}{(1 - \pi_ {0} (W))}\right) (\Delta Y - g _ {0} (W)) - D \theta (X) \Bigg | X \right] = 0 +$$ + +where $\Delta Y = Y_{1} - Y_{0}$ , $g_{0}(W) = \mathbb{E}[\Delta Y|D = 0,W]$ , $\pi_0(W) = \mathbb{P}(D = 1|W)$ . Moreover, this moment is conditionally Neyman orthogonal with respect to all nuisance functions (i.e. $\pi (W)$ and $g(W)$ ). + +Remark 3.4. Comparing with the DR-learner (Kennedy, 2023; Chernozhukov et al., 2017) for conditional average treatment effect (CATE), we note that, by refocusing on the CATT, our proposed moment condition no longer requires the estimation of the conditional expectation of the outcome $\Delta Y$ for the treated group w.r.t the high dimensional $W$ . This can be especially advantageous in practical settings where there are only a small number of treated units in the panel, making the estimation of the conditional expectation of the treated units difficult. Moreover, we show that simply regressing the CATE pseudo-outcome as in the DR-learner for CATE will give a biased estimate when the treated and control groups have very different distributions. For more details, please refer to Appendix C. + +The next key insight of our paper is that the Neyman orthogonal moment restriction from Lemma 3.3 can be turned into a loss minimization problem and models that satisfy the conditional moment restrictions can be equivalently viewed as minimizers of a strongly convex loss function. This insight is crucial in order to turn the statistical problem into a statistical learning theory problem and subsequently into meta-learning estimation strategy, which will allow for the use of generic ML methods for the estimation of $\theta_0$ . + +Proposition 3.5. Consider the incomplete squared loss: + +$$ +\mathcal {L} (\theta ; \pi_ {0}, g _ {0}) = \mathbb {E} \left[ D \theta (X) ^ {2} - 2 \widehat {Y} \theta (X) \right] +$$ + +where $\widehat{Y} (\pi_0,g_0) = \left(\frac{D - \pi_0(W)}{1 - \pi_0(W)}\right)(\Delta Y - g_0(W))$ . Under the same assumptions as in Lemma 3.3, the minimizer of $\mathcal{L}(\theta ;\pi_0,g_0)$ over any hypothesis space $\Theta$ is equivalent to the solution to the best-projection problem of the CATT among the treated: + +$$ +\min _ {\theta \in \Theta} \mathbb {E} [ (\theta (X) - \theta_ {0} (X)) ^ {2} \mid D = 1 ] +$$ + +Note that this is a convex loss function, which suggests computational tractability and fast statistical learning rates + +and allows it to be efficiently solved using any standard optimization solver. Another advantage of the loss minimization approach is that the out-of-sample loss can be used as a metric for model selection over different function classes (Lan & Syrgkanis, 2024). Moreover, as we show next in our main estimation theorem, this loss-based estimator enjoys double robustness properties, in that it leads to fast rates for the CATT if the product of the estimation rates for $\hat{\pi}$ and $\hat{g}$ decays fast enough. + +In the theorem below, we use $\hat{\theta}$ to denote a generic estimator that achieves small excess risk with respect to the plug-in loss $\mathcal{L}(\theta; \hat{\pi}, \hat{g})$ , where $\hat{\pi}$ , $\hat{g}$ are nuisance estimates, constructed from an auxiliary dataset (sample-splitting). Note that the problem of achieving a small excess risk with respect to a given loss is a standard statistical learning theory problem and hence many ML techniques can be invoked to provide such a guarantee. Hence, our theorem accommodates estimators resulting from a variety of CATT ML estimators, such as empirical risk minimization on the empirical loss, gradient boosted forests or neural networks. + +Theorem 3.6 (CATT Rates). Let $\hat{\pi},\hat{g}$ be estimates of the nuisance functions, constructed using an auxiliary dataset. Let $\| \theta \|_{D = 1} = \sqrt{\mathbb{E}[\theta(X)^2|D = 1]}$ denote the $L_{2}$ norm over the treated population. Let $\hat{\theta}$ be the result of any estimation process using $n$ samples, satisfying w.p. $1 - \delta$ + +$$ +\mathcal {L} (\hat {\theta}; \hat {\pi}, \hat {g}) - \inf _ {\theta \in \Theta} \mathcal {L} (\theta ; \hat {\pi}, \hat {g}) \leq R _ {n, \delta} ^ {2} +$$ + +Suppose Assumptions 2.1, 2.2, and 3.1. If the hypothesis space $\Theta$ is convex or is well specified (i.e. $\theta_0 \in \Theta$ ), then $\hat{\theta}$ satisfies w.p. $1 - \delta$ : + +$$ +\left\| \hat {\theta} (X) - \theta_ {*} (X) \right\| _ {D = 1} ^ {2} \leq +$$ + +$$ +\frac {4}{\rho} R _ {n, \delta} ^ {2} + \beta \mathbb {E} \left[ \mathbb {E} \left[ (\hat {g} (W) - g _ {0} (W)) \left(\frac {\pi_ {0} (W) - \hat {\pi} (W)}{1 - \hat {\pi} (W)}\right) | X \right] ^ {2} \right] +$$ + +where $\rho = \mathbb{P}(D = 1)$ and $\beta = \frac{2}{\rho^2c^2}$ and + +$$ +\theta_ {*} \in \arg \min _ {\theta \in \Theta} \| \theta (X) - \theta_ {0} (X) \| _ {D = 1} ^ {2} +$$ + +Lagged Dependent Outcome Alternate Assumption: In Appendix B, we also provide an extension of our approach under the lagged dependent outcome assumption, which posits that the past outcomes capture sufficient information to disentangle future outcomes and treatment assignment. This assumption is commonly used to model time series data and is also used in estimating treatment effects (e.g. Angrist & Pischke, 2009; Antonelli et al., 2024, etc.). + +DiD with Instruments: As a further extension, we consider the setting of estimating heterogeneous effects from panel data with a binary instrument $Z$ . This has applications in policy evaluation where the exposure to the policy does not perfectly determine treatment receipt due to + +non-compliance (Gerber & Green, 2012), and we are only willing to assume parallel trends on the exposure and not the chosen treatment. Thus, policy exposure can be interpreted as the instrument. In Appendix A, we present a meta-learner for this IV-DID setup. + +# 4. General Conditional Functionals Under Covariate Shift + +In this section, we show that the CATT estimation problem under conditional parallel trends can be viewed as a special case of a much more broad statistical estimation problem which can capture many other empirical problems beyond heterogeneous effects in DiD analysis. + +In particular, we consider the following estimation problem. Consider data consisting of $Z$ , which contains covariates $W$ drawn from a target distribution $\mathcal{D}_t$ . Let $\mathbb{E}_t[\cdot]$ denote the expectation with respect to the distribution $\mathcal{D}_t$ . The goal is to estimate a conditional linear functional $\mathbb{E}_t[m(Z; g_0)|X]$ of the regression function $g_0(W) = \mathbb{E}[Y|W]$ , where $X$ is a subset of $W$ , $m$ is a linear moment functional of $g_0$ and the expectation is taken with respect to the target distribution. On the other hand, labels for the target variable $Y$ of the regression function are available only on data where the covariates are drawn from a different source distribution, i.e., $(Y, W) \sim \mathcal{D}_s$ . Let $\mathbb{E}_s[\cdot]$ denote the expectation with respect to $\mathcal{D}_s$ . We assume that there is only covariate drift and no concept drift, i.e. + +Assumption 4.1 (No concept drift). $g_0(W) = \mathbb{E}_s[Y|W] = \mathbb{E}_t[Y|W] = \mathbb{E}[Y|W]$ . + +Let $E$ denote the indicator variable of whether the sample stems from the target distribution environment. We can then rewrite the statistical estimand as: + +$$ +\theta (X) = \mathbb {E} [ m (Z; g) | E = 1, X ] +$$ + +For instance, in the case of the CATT problem in the DiD setting, the moment is $m(Z; g) = Y_1(1) - Y_0(1) - g(W)$ and the outcome regression $g(W) = \mathbb{E}[Y_1(0) - Y_0(0)|W, D = 0]$ is learned based on the covariate distribution of the untreated units, while the estimand is the conditional functional $\mathbb{E}[m(Z; g)|X, D = 1] = \mathbb{E}[Y_1 - Y_0 - g(W)|X, D = 1]$ , which is a conditional expectation taken over the covariate distribution of the treated units, conditioning on a subset $X$ of $W$ . Since the label for the regression function $g(W)$ is $Y_1(0) - Y_0(0)$ , it is only available for the untreated group. + +Debiasing techniques for unconditional functionals under covariate shift were analyzed in the prior work of Chernozhukov et al., 2023. In this paper, we substantially extend their analysis to the case of conditional functionals and provide a doubly robust meta-learning strategy for any such conditional linear functional problem under covariate shift. + +We further motivate this setup with several other empirically prevalent examples from the machine learning and causal inference literature. + +Example 4.2 (Conditional prediction powered inference). In settings where prediction is a central task, it is often desirable to leverage predictive models to improve the efficiency and accuracy of statistical inference. Consider some high-dimensional features or covariates $W$ , some labels $Y$ , and a simulation model $g(W)$ for the predictive task $\mathbb{E}[Y \mid W]$ . An example of the prediction powered inference framework of (Angelopoulos et al., 2023), asks to estimate $\mathbb{E}_t[Y]$ . However, we might only have labeled data on a smaller or slightly different sub-population $D_s$ . In this case, we can use the simulation model and instead target the statistical estimand $\mathbb{E}_t[g(W)]$ , using the labeled data only for debiasing the simulation model. Our work extends this setting to allow for the estimation of conditional means with respect to a subset of the covariates $X$ , in the target distribution, i.e. $\theta(X) = \mathbb{E}_t[g(W) \mid X]$ and in a setting where the covariate shift density ratio is unknown (prior work considers only the case of a known covariate shift). In many applications, labels might be expensive to obtain and are only available for a small subpopulation which can be a different covariate distribution from the whole population. This setting fits into the framework with $m(Z; g) = g(W)$ . + +Example 4.3 (Heterogeneous long-term effects from short-term experiments using historical data). Here we consider settings where we have run a short-term experiment, where a treatment $D$ was randomized over a population of users drawn from $D_{t}$ and our goal is to estimate the effect of $D$ on a long-term outcome $Y$ . However, we want to estimate that effect without the need to wait for the long-term effect to materialize, but solely based on short-term data. A typical technique used in this setting is the surrogate approach, where we assume that the long-term outcome $Y$ , is not directly affected by the treatment $D$ , but is affected indirectly through some short-term or "surrogate" post-treatment outcomes $S$ , i.e. $Y(d) = Y(S(d))$ . Under this assumption, it can be shown that the long-term effect can be identified by measuring the effect of the treatment on the predicted long term outcome, based on the surrogates and other potentially pre-treatment covariates $X$ . For any set of pre-treatment co-variates $X$ , we can identify the CATE as $\theta(X) = \mathbb{E}[Y(1) - Y(0) \mid X] = \mathbb{E}[g(W) \mid D = 1, X] - \mathbb{E}[g(W) \mid D = 0, X]$ , where $W = (S, X)$ and $g(W) = \mathbb{E}[Y \mid W]$ . The function $g(W)$ can be learned using historical data where we have access to short-term signals $S$ , characteristics $X$ and long term outcomes $Y$ . However, the historical covariate distribution $D_{s}$ can potentially be different from the distribution $D_{t}$ . Since the treatment is randomized, we can write the target estimand + +Table 1. MSE (mean ± standard deviation) Over 100 Simulations. Each row represent a different meta-learner, and columns represent the different nuisance function classes. + +
Linear RegressionLasso (CV)Ridge (CV)Random ForestBest
Neural Net (OR)0.12 ± 0.020.12 ± 0.020.12 ± 0.020.38 ± 0.180.12 ± 0.02
Neural Net (DR)0.1 ± 0.020.1 ± 0.030.1 ± 0.020.14 ± 0.040.1 ± 0.02
XGBoost (OR)0.09 ± 0.020.09 ± 0.020.09 ± 0.020.31 ± 0.160.09 ± 0.02
XGBoost (DR)0.04 ± 0.010.04 ± 0.010.04 ± 0.020.06 ± 0.030.04 ± 0.01
+ +as: + +$$ +\theta (X) = \mathbb {E} _ {s} \left[ g (W) \left(\frac {D}{\pi} - \frac {1 - D}{1 - \pi}\right) | X \right] +$$ + +where $\pi = \mathbb{P}(D = 1) = \mathbb{P}(D = 1\mid W)$ . This setting falls in the framework with $m(Z;g) = g(X)\left(\frac{D}{\pi} -\frac{1 - D}{1 - \pi}\right)$ . + +Example 4.4 (CATE with covariate shift). Consider the case of estimating the CATE $\tau_0(X)$ under conditional exogeneity. Many times we want to understand the projection of the CATE on a subset of variables $W$ and over some target population $D_{t}$ over which we will deploy our personalized policy. However, we might want to use a bigger population $D_{s}$ to train our CATE model, so as to increase accuracy. In this setting, the target statistical estimate can be written as $\mathbb{E}_t[g(1,W) - g(0,W)\mid X]$ , where $g(D,W) = \mathbb{E}[Y\mid D,W]$ . This lies in the framework with $m(Z;g) = g(1,W) - g(0,W)$ . + +We provide a debiasing framework for this problem. Before presenting the main results, we state the necessary definitions and assumptions. + +Definition 4.5 (Conditional Riesz Representer). The Conditional Riesz Representer of a continuous linear functional $m(Z; g)$ on $X$ , with respect to some function $g(W)$ , is the square-integrable random variable $\alpha(X)$ such that: + +$$ +\begin{array}{l} \mathbb {E} _ {s} [ m (Z; g) | X ] = \mathbb {E} _ {s} [ \alpha (W) g (W) | X ] \\ \forall g (W) \quad s. t. \quad \mathbb {E} [ g (W) ^ {2} ] < \infty \\ \end{array} +$$ + +Assumption 4.6 (Sufficient Overlap Under Covariate Shift). For all $W$ , there exist $c > 0$ such that $c \leq \mathbb{P}(E = 1|W) \leq 1 - c$ . + +Theorem 4.7 (Neyman Orthogonal Moments for General Conditional Functionals under Covariate Shift). Suppose that Assumptions 4.1 and 4.6 hold. Consider a nuisance regression function $g_0(W) = \mathbb{E}[Y|W]$ , and target estimand $\theta(X) = \mathbb{E}_t[m(Z;g_0)|X] = \mathbb{E}[m(Z;g_0)|E = 1,X]$ , where $m(Z;g)$ is a continuous linear functional of $g$ . The true solution $\theta_0(X)$ satisfies the following conditional moment restriction that is Neyman orthogonal with respect to all the + +nuisance functions $\pi (W)$ $\alpha (W)$ and $g(W)$ .. + +$$ +\begin{array}{l} \mathbb {E} \left[ E \cdot (m (Z; g) - \theta (X)) + \right. \\ (1 - E) \cdot \frac {\pi (W)}{1 - \pi (W)} \alpha (W) (Y - g (W)) | X ] = 0 \\ \end{array} +$$ + +where $\pi (W) = \mathbb{P}(E = 1|W)$ and $\alpha (W)$ is the conditional Riesz representative of $\mathbb{E}_s[m(Z;g)\mid X]$ . + +In the CATT application the Riesz Representer is $-1$ . In Example 4.2, the Riesz representer is 1. In Example 4.3 the Riesz representer is $\frac{q(W)}{\pi} + \frac{1 - q(W)}{1 - \pi}$ , where $q(W) = \mathbb{P}(D = 1 \mid W, E = 1)$ . In Example 4.4 the Riesz representer $\alpha(D, W)$ is $\frac{D}{\mathbb{P}(D = 1 | E = 1, W)} - \frac{1 - D}{\mathbb{P}(D = 0 | E = 1, W)}$ . + +As in Proposition 3.5, this conditional moment can be turned into a convex doubly robust loss minimization problem. + +$$ +\mathcal {L} (\theta ; \pi , g) = \mathbb {E} \left[ E \theta (X) ^ {2} - 2 \widehat {Y} \theta (X) \right] +$$ + +where $\widehat{Y} = Em(Z;g) + \frac{(1 - E)\pi(W)}{1 - \pi(W)}\alpha (W)(Y - g(W))$ . Note that in this loss function the variable $Y$ is always multiplied by $1 - E$ and therefore it respects the constraint that outcomes $Y$ are only available in the source environment. The double robustness property of the loss will make the resulting estimand robust to estimation errors in the nuisance functions. Analogous to Theorem 3.6, we can prove fast statistical learning rates, for the resulting estimator based on this doubly robust loss. It is easy to verify that for the CATT setting this loss coincides with the loss in Section 3. + +# 5. Extension to Multi-Period Setting + +In the multiple time period setting, we observe the outcomes for each unit for time periods $t = 0,1,\dots ,T$ . Moreover, assume that no unit is treated at period 0. Consider first the case where all treated units are treated at period $G = 1$ and we assume the conditional parallel trends assumption that for all $t\geq 1$ , $\mathbb{E}[Y_t(0) - Y_0(0)\mid D = 1,W] = \mathbb{E}[Y_t(0) - Y_0(0)\mid D = 0,W]$ . Note that in this case, we can treat the distance $\Delta \in \{0,\ldots ,T - 1\}$ of a target period $t$ from the initial treatment time period 1 as a random variable. We can also denote with $Y_{post}(0)$ as the random variable corresponding to the post-treatment period outcome we are + +Table 2. MSE (mean ± standard deviation) Over 100 Simulations of Imbalanced Dataset. Each row represent a different meta-learner, and columns represent the different nuisance function classes. + +
Linear RegressionLasso (CV)Ridge (CV)Random ForestBest
Neural Net (OR)0.22 ± 0.060.21 ± 0.060.21 ± 0.060.4 ± 0.150.21 ± 0.05
Neural Net (DR)0.18 ± 0.070.18 ± 0.050.18 ± 0.050.24 ± 0.070.18 ± 0.05
Neural Net (CATE OR)0.27 ± 0.080.27 ± 0.080.27 ± 0.080.51 ± 0.160.27 ± 0.08
Neural Net (CATE DR)0.22 ± 0.070.22 ± 0.070.21 ± 0.070.33 ± 0.110.21 ± 0.07
XGBoost (OR)0.21 ± 0.060.21 ± 0.060.21 ± 0.060.34 ± 0.110.21 ± 0.06
XGBoost (DR)0.12 ± 0.030.12 ± 0.030.12 ± 0.030.18 ± 0.060.12 ± 0.03
XGBoost (CATE OR)0.27 ± 0.080.27 ± 0.080.27 ± 0.080.51 ± 0.160.27 ± 0.08
XGBoost (CATE DR)0.15 ± 0.050.15 ± 0.040.15 ± 0.050.34 ± 0.130.15 ± 0.04
+ +Table 3. MSE (mean ± standard deviation) over 100 semi-synthetic datasets generated from the Minimum Wage dataset. + +
Linear RegressionLasso (CV)Ridge (CV)Random ForestBest
XGBoost (OR)1.97 ± 0.042.02 ± 0.051.96 ± 0.042.08 ± 0.092.07 ± 0.09
XGBoost (DR)1.91 ± 0.041.88 ± 0.041.91 ± 0.041.8 ± 0.091.8 ± 0.09
XGBoost (CATE OR)2.72 ± 0.062.71 ± 0.072.73 ± 0.063.4 ± 0.362.69 ± 0.07
XGBoost (CATE DR)2.73 ± 0.062.7 ± 0.062.73 ± 0.073.47 ± 0.32.66 ± 0.07
Linear (OR)1.96 ± 0.042.01 ± 0.041.96 ± 0.042.07 ± 0.082.06 ± 0.08
Linear (DR)1.92 ± 0.041.89 ± 0.041.92 ± 0.041.83 ± 0.071.83 ± 0.07
Linear (CATE OR)2.78 ± 0.052.76 ± 0.052.78 ± 0.053.14 ± 0.382.76 ± 0.05
Linear (CATE DR)2.8 ± 0.052.75 ± 0.052.8 ± 0.053.13 ± 0.362.71 ± 0.05
+ +looking at. Then we can equivalently write: + +$$ +\mathbb {E} \left[ Y _ {\text {p o s t}} (1) - Y _ {\text {p o s t}} (0) \mid X, \Delta = t \right] = \mathbb {E} \left[ Y _ {t} (1) - Y _ {t} (0) \mid X \right] +$$ + +Thus we can treat the distance from treatment $\Delta$ , as yet another covariate in our framework and make it part of $X$ . This way, we can flexibly estimate treatment effect heterogeneity as a function of the distance from the initial treatment period and let ML methods select the best model on how distance from initial treatment changes the effect. + +Next consider the more general setting of a staggered rollout, i.e. each treated unit $(D = 1)$ is treated at some period $G = [1,T]$ and remains treated after that period. We denote the never-treated group as $G = \infty$ . In this setting, we can make the parallel trends assumption that for all $g\in [1,T]$ and for all $t\geq g\mathbb{E}[Y_t(0) - Y_0(0)\mid D = 1,W,G = g] = \mathbb{E}[Y_t(0) - Y_0(0)\mid D = 0,W,G = \infty ]$ . Similarly, we can incorporate heterogeneity as a function of the initial treatment period $G$ and the distance $\Delta$ to the treatment period, by making these variables as part of our heterogeneity set $X$ : for all $g\in [1,T]$ and $t\in [g,T]$ : + +$$ +\begin{array}{l} \mathbb {E} \left[ Y _ {\text {p o s t}} (1) - Y _ {\text {p o s t}} (0) \mid D = 1, X, \Delta = \ell , G = g \right] \\ = \mathbb {E} \left[ Y _ {g + \ell} (1) - Y _ {g + \ell} (0) \mid D = 1, X, G = g \right] \\ \end{array} +$$ + +Prior work of Callaway & Sant'Anna, 2021 considers heterogeneity with respect to $G$ and $\Delta$ , albeit in a fully nonparametric manner and does not provide a method for model selection, so as to uncover in a more data-driven manner the functional form of this heterogeneity. We note that the prior + +work of Callaway & Sant'Anna, 2021 also considers doubly robust estimation and inference on weighted averages of these heterogeneous effect models across different values of $G$ and $\Delta$ , which we do not discuss in this work. + +# 6. Experiments and Results + +# 6.1. Fully Synthetic Data + +First, to compare the results of our proposed method with other baselines, we conducted fully simulated experiments where the datasets are generated from known data generating processes that satisfy the identifying assumptions described in Section 2.1. The data has 20 covariates, and the CATT learners look at the projection onto 5 covariates. We report the mean MSE (mean square error) between the predicted CATT and the true CATT on covariates of the treated units of a held out test set. We compare our results with the following baseline models, here $g_{d}(W) = \mathbb{E}[Y_{1} - Y_{0}|W,D = d]$ , $g(W,D) = g_{1}(W)D + g_{0}(W)(1 - D)$ , and $\pi (W) = \mathbb{P}(D = 1|W)$ : + +- Outcome regression (OR) learner: $\theta(X) = \mathbb{E}[Y_1 - Y_0 - g_0(W)|D = 1, X]$ +- CATE outcome regression learner: $\theta(X) = \mathbb{E}[g_1(W) - g_0(W)|D = 1, X]$ +- CATE DR-learner: $\theta(X) = \mathbb{E}[g(W, 1) - g(W, 0) + \left(\frac{D}{\pi(W)} - \frac{1 - D}{1 - \pi(W)}\right)(Y - g(W, D))|D = 1, X]$ + +We considered three different final-stage models for the CATT: neural net, XGBoost, and linear models, to fit the meta-learners. Simulation results are presented in Table 1. The results of linear models can be found in the Appendix 6. The columns represent different ML methods that are used to learn the outcome regression. The propensity function, i.e. $\mathbb{P}(D = 1|W)$ , is always fitted using logistic regression. The "Best" column, represents using the ML method that achieved the lowest out-of-sample MSE for the outcome regression. In the Appendix, we also provide results that investigate the performance of our DiD CATT method and the baselines even when the parallel trends assumption is violated. The results in Appendix E suggest that the doubly robust estimator reduces the MSE, as compared to the baselines, even under the violation of parallel trends. + +Moreover, we also consider unbalanced datasets, where the size of the control group is much larger than that of the treated group. In particular, the propensities of each unit was lowered by a factor of 10. The results are presented in Table 2. We see that while all models suffered in performance, our proposed doubly robust model still outperforms the other meta-learners as it leverages the asymmetry of the CATT definition to be more robust to unbalanced settings. Notably, the proposed learner out-performs the doubly robust CATE learner as discussed in Remark 3.4. + +# 6.2. Minimum Wage Case Study + +![](images/d1bc4eb3be165a50c89848d35388ad63dc025df2b5c32efaf6470bbb33d3059a.jpg) +Figure 1. Predicted CATT with respect to log county population. + +We applied our proposed approach to the minimum wage dataset that is also studied in Callaway & Sant'Anna, 2021 and Callaway, 2023. This dataset studies the effect of minimum wage changes on teen employment during the period 2001-2007. The outcome variable of interest is the log of county-level teen employment, while the treatment variable is defined as a binary indicator representing whether + +a county's minimum wage exceeds the federal minimum wage. The dataset includes covariates such as county population and average annual pay, which serve as controls to account for differences in local economic conditions. For the ease of interpretation, we focus only on the raise in minimum wage at year 2004 as the treatment. In our analysis, we treat years after treatment assignment time (2004) as an additional covariate to control for, as discussed in Section 5. Employment rates as well as other covariates from before 2003 are also used as the covariates. + +![](images/fbdfd67f3e75721d10f53a5a260f241ef304402b4bf1a356e0a0de984ace44f8.jpg) +Figure 2. Calibration plot for CATT of minimum wage with respect to log county population. + +As a preliminary evaluation, we tested the performance of our methods on semi-synthetic data generated from this dataset. The semi-synthetic data was generated by bootstrapping the samples in the dataset and applying a chosen function for treatment assignment and treatment effect to compute the post-treatment outcomes. Since this dataset is rather low dimensional, we did not experiment with neural networks. The mean MSE with respect to the true CATT function is reported in Table 3. The results show that the proposed method out-performs outcome regression learners as well as the CATE learners. + +We then applied our method to the original real dataset. Figure 1 shows the CATT prediction over different values of log county population. The three models used (linear regression, XGBoost, and kernel ridge regression) all showed some extend of positive trends. This suggests that raising minimum wage might have a smaller negative effect on teen employment for counties with a larger population. + +Validating CATT: Since we do not have access to ground truth treatment effects for real datasets, we need a way to validate the heterogeneity that is picked up by the model is not due to noise. One approach is through calibration. The first step of the procedure is quantile binning the CATT predictions on a held out validation set. Next, the CATT + +predictions on a held out test set will be put into the bins according to the thresholds. The group average treatment effect on the treated (GATT) for each bin is calculated as the mean of the heterogeneous model predictions, as well as calculating the unconditional ATT for each group (i.e. conditioning on the empty set, we get $\theta = \mathbb{E}[\widehat{Y} ] / \mathbb{E}[D])$ . If the heterogeneity is indeed significant, we expect the calibration plots line up in the $45^{\circ}$ line with non-overlapping confidence intervals. + +Figure 2 presents the calibration plot for the doubly robust CATT learner realized using XGBoost. While we see that the GATT for the lowest quantile has a larger confidence intervals, the highest most two quantiles have non-overlapping confidence intervals. This suggests that there is significant heterogeneity between high and low populations. Together with Figure 1, the results seem to suggest that the treatment effect for counties with large populations is close to zero. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Causal Inference and Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# References + +Angelopoulos, A. N., Bates, S., Fannjiang, C., Jordan, M. I., and Zrnic, T. Prediction-powered inference. Science, 382 (6671):669-674, 2023. +Angrist, J. D. and Pischke, J.-S. Mostly harmless econometrics: An empiricist's companion. Princeton university press, 2009. +Antonelli, J., Rubinstein, M., Agniel, D., Smart, R., Stuart, E., Cefalu, M., Schell, T., Eagan, J., Stone, E., Griswold, M., et al. Autoregressive models for panel data causal inference with application to state-level opioid policies. arXiv preprint arXiv:2408.09012, 2024. +Ashenfelter, O. C. and Card, D. Using the longitudinal structure of earnings to estimate the effect of training programs, 1984. +Callaway, B. Difference-in-differences for policy evaluation. Handbook of Labor, Human Resources and Population Economics, pp. 1-61, 2023. +Callaway, B. and Sant'Anna, P. H. Difference-in-differences with multiple time periods. Journal of econometrics, 225 (2):200-230, 2021. +Card, D. and Krueger, A. B. Minimum wages and employment: A case study of the fast-food industry in new jersey and pennsylvania. The American Economic + +Review, 84(4):772-793, 1994. ISSN 00028282. URL http://www.jstor.org/stable/2118030. +Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., and Newey, W. Double/debiased/neyman machine learning of treatment effects. American Economic Review, 107(5):261-265, 2017. +Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W., and Robins, J. Double/debiased machine learning for treatment and structural parameters, 2018. +Chernozhukov, V., Newey, M., Newey, W. K., Singh, R., and Srygkanis, V. Automatic debiased machine learning for covariate shifts. arXiv preprint arXiv:2307.04527, 2023. +Chiu, A., Lan, X., Liu, Z., and Xu, Y. What to do (and not to do) with causal panel analysis under parallel trends: Lessons from a large reanalysis study. arXiv preprint arXiv:2309.15983, 2023. +Daw, J. R. and Hatfield, L. A. Matching and regression to the mean in difference-in-differences analysis. Health services research, 53(6):4138-4156, 2018. +Dimick, J. B. and Ryan, A. M. Methods for evaluating changes in health care policy: the difference-in-differences approach. Jama, 312(22):2401-2402, 2014. +Finkelstein, A., Taubman, S., Wright, B., Bernstein, M., Gruber, J., Newhouse, J. P., Allen, H., Baicker, K., and Oregon Health Study Group, t. The oregon health insurance experiment: evidence from the first year. The Quarterly journal of economics, 127(3):1057-1106, 2012. +Foster, D. J. and Syrgkanis, V. Orthogonal statistical learning. The Annals of Statistics, 51(3):879-908, 2023. +Gao, Y., Li, M., Xue, J., and Liu, Y. Evaluation of effectiveness of china's carbon emissions trading scheme in carbon mitigation. Energy Economics, 90:104872, 2020. +Gerber, A. and Green, D. Field Experiments: Design, Analysis, and Interpretation. W. W. Norton, 2012. ISBN 9780393979954. URL https://books.google.com/books?id=yxEGywACAAJ. +Heckman, J. J., Ichimura, H., and Todd, P. E. Matching as an econometric evaluation estimator: Evidence from evaluating a job training programme. The review of economic studies, 64(4):605-654, 1997. +Kennedy, E. H. Towards optimal doubly robust estimation of heterogeneous causal effects. Electronic Journal of Statistics, 17(2):3008-3049, 2023. + +Künzel, S. R., Sekhon, J. S., Bickel, P. J., and Yu, B. Metalearners for estimating heterogeneous treatment effects using machine learning. Proceedings of the national academy of sciences, 116(10):4156-4165, 2019. +Lan, H. and Syrgkanis, V. Causal q-aggregation for cat model selection. In International Conference on Artificial Intelligence and Statistics, pp. 4366-4374. PMLR, 2024. +Miyaji, S. Instrumented difference-in-differences with heterogeneous treatment effects. arXiv preprint arXiv:2405.12083, 2024. +Nie, X. and Wager, S. Quasi-oracle estimation of heterogeneous treatment effects. Biometrika, 108(2):299-319, 2021. +Ogburn, E. L., Rotnitzky, A., and Robins, J. M. Doubly robust estimation of the local average treatment effect curve. Journal of the Royal Statistical Society Series B: Statistical Methodology, 77(2):373-396, 2015. +Oprescu, M., Syrgkanis, V., and Wu, Z. S. Orthogonal random forest for causal inference. In International Conference on Machine Learning, pp. 4932-4941. PMLR, 2019. +Pierce, J. R. and Schott, P. K. The surprisingly swift decline of us manufacturing employment. American Economic Review, 106(7):1632-1662, 2016. +Rossin-Slater, M., Ruhm, C. J., and Waldfogel, J. The effects of california's paid family leave program on mothers' leave-taking and subsequent labor market outcomes. Journal of Policy Analysis and Management, 32(2):224-245, 2013. +Roth, J., Sant'Anna, P. H., Bilinski, A., and Poe, J. What's trending in difference-in-differences? a synthesis of the recent econometrics literature. Journal of Econometrics, 235(2):2218-2244, 2023. +Sant'Anna, P. H. and Zhao, J. Doubly robust difference-in-differences estimators. Journal of econometrics, 219(1): 101-122, 2020. +Semenova, V. and Chernozhukov, V. Debiased machine learning of conditional average treatment effects and other causal functions. The Econometrics Journal, 24(2):264-289, 2021. +Shalit, U., Johansson, F. D., and Sontag, D. Estimating individual treatment effect: generalization bounds and algorithms. In International conference on machine learning, pp. 3076-3085. PMLR, 2017. +Shi, C., Blei, D., and Veitch, V. Adapting neural networks for the estimation of treatment effects. Advances in neural information processing systems, 32, 2019. + +Sun, L. and Abraham, S. Estimating dynamic treatment effects in event studies with heterogeneous treatment effects. Journal of econometrics, 225(2):175-199, 2021. +Syrgkanis, V., Lei, V., Oprescu, M., Hei, M., Battocchi, K., and Lewis, G. Machine learning estimation of heterogeneous treatment effects with instruments. Advances in Neural Information Processing Systems, 32, 2019. +Thome, J. C., Rebeiro, P. F., Spieker, A. J., and Shepherd, B. E. Understanding difference-in-differences methods to evaluate policy effects with staggered adoption: an application to medicaid and hiv. arXiv preprint arXiv:2402.12576, 2024. +Wang, G., Hamad, R., and White, J. S. Advances in difference-in-differences methods for policy evaluation research. Epidemiology, 35(5):628-637, 2024. + +# A. DiD with Instruments + +As an extension, we consider a widely encountered setting of estimating heterogeneous treatment effects from panel data with a binary instrument $Z$ , with two sided non-compliance. In this setting, the target estimand is the conditional local average treatment effect among the exposed (CLATT) in the second (post-treatment) time period: + +$$ +\theta_ {0} (X) = \mathbb {E} \left[ Y _ {1} (1) - Y _ {1} (0) \mid D _ {1} (1) > D _ {1} (0), Z = 1, X \right] +$$ + +First, we consider the natural conditional extensions, which allows for more heterogeneity and flexibility, of the parallel trends assumptions stated in Miyaji, 2024. + +Assumption A.1 (No carryover assumption). Let $\mathbf{d} = (d_0, d_1)$ denote the treatment path, then $Y_0(\mathbf{d}, z) = Y_0(d_0, z)$ and $Y_1(\mathbf{d}, z) = Y_1(d_1, z)$ . + +This assumption requires that the outcome is only affected by the current treatment, in other words, there is no carry over effects from previous treatments. + +Assumption A.2 (Exclusion restriction for potential outcomes). For all $t$ , $Y_{t}(\mathbf{d},z) = Y_{t}(\mathbf{d})$ + +This is the standard exclusion restriction assumption for instrumental variables that the instrument only affects the outcome through the treatment. + +Assumption A.3 (Monotonicity Assumption). $\mathbb{P}(D_1(1)\geq D_1(0)) = 1$ or $\mathbb{P}(D_1(1)\leq D_1(0)) = 1$ + +This assumption requires that the effect of the instrument is monotone - that it either increases treatment adoption or decreases treatment adoption, but not both. This assumption is needed for identification under two-sided non-compliance. + +Assumption A.4 (No anticipation in treatment). $D_0(1) = D_0(0)$ for all units with $Z = 1$ + +Similar to the standard no-anticipation assumption that the treatment assignment in the second period should not have an affect on the outcome in the first period, here we assume that the exposure event that happens at the second period should not have an anticipatory effect on the treatment adoption in the first period. + +Assumption A.5 (CPTA in Treatment). + +$$ +\begin{array}{l} \mathbb {E} \left[ D _ {1} (0) - D _ {0} (0) | Z = 0, W \right] \\ = \mathbb {E} \left[ D _ {1} (0) - D _ {0} (0) | Z = 1, W \right] \\ \end{array} +$$ + +Here we no longer require the instrument to be independent with the potential outcome of the treatments, but instead require that the trend under no exposure is (mean) independent to the exposure. + +Assumption A.6 (CPTA in Outcome). + +$$ +\begin{array}{l} \mathbb {E} \left[ Y _ {1} \left(D _ {1} (0)\right) - Y _ {0} \left(D _ {0} (0)\right) \mid Z = 0, W \right] \\ = \mathbb {E} \left[ Y _ {1} \left(D _ {1} (0)\right) - Y _ {0} \left(D _ {0} (0)\right) \mid Z = 1, W \right] \\ \end{array} +$$ + +Assumption A.7 (Sufficient Overlap in Instrument). For all $W$ , there exist $c > 0$ such that $c \leq \mathbb{P}(Z = 1|W) \leq 1 - c$ . + +Moreover if the instrument does not have any effects on the treatment, the local average treatment effect will also not be identified. Hence, we need the following assumption to low-bound the effects of the instrument on the treatment. + +Assumption A.8 (Strong Instrument under PTA). There exist $c_{z} > 0$ such that + +$$ +\left| \mathbb {E} [ D _ {1} - D _ {0} - \mathbb {E} [ D _ {1} - D _ {0} \mid Z = 0, W ] \mid Z = 1, X ] \right| \geq c _ {z} +$$ + +Proposition A.9. Under Assumptions A.2, A.3, A.4, A.5, A.6, and A.8, the CLATE, $\theta_0(W)$ , can be identified as: + +$$ +\theta_ {0} (W) = \frac {\mathbb {E} \left[ Y _ {1} - Y _ {0} - \mathbb {E} \left[ Y _ {1} - Y _ {0} \mid Z = 0 , W \right] \mid Z = 1 , X \right]}{\mathbb {E} \left[ D _ {1} - D _ {0} - \mathbb {E} \left[ D _ {1} - D _ {0} \mid Z = 0 , W \right] \mid Z = 1 , X \right]} +$$ + +In the special case that $W = X$ under the parallel trends assumption, the problem is again equivalent to the standard IV problem, and Syrgkanis et al., 2019 proposed a doubly robust algorithm for estimating the heterogeneous LATE. For more discussion, see Appendix C. + +Lemma A.10 (Doubly Robust Conditional Moment Restriction for CLATE). Under Assumptions A.2, A.3, A.4, A.5, and A.6, A.7, the true CLATE is a solution to the following conditional moment equation: + +$$ +\mathbb {E} \left[ \widehat {\boldsymbol {Z}} \left\{(\Delta Y - g _ {Y} (W)) - (\Delta Y - g _ {D} (W)) \theta (X) \right\} \middle | X \right] = 0 +$$ + +where $\Delta S = S_{1} - S_{0}$ for $S = Y$ or $D$ , $g_{S}(W) = \mathbb{E}[S_{1} - S_{0}|Z = 0,W]$ , and $\widehat{Z} = \frac{Z - \mathbb{P}(Z = 1|W)}{1 - \mathbb{P}(Z = 1|W)}$ . Moreover, this moment is Neyman orthogonal with respect to all nuisance functions. + +Proposition A.11. Consider the incomplete squared loss: + +$$ +\begin{array}{l} \mathcal {L} _ {I V} (\theta ; \pi_ {0}, g _ {0, Y}, g _ {0, D}) \\ = \mathbb {E} \left[ \widehat {Z} \left\{\left(\Delta D - g _ {0, D} (W)\right) \theta (X) ^ {2} - 2 \left(\Delta Y - g _ {0, Y} (W)\right) \theta (X) \right\} \right] \\ \end{array} +$$ + +where $\Delta S = S_{1} - S_{0}$ for $S = Y$ or $D$ , $g_{0,S}(W) = \mathbb{E}[S_1 - S_0|D = 0,W]$ , and $\widehat{Z} = \frac{Z - \pi_0(W)}{1 - \pi_0(W)}$ for $\pi_0(W) = \mathbb{P}(Z = 1|W)$ . Under the same assumptions as in Lemma A.10, the minimizer of $\mathcal{L}(\theta ;\pi_0,g_0,Y,g_{0,D})$ over any hypothesis space $\Theta$ is equivalent to the solution to the best-projection problem of the CATT among the treated: + +$$ +\min _ {\theta \in \Theta} \mathbb {E} [ (\theta (X) - \theta_ {0} (X)) ^ {2} \mid Z = 1, D (1) > D (0) ] +$$ + +Theorem A.12 (CLATE Rates). Let $\hat{\pi},\hat{g}_D,\hat{g}_Y$ be estimates of the nuisance functions, constructed using an auxiliary dataset. Let $\| \theta \|_{D = 1,CM} = \sqrt{\mathbb{E}[\theta(X)^2|D = 1,D(1) > D(0)]}$ denote the $L_{2}$ norm over the compliers among the treated population. Let $\hat{\theta}$ be the result of any estimation process using $n$ samples, satisfying w.p. $1 - \delta$ : + +$$ +\mathbb {E} \left[ \mathcal {L} _ {I V} (\hat {\theta}; \hat {\eta}) - \inf _ {\theta \in \Theta} \mathcal {L} _ {I V} (\theta ; \hat {\eta}) \right] \leq R _ {n, \delta} ^ {2} +$$ + +Define the nuisance errors to be: + +$$ +\operatorname {E r r o r} (\pi , g _ {D}) := \mathbb {E} \left[ \mathbb {E} \left[ \left(\frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)}\right) \left(g _ {0, D} (W) - g _ {D} (W)\right) \mid X \right] ^ {2} \right] ^ {\frac {1}{2}} +$$ + +$$ +\operatorname {E r r o r} (\pi , g _ {Y}) := \mathbb {E} \left[ \mathbb {E} \left[ \left(\frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)}\right) (g _ {0, Y} (W) - g _ {Y} (W)) \Big | X \right] ^ {2} \right] ^ {\frac {1}{2}} +$$ + +Suppose Assumptions A.2, A.3, A.4, A.5, and A.6, A.7 are satisfied. Moreover, assume that there exist finite constant $B$ such that $|\theta(X)| \leq B$ for all $X$ with positive measure and all $\theta \in \Theta$ . If the hypothesis space $\Theta$ is convex or is well specified (i.e., $\theta_0 \in \Theta$ ), and $Error(\pi, g_D)$ is sufficiently small ( $Error(\pi, g_D) \leq \frac{CHK}{8B^2}$ ), then $\theta$ satisfies, w.p. $1 - \delta$ : + +$$ +\| \theta (X) - \theta_ {*} (X) \| _ {D = 1, C M} ^ {2} \leq \frac {4}{h k - \frac {8 B ^ {2}}{c} E r r o r (\pi , g _ {D})} R _ {n} ^ {2} + \left(\frac {\max (4 B ^ {2} , 2)}{c \left(h k - \frac {8 B ^ {2}}{c} E r r o r (\pi , g _ {D})\right)}\right) (E r r o r (\pi , \hat {g} _ {Y}) + E r r o r (\pi , \hat {g} _ {D})) +$$ + +where $h = \mathbb{P}(Z = 1)$ , $k = \mathbb{P}(D(1) > D(0)|Z = 1)$ , and + +$$ +\theta_ {*} \in \arg \min _ {\theta \in \Theta} \| \theta (X) - \theta_ {0} (X) \| _ {\Theta} ^ {2} +$$ + +# B. Alternate Assumptions: Lagged Dependent Outcome + +The parallel trends assumption guards against linear, time invariant, additive confounding. However, this may be unrealistic in practice. For instance, it might be sensible for the increment with respect to time to depend on the initial level of the outcome, i.e. $Y_{1}(0) - Y_{0}(0) \propto Y_{0}(0)$ . One may also be interested in the natural extension to the parallel trends assumptions that also accounts for more complicating confounding pattern. An popular alternative to model panel data is through the lagged dependent variable assumption. + +Definition B.1 (Outcome Support). Let $\mathbb{Y}_{dt}$ denote the support of the outcome at time $t$ for the cohort with treatment assignment $d$ . + +Assumption B.2 (Lagged Dependent Outcome with Covariates). $\mathbb{E}[Y_1(0)|Y_0(0) = y, D = 1, W] = \mathbb{E}[Y_1(0)|Y_0(0) = y, D = 0, W]$ for all $y \in \mathbb{Y}_{00}$ , and $x \in \mathbb{X}$ . + +Note that this assumption may be seen as a special case of Assumption 2.1, where the conditioning variable also includes the pre-treatment outcome as well as the observed covariates. This assumption might be more convincing in some practical applications. For instance, in wage studies, current income is generally believed to be highly dependent on past income. However, in cases where the distribution of outcome is significantly different between the treated and untreated groups, this assumption might lead an increase in bias due to matching the pre-treatment outcomes, as shown in (Daw & Hatfield, 2018) + +Assumption B.3 (Overlap in Pre-treatment Outcome). $\mathbb{Y}_{10} \subseteq \mathbb{Y}_{00}$ + +Note this is a testable assumption, and one can also perform a diagnostic test to ensure that the treated and control outcome distributions have sufficient overlap. + +Proposition B.4. Under Assumptions B.2 and B.3, the CATT, $\theta_0(W)$ , can be identified as: + +$$ +\theta_ {0} (X) = \mathbb {E} [ Y _ {1} (1) - Y _ {1} (0) | D = 1, X ] = \mathbb {E} [ Y _ {1} | D = 1, X ] - \mathbb {E} [ g (Y _ {0}, W) | D = 1, X ] +$$ + +where $g(y,W) = \mathbb{E}[Y_1|D = 0,Y_0 = y,W]$ + +Proof. + +$$ +\begin{array}{l} \mathbb {E} \left[ Y _ {1} (0) | D = 1, X \right] = \int_ {\mathbb {Y} _ {1 0}} \mathbb {E} \left[ Y _ {1} (0) | Y _ {0} = y, D = 1, W \right] p \left(Y _ {0} = y, W | D = 1, X\right) d y \\ = \int_ {\mathbb {Y} _ {1 0}} \mathbb {E} [ Y _ {1} (0) | Y _ {0} = y, D = 0, W ] p (Y _ {0} = y, W | D = 1, X) d y \\ = \int_ {\mathbb {Y} _ {1 0}} \mathbb {E} \left[ Y _ {1} \mid Y _ {0} = y, D = 0, W \right] p \left(Y _ {0} = y, W \mid D = 1, X\right) d y \\ = \mathbb {E} [ g (Y _ {0}, X) | D = 1, X ] \\ \end{array} +$$ + +Similarly, we may also replace the parallel assumptions for IV-CATT by the conditional lagged dependent variable assumptions for both the outcome and treatment. + +Assumption B.5 (Lagged Treatment). + +$$ +\mathbb {E} \left[ D _ {1} (0) | Z = 0, W, D _ {0} \right] = \mathbb {E} \left[ D _ {1} (0) | Z = 1, W, D _ {0} \right] +$$ + +Assumption B.6 (Lagged Outcome). + +$$ +\mathbb {E} \left[ Y _ {1} \left(D _ {1} (0)\right) | Z = 0, W, Y _ {0} \right] = \mathbb {E} \left[ Y _ {1} \left(D _ {1} (0)\right) | Z = 1, W, Y _ {0} \right] +$$ + +Under the lagged outcome framework, we need a slightly different notion of strong instruments as in the PTA framework. + +Assumption B.7 (Strong Instrument under Lagged Outcome). There exist $c_{z} > 0$ such that + +$$ +\left. \left| \mathbb {E} \left[ D _ {1} - \mathbb {E} \left[ D _ {1} \mid Z = 1, W, D _ {0} \right] \mid Z = 1, X \right] \right| \geq c _ {z} \right. +$$ + +Proposition B.8. Under Assumptions A.2, A.3, A.4, B.5, and B.6, the CLATE, $\theta_0(W)$ , can be identified as: + +$$ +\theta_ {0} (X) = \frac {\mathbb {E} \left[ Y _ {1} - \mathbb {E} \left[ Y _ {1} \mid Z = 0 , Y _ {0} , W \right] \mid Z = 1 , X \right]}{\mathbb {E} \left[ D _ {1} - \mathbb {E} \left[ D _ {1} \mid Z = 0 , D _ {0} , W \right] \mid Z = 1 , X \right]} +$$ + +Unifying the two assumptions: First we observe that both Proposition 2.3 and B.4 shares the same general form: + +$$ +\theta_ {0} (X) = \mathbb {E} [ S - g (V) | D = 1, X ] +$$ + +where $S$ is an observed outcome random variable and $g(V)$ is a nuisance function that is the conditional expectation $\mathbb{E}[S|D = 0, V]$ on some covariates $V$ , which is a superset of $X$ . Under the parallel trends assumption, $S = Y_{1} - Y_{0}$ and $V = W$ , and under the lagged outcome assumption, $S = Y_{1}$ and $V = [W, Y_{0}]$ . Thus, we see that the results in Section 3 can be generalized to the lagged dependent variable assumption. For IV-DID, similarly to the standard DiD case, when considering $X \subset W$ , we can rewrite the identification in Proposition A.9 so that the CLATE is the solution as: + +$$ +\theta_ {0} (X) = \frac {\mathbb {E} \left[ S _ {Y} - g _ {Y} \left(V _ {Y}\right) \mid Z = 1 , X \right]}{\mathbb {E} \left[ S _ {D} - g _ {D} \left(V _ {D}\right) \mid Z = 1 , X \right]} +$$ + +where $S_{r}$ is an observed outcome random variable for $r = Y, D$ , and $g_{r}(V)$ is a nuisance function that is the conditional expectation $\mathbb{E}[S_r|Z = 0,V]$ on some covariates $V$ , which is a superset of $X$ . + +# C. Conditioning on the full set of $W$ + +# C.1.Standard DID + +Here, we consider the case where $X = W$ , and are interested in estimating: + +$$ +\theta_ {0} (W) = \mathbb {E} \left[ Y _ {1} (1) - Y _ {1} (0) \mid D _ {1} = 1, W \right] +$$ + +Leveraging the no-anticipation and (conditional) parallel trends assumption, we can identify this as: + +$$ +\theta_ {0} (W) = \mathbb {E} [ Y _ {1} - Y _ {0} | D _ {1} = 1, W ] - \mathbb {E} [ Y _ {1} - Y _ {0} | D _ {1} = 0, W ] +$$ + +Note that this shares the same form of identification with the conditional average treatment effect (CATE) under conditional ignorance, but with the differences as the outcome: + +$$ +C A T E = \mathbb {E} [ Y (1) - Y (0) | W ] = \mathbb {E} [ Y | W, D = 1 ] - \mathbb {E} [ Y | W, D = 0 ] +$$ + +In other words, the meta-learners of CATT can be constructed the same way that was constructed for CATE using the difference in outcome. For instance, the doubly-robust pseudo-outcome can be constructed as: + +$$ +Y ^ {D R} = g (1, W) - g (0, W) + \left(\frac {D}{\pi (W)} - \frac {1 - D}{1 - \pi (W)}\right) (Y _ {1} - Y _ {0} - g (D, W)) +$$ + +where $g(D, W)$ is an estimator for the conditional expectation $\mathbb{E}[Y_1 - Y_0|W, D]$ , and $\pi(W)$ is an estimator of the propensity $\mathbb{P}(D = 1|W)$ . The nuisance functions $g(D, W)$ and $\pi(W)$ may be estimated using any ML methods. + +As in (Kennedy, 2023), the doubly robust learner (DR-learner) can be constructed as $\theta(W) = \mathbb{E}[Y^{DR}|W]$ . Note that due to the asymmetry of the parallel trends assumption, this estimator gives the conditional average treatment effect of the treated. If we further assume that the treatment effects are also mean independent of the treatment conditional on $W$ (i.e. $\mathbb{E}[Y_1(1) - Y_1(0)|D = 1, W] = \mathbb{E}[Y_1(1) - Y_1(0)|D = 0, W]$ ), then the CATE estimator on the difference in the outcomes identifies the conditional average treatment effects. + +However, this CATE pseudo-outcome will give the biased estimate of the CATT when projecting on a subset of covariates, i.e. $\theta^{CATE}(X) = \mathbb{E}[Y^{DR}|X]$ where $X\subset W$ . Here we see that $\theta^{CATE}(X) = \mathbb{E}[\mathbb{E}[Y^{DR}|W]|X] = \mathbb{E}[\mathbb{E}[Y_1(1) - Y_1(0)|D = 1,W]|X]\neq \mathbb{E}[\mathbb{E}[Y_1(1) - Y_1(0)|D = 1,W]|D = 1,X] = \mathbb{E}[Y_1(1) - Y_1(0)|D_1 = 1,X]$ . This difference will be more pronounced for datasets where there is a big difference in the covariate distribution between the treated and un-treated groups. + +# C.2. IV-DID + +In this section, we show that when conditioning on the full set of variables $W$ , the CLATE can be estimated by the DR-IV learner in (Syrgkanis et al., 2019). By the standard LATE identification argument we can write: + +$$ +\begin{array}{l} \mathbb {E} \left[ Y _ {1} (1) - Y _ {1} (0) \mid D _ {1} (1) > D _ {1} (0), Z = 1, W \right] = \frac {\mathbb {E} \left[ \left(Y _ {1} (1) - Y _ {1} (0)\right) 1 \left\{D _ {1} (1) > D _ {1} (0) \right\} \mid Z = 1 , W \right]}{\mathbb {P} \left(D _ {1} (1) > D _ {1} (0) \mid Z = 1 , W\right)} \\ = \frac {\mathbb {E} \left[ \left(Y _ {1} \left(D _ {1} (1)\right) - Y _ {1} \left(D _ {1} (0)\right)\right) 1 \left\{D _ {1} (1) > D _ {1} (0) \right\} \mid Z = 1 , W \right]}{\mathbb {E} \left[ D _ {1} (1) - D _ {1} (0) \mid Z = 1 , W \right]} \\ = \frac {\mathbb {E} [ Y _ {1} (D _ {1} (1)) - Y _ {1} (D _ {1} (0)) \mid Z = 1 , W ]}{\mathbb {E} [ D _ {1} (1) - D _ {1} (0) \mid Z = 1 , W ]} \\ \end{array} +$$ + +Under the parallel trends assumption in the outcome, the numerator is identified as: + +$$ +\begin{array}{l} \mathbb {E} \left[ Y _ {1} \left(D _ {1} (1)\right) - Y _ {1} \left(D _ {1} (0)\right) \mid Z = 1, W \right] = \mathbb {E} \left[ Y _ {1} - Y _ {0} \mid Z = 1, W \right] - \mathbb {E} \left[ Y _ {1} \left(D (0)\right) - Y _ {0} \mid Z = 1, W \right] \\ = \mathbb {E} [ Y _ {1} - Y _ {0} \mid Z = 1, W ] - \mathbb {E} [ Y _ {1} - Y _ {0} \mid Z = 0, W ] \\ \end{array} +$$ + +Moreover, under the parallel trends assumption in the treatment, the denominator is identified as: + +$$ +\begin{array}{l} \mathbb {E} \left[ D _ {1} (1) - D _ {1} (0) \mid Z = 1, W \right] = \mathbb {E} \left[ D _ {1} - D _ {0} \mid Z = 1, W \right] - \mathbb {E} \left[ D _ {1} (0) - D _ {0} \mid Z = 1, W \right] \\ = \mathbb {E} \left[ D _ {1} - D _ {0} \mid Z = 1, W \right] - \mathbb {E} \left[ D _ {1} - D _ {0} \mid Z = 1, W \right] \\ \end{array} +$$ + +For brevity of notation, let $Y$ denote $Y_{1} - Y_{0}$ and let $D$ denote $D_{1} - D_{0}$ . Thus, under the PTA assumptions the effect is identified as: + +$$ +\theta_ {0} (W) = \frac {\mathbb {E} [ Y \mid Z = 1 , W ] - \mathbb {E} [ Y \mid Z = 0 , W ]}{\mathbb {E} [ D \mid Z = 1 , W ] - \mathbb {E} [ D \mid Z = 0 , W ]} +$$ + +Moreover, note that we can also write these quantities as conditional covariances. + +In particular, let $\alpha(W) = \mathbb{E}[Y \mid Z = 1, W] - \mathbb{E}[Y \mid Z = 0, W]$ and $\gamma(W) = \mathbb{E}[Y \mid Z = 0, W]$ . Without loss of generality we can write: + +$$ +\mathbb {E} [ Y \mid Z, W ] = Z (\mathbb {E} [ Y \mid Z = 1, W ] - \mathbb {E} [ Y \mid Z = 0, W ]) + \mathbb {E} [ Y \mid Z = 0, W ] = Z \alpha (W) + \gamma (W) +$$ + +Thus we can write: + +$$ +Y = Z \alpha (W) + \gamma (W) + \epsilon , \quad \mathbb {E} [ \epsilon \mid Z, W ] = 0 +$$ + +Then we have: + +$$ +\operatorname {C o v} (Y, Z \mid W) = \mathbb {E} [ \tilde {Y} \tilde {Z} \mid W ] = \mathbb {E} [ Y \tilde {Z} \mid W ] +$$ + +where $\tilde{Y} = Y - \mathbb{E}[Y\mid W]$ and $\tilde{Z} = Z - \pi_0(W) = Z - \mathbb{E}[Z\mid W]$ . + +Moreover, note that: + +$$ +\begin{array}{l} \mathbb {E} [ Y \tilde {Z} \mid W ] = \mathbb {E} [ \alpha (W) Z \tilde {Z} ] + \mathbb {E} [ \gamma (W) \tilde {Z} \mid W ] + \mathbb {E} [ \epsilon \tilde {Z} \mid W ] \\ = \alpha (W) \operatorname {V a r} (Z \mid W) + \gamma (W) \mathbb {E} [ \tilde {Z} \mid W ] + \mathbb {E} [ \mathbb {E} [ \epsilon \mid Z, W ] \tilde {Z} \mid W ] \\ = \alpha (W) \operatorname {V a r} (Z \mid W) \\ \end{array} +$$ + +Thus we have: + +$$ +\operatorname {C o v} (Y, Z \mid W) = \mathbb {E} [ Y \tilde {Z} \mid W ] = (\mathbb {E} [ Y \mid Z = 1, W ] - \mathbb {E} [ Y \mid Z = 0, W ]) \operatorname {V a r} (Z \mid W) +$$ + +Similarly, we can derive: + +$$ +\operatorname {C o v} (D, Z \mid W) = \mathbb {E} [ D \tilde {Z} \mid W ] = (\mathbb {E} [ D \mid Z = 1, W ] - \mathbb {E} [ D \mid Z = 0, W ]) \operatorname {V a r} (Z \mid W) +$$ + +Thus we have deduced that we can equivalently identify the conditional LATE among the exposed as: + +$$ +\begin{array}{l} \theta_ {0} (W) = \frac {\mathbb {E} [ Y \tilde {Z} \mid W ]}{\mathbb {E} [ D \tilde {Z} \mid W ]} = \frac {\operatorname {C o v} (Y , Z \mid W)}{\operatorname {C o v} (D , Z \mid W)} = \frac {(\mathbb {E} [ Y \mid Z = 1 , W ] - \mathbb {E} [ Y \mid Z = 0 , W ]) \operatorname {V a r} (Z \mid W)}{(\mathbb {E} [ D \mid Z = 1 , W ] - \mathbb {E} [ D \mid Z = 0 , W ]) \operatorname {V a r} (Z \mid W)} \\ = \frac {\mathbb {E} [ Y \mid Z = 1 , W ] - \mathbb {E} [ Y \mid Z = 0 , W ]}{\mathbb {E} [ D \mid Z = 1 , W ] - \mathbb {E} [ D \mid Z = 0 , W ]} \\ \end{array} +$$ + +Let $\hat{\alpha}$ be an estimate of: + +$$ +a _ {0} (W) := \mathbb {E} [ Y \tilde {Z} \mid W ] = (\mathbb {E} [ Y \mid Z = 1, W ] - \mathbb {E} [ Y \mid Z = 0, W ]) \operatorname {V a r} (Z \mid W) +$$ + +and $\hat{\beta}$ an estimate of: + +$$ +\beta_ {0} (W) := \mathbb {E} [ D \tilde {Z} \mid W ] = (\mathbb {E} [ D \mid Z = 1, W ] - \mathbb {E} [ D \mid Z = 0, W ]) \operatorname {V a r} (Z \mid W) +$$ + +and let $\hat{\theta} = \hat{\alpha} / \hat{\beta}$ . Then we can construct the random variable + +$$ +\hat {Y} (\hat {g}) = \hat {\theta} (W) + \frac {(Y - \hat {\theta} (W) D) \tilde {Z}}{\hat {\beta} (W)} +$$ + +and the moment equation for the conditional LATT is: + +$$ +\phi = \mathbb {E} [ \hat {Y} (\hat {g}) - \theta (W) | W ] +$$ + +Similar to the standard DiD case, projecting onto a lower dimensional subset of covariates will give a biased estimated of the CLATE. + +# D. Proofs + +# D.1. Identification + +Proof of Proposition 2.3. + +$$ +\begin{array}{l} \mathbb {E} \left[ Y _ {1} (1) - Y _ {1} (0) \mid D = 1, X \right] \\ = \mathbb {E} \left[ Y _ {1} (1) - Y _ {0} (1) \mid D = 1, X \right] - \mathbb {E} \left[ Y _ {1} (0) - Y _ {0} (1) \mid D = 1, X \right] \\ = \mathbb {E} \left[ Y _ {1} - Y _ {0} \mid D = 1, X \right] - \mathbb {E} \left[ Y _ {1} (0) - Y _ {0} (0) \mid D = 1, X \right] \quad (\text {B y}) \\ = \mathbb {E} \left[ Y _ {1} - Y _ {0} \mid D = 1, X \right] - \mathbb {E} \left\{\mathbb {E} \left[ Y _ {1} (0) - Y _ {0} (0) \mid D = 1, W \right] \mid D = 1, X \right\} \\ = \mathbb {E} \left[ Y _ {1} - Y _ {0} \mid D = 1, X \right] - \mathbb {E} \left\{\mathbb {E} \left[ Y _ {1} (0) - Y _ {0} (0) \mid D = 0, W \right] \mid D = 1, X \right\} \quad (\text {B y}) \\ = \mathbb {E} \left[ Y _ {1} - Y _ {0} - \mathbb {E} \left[ Y _ {1} (0) - Y _ {0} (0) \right| D = 0, W \right] | D = 1, X ] \\ \end{array} +$$ + +Proof of Proposition A.9. Here we want to show that the CLATE, $\theta_0(X)$ , can be identified as: + +$$ +\theta_ {0} (X) = \frac {\mathbb {E} [ Y _ {1} - Y _ {0} - \mathbb {E} [ Y _ {1} - Y _ {0} \mid Z = 0 , W ] \mid Z = 1 , X ]}{\mathbb {E} [ D _ {1} - D _ {0} - \mathbb {E} [ D _ {1} - D _ {0} \mid Z = 0 , W ] \mid Z = 1 , X ]} +$$ + +We first analyze the denominator: + +$$ +\begin{array}{l} \mathbb {E} \left[ D _ {1} - D _ {0} - \mathbb {E} \left[ D _ {1} - D _ {0} \mid Z = 0, X \right] \mid Z = 1, X \right] \\ = \mathbb {E} \left[ D _ {1} (1) - D _ {0} (1) - \mathbb {E} \left[ D _ {1} (0) - D _ {0} (0) \mid Z = 0, W \right] \mid Z = 1, X \right] \\ = \mathbb {E} \left[ D _ {1} (1) - D _ {1} (0) + D _ {1} (0) - D _ {0} (1) - \mathbb {E} \left[ D _ {1} (0) - D _ {0} (0) \mid Z = 0, W \right] \mid Z = 1, X \right] \\ = \mathbb {E} \left[ D _ {1} (1) - D _ {1} (0) + D _ {1} (0) - D _ {0} (0) - \mathbb {E} \left[ D _ {1} (0) - D _ {0} (0) \mid Z = 0, W \right] \mid Z = 1, X \right] \quad (\text {B y}) \\ = \mathbb {E} \left[ D _ {1} (1) - D _ {1} (0) + \mathbb {E} \left[ D _ {1} (0) - D _ {0} (0) \right| Z = 1, W \right] - \mathbb {E} \left[ D _ {1} (0) - D _ {0} (0) \mid Z = 0, W \right] \mid Z = 1, X ] \\ = \mathbb {E} \left[ D _ {1} (1) - D _ {1} (0) \mid Z = 1, X \right] \quad (\text {B y}) \\ = \mathbb {P} \left(D _ {1} (1) > D _ {1} (0) \mid Z = 1, X\right) \quad (\text {B y}) \\ \end{array} +$$ + +Now we analyze the numerator: + +(By Assumption A.4) + +$$ +\begin{array}{l} \mathbb {E} \left[ Y _ {1} - Y _ {0} - \mathbb {E} \left[ Y _ {1} - Y _ {0} \mid Z = 0, W \right] \mid Z = 1, X \right] \\ = \mathbb {E} \left[ Y _ {1} (D (1)) - Y _ {0} (D (1)) - \mathbb {E} \left[ Y _ {1} (D (0)) - Y _ {0} (D (0)) \mid Z = 0, W \right] \mid Z = 1, X \right] \\ = \mathbb {E} \left[ Y _ {1} (D (1)) - Y _ {1} (D (0)) + Y _ {1} (D (0)) - Y _ {0} (D (0)) - \mathbb {E} \left[ Y _ {1} (D (0)) - Y _ {0} (D (0)) \mid Z = 0, W \right] \mid Z = 1, X \right] \\ = \mathbb {E} \left[ Y _ {1} (D (1)) - Y _ {1} (D (0)) + \mathbb {E} \left[ Y _ {1} (D (0)) - Y _ {0} (D (0)) \right| Z = 1, W \right] - \mathbb {E} \left[ Y _ {1} (D (0)) - Y _ {0} (D (0)) \mid Z = 0, W \right] \mid Z = 1, X ] \\ = \mathbb {E} \left[ Y _ {1} (D (1)) - Y _ {1} (D (0)) \mid Z = 1, X \right] (ByAssumptionA.6) \\ = \mathbb {E} \left[ \left(D (1) - D (0)\right) \left(Y _ {1} (1) - Y _ {1} (0)\right) \mid Z = 1, X \right] (ByAssumptionA.3) \\ = \mathbb {E} \left[ Y _ {1} (1) - Y _ {1} (0) \mid Z = 1, D (1) > D (0), X \right] \mathbb {P} (D (1) > D (0) | Z = 1, X) \\ \end{array} +$$ + +Thus, combining them, we get: + +$$ +\frac {\mathbb {E} \left[ Y _ {1} - Y _ {0} - \mathbb {E} \left[ Y _ {1} - Y _ {0} \mid Z = 0 , W \right] \mid Z = 1 , X \right]}{\mathbb {E} \left[ D _ {1} - D _ {0} - \mathbb {E} \left[ D _ {1} - D _ {0} \mid Z = 0 , W \right] \mid Z = 1 , X \right]} = \mathbb {E} \left[ Y _ {1} (1) - Y _ {1} (0) \mid Z = 1, D (1) > D (0), X \right] +$$ + +# D.2. Orthogonal Moments + +Proof of Lemma 3.3. First, we show that the true CATT function $\theta_0(X) = \mathbb{E}[Y_1(1) - Y_1(0)|D = 1,X]$ is the solution to the moment: + +$$ +\mathbb {E} \left[ m (Z; \theta_ {0}, g _ {0}, \pi_ {0}) | X \right] = \mathbb {E} \left[ \left(\frac {D - \pi_ {0} (W)}{(1 - \pi_ {0} (W))}\right) (\Delta Y - g _ {0} (W)) - D \theta_ {0} (X) \Bigg | X \right] = 0 +$$ + +where $Z = (W, D, Y)$ , $\Delta Y = Y_1 - Y_0$ , $g_0(W) = \mathbb{E}[\Delta Y|D = 0, W]$ , $\pi_0(W) = \mathbb{P}(D = 1|W)$ . First, since this moment is conditioned on $X$ , we can multiply by any functions of $X$ . Thus, we can divide by the propensity with $X$ , i.e. $\gamma_0(X) = \mathbb{P}(D = 1|X)$ , which is bounded away from zero: + +$$ +\mathbb {E} \left[ \left(\frac {D - \pi_ {0} (W)}{(1 - \pi_ {0} (W))}\right) (\Delta Y - g _ {0} (W)) - D \theta_ {0} (X) \Bigg | X \right] = 0 +$$ + +# + +$$ +\mathbb {E} \left[ \left(\frac {D - \pi_ {0} (W)}{(1 - \pi_ {0} (W)) \gamma_ {0} (X)}\right) (\Delta Y - g _ {0} (W)) - \frac {D}{\gamma_ {0} (X)} \theta_ {0} (X) \Bigg | X \right] = 0 +$$ + +The latter term is $\mathbb{E}\left[\frac{D}{\gamma_0(X)}\theta_0(X)\bigg|X\right] = \mathbb{E}[\theta_0(X)|D = 1,X] = \theta_0(X)$ . Now we consider the first term: + +$$ +\begin{array}{l} \mathbb {E} \left[ \left(\frac {D - \pi_ {0} (W)}{(1 - \pi_ {0} (W)) \gamma_ {0} (X)}\right) (\Delta Y - g _ {0} (W)) \Bigg | X \right] \\ = \mathbb {E} \left[ \left(\frac {D}{\gamma_ {0} (X)} - \frac {(1 - D) \pi_ {0} (W)}{(1 - \pi_ {0} (W)) \gamma_ {0} (X)}\right) (\Delta Y - g _ {0} (W)) \Bigg | X \right] \\ = \mathbb {E} \left[ \frac {D}{\gamma_ {0} (X)} (\Delta Y - g _ {0} (W)) \Bigg | X \right] - \mathbb {E} \left[ \frac {(1 - D) \pi_ {0} (W)}{(1 - \pi_ {0} (W)) \gamma_ {0} (X)} (\Delta Y - g _ {0} (W)) \Bigg | X \right] \\ = \mathbb {E} [ \Delta Y - g _ {0} (W) | D = 1, X ] - \mathbb {E} \left[ \mathbb {E} \left[ \frac {(1 - D) \pi_ {0} (W)}{(1 - \pi_ {0} (W)) \gamma_ {0} (X)} (\Delta Y - g _ {0} (W)) | W \right] | X \right] \\ = \theta_ {0} (X) - \mathbb {E} \left[ \mathbb {E} \left[ \frac {\pi_ {0} (W)}{\gamma_ {0} (X)} (\Delta Y - g _ {0} (W)) \Bigg | D = 0, W \right] \Bigg | X \right] \\ = \theta_ {0} (X) - \mathbb {E} \left[ \frac {\pi_ {0} (W)}{\gamma_ {0} (X)} \mathbb {E} [ \Delta Y - g _ {0} (W) | D = 0, W ] \Bigg | X \right] \\ = \theta_ {0} (X) \\ \end{array} +$$ + +Thus, the moment condition is satisfied for the true CATT $\theta_0(X)$ . Now, we show that the moment is Neyman orthogonal with respect to all nuisance functions. It suffices to show that the directional derivative with respect to all the nuisance functions are 0 when evaluated at the true nuisance and target functions. Recall that the directional derivative of a functional $m(Z;f)$ with respect to the function $f(W)$ in the direction of $\Delta f(W)$ is defined as: $\partial_f\mathbb{E}[m(z;f)][\Delta f] = \frac{d}{dt}\mathbb{E}[m(z;f + t\cdot \Delta f)]\bigg|_{t = 0}$ . + +First, we look the directional derivative with respect to the outcome regression $g(W)$ : + +$$ +\begin{array}{l} \partial_ {g} \mathbb {E} [ m (Z; \theta , g, \pi) | X ] [ \Delta g ] | _ {\theta_ {0}, g _ {0}, \pi_ {0}} = \mathbb {E} \left[ \frac {D - \pi_ {0} (W)}{1 - \pi_ {0} (W)} \Delta g (W) \Bigg | X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \frac {D - \pi_ {0} (W)}{1 - \pi_ {0} (W)} \Bigg | W \right] \Delta g (W) \Bigg | X \right] \\ = \mathbb {E} \left[ \frac {\pi_ {0} (W) - \pi_ {0} (W)}{1 - \pi_ {0} (W)} \Delta g (W) \Bigg | X \right] = 0 \\ \end{array} +$$ + +Now, we look at the directional derivative with respect to the outcome regression $\pi(W)$ : + +$$ +\begin{array}{l} \partial_ {\pi} \mathbb {E} [ m (Z; \theta , g, \pi) | X ] [ \Delta \pi ] | _ {\theta_ {0}, g _ {0}, \pi_ {0}} = \mathbb {E} \left[ \left(\frac {- (1 - \pi_ {0} (W)) \Delta \pi (W) + (D - \pi_ {0} (W)) \Delta \pi (W)}{(1 - \pi_ {0} (W)) ^ {2}}\right) (\Delta Y - g _ {0} (W)) \Bigg | X \right] \\ = \mathbb {E} \left[ \left(\frac {\Delta \pi (W) (D - 1)}{(1 - \pi_ {0} (W)) ^ {2}}\right) (\Delta Y - g _ {0} (W)) \Bigg | X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \left(\frac {\Delta \pi (W) (D - 1)}{(1 - \pi_ {0} (W)) ^ {2}}\right) (\Delta Y - g _ {0} (W)) \mid W \right] \mid X \right] \\ = \mathbb {E} \left[ - \left(\frac {\Delta \pi (W)}{1 - \pi_ {0} (W)}\right) \mathbb {E} [ \Delta Y - g _ {0} (W)) \mid D = 0, W ] \mid X \right] = 0 \\ \end{array} +$$ + +Thus, we have shown that this moment is Neyman orthogonal with respect to all nuisances. + +Proof of Theorem 4.7. First, we show that the true estimand $\theta_0(X) = \mathbb{E}_{source}[m(Z;g_0)|X]$ satisfies the following conditional moment restriction + +$$ +\mathbb {E} \Big [ m ^ {D R} (Z; \theta_ {0}, g _ {0}, \pi_ {0}, \alpha_ {0}) \Big | X \Big ] = \mathbb {E} \left[ E (m (Z; g _ {0})) - \theta_ {0} (X)) + \frac {(1 - E) \pi_ {0} (W)}{1 - \pi_ {0} (W)} \alpha_ {0} (W) (Y - g _ {0} (W)) \Bigg | X \right] = 0 +$$ + +where $\pi_0(W) = \mathbb{P}(E = 1|W)$ and $\alpha (W)$ is the Riesz representative of $\mathbb{E}_s[m(Z;g)|X]$ . Similar to the earlier the proof of Lemma 3.3, we can divide both sides of the moment equation by $\gamma_0(X) = \mathbb{P}(E = 1|X)$ since it is bounded away from 0. So it is equivalent to show: + +$$ +\mathbb {E} \left[ \frac {E}{\gamma_ {0} (X)} (m (Z; g _ {0})) - \theta_ {0} (X)) + \frac {(1 - E) \pi_ {0} (W)}{(1 - \pi_ {0} (W)) \gamma_ {0} (X)} \alpha_ {0} (W) (Y - g _ {0} (W)) \Bigg | X \right] = 0 +$$ + +First, let's look at the first term: + +$$ +\mathbb {E} \left[ \frac {E}{\gamma_ {0} (X)} \left(m (Z; g _ {0})\right) - \theta_ {0} (X)) \mid X \right] = \mathbb {E} \left[ \left(m (Z; g _ {0})\right) - \theta_ {0} (X)\right) | E = 1, X ] = 0 +$$ + +Thus, it remains to show that the second term also has conditional expectation of 0. + +$$ +\begin{array}{l} \mathbb {E} \left[ \frac {(1 - E) \pi_ {0} (W)}{(1 - \pi_ {0} (W)) \gamma_ {0} (X)} \alpha_ {0} (W) (Y - g _ {0} (W)) \Bigg | X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \frac {(1 - E) \pi_ {0} (W)}{(1 - \pi_ {0} (W)) \gamma_ {0} (X)} \alpha_ {0} (W) (Y - g _ {0} (W)) \Bigg | W \right] \Bigg | X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \frac {\pi_ {0} (W)}{\gamma_ {0} (X)} \alpha_ {0} (W) (Y - g _ {0} (W)) \mid E = 0, W \right] \mid X \right] \\ = \mathbb {E} \left[ \frac {\pi_ {0} (W)}{\gamma_ {0} (X)} \alpha_ {0} (W) \mathbb {E} \left[ \left(Y - g _ {0} (W)\right) \mid E = 0, W \right] \mid X \right] = 0 \\ \end{array} +$$ + +Now, we proceed to show that the moment $m^{DR}(Z;\theta ,g,\pi ,\alpha)$ is Neyman orthogonal. First, we look at the directional derivative with respect to the nuisance $g(W)$ . + +$$ +\begin{array}{l} \partial_ {g} \mathbb {E} [ m ^ {D R} (Z; \theta , g, \pi , \alpha) | X ] [ \Delta g ] | _ {\theta_ {0}, g _ {0}, \pi_ {0}, \alpha_ {0}} \\ = \partial_ {g} \mathbb {E} [ E m (Z; g) | X ] [ \Delta g ] | _ {g _ {0}} - \mathbb {E} \left[ \frac {(1 - E) \pi_ {0} (W)}{1 - \pi_ {0} (W)} \alpha_ {0} (W) \Delta g (W) \Bigg | X \right] \\ \end{array} +$$ + +We first look at the first term: + +$$ +\begin{array}{l} \left. \partial_ {g} \mathbb {E} [ E m (Z; g) | X ] [ \Delta g ] \right| _ {g _ {0}} = \partial_ {g} \mathbb {E} [ \gamma_ {0} (W) \mathbb {E} [ m (Z; g) | E = 1, X ] | X ] [ \Delta g ] \Big | _ {g _ {0}} \\ = \partial_ {g} \mathbb {E} [ \gamma_ {0} (X) \mathbb {E} [ \alpha_ {0} (W) g (W) | E = 1, X ] | X ] [ \Delta g ] \Big | _ {g _ {0}} \quad (\text {B y}) \\ = \mathbb {E} [ \gamma_ {0} (X) \mathbb {E} [ \alpha_ {0} (W) \Delta g (W) | E = 1, X ] | X ] \\ = \mathbb {E} [ E \alpha_ {0} (W) \Delta g (W) | W ] \\ \end{array} +$$ + +Putting this back, we get: + +$$ +\begin{array}{l} \partial_ {g} \mathbb {E} [ m ^ {D R} (Z; \theta , g, \pi) | X ] [ \Delta g ] | _ {\theta_ {0}, g _ {0}, \pi_ {0}, \alpha_ {0}} \\ = \mathbb {E} \left[ E \alpha_ {0} (W) \Delta g (W) - \frac {(1 - E) \pi_ {0} (W)}{1 - \pi_ {0} (W)} \alpha_ {0} (W) \Delta g (W) \Bigg | X \right] \\ = \mathbb {E} \left[ \alpha_ {0} (W) \Delta g (W) \left(E - \frac {(1 - E) \pi_ {0} (W)}{1 - \pi_ {0} (W)}\right) \Bigg | X \right] \\ = \mathbb {E} \left[ \alpha_ {0} (W) \Delta g (W) \mathbb {E} \left[ E - \frac {(1 - E) \pi_ {0} (W)}{1 - \pi_ {0} (W)} \mid W \right] \mid X \right] = 0 \\ \end{array} +$$ + +Next, we look at the derivative with respect to $\pi (W)$ + +$$ +\begin{array}{l} \partial_ {\pi} \mathbb {E} [ m ^ {D R} (Z; \theta , g, \pi , \alpha) | X ] [ \Delta \pi ] | _ {\theta_ {0}, g _ {0}, \pi_ {0}, \alpha_ {0}} \\ = \mathbb {E} \left[ \left(\frac {(1 - E) (1 - \pi (W)) \Delta \pi (W) + (1 - E) \pi (W) \Delta \pi (W)}{(1 - \pi_ {0} (W)) ^ {2}}\right) \alpha_ {0} (W) \left(Y - g _ {0} (W)\right) \Bigg | X \right] \\ = \mathbb {E} \left[ \frac {(1 - E) \Delta \pi (W)}{(1 - \pi_ {0} (W)) ^ {2}} \alpha_ {0} (W) \left(Y - g _ {0} (W)\right) \Bigg | X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \frac {(1 - E) \Delta \pi (W)}{(1 - \pi_ {0} (W)) ^ {2}} \alpha_ {0} (W) (Y - g _ {0} (W)) \mid W \right] \mid X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \frac {\Delta \pi (W)}{1 - \pi_ {0} (W)} \alpha_ {0} (W) \left(Y - g _ {0} (W)\right) \mid E = 0, W \right] \mid X \right] \\ = \mathbb {E} \left[ \frac {\Delta \pi (W)}{1 - \pi_ {0} (W)} \alpha_ {0} (W) \mathbb {E} \left[ (Y - g _ {0} (W) \mid E = 0, W \right] \mid X \right] = 0 \\ \end{array} +$$ + +Lastly, we show that the directional derivative with respect to $\alpha(W)$ is equal to 0. + +$$ +\begin{array}{l} \partial_ {\alpha} \mathbb {E} [ m ^ {D R} (Z; \theta , g, \pi , \alpha) | X ] [ \Delta \alpha ] | _ {\theta_ {0}, g _ {0}, \pi_ {0}, \alpha_ {0}} \\ = \mathbb {E} \left[ \frac {(1 - E) \pi_ {0} (W)}{1 - \pi_ {0} (W)} \Delta \alpha (W) (Y - g _ {0} (W)) \mid X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \frac {(1 - E) \pi_ {0} (W)}{1 - \pi_ {0} (W)} \Delta \alpha (W) (Y - g _ {0} (W)) \mid W \right] \mid X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \pi_ {0} (W) \Delta \alpha (W) (Y - g _ {0} (W)) \mid E = 0, W \right] \mid X \right] \\ = \mathbb {E} \left[ \pi_ {0} (W) \Delta \alpha (W) \mathbb {E} \left[ Y - g _ {0} (W) \mid E = 0, W \right] \mid X \right] = 0 \\ \end{array} +$$ + +Proof of Lemma A.10. First we show that the true CLATE, $\theta_0(X) = \mathbb{E}[Y_1(1) - Y_1(0)\mid Z = 1,D(1) > D(0),X]$ , is the solution to the following moment equation: + +$$ +\mathbb {E} \left[ m ^ {D R} (Z; \theta_ {0}, g _ {0, Y}, g _ {0, D}, \pi_ {0}) | X \right] = \mathbb {E} \left[ \widehat {Z} \left\{\left(\Delta Y - g _ {0, Y} (W)\right) - (\Delta D - g _ {0, D} (W)) \theta (X) \right\} \mid X \right] = 0 +$$ + +where $\Delta S = S_{1} - S_{0}$ for $S = Y$ or $D$ , $g_{0,S}(W) = \mathbb{E}[S_1 - S_0|Z = 0,W]$ , and $\widehat{Z} = \frac{Z - \pi_0(W)}{1 - \pi_0(W)}$ with $\pi_0(W) = \mathbb{P}(Z = 1|W)$ . We can apply same trick as in the other orthogonality proofs to divide by $\gamma_0(X) = \mathbb{P}(Z = 1|X)$ . We first consider the first term: + +$$ +\begin{array}{l} \mathbb {E} \left[ \frac {\widehat {Z}}{\gamma_ {0} (X)} (\Delta Y - g _ {0, Y} (W)) \Bigg | X \right] \\ = \mathbb {E} \left[ \frac {Z - \pi_ {0} (W)}{(1 - \pi_ {0} (W)) \gamma_ {0} (X)} (\Delta Y - g _ {0, Y} (W)) \mid X \right] \\ = \mathbb {E} \left[ \left(\frac {Z}{\gamma_ {0} (X)} - \frac {(1 - Z) \pi_ {0} (W)}{(1 - \pi_ {0} (W)) \gamma_ {0} (X)}\right) (\Delta Y - g _ {0, Y} (W)) \mid X \right] \\ = \mathbb {E} \left[ \left(\frac {Z}{\gamma_ {0} (X)}\right) (\Delta Y - g _ {0, Y} (W)) | X \right] - \mathbb {E} \left[ \frac {\pi_ {0} (W)}{\gamma_ {0} (X)} \mathbb {E} \left[ \left(\frac {1 - Z}{(1 - \pi_ {0} (W)))}\right) (\Delta Y - g _ {0, Y} (W)) | W \right] | X \right] \\ = \mathbb {E} \left[ \Delta Y - g _ {0, Y} (W) \mid Z = 1, X \right] - \mathbb {E} \left[ \frac {\pi_ {0} (W)}{\gamma_ {0} (X)} \mathbb {E} \left[ (\Delta Y - g _ {0, Y} (W)) \mid Z = 0, W \right] \mid X \right] \\ = \mathbb {E} [ \Delta Y - g _ {0, Y} (W) | Z = 1, X ] \\ \end{array} +$$ + +Similarly, for the second term: + +$$ +\begin{array}{l} \mathbb {E} \left[ \frac {\widehat {Z}}{\gamma_ {0} (X)} (\Delta D - g _ {0, D} (W)) \theta (X) \Bigg | X \right] = \theta_ {0} (X) \mathbb {E} \left[ \frac {\widehat {Z}}{\gamma_ {0} (X)} (\Delta D - g _ {0, D} (W)) \Bigg | X \right] \\ = \theta_ {0} (X) \mathbb {E} [ \Delta D - g _ {0, D} (W) | Z = 1, X ] \\ \end{array} +$$ + +By the definition of $\theta_0(X)$ , this shows that it is a solution to the doubly robust moment equation. Now, we proceed to show that the moment $m^{DR}(Z;\theta ,g_Y,g_D,\pi)$ is Neyman orthogonal. First, we look at the directional derivative with respect to the nuisance $g_{Y}(W)$ . + +$$ +\begin{array}{l} \partial_ {g _ {Y}} \mathbb {E} [ m ^ {D R} (Z; \theta , g _ {Y}, g _ {D}, \pi) | X ] [ \Delta g _ {Y} ] \Big | _ {\theta_ {0}, g _ {0, Y}, g _ {0, D}, \pi_ {0}} = - E \left[ \widehat {Z} \Delta g _ {Y} (W) \Big | X \right] \\ = - \mathbb {E} \left[ \frac {Z - \pi_ {0} (W)}{1 - \pi_ {0} (W)} \Delta g _ {Y} (W) \mid X \right] \\ = - \mathbb {E} \left[ \mathbb {E} \left[ \frac {Z - \pi_ {0} (W)}{1 - \pi_ {0} (W)} \Bigg | W \right] \Delta g _ {Y} (W) \Bigg | X \right] = 0 \\ \end{array} +$$ + +Similarly, + +$$ +\begin{array}{l} \partial_ {g _ {D}} \mathbb {E} [ m ^ {D R} (Z; \theta , g _ {Y}, g _ {D}, \pi) | X ] [ \Delta g _ {D} ] \Big | _ {\theta_ {0}, g _ {0, Y}, g _ {0, D}, \pi_ {0}} = E \left[ \widehat {Z} \Delta g _ {D} (W) \theta_ {0} (X) \Big | X \right] \\ = \theta_ {0} (X) \mathbb {E} \left[ \mathbb {E} \left[ \frac {Z - \pi_ {0} (W)}{1 - \pi_ {0} (W)} \Bigg | W \right] \Delta g _ {D} (W) \Bigg | X \right] = 0 \\ \end{array} +$$ + +Lastly, we check the directional derivative with respect to $\pi (W)$ : + +$$ +\begin{array}{l} \partial_ {\pi} \mathbb {E} [ m ^ {D R} (Z; \theta , g _ {Y}, g _ {D}, \pi) | X ] [ \Delta \pi ] \Bigg | _ {\theta_ {0}, g _ {0, Y}, g _ {0, D}, \pi_ {0}} \\ = \mathbb {E} \left[ \frac {- (1 - \pi_ {0} (W) \Delta \pi (W) + (Z - \pi_ {0} (W) \Delta \pi (W)}{(1 - \pi_ {0} (W)) ^ {2}} \left\{(\Delta Y - g _ {0, Y} (W)) - (\Delta D - g _ {0, D} (W)) \theta (X) \right\} \Bigg | X \right] \\ = \mathbb {E} \left[ \frac {(Z - 1) \Delta \pi (W)}{(1 - \pi_ {0} (W)) ^ {2}} \left\{\left(\Delta Y - g _ {0, Y} (W)\right) - \left(\Delta D - g _ {0, D} (W)\right) \theta (X) \right\} \mid X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \frac {(Z - 1) \Delta \pi (W)}{(1 - \pi_ {0} (W)) ^ {2}} \left\{\left(\Delta Y - g _ {0, Y} (W)\right) - \left(\Delta D - g _ {0, D} (W)\right) \theta (X) \right\} \Bigg | W \right] \Bigg | X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \frac {(\Delta \pi (W)}{1 - \pi_ {0} (W)} \left\{\left(\Delta Y - g _ {0, Y} (W)\right) - (\Delta D - g _ {0, D} (W)) \theta (X) \right\} \mid Z = 0, W \right] \mid X \right] \\ = \mathbb {E} \left[ \frac {(\Delta \pi (W)}{1 - \pi_ {0} (W)} \left\{E [ \Delta Y - g _ {0, Y} (W) | Z = 0, W ] - \mathbb {E} [ \Delta D - g _ {0, D} (W) | Z = 0, W ] \theta (X) \right\} \mid X \right] = 0 \\ \end{array} +$$ + +# D.3. Losses + +Proof of Proposition 3.5. Note that the true CATT $\theta_0$ satisfies the conditional moment restrictions in Lemma 3.3, which imply that: + +$$ +\mathbb {E} [ D \theta_ {0} (X) \mid X ] = \mathbb {E} [ \hat {Y} \mid X ] +$$ + +Hence, the loss $\mathcal{L}(\theta ;\pi_0,g_0)$ at any function $\theta$ can be simplified as: + +$$ +\begin{array}{l} \mathcal {L} (\theta ; \pi_ {0}, g _ {0}) = \mathbb {E} \left[ D \theta (X) ^ {2} - 2 \widehat {Y} \theta (X) \right] \\ = \mathbb {E} \left[ D \theta (X) ^ {2} - 2 \mathbb {E} [ \widehat {Y} \mid X ] \theta (X) \right] \\ = \mathbb {E} \left[ D \theta (X) ^ {2} - 2 \mathbb {E} [ D \theta_ {0} (X) \mid X ] \theta (X) \right] \\ = \mathbb {E} \left[ D \theta (X) ^ {2} - 2 D \theta_ {0} (X) \theta (X) \right] \\ \end{array} +$$ + +Note that when the loss is evaluated at $\theta_0$ , then it takes the value $\mathbb{E}[-D\theta_0(X)^2]$ . Moreover, note that minimizing $\mathcal{L}(\theta; \pi_0, g_0)$ is equivalent to minimizing the difference $\mathcal{L}(\theta; \pi_0, g_0) - \mathcal{L}(\theta_0; \pi_0, g_0)$ , which in turn simplifies to: + +$$ +\mathbb {E} \left[ D \theta (X) ^ {2} - 2 D \theta_ {0} (X) \theta (X) + D \theta_ {0} (X) ^ {2} \right] = \mathbb {E} \left[ D (\theta (X) - \theta_ {0} (X)) ^ {2} \right] +$$ + +Hence, minimizing $\mathcal{L}(\theta ;\pi_0,g_0)$ over any space $\Theta$ is equivalent to minimizing over $\Theta$ the loss function: + +$$ +\mathbb {E} \left[ (\theta (X) - \theta_ {0} (X)) ^ {2} \mid D = 1 \right] +$$ + +Proof of Proposition A.11. Note that the true CATT $\theta_0$ satisfies the conditional moment restrictions in Lemma A.10, which imply that: + +$$ +\mathbb {E} [ \widehat {Z} (\Delta D - g _ {D} (W)) \theta_ {0} (X) \mid X ] = \mathbb {E} [ \widehat {Z} (\Delta Y - g _ {Y} (W)) \mid X ] +$$ + +Let $\eta_0$ denote the set of nuisance functions. The loss $\mathcal{L}_{IV}(\theta ;\eta_0)$ at any function $\theta$ can be simplified as: + +$$ +\begin{array}{l} \mathcal {L} _ {I V} (\theta ; \eta_ {0}) = \mathbb {E} \left[ \widehat {Z} (\Delta D - g _ {D} (W)) \theta (X) ^ {2} - 2 \widehat {Z} (\Delta D - g _ {D} (W)) \theta_ {0} (X) \theta (X) \right] \\ = \mathbb {E} \left[ \widehat {Z} (\Delta D - g _ {D} (W)) \theta (X) ^ {2} - 2 \mathbb {E} [ \widehat {Z} (\Delta D - g _ {D} (W)) \theta_ {0} (X) \mid X ] \theta (X) \right] \\ = \mathbb {E} \left[ \widehat {Z} (\Delta D - g _ {D} (W)) (\theta (X) ^ {2} - 2 \theta_ {0} (X) \theta (X)) \right] \\ \end{array} +$$ + +Note that when the loss is evaluated at $\theta_0$ , then it takes the value $\mathbb{E}[-\widehat{Z} (\Delta D - g_D(W))\theta_0(X)^2]$ . Moreover, note that minimizing $\mathcal{L}_{IV}(\theta ;\eta_0)$ is equivalent to minimizing the difference $\mathcal{L}_{IV}(\theta ;\eta_0) - \mathcal{L}_{IV}(\theta_0;\eta_0)$ , which in turn simplifies to: + +$$ +\begin{array}{l} \mathbb {E} \left[ \widehat {Z} (\Delta D - g _ {D} (W)) (\theta (X) ^ {2} - 2 \theta_ {0} (X) \theta (X) + \theta_ {0} (X) ^ {2}) \right] \\ = \mathbb {E} \left[ \widehat {Z} (\Delta D - g _ {D} (W)) (\theta (X) - \theta_ {0} (X)) ^ {2} \right] \\ = \mathbb {E} \left[ \left(Z - \frac {(1 - Z) \pi_ {0} (W)}{1 - \pi_ {0} (W)}\right) (\Delta D - g _ {D} (W)) (\theta (X) - \theta_ {0} (X)) ^ {2} \right] \\ = \mathbb {E} \left[ Z (\Delta D - g _ {D} (W)) \left(\theta (X) - \theta_ {0} (X)\right) ^ {2} \right] - \mathbb {E} \left[ \pi_ {0} (W) \left(\theta (X) - \theta_ {0} (X)\right) ^ {2} \mathbb {E} \left[ \left(\Delta D - g _ {D} (W)\right) \mid Z = 0, W \right] \right] \\ = \mathbb {E} \left[ Z (\Delta D - g _ {D} (W)) \left(\theta (X) - \theta_ {0} (X)\right) ^ {2} \right] \\ = \mathbb {E} \left[ \left(\Delta D - g _ {D} (W)\right) \left(\theta (X) - \theta_ {0} (X)\right) ^ {2} \mid Z = 1 \right] \mathbb {P} (Z = 1) \\ = \mathbb {E} \left[ \mathbb {E} \left[ \left(\Delta D - g _ {D} (W)\right) | Z = 1, X \right] \left(\theta (X) - \theta_ {0} (X)\right) ^ {2} | Z = 1 \right] \mathbb {P} (Z = 1) \\ = \mathbb {E} \left[ \mathbb {P} \left(D _ {1} (1) > D _ {1} (0) \mid Z = 1, X\right) \left(\theta (X) - \theta_ {0} (X)\right) ^ {2} \mid Z = 1 \right] \mathbb {P} (Z = 1) \quad (\text {S e e t h e p r o o f o f P r o p o s i t i o n A . 9}) \\ = \mathbb {E} \left[ (D _ {1} (1) > D _ {1} (0)) (\theta (X) - \theta_ {0} (X)) ^ {2} | Z = 1 \right] \mathbb {P} (Z = 1) \\ = \mathbb {E} \left[ (\theta (X) - \theta_ {0} (X)) ^ {2} | Z = 1, D (1) > D (0) \right] \mathbb {P} (Z = 1) \mathbb {P} (D (1) > D (0) | Z = 1) \\ \end{array} +$$ + +Hence, minimizing $\mathcal{L}_{IV}(\theta ;\eta_0)$ over any space $\Theta$ is equivalent to minimizing over $\Theta$ the loss function: + +$$ +\mathbb {E} \left[ (\theta (X) - \theta_ {0} (X)) ^ {2} \mid Z = 1, D (1) > D (0) \right] +$$ + +# D.4. Rates + +Before proving Theorem 3.6, we first present some auxiliary Lemmas. + +Lemma D.1. Let $\eta = (\pi, g)$ denote the set of nuisance functions, and let $\eta_0$ be the true nuisance functions. Consider the loss defined in Proposition 3.5. Then, we have that for all $\theta_1, \theta_2, \eta_1$ and $\eta_2$ , + +$$ +\left| \mathcal {L} \left(\theta_ {1}; \eta_ {1}\right) - \mathcal {L} \left(\theta_ {2}; \eta_ {1}\right) - \mathcal {L} \left(\theta_ {2}; \eta_ {1}\right) + \mathcal {L} \left(\theta_ {2}; \eta_ {2}\right) \right| \leq 2 \sqrt {\mathbb {E} \left[ \mathbb {E} \left[ \widehat {Y} \left(\eta_ {1}\right) - \widehat {Y} \left(\eta_ {2}\right) \mid X \right] ^ {2} \right]} \| \theta_ {1} - \theta_ {2} \| +$$ + +Proof of Lemma D.1. + +$$ +\begin{array}{l} \left| \mathcal {L} \left(\theta_ {1}; \eta_ {1}\right) - \mathcal {L} \left(\theta_ {2}; \eta_ {1}\right) - \mathcal {L} \left(\theta_ {2}; \eta_ {1}\right) + \mathcal {L} \left(\theta_ {2}; \eta_ {2}\right) \right| \\ = \left| \mathbb {E} \left[ D \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) + 2 \widehat {Y} (\eta_ {1}) \left(\theta_ {2} (X) - \theta_ {1} (X)\right) \right] - \mathbb {E} \left[ D \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) + 2 \widehat {Y} (\eta_ {2}) \left(\theta_ {2} (X) - \theta_ {1} (X)\right) \right] \right| \\ = \left| \mathbb {E} \left[ 2 \left(\widehat {Y} \left(\eta_ {1}\right) - \widehat {Y} \left(\eta_ {2}\right)\right) \left(\theta_ {1} (X) - \theta_ {2} (X)\right) \right] \right| \\ = 2 \left| \mathbb {E} \left[ \mathbb {E} \left[ \left(\widehat {Y} \left(\eta_ {1}\right) - \widehat {Y} \left(\eta_ {2}\right)\right) \left(\theta_ {1} (X) - \theta_ {2} (X)\right) \mid X \right] \right] \right| \\ \leq 2 \sqrt {\mathbb {E} \left[ \mathbb {E} \left[ \widehat {Y} (\eta_ {1}) - \widehat {Y} (\eta_ {2}) \right\rvert X \right] ^ {2} ]} \| \theta_ {1} (X) - \theta_ {2} (X) \| \\ \end{array} +$$ + +We then show that the bias in the pseudo-outcome $\widehat{Y}$ is equal to the product of the biases in the nuisance functions. + +Lemma D.2. Let $\eta = (\pi, g)$ denote the set of nuisance functions, and let $\eta_0$ be the true nuisance functions. Consider the pseudo-outcome defined in Proposition 3.5. Then we have: + +$$ +\mathbb {E} \left[ \widehat {Y} \left(\eta_ {0}\right) - \widehat {Y} (\hat {\eta}) | X \right] = \mathbb {E} \left[ \left(\hat {g} (W) - g _ {0} (W)\right) \frac {\pi_ {0} (W) - \hat {\pi} (W)}{1 - \hat {\pi} (W)} \mid X \right] +$$ + +Proof of Lemma D.2. + +$$ +\begin{array}{l} \mathbb {E} \left[ \widehat {Y} \left(\eta_ {0}\right) - \widehat {Y} (\widehat {\eta}) | X \right] \\ = \mathbb {E} \left[ \frac {D - \pi_ {0} (W)}{1 - \pi_ {0} (W)} \left(\Delta Y - g _ {0} (W)\right) - \frac {D - \hat {\pi} (W)}{1 - \hat {\pi} (W)} \left(\Delta Y - \hat {g} (W)\right) \Bigg | X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \left(D - \frac {(1 - D) \pi_ {0} (W)}{1 - \pi_ {0} (W)}\right) (\Delta Y - g _ {0} (W)) - \left(D - \frac {(1 - D) \hat {\pi} (W)}{1 - \hat {\pi} (W)}\right) (\Delta Y - \hat {g} (W)) \mid W \right] \mid X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ D (\hat {g} (W) - g _ {0} (W)) - \frac {(1 - D) \pi_ {0} (W)}{1 - \pi_ {0} (W)} (\Delta Y - g _ {0} (W)) + \frac {(1 - D) \hat {\pi} (W)}{1 - \hat {\pi} (W)} (\Delta Y - \hat {g} (W)) \mid W \right] \mid X \right] \\ = \mathbb {E} \left[ \mathbb {E} \left[ \pi_ {0} (W) (\hat {g} (W) - g _ {0} (W)) \mid W \right] - \mathbb {E} \left[ \Delta Y - g _ {0} (W) \mid D = 0, W \right] + \mathbb {E} \left[ \frac {(1 - D) \hat {\pi} (W)}{1 - \hat {\pi} (W)} (\Delta Y - \hat {g} (W)) \mid W \right] \mid X \right] \\ = \mathbb {E} \left[ \pi_ {0} (W) (\hat {g} (W) - g _ {0} (W)) + \mathbb {E} \left[ \frac {1 - D}{1 - \pi_ {0} (W)} \frac {(1 - \pi_ {0} (W)) \hat {\pi} (W)}{1 - \hat {\pi} (W)} (\Delta Y - \hat {g} (W)) \mid W \right] \mid X \right] \\ = \mathbb {E} \left[ \pi_ {0} (W) (\hat {g} (W) - g _ {0} (W)) + \mathbb {E} \left[ \frac {(1 - \pi_ {0} (W)) \hat {\pi} (W)}{1 - \hat {\pi} (W)} (\Delta Y - \hat {g} (W)) \mid D = 0, W \right] \mid X \right] \\ = \mathbb {E} \left[ \pi_ {0} (W) (\hat {g} (W) - g _ {0} (W)) + \mathbb {E} \left[ \frac {(1 - \pi_ {0} (W)) \hat {\pi} (W)}{1 - \hat {\pi} (W)} \left(g _ {0} (W) - \hat {g} (W)\right) \mid D = 0, W \right] \mid X \right] \\ = \mathbb {E} \left[ (\hat {g} (W) - g _ {0} (W)) \frac {\pi_ {0} (W) - \hat {\pi} (W)}{1 - \hat {\pi} (W)} \mid X \right] \\ \end{array} +$$ + +The rates in Theorem 3.6 is an application of Theorem 1 in Foster & Syrgkanis, 2023. We reproduce the theorem in our notation for completeness. Let $d(\hat{\eta}, \eta_0)$ denote a distance metric for the function space of the nuisance functions $\mathcal{F}$ , and $\| (\cdot) \|_{\Theta}$ denote a norm for $\Theta$ . We denote $\operatorname{Star}(\Theta, \theta)$ to be the star hull, i.e. $\operatorname{Star}(\Theta, \theta) = \{t\theta + (1 - t)\theta' | \forall \theta' \in \Theta, t \in [0,1]\}$ . Moreover, let $\theta'$ be an arbitrary element in $\Theta$ . + +Assumption D.3 (First Order Optimality). $\theta^{\prime}$ satisfies the first-order optimality condition for $\mathcal{L}(\theta ;\eta_0)$ : + +$$ +\partial_ {\theta} \mathcal {L} (\theta ; \eta_ {0}) [ \theta - \theta^ {\prime} ] \geq 0 \quad \forall \quad \theta \in \operatorname {S t a r} (\Theta , \theta^ {\prime}) +$$ + +Assumption D.4 (Higher Order Smoothness). There exist constant $\beta_{1}$ such that: + +$$ +\partial_ {\theta} ^ {2} \mathcal {L} (\bar {\theta}, \eta_ {0}) [ \theta - \theta^ {\prime}, \theta - \theta^ {\prime} ] \leq \beta_ {1} \| \theta - \theta^ {\prime} \| _ {\Theta} ^ {2} +$$ + +for all $\theta \in \Theta$ and all $\bar{\theta} \in \mathrm{Star}(\Theta, \theta')$ . + +Assumption D.5 (Strong Convexity). The population loss is strongly convex with respect to $\theta$ , i.e. there exist constants $\lambda, \kappa > 0$ and $r \geq 0$ , such that for all $\theta \in \Theta$ , $\theta' \in \mathrm{Star}(\Theta, \theta')$ , and $\eta \in \mathcal{F}$ : + +$$ +\partial_ {\theta} ^ {2} \mathcal {L} (\bar {\theta}, \eta) [ \theta - \theta^ {\prime}, \theta - \theta^ {\prime} ] \geq \lambda \| \theta - \theta^ {\prime} \| ^ {2} - \kappa d (\eta , \eta_ {0}) ^ {\frac {4}{1 + r}} +$$ + +Assumption D.6. There exist $r \in [0,1)$ and constant $\beta_{2}$ such that for all $\theta, \theta' \in \mathrm{Star}(\Theta, \theta')$ and all $\eta_{1}, \eta_{2}$ in $\mathcal{F}$ : + +$$ +\left\| \mathcal {L} (\theta ; \eta_ {1}) - \mathcal {L} \left(\theta^ {\prime}; \eta_ {1}\right) - \mathcal {L} (\theta ; \eta_ {2}) + \mathcal {L} \left(\theta^ {\prime}; \eta_ {2}\right) \right\lvert \leq \beta_ {2} \| \theta - \theta^ {\prime} \| _ {\Theta} ^ {1 - r} d \left(\eta_ {1}, \eta_ {2}\right) ^ {2} +$$ + +Theorem D.7 (Theorem 1 from (Foster & Syrgkanis, 2023)). Suppose Assumptions D.3, D.4, D.5, and D.6 are satisfied for some $\theta' \in \Theta$ . Then for any $\theta \in \Theta$ , the following holds: + +$$ +\| \theta - \theta^ {\prime} \| _ {\Theta} ^ {2} \leq \frac {4}{\lambda} (\mathcal {L} (\theta , \hat {\eta}) - \mathcal {L} (\theta^ {\prime}, \hat {\eta})) + \left(\left(\frac {\beta_ {2}}{\lambda}\right) ^ {\frac {2}{1 + r}} + \frac {\kappa}{\lambda}\right) d (\eta_ {0}, \hat {\eta}) ^ {\frac {4}{1 + r}} +$$ + +We are finally ready to prove Theorem 3.6. + +Proof of Theorem 3.6. Since results follow from Theorem D.7, we first show that the minimizer of the loss in the function class $\Theta$ , i.e. $\theta_{*}$ , satisfies Assumptions D.3, D.4, D.5, and D.6 for the proposed loss $\mathcal{L}(\theta; \eta)$ with $\|(\cdot)\|_{\Theta} = \|(\cdot)\|_{D=1}$ . Assumption D.3 is satisfied when $\Theta$ is convex or when $\theta_0 \in \Theta$ . Assumptions D.4 and D.5 require us to bound: + +$$ +\partial_ {\theta} ^ {2} \mathcal {L} (\bar {\theta}, \hat {\eta}) [ \theta - \theta_ {*}, \theta - \theta_ {*} ] = \mathbb {E} [ D (\theta (X) - \theta_ {*} (X)) ^ {2} ] = \rho \| (\theta (X) - \theta_ {*} (X)) \| _ {D = 1} ^ {2} +$$ + +Thus Assumptions D.4 and D.5 are satisfied with $\beta_{1} = \lambda = \rho$ and $\kappa = 0$ . To show Assumption D.6, we need to convert the $\| (\cdot)\| _2$ in D.2 into $\| (\cdot)\|_{D = 1}$ : + +$$ +\begin{array}{l} \left\| \left(\theta (X) - \theta_ {*} (X)\right) \right\| ^ {2} = \int \left(\theta (X) - \theta_ {*} (X)\right) ^ {2} \mathbb {P} p (X) d X \\ = \int (\theta (X) - \theta_ {*} (X)) ^ {2} \mathbb {P} (D = 1 | X) \frac {1}{\mathbb {P} (D = 1 | X)} p (X) d X \\ \leq \frac {1}{c} \int (\theta (X) - \theta_ {*} (X)) ^ {2} \mathbb {P} (D = 1 | X) p (X) d X \\ = \frac {1}{c} \| \theta (X) - \theta_ {*} (X) \| _ {\Theta} ^ {2} \\ \end{array} +$$ + +Thus, Lemmas D.1 and D.2 imply Assumption D.6 with $r = 0$ , $\beta_{2} = \frac{3}{c}$ , and + +$$ +d (\eta , \eta_ {0}) ^ {2} = \mathbb {E} \left[ \mathbb {E} \left[ \left(\hat {g} (W) - g _ {0} (W)\right) \left(\frac {\pi_ {0} (W) - \hat {\pi} (W)}{1 - \hat {\pi} (W)}\right) \mid X \right] ^ {2} \right] ^ {1 / 2} +$$ + +Thus invoking Theorem D.7, we get that: + +$$ +\| \theta - \theta^ {\prime} \| _ {\Theta} ^ {2} \leq \frac {4}{\rho} R (n, \delta) + \frac {2}{\rho^ {2} c ^ {2}} \mathbb {E} \left[ \mathbb {E} \left[ (\hat {g} (W) - g _ {0} (W)) \left(\frac {\pi_ {0} (W) - \hat {\pi} (W)}{1 - \hat {\pi} (W)}\right) \Big | X \right] ^ {2} \right] +$$ + +![](images/d6abc1cc29ebc2a90ba9fd42c97ffa08c39510dcfea3f2959d9f742af5924614.jpg) + +Analogously, we can prove the rates in the case with instrument. Consider $\mathcal{L}_{IV}(\theta; \eta)$ from Proposition A.11, where we let $\eta$ denote the set of nuisances $\pi(W), g_D(W)$ and $g_Y(W)$ . We first present an auxiliary lemma to bound $|\mathcal{L}_{IV}(\theta_1; \eta_1) - \mathcal{L}_{IV}(\theta_2; \eta_1) - (\mathcal{L}_{IV}(\theta_2; \eta_1) - \mathcal{L}_{IV}(\theta_2; \eta_2))|$ . + +Lemma D.8. Let $\eta = (\pi, g_{Y}, g_{D})$ denote the set of nuisance functions, and let $\eta_0 = (\pi_0, g_{0,Y}, g_{0,D})$ be the true nuisance functions. Consider the loss defined in Proposition A.11. Assume there exist finite constant $B$ such that $|\theta(X)| \leq B$ for all $X$ with positive measure, and all $\theta \in \Theta$ . Then, we have that for all $\theta_1, \theta_2, \eta$ , + +$$ +\begin{array}{l} \left. \left| \mathcal {L} _ {I V} \left(\theta_ {1}; \eta\right) - \mathcal {L} _ {I V} \left(\theta_ {2}; \eta\right) - \left(\mathcal {L} _ {I V} \left(\theta_ {2}; \eta_ {0}\right) - \mathcal {L} _ {I V} \left(\theta_ {2}; \eta_ {0}\right)\right) \right| \right. \\ \leq 4 B ^ {2} \mathbb {E} \left[ \mathbb {E} \left[ \left(\frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)}\right) \left(g _ {0, D} (W) - g _ {D} (W)\right) \Bigg | X \right] ^ {2} \right] ^ {\frac {1}{2}} \| \theta (X) - \theta (X) \| \\ + 2 \mathbb {E} \left[ \mathbb {E} \left[ \left(\frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)}\right) \left(g _ {0, Y} (W) - g _ {Y} (W)\right) \mid X \right] ^ {2} \right] ^ {\frac {1}{2}} \| \theta (X) - \theta (X) \| \\ \end{array} +$$ + +Proof of Lemma D.8. + +$$ +\mathcal {L} _ {I V} (\theta_ {1}; \eta) - \mathcal {L} _ {I V} (\theta_ {2}; \eta) = \mathbb {E} \left[ \widehat {Z} (\eta) \left\{(\Delta D - g _ {D} (W)) (\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)) - 2 (\Delta Y - g _ {Y} (W)) (\theta_ {1} (X) - \theta_ {2} (X)) \right\} \right] +$$ + +$$ +\mathcal {L} _ {I V} (\theta_ {1}; \eta_ {0}) - \mathcal {L} _ {I V} (\theta_ {2}; \eta_ {0}) = \mathbb {E} \left[ \widehat {\mathcal {Z}} (\eta_ {0}) \left\{(\Delta D - g _ {0, D} (W)) (\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)) - 2 (\Delta Y - g _ {0, Y} (W)) (\theta_ {1} (X) - \theta_ {2} (X)) \right\} \right] +$$ + +Let's first consider the $\mathbb{E}\left[\widehat{Z} (\eta_0)(D - g_{0,D}(W))(\theta_1^2 (X) - \theta_2^2 (X))\right]$ term: + +$$ +\begin{array}{l} \mathbb {E} \left[ \widehat {Z} (\eta_ {0}) (\Delta D - g _ {0, D} (W)) (\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)) \right] \\ = E \left[ \left(Z - \frac {(1 - Z) \pi_ {0} (W)}{1 - \pi_ {0} (W)}\right) (\Delta D - g _ {0, D} (W)) \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] \\ = \mathbb {E} \left[ Z \Delta D \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] - \mathbb {E} \left[ Z g _ {0, D} (W) \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] \\ - E \left[ E \left[ \left(\Delta D - g _ {0, D} (W)\right) \mid Z = 0, W \right] \pi_ {0} (W) \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] \\ = \mathbb {E} [ \Delta D Z (\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)) ] - \mathbb {E} [ Z g _ {0, D} (W) (\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)) ] \\ \end{array} +$$ + +Now, for the $\mathbb{E}\left[\widehat{Z} (\eta)(D - g_D(W))(\theta_1^2 (X) - \theta_2^2 (X))\right]$ term: + +$$ +\begin{array}{l} \mathbb {E} \left[ \widehat {Z} (\eta) (\Delta D - g _ {D} (W)) (\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)) \right] \\ = \mathbb {E} \left[ \left(Z - \frac {(1 - Z) \pi (W)}{1 - \pi (W)}\right) (\Delta D - g _ {D} (W)) \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] \\ = \mathbb {E} \left[ \Delta D Z \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] - \mathbb {E} \left[ Z g _ {D} (W) \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] \\ - \mathbb {E} \left[ \mathbb {E} \left[ \frac {1 - Z}{1 - \pi_ {0} (W)} (\Delta D - g _ {D} (W)) | W \right] \frac {(1 - \pi_ {0} (W)) \pi_ {0} (W)}{1 - \pi (W)} (\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)) \right] \\ = \mathbb {E} \left[ \Delta D Z \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] - \mathbb {E} \left[ Z g _ {D} (W) \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] \\ - \mathbb {E} \left[ \mathbb {E} \left[ (\Delta D - g _ {D} (W)) | Z = 0, W \right] \frac {(1 - \pi_ {0} (W)) \pi_ {0} (W)}{1 - \pi (W)} \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] \\ = \mathbb {E} \left[ \Delta D Z \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] - \mathbb {E} \left[ Z g _ {D} (W) \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] \\ - \mathbb {E} \left[ \frac {(1 - \pi_ {0} (W)) \pi_ {0} (W)}{1 - \pi (W)} \left(g _ {0, D} (W) - g _ {D} (W)\right) \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] \\ \end{array} +$$ + +Putting them together, we get: + +$$ +\begin{array}{l} \mathbb {E} \left[ \widehat {Z} (\eta) (\Delta D - g _ {D} (W)) (\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)) - \widehat {Z} (\eta_ {0}) (\Delta D - g _ {0, D} (W)) (\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)) \right] \\ = \mathbb {E} [ Z (g _ {0, D} (W) - g _ {D} (W)) (\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)) ] - \mathbb {E} \left[ \frac {(1 - \pi_ {0} (W)) \pi_ {0} (W)}{1 - \pi (W)} (g _ {0, D} (W) - g _ {D} (W)) (\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)) \right] \\ = \mathbb {E} \left[ \left(Z - \frac {\left(1 - \pi_ {0} (W)\right) \pi_ {0} (W)}{1 - \pi (W)}\right) \left(g _ {0, D} (W) - g _ {D} (W)\right) \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] \\ = \mathbb {E} \left[ \frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)} \left(g _ {0, D} (W) - g _ {D} (W)\right) \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) \right] \\ \end{array} +$$ + +Similarly, + +$$ +\begin{array}{l} \mathbb {E} \left[ \widehat {Z} (\eta) \left(\Delta Y - g _ {Y} (W)\right) \left(\theta_ {1} (X) - \theta_ {2} (X)\right) - \widehat {Z} \left(\eta_ {0}\right) \left(\Delta Y - g _ {0, Y} (W)\right) \left(\theta_ {1} (X) - \theta_ {2} (X)\right) \right] \\ = \mathbb {E} \left[ \frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)} \left(g _ {0, Y} (W) - g _ {Y} (W)\right) \left(\theta_ {1} (X) - \theta_ {2} (X)\right) \right] \\ \end{array} +$$ + +Thus, we have shown that: + +$$ +\begin{array}{l} \left. \left| \mathcal {L} _ {I V} \left(\theta_ {1}; \eta\right) - \mathcal {L} _ {I V} \left(\theta_ {2}; \eta\right) - \left(\mathcal {L} _ {I V} \left(\theta_ {2}; \eta_ {0}\right) - \mathcal {L} _ {I V} \left(\theta_ {2}; \eta_ {0}\right)\right) \right| \right. \\ = \left| \mathbb {E} \left[ \frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)} \left(g _ {0, D} (W) - g _ {D} (W)\right) \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) - 2 \frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)} \left(g _ {0, Y} (W) - g _ {Y} (W)\right) \left(\theta_ {1} (X) - \theta_ {2} (X)\right) \right] \right| \\ \leq \mathbb {E} \left[ \mathbb {E} \left[ \left(\frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)}\right) \left(g _ {0, D} (W) - g _ {D} (W)\right) \Bigg | X \right] ^ {2} \right] ^ {\frac {1}{2}} \mathbb {E} \left[ \left(\theta_ {1} ^ {2} (X) - \theta_ {2} ^ {2} (X)\right) ^ {2} \right] ^ {\frac {1}{2}} \\ + 2 \mathbb {E} \left[ \mathbb {E} \left[ \left(\frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)}\right) \left(g _ {0, Y} (W) - g _ {Y} (W)\right) | X \right] ^ {2} \right] ^ {\frac {1}{2}} \mathbb {E} \left[ \left(\theta_ {1} (X) - \theta_ {2} (X)\right) ^ {2} \right] ^ {\frac {1}{2}} \\ \leq 4 B ^ {2} \mathbb {E} \left[ \mathbb {E} \left[ \left(\frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)}\right) \left(g _ {0, D} (W) - g _ {D} (W)\right) \Bigg | X \right] ^ {2} \right] ^ {\frac {1}{2}} \| \theta (X) - \theta (X) \| \\ + 2 \mathbb {E} \left[ \mathbb {E} \left[ \left(\frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)}\right) \left(g _ {0, Y} (W) - g _ {Y} (W)\right) | X \right] ^ {2} \right] ^ {\frac {1}{2}} \| \theta (X) - \theta (X) \| \\ \end{array} +$$ + +We can now prove Theorem A.12. + +Proof of Theorem A.12. Since results follow from Theorem D.7, we first show that the minimizer of the loss in the function class $\Theta$ , i.e. $\theta_{*}$ , satisfies Assumptions D.3, D.4, D.5, and D.6 for the proposed loss $\mathcal{L}_{IV}(\theta; \eta)$ with $\|(\cdot)\|_{\Theta} = \|(\cdot)\|_{Z=1,CM}$ . First, Assumption D.3 is satisfied when $\Theta$ is convex or when $\theta_0 \in \Theta$ . Now, we look at the second order directional derivative with respect to $\theta$ . Following the same steps as in the proof of Porposition A.11, we get: + +$$ +\begin{array}{l} \partial_ {\theta} ^ {2} \mathcal {L} _ {I V} (\bar {\theta}, \eta_ {0}) [ \theta - \theta_ {*}, \theta - \theta_ {*} ] \\ = \mathbb {E} \left[ \widehat {Z} \left(\eta_ {0}\right) \left(\Delta D - g _ {0, D} (W)\right) \left(\theta (X) - \theta_ {*} (X)\right) ^ {2} \right] \\ = \mathbb {E} \left[ \left(\theta (X) - \theta_ {*} (X)\right) ^ {2} | Z = 1, D (1) > D (0) \right] \mathbb {P} (Z = 1) \mathbb {P} (D (1) > D (0) | Z = 1) \\ = h k \| \theta (X) - \theta_ {*} (W) \| _ {Z = 1, C M} \\ \end{array} +$$ + +Thus Assumption D.4 is satisfied with $\beta_{1} = hk$ + +However, for Assumption D.5, we need to bound the second directional derivative for any $\eta$ . Therefore, we consider the distance between $\partial_{\theta}^{2}\mathcal{L}_{IV}(\overline{\theta},\eta)[\theta -\theta_{*},\theta -\theta_{*}] - \partial_{\theta}^{2}\mathcal{L}_{IV}(\overline{\theta},\eta_{0})[\theta -\theta_{*},\theta -\theta_{*}]$ : + +$$ +\begin{array}{l} \partial_ {\theta} ^ {2} \mathcal {L} _ {I V} (\bar {\theta}, \eta) [ \theta - \theta_ {*}, \theta - \theta_ {*} ] - \partial_ {\theta} ^ {2} \mathcal {L} _ {I V} (\bar {\theta}, \eta_ {0}) [ \theta - \theta_ {*}, \theta - \theta_ {*} ] \\ = 2 \mathbb {E} \left[ \widehat {Z} (\eta) \left(\Delta D - g _ {D} (W)\right) \left(\theta (X) - \theta_ {*} (X)\right) ^ {2} \right] - \mathbb {E} \left[ \widehat {Z} \left(\eta_ {0}\right) \left(\Delta D - g _ {0, D} (W)\right) \left(\theta (X) - \theta_ {*} (X)\right) ^ {2} \right] \\ = 2 \mathbb {E} \left[ \frac {\pi_ {0} (W) - \pi (W)}{1 - \pi (W)} \left(g _ {0, D} (W) - g _ {D} (W)\right) \left(\theta (X) - \theta_ {*} (X)\right) ^ {2} \right] \quad (\text {B y}) \\ \leq 2 \mathbb {E} \left[ \mathbb {E} \left[ \left(\hat {g} _ {D} (W) - g _ {0, D} (W)\right) \left(\frac {\pi_ {0} (W) - \hat {\pi} (W)}{1 - \hat {\pi} (W)}\right) | X \right] ^ {2} \right] ^ {1 / 2} \| (\theta (X) - \theta_ {*} (X)) \| _ {4} ^ {2} \quad \text {(B y C a u c h y - S c h w a r z)} \\ \leq 8 B ^ {2} \mathbb {E} \left[ \mathbb {E} \left[ (\hat {g} _ {D} (W) - g _ {0, D} (W)) \left(\frac {\pi_ {0} (W) - \hat {\pi} (W)}{1 - \hat {\pi} (W)}\right) | X \right] ^ {2} \right] ^ {1 / 2} \| (\theta (X) - \theta_ {*} (X)) \| _ {2} ^ {2} \\ \leq \frac {8 B ^ {2}}{c} \mathbb {E} \left[ \mathbb {E} \left[ (\hat {g} _ {D} (W) - g _ {0, D} (W)) \left(\frac {\pi_ {0} (W) - \hat {\pi} (W)}{1 - \hat {\pi} (W)}\right) | X \right] ^ {2} \right] ^ {1 / 2} \| (\theta (X) - \theta_ {*} (X)) \| _ {\Theta} ^ {2} \\ \end{array} +$$ + +Thus, for sufficiently small nuisance error, Assumption D.5 is satisfied with $\kappa = 0$ , and + +$$ +\lambda = h k - \frac {8 B ^ {2}}{c} \operatorname {E r r o r} \left(\pi , g _ {D}\right) +$$ + +Lemma D.8 implies Assumption D.6 with $r = 0$ , $\beta_{2} = \frac{1}{c}\max \{4B^{2},2\}$ , and $d(\eta ,\eta_0)^2 = \operatorname {Error}(\pi ,\hat{g}_D) + \operatorname {Error}(\pi ,\hat{g}_Y)$ . Thus invoking Theorem D.7, we get that: + +$$ +\| \theta (X) - \theta_ {*} (X) \| _ {\Theta} ^ {2} \leq \frac {4}{h k - \frac {8 B ^ {2}}{c} \operatorname {E r r o r} (\pi , g _ {D})} R _ {n} ^ {2} + \left(\frac {\operatorname* {m a x} (4 B ^ {2} , 2)}{c \left(h k - \frac {8 B ^ {2}}{c} \operatorname {E r r o r} (\pi , g _ {D})\right)}\right) (\operatorname {E r r o r} (\pi , \hat {g} _ {Y}) + \operatorname {E r r o r} (\pi , \hat {g} _ {D})) +$$ + +# E. Additional Experiment Details and Results + +# E.1. Experiment Setup + +Here we describe the data generating processes (DGP) for the fully synthetic experiments. We consider soome observed covariates $W$ with dimension $d_W$ , and some unobserved confounding $U$ , of dimension $d_U$ . Let $\mu_W, \mu_U$ be the mean of $W$ + +and $U$ , where each entry is sampled from a uniform distribution ranging from 0 to 1. Let $I_d$ denote the identity matrix with dimension $d$ . + +$$ +W \sim \mathcal {N} (\mu_ {W}, I _ {d _ {X}}) +$$ + +$W_{\text{masked}} \sim$ Half of the dimensions of $W$ are randomly set to 0 + +$$ +U \sim \mathcal {N} \left(\mu_ {U}, I _ {d _ {U}}\right) +$$ + +$$ +p = \frac {1}{1 + e x p \left(- \frac {1}{2} \beta_ {D} ^ {T} (W - \mu_ {W}) * \left(\alpha_ {U} ^ {T} (U - \mu_ {U})\right) ^ {2}\right)} \quad (p \text {i s c l i p p e d s . t .} p \in [ 0. 9, 0. 1 ]) +$$ + +$$ +D \sim \operatorname {B i n o m i a l} (p) +$$ + +$$ +\theta_ {0} = \frac {1}{2} W _ {1} * \mathbb {1} (W _ {2} > 0) +$$ + +For experiments with DGP that satisfies the conditional parallel trends assumptions: + +$$ +Y _ {0} = 5 \left(\alpha_ {U} ^ {T} (U - \mu_ {U})\right) ^ {2} W _ {6} + W _ {2} + \epsilon_ {0}, \quad \epsilon_ {0} \sim \mathcal {N} (0, 0. 5) +$$ + +$$ +Y _ {1} = 5 \left(\alpha_ {U} ^ {T} \left(U - \mu_ {U}\right)\right) ^ {2} W _ {6} + \mathbb {1} \left(W _ {1} > 0\right) W _ {1} + \beta_ {Y} ^ {T} W _ {\text {m a s k e d}} + W _ {3} + D * \theta_ {0} + \epsilon_ {1}, \quad \epsilon_ {1} \sim \mathcal {N} (0, 0. 5) +$$ + +The results in Table 1 and 4 are generated using this process with $d_W = 20$ and $d_U = 5$ . We also ran experiments with higher dimensional covariates ( $d_W = 100$ ), and the results are presented in Table 6. The results in Table 2 is generated using the same setup, but with $0.1 * p$ as the treatment probabilities. These results all showcase that our proposed doubly robust CATT learner out performs the baseline methods. In addition to this DGP, we also experimented with a DGP that does not satisfy the conditional parallel trends assumptions. + +$$ +\gamma \sim U n i f o r m ([ - 1, 1 ]) +$$ + +$$ +Y _ {0} = \left(\alpha_ {U} ^ {T} (U - \mu_ {U})\right) ^ {2} X _ {6} + X _ {2} + \epsilon_ {0}, \quad \epsilon_ {0} \sim \mathcal {N} (0, 0. 5) +$$ + +$$ +m = | Y _ {0} | +$$ + +$$ +Y _ {1} = \left(\alpha_ {U} ^ {T} (U - \mu_ {U})\right) ^ {2} X _ {6} + m \gamma^ {T} X \odot X + \mathbb {1} (X _ {1} > 0) X _ {2} + D * \theta_ {0} + \epsilon_ {1}, \quad \epsilon_ {1} \sim \mathcal {N} (0, 0. 5) +$$ + +Experiment results for this DGP is presented in Table 7. We see that in this case, the conditional parallel trends are violated so the learner that assumes conditional parallel trends has a higher MSE than the those that assume lagged dependent outcome (as this DGP has a lagged outcome component). Moreover, we see that even when the assumptions are violated, the proposed learner is still more robust than the baseline outcome regression learner. + +For the semi-synthetic experiments on the minimum wage dataset, each dataset is constructed by first sampling 10000 units with replacement from the original dataset. We keep the covariate and pre-treatment outcome information, and generate the treatment assignment and the outcome in the post-treatment time period. The probability of receiving treatment is generated from the logistic transformation of a linear transformation of a linear function of 2 "region" variables that are binary, and the log average payment information for year 2001 (i.e. $2*(\text{region}3) - 2*(\text{region}4) + ((\log\text{average pay}) - 10)$ ). The time trends, i.e. $Y_{post}(0) - Y_{pre}(0)$ , is generated by $0.1*(\log\text{average pay}) + 0.1*(\text{region}3) + 0.1*(\text{years after treatment}) + (\text{region}4)*(y\text{ears after treatment})^2 + (\log\text{average pay})^{\frac{1}{2}}*(\log\text{average population})$ . The treatment effect is defined as $0.1*(\log\text{average population}) + 0.1*(\log\text{average population})^{\frac{1}{2}}$ . + +# E.2. Additional Results + +Table 4. MSE (mean ± standard deviation) over 100 simulations following the conditional parallel trends condition. Each row represents a different meta-learner, and columns represent the different nuisance function classes. + +
BasicLasso (CV)Ridge (CV)Random ForestBest
Neural Net (CPTA OR)0.12 ± 0.020.12 ± 0.020.12 ± 0.020.38 ± 0.180.12 ± 0.02
Neural Net (CPTA DR)0.1 ± 0.020.1 ± 0.030.1 ± 0.020.14 ± 0.040.1 ± 0.02
Neural Net (Lagged OR)0.12 ± 0.020.14 ± 0.040.12 ± 0.021.27 ± 0.650.12 ± 0.02
Neural Net (Lagged DR)0.1 ± 0.020.1 ± 0.030.1 ± 0.020.63 ± 0.40.1 ± 0.02
XGBoost (OR)0.09 ± 0.020.09 ± 0.020.09 ± 0.020.31 ± 0.160.09 ± 0.02
XGBoost (DR)0.04 ± 0.010.04 ± 0.010.04 ± 0.020.06 ± 0.030.04 ± 0.01
XGBoost (Lagged OR)0.09 ± 0.020.11 ± 0.040.09 ± 0.021.15 ± 0.690.09 ± 0.02
XGBoost (Lagged DR)0.04 ± 0.010.05 ± 0.030.04 ± 0.020.54 ± 0.450.04 ± 0.01
Linear (OR)0.26 ± 0.070.26 ± 0.070.26 ± 0.070.51 ± 0.180.26 ± 0.07
Linear (DR)0.26 ± 0.070.26 ± 0.070.26 ± 0.070.26 ± 0.070.26 ± 0.07
Linear (Lagged OR)0.26 ± 0.070.28 ± 0.080.26 ± 0.071.18 ± 0.560.26 ± 0.07
Linear (Lagged DR)0.26 ± 0.070.26 ± 0.070.26 ± 0.070.42 ± 0.190.26 ± 0.07
+ +Table 5. MSE (mean ± standard deviation) Over 100 Simulations of Imbalanced Dataset. Each row represent a different meta-learner, and columns represent the different nuisance function classes. + +
No ControlsLinear RegressionLasso (CV)Ridge (CV)Random ForestBest
Neural Net (OR)1.53 ± 0.740.22 ± 0.060.21 ± 0.060.21 ± 0.060.4 ± 0.150.21 ± 0.05
Neural Net (DR)0.52 ± 0.310.18 ± 0.070.18 ± 0.050.18 ± 0.050.24 ± 0.070.18 ± 0.05
Neural Net (CATE OR)0.66 ± 0.270.27 ± 0.080.27 ± 0.080.27 ± 0.080.51 ± 0.160.27 ± 0.08
Neural Net (CATE DR)0.53 ± 0.220.22 ± 0.070.22 ± 0.070.21 ± 0.070.33 ± 0.110.21 ± 0.07
XGBoost (OR)1.22 ± 0.580.21 ± 0.060.21 ± 0.060.21 ± 0.060.34 ± 0.110.21 ± 0.06
XGBoost (DR)0.4 ± 0.140.12 ± 0.030.12 ± 0.030.12 ± 0.030.18 ± 0.060.12 ± 0.03
XGBoost (CATE OR)0.66 ± 0.270.27 ± 0.080.27 ± 0.080.27 ± 0.080.51 ± 0.160.27 ± 0.08
XGBoost (CATE DR)0.49 ± 0.220.15 ± 0.050.15 ± 0.040.15 ± 0.050.34 ± 0.130.15 ± 0.04
+ +Table 6. MSE (mean ± standard deviation) over 100 simulations following the conditional parallel trends condition, with 100 covariates. + +
Linear RegressionLasso (CV)Ridge (CV)Random ForestBest
Neural Net OR0.21 ± 0.050.21 ± 0.050.2 ± 0.061.27 ± 0.690.21 ± 0.06
Neural Net DR0.18 ± 0.050.18 ± 0.060.18 ± 0.060.64 ± 0.380.18 ± 0.06
Neural Net CATE OR0.28 ± 0.080.28 ± 0.080.28 ± 0.080.65 ± 0.250.28 ± 0.08
Neural Net CATE DR0.3 ± 0.10.29 ± 0.090.29 ± 0.11.08 ± 0.710.2 ± 0.06
Linear OR0.27 ± 0.080.27 ± 0.080.27 ± 0.081.3 ± 0.630.27 ± 0.08
Linear DR0.27 ± 0.080.27 ± 0.080.27 ± 0.080.44 ± 0.130.27 ± 0.08
Linear CATE OR0.28 ± 0.080.27 ± 0.080.28 ± 0.080.65 ± 0.250.27 ± 0.08
Linear CATE DR0.29 ± 0.080.29 ± 0.080.29 ± 0.080.82 ± 0.330.28 ± 0.08
XGBoost OR0.21 ± 0.060.2 ± 0.050.21 ± 0.050.96 ± 0.450.21 ± 0.05
XGBoost DR0.13 ± 0.040.12 ± 0.030.12 ± 0.030.61 ± 0.250.12 ± 0.03
XGBoost CATE OR0.28 ± 0.080.27 ± 0.080.28 ± 0.080.65 ± 0.250.27 ± 0.08
XGBoost CATE DR0.26 ± 0.090.24 ± 0.080.25 ± 0.091.18 ± 0.850.15 ± 0.05
+ +Table 7. MSE (mean ± standard deviation) over 100 simulations that does not satisfy the conditional parallel trends assumption. Each row represent a different meta-learner, and columns represent the different nuisance function classes. + +
Linear RegressionLasso (CV)Ridge (CV)Random ForestBest
Neural Net (CPTA OR)76.93 ± 135.2576.34 ± 129.7174.87 ± 127.9435.49 ± 91.9836.85 ± 87.85
Neural Net (CPTA DR)17.07 ± 74.1615.54 ± 54.2520.41 ± 86.3517.24 ± 63.3718.38 ± 65.13
Neural Net (Lagged OR)70.31 ± 98.1970.07 ± 93.9369.98 ± 100.4426.21 ± 39.9324.81 ± 32.88
Neural Net (Lagged DR)4.37 ± 4.664.93 ± 5.654.94 ± 5.894.99 ± 14.465.09 ± 10.25
XGBoost (CPTA OR)65.67 ± 122.6563.5 ± 127.8963.82 ± 113.5929.39 ± 69.8430.15 ± 85.27
XGBoost (CPTA DR)20.49 ± 58.5522.99 ± 81.5223.31 ± 74.7426.9 ± 128.5231.11 ± 149.05
XGBoost (Lagged OR)55.62 ± 82.2756.87 ± 83.9553.95 ± 77.1921.29 ± 32.8522.39 ± 38.38
XGBoost (Lagged DR)9.88 ± 14.349.34 ± 13.1310.33 ± 21.8110.76 ± 40.398.14 ± 13.38
Linear (CPTA OR)18.41 ± 62.5418.0 ± 61.8418.41 ± 62.6817.61 ± 65.5117.61 ± 65.51
Linear (CPTA DR)14.56 ± 57.6914.7 ± 58.4314.56 ± 57.715.84 ± 64.1215.84 ± 64.12
Linear (Lagged OR)12.08 ± 28.9311.64 ± 27.5512.07 ± 28.99.78 ± 21.189.78 ± 21.18
Linear (Lagged DR)4.78 ± 5.814.85 ± 5.974.78 ± 5.813.99 ± 7.183.99 ± 7.18
+ +![](images/bff4f747f184e622159e3f5345bc76f4fedc8c5f34a4fc6cde166a50e8a890fc.jpg) +Figure 3. Calibration plot for CATT w.r.t log county population for the XGBoost doubly robust learner. + +![](images/77bd428a45af50c7ea4243f59956df1748766719fef0e76d808e1b7dfd160218.jpg) +Figure 4. Calibration plot for CATT w.r.t log county population for the linear doubly robust learner. \ No newline at end of file diff --git a/ametalearnerforheterogeneouseffectsindifferenceindifferences/images.zip b/ametalearnerforheterogeneouseffectsindifferenceindifferences/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..72be31bf24f97d5775b5997b17acfac27200b95d --- /dev/null +++ b/ametalearnerforheterogeneouseffectsindifferenceindifferences/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2fbd3070410c87c189b1402dc57f2ecaa137d9d136ea2a79d1d427780b1240f +size 2807128 diff --git a/ametalearnerforheterogeneouseffectsindifferenceindifferences/layout.json b/ametalearnerforheterogeneouseffectsindifferenceindifferences/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9c742828d766672669b71454fbff06416ebbbb3b --- /dev/null +++ b/ametalearnerforheterogeneouseffectsindifferenceindifferences/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff76ba5840f765c76449c7a1d054f80135dcac60940f2389df1a92245db7739c +size 1160774 diff --git a/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/2b7234f0-4869-42fa-8563-4e9e58528952_content_list.json b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/2b7234f0-4869-42fa-8563-4e9e58528952_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1267ba46f0af5341cbd92f891c6977ee6a42cd95 --- /dev/null +++ b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/2b7234f0-4869-42fa-8563-4e9e58528952_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b03df297be7e0cb61822f46d6a9e766c30c2044fb11717382240cce8cc82112e +size 244438 diff --git a/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/2b7234f0-4869-42fa-8563-4e9e58528952_model.json b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/2b7234f0-4869-42fa-8563-4e9e58528952_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6207e26922f41b0dfb4c64050c30f26a5ba00bfc --- /dev/null +++ b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/2b7234f0-4869-42fa-8563-4e9e58528952_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c7737741f619730ef7b852937a0b060dcac3384779ff4fbd9a8249a271f5ff6 +size 280806 diff --git a/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/2b7234f0-4869-42fa-8563-4e9e58528952_origin.pdf b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/2b7234f0-4869-42fa-8563-4e9e58528952_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..57d6af4fd955642f69364f8f3b9db18ed5336e17 --- /dev/null +++ b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/2b7234f0-4869-42fa-8563-4e9e58528952_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8d80927090abfd39b12e1af1f9aa8ec078b24e05afa93990e7c0926f95996ea +size 2207991 diff --git a/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/full.md b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1f6f276bbe6d0d7d5799e9ee4e841061a4017186 --- /dev/null +++ b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/full.md @@ -0,0 +1,716 @@ +# A Mixed-Curvature based Pre-training Paradigm for Multi-Task Vehicle Routing Solver + +Suyu Liu1 Zhiguang Cao2 Shanshan Feng3 Yew-Soon Ong1,4 + +# Abstract + +Solving various types of vehicle routing problems (VRPs) using a unified neural solver has garnered significant attention in recent years. Despite their effectiveness, existing neural multi-task solvers often fail to account for the geometric structures inherent in different tasks, which may result in suboptimal performance. To address this limitation, we propose a curvature-aware pretraining framework. Specifically, we leverage mixed-curvature spaces during the feature fusion stage, encouraging the model to capture the underlying geometric properties of each instance. Through extensive experiments, we evaluate the proposed pre-training strategy on existing neural multi-task solvers across a variety of testing scenarios. The results demonstrate that the curvature-aware pre-training approach not only enhances the generalization capabilities of existing neural VRPs solvers on synthetic datasets but also improves solution quality on real-world benchmarks. + +# 1. Introduction + +Vehicle routing problems (VRPs) owing to its broad applicability among various domains such as transportation service (Ge et al., 2019; Zhou et al., 2023a) and trajectory planning (Dantzig & Ramser, 1959; Min, 1989), have garnered great attentions in recent years. However, because of its NP-Hard complexity, obtaining optimal solutions within a reasonable time is almost infeasible. Regarding to this, several heuristic solvers have been proposed, such as Lin- + +1College of Computing and Data Science, Nanyang Technological University, Singapore 2School of Computing and Information Systems, Singapore Management University, Singapore 3Centre for Frontier AI Research, The Agency for Science, Technology and Research, Singapore 4Centre for Frontier AI Research, Institute of High Performance Computing, Agency for Science, Technology and Research, Singapore. Correspondence to: Zhiguang Cao . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +Kernighan-Helsgaun (LKH) (Lin & Kernighan, 1973; Helsgaun, 2017), Hybrid Genetic Search (HGS) (Vidal, 2022) and OR-Tools (Perron & Didier, 2024). Despite the fact that these solvers have achieved remarkable performances, their reliance on hand-crafted rules and specialized domain knowledge may severely limit their abilities to generalize to more general problem types, especially the emerging VRP variants. Additionally, these solvers may become computationally prohibitive when applied on large-scale instances. + +On the other hand, deep learning based neural solvers such as (Kool et al., 2019; Kwon et al., 2020; Zhou et al., 2023b;a; Goh et al., 2024; Zhang et al., 2025) require minimal handcrafted rules and offer significantly much faster inference speeds. Typically, following the architecture of POMO (Kwon et al., 2020), these neural solvers often contain self-attention modules and utilize reinforcement learning as their optimization algorithms. Besides, hard masks are integrated into the attention mechanism to eliminate infeasible actions. Despite their efficiency and flexibility, these solvers primarily address relatively simple VRPs, and extending current frameworks to handle more complex problem types remains as an under-explored area. + +Recently, there has been a growing trend towards building multi-task foundation models for solving various types of VRPs (Liu et al., 2024; Zhou et al., 2024; Berto et al., 2024; Huang et al., 2025). Although these models have demonstrated promising results, they largely overlook the geometric structures that widely exist in different tasks. As shown in Figure 1, VRP instances, despite being defined in Euclidean coordinates, exhibit node-level curvature distributions that cannot be faithfully captured in flat spaces: the Ollivier-Ricci curvature (defined in Eq. (15), Appendix.1) which effectively quantifies geometric structures on discrete spaces like graphs or networks, reveals that almost every node carries either negative or positive curvature, indicating that the underlying data contains structures in a mixed-curvature space rather than a purely Euclidean one. Specifically, we observe that nodes are frequently situated in regions of either positive (contractive) or negative (expansive) curvature spaces, which correlate with delivery patterns such as customer clustering or route divergence in the delivery map (Figure 5, Appendix.1). All of these factors + +are critical to decision makings in solving vehicle routing problems. However, the embedding and feature transformation spaces in current neural solvers are still confined to Euclidean geometric spaces where each point (or node) is treated uniformly, severely limiting their abilities to adapt to such heterogeneous geometries (Nickel & Kiela, 2017; Ganea et al., 2018; Liu et al., 2019; Chami et al., 2019; Desai et al., 2023). Indeed, prior work (Sala et al., 2018) has shown that Euclidean spaces, regardless of dimensionality, struggle to represent complex structures such as trees without incurring significant distortions. Fortunately, some deep learning methods on Riemannian manifolds (Nickel & Kiela, 2017; Ganea et al., 2018; Gu et al., 2018) have provided an alternative way to avoid these potential pitfalls. + +In this work, we propose the first pre-training strategy that trains multi-task foundation models within a mixed-curvature geometric space to solve various types of VRPs, which empowers the neural solvers with the ability to capture nuanced geometric information from inputs in a curvature-sensitive manner. Specifically, we partition the feature space of each encoder layer into multiple subspaces, each mapped to a geometric space of a specific curvature. Features from the previous layer are projected into these distinct curvature spaces and subsequently merged in the output stage. By leveraging the unique properties of non-Euclidean spaces such as hyperbolic (negative curvature) and hyperspherical (positive curvature) geometries, our approach allows the model to effectively capture complex geometric patterns from problem instances, offering a novel way to enhance performance across a wide range of VRPs. Accordingly, our contributions are summarized as follows: + +- We investigate the multi-task VRP problem from a novel perspective by introducing mixed-curvature geometric spaces, motivated by the diverse curvatures of nodes. To our knowledge, this is the first work to explore a curvature-aware neural solver for VRPs. +- We propose a novel and practical pre-training paradigm that integrates spaces of varying curvatures, enabling the model to explore inherent geometric structures from the inputs for solving VRPs. +- Through extensive experiments, we demonstrate that our proposed approach not only achieves remarkable improvements across various types of VRPs but also shows its strong adaptability to different architectures of multi-task solvers. In addition, results on real-world benchmarks further validate its effectiveness. + +![](images/671bd943c46c69dd6f033205c261d1e99ffd053e4c40a24e062d4750c274fee1.jpg) +(a) CVRP + +![](images/b8e2c9d08dddce08886be7cb5efc4e893bcf7af25e798547867e39c7a058c95e.jpg) +(b) OVRP + +![](images/03def3615545fc95e3b867c494287594426470f06a1edf4f4e418623dd766d80.jpg) +(c) VRPB + +![](images/472013246f169d026b3578c68f1d7ea5047bd577081f5b49a61329e2640abc60.jpg) +(d) VRPL + +![](images/cd77baa2cd79a2e57bea6ab9d6e4d0c492cce707d186b949e811331186332119.jpg) +(e) VRPTW + +![](images/635d6bf9ba5b65fb4b0efb37ec4e176e26357455a432c8e5d6ca2648e1910af6.jpg) +(f) OVRPTW +Figure 1. Histograms of curvatures for each node across 6 VRP tasks. We utilize 1,000 instances for every task, each containing 50 nodes, to visualize curvature distributions. The x-axis represents curvature values, while the y-axis denotes the count of each value. The avg line indicates the average curvature across all nodes. We employ Ollivier-Ricci curvature (Ollivier, 2009) which is well-suited for measuring curvatures in discrete structures like graphs. For further details on this curvature, please refer to Appendix.1. It is demonstrated that almost every node in the dataset has either negative or positive curvature and the average curvature suggests that each task in the Euclidean space contains non-Euclidean geometry information, motivating the use of a mixed-curvature space. Visualizations of curvatures for other VRP tasks are provided in Figure 4, Appendix.1. Better viewed in color. + +# 2. Related Work + +# VRP Solvers + +Existing solvers for VRPs can be broadly classified into three categories: 1) Traditional Solvers: This category includes established methods such as Lin-Kernighan-Helsgaun (LKH) algorithm (Lin & Kernighan, 1973), Hybrid Genetic Search (HGS) (Vidal, 2022), and OR-Tools (Perron & Didier, 2024). These solvers leverage heuristic search algorithms and rely heavily on expert knowledge, which may limit their adaptabilities to new problem settings. 2) Neural Solvers: Building on early works like (Vinyals + +et al., 2015), these methods employ deep learning to iteratively construct solutions. The introduction of self-attention (Vaswani et al., 2017) to VRPs (Kool et al., 2019; Kwon et al., 2020) has significantly improved solution quality. Subsequent progress, such as (Kim et al., 2022; Zhou et al., 2023b), focuses on training with varied data to enhance generalization to unseen scenarios. Recent developments include scaling to larger problem instances (Luo et al., 2023; Pan et al., 2023; Ye et al., 2024; Cheng et al., 2023) and exploring non-autoregressive decoding (Sun & Yang, 2023). However, these methods often rely on additional heuristic searches for particularly challenging or large-scale instances, which may limit the efficiency. 3) Hybrid Solvers: These approaches combine the strength of neural approaches with traditional heuristics to overcome their own limitations. Examples include the adaptation of neural methods for candidate set generation (Xin et al., 2021), enhancing the flexibility and efficiency of classic architectures. Hybrid solvers like (Hottung & Tierney, 2020; Hottung et al., 2021; Xin et al., 2021; Chalumeau et al., 2023; Ma et al., 2024; Chen et al., 2024) have demonstrated considerable success. However, these methods often require task-specific training, which hinders their ability to generalize across different VRPs. + +Recent efforts (Liu et al., 2024; Zhou et al., 2024; Berto et al., 2024) have begun focusing on cross-task learning to address the generalization gaps observed in earlier approaches. For instance, (Liu et al., 2024) introduces attribute composition to handle a wide range of VRP variants, while (Zhou et al., 2024) employs a mixture-of-experts (MoE) framework to balance performance and computational efficiency. Our method diverges from these by leveraging mixed-curvature spaces to process input features, enabling more effective capture of intricate geometric structures and providing a generalizable solution across diverse VRP tasks. + +# Deep Learning in Non-Euclidean Space + +Unlike the Euclidean setting, which assumes data points lie in flat and homogeneous spaces, non-Euclidean geometry models the underlying space by curved Riemannian manifolds. The family of curved Riemannian manifolds can be broadly categorized into two types: hyperbolic surface (characterized by negative curvature) and hyperspherical surface (characterized by positive curvature). In details, hyperbolic geometry can be expressed through five isometric models, including Poincaré ball model (Nickel & Kiela, 2017; Ganea et al., 2018), Lorentz model(hyperboloid) (Chen et al., 2021; Bdeir et al., 2024; Nickel & Kiela, 2018), Poincaré half space model (Stahl, 1993), Klein model (Bi et al., 2015) and hemisphere model (Cannon et al., 1997). Thanks to their non-uniform distance metric, hyperbolic surfaces are particularly well-suited for extracting hierarchical and relational structures from data and this has led to their wide applications in vision (Khrulkov et al., 2020; Atigh et al., + +2022; Moreira et al., 2024), language (Dai et al., 2021; Fan et al., 2024; Qu et al., 2024), audio (Hong et al., 2023) and data mining (Chami et al., 2019; Liu et al., 2019; Sun et al., 2021; Choudhary et al., 2024). On the other hand, hyperspherical surfaces constrain data representations within a unit hypersphere. This property helps model achieve lower variances and better generalization abilities across a wide range of applications, including image classification (Liu et al., 2017b;a), adversarial attack (Pang et al., 2020) and generative modeling (Qiu et al., 2023). Other works like (Gu et al., 2018; Wang et al., 2021; Sun et al., 2022; Cho et al., 2023; Wang et al., 2024; Fu et al., 2025) have explored a mixed-curvature environment where models process features across spaces with varying curvatures, which leverages the strengths of both hyperbolic and hyperspherical geometries into learning process. In contrast to all these works, ours focuses on learning diverse data representations for variants of VRPs, aiming to enhance the cross-task generalization ability. + +# 3. Preliminaries + +We introduce essential definitions related to mixed-curvature spaces and key concepts in VRPs. For a broader overview of geometric deep learning, we refer interested readers to the surveys (Peng et al., 2021; Mettes et al., 2024). + +# 3.1. Basics of Riemannian Manifolds + +A Riemannian manifold $\mathcal{M}$ is a smooth structure equipped with a metric $g_{\mathbf{x}}$ . This metric is a smoothly varying positive-definite inner product defined on the tangent space $T_{\mathbf{x}}\mathcal{M}$ of point $\mathbf{x} \in \mathcal{M}$ . Such kind of structures generalize the concepts like distance and angle from Euclidean space to more complex geometric spaces. To navigate between the manifold and its tangent space more conveniently, the following two important mappings are often used: + +$$ +\operatorname {E x p} _ {\mathbf {x}} ^ {\kappa}: T _ {\mathbf {x}} \mathcal {M} \rightarrow \mathcal {M}, \quad \operatorname {L o g} _ {\mathbf {x}} ^ {\kappa}: \mathcal {M} \rightarrow T _ {\mathbf {x}} \mathcal {M}. \tag {1} +$$ + +The exponential map, denoted by $Exp_{\mathbf{x}}^{\kappa}$ , transfers vectors from tangent space $T_{\mathbf{x}}\mathcal{M}$ back to manifold $\mathcal{M}$ of curvature $\kappa$ . The logarithmic map, denoted by $Log_{\mathbf{x}}^{\kappa}$ , transfers vectors from manifold $\mathcal{M}$ of curvature $\kappa$ to tangent space $T_{\mathbf{x}}\mathcal{M}$ . Due to page limit, we put their mathematical expressions under hyperbolic and hyperspherical settings in Eqs. (17), (18), (19), (20), Appendix.1. + +# 3.2. Hyperbolic and Hyperspherical Spaces + +Our framework is built upon a mixed-curvature space that integrates properties of multiple geometric spaces. Below, we provide a brief overview of the two geometric spaces that are employed in this work: the hyperbolic spaces and hyperspherical spaces. + +![](images/7ad42fcceb37e0010260fca37bcbc1e9e82e3667b22e7cd6501802d147ceadd8.jpg) +Figure 2. The framework of the proposed module. We consider three geometric spaces with negative (hyperbolic), zero (Euclidean) and positive (hyperspherical) curvatures, respectively. For each feature transformation operation, we split original feature space into $C$ smaller subspaces, each with their own learnable curvatures $(\kappa_{1},\dots,\kappa_{C})$ . Operations like $Exp$ and $Log$ are frequently used to navigate vectors between manifold and tangent space. In the encoder layer, an extra Mix-up method is utilized to make information transmission smoother from shallow layer to deeper ones. + +Hyperbolic Spaces. In our work, we adopt the Poincaré ball for modeling hyperbolic geometric information as proposed in (Ganea et al., 2018). Hyperbolic space is characterized by a negative curvature $\kappa < 0$ and its domain is defined as: + +$$ +\mathbb {H} (\kappa) = \left\{\mathbf {x} \in \mathbb {R} ^ {d} | - \kappa \cdot \left| \left| \mathbf {x} \right| \right| _ {2} ^ {2} < 1 \right\}, \tag {2} +$$ + +where $||\mathbf{x}||_2$ is the regular $L_{2}$ distance. The associated conformal factor is given by $\lambda_{\mathbf{x}}(\cdot ,\cdot) = \frac{2}{1 + \kappa||\mathbf{x}||_2^2}$ . Distance and arithmetic operations are derived in (Ganea et al., 2018). For instance, the addition operation, denoted by $\oplus_{\kappa}$ takes the following form: + +$$ +\mathbf {x} \oplus_ {\kappa} \mathbf {y} = \frac {\left(1 - 2 \kappa \langle \mathbf {x} , \mathbf {y} \rangle - \kappa \| \mathbf {y} \| _ {2} ^ {2}\right) \mathbf {x} + \left(1 + \kappa \| \mathbf {x} \| _ {2} ^ {2}\right) \mathbf {y}}{1 - 2 \kappa \langle \mathbf {x} , \mathbf {y} \rangle + \kappa^ {2} \| \mathbf {x} \| _ {2} ^ {2} \| \mathbf {y} \| _ {2} ^ {2}}. \tag {3} +$$ + +Building on this, the distance between two points $\mathbf{x}$ and $\mathbf{y}$ in hyperbolic space can be calculated in the following format: + +$$ +d _ {\kappa} (\mathbf {x}, \mathbf {y}) = \left(\frac {2}{\sqrt {- \kappa}}\right) \tanh ^ {- 1} \left(\sqrt {- \kappa} \| - \mathbf {x} \oplus_ {\kappa} \mathbf {y} \| _ {2}\right). \tag {4} +$$ + +Hyperspherical Spaces. The hypersphere, also referred to as a spherical space, is characterized by a positive curvature $\kappa > 0$ : + +$$ +\mathbb {S} (\kappa) = \left\{\mathbf {x} \in \mathbb {R} ^ {d} | \kappa \cdot | | \mathbf {x} | | _ {2} ^ {2} = 1 \right\}, \tag {5} +$$ + +and the distance between two points $\mathbf{x}$ and $\mathbf{y}$ on the sphere is given as: + +$$ +d _ {\kappa} (\mathbf {x}, \mathbf {y}) = \frac {1}{\sqrt {\kappa}} \cos^ {- 1} (\kappa \cdot \langle x, y \rangle), \tag {6} +$$ + +where $\langle \cdot ,\cdot \rangle$ is the regular vector inner product. + +Remarks. In hyperbolic spaces, as $|\kappa|$ increases, the conformal factor $\lambda_{\mathbf{x}}$ decreases, leading to greater distances between points. This causes points on the manifold to spread out in a more noticeable way. Conversely, in hyperspherical spaces, increasing $|\kappa|$ results in shorter distances, drawing points closer together. As $|\kappa|$ approaches zero, both geometries degenerate into the standard Euclidean space. + +# 3.3. Product Manifold Spaces + +Product manifold space consists of multiple manifolds with different curvatures. It is defined by Cartesian product: + +$$ +\mathcal {M} = \mathcal {M} _ {1} \times \mathcal {M} _ {2} \times \dots \times \mathcal {M} _ {C}, \tag {7} +$$ + +which is equipped with curvature $\overline{\kappa} = (\kappa_1,\dots ,\kappa_C)$ . Each point in $\mathcal{M}$ has the form $\overline{\mathbf{x}} = (\mathbf{x}_1,\dots ,\mathbf{x}_C)$ . In this case, exponential map and logarithmic map take following forms: + +$$ +\begin{array}{l} E x p _ {\overline {{\mathbf {x}}}} ^ {\overline {{\kappa}}} (\cdot) = \left(E x p _ {\mathbf {x} _ {1}} ^ {\kappa_ {1}} (\cdot), \dots , E x p _ {\mathbf {x} _ {C}} ^ {\kappa_ {C}} (\cdot)\right), \tag {8} \\ \operatorname {L o g} _ {\overline {{\mathbf {x}}}} ^ {\overline {{\kappa}}} (\cdot) = \left(\operatorname {L o g} _ {\mathbf {x} _ {1}} ^ {\kappa_ {1}} (\cdot), \dots , \operatorname {L o g} _ {\mathbf {x} _ {C}} ^ {\kappa_ {C}} (\cdot)\right). \\ \end{array} +$$ + +# 3.4. Basics of VRPs + +The input of VRP instance (e.g. CVRP) is a fully connected, undirected graph $G = (V,E)$ , where $V = \{v_{0},\ldots ,v_{n}\}$ denotes the set of $n + 1$ nodes including the depot $v_{0}$ and $n$ customer nodes. The set $E = \{e_{ij},i,j = 0,\dots ,n\}$ denotes the set of edges and each edge has a cost $c_{ij}$ . Other inputs like capacity and time-window are concatenated with coordinates to formalize features of each node. Then, model starts to decode feasible solutions auto-regressively: + +$$ +p _ {\theta} (\tau | G) = \prod_ {t = 1} ^ {T} p _ {\theta} \left(a _ {t} \mid a _ {t - 1}, G\right), \tag {9} +$$ + +where $a_{t}, \tau$ and $\theta$ represent next step's action, generated trajectory and model parameters, respectively. During decoding, remaining capacity, elapsed time and traveled distance are recorded and treated as dynamical features. + +Remarks. Note that although some intermediate representations of our proposed module locate in non-Euclidean spaces, all of the problem instances from each considered task are grounded in Euclidean space, following the data generation process in (Zhou et al., 2024; Berto et al., 2024). + +# 4. Methodology + +In this section, we illustrate the mixed-curvature module using the architecture proposed in (Kwon et al., 2020; Liu et al., 2024) as an example. However, this module can be seamlessly integrated into other neural architectures, such as MVMoE(-L) (Zhou et al., 2024) and RouteFinder (Berto et al., 2024). As shown in Figure 2, our framework firstly embeds concatenated features of graphs by Euclidean embeddings and then projects these features from flat space into a mixed-curvature space by partitioning the original feature space into multiple geometric subspaces, each with a learnable curvature parameter. Furthermore, to mitigate the geometry mismatch phenomena at each encoder layer, we interpolate representations between current layer and previous layer. By doing this, we can enable model to acquire a soft and learnable alignment process among incompatible geometric spaces, facilitating a smoother information flow and ultimately enhancing the quality of learned representations. + +# 4.1. Mixed-Curvature Linear Transformation + +In the first stage, we split original feature space with dimension $D$ into $C$ subspaces so that each subspace is equipped with a learnable curvature parameter $\kappa$ and a smaller dimension $\frac{D}{C}$ . After conducting transformations in geometric spaces, these scattered features will be merged together to formalize a complete vector with original dimension $D$ . Similar to (Ganea et al., 2018; Gu et al., 2018; Cho et al., 2023), we rely on exponential map and logarithmic map defined in Eq. (8) to perform feature transformation operations. To be specific, suppose that our intermediate feature representations $\mathbf{X}$ now reside in mixed-curvature space and we aim to perform operations such as feature transformation $f = \mathbf{X}\mathbf{W}$ , then we have: + +$$ +\hat {\mathbf {X}} = \operatorname {E x p} _ {\mathbf {0}} ^ {\overline {{\kappa}} _ {2}} \left(\operatorname {L o g} _ {\mathbf {0}} ^ {\overline {{\kappa}} _ {1}} (\mathbf {X}) \mathbf {W}\right), \tag {10} +$$ + +where we choose the original point $\mathbf{0}$ to define the tangent space. Note that the tangent space is flat, so $\mathbf{W}$ actually resides in the Euclidean space, allowing us to train it with the standard optimizer like Adam. Also note that $\overline{\kappa}_{1}$ may not always equal to $\overline{\kappa}_{2}$ . By applying these different curvatures, our proposed module can capture diverse geometric structures in a layer-by-layer manner instead of being confined to subspaces with limited semantics. Activation functions and normalization modules can be similarly adapted, following the form of Eq. (10). + +# 4.2. Mixed-Curvature Augmented Embedding Layer + +In the original POMO-MTL architecture (Liu et al., 2024), the embedding layer consists of two parts: one for the depot node and the other for the customer nodes. However, this setup can lead to suboptimal embeddings that fail to capture the full range of geometric information in the inputs. To ad + +dress this issue, we first project the depot and customer node embeddings from Euclidean space into a mixed-curvature space (i.e., the embedding layer in Figure 2), and then apply two independent mixed-curvature layers following Eq. (10). This process yields two feature representations, $\hat{\mathbf{X}}_{dep}$ and $\hat{\mathbf{X}}_{cus}$ . We then concatenate them to form the final embedding: + +$$ +\mathbf {X} _ {e m b} = \left[ \operatorname {L o g} _ {\mathbf {0}} ^ {\kappa} \left(\hat {\mathbf {X}} _ {d e p}\right); \operatorname {L o g} _ {\mathbf {0}} ^ {\kappa} \left(\hat {\mathbf {X}} _ {c u s}\right) \right], \tag {11} +$$ + +where $[\cdot ]$ denotes the concatenation operation. + +# 4.3. Mixed-Curvature Augmented Encoder Layer + +In the prior experiments for our proposed architecture, we observe that naively propagating features from non-Euclidean subspaces (e.g., hyperbolic or hyperspherical) into attention blocks often leads to performance degradation. We suspect this phenomenon is attributed to the shift of the receptive field with respect to the network depth: In shallow layers, the model primarily captures localized structural information (so the connectivity resembles a sparse graph which is a tree-like structure), where curvature tends to be negative (Nickel & Kiela, 2017; 2018). However, as the depth increases, the receptive field expands and the model begins to aggregate global information thus entangling the features of all nodes. This leads the model into hyperspherical spaces where points in feature space become substantially interconnected. Such properties of neural networks introduce a form of curvature mismatch between consecutive layers, leading into inferior performances. Drawing inspiration from the Mix-up technique (Zhang et al., 2018), which stabilizes training by interpolating representations of different samples, we design a similar mixing strategy that interpolates features across layers before sending them into current layer's attention block. Specifically, we formalize the input to each attention block as a weighted sum of the original Euclidean representation and the logarithmic-mapped mixed-curvature features from the previous layer: + +$$ +\mathbf {X} ^ {k} = \alpha * \mathbf {X} ^ {k - 1} + \beta * \operatorname {L o g} _ {\mathbf {0}} ^ {\overline {{\kappa}}} \left(\hat {\mathbf {X}} ^ {k - 1}\right), \tag {12} +$$ + +where $\alpha, \beta$ are learnable parameters. In this way, model itself can gradually adjust to the evolving curvatures across layers. Unlike previous rigid transitions, this module encourages the model to retrieve previous layer's information in a dynamical manner, thereby improving the quality of representations. + +# 4.4. Loss + +Once decoder receives embeddings from previous established mixed-curvature encoder layers, the model starts to generate logits for each trajectory in the way of Eq. (9). Following (Kwon et al., 2020), we adopt the reinforce algorithm proposed in (Williams, 1992) for training. Specifically, + +
TypeModeln=50n=100TypeModeln=50n=100
ObjGapTimeObjGapTimeObjGapTimeObjGapTime
CVRPHGS10.3340.000%4.6m15.5040.000%9.1mVRPTWHGS14.5090.000%8.4m24.3390.000%19.6m
LKH310.3460.115%9.9m15.5900.556%18.0mLKH314.6070.664%5.5m24.7211.584%7.8m
OR-Tools10.5401.962%10.4m16.3815.652%20.8mOR-Tools14.9152.694%10.4m25.8946.297%20.8m
OR-Tools(×10)10.4180.788%1.7h15.9352.751%3.5hOR-Tools(×10)14.6651.011%1.7h25.2123.482%3.5h
POMO-MTL10.4370.987%3s15.7901.846%9sPOMO-MTL15.0323.637%3s25.6105.313%12s
Mixed-POMO-MTL10.4360.980%5s15.7711.731%14sMixed-POMO-MTL15.0213.556%4s25.5565.090%12s
MVMoE-L10.4340.955%4s15.7711.728%11sMVMoE-L15.0133.500%4s25.5194.927%14s
Mixed-MVMoE-L10.4310.933%6s15.7581.645%14sMixed-MVMoE-L15.0023.421%4s25.5064.872%15s
MVMoE10.4280.896%4s15.7601.653%12sMVMoE14.9993.410%4s25.5124.903%15s
Mixed-MVMoE10.4240.865%7s15.7511.599%16sMixed-MVMoE14.9953.373%4s25.4734.732%16s
OVRPLKH36.5110.198%4.5m9.8280.000%5.3mVRPLLKH310.5710.790%7.8m15.7710.000%16.0m
OR-Tools6.5310.495%10.4m10.0101.806%20.8mOR-Tools10.6771.746%10.4m16.4964.587%20.8m
OR-Tools(×10)6.4980.000%1.7h9.8420.122%3.5hOR-Tools(×10)10.4950.000%1.5h16.0041.444%3.5h
POMO-MTL6.6712.634%2s10.1693.458%9sPOMO-MTL10.5130.201%2s15.8460.479%10s
Mixed-POMO-MTL6.6702.637%3s10.1543.312%10sMixed-POMO-MTL10.5110.185%3s15.8270.362%11s
MVMoE-L6.6652.548%3s10.1453.214%11sMVMoE-L10.5060.131%3s15.8210.323%12s
Mixed-MVMoE-L6.6582.448%4s10.1363.133%12sMixed-MVMoE-L10.5020.098%3s15.8130.270%13s
MVMoE6.6552.402%3s10.1383.136%12sMVMoE10.5010.092%3s15.8120.261%14s
Mixed-MVMoE6.6512.336%4s10.1192.946%12sMixed-MVMoE10.4970.052%4s15.8060.227%14s
VRPBOR-Tools8.1270.989%10.4m12.1852.594%20.8mOVRPTWOR-Tools8.7370.592%10.4m14.6351.756%20.8m
OR-Tools(×10)8.0460.000%1.7h11.8780.000%3.5hOR-Tools(×10)8.6380.000%1.7h14.3800.000%3.5h
POMO-MTL8.1821.684%2s12.0721.674%8sPOMO-MTL8.9873.470%3s15.0084.411%12s
Mixed-POMO-MTL8.1791.645%2s12.0431.427%8sMixed-POMO-MTL8.9823.420%3s14.9483.996%12s
MVMoE-L8.1761.605%3s12.0361.368%10sMVMoE-L8.9743.322%4s14.9403.941%14s
Mixed-MVMoE-L8.1701.531%3s12.0251.265%10sMixed-MVMoE-L8.9643.219%4s14.9113.749%15s
MVMoE8.1701.540%3s12.0271.285%10sMVMoE8.9643.210%4s14.9273.852%15s
Mixed-MVMoE8.1641.456%3s12.0111.153%11sMixed-MVMoE8.9503.060%4s14.8883.579%16s
+ +Table 1. Performances on 6 seen tasks by following the setting of (Zhou et al., 2024). Each task is assigned with 1,000 unseen instances for testing. The best performances are annotated with bold and domains improved by our module are highlighted with underlines. + +based on Eq. (9), our objective function is defined as: + +$$ +\mathcal {L} = E _ {\tau \sim p _ {\theta} (\tau | G)} [ R (\tau) ], \tag {13} +$$ + +and during the optimization stage, the gradient of the objective function takes the following form: + +$$ +\nabla_ {\theta} \mathcal {L} = \frac {1}{N} \sum_ {i = 1} ^ {N} \left(R \left(\tau^ {i}\right) - b ^ {i} (G)\right) \nabla_ {\theta} \log p _ {\theta} \left(\tau^ {i} | G\right), \tag {14} +$$ + +where $R(\tau^i)$ denotes the reward (in our case, it is defined as the negative length) obtained from the $i$ -th generated trajectory $\tau^i$ , and $b^i(G)$ is the shared baseline introduced to reduce the variance in optimization stage. For other models such as MVMoE(-L) (Zhou et al., 2024), an additional objective may be added to balance the load among different expert modules. + +Remarks. As noted in (Cho et al., 2023), the linear transformation defined in Eq. (10) is differentiable with respect to curvature $\kappa$ . Hence, we can treat $\kappa$ as a learnable parameter and optimize it during training. + +# 5. Experiments + +In this section, we present our experimental findings to demonstrate the effectiveness of the proposed mixed-curvature pre-training paradigm in enabling a multi-task solver for vehicle routing problems (VRPs). Specifically, we evaluate our approach on 24 distinct VRP variants (or tasks) spanning 6 different constraint types. All experiments + +are conducted on a machine equipped with four NVIDIA RTX A6000 GPUs, each with 48 GB of memory. In the following, we first introduce the baselines used in our experiments, then describe the training and testing configurations. Finally, we report the experimental results along with detailed result analysis1. + +# Baselines + +The baselines used in our study fall into two categories: traditional heuristic solvers and neural solvers. Below, we provide specific details for each baseline: + +HGS (Vidal, 2022): A traditional solver based on genetic algorithm, designed to tackle different VRP variants. + +LKH3 (Helsgaun, 2017): A widely used heuristic algorithm for solving VRP variants. It employs a k-opt mechanism where, during the search stage, k edges are removed and reconnected to discover potentially better solutions. + +OR-Tools (Perron & Didier, 2024): A comprehensive solver developed by Google that supports various combinatorial optimization tasks, including VRPs. + +POMO-MTL (Liu et al., 2024): A multi-task extension of POMO (Kwon et al., 2020), which enables the model to address multiple VRPs simultaneously. + +MVMoE(-L) (Zhou et al., 2024): MVMoE incorporates + +
TypeModeln=50n=100TypeModeln=50n=100
ObjGapTimeObjGapTimeObjGapTimeObjGapTime
OVRPBOR-Tools5.7640.332%10.4m8.5221.852%20.8mOVRPLOR-Tools6.5220.480%10.4m9.9661.783%20.8m
OR-Tools(×10)5.7450.000%1.7h8.3650.000%3.5hOR-Tools(×10)6.4900.000%1.7h9.7900.000%3.5h
POMO-MTL6.1166.430%2s8.9797.335%8sPOMO-MTL6.6682.734%2s10.1263.441%10s
Mixed-POMO-MTL6.1126.348%3s9.0217.831%9sMixed-POMO-MTL6.6672.708%3s10.1163.350%11s
MVMoE-L6.1226.522%3s8.9727.243%10sMVMoE-L6.6592.597%3s10.1063.244%12s
Mixed-MVMoE-L6.1026.175%3s8.9516.997%11sMixed-MVMoE-L6.6532.497%4s10.0983.159%13s
MVMoE6.0925.999%3s8.9597.088%11sMVMoE6.6502.454%3s10.0973.148%13s
Mixed-MVMoE6.0845.871%4s8.9346.800%12sMixed-MVMoE6.6482.419%4s10.0792.971%14s
VRPLBOR-Tools8.1311.254%10.4m12.9052.586%20.8mVRPTWOR-Tools15.0531.857%10.4m26.2172.858%20.8m
OR-Tools(×10)8.0290.000%1.7h11.7900.000%3.5hOR-Tools(×10)14.7710.000%1.7h25.4960.000%3.5h
POMO-MTL8.1881.971%2s11.9981.793%9sPOMO-MTL16.0558.841%3s27.3197.413%11s
Mixed-POMO-MTL8.1821.905%3s11.9641.514%10sMixed-POMO-MTL16.0718.943%3s27.3277.457%12s
MVMoE-L8.1801.872%3s11.9601.473%10sMVMoE-L16.0418.745%3s27.2657.190%13s
Mixed-MVMoE-L8.1721.781%3s11.9491.378%12sMixed-MVMoE-L16.0398.715%4s27.2237.018%11s
MVMoE8.1721.776%3s11.9451.346%11sMVMoE16.0228.600%3s27.2367.078%14s
Mixed-MVMoE8.1681.729%4s11.9361.264%12sMixed-MVMoE16.0148.545%4s27.2086.967%15s
VRPLTWOR-Tools14.8151.432%10.4m25.8232.534%20.8mOVRPLBOR-Tools5.7710.549%10.4m8.5552.459%20.8m
OR-Tools(×10)14.5980.000%1.7h25.1950.000%3.5hOR-Tools(×10)5.7390.000%1.7h8.3480.000%3.5h
POMO-MTL14.9612.586%3s25.6191.920%13sPOMO-MTL6.1046.306%2s8.9617.343%9s
Mixed-POMO-MTL14.9662.621%3s25.5611.673%14sMixed-POMO-MTL6.1026.282%3s9.0097.919%10s
MVMoE-L14.9532.535%4s25.5291.545%16sMVMoE-L6.1046.310%3s8.9577.300%11s
Mixed-MVMoE-L14.9412.448%4s25.5211.515%17sMixed-MVMoE-L6.0906.077%3s8.9357.027%11s
MVMoE14.9372.421%4s25.5141.471%17sMVMoE6.0765.843%3s8.9427.115%12s
Mixed-MVMoE14.9312.387%4s25.4861.365%18sMixed-MVMoE6.0685.705%4s8.9206.857%12s
OVRPTWOR-Tools8.7580.927%10.4m14.7132.268%20.8mOVRPLTWOR-Tools8.7280.656%10.4m14.5351.779%20.8m
OR-Tools(×10)8.6750.000%1.7h14.3840.000%3.5hOR-Tools(×10)8.6690.000%1.7h14.2790.000%3.5h
POMO-MTL9.5149.628%3s15.87910.453%10sPOMO-MTL8.9873.633%3s14.8964.374%12s
Mixed-POMO-MTL9.5239.734%3s15.84410.192%11sMixed-POMO-MTL8.9843.600%3s14.8454.020%12s
MVMoE-L9.5159.630%3s15.84110.188%12sMVMoE-L8.9743.488%4s14.8393.971%14s
Mixed-MVMoE-L9.5069.530%4s15.8029.899%13sMixed-MVMoE-L8.9613.335%4s14.8163.816%15s
MVMoE9.4869.308%4s15.8089.948%13sMVMoE8.9663.396%4s14.8283.903%15s
Mixed-MVMoE9.4839.283%4s15.7799.749%14sMixed-MVMoE8.9513.225%4s14.7793.560%16s
OVRPTWOR-Tools14.8901.402%10.4m25.9792.518%20.8mOVRPLTWOR-Tools8.7290.624%10.4m14.4961.724%20.8m
OR-Tools(×10)14.6670.000%1.7h25.3420.000%3.5hOR-Tools(×10)8.6730.000%1.7h14.2500.000%3.5h
POMO-MTL15.9809.035%3s27.2477.746%12sPOMO-MTL9.5329.851%3s15.73810.498%11s
Mixed-POMO-MTL15.9989.139%3s27.2197.658%13sMixed-POMO-MTL9.5419.946%3s15.72010.358%13s
MVMoE-L15.9638.915%4s27.1777.473%14sMVMoE-L9.5189.682%4s15.70610.263%13s
Mixed-MVMoE-L15.9618.871%4s27.1297.278%15sMixed-MVMoE-L9.5099.582%4s15.67310.027%14s
MVMoE15.9458.775%4s27.1427.332%15sMVMoE9.5039.516%4s15.67110.009%14s
Mixed-MVMoE15.9328.690%4s27.1367.304%16sMixed-MVMoE9.4989.462%4s15.6369.772%16s
+ +Table 2. Performances on 10 unseen tasks following the setting of (Zhou et al., 2024). Each task is assigned with 1,000 instances for testing. The best performances are annotated with bold and domains improved by our module are highlighted with underlines. + +mixture-of-expert (MoE) modules into both encoder and decoder layers, differing from the original POMO-MTL architecture. In the meanwhile, MVMoE-L is a lightweight variant of MVMoE that accelerates the routing mechanism while maintaining computational efficiency. + +RF-X (Berto et al., 2024): RouteFinder (or its variant) offers a more fine-grained feature fusion approach that further enhances performances of POMO-MTL, and MVMoE(-L). + +# Training Configurations + +Due to the significant differences in experimental settings between (Zhou et al., 2024) and (Berto et al., 2024), we divide our experiments into two parts. The first part strictly follows the training configurations outlined in (Zhou et al., 2024), and the analysis of these results is presented in Section 5.1. The second part follows the experimental setup from (Berto et al., 2024), with the corresponding analysis provided in Section 5.2. + +Configurations with (Zhou et al., 2024). We have two prob + +lem scales: 50 and 100 nodes in each instance. As mentioned earlier, our pre-training paradigm can be seamlessly integrated into any existing architectures, so we take POMMTL (Liu et al., 2024), and MVMoE(-L) (Zhou et al., 2024) as our backbones. We adopt Adam as our optimizer. The learning rate, weight decay and batch size are set to 1e-4 and 1e-6 and 128, respectively. We train each model with 5,000 epochs and for each epoch there are 20,000 instances During the last 500 epochs, we decay the learning rate by 10 At the very beginning, we initialize all of the curvatures as 0 and jointly optimize them with other parameters. Note that only 6 VRP variants are used for training. Further details about hyper-parameters are listed in Table 12, Appendix.2. + +Configurations with (Berto et al., 2024). The problem scales consist of 50 and 100 as well. We take RF-X (Berto et al., 2024) as the backbone, and follow the settings in its original paper, where each model is only trained with 300 epochs and each epoch is assigned with 100,000 training instances. Note that different from (Zhou et al., 2024), in this case, 16 VRP tasks are all used for training RF-X. Besides, the + +learning rate, weight decay and batch size are set to 3e-4, 1e-6 and 256, respectively. In epoch 270 and 295, we decay the learning rate by 10. The detailed experimental configurations of RF-X can be found in Table 17, Appendix.4. + +# Validation Configurations + +We conduct four types of validation experiments: the indistribution testing, zero-shot testing, few-shot testing, and real-world testing. We divide these evaluations into two sets of configurations corresponding to (Zhou et al., 2024) and (Berto et al., 2024). + +Configurations with (Zhou et al., 2024). For each VRP task, we pre-collect 1,000 unseen instances and report gaps relative to the optimal (or best) known solutions. Following (Kwon et al., 2020; Zhou et al., 2024), we apply greedy rollout with $8 \times$ instance augmentation for fair comparisons, where best solutions for each instance are obtained by solving multiple $(8 \times)$ equivalent instances. Those equivalent instances are acquired by rotating or clipping the original instances (Kwon et al., 2020). The in-distribution test comprises 6 VRP tasks included during training, while the zero-shot test includes 10 tasks not seen during training. For few-shot testing, we choose VRPBLTW and OVRPBLTW to assess model performance in low-data scenarios. Lastly, we follow (Zhou et al., 2024) for real-world evaluations on set-X (Uchoa et al., 2017) for CVRP and set-Solomon (Solomon, 1987) for VRPTW. + +Configurations with (Berto et al., 2024). In this setting, each task is again assigned 1,000 unseen instances, with the gaps to the optimal (or best) solutions reported. 16 VRP tasks are designated as the seen ones in the in-distribution test, while 8 tasks are the unseen ones in few-shot evaluations. For real-world testing, we follow (Berto et al., 2024) and use sets A, B, E, F, M, P, and X from CVRPLib (Uchoa et al., 2017) to assess the model performance under more practical conditions. + +Distortion Rate and Curvature Analysis. Apart from the above validations, we also analyze the distortion rates and visualize the learned curvatures. Due to space limits, we move them to Appendix.1. + +# 5.1. Results Compared with (Zhou et al., 2024) + +In-distribution Test on Seen Tasks. To evaluate performance on tasks seen during training, we begin by testing the models on 6 such tasks. The results, presented in Table 1, indicate that the original MVMoE augmented with the mixed-curvature module outperforms all prior baselines. Furthermore, the mixed-curvature module improves POMO-MTL and MVMoE-L performance on 5 out of 6 tasks and 6 out of 6 tasks, respectively, emphasizing the general benefits of incorporating geometric subspaces at the pre-training + +stage. Notably, in the more challenging scenario where $N = 100$ , MVMoE-L with the mixed-curvature module outperforms the original MVMoE across all 6 tasks, demonstrating strong versatility across different problem sizes. + +Zero-shot Test on Unseen Tasks. To further assess the zero-shot predictive capabilities of our approach, we evaluate each model on 10 tasks that were not included in training. The results, shown in Table 2, reveal that MVMoE with the mixed-curvature module achieves state-of-the-art performance on all 10 tasks at both node number scales. This outcome underscores the effectiveness of our module in enabling solvers to generalize to previously unseen scenarios. + +Few-Shot Test. Following the experimental setup of (Zhou et al., 2024), we examine two previously unseen tasks, OVRPBLTW and VRPBLTW, to gauge each model's performance in a few-shot context. Specifically, we fine-tune each model for 10 epochs, with each epoch drawing on 10,000 randomly sampled training instances. As illustrated in Figure 3, Mixed-MVMoE and Mixed-MVMoE-L outperform the baseline models, demonstrating that the incorporation of mixed-curvature spaces can enhance performance in low-resource settings as well. + +![](images/69114318621b10ea381de7aefce89dd8bc44e6939f1351f696281aec11626093.jpg) +Figure 3. The few-shot performance on two unseen tasks following settings of (Zhou et al., 2024). The x and y axis represent epochs and gaps, respectively. Here each problem instance has 50 nodes. + +![](images/44fbaa1d12aad40fa6f13b9c0a0c5e1530748f81be84ec15cfed9eea8665a385.jpg) + +Real-World Instances Test. We also evaluate the models on real-world testing instances sourced from CVRPLib, categorized broadly into moderate-scale and large-scale settings. Table 13, Table 14 and Table 15, Appendix.3 show that models incorporating our mixed-curvature module outperform both the single-task model (POMO) and multi-task models (POMO-MTL and MVMoE). The results indicate not only a reduction in the performance gap on moderate-scale problems but also a consistent narrowing of the gap on large-scale instances, showing our mixed-curvature module enables the original model to adapt effectively to real-world scenarios. + +# 5.2. Results Compared with (Berto et al., 2024) + +In RouteFinder (Berto et al., 2024), all of the 16 tasks from (Zhou et al., 2024) are used for training, and the results are shown in Table 18. From these presented outcomes, it is evident that RF-TE combined with the mixed-curvature + +module achieves the lowest performance gaps on 16 of the 16 tasks on both node sizes. Besides, augmented with mixed-curvature modules, backbones like MTPOMO, MVMoE and RF-MVMoE get consistent improvements on their performances. We also evaluate its performance on 7 real-world benchmarks from CVRPLib, where RF-TE equipped with the mixed-curvature module further reduces the average gaps (as shown in Table 19). Moreover, we assess its capabilities on 8 few-shot tasks. As illustrated in Table 20, the mixed-curvature-based model trained with EAL (shorted for Efficient Adapter Layer in (Berto et al., 2024)) significantly surpasses the performance of the original model tuned with EAL. Furthermore, when trained from scratch, the mixed-curvature-based model outperforms the original model with EAL on 6 of the 8 tasks, demonstrating the effectiveness of the mixed-curvature module in enhancing existing multi-task VRP solvers. + +# 5.3. More Ablation Studies and Discussions + +Effects of Increased Parameters. Since we insert several mixed-curvature modules into the embedder and encoder layer, the total number of parameters is increased and we list the number of parameters of each model in Table 9. Compared to previous baselines, the increased ratio is between $3.57\%$ and $10.56\%$ . Moreover, from results presented in Table 7, we can observe that only increasing the number of parameters will downgrade performances in most cases. In specifics, we replace the mixed-curvature space modules in encoder with their Euclidean counterparts so that the number of parameters is still in the same level as before (we name these models as Euc-POMO-MTL, Euc-MVMoE-L and Euc-MVMoE). For the Euc-POMO-MTL, it achieves the worst performances on 13 out of 16 and 11 out of 16 tasks with node size of 50 and 100, respectively. For the Euc-MVMoE, it achieves worst performances on 12 out of 16 tasks under both of the node size settings. These evidences demonstrate that naively increasing the number of parameters will often lead into inferior results in most cases, which indicates that the improvements on performances largely benefit from the introduction of mixed-curvature spaces. + +Effects of Mix-up Modules. In this part, we discuss the effectiveness of Mix-up modules and how will it affect the performances of model. We utilize Mixed-POMO-MTL, Mixed-MVMoE(-L) to conduct ablation experiments. From results presented in Table 8, we can observe that after removing the Mix-up modules from the encoder, the performances for Mixed-POMO-MTL will become worse on 12 out of 16 tasks with node size $N = 50$ and 11 out of 16 tasks with node size $N = 100$ , respectively. Similarly, the Mixed-MVMoE without Mix-Up modules will lose their SOTA performances on 11-12 tasks across problem types and node sizes. These demonstrate that the Mix-up modules can further enhance performances, which validates this mod + +ule's utility and necessity in smoothing transitions between different curvature spaces. + +Effects of the Number of Subspaces. In our experiment, we set the number of subspaces in mixed-curvature space as 8 and each subspace is assigned with 16 feature dimensions. To further investigate the effects of the number of subspaces on model's performances, we also try 4 and 16 in Mixed-POMO-MTL to illustrate the difference. We show results on both node scales in Table 10. From the presented results for $N = 50$ , we can find that the Mixed-POMO-MTL-8 can achieve the best averaged performances on 16 tasks, while the Mixed-POMO-MTL-4 and Mixed-POMO-MTL-16 achieve relatively inferior performances. We guess the reason is that although POMO-MTL-Mixed-4 acquires larger subspaces, its diversity is severely limited by the number of subspaces compared to the other two. In the meanwhile, Mixed-POMO-MTL-16 enhances its diversity but the feature dimension maybe too small to capture important geometric information from the inputs. However, when problem size becomes larger, Mixed-POMO-MTL-16 can surpass Mixed-POMO-MTL-4 by a large margin and greatly shorten the gap with respect to Mixed-POMO-MTL-4. + +Discussions of Running Time. Since several mixed-curvature modules are inserted into the embedder and encoder, the running time will be increased. As reflected in Table 1 and Table 2, the model requires more time to process instances on almost every VRPs task. Taking $N = 100$ as an example, Mixed-POMO-MTL, Mixed-MVMoE-L and Mixed-MVMoE introduce $10.72\%$ , $7.68\%$ , $7.56\%$ extra time costs to their own backbones, respectively. These show that although mixed-curvature modules bring extra computational burdens, the added costs are moderate. + +# Conclusions + +In this work, we present a novel pre-training paradigm that processes features in curved geometric spaces for solving multi-task VRPs. By splitting the original feature space into multiple subspaces, each with its own learnable curvature, we enable the model to capture diverse geometric structures from inputs. Extensive experiments show that our mixed-curvature modules consistently enhance various backbone architectures, highlighting the promise of mixed-curvature spaces in improving multi-task VRP solvers. However, our approach has limitations. First, the frequent use of exponential and logarithmic map operations introduces extra time costs and may cause some unstable numerical phenomena. Second, our study does not consider large-scale instances with around 10,000 nodes which has achieved great attention recently. Thirdly, we allocate 16 dimensions for each curvature subspace but other adaptive methods like neuralarchitecture-search (Elsken et al., 2019) may also be feasible. We plan to explore and address them in future works. + +# Impact Statement + +This paper presents work whose goal is to advance the field of deep learning for vehicle routing problems. To our best knowledge, there is no potential societal consequence of our work since the module developed in our work focuses on facilitating the constrained optimizations. + +# Acknowledgment + +This research/project is supported by the National Research Foundation, Singapore under its AI Singapore Programme (AISG Award No: AISG3-RP-2022-031), the MTI under its AI Centre of Excellence for Manufacturing (AIMfg) (Award W25MCMF014), and the College of Computing and Data Science, Nanyang Technological University. We also want to express our sincere thanks to all reviewers and area chair for their constructive engagement and valuable suggestions during the rebuttal stage. + +# References + +Atigh, M. G., Schoep, J., Acar, E., Van Noord, N., and Mettes, P. Hyperbolic image segmentation. In Proceedings of the 35th IEEE/CVF conference on Computer Vision and Pattern Recognition (CVPR), pp. 4453-4462, 2022. +Bachmann, G., Bécigneul, G., and Ganea, O. Constant curvature graph convolutional networks. In Proceedings of the 37th International Conference on Machine Learning (ICML), pp. 486-496, 2020. +Bdeir, A., Schwethelm, K., and Landwehr, N. Fully hyperbolic convolutional neural networks for computer vision. In Proceedings of the 12th International Conference on Learning Representations (ICLR), 2024. +Berto, F., Hua, C., Zepeda, N. G., Hottung, A., Wouda, N., Lan, L., Tierney, K., and Park, J. Routefinder: Towards foundation models for vehicle routing problems. In ICML 2024 Workshop on Foundation Models in the Wild, 2024. +Bi, Y., Fan, B., and Wu, F. Beyond mahalanobis metric: Cayley-klein metric learning. In Proceedings of the 28th IEEE conference on Computer Vision and Pattern Recognition (CVPR), pp. 2339-2347, 2015. +Cannon, J. W., Floyd, W. J., Kenyon, R., Parry, W. R., et al. Hyperbolic geometry. Flavors of geometry, 31(59-115): 2, 1997. +Cao, Y., Li, D., Sun, H., Assadi, A. H., and Zhang, S. Efficient weingarten map and curvature estimation on manifolds. Machine Learning, 110(6):1319-1344, 2021. + +Chalumeau, F., Surana, S., Bonnet, C., Grinsztajn, N., Pretorius, A., Laterre, A., and Barrett, T. Combinatorial optimization with policy adaptation using latent space search. Proceedings of the 37th Advances in Neural Information Processing Systems (NeurIPS), 2023. +Chami, I., Ying, Z., Ré, C., and Leskovec, J. Hyperbolic graph convolutional neural networks. Proceedings of the 34th Advances in Neural Information Processing Systems (NeurIPS), 2019. +Chen, J., Wang, J., Zhang, Z., Cao, Z., Ye, T., and Chen, S. Efficient meta neural heuristic for multi-objective combinatorial optimization. Proceedings of the 38th Advances in Neural Information Processing Systems (NeurIPS), 2024. +Chen, W., Han, X., Lin, Y., Zhao, H., Liu, Z., Li, P., Sun, M., and Zhou, J. Fully hyperbolic neural networks. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL), pp. 5672-5686, 2021. +Cheng, H., Zheng, H., Cong, Y., Jiang, W., and Pu, S. Select and optimize: Learning to solve large-scale tsp instances. In Proceedings of the 26th International Conference on Artificial Intelligence and Statistics (AISTATS), pp. 1219-1231, 2023. +Cho, S., Cho, S., Park, S., Lee, H., Lee, H., and Lee, M. Curve your attention: Mixed-curvature transformers for graph representation learning. arXiv preprint arXiv:2309.04082, 2023. +Choudhary, N., Rao, N., and Reddy, C. Hyperbolic graph neural networks at scale: a meta learning approach. Proceedings of the 38th Advances in Neural Information Processing Systems (NeurIPS), 2024. +Chow, B. and Knopf, D. The Ricci Flow: An Introduction: An Introduction, volume 1. American Mathematical Soc., 2004. +Dai, S., Gan, Z., Cheng, Y., Tao, C., Carin, L., and Liu, J. Apo-vae: Text generation in hyperbolic space. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), pp. 416-431, 2021. +Dantzig, G. B. and Ramser, J. H. The truck dispatching problem. Management science, 6(1):80-91, 1959. +Desai, K., Nickel, M., Rajpurohit, T., Johnson, J., and Vedantam, S. R. Hyperbolic image-text representations. In Proceedings of the 40th International Conference on Machine Learning (ICML), pp. 7694-7731, 2023. + +Elsken, T., Metzen, J. H., and Hutter, F. Neural architecture search: A survey. Journal of Machine Learning Research, 20(55):1-21, 2019. +Fan, X., Xu, M., Chen, H., Chen, Y., Das, M., and Yang, H. Enhancing hyperbolic knowledge graph embeddings via lorentz transformations. In Findings of the Association for Computational Linguistics ACL (ACL), pp. 4575-4589, 2024. +Fu, X., Wang, J., Gao, Y., Sun, Q., Yuan, H., Li, J., and Li, X. Discrete curvature graph information bottleneck. In Proceedings of the 39th AAAI Conference on Artificial Intelligence (AAAI), volume 39, pp. 16666-16673, 2025. +Ganea, O., Bécigneul, G., and Hofmann, T. Hyperbolic neural networks. Proceedings of the 32th Advances in Neural Information Processing Systems (NeurIPS), 2018. +Ge, Y., Li, H., and Tuzhilin, A. Route recommendations for intelligent transportation services. IEEE Transactions on Knowledge and Data Engineering, 33(3):1169-1182, 2019. +Goh, Y. L., Cao, Z., Ma, Y., Dong, Y., Dupty, M. H., and Lee, W. S. Hierarchical neural constructive solver for real-world tsp scenarios. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 884-895, 2024. +Gu, A., Sala, F., Gunel, B., and Ré, C. Learning mixed-curvature representations in product spaces. In Proceedings of the 6th International Conference on Learning Representations (ICLR), 2018. +Helsgaun, K. An extension of the lin-kernighan-helsgaun tsp solver for constrained traveling salesman and vehicle routing problems. Roskilde: Roskilde University, 12: 966-980, 2017. +Hong, J., Hayden, Z., Han, J., Fang, P., Harandi, M., and Petersson, L. Hyperbolic audio-visual zero-shot learning. In Proceedings of the 19th IEEE/CVF International Conference on Computer Vision (ICCV), pp. 7873-7883, 2023. +Hottung, A. and Tierney, K. Neural large neighborhood search for the capacitated vehicle routing problem. In Proceedings of the 25th European Conference on Artificial Intelligence, volume 313, pp. 443-450. IOS Press, 2020. +Hottung, A., Kwon, Y.-D., and Tierney, K. Efficient active search for combinatorial optimization problems. In Proceedings of the 9th International Conference on Learning Representations (ICLR), 2021. + +Huang, Z., Zhou, J., Cao, Z., and Xu, Y. Rethinking light decoder-based solvers for vehicle routing problems. In International Conference on Learning Representations, 2025. +Joshi, C. K., Laurent, T., and Bresson, X. An efficient graph convolutional network technique for the travelling salesman problem. arXiv preprint arXiv:1906.01227, 2019. +Khrulkov, V., Mirvakhabova, L., Ustinova, E., Oseledets, I., and Lempitsky, V. Hyperbolic image embeddings. In Proceedings of the 33th IEEE/CVF conference on Computer Vision and Pattern Recognition (CVPR), pp. 6418-6428, 2020. +Kim, M., Park, J., and Park, J. Sym-nco: Leveraging symmetry for neural combinatorial optimization. Proceedings of the 36th Advances in Neural Information Processing Systems (NeurIPS), 2022. +Kool, W., van Hoof, H., and Welling, M. Attention, learn to solve routing problems! In Proceedings of the 7th International Conference on Learning Representations (ICLR), 2019. +Kwon, Y.-D., Choo, J., Kim, B., Yoon, I., Gwon, Y., and Min, S. Pomo: Policy optimization with multiple optima for reinforcement learning. Proceedings of the 34th Advances in Neural Information Processing Systems (NeurIPS), 2020. +Langley, P. Crafting papers on machine learning. In Langley, P. (ed.), Proceedings of the 17th International Conference on Machine Learning (ICML 2000), pp. 1207-1216, Stanford, CA, 2000. Morgan Kaufmann. +Lee, J. M. Riemannian manifolds: an introduction to curvature, volume 176. Springer Science & Business Media, 2006. +Lin, S. and Kernighan, B. W. An effective heuristic algorithm for the traveling-salesman problem. Operations research, 21(2):498-516, 1973. +Liu, F., Lin, X., Wang, Z., Zhang, Q., Xialiang, T., and Yuan, M. Multi-task learning for routing problem with cross-problem zero-shot generalization. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (SIGKDD), pp. 1898-1908, 2024. +Liu, Q., Nickel, M., and Kiela, D. Hyperbolic graph neural networks. Proceedings of the 34th Advances in Neural Information Processing Systems (NeurIPS), 2019. + +Liu, W., Wen, Y., Yu, Z., Li, M., Raj, B., and Song, L. Spherface: Deep hypersphere embedding for face recognition. In Proceedings of the 30th IEEE conference on Computer Vision and Pattern Recognition (CVPR), pp. 212-220, 2017a. +Liu, W., Zhang, Y.-M., Li, X., Yu, Z., Dai, B., Zhao, T., and Song, L. Deep hyperspherical learning. Proceedings of the 31th Advances in Neural Information Processing Systems (NeurIPS), 2017b. +Luo, F., Lin, X., Liu, F., Zhang, Q., and Wang, Z. Neural combinatorial optimization with heavy decoder: Toward large scale generalization. Proceedings of the 37th Advances in Neural Information Processing Systems (NeurIPS), 2023. +Ma, Y., Cao, Z., and Chee, Y. M. Learning to search feasible and infeasible regions of routing problems with flexible neural k-opt. Proceedings of the 38th Advances in Neural Information Processing Systems (NeurIPS), 2024. +Mettes, P., Ghadimi Atigh, M., Keller-Ressel, M., Gu, J., and Yeung, S. Hyperbolic deep learning in computer vision: A survey. International Journal of Computer Vision, pp. 1-25, 2024. +Min, H. The multiple vehicle routing problem with simultaneous delivery and pick-up points. Transportation Research Part A: General, 23(5):377-386, 1989. +Moreira, G., Marques, M., Costeira, J. P., and Hauptmann, A. Hyperbolic vs euclidean embeddings in few-shot learning: Two sides of the same coin. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pp. 2082-2090, 2024. +Najman, L. and Romon, P. Modern approaches to discrete curvature, volume 2184. Springer, 2017. +Nickel, M. and Kiela, D. Poincaré embeddings for learning hierarchical representations. Proceedings of the 31th Advances in Neural Information Processing Systems (NeurIPS), 2017. +Nickel, M. and Kiela, D. Learning continuous hierarchies in the lorentz model of hyperbolic geometry. In Proceedings of the 35th International conference on machine learning (ICML), pp. 3779-3788, 2018. +Ollivier, Y. Ricci curvature of markov chains on metric spaces. Journal of Functional Analysis, 256(3):810-864, 2009. +Pan, X., Jin, Y., Ding, Y., Feng, M., Zhao, L., Song, L., and Bian, J. H-tsp: Hierarchically solving the largescale traveling salesman problem. In Proceedings of the 37th AAAI Conference on Artificial Intelligence (AAAI), volume 37, pp. 9345-9353, 2023. + +Pang, T., Yang, X., Dong, Y., Xu, K., Zhu, J., and Su, H. Boosting adversarial training with hypersphere embeddings. Proceedings of the 34th Advances in Neural Information Processing Systems (NeurIPS), 2020. +Peng, W., Varanka, T., Mostafa, A., Shi, H., and Zhao, G. Hyperbolic deep neural networks: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44 (12):10023-10044, 2021. +Perron, L. and Didier, F. Cp-sat, 2024. URL https://developers.google.com/optimization/cp/cpSolver/. +Postnikov, M. M. Geometry VI: Riemannian Geometry, volume 91. Springer Science & Business Media, 2013. +Qiu, Z., Liu, W., Feng, H., Xue, Y., Feng, Y., Liu, Z., Zhang, D., Weller, A., and Scholkopf, B. Controlling text-to-image diffusion by orthogonal finetuning. Proceedings of the 37th Advances in Neural Information Processing Systems (NeurIPS), 2023. +Qu, H., Cai, Y., and Liu, J. Llms are good action recognizers. In Proceedings of the 37th IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 18395-18406, 2024. +Sala, F., De Sa, C., Gu, A., and Ré, C. Representation tradeoffs for hyperbolic embeddings. In Proceedings of the 35th International Conference on Machine Learning (ICML), pp. 4460-4469, 2018. +Solomon, M. M. Algorithms for the vehicle routing and scheduling problems with time window constraints. Operations research, 35(2):254-265, 1987. +Stahl, S. The Poincaré half-plane: A gateway to modern geometry. Jones and Bartlett, 1993. ISBN 9780763753818. +Sun, L., Zhang, Z., Zhang, J., Wang, F., Peng, H., Su, S., and Philip, S. Y. Hyperbolic variational graph neural network for modeling dynamic graphs. In Proceedings of the 35th AAAI Conference on Artificial Intelligence (AAAI), volume 35, pp. 4375-4383, 2021. +Sun, L., Zhang, Z., Ye, J., Peng, H., Zhang, J., Su, S., and Philip, S. Y. A self-supervised mixed-curvature graph neural network. In Proceedings of the 36th AAAI Conference on Artificial Intelligence (AAAI), volume 36, pp. 4146-4155, 2022. +Sun, Z. and Yang, Y. Difusco: Graph-based diffusion solvers for combinatorial optimization. Proceedings of the 37th Advances in Neural Information Processing Systems (NeurIPS), 2023. + +Uchoa, E., Pecin, D., Pessoa, A., Poggi, M., Vidal, T., and Subramanian, A. New benchmark instances for the capacitated vehicle routing problem. European Journal of Operational Research, 257(3):845-858, 2017. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. Proceedings of the 31th Advances in Neural Information Processing Systems (NeurIPS), 2017. +Vidal, T. Hybrid genetic search for the cvrp: Open-source implementation and swap* neighborhood. Computers & Operations Research, 140:105643, 2022. +Vinyals, O., Fortunato, M., and Jaitly, N. Pointer networks. Proceedings of the 29th Advances in Neural Information Processing Systems (NeurIPS), 2015. +Wang, S., Wei, X., Nogueira dos Santos, C. N., Wang, Z., Nallapati, R., Arnold, A., Xiang, B., Yu, P. S., and Cruz, I. F. Mixed-curvature multi-relational graph neural network for knowledge graph completion. In Proceedings of the Web Conference (WWW), pp. 1761-1771, 2021. +Wang, Y., Zhang, S., Ye, J., Peng, H., and Sun, L. A mixed-curvature graph diffusion model. In Proceedings of the 33th ACM International Conference on Information and Knowledge Management (CIKM), pp. 2482-2492, 2024. +Williams, R. J. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8:229-256, 1992. +Wouda, N. A., Lan, L., and Kool, W. PyVRP: a high-performance VRP solver package. INFORMS Journal on Computing, 36(4):943-955, 2024. doi: 10.1287/ijoc.2023.0055. URL https://doi.org/10.1287/ijoc.2023.0055. +Xin, L., Song, W., Cao, Z., and Zhang, J. Neurolkh: Combining deep learning model with lin-kernighan-helsgaun heuristic for solving the traveling salesman problem. Proceedings of the 35th Advances in Neural Information Processing Systems (NeurIPS), 2021. +Ye, H., Wang, J., Liang, H., Cao, Z., Li, Y., and Li, F. Glop: Learning global partition and local construction for solving large-scale routing problems in real-time. In Proceedings of the 38th AAAI Conference on Artificial Intelligence (AAAI), volume 38, pp. 20284-20292, 2024. +Zhang, H., Cisse, M., Dauphin, Y. N., and Lopez-Paz, D. mixup: Beyond empirical risk minimization. In Proceedings of the 6th International Conference on Learning Representations (ICLR), 2018. +Zhang, N., Yang, J., Cao, Z., and Chi, X. Adversarial generative flow network for solving vehicle routing problems. + +In International Conference on Learning Representations, 2025. +Zhou, J., Wu, Y., Cao, Z., Song, W., Zhang, J., and Chen, Z. Learning large neighborhood search for vehicle routing in airport ground handling. IEEE Transactions on Knowledge and Data Engineering, 35(9):9769-9782, 2023a. +Zhou, J., Wu, Y., Song, W., Cao, Z., and Zhang, J. Towards omni-generalizable neural methods for vehicle routing problems. In Proceedings of the 40th International Conference on Machine Learning (ICML), pp. 42769-42789, 2023b. +Zhou, J., Cao, Z., Wu, Y., Song, W., Ma, Y., Zhang, J., and Xu, C. Mvmoe: Multi-task vehicle routing solver with mixture-of-experts. In Proceedings of the 41th International Conference on Machine Learning (ICML), pp. 61804-61824, 2024. + +# A. Appendix + +# Appendix.1. Definitions, Formulas and Visualizations + +# Definition of Ollivier-Ricci Curvatures + +Curvature describes how much a curve deviates from being a straight line or how much a surface bends in the space. The Ollivier-Ricci curvature (Ollivier, 2009) is a discrete notion of curvature that extends Ricci curvature from smooth (thus continuous) Riemannian manifolds to structures like graphs and networks (Fu et al., 2025). To be specific, suppose that we are given a metric space denoted by $(X,d)$ where $d$ represents metric distance (in our case $X$ consists of two dimensions (coordinates) and $d$ is the L2 distance between two points), then the Ollivier-Ricci curvature has the following form: + +$$ +\kappa (x, y) = 1 - \frac {W \left(\mu_ {x} , \mu_ {y}\right)}{d (x , y)}, \quad x, y \in X \tag {15} +$$ + +where $W(\cdot, \cdot)$ denotes Wasserstein distance between two probability measures: + +$$ +\mu_ {x} (z) = \frac {c _ {x z}}{\sum_ {i = 1} ^ {N _ {x}} c _ {x i}}, \quad \mu_ {y} (z) = \frac {c _ {y z}}{\sum_ {i = 1} ^ {N _ {y}} c _ {y i}} \tag {16} +$$ + +where $c_{xz}, c_{yz}$ are edge weights on edges $xz, yz$ and $N_x, N_y$ are numbers of adjacent neighbors of $x, y$ , respectively. Based on these quantities, $\mu_x$ and $\mu_y$ actually measure the transition probability of the random walk starts from $x, y$ and ends at some point $z$ . In other words, the smaller (bigger) the $W(\mu_x, \mu_y)$ , the higher (lower) the chances that $x$ and $y$ will encounter each other within a few steps, which shares great similarity with the contraction (divergence) behaviors in spherical (hyperbolic) spaces. In our implementation, for each node $x \in X$ , we use K-Nearest Neighbors algorithm to sample 5 nodes from each node's neighbour set and calculate the node curvature by averaging Ollivier-Ricci curvatures on the selected 5 edges. Finally, we can get the graph curvature by averaging all of these nodes' curvatures. + +Remarks. Note that although we only take 5 edges for each node in the stage of curvature calculations, the embedder takes the complete graph as the input. The reason for us to choose KNN graphs to analyze curvatures is that during the delivery, not all of the edges are worth of being considered: some maybe less important and some maybe blocked due to hard constraints (e.g., the same edge can't be visited twice during the delivery). As a result of this, applying KNN graphs here is more faithful to actual scenarios. Similar operations also appear in some prior works for solving traveling salesman problem (Joshi et al., 2019). + +In previous works such as (Gu et al., 2018; Bachmann et al., 2020), the Parallelogram Law has been utilized to analyze the deviations of datasets from Euclidean geometry. This classical geometry identity checks whether quadruple of points behaves flat in the normal Euclidean sense: If the sum of the squares of the diagonals is greater (less) than the sum of the squares of the sides in a parallelogram then it indicates that data points are located in negative (positive) curvature spaces. The reasons for us to choose Ollivier-Ricci curvature mainly lie in two sides: 1) Enumerating all of the four point configurations from a graph with $N = 50$ nodes is computationally expensive while Ollivier-Ricci curvature offers a more light-weight method. 2) Ollivier-Ricci curvature enables a more nuanced understanding of geometric structures in datasets under optimal transport: it captures the degree to which local neighborhoods contract or diverge and this makes it especially well-suited for datasets represented as graphs or networks. For a more comprehensive comparison between these different curvature concepts, please refer to Table 4. + +# Hyperbolic Model $(\kappa < 0)$ + +Let $\mathbf{x},\mathbf{y}$ be a point on the manifold $\mathbb{H}(\kappa)$ , $\mathbf{v}\in T_{\mathbf{x}}\mathbb{H}(\kappa)$ a tangent space vector and $\lambda_{\mathbf{x}} = \frac{2}{1 + \kappa||\mathbf{x}||_2^2}$ . $\oplus_{\kappa}$ is defined in Eq. (3). + +Exponential Map: + +$$ +E x p _ {\mathbf {x}} ^ {\kappa} (\mathbf {v}) = \mathbf {x} \oplus_ {\kappa} \left(\tanh \left(\sqrt {- \kappa} \frac {\lambda_ {\mathbf {x}} | \mathbf {v} |}{2}\right) \frac {\mathbf {v}}{| \mathbf {v} |}\right) \tag {17} +$$ + +Logarithmic Map: + +$$ +\operatorname {L o g} _ {\mathbf {x}} ^ {\kappa} (\mathbf {y}) = \frac {2}{\lambda_ {\mathbf {x}} \sqrt {- \kappa}} \tanh ^ {- 1} \left(\sqrt {- \kappa} | \mathbf {x} \oplus_ {\kappa} (- \mathbf {y}) |\right) \cdot \frac {\mathbf {x} \oplus_ {\kappa} (- \mathbf {y})}{| \mathbf {x} \oplus_ {\kappa} (- \mathbf {y}) |} \tag {18} +$$ + +# Hyperspherical Model $(\kappa >0)$ + +Let $\mathbf{x},\mathbf{y}$ be a point on the manifold $\mathbb{S}(\kappa)$ , and $\mathbf{v}\in T_{\mathbf{x}}\mathbb{S}(\kappa)$ a tangent space vector. $d_{\kappa}(\mathbf{x},\mathbf{y})$ is defined in Eq. (6). + +# Exponential Map: + +$$ +E x p _ {\mathbf {x}} ^ {\kappa} (\mathbf {v}) = \cos (\sqrt {\kappa} | \mathbf {v} |) \cdot \mathbf {x} + \sin (\sqrt {\kappa} | \mathbf {v} |) \cdot \frac {\mathbf {v}}{| \mathbf {v} |} \tag {19} +$$ + +# Logarithmic Map: + +$$ +\operatorname {L o g} _ {\mathbf {x}} ^ {\kappa} (\mathbf {y}) = d _ {\kappa} (\mathbf {x}, \mathbf {y}) \cdot \frac {\mathbf {y} - \cos \left(d _ {\kappa} (\mathbf {x} , \mathbf {y})\right) \cdot \mathbf {x}}{\left| \mathbf {y} - \cos \left(d _ {\kappa} (\mathbf {x} , \mathbf {y})\right) \cdot \mathbf {x} \right|} \tag {20} +$$ + +# Curvature Visualizations for another 10 VRPs Tasks + +The visualizations of curvatures for remaining datasets are included in Figure 4. Note that these 10 tasks are unseen during training stage, following the settings of (Zhou et al., 2024) while in (Berto et al., 2024), all of the previously mentioned 16 VRP variants are used for training the neural solvers. From Figure 4, we can observe that non-Euclidean information exists widely across these tasks, which further validates the necessity of introducing mixed-curvature space into neural solvers. + +# Definition of Distortion Rate and Average Distortion Rate + +We adopt the notations from (Gu et al., 2018) where $U_{1}$ and $U_{2}$ denote two metric spaces (possibly with different dimensions) and they are equipped with distances $d_{U_1}(\cdot ,\cdot)$ and $d_{U_2}(\cdot ,\cdot)$ , respectively. A mapping denoted by $f:U_{1}\to U_{2}$ typically exists between these two spaces, such as deep neural networks. For any pair of points $a$ and $b$ , the distortion rate induced from mapping $f$ is defined as: + +$$ +\left| \frac {d _ {U _ {1}} (f (a) , f (b))}{d _ {U _ {2}} (a , b)} - 1 \right|. \tag {21} +$$ + +To evaluate the distortion rate globally, we consider all pairs of points and compute the average distortion as: + +$$ +D _ {a v g} = \frac {1}{N} \sum_ {a \neq b} \left| \frac {d _ {U _ {1}} (f (a) , f (b))}{d _ {U _ {2}} (a , b)} - 1 \right|, \tag {22} +$$ + +where $N$ denotes the number of node pairs such that $a \neq b$ without repetitions. By using Eq. (21) and (22), we can know how far away distances in the feature space learned by neural solvers deviate from those distances in the original input graphs. The lower the average distortion rate, the better the quality of representations we get from those models. + +# Distortion Rate Analysis for Features of Encoder Module + +As previously mentioned, learning solely in Euclidean space can significantly distort distance information, adversely affecting the model's decision-making process and the final performances. In Table 3, we compare the distortion rates (defined in Eq. (22)) across various models. From the presented results, our approach achieves considerably lower distortion rates than the baselines, indicating that mixed-curvature space preserves original distances more faithfully. This allows the model to retain more accurate distance-related information, thus enhancing its decision-making capability. + +
ModelDistortion
POMO-MTL2477.725
Mixed-POMO-MTL1678.605
MVMoE-L2923.151
Mixed-MVMoE-L1981.076
MVMoE2083.015
Mixed-MVMoE1274.142
+ +Table 3. Distortion rates of different models. We extract intermediate representations the final layer of encoder module and we use 1,000 CVRP instances with size $N = 50$ from testing datasets to calculate the distortion rate (defined in Eq. (22)). + +# Curvature Analysis for Subspaces of Each Layer in Encoder module + +For the model families in (Zhou et al., 2024), we visualize the curvature of each subspace in every encoder layer of Mixed-POMO-MTL (Figure 6, Appendix.3), MVMoE-L (Figures 7, Appendix.3), and MVMoE (Figures 8, Appendix.3). The distinct color gradients reveal that subspaces in shallower layers tend to lie in hyperbolic geometry. This observation aligns with the intuition that shallow layers primarily capture local structures, which often resemble trees or sparse graphs structures that naturally associated with negative curvatures. In contrast, as we move to deeper layers, the subspaces gradually transition towards the spherical geometry, reflecting the tendency of deeper layers to encode global information, where node features become increasingly aggregated or even collapsed with each other. For RF-X (Berto et al., 2024), we also visualize the curvature of subspaces in the model RF-MVMoE (Figure 9, Appendix.4) and RF-TE (Figure 10, Appendix.4), where we can observe similar curvature evolving patterns across layers. + +
Curvature TypeDefinitionFormula
Riemann Curvature Tensor (Lee, 2006)Measures the failure of second covariant derivatives to commute with each other, encoding the intrinsic curvature of a Riemannian manifold.R(u,v)w = ∇u∇v w - ∇v∇u w - ∇[u,v]w
Ricci Curvature (Chow & Knopf, 2004)Trace of the Riemann curvature tensor, denoting the average sectional curvature along different directions.Ric(u) = ∑iR(u,eiei)
Gaussian Curvature (Postnikov, 2013)Product of the principal curvatures at a point on a surface, encoding the intrinsic measure of curvature.K = k1·k2
Mean Curvature (Postnikov, 2013)Average of the principal curvatures.H = 1/2(k1+k2)
Principal Curvatures (Postnikov, 2013)Maximum and minimum normal curvatures at a point on a surface.Eigenvalues k1, k2 of Weingarten map (Cao et al., 2021)
Sectional Curvature (Lee, 2006)It measures how the manifold curves in the direction of a tangent space. It generalizes Gaussian curvature into higher dimensions.K(u,v) = ⟨R(u,v)v,u⟩/||u∧v||2
Ollivier-Ricci Curvature (Ollivier, 2009)Measures the difference between two metric measure spaces based on optimal transport, especially suitable for discrete structures like graphs and networks.κ(x,y) = 1 - W(μx,μy)/d(x,y)
Parallelogram Law (Gu et al., 2018)Whether the sum of the squares of the diagonals equals the sum of the squares of the sides in a parallelogram.||x+y||2 + ||x-y||2 = 2||x||2 + 2||y||2
+ +Table 4. Different types of curvatures and their expressions in differential/Riemannian geometry. One major difference between Ollivier-Ricci curvature and Ricci/Gaussian/Mean/Principle curvatures is that Ollivier-Ricci curvature can handle discrete structures like graphs and networks while the others require the underlining manifold is continuous and smooth. Apart from Ollivier-Ricci curvature, there have been some other recent efforts that adapt curvatures on continuous spaces into discrete structures. For more information about this, we refer interested readers to (Najman & Romon, 2017). + +
AcronymMeaning
POMOPolicy Optimization with Multiple Optima for Reinforcement Learning (Kwon et al., 2020)
POMO-MTLPolicy Optimization with Multiple Optima for Reinforcement Learning with Multi-Task-Learning (Liu et al., 2024)
MVMoE-LMulti-Task Vehicle Routing Solver with Mixture-of-Experts-Light (Zhou et al., 2024)
MVMoEMulti-Task Vehicle Routing Solver with Mixture-of-Experts (Zhou et al., 2024)
RFRouteFinder (Berto et al., 2024)
LKHLin-Kernighan-Helsgaun (Lin & Kernighan, 1973; Helsgaun, 2017)
HGSHybrid Genetic Search (Vidal, 2022)
HGS-PyVRPA Python implementation of HGS for VRPs (Wouda et al., 2024)
VRP(s)Vehicle Routing Problem(s)
CCapacity
OOpen Route
LDuration Limits
BBackhauls
TWTime Window
Mixed-XThe model named X augmented with Mixed-Curvature space modules
Euc-XThe model named X augmented with Euclidean space modules
+ +Table 5. List of acronyms that appear in the paper. + +
NotationsMeaning
x,y,vFinite dimensional vectors
MRiemannian manifold
g_xRiemannian metric
λ_xConformal factor of hyperbolic space
κCurvature
κ̄Consists of (κ1,κ2,...,κn), each entry corresponds to the curvature of a geometric space
Consists of (x1,x2,...,xn) each entry corresponds to a chunk of feature located in a geometric space
H(κ)Hyperbolic space with curvature κ
S(κ)Hyperspherical space with curvature κ
TxM,TxH(κ), TxS(κ)Tangent space attached with x on Riemannian manifold, Hyperbolic space, Hyperspherical space
⊕κAddition operation of hyperbolic space
dκ(·,·)Geodesic distance on hyperbolic/hyperspherical space
{·,·}Inner product in vector space
pθ(·)Generative model with parameter θ
G=(V,E)Graph with vertex set V and edge set E
atAction taken in time step t
τTrajectory taken by the model
TNumber of time steps
DThe dimension of original feature space
CThe number of mixed-curvature subspaces
U1,U2Metric spaces
Expχ(·)Exponential map attached with point x on the Riemannian manifold with curvature κ
Logχ(·)Logarithmic map attached with point x on the Riemannian manifold with curvature κ
α,βLearnable factors for balancing geometric information between layers
+ +Table 6. List of notations that appear in the paper. + +
TypeModeln=50 Gapn=100 GapTypeModeln=50 Gapn=100 Gap
CVRPPOMO-MTL0.987%1.846%VRPTWPOMO-MTL3.637%5.313%
Mixed-POMO-MTL0.980%1.731%Mixed-POMO-MTL3.556%5.090%
Euc-POMO-MTL1.033%1.815%Euc-POMO-MTL3.719%5.305%
MVMoE-L0.955%1.728%MVMoE-L3.500%4.927%
Mixed-MVMoE-L0.933%1.645%Mixed-MVMoE-L3.421%4.872%
Euc-MVMoE-L0.965%1.743%Euc-MVMoE-L3.508%4.995%
MVMoE0.896%1.653%MVMoE3.410%4.903%
Mixed-MVMoE0.865%1.599%Mixed-MVMoE3.373%4.732%
Euc-MVMoE0.900%1.672%Euc-MVMoE3.414%4.892%
OVRPPOMO-MTL1.684%1.674%VRPLPOMO-MTL3.470%4.411%
Mixed-POMO-MTL1.645%1.427%Mixed-POMO-MTL3.420%3.996%
Euc-POMO-MTL1.713%1.569%Euc-POMO-MTL3.577%4.401%
MVMoE-L1.605%1.368%MVMoE-L3.322%3.941%
Mixed-MVMoE-L1.531%1.265%Mixed-MVMoE-L3.219%3.749%
Euc-MVMoE-L1.602%1.427%Euc-MVMoE-L3.366%3.992%
MVMoE1.540%1.285%MVMoE3.210%3.852%
Mixed-MVMoE1.456%1.153%Mixed-MVMoE3.060%3.579%
Euc-MVMoE1.535%1.304%Euc-MVMoE3.202%3.708%
VRPBPOMO-MTL2.634%3.458%OVRTWPOMO-MTL0.201%0.479%
Mixed-POMO-MTL2.637%3.312%Mixed-POMO-MTL0.185%0.362%
Euc-POMO-MTL2.656%3.479%Euc-POMO-MTL0.242%0.472%
MVMoE-L2.548%3.214%MVMoE-L0.131%0.323%
Mixed-MVMoE-L2.448%3.133%Mixed-MVMoE-L0.098%0.270%
Euc-MVMoE-L2.532%3.410%Euc-MVMoE-L0.365%0.096%
MVMoE2.402%3.136%MVMoE0.092%0.261%
Mixed-MVMoE2.336%2.946%Mixed-MVMoE0.052%0.227%
Euc-MVMoE2.410%3.157%Euc-MVMoE0.096%0.277%
OVRPBPOMO-MTL6.430%7.335%OVRLPOMO-MTL2.734%3.441%
Mixed-POMO-MTL6.348%7.831%Mixed-POMO-MTL2.708%3.350%
Euc-POMO-MTL6.378%7.971%Euc-POMO-MTL2.762%3.453%
MVMoE-L7.243%7.243%MVMoE-L2.597%3.244%
Mixed-MVMoE-L6.175%6.997%Mixed-MVMoE-L2.497%3.159%
Euc-MVMoE-L6.525%7.580%Euc-MVMoE-L2.606%3.120%
MVMoE5.999%7.088%MVMoE2.454%3.148%
Mixed-MVMoE5.871%6.800%Mixed-MVMoE2.419%2.971%
Euc-MVMoE5.994%6.909%Euc-MVMoE2.459%3.141%
VRBLPOMO-MTL1.971%1.793%VRBTWPOMO-MTL8.841%7.413%
Mixed-POMO-MTL1.905%1.514%Mixed-POMO-MTL8.934%7.457%
Euc-POMO-MTL1.969%1.693%Euc-POMO-MTL9.188%7.414%
MVMoE-L1.872%1.473%MVMoE-L8.745%7.190%
Mixed-MVMoE-L1.781%1.378%Mixed-MVMoE-L8.715%7.018%
Euc-MVMoE-L1.886%1.516%Euc-MVMoE-L8.803%7.183%
MVMoE1.776%1.346%MVMoE8.600%4.903%
Mixed-MVMoE1.729%1.264%Mixed-MVMoE8.545%4.732%
Euc-MVMoE1.779%1.405%Euc-MVMoE8.665%7.113%
VRPLTWPOMO-MTL2.586%1.920%OVBLPOMO-MTL6.306%7.343%
Mixed-POMO-MTL2.621%1.673%Mixed-POMO-MTL6.282%7.919%
Euc-POMO-MTL2.720%1.926%Euc-POMO-MTL6.305%8.015%
MVMoE-L2.535%1.545%MVMoE-L6.310%7.300%
Mixed-MVMoE-L2.448%1.515%Mixed-MVMoE-L6.077%7.027%
Euc-MVMoE-L2.530%1.618%Euc-MVMoE-L6.311%7.560%
MVMoE2.421%1.471%MVMoE5.843%7.115%
Mixed-MVMoE2.387%1.365%Mixed-MVMoE5.705%6.857%
+ +Continued on the next page + +A Mixed-Curvature based Pre-training Paradigm for Multi-Task Vehicle Routing Solver + +
TypeModeln=50 Gapn=100 GapTypeModeln=50 Gapn=100 Gap
Euc-MVMoE2.418%1.492%Euc-MVMoE5.831%7.047%
OVRPTWPOMO-MTL9.628%10.453%OVRPLTWPOMO-MTL3.633%4.374%
Mixed-POMO-MTL9.734%10.192%Mixed-POMO-MTL3.600%4.020%
Euc-POMO-MTL9.785%10.666%Euc-POMO-MTL3.710%4.375%
MVMoE-L9.630%10.188%MVMoE-L3.488%3.396%
Mixed-MVMoE-L9.530%9.899%Mixed-MVMoE-L3.335%3.816%
Euc-MVMoE-L9.592%10.163%Euc-MVMoE-L3.529%4.063%
MVMoE9.308%9.948%MVMoE3.396%3.903%
Mixed-MVMoE9.283%9.749%Mixed-MVMoE3.225%3.560%
Euc-MVMoE9.443%9.968%Euc-MVMoE3.386%3.915%
VRBLTWPOMO-MTL9.035%7.746%OVRPLTWPOMO-MTL9.851%10.498%
Mixed-POMO-MTL9.139%7.658%Mixed-POMO-MTL9.946%10.358%
Euc-POMO-MTL9.286%7.761%Euc-POMO-MTL9.967%10.670%
MVMoE-L8.915%7.473%MVMoE-L9.682%10.263%
Mixed-MVMoE-L8.871%7.278%Mixed-MVMoE-L9.582%10.027%
Euc-MVMoE-L8.996%7.537%Euc-MVMoE-L9.754%10.247%
MVMoE8.775%7.332%MVMoE9.516%10.009%
Mixed-MVMoE8.690%7.304%Mixed-MVMoE9.462%9.772%
Euc-MVMoE8.875%7.422%Euc-MVMoE9.636%10.045%
+ +Table 7: Ablation studies on whether the improvements on performances stem from the increased number of parameters or the design of mixed-curvature geometric spaces. The training configurations are consistent with (Zhou et al., 2024). Comparisons are conducted on MVMoE with 16 VRP variants (6 in-distribution and 10 out-of-distribution tasks) in which case each task contains 1,000 instances. Bold indicates best and underline indicates the second-best result. Euc-X represents the model that replaces the mixed-curvature modules with their Euclidean counterparts so that numbers of total parameters for these models are in the same level. + +
TypeModeln=50 Gapn=100 GapTypeModeln=50 Gapn=100 Gap
CVRPPOMO-MTL0.987%1.846%VRPTWPOMO-MTL3.637%5.313%
Mixed-POMO-MTL0.980%1.731%Mixed-POMO-MTL3.556%5.090%
Mixed-POMO-MTL (w.o. Mix-up)1.057%1.807%Mixed-POMO-MTL (w.o. Mix-up)3.647%5.156%
MVMoE-L0.955%1.728%MVMoE-L3.500%4.927%
Mixed-MVMoE-L0.933%1.645%Mixed-MVMoE-L3.421%4.872%
Mixed-MVMoE-L (w.o. Mix-up)0.984%1.731%Mixed-MVMoE-L (w.o. Mix-up)3.516%5.018%
MVMoE0.896%1.653%MVMoE3.410%4.903%
Mixed-MVMoE0.865%1.599%Mixed-MVMoE3.373%4.732%
Mixed-MVMoE (w.o. Mix-up)0.890%1.674%Mixed-MVMoE (w.o. Mix-up)3.256%4.897%
OVRPPOMO-MTL2.634%3.458%VRPLPOMO-MTL0.201%0.479%
Mixed-POMO-MTL2.637%3.312%Mixed-POMO-MTL0.185%0.362%
Mixed-POMO-MTL (w.o. Mix-up)2.607%3.373%Mixed-POMO-MTL (w.o. Mix-up)0.205%0.420%
MVMoE-L2.548%3.214%MVMoE-L0.131%0.323%
Mixed-MVMoE-L2.448%3.133%Mixed-MVMoE-L0.098%0.270%
Mixed-MVMoE-L (w.o. Mix-up)2.608%3.197%Mixed-MVMoE-L (w.o. Mix-up)0.150%0.350%
MVMoE2.402%3.136%MVMoE0.092%0.261%
Mixed-MVMoE2.336%2.946%Mixed-MVMoE0.052%0.227%
Mixed-MVMoE (w.o. Mix-up)2.421%3.129%Mixed-MVMoE (w.o. Mix-up)0.086%0.294%
VRPBPOMO-MTL1.684%1.674%OVRPTWPOMO-MTL3.470%4.411%
Mixed-POMO-MTL1.645%1.427%Mixed-POMO-MTL3.420%3.996%
Mixed-POMO-MTL (w.o. Mix-up)1.682%1.517%Mixed-POMO-MTL (w.o. Mix-up)3.599%4.136%
MVMoE-L1.605%1.368%MVMoE-L3.322%3.941%
Mixed-MVMoE-L1.531%1.265%Mixed-MVMoE-L3.219%3.749%
Mixed-MVMoE-L (w.o. Mix-up)1.591%1.418%Mixed-MVMoE-L (w.o. Mix-up)3.431%4.001%
MVMoE1.540%1.285%MVMoE3.210%3.852%
Mixed-MVMoE1.456%1.153%Mixed-MVMoE3.060%3.579%
Mixed-MVMoE (w.o. Mix-up)1.540%1.307%Mixed-MVMoE (w.o. Mix-up)3.256%3.939%
OVRPBPOMO-MTL6.430%7.335%OVRPLPOMO-MTL2.734%3.441%
Mixed-POMO-MTL6.348%7.831%Mixed-POMO-MTL2.708%3.350%
Mixed-POMO-MTL (w.o. Mix-up)6.298%7.414%Mixed-POMO-MTL (w.o. Mix-up)2.830%3.332%
MVMoE-L7.243%7.243%MVMoE-L2.597%3.244%
Mixed-MVMoE-L6.175%6.997%Mixed-MVMoE-L2.497%3.159%
Mixed-MVMoE-L (w.o. Mix-up)6.241%7.094%Mixed-MVMoE-L (w.o. Mix-up)2.668%3.173%
MVMoE5.999%7.088%MVMoE2.454%3.148%
Mixed-MVMoE5.871%6.800%Mixed-MVMoE2.419%2.971%
Mixed-MVMoE (w.o. Mix-up)5.760%6.782%Mixed-MVMoE (w.o. Mix-up)2.505%3.152%
VRBLPOMO-MTL1.971%1.793%VRPTWPOMO-MTL8.841%7.413%
Mixed-POMO-MTL1.905%1.514%Mixed-POMO-MTL8.934%7.457%
Mixed-POMO-MTL (w.o. Mix-up)1.987%1.639%Mixed-POMO-MTL (w.o. Mix-up)8.900%7.383%
MVMoE-L1.872%1.473%MVMoE-L8.745%7.190%
Mixed-MVMoE-L1.781%1.378%Mixed-MVMoE-L8.715%7.018%
Mixed-MVMoE-L (w.o. Mix-up)1.860%1.531%Mixed-MVMoE-L (w.o. Mix-up)8.790%7.169%
MVMoE1.776%1.346%MVMoE8.600%4.903%
Mixed-MVMoE1.729%1.264%Mixed-MVMoE8.545%4.732%
Mixed-MVMoE (w.o. Mix-up)1.773%1.430%Mixed-MVMoE (w.o. Mix-up)8.649%7.041%
VRLTWPOMO-MTL2.586%1.920%OVRPLPOMO-MTL6.306%7.343%
Mixed-POMO-MTL2.621%1.673%Mixed-POMO-MTL6.282%7.919%
Mixed-POMO-MTL (w.o. Mix-up)2.670%1.805%Mixed-POMO-MTL (w.o. Mix-up)6.111%7.460%
MVMoE-L2.535%1.545%MVMoE-L6.310%7.300%
Mixed-MVMoE-L2.448%1.515%Mixed-MVMoE-L6.077%7.027%
Mixed-MVMoE-L (w.o. Mix-up)2.533%1.601%Mixed-MVMoE-L (w.o. Mix-up)6.198%7.109%
MVMoE2.421%1.471%MVMoE5.843%7.115%
Mixed-MVMoE2.387%1.365%Mixed-MVMoE5.705%6.857%
+ +Continued on the next page + +A Mixed-Curvature based Pre-training Paradigm for Multi-Task Vehicle Routing Solver + +
TypeModeln=50 Gapn=100 GapTypeModeln=50 Gapn=100 Gap
Mixed-MVMoE (w.o. Mix-up)2.478%1.523%Mixed-MVMoE (w.o. Mix-up)5.705%6.809%
OVRPTWPOMO-MTL9.628%10.453%POMO-MTL3.633%4.374%
Mixed-POMO-MTL9.734%10.192%Mixed-POMO-MTL3.600%4.020%
Mixed-POMO-MTL (w.o. Mix-up)9.818%10.251%Mixed-POMO-MTL (w.o. Mix-up)3.765%4.124%
MVMoE-L9.630%10.188%MVMoE-L3.488%3.396%
Mixed-MVMoE-L9.530%9.899%Mixed-MVMoE-L3.335%3.816%
Mixed-MVMoE-L (w.o. Mix-up)9.639%10.032%Mixed-MVMoE-L (w.o. Mix-up)3.546%4.037%
MVMoE9.308%9.948%MVMoE3.396%3.903%
Mixed-MVMoE9.283%9.749%Mixed-MVMoE3.225%3.560%
Mixed-MVMoE (w.o. Mix-up)9.441%10.096%Mixed-MVMoE (w.o. Mix-up)3.434%3.932%
VRPTLWPOMO-MTL9.035%7.746%POMO-MTL9.851%10.498%
Mixed-POMO-MTL9.139%7.658%Mixed-POMO-MTL9.946%10.358%
Mixed-POMO-MTL (w.o. Mix-up)9.102%7.699%Mixed-POMO-MTL (w.o. Mix-up)9.940%10.323%
MVMoE-L8.915%7.473%MVMoE-L9.682%10.263%
Mixed-MVMoE-L8.871%7.278%Mixed-MVMoE-L9.582%10.027%
Mixed-MVMoE-L (w.o. Mix-up)9.013%7.410%Mixed-MVMoE-L (w.o. Mix-up)9.764%10.135%
MVMoE8.775%7.332%MVMoE9.516%10.009%
Mixed-MVMoE8.690%7.304%Mixed-MVMoE9.462%9.772%
Mixed-MVMoE (w.o. Mix-up)8.881%7.351%Mixed-MVMoE (w.o. Mix-up)9.579%10.201%
+ +Table 8: Ablation studies on whether the Mix-up module brings improvements on performances. The training configurations are consistent with (Zhou et al., 2024). Comparisons are conducted on MVMoE with 16 VRP variants (6 in-distribution and 10 out-of-distribution tasks) in which case each task contains 1,000 instances. Bold indicates best and underline indicates the second-best result. + +
ModelParameters
POMO-MTL1,254,656
Mixed-POMO-MTL1,386,810
MVMoE-Light3,698,944
Mixed-MVMoE-Light3,831,116
MVMoE3,682,176
Mixed-MVMoE3,814,348
+ +Table 9. Comparisons for the number of parameters in each baseline model and their mixed-curvature space counterparts. Our comparisons are based on the models mentioned in (Zhou et al., 2024). For the embedder, we insert two mixed-curvature modules for processing features from depot and customer nodes, respectively. For each layer of encoder, we insert one mixed-curvature module for processing features from the previous layer. In specifics, the ratio of increased parameters is between $3.57\%$ and $10.56\%$ compared to baselines. + +
TypeModeln=50 Gapn=100 GapTypeModeln=50 Gapn=100 Gap
CVRPMixed-POMO-MTL-41.011%1.840%VRPTWMixed-POMO-MTL-43.583%5.205%
Mixed-POMO-MTL-80.980%1.731%Mixed-POMO-MTL-83.556%5.090%
Mixed-POMO-MTL-161.009%1.808%Mixed-POMO-MTL-163.570%5.250%
OVRPMixed-POMO-MTL-42.645%3.465%VRPLMixed-POMO-MTL-40.193%0.450%
Mixed-POMO-MTL-82.637%3.312%Mixed-POMO-MTL-80.185%0.362%
Mixed-POMO-MTL-162.592%3.367%Mixed-POMO-MTL-160.187%0.456%
VRPBMixed-POMO-MTL-41.678%1.585%OVRPTWMixed-POMO-MTL-43.423%4.361%
Mixed-POMO-MTL-81.645%1.427%Mixed-POMO-MTL-83.420%3.996%
Mixed-POMO-MTL-161.655%1.564%Mixed-POMO-MTL-163.475%4.234%
OVRPBMixed-POMO-MTL-46.279%7.470%OVRPLMixed-POMO-MTL-42.737%2.692%
Mixed-POMO-MTL-86.348%7.831%Mixed-POMO-MTL-82.708%3.350%
Mixed-POMO-MTL-166.290%7.328%Mixed-POMO-MTL-163.356%3.349%
VRPBLMixed-POMO-MTL-41.947%1.729%VRPBTWMixed-POMO-MTL-48.820%7.548%
Mixed-POMO-MTL-81.905%1.514%Mixed-POMO-MTL-88.934%7.457%
Mixed-POMO-MTL-161.956%1.696%Mixed-POMO-MTL-168.847%7.402%
VRPLTWMixed-POMO-MTL-42.520%1.830%OVRPBLMixed-POMO-MTL-46.151%7.444%
Mixed-POMO-MTL-82.621%1.673%Mixed-POMO-MTL-86.282%7.919%
Mixed-POMO-MTL-162.585%1.891%Mixed-POMO-MTL-166.160%7.376%
OVRPBTWMixed-POMO-MTL-49.788%10.470%OVRPLTWMixed-POMO-MTL-43.630%4.382%
Mixed-POMO-MTL-89.734%10.192%Mixed-POMO-MTL-83.600%4.020%
Mixed-POMO-MTL-169.698%10.415%Mixed-POMO-MTL-163.573%4.270%
VRPBLTWMixed-POMO-MTL-49.022%7.731%OVRPBLTWMixed-POMO-MTL-49.836%10.583%
Mixed-POMO-MTL-89.139%7.658%Mixed-POMO-MTL-89.946%10.358%
Mixed-POMO-MTL-169.112%7.733%Mixed-POMO-MTL-169.868%10.488%
+ +Table 10. Ablation studies on the number of subspaces in mixed-curvature modules. The training configurations are consistent with (Zhou et al., 2024). Comparisons are conducted on POMO-MTL with 16 VRP variants in which cases each task contains 1,000 instances. Bold indicates best value and the underline indicates the second best result. + +![](images/bf916ba7186c708e65c4de541c31d2fffb97acb39292de6743568fb4338b268a.jpg) +(a) OVRPB + +![](images/ae426c15dba60cc181dffc6ef80758f97edfe10c3177ea6501be8ec9a63dd448.jpg) +(b) OVRPL + +![](images/540ee44d2d590c5995264a928cad4e33ee3f37f98a14e4e145efda137820908d.jpg) +(c) VRPBL + +![](images/079500a9d6bb873345a67f1913350b75fb04d5bf008edaf771c0a29e09e2b970.jpg) +(d) VRPBTW + +![](images/87f6af68dc38b903c94828b6e5f477f45941855131da071a13e84c8fee5f939b.jpg) +(e) VRPLTW + +![](images/4ba55bb81742fed5c0cd131524f99dfcdb40baa66218a3b4e7176ccc3055fc66.jpg) +(f) OVRPBL + +![](images/3ea6f412e30a93316c52a0667452d713911af8d970205e46f9450e0c2efedcca.jpg) +(g) OVRPBTW + +![](images/147e09544644b94dbe218198f6c572cc1734cc9fdd7f16fb2656005d49d1c30a.jpg) +(h) OVRPLTW + +![](images/527fdd8de8d533e568e1f69235b2591433f0e32c69757822485afa86519689a2.jpg) +(i) VRPBLTW + +![](images/bea8f496ae8184816b4c7583d739671d51e0a6b2648dc0a943878c2e62026b56.jpg) +(j) OVRPBLTW +Figure 4. The histogram of curvatures on each node from the remaining 10 VRP tasks. We utilize 1,000 instances with size 50 for each task to visualize curvature information. The x-axis represents curvature values, while the y-axis denotes the count of each value. The avg line indicates the average curvature across all nodes. We adopt Ollivier-Ricci curvature (Ollivier, 2009) which is especially suitable for measuring curvatures on discrete structures like graphs. From the information in the figure, it shows that almost every node in each task dataset has either negative or positive curvature and the average curvature suggests that each task contains non-Euclidean geometry patterns. Better viewed in color. + +![](images/b7c97631a7730e48e4c7dbea2bee34fa18f62577e574fb90271c702368954ec5.jpg) +(a) $\mathrm{N} = 50$ + +![](images/10b15af0873ec4b6974cbd383d8e5c9d38ea211119486ee36e5a7ad2e9bdb9fd.jpg) + +![](images/69ace6a822837504639efe1cbf18a6c1f14ced0926fb05fd9fede9a29dab4832.jpg) +(b) $\mathrm{N} = 100$ + +![](images/8955a16feab325ff4e88b8de9f8916417627c8c8601e318e27be0b90fb9811dd.jpg) + +![](images/20756b36afa21dec94306b93bb789518748a0a8ac5d2639b30cd24ed6a62b0d8.jpg) +(c) $N = 150$ + +![](images/37c1f9cb3fe8caaa0c1c3967e1abf9334641faf88fe5482b67609eb916131552.jpg) + +![](images/9eefffaa5d6a6ab0689c0cbec106f420a719f9f32510fb92ea103bd8a2e2b70c.jpg) +(d) $\mathrm{N} = 200$ + +![](images/3c53d5bb8684394804e5aa04762242f36af3e08f8bed9a19daca99f22814833f.jpg) + +![](images/71b8fd3fe97f77b36a394c3b0773cf8b88760d9675662102d9ea4aecdb767500.jpg) +(e) $N = 250$ + +![](images/a1cc10d98bd09ac5f98a54ecd3271d6f54d3dcad34bb5488ca99defc8855d87e.jpg) + +![](images/30800d78987162c6e6fba66ff59fc810281fe33384187b54b2d4bc0c6db734a7.jpg) +(f) $\mathrm{N} = {300}$ + +![](images/ba30da436b65e84e412a40441c188fc21b54ed80f1e32c8261f026d2ccc9b05d.jpg) + +![](images/1fdf7c6c21e32ec0d7ceeac709ac8067c0a1f82288116ed818a41097b6c9383e.jpg) +(g) $\mathrm{N} = {350}$ + +![](images/e4499cc6d90bc9ec9b0eb9b5e25f76429374957f4c0bcf3466f71bef10588e82.jpg) + +![](images/c36ddc796bb7d5c1d082d726fbace40d38da9d0e0ca473d46a9e5be7dc7f3403.jpg) +(h) $\mathrm{N} = 400$ + +![](images/d52edc362837469aa01ddfcd466cf0c2d1b7aa96b1f08456833da71bfda2d73a.jpg) + +![](images/457818b52e756db3e6d5c7252a32d35a5150985a667c43057e812862a58cecce.jpg) +(i) $\mathrm{N} = {450}$ + +![](images/d4c1f15d1ffc57f0a47fbeaf132f8a97916a42161835cd0187fa12f34d5b0b56.jpg) + +![](images/520d747d68820e14be4950d2abb106c72bbbbeeffad463eb585033d4fdd343a6.jpg) +(j) $\mathrm{N} = {500}$ + +![](images/111262d586d0e4e7857152f808e1ce765bcc98d8ffdc657f3d2706e55c013d3b.jpg) +Figure 5. Visualization of Ollivier-Ricci curvatures on random generated complete graphs with different sizes. Each node's coordinate is restricted in the 2D region $[-1,1] \times [-1,1]$ . For each complete graph, we use KNN to select 5 nearest neighbors of each node. Warm (cold) colors represent positive (negative) curvatures. From these presented results, we can observe that edges with negative curvatures often link distant nodes while edges with positive curvatures often exist in highly clustered regions. This property is shared among all of the node sizes. Better viewed in color. + +![](images/787e16e98f324f9a2d87b9c8548d80fbd721c8151b0ca305af82547bf890a6f0.jpg) +(k) $\mathrm{N} = 600$ + +![](images/4be0673c9012f519d8091e9ee8a49f8f94762adc3c855a8f38be13493439fe9d.jpg) + +![](images/98951d2715ce6f6e20dee13dc331aa9a322f17f8fa16f9b32a4a676b20705038.jpg) +(1) $\mathrm{N} = {800}$ + +![](images/6b68636880c4d619fa78329765964df80fe1ccf781686e8e5aeff226c4af0b0f.jpg) + +# Appendix.2. Detailed Experimental Configurations with (Zhou et al., 2024) + +# Definitions of Constraints in Utilized Tasks + +We follow the settings of (Kool et al., 2019; Kwon et al., 2020; Zhou et al., 2024) and details are listed as follows: + +- **Coordinates:** We focus on uniform distribution setting in which case each node's locations are sampled from $U(0,1)$ in a unit square. +- Capacity: We set capacity to 40 and 50 for $N = 50$ and $N = 100$ , respectively. Note that one of the hard constraints involved in each task is that nodes with demands greater than delivery vehicle's current demand are masked. +- Demand: We sample the demand of each node from the list $\{1,2,\dots,9\}$ . Note that before sending into model, the node demand is normalized by the demand of delivery vehicle. +- Open Route: We set it as an indicator vector with all ones. During decoding stage, we need to manually set mask to prevent delivery vehicle from going back to the depot node. +- Backhauls: Similar to demand setting, we sample from $\{1,2,\dots,9\}$ as our initial demands. Then, in the same way as that of (Liu et al., 2024), we sample $20\%$ of nodes to be the backhauls nodes. +- Duration Limit: We set it to 3, which represents the maximum length of delivery vehicle's route. +- Time Window: For the depot node, we assign its time window as $[0,3]$ and service time for depot is 0 by default. However, service time for customer nodes is set to 0.2 and time window for customer nodes are sampled from uniform distribution. + +By combining constraints in different ways, we can obtain various kinds of tasks as listed in Table 11. Since some nodes don't have features like time-windows or backhauls, these features will separately appear in the encoder module. + +
Capacity (C)Open Route (O)Backhauls (B)Duration Limit (L)Time Window (TW)
CVRPXXXX
VRPTWXXX
OVRPXXX
VRPLXXX
VRPBXXX
OVRPTWXX
OVRPBXX
OVRPLXX
VRPBLXX
VRPBTWXX
VRPLTWXX
OVRPBLX
OVRPBTWX
OVRPLTWX
VRPBLTWX
OVRPBLTW
+ +Table 11. Detailed descriptions of constraints contained in each problem type. We have 16 VRP tasks in total. The first 6 VRP tasks get involved in training stage and the last 10 tasks are used for zero-shot/few-shot testings. + +
Hyper-ParametersValue
Training Epochs5,000
Fine-tuning Epochs10
Instances in each Training Epoch20,000
Instances in each Fine-tuning Epoch10,000
OptimizerAdam
LR SchedulerMultiStepLR
LR Milestones[4,501]
LR Gamma0.1
Training Learning Rate1e-4
Fine-tuning Learning Rate1e-4
Weight Decay1e-6
Training Batch Size128
Fine-tuning Batch Szie128
Evaluation Batch Size64
Problem Scales{50, 100}
Node DistributionU(0,1)
Number of Experts in MoE4
Auxiliary Loss Weight in MoE0.001
Gating Mechanism in MoEnode-level, input-choice gating
Embedding Size128
Hidden Feature Size512
Number of Encoder Layers6
QKV Dimension16
Attention Head Number8
Logit Clipping10
Evaluation Typeargmax
Number of Experts in MoE for Routing2
Number of Subspaces (C)8
Initialization value of Curvature (κ)0
Initialization value of α,β{1,1}
+ +Table 12. Detailed experiment settings of hyper-parameters. This configuration is consistent with (Zhou et al., 2024). However, other choices for the number of subspaces are also valid as long as the sum of subspaces' dimensions equals 128. Even if 128 is not divisible by number of subspaces, we can still determine dimensions manually or automatically (e.g., neural architecture search (Elsken et al., 2019)). + +Appendix.3. Real-World Experimental Results with (Zhou et al., 2024) and Subspace Visualizations + +
Set-SolomonPOMOPOMO-MTLMVMoEMixed-POMO-MTL
InstanceOptObjGapObjGapObjGapObjGap
R1011637.71805.610.252%1821.211.205%1798.19.794%1862.313.714%
R1021466.61556.76.143%1596.08.823%1572.07.187%1634.111.422%
R1031208.71341.410.979%1327.39.812%1328.29.887%1374.113.687%
R104971.51118.615.142%1120.715.358%1124.815.780%1134.416.767%
R1051355.31506.411.149%1514.611.754%1479.49.157%1569.715.818%
R1061234.61365.210.578%1380.511.818%1362.410.352%1413.414.480%
R1071064.61214.214.052%1209.313.592%1182.111.037%1230.215.556%
R108932.11058.913.604%1061.813.915%1023.29.774%1063.014.046%
R1091146.91249.08.902%1265.710.358%1255.69.478%1258.29.704%
R1101068.01180.410.524%1171.49.682%1185.711.021%1213.213.593%
R1111048.71177.212.253%1211.515.524%1176.112.148%1189.813.453%
R112948.61063.112.070%1057.011.427%1045.210.183%1097.315.676%
RC1011619.82643.063.168%1833.313.181%1774.49.544%1882.716.231%
RC1021457.41534.85.311%1546.16.086%1544.55.976%1616.410.907%
RC1031258.01407.511.884%1396.210.986%1402.511.486%1403.011.526%
RC1041132.31261.811.437%1271.712.311%1265.411.755%1252.610.628%
RC1051513.71612.96.553%1644.98.668%1635.58.047%1660.18.382%
RC1061372.71539.312.137%1552.813.120%1505.09.638%1497.29.072%
RC1071207.81347.711.583%1384.814.655%1351.611.906%1330.810.180%
RC1081114.21305.517.169%1274.414.378%1254.212.565%1273.914.332%
RC2011261.82045.662.118%1761.139.570%1577.325.004%1595.326.428%
RC2021092.31805.165.257%1486.236.062%1616.547.990%1416.429.672%
RC203923.71470.459.186%1360.447.277%1473.559.521%1223.332.433%
RC204783.51323.968.973%1331.769.968%1286.664.212%1103.840.887%
RC2051154.01568.435.910%1539.233.380%1537.733.250%1365.218.301%
RC2061051.11707.562.449%1472.640.101%1468.939.749%1239.717.939%
RC207962.91567.262.758%1375.742.870%1442.049.756%1264.731.345%
RC208776.11505.493.970%1185.652.764%1107.442.688%1113.043.407%
Average Gap29.658%21.380%20.317%17.84%
+ +Table 13. Zero-Shot Inference on VRPTW benchmark instances from Set-Solomon. Each model is trained on the size $n = 100$ , following the settings in (Zhou et al., 2024). + +
Set-XPOMOPOMO-MTLMVMoEMixed-POMO-MTL
InstanceOptObjGapObjGapObjGapObjGap
X-n101-k2527591301389.231%3248217.727%293616.415%296767.557%
X-n106-k14263623932249.162%273693.820%272783.475%278215.936%
X-n110-k1314971152231.683%151511.202%150890.788%152261.703%
X-n115-k10127471611326.406%1478515.988%138478.629%133284.558%
X-n120-k613332140855.648%139314.493%140895.678%140395.303%
X-n125-k3055539585135.355%606879.269%589446.131%596427.388%
X-n129-k1828940292461.057%303324.810%298022.979%294761.852%
X-n134-k1310916113023.536%115816.092%113534.003%112983.499%
X-n139-k1013590140353.274%139112.362%138251.729%137601.251%
X-n143-k715700161312.745%166606.115%161252.707%160702.357%
X-n148-k46434484932813.533%5078216.880%467587.618%471578.537%
X-n153-k22212203247653.040%2623723.643%2379312.125%2339210.236%
X-n157-k1316876176604.646%175103.757%176504.586%184449.291%
X-n162-k1114138148895.312%147204.117%146543.650%145883.183%
X-n167-k1020557218226.154%213994.096%213403.809%211412.841%
X-n172-k5145607495568.659%5638523.632%5129212.465%488157.034%
X-n176-k26478125419713.354%5763720.549%5552016.121%5259310.000%
X-n181-k23255693731145.923%262192.542%262582.695%275527.755%
X-n186-k1524145252224.461%250003.541%251824.295%249003.127%
X-n190-k816980183157.862%181136.673%183277.933%185939.499%
X-n195-k51442254915811.154%5409022.306%4998413.022%4868910.094%
X-n200-k36585786461810.311%616545.251%615305.039%618445.575%
X-n209-k1630656322125.076%320114.420%320334.492%318283.823%
X-n219-k7311759513354513.564%1198871.949%1210462.935%1250026.299%
X-n228-k23257424868989.142%3309128.549%3105420.636%2924413.604%
X-n237-k14270422989310.543%284725.288%285505.577%288506.686%
X-n247-k50372745616750.687%4506520.902%4367317.167%4114210.377%
X-n251-k2838684402634.082%406144.989%410226.044%407925.449%
Average Gap16.629%9.820%6.884%6.243%
+ +Table 14. Zero-Shot Inference on CVRP benchmark instances from Set-X. Each model is trained on the size $n = 100$ , following the settings in (Zhou et al., 2024). + +
Set-XPOMOPOMO-MTLMVMoEMixed-POMO-MTL
InstanceOptObjGapObjGapObjGapObjGap
X-n502-k3969226756179.232%7728411.640%735336.222%8142317.619%
X-n513-k21242013051826.102%2851017.805%3210232.647%2952922.016%
X-n524-k15315459320187730.586%19224924.358%18654020.665%17392812.507%
X-n536-k969484610607311.837%10651412.302%10958115.536%10563211.372%
X-n548-k508670010309318.908%945629.068%9589410.604%9568010.358%
X-n561-k42427174937015.575%4784612.007%5600831.114%4961916.158%
X-n573-k30506738354564.871%6091320.208%5947317.366%5758813.646%
X-n586-k15919031622988720.792%2088939.761%21566813.321%21240411.606%
X-n599-k9210845115057238.839%12033310.956%12894918.901%12072211.315%
X-n613-k62595356845114.976%6798414.192%8258638.718%7127519.719%
X-n627-k43621648443435.825%7306017.528%7098714.193%6933411.534%
X-n641-k35636827557318.672%7264314.071%7532918.289%7175012.669%
X-n655-k13110678012721119.134%1169889.560%11767810.206%12022712.593%
X-n670-k13014633220807942.197%19011829.922%19769535.100%17040316.450%
X-n685-k75682057948216.534%8089218.601%9738842.787%8051218.044%
X-n701-k44819239784319.433%9207512.392%9846920.197%9072410.734%
X-n716-k35433735138118.463%5270921.525%5677330.895%5079817.119%
X-n733-k15913618715909816.823%16196118.925%17832230.939%16108918.285%
X-n749-k98772698778613.611%9058217.229%10043829.985%8790713.767%
X-n766-k7111441713546418.395%14404125.891%15235233.155%12837512.199%
X-n783-k48723869028924.733%8316914.897%10038338.677%8418116.295%
X-n801-k407330512427869.536%8507716.059%9156024.903%8615217.525%
X-n819-k17115812119345122.344%17715712.039%18359916.113%18379216.235%
X-n837-k14219373723788422.787%21420710.566%22952618.473%21365110.279%
X-n856-k958896515252871.447%10177414.398%9912911.425%11535929.668%
X-n876-k599929911976420.609%11661717.440%11961920.463%11206712.858%
X-n895-k37538607024530.421%6558721.773%7901846.710%6961429.250%
X-n916-k20732917939937221.324%3617199.885%38368116.557%36582211.132%
X-n936-k15113271523762579.049%18626240.347%22092666.466%16758426.274%
X-n957-k878546513085053.104%9819814.898%11388233.250%11778737.819%
X-n979-k5811897614768724.132%13809216.067%14634723.005%13292111.721%
X-n1001-k437235510039938.759%8766021.153%11444858.176%8889722.862%
Average Gap29.658%16.769%26.048%16.614%
+ +Table 15. Zero-Shot Inference on large-scale CVRP instances from Set-X. Each model is trained on the size $n = 100$ , following the setting in (Zhou et al., 2024). + +![](images/9a0d2bb43bb84275f97859a441cc7a2cb39ce1114f93c1b28aa35a029e8c4ded.jpg) +Figure 6. Visualization of curvature for each subspace of each layer in the encoder module. Shown model is Mixed-POMO-MTL. The shown colors indicate that subspaces in shallower layers tend to reside in hyperbolic space. As the layer index increases, more subspaces shift closer to spherical geometry. The tendency towards spherical geometry is even more serious when $N = 100$ . However, we also observe an unexpected change in last layer where curvatures cluster around zero. Such kind of inconsistency may explain the inferior performances of Mixed-POMO-MTL on some unseen tasks like VRPBTW. Better viewed in color. + +![](images/893291a045b717b305e6ad617197e6cff48fc3234765b5d21257dc77a001d614.jpg) + +![](images/10054b03fcb85c8f57aeb8faaa9f597a4e2fe292596acffd2b5d40cea4df87f0.jpg) +Figure 7. Visualization of curvature for each subspace of each layer in the encoder module. Shown model is Mixed-MVMoE-L. The shown colors indicate that subspaces in shallower layers tend to reside in hyperbolic space. As the layer index increases, more subspaces shift closer to spherical geometry. Compared with Mixed-POMO-MTL, it is more consistent as the layer deepens. Better viewed in color. + +![](images/24639bb1a264d6383b7579782ed6db7e0944e497b3a5bf6a19c1f43a2229d313.jpg) + +![](images/57aa7f6ea5970fb5adb2c1db8530253d95638bc984aa8413a243dbd8c661fa98.jpg) +Figure 8. Visualization of curvature for each subspace of each layer in the encoder module. Shown model is Mixed-MVMoE $(n = 100)$ . The shown colors indicate that subspaces in shallower layers tend to reside in hyperbolic space. As the layer index increases, more subspaces shift closer to spherical geometry. As we can observe from the presented color gradients, MVMoE sometimes can learn very positive curvatures even in the shallow layer. We hypothesize this maybe due to the fact that MVMoE doesn't apply approximate routing mechanism so that model itself acquires much stronger abilities to capture high-level information. Better viewed in color. + +![](images/fdf9830d1cfc3639afb3e5187d8ae32a1cc17b54dae33bd0d9f3f40cfed9ac6d.jpg) + +# Appendix.4. Detailed Experimental Configurations, Results and Visualizations with RouteFinder (Berto et al., 2024) + +# Definitions of Constraints in Utilized Tasks + +In this case, we follow the settings of (Berto et al., 2024) and details are listed as follows: + +- **Coordinates:** We focus on uniform distribution setting in which case each node's locations are sampled from $U(0,1)$ in a unit square. +- Capacity: We set capacity to 40 and 50 for $n = 50$ and $n = 100$ , respectively. Note that one of the hard constraints involved in each task is that nodes with demands greater than milky vehicle's current demand are masked. +- Demand: We sample the demand of each node from the list $\{1,2,\dots,9\}$ . Note that before sending into model, the node demand is normalized by the demand of delivery vehicle. +- Open Route: We set it as an indicator vector with all ones. During decoding stage, we need to manually set mask to prevent vehicle from going back to the depot node. +- Backhauls: Similar to demand setting, we sample from $\{1,2,\dots,9\}$ as our initial demands. Then, the same as in (Liu et al., 2024), we sample $20\%$ of nodes to be the backhauls nodes. +- Duration Limit: We set it to 3, which represents the maximum length of delivery vehicle's route. +- Time Window: For the depot, we assign its time window as [0, 3] and service time for depot is 0 by default. However, service time for customer nodes is set to 0.2 and time window for customer nodes are sampled from uniform distribution. +- Mixed: In the regular setting, there is a strict preceding ordering between linehaul and backhaul customers. However, the mixed scenario allows linehaul and backhaul customers to happen in an interleaved manner. + +By combining constraints in different ways, we can obtain various kinds of tasks in Table 16. Since some nodes don't have features like time-windows and backhauls, these features will separately appear in the encoder module. + +
Capacity (C)Open Route (O)Backhauls (B)Duration Limit (L)Time Window (TW)Mixed (M)
CVRPXXXXX
VRPTWXXXX
OVRPXXXX
VRPLXXXX
VRPBXXXX
OVRPTWXXX
OVRPBXXX
OVRPLXXX
VRPBLXXX
VRPBTWXXX
VRPLTWXXX
OVRPBLXX
OVRPBTWXX
OVRPLTWXX
VRPBLTWXX
OVRPBLTWX
VRPMBXXX
OVRPMBXX
VRPMBLXX
VRPMBTWXX
OVRPMBLX
OVRPMBTWX
VRPMLTWX
OVRPMLTW
+ +Table 16. Detailed descriptions of constraints contained in each problem type. We have 24 VRP tasks in total. Note that the first 16 VRP tasks get involved in training stage and the last 8 tasks are used for few-shot testings. + +
Hyper-ParametersValue
Training Epochs300
Fine-tuning Epochs10
Instances in each Training Epoch100,000
Instances in each Fine-tuning Epoch10,000
OptimizerAdam
LR SchedulerMultiStepLR
LR Milestones[270,295]
LR Gamma0.1
Gradient Clips1.0
Training Learning Rate3e-4
Fine-tuning Learning Rate3e-4
Weight Decay1e-6
Training Batch Size256
Fine-tuning Batch Szie256
Evaluation Batch Size128
Problem Scales{50, 100}
Node DistributionU(0,1)
Number of Experts in MoE4
Auxiliary Loss Weight in MoE0.001
Gating Mechanism in MoEnode-level, input-choice gating
Embedding Size128
Hidden Feature Size512
Number of Encoder Layers6
QKV Dimension16
Attention Head Number8
Logit Clipping10
Evaluation Typeargmax
Number of Experts in MoE for Routing2
Number of Subspaces (C)8
Initialization value of Curvature (κ)0
Initialization value of α,β{1,1}
+ +Table 17. Detailed experiment settings of hyper-parameters for RouteFinder (Berto et al., 2024) based model. However, other choices for the number of subspaces are also valid as long as the sum of subspaces' dimensions equals 128. Even if 128 is not divisible by number of subspaces, we can still determine dimensions manually or automatically (e.g., neural architecture search (Elsken et al., 2019)). + +
TypeModeln=50n=100TypeModelObjn=50n=100
ObjGapTimeObjGapTimeGapTimeObjGapTime
CVRPHGS-PyVRP10.3720.000%10.4m15.6280.000%20.8mVRPTWHGS-PyVRP16.0310.000%10.4m25.4230.000%20.8m
OR-Tools10.5721.907%10.4m16.2804.178%20.8mOR-Tools16.0890.347%10.4m25.8141.506%20.8m
MTPOMO10.5181.411%2s15.9341.988%7sMTPOMO16.4102.364%1s26.4123.873%7s
Mixed-MTPOMO10.5181.413%2s15.9512.095%8sMixed-MTPOMO16.4142.391%2s26.3883.780%8s
MVMoE10.5011.242%2s15.8881.694%9sMVMoE16.4042.329%2s26.3893.788%9s
Mixed-MVMoE10.5031.265%3s15.8871.690%10sMixed-MVMoE16.3962.272%3s26.3873.775%10s
RF-MoE10.4991.226%2s15.8761.622%9sRF-MoE16.3892.234%2s26.3223.519%9s
Mixed-RF-MVMoE10.5001.230%3s15.8661.559%10sMixed-RF-MVMoE16.3712.118%3s26.3073.457%10s
RF-TE10.5041.274%2s15.8571.505%7sRF-TE16.3642.077%1s26.2353.178%7s
Mixed-RF-TE10.4931.166%3s15.8461.440%9sMixed-RF-TE16.3201.798%3s26.1672.914%9s
OVRPHGS-PyVRP6.5070.000%10.4m9.7250.000%20.8mVRPLHGS-PyVRP10.5870.000%10.4m15.7660.000%20.8m
OR-Tools6.5530.686%10.4m9.9952.732%20.8mOR-Tools10.5702.343%10.4m16.4665.302%20.8m
MTPOMO6.7183.209%1s10.2104.965%6sMTPOMO10.7751.734%1s16.1492.434%7s
Mixed-MTPOMO6.7143.150%2s10.2305.166%8sMixed-MTPOMO10.7711.698%2s16.1612.513%8s
MVMoE6.7022.965%2s10.1774.621%9sMVMoE10.7511.505%2s16.0992.115%9s
Mixed-MVMoE6.6992.929%3s10.1814.658%9sMixed-MVMoE10.7521.523%3s16.0992.118%9s
RF-MoE6.6972.886%2s10.1394.229%9sRF-MoE10.7371.388%2s16.0701.941%9s
Mixed-RF-MVMoE6.6892.764%3s10.1374.216%10sMixed-RF-MVMoE10.7361.381%3s16.0621.888%9s
RF-TE6.6842.687%1s10.1214.055%6sRF-TE10.7491.502%1s16.0511.827%6s
Mixed-RF-TE6.6752.551%2s10.1113.946%7sMixed-RF-TE10.7311.339%2s16.0401.751%7s
VRPBHGS-PyVRP9.6870.000%10.4m14.3770.000%20.8mOVRPTWHGS-PyVRP10.5100.000%10.4m16.9260.000%20.8m
OR-Tools9.8021.159%10.4m14.9333.853%20.8mOR-Tools10.5190.078%10.4m17.0270.583%20.8m
MTPOMO10.0333.564%1s15.0824.922%6sMTPOMO10.6681.479%1s17.4202.892%7s
Mixed-MTPOMO10.0353.583%2s15.1005.045%7sMixed-MTPOMO10.6761.555%2s17.4192.889%7s
MVMoE10.0053.270%2s15.0234.508%9sMVMoE10.6691.492%2s17.4162.872%10s
Mixed-MVMoE10.0023.242%2s15.0274.537%10sMixed-MVMoE10.6651.459%2s17.3932.738%10s
RF-MoE9.9803.015%2s14.9734.164%8sRF-MoE10.6741.539%2s17.3872.697%10s
Mixed-RF-MVMoE9.9803.012%2s14.9624.085%9sMixed-RF-MVMoE10.6601.403%2s17.3692.592%11s
RF-TE9.9772.989%1s14.9423.952%6sRF-TE10.6521.326%1s17.3272.346%7s
Mixed-RF-TE9.9632.832%2s14.9293.863%7sMixed-RF-TE10.6351.166%2s17.2852.100%7s
VRPBTLHGS-PyVRP10.1860.000%10.4m14.7790.000%20.8mVRPLHGS-PyVRP15.5100.000%10.4m16.9260.000%20.8m
OR-Tools10.3311.390%10.4m15.4264.338%20.8mOR-Tools18.4220.332%10.4m29.8302.770%20.8m
MTPOMO10.6724.697%1s15.7126.251%7sMTPOMO18.9902.128%1s30.8983.624%7s
Mixed-MTPOMO10.6664.644%2s15.7286.359%8sMixed-MTPOMO19.0152.258%2s30.8973.616%8s
MVMoE10.6404.394%2s15.6475.758%9sMVMoE18.9852.100%2s30.8923.608%10s
Mixed-MVMoE10.5753.765%2s15.5415.121%9sMixed-MVMoE18.9571.960%2s30.8083.323%10s
Mixed-RF-MVMoE10.5683.702%2s15.5375.089%10sMixed-RF-MVMoE18.9391.873%2s30.7733.202%11s
RF-TE10.5783.803%1s15.5285.039%6sRF-TE10.9411.877%1s30.6882.923%7s
Mixed-RF-TE10.5533.555%2s15.4994.843%7sMixed-RF-TE18.8941.621%2s30.6422.768%8s
OVRPTWHGS-PyVRP18.2920.000%10.4m29.4670.000%20.8mVRPLHGS-PyVRP16.3560.000%10.4m25.7570.000%20.8m
OR-Tools18.3660.383%10.4m29.9451.597%20.8mOR-Tools16.4410.499%10.4m26.2590.899%20.8m
MTPOMO18.6391.878%1s30.4373.285%7sMTPOMO18.6242.823%1s26.8914.368%7s
Mixed-MTPOMO18.6591.985%2s30.4283.253%8sMixed-MTPOMO16.8162.779%2s26.8824.330%8s
MVMoE18.6401.883%2s30.4363.281%9sMVMoE18.8112.750%2s26.8684.277%9s
Mixed-MVMoE18.6301.830%2s30.4223.232%10sMixed-MVMoE16.8042.703%2s26.8514.211%10s
RF-MoE18.6161.757%2s30.3412.954%9sRF-MoE16.7772.550%2s26.7743.912%9s
Mixed-RF-MVMoE18.6071.706%2s30.3062.839%10sMixed-RF-MVMoE16.7622.453%2s26.7463.802%10s
RF-TE18.6001.676%1s30.2412.619%7sRF-TE16.7622.454%1s26.6893.579%7s
Mixed-RF-TE18.5551.417%2s30.1722.385%8sMixed-RF-TE16.7062.121%2s26.6373.377%8s
OVRPTBTLHGS-PyVRP6.8980.000%10.4m10.3350.000%20.8mOVRPLHGS-PyVRP6.8990.000%10.4m10.3350.000%20.8m
OR-Tools6.9280.412%10.4m10.5772.315%20.8mOR-Tools6.9270.386%10.4m10.5822.363%20.8m
MTPOMO7.1083.005%1s10.8785.224%7sMTPOMO7.1123.055%1s10.8845.276%6s
Mixed-MTPOMO7.0992.889%2s10.8925.354%8sMixed-MTPOMO7.1083.002%2s10.8995.419%8s
MVMoE7.0892.741%2s10.8404.869%9sMVMoE7.0982.846%2s10.8474.928%9s
Mixed-MVMoE7.0882.729%2s10.8354.809%10sMixed-MVMoE7.0902.739%2s10.8424.878%10s
RF-MoE7.0802.513%2s10.8054.522%9sRF-MoE7.0832.635%2s10.8064.534%9s
Mixed-RF-MVMoE7.0752.509%2s10.7914.388%10sMixed-RF-MVMoE7.0762.539%2s10.7964.428%10s
RF-TE7.0712.479%1s10.7724.208%7sRF-TE7.0742.508%1s10.7784.262%7s
Mixed-RF-TE7.0532.216%2s10.7453.939%8sMixed-RF-TE7.0542.215%2s10.7493.979%8s
+ +Continued on the next page + +
TypeModeln=50 GapTimeObjn=100 GapTimeTypeModelObjn=50 GapTimeObjn=100 GapTime
OVRdHGS-PyVRP6.5070.000%10.4m9.7240.000%20.8mHGS-PyVRP10.5100.000%10.4m16.9260.000%20.8m
OR-Tools6.5520.668%10.4m10.0012.791%20.8mOR-Tools10.4970.114%10.4m17.0230.728%20.8m
MTPOMO6.7193.227%1s10.2145.002%6sMTPOMO10.6701.500%1s17.4202.889%7s
Mixed-MTPOMO6.7153.159%2s10.2345.214%7sMixed-MTPOMO10.6781.571%2s17.4182.882%8s
MVMoE6.7073.030%2s10.1844.696%9sMVMoE10.6711.511%2s17.4192.885%10s
Mixed-MVMoE6.7002.949%2s10.1834.683%10sMixed-MVMoE10.6621.429%2s17.3972.759%11s
RF-MoE6.6962.864%2s10.1404.249%9sRF-MoE10.6731.532%2s17.3862.693%10s
Mixed-RF-MVMoE6.6892.762%2s10.1364.202%10sMixed-RF-MVMoE10.6611.413%2s17.3692.591%11s
RF-TE6.6862.721%1s10.1204.052%6sRF-TE10.6531.341%1s17.3272.347%7s
Mixed-RF-TE6.6752.545%2s10.1103.937%7sMixed-RF-TE10.6361.176%2s17.2872.108%8s
+ +Table 18: Each model's performances on 16 seen tasks following the setting of (Berto et al., 2024). Each task is assigned with 1,000 instances for testing. The best performances are annotated with bold and domains improved by our module are highlighted with underlines. + +
VRPLibRF-POMO-MTL GapRF-MVMoE GapRF-TE GapMixed-RF-TE Gap
A2.529%2.833%2.825%2.454%
B2.752%3.171%2.583%2.665%
E5.069%2.348%2.929%3.369%
F12.772%14.858%12.951%11.479%
M5.907%7.010%5.078%5.102%
P4.678%3.389%4.573%4.254%
X9.143%10.259%8.435%9.458%
Average Gap6.121%6.267%5.627%5.579%
+ +Table 19. Zero-Shot Inference on CVRP benchmark instances from Set-X (Uchoa et al., 2017). + +
MethodVRPMBOVRPMBVRPMBLVRPMBTWOVRPMBLOVRPMBTWVRPMBLTWOVRPMBLTW
CostGapCostGapCostGapCostGapCostGapCostGapCostGapCostGap
HGS-PyVRP13.540.00%9.010.00%13.780.00%25.510.00%9.010.00%16.970.00%25.850.00%16.970.00%
OR-Tools14.9310.27%10.5917.54%15.4211.90%29.9717.48%10.5917.54%19.3113.78%30.4417.76%19.3113.78%
Zero-shot14.8810.13%10.7219.02%15.1810.32%28.2910.89%10.7219.01%18.458.68%28.6510.82%18.458.69%
Mixed-Zero-Shot16.0419.12%12.6231.20%16.6120.95%28.7312.71%11.7230.40%18.7510.55%29.4013.78%18.7810.72%
Train (scratch)15.1212.13%10.4015.35%16.3218.27%28.1510.71%10.1816.08%18.3611.19%28.6910.95%18.8611.19%
Mixed (scratch)14.607.96%9.616.65%14.837.61%26.564.18%9.626.76%17.543.37%26.984.47%17.543.39%
EAL (step 0)14.8810.13%10.7219.02%15.1810.32%28.2910.89%10.7219.01%18.458.68%28.6510.82%18.458.59%
Mixed-EAL (step 0)16.0419.12%12.6231.20%16.6120.95%28.7312.71%11.7230.40%18.7510.55%29.4013.78%18.7811.72%
EAL14.597.89%9.667.19%14.787.39%26.694.61%9.657.13%17.593.65%27.134.90%17.593.65%
Mixed-EAL14.033.68%9.374.02%14.313.89%26.463.69%9.374.06%17.462.86%26.893.99%17.452.84%
+ +Table 20. Performance comparisons under few-shot scenario on 8 unseen tasks. EAL here denotes the Efficient Adapter Layer proposed in (Berto et al., 2024). It pads zeros on original weight matrix, which can infuse unseen features into model. Following (Berto et al., 2024), each model is trained on the size $N = 100$ and each task is assigned with 1,000 test instances for validations. During few-shot learning, model is trained with 10 epochs and each epoch contains 10,000 instances. The best performances are annotated with bold and domains improved by our module are highlighted with underlines. + +![](images/0661b2e744d9abdea6adf0c781cdbc4dacc6f15b3061e5d8e8efea972481a168.jpg) +Figure 9. Visualization of curvature for each subspace of each layer in the encoder module. Shown model is Mixed-RF-MVMoE. The shown colors indicate that subspaces in shallower layers tend to reside in hyperbolic space. As the layer index increases, more subspaces shift closer to spherical geometry. Similar to the results presented in Figure 8, the MVMoE based model keeps the consistency in the evolution of curvatures across layers. Better viewed in color. + +![](images/e58247f9c8ba6651eb94dd655a083b09689c41d0aba41354992f3f6ebc7a02a3.jpg) + +![](images/9839c281c9bb0e8f35c742bf145f39d58751eb438c8b275f8796f256d981ba6d.jpg) +Figure 10. Visualization of curvature for each subspace of each layer in the encoder module. Shown model is Mixed-RF-TE. The shown colors indicate that subspaces in shallower layers tend to reside in hyperbolic space. As the layer index increases, more subspaces shift closer to spherical geometry. Compared to the MVMoE based models in Figure 8, Mixed-RF-TE doesn't acquire very positive or negative curvatures, they mostly cluster around the zero point. Better viewed in color. + +![](images/999f097ca48719d9cad0b22bbe91e1fe3a802c450dbad9b374b97bd108bb9bb9.jpg) \ No newline at end of file diff --git a/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/images.zip b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..afc96cec66109387368f5a79847340cf72940d99 --- /dev/null +++ b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d1e9921d9af5d271ffdf72b20dabc9e889ff01a48a8e41a40104903a43ed15e +size 5373523 diff --git a/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/layout.json b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..245164a90cfdf52e3e79c50b41df899ef3bbc9d7 --- /dev/null +++ b/amixedcurvaturebasedpretrainingparadigmformultitaskvehicleroutingsolver/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94c4e5156c8babe634a1c79515df47358b258ecf7f5e5a25065d6935ed9b9233 +size 936132 diff --git a/amixturebasedframeworkforguidingdiffusionmodels/290295d7-e929-4d1d-9239-6653556db349_content_list.json b/amixturebasedframeworkforguidingdiffusionmodels/290295d7-e929-4d1d-9239-6653556db349_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5b32b35aff9198075bc4470b4b27d0d5c12ba411 --- /dev/null +++ b/amixturebasedframeworkforguidingdiffusionmodels/290295d7-e929-4d1d-9239-6653556db349_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac4ab8cb51e516438c8c8e00455574a04c60a0054d8f5ac77cbd1dd2fabb632e +size 228291 diff --git a/amixturebasedframeworkforguidingdiffusionmodels/290295d7-e929-4d1d-9239-6653556db349_model.json b/amixturebasedframeworkforguidingdiffusionmodels/290295d7-e929-4d1d-9239-6653556db349_model.json new file mode 100644 index 0000000000000000000000000000000000000000..cbc9174159602191c4022e203e8293a9b1dae70f --- /dev/null +++ b/amixturebasedframeworkforguidingdiffusionmodels/290295d7-e929-4d1d-9239-6653556db349_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c16b004e4a6fbea96d0a13e0ab7fa83421909987159becda01a6ef61e9ac0d00 +size 263612 diff --git a/amixturebasedframeworkforguidingdiffusionmodels/290295d7-e929-4d1d-9239-6653556db349_origin.pdf b/amixturebasedframeworkforguidingdiffusionmodels/290295d7-e929-4d1d-9239-6653556db349_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9d827e11859c04db40a7baac710a38f3d1280f36 --- /dev/null +++ b/amixturebasedframeworkforguidingdiffusionmodels/290295d7-e929-4d1d-9239-6653556db349_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfbef8cdb7b73d1709ea04b7b6b1d7d61366ccd35e107d1d2e4022c6e3d6052f +size 16366793 diff --git a/amixturebasedframeworkforguidingdiffusionmodels/full.md b/amixturebasedframeworkforguidingdiffusionmodels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..15312f295d9d4a046638de65faf0179ff2206739 --- /dev/null +++ b/amixturebasedframeworkforguidingdiffusionmodels/full.md @@ -0,0 +1,828 @@ +# A Mixture-Based Framework for Guiding Diffusion Models + +Yazid Janati\*1 Badr Moufad\*1 Mehdi Abou El Qassime 1 Alain Durmus1 Eric Moulines1 Jimmy Olsson2 + +# Abstract + +Denoising diffusion models have driven significant progress in the field of Bayesian inverse problems. Recent approaches use pre-trained diffusion models as priors to solve a wide range of such problems, only leveraging inference-time compute and thereby eliminating the need to retrain task-specific models on the same dataset. To approximate the posterior of a Bayesian inverse problem, a diffusion model samples from a sequence of intermediate posterior distributions, each with an intractable likelihood function. This work proposes a novel mixture approximation of these intermediate distributions. Since direct gradient-based sampling of these mixtures is infeasible due to intractable terms, we propose a practical method based on Gibbs sampling. We validate our approach through extensive experiments on image inverse problems, utilizing both pixel- and latent-space diffusion priors, as well as on source separation with an audio diffusion model. + +# 1 Introduction + +Inverse problems occur when a signal $X$ of interest must be inferred from an incomplete and noisy observation $Y$ , a challenge frequently encountered in diverse fields such as weather forecasting, image reconstruction (e.g., tomography or black-hole imaging), and speech processing. Such problems are typically ill-posed, making it essential to incorporate additional constraints, regularization techniques, or prior knowledge to arrive at meaningful and realistic solutions. + +The Bayesian framework, in conjunction with generative modeling, offers a systematic approach to the challenges + +*Equal contribution ${}^{1}$ Ecole polytechnique ${}^{2}$ KTH Royal Institute of Technology. Correspondence to: Yazid Janati, Badr Moufad . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +associated with inverse problems. Prior knowledge about the signal of interest, often represented through samples from its underlying distribution $p_0$ , can be leveraged to train a generative model $p_0^\theta$ that acts as a prior. By combining it with the conditional density $g_0(\mathbf{y}|\mathbf{x})$ of the observation given the signal, deduced from the form of the inverse problem at hand, we can compute the posterior distribution. Samples drawn from this posterior encapsulate plausible solutions that harmonize prior knowledge with the observed data. One straightforward approach to approximate sampling from the posterior distribution involves constructing a paired dataset of i.i.d. signals and observations, $(X_i,Y_i)_{i = 1}^N$ where $X_{i}\sim p_{0}$ and $Y_{i}\sim g_{0}(\cdot |X_{i})$ , and learning a direct mapping (Dong et al., 2015) or generative model (Ledig et al., 2017; Isola et al., 2017). The latter, when queried with multiple independent noise samples alongside an observation, generates a diverse set of potential reconstructions. However, this approach is inherently task-specific, delivering reliable reconstructions only when the conditional distribution of the observation remains unchanged at test time. As a result, it cannot straightforwardly adapt to unseen tasks with the same prior. Adaptation to a new task can only be achieved by retraining a new generative model. + +An increasingly popular approach consists in learning a generative model only for the prior $p_0$ , and then leveraging inference-time compute to solve any inverse problem for which the likelihood function $\mathbf{x} \mapsto g_0(\mathbf{y}|\mathbf{x})$ is provided in a closed form. This strategy eliminates the need for expensive and inefficient task-specific training. Initially explored with generative models such as variational autoencoders and generative adversarial networks (Xia et al., 2022), this framework has recently been extended to denoising diffusion models (DDMs) (Song et al., 2021; Kadkhodaie & Simoncelli, 2020; Kawar et al., 2021; 2022; Chung et al., 2023; Song et al., 2023a; Daras et al.), which are the focus of the present paper. + +DDMs (Sohl-Dickstein et al., 2015; Song & Ermon, 2019; Ho et al., 2020) achieve state-of-the-art generative performance across a wide range of domains. At their core is a forward noisig process that transforms the data distribution $p_0$ into a Gaussian distribution. A generative model is then learned by reversing this noisig process. With a specific parameterization of the backward process, + +which converts noise into data samples, training the generative model reduces to approximating denoisers for each noise level introduced during the forward process. Recent methods for training-free posterior sampling aim to approximate the denoisers for the posterior distribution, enabling the use of diffusion models for sampling (Ho et al., 2022; Chung et al., 2023; Song et al., 2023a). A posterior distribution denoiser can be decomposed into two terms: the prior denoiser at the same noise level (provided by a pre-trained diffusion model) and the gradient of the log-likelihood of the observation conditioned on the current noisy sample. The latter term, which is intractable, is what guides the samples during the denoising process towards the posterior distribution. Various approximations for this gradient term have been proposed. However, they are often crude and require significant adjustments and heuristics to ensure stability and satisfactory performance. When applied to latent diffusion models, they often demand additional, model-specific adjustments (Rout et al., 2024). + +Our contribution. In this paper, we present a principled method that circumvents these issues by introducing a new approximation of the likelihood term, paired with a sampling scheme based on Gibbs sampling (Geman & Geman, 1984). Our key observation is that multiple approximations can be derived for each likelihood term at a fixed noise level using a simple identity that it satisfies. However, the scores of these new likelihood approximations are not available in closed form, preventing us from deriving a direct posterior denoiser approximation by combining, through a mixture, the different likelihood approximations. We overcome this limitation by constructing a mixture approximation of the intermediate posterior distributions defined by the diffusion model for the original posterior. Our algorithm, MIXTURE-GUIDED DIFFUSION MODEL (MGDM), proceeds by sequentially sampling from these mixtures using Gibbs sampling. This is enabled by a carefully designed data augmentation scheme that ensures straightforward Gibbs updates. A key advantage of our approach is its adaptability to available computational resources. Specifically, the number of Gibbs iterations acts as a tunable parameter, allowing substantial improvements with increased inference-time compute. MGDM demonstrates strong empirical performance across 10 image-restoration tasks involving both pixel-space and latent-space diffusion models, as well as in musical source separation, even matching the performance of supervised methods. + +# 2 Background + +# 2.1 Diffusion models + +DDMs define a generative process for a data distribution $p_0$ on $\mathbb{R}^d$ by sequentially sampling from a series of progres + +sively less smoothed distributions $(p_t)_{t = T}^0$ , starting from a highly smoothed prior $p_T$ and ending at the data distribution $p_0$ . For all $s, t \in [[0, T]]$ with $s < t$ , define the noising Markov transition kernels + +$$ +q _ {t | s} \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {s}\right) = \mathrm {N} \left(\mathbf {x} _ {t}; \left(\alpha_ {t} / \alpha_ {s}\right) \mathbf {x} _ {s}, \sigma_ {t | s} ^ {2} \mathbf {I} _ {d}\right), \tag {1} +$$ + +where $(\alpha_{t})_{t = 0}^{T}$ is monotonically decreasing with $\alpha_0 = 1$ $\alpha_{T}\approx 0$ , and $\sigma_{t|s}^2 = 1 - (\alpha_t / \alpha_s)^2$ . Each smoothed distribution is a noised version of $p_0$ and has density $p_t(\mathbf{x}_t)\coloneqq$ $\int q_{t|0}(\mathbf{x}_t|\mathbf{x}_0)p_0(\mathbf{x}_0)\mathrm{d}\mathbf{x}_0$ . The final distribution $p_T$ is close to $\mathcal{N}(0_d,\mathbf{I}_d)$ . Moreover, define the backward Markov transition kernels $p_{s|t}(\mathbf{x}_s|\mathbf{x}_t)\propto p_s(\mathbf{x}_s)q_{t|s}(\mathbf{x}_t|\mathbf{x}_s)$ with $s < t$ Note that for all $\ell < s$ , the backward transitions satisfy + +$$ +p _ {\ell \mid t} (\mathbf {x} _ {\ell} | \mathbf {x} _ {t}) = \int p _ {\ell \mid s} (\mathbf {x} _ {\ell} | \mathbf {x} _ {s}) p _ {s \mid t} (\mathbf {x} _ {s} | \mathbf {x} _ {t}) d \mathbf {x} _ {s}. \tag {2} +$$ + +Consecutive distributions $p_t$ and $p_{t+1}$ are linked through the identity $p_{t+1}(\mathbf{x}_{t+1}) = \int q_{t+1|t}(\mathbf{x}_{t+1}|\mathbf{x}_t)p_t(\mathbf{x}_t)\mathrm{d}\mathbf{x}_t$ . Hence, given a sample $X_{t+1} \sim p_{t+1}$ , $X_t \sim p_{t|t+1}(\cdot |X_{t+1})$ is an exact sample from $p_t$ . This procedure defines a generative model, in the sense that the last state $X_0$ of the Markov chain $(X_t)_{t=T}^0$ , where the initial state $X_T$ is sampled from $p_T$ , is a sample from $p_0$ . + +However, simulating the backward transitions is impracticable in most applications, so the following Gaussian approximation is used in practice. First, for $s \in [1, t - 1]$ , define the conditional density of $X_{s}$ given $X_{0}$ and $X_{t}$ : + +$$ +\begin{array}{l} q _ {s \mid 0, t} \left(\mathbf {x} _ {s} \mid \mathbf {x} _ {0}, \mathbf {x} _ {t}\right) \tag {3} \\ = \mathrm {N} (\mathbf {x} _ {s}; \gamma_ {t | s} \alpha_ {s | 0} \mathbf {x} _ {0} + (1 - \gamma_ {t | s}) \alpha_ {t | s} ^ {- 1} \mathbf {x} _ {t}, \sigma_ {s | 0, t} ^ {2} \mathbf {I} _ {d}), \\ \end{array} +$$ + +where $\gamma_{t|s} \coloneqq \sigma_{t|s}^2 / \sigma_{t|0}^2$ and $\sigma_{s|0,t}^2 \coloneqq \sigma_{t|s}^2 \sigma_{s|0}^2 / \sigma_{t|0}^2$ . Next, define by $D_{t+1}(\mathbf{x}_{t+1}) \coloneqq \int \mathbf{x}_0 p_{0|t+1}(\mathbf{x}_0 | \mathbf{x}_{t+1}) \mathrm{d}\mathbf{x}_0$ the conditional expectation of $X_0$ given $X_{t+1} = \mathbf{x}_{t+1}$ (referred to as the denoiser). Denote by $D_{t+1}^\theta$ a parametric approximation of $D_{t+1}$ . Following Ho et al. (2020) and given an approximate sample $\hat{X}_{t+1}$ from $p_{t+1}$ , sampling from the bridge kernel $q_{t|0,t+1}(\cdot | D_{t+1}^\theta(\hat{X}_{t+1}), \hat{X}_{t+1})$ , where $\mathbf{x}_0$ is replaced by the estimate $D_{t+1}^\theta(\hat{X}_{t+1})$ , yields an approximate sample from $p_t$ . The complete sampling process proceeds as follows: first, $\hat{X}_T \sim \mathcal{N}(0_d, \mathbf{I}_d)$ ; then, recursively, for every $t \geq 1$ , $\hat{X}_t \sim p_{t|t+1}^\theta(\cdot | \hat{X}_{t+1})$ , where for all $s < t$ , + +$$ +p _ {s \mid t} ^ {\theta} (\mathbf {x} _ {s} | \mathbf {x} _ {t}) := q _ {s \mid 0, t} (\mathbf {x} _ {s} \mid D _ {t} ^ {\theta} (\mathbf {x} _ {t}), \mathbf {x} _ {t}). \tag {4} +$$ + +The final sample is defined as $\hat{X}_0\coloneqq D_1^\theta (\hat{X}_1)$ and serves as an approximate sample from $p_0$ . The parametric approximations of the denoisers are trained by minimizing, with respect to the parameter $\theta$ , an $L_{2}$ denoising loss across all time steps. Finally, using the Tweedie formula (Robbins, 1956), we obtain the identity $D_{t}(\mathbf{x}_{t}) = \alpha_{t}^{-1}\bigl (\mathbf{x}_{t} + \sigma_{t}^{2}\nabla \log p_{t}(\mathbf{x}_{t})\bigr)$ . Consequently, the trained denoisers not only serve as generative models but also provide parametric approximations of the score functions $\nabla \log p_t(\mathbf{x}_t)$ . + +# 2.2 Training-free guidance. + +After training a diffusion model for the data distribution $p_0$ , it can be leveraged through guidance to address various downstream tasks without the need for additional fin-tuning. This line of research was pioneered in the seminal works of Song & Ermon (2019), Kadkhodaie & Simoncelli (2020), Song et al. (2021), and Kawar et al. (2021), where the sampling process described in the previous section is adapted on-the-fly to address Bayesian inverse problems. In this setting, the user observes a realization $\mathbf{y}$ of a random variable $Y \in \mathbb{R}^{d_{\mathbf{y}}}$ , assumed to be drawn from the distribution with density $p_Y(\mathbf{y}) \coloneqq \int g_0(\mathbf{y}|\mathbf{x})p_0(\mathbf{x})\mathrm{d}\mathbf{x}$ , where $g_0(\mathbf{y}|\mathbf{x})$ is a likelihood term that encapsulates the knowledge of the forward model. A typical example is inverse problems with Gaussian noise, i.e. $g_0(\mathbf{y}|\mathbf{x}) = \mathrm{N}(\mathbf{y};\mathbf{A}(\mathbf{x}),\boldsymbol{\Sigma}_{\mathbf{y}})$ , where $\mathbf{A}:\mathbb{R}^d\to \mathbb{R}^{d_{\mathbf{y}}}$ and $\boldsymbol{\Sigma}_{\mathbf{y}}$ is a covariance matrix. The objective is to recover plausible underlying signals $\mathbf{x}$ , for which prior information is encoded in $p_0$ . This recovery is achieved by sampling from the posterior distribution + +$$ +\pi_ {0} ^ {\mathbf {y}} (\mathbf {x} _ {0}) \propto g _ {0} (\mathbf {y} | \mathbf {x} _ {0}) p _ {0} (\mathbf {x} _ {0}). +$$ + +A common approach to constructing a sampler for this posterior distribution is to adopt the diffusion model framework by sequentially sampling from the smoothed distributions $\pi_T^{\mathbf{y}},\dots,\pi_1^{\mathbf{y}}$ , which are defined analogously to those introduced in the previous section: + +$$ +\pi_ {t} ^ {\mathbf {y}} \left(\mathbf {x} _ {t}\right) := \int q _ {t | 0} \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {0}\right) \pi_ {0} ^ {\mathbf {y}} \left(\mathbf {x} _ {0}\right) \mathrm {d} \mathbf {x} _ {0}. \tag {5} +$$ + +Following the derivations above, sampling these distributions backwards in time is feasible provided that the conditional denoisers $(D_t^{\mathbf{y}})_{t=1}^T$ are accessible. Each conditional denoiser is defined by + +$$ +D _ {t} ^ {\mathbf {y}} (\mathbf {x} _ {t}) := \int \mathbf {x} _ {0} \pi_ {0 | t} ^ {\mathbf {y}} (\mathbf {x} _ {0} | \mathbf {x} _ {t}) \mathrm {d} \mathbf {x} _ {0}, +$$ + +where the conditional posterior $\pi_{0|t}^{\mathbf{y}}(\mathbf{x}_0|\mathbf{x}_t)$ is given by $\pi_{0|t}^{\mathbf{y}}(\mathbf{x}_0|\mathbf{x}_t) \propto \pi_0^{\mathbf{y}}(\mathbf{x}_0)q_{t|0}(\mathbf{x}_t|\mathbf{x}_0)$ . By analogy with the smoothed distributions defined for the prior, we obtain that + +$$ +\begin{array}{l} \pi_ {t} ^ {\mathbf {y}} (\mathbf {x} _ {t}) \propto \int g _ {0} (\mathbf {y} | \mathbf {x} _ {0}) q _ {t | 0} (\mathbf {x} _ {t} | \mathbf {x} _ {0}) p _ {0} (\mathbf {x} _ {0}) d \mathbf {x} _ {0} \\ \propto g _ {t} (\mathbf {y} | \mathbf {x} _ {t}) p _ {t} (\mathbf {x} _ {t}), \tag {6} \\ \end{array} +$$ + +where + +$$ +g _ {t} (\mathbf {y} | \mathbf {x} _ {t}) := \int g _ {0} (\mathbf {y} | \mathbf {x} _ {0}) p _ {0 | t} (\mathbf {x} _ {0} | \mathbf {x} _ {t}) d \mathbf {x} _ {0}, \tag {7} +$$ + +and we used that $p_0(\mathbf{x}_0)q_{t|0}(\mathbf{x}_t|\mathbf{x}_0) = p_{0|t}(\mathbf{x}_0|\mathbf{x}_t)p_t(\mathbf{x}_t)$ . Next, using the Tweedie formula, the posterior and prior denoisers can be related as + +$$ +D _ {t} ^ {\mathbf {y}} (\mathbf {x} _ {t}) = D _ {t} (\mathbf {x} _ {t}) + \alpha_ {t} ^ {- 1} \sigma_ {t} ^ {2} \nabla \log g _ {t} (\mathbf {y} | \mathbf {x} _ {t}). \qquad (8) +$$ + +This shows that in order to estimate $D_t^{\mathbf{y}}$ we only need to estimate $\nabla \log g_t(\mathbf{y}|\cdot)$ , as we already have access to a pretrained parametric approximation of $D_{t}$ . A widely used approximation of this likelihood term (Ho et al., 2022; Chung et al., 2023), which we will also use in the next section, is + +$$ +\hat {g} _ {t} ^ {\theta} (\mathbf {y} | \mathbf {x} _ {t}) := g (\mathbf {y} | D _ {t} ^ {\theta} (\mathbf {x} _ {t})), \tag {9} +$$ + +and amounts to approximating the posterior distribution $p_{0|t}(\cdot|\mathbf{x}_t)$ with a Dirac mass at $D_t^\theta(\mathbf{x}_t)$ , which we express as $p_{0|t}(\cdot|\mathbf{x}_t) \approx \delta_{D_t^\theta(\mathbf{x}_t)}$ with a slight abuse of notation. To improve the quality of the sample, $\nabla \log \hat{g}_t^\theta(\mathbf{y}|\mathbf{x}_t)$ is rescaled with a suitable weight (possibly depending on $\mathbf{x}_t$ ); see (Ho et al., 2022, Equation 8) and (Chung et al., 2023, Algorithm 1). We emphasize that the rescalings generally used are only heuristic. Compared to previous works, methods that perform guidance using the approximation (9) incur additional computational overhead due to the calculation of a vector-Jacobian product when evaluating $\nabla \log \hat{g}_t^\theta(\mathbf{y}|\mathbf{x}_t)$ . Nevertheless, subsequent works using this approximation have shown remarkable improvements in performance across various applications; see for example (Song et al., 2023a; Rozet & Louppe, 2023; Yu et al., 2023; Wu et al., 2023; Jiang et al., 2023; Rozet et al., 2024; Moufad et al., 2024). + +# 3 Guidance with mixtures + +We now present our main contribution: a novel density approximation of the smoothed posteriors $\pi_t^{\mathbf{y}}$ . Since their scores are intractable, gradient-based samplers cannot be directly applied. Thus, we develop a Gibbs sampling scheme targeting a data augmentation of our smoothed posterior approximation, marking our second key contribution. + +In the next two sections we develop an algorithm for the ideal generative model, i.e., we assume that we have at hand the true marginals $p_t$ and backward transitions $p_{s|t}$ ; then, in Section 3.2, we provide a practical implementation involving the learned model. + +# 3.1 Guidance approximation + +We begin by extending the likelihood approximation in (9) introduced by Ho et al. (2022); Chung et al. (2023). First, note that by combining (2) with (7), we find that $g_{t}(\mathbf{y}|\cdot)$ satisfies + +$$ +g _ {t} (\mathbf {y} | \mathbf {x} _ {t}) = \int g _ {s} (\mathbf {y} | \mathbf {x} _ {s}) p _ {s | t} (\mathbf {x} _ {s} | \mathbf {x} _ {t}) \mathrm {d} \mathbf {x} _ {s}, +$$ + +for all $t \in [[1, T]]$ and $s \in [[0, t - 1]]$ . Thus, we obtain $t - 1$ different approximations of $g_t(\mathbf{y}|\cdot)$ by simply setting, for $s \in [[1, t - 1]]$ , + +$$ +\hat {g} _ {t} ^ {s} (\mathbf {y} | \mathbf {x} _ {t}) := \int \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) p _ {s \mid t} \left(\mathbf {x} _ {s} \mid \mathbf {x} _ {t}\right) d \mathbf {x} _ {s}, \quad t \geq 2, \tag {10} +$$ + +where $\hat{g}_s(\mathbf{y}|\cdot)$ denotes the counterpart of (9), with the learned denoiser $D_s^\theta$ replaced by the true denoiser $D_s$ . In contrast to $\hat{g}_t^\theta (\mathbf{y}|\cdot)$ in (9), the scores of these approximations remain intractable even when the approximate model is used, as they involve an intractable integral. Instead, we take a different approach and use $\hat{g}_t^s (\mathbf{y}|\cdot)$ to define density approximations + +$$ +\hat {\pi} _ {t} ^ {s} \left(\mathbf {x} _ {t}\right) := \frac {\hat {g} _ {t} ^ {s} \left(\mathbf {y} \mid \mathbf {x} _ {t}\right) p _ {t} \left(\mathbf {x} _ {t}\right)}{\int \hat {g} _ {t} ^ {s} \left(\mathbf {y} \mid \mathbf {x} _ {t} ^ {\prime}\right) p _ {t} \left(\mathbf {x} _ {t} ^ {\prime}\right) \mathrm {d} \mathbf {x} _ {t} ^ {\prime}} \tag {11} +$$ + +of the smoothed posteriors $\pi_t^{\mathbf{y}}$ . Since we have $t - 1$ such approximations, we consider a weighted mixture approximation of $\pi_t^{\mathbf{y}}$ defined, for $t \geq 1$ , as + +$$ +\hat {\pi} _ {t} ^ {\mathbf {y}} \left(\mathbf {x} _ {t}\right) := \sum_ {s = 1} ^ {t - 1} \omega_ {t} ^ {s} \hat {\pi} _ {t} ^ {s} \left(\mathbf {x} _ {t}\right), \tag {12} +$$ + +where $(\omega_{t}^{s})_{s = 1}^{t - 1}$ are time-dependent weights and $\sum_{s = 1}^{t - 1}\omega_t^s =$ 1 with $\omega_{t}^{s}\geq 0$ . Then, to sample approximately from $\pi_0^{\mathbf{y}}$ we can use a sequential sampling procedure that runs through the intermediate distributions $\hat{\pi}_{T}^{\mathbf{y}},\dots ,\hat{\pi}_{1}^{\mathbf{y}}$ Similar sequential sampling procedures from posterior sequences different from $(\pi_t^{\mathbf{y}})_t$ have also been utilized in previous works. For instance, Wu et al. (2023); Rozet & Louppe (2023) use $\hat{\pi}_t^{\mathbf{y}}(\mathbf{x}_t)\propto \hat{g}_t(\mathbf{y}|\mathbf{x}_t)p_t(\mathbf{x}_t)$ . Our approach differs from these prior works by employing a mixture-based formulation with non-standard approximations of $\pi_t^{\mathbf{y}}$ . However, sampling from $\pi_t^{\mathbf{y}}()$ remains a non-trivial challenge. Indeed, a naive procedure would consist in sampling an index $s\sim$ Categorical $(\{\omega_t^\ell \}_{\ell = 1}^{t - 1})$ and then use an approximate sampler only for $\hat{\pi}_t^s$ . However, we must address the intractability of both $\hat{\pi}_t^s (\cdot)$ and its score. In the next section, we propose a method that fully overcomes these challenges. The discussion on selecting the weight sequence $(\omega_{t}^{s})_{s = 1}^{t - 1}$ is postponed until after presenting the algorithm, more specifically at the beginning of Section 5. + +# 3.2 Data augmentation and Gibbs sampling + +We first detail how to sample from a single component $\hat{\pi}_t^s$ of the mixture (12) for given $t\in [[2,T]]$ and $s\in [[1,t - 1]]$ . Consider first the extended distribution + +$$ +\begin{array}{l} \overline {{\pi}} _ {0, s, t} ^ {\mathbf {y}} \big (\mathbf {x} _ {0}, \mathbf {x} _ {s}, \mathbf {x} _ {t} \big) \\ \propto p _ {0 | s} (\mathbf {x} _ {0} | \mathbf {x} _ {s}) \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) p _ {s | t} (\mathbf {x} _ {s} | \mathbf {x} _ {t}) p _ {t} (\mathbf {x} _ {t}). \tag {13} \\ \end{array} +$$ + +From the definitions in (12) and (10) it follows that $\hat{\pi}_t^s$ is the $\mathbf{x}_t$ -marginal of (13), i.e., + +$$ +\hat {\pi} _ {t} ^ {s} (\mathbf {x} _ {t}) = \int \overline {{\pi}} _ {0, s, t} ^ {\mathbf {y}} (\mathbf {x} _ {0}, \mathbf {x} _ {s}, \mathbf {x} _ {t}) \mathrm {d} \mathbf {x} _ {0} \mathrm {d} \mathbf {x} _ {s}. +$$ + +To sample approximately from $\hat{\pi}_t^s$ , we employ a sampler targeting $\overline{\pi}_{0,s,t}^y$ and retain only the $\mathbf{x}_t$ -coordinate of its output. + +Specifically, we use a Gibbs sampler (GS) (Geman & German, 1984; Casella & George, 1992; Gelfand, 2000), which, in this context, constructs a Markov chain $(\bar{X}_0^r,\bar{X}_s^r,\bar{X}_t^r)_{r\in \mathbb{N}}$ having $\overline{\pi}_{0,s,t}^{\mathbf{y}}$ as its stationary distribution. Denote by $\overline{\pi}_{s|0,t}^{\mathbf{y}}$ $\overline{\pi}_{t|0,s}^{\mathbf{y}}$ , and $\overline{\pi}_{0|s,t}^{\mathbf{y}}$ its three full conditionals given by + +$$ +\left\{ \begin{array}{l} \overline {{\pi}} _ {s | 0, t} ^ {\mathbf {y}} (\mathbf {x} _ {s} | \mathbf {x} _ {0}, \mathbf {x} _ {t}) = \frac {\hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) q _ {s | 0 , t} (\mathbf {x} _ {s} | \mathbf {x} _ {0} , \mathbf {x} _ {t})}{\int \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s} ^ {\prime}) q _ {s | 0 , t} (\mathbf {x} _ {s} ^ {\prime} | \mathbf {x} _ {0} , \mathbf {x} _ {t}) \mathrm {d} \mathbf {x} _ {s} ^ {\prime}}, \\ \overline {{\pi}} _ {t | 0, s} ^ {\mathbf {y}} (\mathbf {x} _ {t} | \mathbf {x} _ {0}, \mathbf {x} _ {s}) = q _ {t | s} (\mathbf {x} _ {t} | \mathbf {x} _ {s}), \\ \overline {{\pi}} _ {0 | s, t} ^ {\mathbf {y}} (\mathbf {x} _ {0} | \mathbf {x} _ {s}, \mathbf {x} _ {t}) = p _ {0 | s} (\mathbf {x} _ {0} | \mathbf {x} _ {s}). \end{array} \right. +$$ + +The proof of this fact is postponed to Appendix A.2. Then, one step of the associated (deterministic scan) GS is described in Algorithm 1. + +Algorithm 1 Gibbs sampler targeting (13) +1: Input: $(\bar{X}_0^r,\bar{X}_s^r,\bar{X}_t^r)$ +2: draw $\bar{X}_s^{r + 1}\sim \overline{\pi}_{s|0,t}^{\mathbf{y}}(\cdot |\bar{X}_0^r,\bar{X}_t^r)$ +3: draw $\bar{X}_t^{r + 1}\sim q_{t|s}(\cdot |\bar{X}_s^{r + 1})$ //noisings +4: draw $\bar{X}_0^{r + 1}\sim p_{0|s}(\cdot |\bar{X}_s^{r + 1})$ //denoising + +Since (13) admits $\hat{\pi}_t^s$ as marginal, the process $(\bar{X}_t^r)_{r\in \mathbb{N}}$ will, at stationarity of $(\bar{X}_0^r,\bar{X}_s^r,\bar{X}_t^r)_{r\in \mathbb{N}}$ , have $\hat{\pi}_t^{\mathbf{y}}$ as a marginal distribution. We provide basic background on Gibbs sampling in Appendix A.1 and refer the reader to (Casella & George, 1992). + +It is clear from Algorithm 1 that only the update of $\bar{X}_s^r$ depends on the observation $\mathbf{y}$ , while the updates of the remaining components are sampled via (i) a noising step involving the forward transition (1), which can be performed exactly, and (ii) a denoising step involving the prior diffusion model, which can be approximated using the pre-trained model. + +Finally, to target the mixture (12), we first sample the mixture index $s \sim \text{Categorical}\left(\{\omega_t^\ell\}_{\ell=1}^{t-1}\right)$ , which determines the component of the mixture $\hat{\pi}_t^Y(\mathbf{x}_t)$ . Next, we apply Algorithm 1 $R$ times to update the remaining coordinates, treating $s$ as fixed, and output the result $\bar{X}_t^R$ . Note that an alternative to our method would be to consider a Gibbs sampler for which one of its marginal is directly the mixture (12) incorporating also the mixture index $s$ as a state. However, this would then require sweeping over all states $(\bar{X}_0, \dots, \bar{X}_t)$ , rendering it computationally expensive and impractical. We discuss other possible data augmentations and their limitations in Appendix A.4. + +# 3.3 Practical implementation + +For simplicity, we present the algorithm in the case where we progressively sample from each $\hat{\pi}_t^{\mathbf{y}}$ for $t\in [[2,T]]$ . In practice, however, we subsample a small number $K$ of timesteps $(t_i)_{i = K}^1$ , with $t_1 > 1$ and $t_K = T$ , and apply the algorithm only to $(\hat{\pi}_{t_i}^{\mathbf{y}})_{i = K}^i$ . + +Algorithm 2 MIXTURE-GUIDED DIFFUSION MODEL +1: Input: Timesteps $(t_i)_{i=1}^K$ with $t_1 > 1$ and $t_K = T$ , Gibbs repetitions $R$ , DDPM steps $M$ , gradient steps $G$ , probabilities $\{\omega_{t_i}^\ell\}_{i = K,\ell = 1}^{2,t_i - 1}$ +2: $\hat{X}_{t_K} \sim \mathcal{N}(0_d, \mathbf{I}_d)$ +3: $\hat{X}_0 \gets D_{t_K}^\theta (\hat{X}_{t_K}), \hat{X}_0^* \gets \hat{X}_0$ +4: for $i = K$ to 2 do +5: $s \sim \text{Categorical}(\{\omega_{t_i}^\ell\}_{\ell=1}^{t_i-1})$ +6: $\hat{X}_0 \gets \hat{X}_0^*$ +7: $\hat{X}_{t_i} \sim q_{t_i|0,t_i+1}(\cdot|\hat{X}_0^*, \hat{X}_{t_i+1})$ +8: for $r = 1$ to $R$ do +9: $\hat{X}_s \gets \text{Gauss\_VI}(\hat{X}_0, \hat{X}_{t_i}, s, G) \quad // \text{see A.3}$ +10: $\hat{X}_0 \gets \text{DDPM}(\hat{X}_s, s, M)$ +11: $\hat{X}_{t_i} \sim q_{t_i|s}(\cdot|\hat{X}_s)$ +12: end for +13: $\hat{X}_0^* \gets \hat{X}_0$ +14: end for +15: Output: $X_0^*$ + +![](images/cba82f39e7824d571547d94fb1273f2b91bd3c2397d52ff9689dbb50f76c4b24.jpg) +Figure 1: Evolution of $\hat{X}_0^*$ throughout the iterations for MGDM and DAPS (Zhang et al., 2024). + +The denoising step in Algorithm 1 can be approximated by sampling from the learned diffusion model. To reduce runtime, we again subsample a small number of timesteps $\{s_i\}_{i = 0}^M\subset [[0,s - 1]]$ ensuring that $s_0 = 0$ and $s_M = s$ . We then generate $(X_{s_i})_{i = 0}^M$ by sampling iteratively $X_{s_i}\sim p_{s_i|s_{i + 1}}^\theta (\cdot |X_{s_{i + 1}})$ and retaining only $X_{s_0}$ . This operation is referred to as $\mathrm{DDPM}(\cdot ,s,M)$ on Line 10 in Algorithm 2. As for the step involving $\hat{\pi}_{s|0,t}^{\mathbf{y}}$ , we follow Moufad et al. (2024) and sample approximately by fitting a Gaussian variational approximation. More specifically, given $(\mathbf{x}_0,\mathbf{x}_t)$ , we draw from the Gaussian variational approximation $\lambda_{s|0,t}^{\varphi}:= \mathcal{N}\big(\pmb {\mu}_{s|0,t},\mathrm{diag}(\mathrm{e}^{\pmb {\rho}_{s|0,t}})\big)$ where the parameters $\varphi_{s|0,t}:= (\pmb {\mu}_{s|0,t},\pmb {\rho}_{s|0,t})\in \mathbb{R}^d\times \mathbb{R}^d$ are obtained by optimizing the right-hand side of + +$$ +\begin{array}{l} \mathsf {K L} \left(\lambda_ {s | 0, t} ^ {\varphi} \| \pi_ {s | 0, t} ^ {\mathbf {y}} \left(\cdot | \mathbf {x} _ {0}, \mathbf {x} _ {t}\right)\right) \\ \approx - \mathbb {E} \big [ \log \hat {g} _ {s} ^ {\theta} (\mathbf {y} | \hat {X} _ {s} ^ {\varphi}) \big ] + \mathsf {K L} (\lambda_ {s | 0, t} ^ {\varphi} \| q _ {s | 0, t} (\cdot | \mathbf {x} _ {0}, \mathbf {x} _ {t})), \\ \end{array} +$$ + +where $\hat{X}_s^\varphi \sim \lambda_{s|0,t}^\varphi$ . The gradient of this quantity can be estimated straightforwardly using the reparameterization trick (Kingma & Welling, 2013). The initial parameters $\varphi_{s|0,t}$ are set to the mean and covariance of $q_{s|0,t}(\cdot|\mathbf{x}_0,\mathbf{x}_t)$ + +defined in (3). This step corresponds to the Gauss_VI routine in Algorithm 2 and is detailed in Appendix A.3. Regarding the initialization of the GS for $\hat{\pi}_t^y$ , we use the output of the previous GS targeting $\hat{\pi}_{t + 1}^y$ ; see Lines 6 and 7 in Algorithm 2. We maintain a running variable $\hat{X}_0^*$ which is iteratively updated and serves as the initialization for the other variables at the beginning of each loop iteration. It is also the output of the algorithm. Indeed, note that the last distribution to which we apply the GS is $\overline{\pi}_{0,1,2}^{\mathbf{y}}(\mathbf{x}_0,\mathbf{x}_1,\mathbf{x}_2)$ of which the $\mathbf{x}_0$ -marginal is proportional to $p_0(\mathbf{x}_0)\int \hat{g}_1(\mathbf{y}|\mathbf{x}_1)q_{1|0}(\mathbf{x}_1|\mathbf{x}_0)\mathrm{d}\mathbf{x}_1$ . Since the Gaussian density $q_{1|0}(\cdot |\mathbf{x}_0)$ has a very small variance and $\hat{g}_1(\mathbf{y}|\cdot)\approx g_0(\mathbf{y}|\cdot)$ , we may assume that $\int \hat{g}_1(\mathbf{y}|\mathbf{x}_1)q_{1|0}(\mathbf{x}_1|\mathbf{x}_0)\mathrm{d}\mathbf{x}_1\approx g_0(\mathbf{y}|\mathbf{x}_0)$ and hence that the posterior $\pi_0^y$ of interest is approximately the $\mathbf{x}_0$ -marginal of the last extended distribution. As a result, we can take the $\mathbf{x}_0$ -coordinate of the output of the last GS, which is $\hat{X}_0$ and hence $\hat{X}_0^*$ , as an approximate sample from $\pi_0^y$ . In the first row of Figure 1 we display the evolution of $\hat{X}_0^*$ throughout the iterations with a DDM pre-trained on the FFHQ dataset. It is seen that the algorithm reaches a plausible reconstruction of $\mathbf{y}$ rather fast, at $t = 800$ with $T = 1000$ , and then spends the remaining iterations refining the details. As a comparison, the DAPS algorithm proposed by Zhang et al. (2024), which displayed in the second row, also maintains a running variable at time 0 that serves as output to the algorithm. + +# 4 Related works + +Alternative likelihood approximations. In addition to this work, several other papers introduce alternative approximations of $g_{t}(\mathbf{y}|\cdot)$ . (Song et al., 2023a) proposes a Gaussian approximation of $p_{0|t}$ with mean given by the denoiser $D_t^\theta$ and covariance being left as a hyperparameter. For linear inverse problems with Gaussian noise, the likelihood $g_{0}(\mathbf{y}|\cdot)$ can be integrated exactly against this Gaussian approximation, providing an alternative approximation of $g_{t}(\mathbf{y}|\cdot)$ . Finzi et al. (2023); Stevens et al. (2023); Boys et al. (2023) use that the covariance of $p_{0|t}(\cdot|\mathbf{x}_t)$ is proportional to the Jacobian of the denoiser (Meng et al., 2021). Computing the score of the resulting likelihood approximation, for linear inverse problems, is prohibitively expensive. To mitigate this, these works and subsequent ones assume that the Jacobian of the denoiser is constant with respect to $\mathbf{x}_t$ . Despite this simplification, the score approximation still involves an expensive matrix inversion. Boys et al. (2023) use diagonal approximation of the covariance based on its row sums. Rozet et al. (2024) use conjugate gradient to perform the matrix inversion efficiently. For general likelihoods $g_{0}(\mathbf{y}|\cdot)$ , Song et al. (2023b) use Gaussian approximations of Song et al. (2023a) to estimate $g_{t}(\mathbf{y}|\cdot)$ using a standard Monte Carlo approach. For latent diffusion models, Rout et al. (2024) apply the approximation in (9) together with a regularization term that penalizes latent variables deviating from + +![](images/ebc32eaceace388af6daabe76c3533193530ae78a8cf90f29d19a5b61addc5e6.jpg) +Figure 2: MGDM sample images for various tasks on ImageNet (left) and FFHQ (right) datasets. + +![](images/b4758d26c31b496665daa7516dcf7d2b71f7e8303d64fcf151cad57b5b81299d.jpg) + +fixed points of the decoder-encoder composition. Moufad et al. (2024) propose a general method for both vanilla and latent space diffusion models. At step $t$ of the diffusion process they first sample, at an intermediate timestep $s < t$ , a state conditionally on $y$ with the approximation (9), before returning back to the timestep $t$ . In Appendix A.5 we explain in more details how the present work differs from this method. + +Asymptotically exact methods. Trippe et al. (2023); Wu et al. (2023); Cardoso et al. (2024); Dou & Song (2024); Corenflos et al. (2024); Li et al. (2024) use the sequential Monte Carlo (SMC) framework to construct an empirical approximation of the posterior distribution represented by $N$ samples. The samples undergo transitions guided by user-defined updates, are reweighted using an appropriate importance weight, and are subsequently resampled to focus computational effort on the most promising candidates. The performance of these methods improves by scaling the number of samples $N$ , which impacts both the memory requirement and compute time. As evidenced by the experiments in the next section, our method improves by increasing the number of Gibbs steps, which impacts only the runtime. + +Gibbs sampling approaches. The recent works (Wu et al., 2024; Xu & Chi, 2024) on PNP-DM also propose a Gibbs sampling-inspired algorithm. They consider (within the variance exploding framework) the distribution sequence $(\tilde{\pi}_t^{\mathbf{y}})_{t=0}^T$ , where each distribution $\tilde{\pi}_t^{\mathbf{y}}(\mathbf{x}_t) \propto g_0(\mathbf{y}|\mathbf{x}_t)p_t(\mathbf{x}_t)$ is the $\mathbf{x}_t$ -marginal of the extended distribution + +$$ +\tilde {\pi} _ {0, t} ^ {\mathbf {y}} (\mathbf {x} _ {0}, \mathbf {x} _ {t}) \propto g _ {0} (\mathbf {y} | \mathbf {x} _ {t}) p _ {0} (\mathbf {x} _ {0}) q _ {t | 0} (\mathbf {x} _ {t} | \mathbf {x} _ {0}). +$$ + +As its full conditionals are $\tilde{\pi}_{0|t}^{\mathbf{y}}(\mathbf{x}_0|\mathbf{x}_t) = p_{0|t}(\mathbf{x}_0|\mathbf{x}_t)$ and $\tilde{\pi}_{t|0}^{\mathbf{y}}(\mathbf{x}_t|\mathbf{x}_0) \propto g_0(\mathbf{y}|\mathbf{x}_t)q_{t|0}(\mathbf{x}_t|\mathbf{x}_0)$ , the GS targeting this joint distribution also proceeds with a prior denoising step. + +On the other hand, sampling from $\tilde{\pi}_{t|0}^{\mathbf{y}}(\cdot|\mathbf{x}_0)$ can be performed exactly when $g_0(\mathbf{y}|\cdot)$ is the likelihood of a linear inverse problem with Gaussian noise, since $q_{t|0}(\cdot|\mathbf{x}_0)$ is a Gaussian distribution. For more general problems, this step can be implemented using MCMC methods; see e.g. (Xu & Chi, 2024, Algorithms 3 & 4). Compared to our algorithm, PNP-DM has a lower memory footprint because it does not require a vector-Jacobian product as it uses the likelihood $g_0(\mathbf{y}|\cdot)$ instead of $\hat{g}_t(\mathbf{y}|\cdot)$ . However, as we show in the next section, this comes at the cost of performance, especially when using latent diffusion models. The REPAINT algorithm (Lugmayr et al., 2022), which applies to noiseless linear inverse problems, uses noisng and denoising steps repeatedly and can also be viewed as a variant of a specific Gibbs sampler. Finally, the recently proposed DAPS (Zhang et al., 2024) can also be related to a Gibbs sampler targeting a specific sequence of distributions. Further details and comparisons to MGDM are provided in Appendix A.5. + +# 5 Experiments + +We evaluate MGDM on image inverse problems using both pixel-space and latent-space diffusion, as well as on musical source separation tasks. For the pixel-space diffusion and the audio diffusion model, we compare MGDM against seven competitors: DPS (Chung et al., 2023), PGDM (Song et al., 2023a), DDNM (Wang et al., 2023), DIFFPIR (Zhu et al., 2023), REDDIFF (Mardani et al., 2024), DAPS (Zhang et al., 2024), and PNP-DM (Wu et al., 2024). In the latent space setting, we benchmark against four competitors: PSLD (Rout et al., 2024), RESAMPLE (Song et al., 2024), DAPS (Zhang et al., 2024), and PNP-DM (Wu et al., 2024). In Appendixes B.2-B.4, we provide a complete formal description of the parameters of our algorithm as well as the implementation details of each competitor and its hyperparameters. We emphasize that we have tuned the parameters + +Table 1: Mean LPIPS for linear/nonlinear imaging tasks on the FFHQ and ImageNet datasets with ${\sigma }_{\mathbf{y}} = {0.05}$ . Lower metrics are better. + +
TaskFFHQImageNet
MGDMDPSPGDMDDNMDIFFPIRREDIFFDAPSPNP-DMMGDMDPSPGDMDDNMDIFFPIRREDIFFDAPSPNP-DM
SR (×4)0.090.090.300.150.100.390.160.100.260.250.560.340.310.570.370.66
SR (×16)0.240.230.420.330.230.550.400.290.550.440.620.710.500.850.751.03
Box inpainting0.100.170.170.120.140.190.130.180.230.350.290.280.300.360.300.42
Half mask0.200.240.240.230.250.280.230.320.310.400.340.380.400.460.400.54
Gaussian Deblur0.120.170.870.200.120.240.240.140.300.371.000.450.300.530.590.76
Motion Deblur0.090.17---0.220.190.210.220.40---0.390.420.52
JPEG (QF = 2)0.140.341.12--0.320.220.290.380.601.32--0.490.450.56
Phase retrieval0.110.40---0.260.140.340.550.62---0.610.500.66
Nonlinear deblur0.270.51---0.680.280.310.410.82---0.660.410.49
HDR0.120.40---0.200.100.190.210.84---0.190.140.31
+ +of our algorithm per dataset and not per task. + +Index sampling and Gibbs steps. During the first $75\%$ of the diffusion process, at timestep $t_i$ , we sample the index $s$ from $\mathrm{Uniform}[\tau, t_{i-1}]$ with $\tau = 10$ to mitigate instabilities. In the final $25\%$ of the steps we set $s = t_{i-1}$ as this yields slightly improved results. On the image inverse problems we use 100 diffusion steps with $R = 1$ Gibbs step. On the source separation task we use 20 diffusion steps with $R = 6$ Gibbs steps. The choice of weight sequence $\{\omega_t^{\ell}\}_{t=T,\ell=1}^{2,t-1}$ plays an important role for the algorithm's performance. Intuitively, it holds that that $\hat{g}_t^s(\mathbf{y}|\cdot) \approx g_t(\mathbf{y}|\cdot)$ when $s \approx 0$ , suggesting that for all $t \in [2,T]$ , the weights should be set to 0 beyond a certain threshold to ensure that $s$ is sampled near 0. We found, however, that this strategy does not yield good performance for our algorithm. Instead, sampling the index uniformly leads to a faster mixing. On high-dimensional image datasets, we observe that when $s$ is consistently sampled near 0 at all iterations, the algorithm struggles to overcome the errors that accumulate at initialization, leading to suboptimal reconstructions. We provide both quantitative and qualitative evidence in Appendix B.1. + +Images. We evaluate our method on a diverse set of six linear inverse problems and four nonlinear inverse problems with three different image priors with $256 \times 256$ resolution: the pixel-space FFHQ model of Choi et al. (2021), the latent-space FFHQ of Rombach et al. (2022), and the ImageNet model of Dhariwal & Nichol (2021). We use the noise level $\sigma_{\mathbf{y}} = 0.05$ for all tasks. The linear problems include image inpainting with two masking configurations: a $150 \times 150$ central box mask and a half-mask covering the right side of the image; Super Resolution (SR) tasks with upscaling factors of $\times 4$ and $\times 16$ ; Gaussian and motion deblurring, both using a kernel size of $61 \times 61$ following the experimental setup described by Chung et al. (2023, Section 4). For the nonlinear setting, we consider JPEG dequantization with a quality factor of $2\%$ , implemented using the differentiable operator proposed by Shin & Song (2017); phase retrieval with an oversampling factor of $\times 2$ ; non-uniform deblurring using the operator introduced by Tran et al. (2021); High Dynamic Range (HDR) reconstruction following the setup detailed in Mardani et al. (2024, Section 5.2). The + +evaluation is done on a subset of 300 validation images per dataset. For FFHQ, we use the first 300 images, while for ImageNet, we randomly sample 300 images to avoid class bias. We report the LPIPS metric (Zhang et al., 2018) in Tables 1 and 2 and defer the complete tables with FID, PSNR and SSIM along side $95\%$ confidence interval to Table 6, Table 7, and Table 8. For the phase retrieval task specifically, we draw 4 samples for each algorithm and keep only the best scoring one in terms of LPIPS. A similar strategy is used in (Chung et al., 2023; Zhang et al., 2024; Wu et al., 2024). Across table rows, we highlight the best value in $\square$ , the $2^{\text{nd}}$ best in $\square$ and $3^{\text{rd}}$ best in $\square$ . We provide a large gallery of exemplar reconstructions in Appendix B.9. Aside, we also extend our evaluation to higher-noise setup and Poisson-noise likelihood in Appendix B.8 and Appendix B.9. + +Results. Our method with a single Gibbs step consistently achieves competitive performance, ranking first on most tasks and standing out as the only approach to maintain robust performance across all tasks. On latent FFHQ, we outperform RESAMPLE and PSLD, both of which are specifically designed for latent problems, while our method is applied seamlessly off-the-shelf without any adaptation to latent diffusion. Qualitative comparisons in Figure 2 and in Appendix B.9 reveal that our method provides diverse, visually coherent and sharp reconstructions. In contrast, DAPS, DDNM and DIFFPIR, despite scoring higher in PSNR and SSIM on some tasks, provide less coherent reconstructions; see Appendix B.6 for a discussion and examples. Finally, a key strength of our algorithm is its ability to improve performance by increasing the number $R$ of Gibbs steps. This is demonstrated for the most challenging task, phase retrieval, in Figure 3. In this experiment, we compute the LPIPS using a single sample per image (instead of four) and achieve a threefold reduction in average LPIPS simply by increasing the compute time in the right direction. Indeed, increasing the number of gradient steps brings only marginal gains in this case whereas increasing the number of Gibbs steps leads to significant performance gains. + +Source separation. We now consider a linear inverse problem with an audio diffusion prior that generates four dependent instrument soundtracks: bass, drums, guitar, and + +Table 2: Mean LPIPS for linear/nonlinear imaging tasks on FFHQ dataset with LDM prior and ${\sigma }_{\mathbf{y}} = {0.05}$ . Lower metrics are better. + +
TaskMGDMRESAMPLEPSLDDAPSPNP-DM
SR (×4)0.140.220.210.280.40
SR (×16)0.300.380.360.520.71
Box inpainting0.180.220.270.370.31
Half mask0.260.300.320.490.44
Gaussian Deblur0.180.160.590.320.32
Motion Deblur0.220.200.700.360.36
JPEG (QF = 2)0.230.26-0.320.36
Phase retrieval0.290.39-0.250.50
Nonlinear deblur0.290.33-0.370.37
High dynamic range0.160.12-0.240.24
+ +
R=1R=2R=4R=6R=1,G>1
Bass15.4618.0718.5318.4919.89
Drums16.2817.9318.1918.0718.95
Guitar12.5814.7316.2616.6816.07
Piano11.8214.3415.3816.1716.50
All14.0316.2717.0917.3517.85
+ +![](images/e62d1ddcff06b6be274e4f40d0a9fc3ab55e6f8dfcf32d4f3dda56184b836c9c.jpg) +Figure 3: Performance of MGDM as a function of the number of Gibbs steps $R$ . The setup $R = 1, G \gg 1$ represents MGDM with $R = 1$ and a number of gradient steps resulting in a runtime equivalent to using $R = 6$ . Left: Mean SI-SDRI for multisource-audio separation task on slakh2100 test dataset. Right: Mean LPIPS for the phase retrieval task on FFHQ. + +piano. The task involves separating the individual sources from a mixture $\mathbf{y}$ of these four instruments; i.e. denoting by $d'$ the dimension of one instrument soundtrack, the linear operator is $\mathbf{A}:\mathbf{x}\in \mathbb{R}^{4\times d'}\mapsto \sum_{i = 1}^{4}\mathbf{x}_i\in \mathbb{R}^{d'}$ . We assume no noise in the measurement and use the audio diffusion model of Mariani et al. (2023). The evaluation is conducted on the publicly available slakh2100 test dataset (Manilow et al., 2019) with the scale-invariant SDR improvement (SI-SDRI) metric (Roux et al., 2019). The SI-SDRI metric measures the improvement between the original audio source $\mathbf{x}_i$ and the generated source $\hat{\mathbf{x}}_i$ , relative to the mixture baseline $\mathbf{y}$ , i.e. it computes the difference SI-SDR( $\mathbf{x}_i,\hat{\mathbf{x}}_i$ ) - SI-SDR( $\mathbf{x}_i,\mathbf{y}$ ) where + +$$ +\mathrm {S I - S D R} (\mathbf {x} _ {i}, \hat {\mathbf {x}} _ {i}) = 1 0 \log_ {1 0} \frac {\| \alpha \mathbf {x} _ {i} \| ^ {2} + \epsilon}{\| \alpha \mathbf {x} _ {i} - \hat {\mathbf {x}} _ {i} \| ^ {2} + \epsilon}, +$$ + +where $\alpha = \frac{\mathbf{x}_i^\top\hat{\mathbf{x}}_i + \epsilon}{\|\mathbf{x}_i\|^{2} + \epsilon}$ , and $\epsilon = 10^{-8}$ . Following Mariani et al. (2023, Section 5.2), tracks from the test dataset are evaluated using a sliding window approach with 4-second chunks and a 2-second overlap. We report the SI-SDRI metric in Table 3. For this task we compare against three other competing algorithms. First, the best version of the MSDM algorithm in (Mariani et al., 2023) which uses the same pre-trained model and is directly comparable to our method. Then, the ISDM algorithm from the same paper and which relies on separate pre-trained models for each instrument, as well as the Demucs model (Défossez et al., 2019), trained with supervision to specifically solve source separation, augmented with 512 Gibbs sampling steps (Manilow et al., 2022) and + +Table 3: Mean SI-SDR1 on slakh2100 test dataset. The last row displays the mean over the four stems. Higher metrics are better. + +
StemsMGDMDPSPGDMDDNMMSDMISDMDEMUCS512
Bass18.4916.5016.4114.9417.1219.3617.16
Drums18.0718.2918.1419.0518.6820.9019.61
Guitar16.689.9012.8414.3815.3814.7017.82
Piano16.1710.4112.3111.4614.7314.1316.32
All17.3513.7714.9214.9616.4817.2717.73
+ +is, to the best of our knowledge, considered to be state-of-the-art. We refer to it as DEMUCS $_{512}$ . Finally, since the inverse problem is noiseless, we smooth it by using the likelihood $g_0(\mathbf{y}|\mathbf{x}) = \mathrm{N}(\mathbf{y}; \mathbf{A}(\mathbf{x}), \sigma_{\mathbf{y}}^2\mathbf{I}_{d_{\mathbf{y}}})$ with $\sigma_{\mathbf{y}} = 10^{-4}$ . This smoothing is applied consistently across all competitors except the best-performing versions of MSDM and ISDM, which are tailored for noiseless problems, and DEMUCS $_{512}$ . The results are reported in Table 3. Due to space constraints, we only show the best performing competitors and defer the complete table to Appendix B.6. + +Results. We outperform, on average, the other training-free competitors that use the same pre-trained model by a substantial margin. In particular, we outperform the MSDM algorithm of Mariani et al. (2023) as well as ISDM which uses a different model. With $R = 6$ Gibbs steps MGDM falls short of matching the performance DEMUCS512. We found instead that setting $R = 1$ and using a number of gradient steps ensuring equivalent runtime, as we did for the phase retrieval example, allows to achieve superior performance; see Figure 3. It is also seen that the average SI-SDRI increases monotonically with the number of Gibbs steps. + +# 6 Conclusion + +We have developed a novel posterior sampling scheme for denoising diffusion priors. The proposed algorithm proceeds by sequentially sampling, using a Gibbs sampler, from a sequence of mixture approximations of the smoothed posteriors. Our experiments show that MGDM not only matches but often surpasses state-of-the-art performance and reconstruction quality across various tasks. Furthermore, we have demonstrated that the Gibbs sampling perspective allows favorable performance improvement with inference-time compute scaling. + +This work has certain limitations that open avenues for further exploration. While we outperform the state-of-the-art on most tasks and remains competitive overall on latent diffusion, we still fall short of what we achieve with pixel-space diffusion. We believe that bridging this gap requires a more careful selection of the weight sequence. More broadly, an observation-driven approach to sampling the index could further enhance MGDM. A second limitation is that our methodology does not extend to ODE-based samplers or DDIM, and adapting related ideas to these methods + +is an interesting research direction. Finally, like all existing methods relying on (9), our approach incurs a higher memory cost compared to unconditional diffusion. It remains an open question whether the vector-Jacobian product can be eliminated without compromising performance. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# Acknowledgements + +The work of Y.J. and B.M. has been supported by Technology Innovation Institute (TII), project Fed2Learn. The work is supported by the Swedish Research Council, project 2024-05680. The work of Eric Moulines has been partly funded by the European Union (ERC-2022-SYG-OCEAN101071601). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them. This work was granted access to the HPC resources of IDRIS under the allocation 2025-AD011015980 made by GENCI. + +# References + +Boys, B., Girolami, M., Pidstrigach, J., Reich, S., Mosca, A., and Akyildiz, O. D. Tweedie moment projected diffusions for inverse problems. arXiv preprint arXiv:2310.06721, 2023. +Cardoso, G., el idrissi, Y. J., Corff, S. L., and Moulines, E. Monte carlo guided denoising diffusion models for bayesian linear inverse problems. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=nHESwXvxWK. +Casella, G. and George, E. I. Explaining the gibbs sampler. The American Statistician, 46(3):167-174, 1992. +Choi, J., Kim, S., Jeong, Y., Gwon, Y., and Yoon, S. Ilvr: Conditioning method for denoising diffusion probabilistic models. in 2021 ieee. In CVF international conference on computer vision (ICCV), volume 1, pp. 2, 2021. +Chung, H., Kim, J., McCann, M. T., Klasky, M. L., and Ye, J. C. Diffusion posterior sampling for general noisy inverse problems. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=OnD9zGAGT0k. + +Corenflos, A., Zhao, Z., Särkkä, S., Sjolund, J., and Schön, T. B. Conditioning diffusion models by explicit forward-backward bridging. arXiv preprint arXiv:2405.13794, 2024. +Daras, G., Chung, H., Lai, C.-H., Mitsufuji, Y., Milanfar, P., Dimakis, A. G., Ye, C., and Delbracio, M. A survey on diffusion models for inverse problems. 2024. URL https://giannisdaras.github.io/publications/diffusion_study.pdf. +Défossez, A., Usunier, N., Bottou, L., and Bach, F. Music source separation in the waveform domain. arXiv preprint arXiv:1911.13254, 2019. +Dhariwal, P. and Nichol, A. Diffusion models beat gans on image synthesis. Advances in neural information processing systems, 34:8780-8794, 2021. +Dong, C., Loy, C. C., He, K., and Tang, X. Image superresolution using deep convolutional networks. IEEE transactions on pattern analysis and machine intelligence, 38(2):295-307, 2015. +Dou, Z. and Song, Y. Diffusion posterior sampling for linear inverse problem solving: A filtering perspective. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=tplXNcHZs1. +Finzi, M. A., Boral, A., Wilson, A. G., Sha, F., and Zepeda-Nuñez, L. User-defined event sampling and uncertainty quantification in diffusion models for physical dynamical systems. In International Conference on Machine Learning, pp. 10136-10152. PMLR, 2023. +Gelfand, A. E. Gibbs sampling. Journal of the American statistical Association, 95(452):1300-1304, 2000. +Geman, S. and Geman, D. Stochastic relaxation, gibbs distributions, and the bayesian restoration of images. IEEE Transactions on pattern analysis and machine intelligence, (6):721-741, 1984. +Ho, J., Jain, A., and Abbeel, P. Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems, 33:6840-6851, 2020. +Ho, J., Salimans, T., Gritsenko, A., Chan, W., Norouzi, M., and Fleet, D. J. Video diffusion models. Advances in Neural Information Processing Systems, 35:8633-8646, 2022. +Isola, P., Zhu, J.-Y., Zhou, T., and Efros, A. A. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1125-1134, 2017. + +Jiang, C., Cornman, A., Park, C., Sapp, B., Zhou, Y., Anguelov, D., et al. Motiondiffuser: Controllable multiagent motion prediction using diffusion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9644-9653, 2023. +Kadkhodaie, Z. and Simoncelli, E. P. Solving linear inverse problems using the prior implicit in a denoiser. arXiv preprint arXiv:2007.13640, 2020. +Kawar, B., Vaksman, G., and Elad, M. Snips: Solving noisy inverse problems stochastically. Advances in Neural Information Processing Systems, 34:21757-21769, 2021. +Kawar, B., Elad, M., Ermon, S., and Song, J. Denoising diffusion restoration models. Advances in Neural Information Processing Systems, 35:23593-23606, 2022. +Kingma, D. P. and Welling, M. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. +Ledig, C., Theis, L., Huszar, F., Caballero, J., Cunningham, A., Acosta, A., Aitken, A., Tejani, A., Totz, J., Wang, Z., et al. Photo-realistic single image super-resolution using a generative adversarial network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4681-4690, 2017. +Li, X., Zhao, Y., Wang, C., Scalia, G., Eraslan, G., Nair, S., Biancalani, T., Ji, S., Regev, A., Levine, S., et al. Derivative-free guidance in continuous and discrete diffusion models with soft value-based decoding. arXiv preprint arXiv:2408.08252, 2024. +Lugmayr, A., Danelljan, M., Romero, A., Yu, F., Timofte, R., and Van Gool, L. Repaint: Inpainting using denoising diffusion probabilistic models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11461-11471, 2022. +Manilow, E., Wichern, G., Seetharaman, P., and Le Roux, J. Cutting music source separation some slakh: A dataset to study the impact of training data quality and quantity. In 2019 IEEE Workshop on Applications of Signal Processing to Audio and Acoustics (WASPAA), pp. 45-49, 2019. doi: 10.1109/WASPAA.2019.8937170. +Manilow, E., Hawthorne, C., Huang, C.-Z. A., Pardo, B., and Engel, J. Improving source separation by explicitly modeling dependencies between sources. In ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 291-295. IEEE, 2022. +Mardani, M., Song, J., Kautz, J., and Vahdat, A. A variational perspective on solving inverse problems with diffusion models. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=1YO4EE3SPB. + +Mariani, G., Tallini, I., Postolache, E., Mancusi, M., Cosmo, L., and Rodola, E. Multi-source diffusion models for simultaneous music generation and separation. arXiv preprint arXiv:2302.02257, 2023. +Meng, C., Song, Y., Li, W., and Ermon, S. Estimating high order gradients of the data distribution by denoising. Advances in Neural Information Processing Systems, 34: 25359-25369, 2021. +Moufad, B., Janati, Y., Bedin, L., Durmus, A., Douc, R., Moulines, E., and Olsson, J. Variational diffusion posterior sampling with midpoint guidance. arXiv preprint arXiv:2410.09945, 2024. +Robbins, H. E. An empirical bayes approach to statistics. In Proceedings of the Third Berkeley Symposium on Mathematical Statistics and Probability, Volume 1: Contributions to the Theory of Statistics, 1956. URL https://api_semanticscholar.org/CorpusID:26161481. +Roberts, G. O. and Smith, A. F. Simple conditions for the convergence of the gibbs sampler and metropolis-hastings algorithms. Stochastic processes and their applications, 49(2):207-216, 1994. +Rombach, R., Blattmann, A., Lorenz, D., Esser, P., and Ommer, B. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10684-10695, 2022. +Rout, L., Raoof, N., Daras, G., Caramanis, C., Dimakis, A., and Shakkottai, S. Solving linear inverse problems provably via posterior sampling with latent diffusion models. Advances in Neural Information Processing Systems, 36, 2024. +Roux, J. L., Wisdom, S., Erdogan, H., and Hershey, J. R. Sdr - half-baked or well done? In ICASSP 2019 - 2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 626-630, 2019. doi: 10.1109/ICASSP.2019.8683855. +Rozet, F. and Louppe, G. Score-based data assimilation. Advances in Neural Information Processing Systems, 36: 40521-40541, 2023. +Rozet, F., Andry, G., Lanusse, F., and Louppe, G. Learning diffusion priors from observations by expectation maximization. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=7v88Fh6iSM. + +Schneider, F., Kamal, O., Jin, Z., and Scholkopf, B. Musai: text-to-music generation with long-context latent diffusion. arxiv preprint. arXiv preprint arXiv:2301.11757, 2023. +Shin, R. and Song, D. Jpeg-resistant adversarial images. In NIPS 2017 workshop on machine learning and computer security, volume 1, pp. 8, 2017. +Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N., and Ganguli, S. Deep unsupervised learning using nonequilibrium thermodynamics. In International Conference on Machine Learning, pp. 2256-2265. PMLR, 2015. +Song, B., Kwon, S. M., Zhang, Z., Hu, X., Qu, Q., and Shen, L. Solving inverse problems with latent diffusion models via hard data consistency. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=j8hdRqOUhN. +Song, J., Vahdat, A., Mardani, M., and Kautz, J. Pseudoinverse-guided diffusion models for inverse problems. In International Conference on Learning Representations, 2023a. URL https://openreview.net/forum?id=9GsMA8MRKQ. +Song, J., Zhang, Q., Yin, H., Mardani, M., Liu, M.-Y., Kautz, J., Chen, Y., and Vahdat, A. Loss-guided diffusion models for plug-and-play controllable generation. In International Conference on Machine Learning, pp. 32483-32498. PMLR, 2023b. +Song, Y. and Ermon, S. Generative modeling by estimating gradients of the data distribution. Advances in neural information processing systems, 32, 2019. +Song, Y., Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Ermon, S., and Poole, B. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations, 2021. +Stevens, T. S., van Gorp, H., Meral, F. C., Shin, J., Yu, J., Robert, J.-L., and van Sloun, R. J. Removing structured noise with diffusion models. arXiv preprint arXiv:2302.05290, 2023. +Tran, P., Tran, A. T., Phung, Q., and Hoai, M. Explore image deblurring via encoded blur kernel space. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 11956-11965, 2021. +Trippe, B. L., Yim, J., Tischer, D., Baker, D., Broderick, T., Barzilay, R., and Jaakkola, T. S. Diffusion probabilistic modeling of protein backbones in 3d for the motif-scaffolding problem. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=6TxBxqNME1Y. + +Wang, Y., Yu, J., and Zhang, J. Zero-shot image restoration using denoising diffusion null-space model. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=mRieQgMtNTQ. +Wu, L., Trippe, B. L., Naesseth, C. A., Cunningham, J. P., and Blei, D. Practical and asymptotically exact conditional sampling in diffusion models. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=eWKqrlzcRv. +Wu, Z., Sun, Y., Chen, Y., Zhang, B., Yue, Y., and Bouman, K. Principled probabilistic imaging using diffusion models as plug-and-play priors. Advances in Neural Information Processing Systems, 37:118389-118427, 2024. +Xia, W., Zhang, Y., Yang, Y., Xue, J.-H., Zhou, B., and Yang, M.-H. Gan inversion: A survey. IEEE transactions on pattern analysis and machine intelligence, 45(3):3121-3138, 2022. +Xu, X. and Chi, Y. Provably robust score-based diffusion posterior sampling for plug-and-play image reconstruction. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=SLnsoaY4u1. +Yu, J., Wang, Y., Zhao, C., Ghanem, B., and Zhang, J. Freedom: Training-free energy-guided conditional diffusion model. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 23174-23184, 2023. +Zhang, B., Chu, W., Berner, J., Meng, C., Anandkumar, A., and Song, Y. Improving diffusion inverse problem solving with decoupled noise annealing. arXiv preprint arXiv:2407.01521, 2024. +Zhang, R., Isola, P., Efros, A. A., Shechtman, E., and Wang, O. The unreasonable effectiveness of deep features as a perceptual metric. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 586-595, 2018. +Zhu, Y., Zhang, K., Liang, J., Cao, J., Wen, B., Timofte, R., and Van Gool, L. Denoising diffusion models for plug-and-play image restoration. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1219-1229, 2023. + +# A Methodology details + +# A.1 Primer on Gibbs sampling + +In this section we lay out the basic properties of Gibbs sampling. We use measure-theoretic notation for conciseness. + +Let $\mu_{0,1}(\mathrm{d}(\mathbf{x}_0,\mathbf{x}_1))$ be a probability measure on $\mathbb{R}^d\times \mathbb{R}^d$ . We denote by $\mu_{0|1}(\mathrm{d}\mathbf{x}_0|\mathbf{x}_1)$ and $\mu_{1|0}(\mathrm{d}\mathbf{x}_1|\mathbf{x}_0)$ the associated full conditionals and we write $\mu_0,\mu_1$ for its marginals. Define the transition kernels + +$$ +P _ {0} \left(\mathrm {d} \left(\mathbf {x} _ {0} ^ {\prime}, \mathbf {x} _ {1} ^ {\prime}\right) \mid \mathbf {x} _ {0}, \mathbf {x} _ {1}\right) := \mu_ {0 | 1} \left(\mathrm {d} \mathbf {x} _ {0} ^ {\prime} \mid \mathbf {x} _ {1}\right) \delta_ {\mathbf {x} _ {1}} \left(\mathrm {d} \mathbf {x} _ {1} ^ {\prime}\right), +$$ + +$$ +P _ {1} \left(\mathrm {d} \left(\mathbf {x} _ {0} ^ {\prime}, \mathbf {x} _ {1} ^ {\prime}\right) \mid \mathbf {x} _ {0}, \mathbf {x} _ {1}\right) := \mu_ {1 | 0} \left(\mathrm {d} \mathbf {x} _ {1} ^ {\prime} \mid \mathbf {x} _ {0}\right) \delta_ {\mathbf {x} _ {0}} \left(\mathrm {d} \mathbf {x} _ {0} ^ {\prime}\right). +$$ + +Each transition kernel updates only one coordinate at a time. A full update of the coordinates is obtained by composition of the kernels, i.e. + +$$ +P _ {0} P _ {1} (\mathrm {d} (\mathbf {x} _ {0} ^ {\prime}, \mathbf {x} _ {1} ^ {\prime}) | \mathbf {x} _ {0}, \mathbf {x} _ {1}) := \int P _ {1} (\mathrm {d} (\mathbf {x} _ {0} ^ {\prime}, \mathbf {x} _ {1} ^ {\prime}) | \tilde {\mathbf {x}} _ {0}, \tilde {\mathbf {x}} _ {1}) P _ {0} (\mathrm {d} (\tilde {\mathbf {x}} _ {0}, \tilde {\mathbf {x}} _ {1}) | \mathbf {x} _ {0}, \mathbf {x} _ {1}). +$$ + +Each transition admits the joint distribution $\mu_{0,1}$ as stationary distribution, meaning that $\mu_{0,1}(\mathrm{d}(\mathbf{x}_0,\mathbf{x}_1)) = \int P_0(\mathrm{d}(\mathbf{x}_0,\mathbf{x}_1)|\mathbf{x}_0',\mathbf{x}_1')\mu_{0,1}(\mathrm{d}(\mathbf{x}_0',\mathbf{x}_1'))$ . Indeed, this is seen by noting that + +$$ +\begin{array}{l} P _ {0} (\mathrm {d} (\mathbf {x} _ {0}, \mathbf {x} _ {1}) | \mathbf {x} _ {0} ^ {\prime}, \mathbf {x} _ {1} ^ {\prime}) \mu_ {0, 1} (\mathrm {d} (\mathbf {x} _ {0} ^ {\prime}, \mathbf {x} _ {1} ^ {\prime})) = \mu_ {0 | 1} (\mathrm {d} \mathbf {x} _ {0} | \mathbf {x} _ {1} ^ {\prime}) \delta_ {\mathbf {x} _ {1} ^ {\prime}} (\mathrm {d} \mathbf {x} _ {1}) \mu_ {0, 1} (\mathrm {d} (\mathbf {x} _ {0} ^ {\prime}, \mathbf {x} _ {1} ^ {\prime})) \\ = \mu_ {0 | 1} (\mathrm {d} \mathbf {x} _ {0} | \mathbf {x} _ {1} ^ {\prime}) \delta_ {\mathbf {x} _ {1} ^ {\prime}} (\mathrm {d} \mathbf {x} _ {1}) \mu_ {0 | 1} (\mathrm {d} \mathbf {x} _ {0} ^ {\prime} | \mathbf {x} _ {1} ^ {\prime}) \mu_ {1} (\mathrm {d} \mathbf {x} _ {1} ^ {\prime}) \\ = \mu_ {0 | 1} (\mathrm {d} \mathbf {x} _ {0} | \mathbf {x} _ {1}) \mu_ {1} (\mathrm {d} \mathbf {x} _ {1}) \mu_ {0 | 1} (\mathrm {d} \mathbf {x} _ {0} ^ {\prime} | \mathbf {x} _ {1} ^ {\prime}) \delta_ {\mathbf {x} _ {1}} (\mathrm {d} \mathbf {x} _ {1} ^ {\prime}), \\ \end{array} +$$ + +and then integrating both sides w.r.t. $(\mathbf{x}_0',\mathbf{x}_1')$ . It then follows immediately that also $P_0P_1$ admits $\mu_{0,1}$ as stationary distribution. Letting $\left((X_0^k,X_1^k)\right)_{k\in \mathbb{N}}$ be a Markov chain with transition kernel $P_0P_1$ , the law of $(X_0^k,X_1^k)$ converges to $\mu_{0,1}$ as $k\to \infty$ under mild conditions; see (Roberts & Smith, 1994). + +# A.2 Full Gibbs conditionals + +In the main paper we consider the following data augmentation of the mixture $\hat{\pi}_t^{\mathbf{y}}$ (12) + +$$ +\bar {\pi} _ {0, s, t} ^ {\mathbf {y}} \left(\mathbf {x} _ {0}, \mathbf {x} _ {s}, \mathbf {x} _ {t}\right) = p _ {0 | s} \left(\mathbf {x} _ {0} \mid \mathbf {x} _ {s}\right) \frac {\hat {g} _ {s} \left(\mathbf {y} \mid \mathbf {x} _ {s}\right) p _ {s \mid t} \left(\mathbf {x} _ {s} \mid \mathbf {x} _ {t}\right) p _ {t} \left(\mathbf {x} _ {t}\right)}{\int \hat {g} _ {s} \left(\mathbf {y} \mid \mathbf {x} _ {s} ^ {\prime}\right) p _ {s \mid t} \left(\mathbf {x} _ {s} ^ {\prime} \mid \mathbf {x} _ {t} ^ {\prime}\right) p _ {t} \left(\mathbf {x} _ {t} ^ {\prime}\right) \mathrm {d} \mathbf {x} _ {s , t} ^ {\prime}}. \tag {14} +$$ + +From this definition it is straightforward to see that $\overline{\pi}_{0|s,t}^{\mathbf{y}}(\mathbf{x}_0|\mathbf{x}_s,\mathbf{x}_t) = p_{0|s}(\mathbf{x}_0|\mathbf{x}_s)$ . In order to compute the full conditional $\overline{\pi}_{s|0,t}^{\mathbf{y}}(\mathbf{x}_s|\mathbf{x}_0,\mathbf{x}_t)$ we use the identity + +$$ +p _ {0 | s} \left(\mathbf {x} _ {0} \mid \mathbf {x} _ {s}\right) p _ {s | t} \left(\mathbf {x} _ {s} \mid \mathbf {x} _ {t}\right) p _ {t} \left(\mathbf {x} _ {t}\right) = p _ {0} \left(\mathbf {x} _ {0}\right) q _ {s | 0} \left(\mathbf {x} _ {s} \mid \mathbf {x} _ {0}\right) q _ {t | s} \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {s}\right), \tag {15} +$$ + +from which it follows that + +$$ +\begin{array}{l} \overline {{\pi}} _ {s | 0, t} ^ {\mathbf {y}} (\mathbf {x} _ {s} | \mathbf {x} _ {0}, \mathbf {x} _ {t}) = \frac {p _ {0 | s} (\mathbf {x} _ {0} | \mathbf {x} _ {s}) \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) p _ {s | t} (\mathbf {x} _ {s} | \mathbf {x} _ {t})}{\int p _ {0 | s} (\mathbf {x} _ {0} | \mathbf {x} _ {s} ^ {\prime}) \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s} ^ {\prime}) p _ {s | t} (\mathbf {x} _ {s} ^ {\prime} | \mathbf {x} _ {t}) \mathrm {d} \mathbf {x} _ {s} ^ {\prime}} \\ = \frac {q _ {s | 0} (\mathbf {x} _ {s} | \mathbf {x} _ {0}) \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) q _ {t | s} (\mathbf {x} _ {t} | \mathbf {x} _ {s})}{\int q _ {s | 0} (\mathbf {x} _ {s} ^ {\prime} | \mathbf {x} _ {0}) \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s} ^ {\prime}) q _ {t | s} (\mathbf {x} _ {t} | \mathbf {x} _ {s} ^ {\prime}) \mathrm {d} \mathbf {x} _ {s} ^ {\prime}} \\ = \frac {q _ {s | 0} (\mathbf {x} _ {s} | \mathbf {x} _ {0}) \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) q _ {t | s} (\mathbf {x} _ {t} | \mathbf {x} _ {s}) / q _ {t | 0} (\mathbf {x} _ {t} | \mathbf {x} _ {0})}{\int q _ {s | 0} (\mathbf {x} _ {s} ^ {\prime} | \mathbf {x} _ {0}) \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s} ^ {\prime}) q _ {t | s} (\mathbf {x} _ {t} | \mathbf {x} _ {s} ^ {\prime}) / q _ {t | 0} (\mathbf {x} _ {t} | \mathbf {x} _ {0}) \mathrm {d} \mathbf {x} _ {s} ^ {\prime}}. \\ \end{array} +$$ + +Then, by noting that the bridge transition (3) satisfies $q_{s|0,t}(\mathbf{x}_s|\mathbf{x}_0,\mathbf{x}_t) = q_{s|0}(\mathbf{x}_s|\mathbf{x}_0)q_{t|s}(\mathbf{x}_t|\mathbf{x}_s) / q_{t|0}(\mathbf{x}_t|\mathbf{x}_0)$ , we find that + +$$ +\overline {{\pi}} _ {s | 0, t} ^ {\mathbf {y}} (\mathbf {x} _ {s} | \mathbf {x} _ {0}, \mathbf {x} _ {t}) = \frac {\hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) q _ {s | 0 , t} (\mathbf {x} _ {s} | \mathbf {x} _ {0} , \mathbf {x} _ {t})}{\int \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s} ^ {\prime}) q _ {s | 0 , t} (\mathbf {x} _ {s} ^ {\prime} | \mathbf {x} _ {0} , \mathbf {x} _ {t}) \mathrm {d} \mathbf {x} _ {s} ^ {\prime}} +$$ + +Finally, for the third conditional, using again the identity (15), we find that + +$$ +\begin{array}{l} \overline {{\pi}} _ {t | 0, s} ^ {\mathbf {y}} (\mathbf {x} _ {t} | \mathbf {x} _ {0}, \mathbf {x} _ {s}) = \frac {p _ {0 | s} (\mathbf {x} _ {0} | \mathbf {x} _ {s}) \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) p _ {s | t} (\mathbf {x} _ {s} | \mathbf {x} _ {t}) p _ {t} (\mathbf {x} _ {t})}{\int p _ {0 | s} (\mathbf {x} _ {0} | \mathbf {x} _ {s}) \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) p _ {s | t} (\mathbf {x} _ {s} | \mathbf {x} _ {t} ^ {\prime}) p _ {t} (\mathbf {x} _ {t} ^ {\prime}) \mathrm {d} \mathbf {x} _ {t} ^ {\prime}} \\ = q _ {t | s} \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {s}\right). \\ \end{array} +$$ + +# A.3 Variational approximation + +In this section we describe the variational approach of Moufad et al. (2024), which we use to fit a Gaussian variational approximation to $\pi_{s|0,t}^{\mathbf{y}}(\cdot |\mathbf{x}_0,\mathbf{x}_t)$ for fixed $(\mathbf{x}_0,\mathbf{x}_t)$ . Similarly to the main paper we consider the variational approximation + +$$ +\lambda_ {s | 0, t} ^ {\varphi} := \mathcal {N} \left(\boldsymbol {\mu} _ {s | 0, t}, \operatorname {d i a g} \left(\mathrm {e} ^ {\boldsymbol {\rho} _ {s | 0, t}}\right)\right), \tag {16} +$$ + +and let $\varphi_{s|0,t} \coloneqq (\pmb{\mu}_{s|0,t}, \pmb{\rho}_{s|0,t}) \in \mathbb{R}^d \times \mathbb{R}^d$ denote the variational parameters. The reverse KL divergence writes, following definition (3), + +$$ +\begin{array}{l} \mathsf {K L} \left(\lambda_ {s | 0, t} ^ {\varphi} \mid \mid \pi_ {s | 0, t} ^ {\mathbf {y}} \left(\cdot | \mathbf {x} _ {0}, \mathbf {x} _ {t}\right)\right) \\ = \int \log \frac {\lambda_ {s | 0 , t} ^ {\varphi} (\mathbf {x} _ {s})}{\hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) q _ {s | 0 , t} (\mathbf {x} _ {s} | \mathbf {x} _ {0} , \mathbf {x} _ {t})} \lambda_ {s | 0, t} ^ {\varphi} (\mathbf {x} _ {s}) \mathrm {d} \mathbf {x} _ {s} + \mathrm {C} \\ = \mathbb {E} _ {\lambda_ {s | 0, t} ^ {\varphi}} \left[ - \log \hat {g} _ {s} (\mathbf {y} | \hat {X} _ {s} ^ {\varphi}) + \frac {\| \hat {X} _ {s} ^ {\varphi} - \left(\gamma_ {t | s} \alpha_ {s | 0} \mathbf {x} _ {0} + (1 - \gamma_ {t | s}) \alpha_ {t | s} ^ {- 1} \mathbf {x} _ {t}\right) \| ^ {2}}{2 \sigma_ {s | 0 , t} ^ {2}} \right] - \frac {1}{2} \boldsymbol {\rho} _ {s | 0, t} ^ {T} \mathbf {1} _ {d} + C ^ {\prime}. \tag {17} \\ \end{array} +$$ + +Using the reparameterization trick (Kingma & Welling, 2013) and plugging-in the neural network approximation $\hat{g}_s^\theta (\mathbf{y}|\cdot)$ of $\hat{g}_s(\mathbf{y}|\cdot)$ , we obtain the gradient estimator + +$$ +\begin{array}{l} \nabla_ {\varphi} \mathcal {L} _ {t} ^ {s} (\varphi ; \mathbf {x} _ {0}, \mathbf {x} _ {t}, Z) := - \nabla_ {\varphi} \log \hat {g} _ {s} ^ {\theta} \left(\mathbf {y} \mid \boldsymbol {\mu} _ {s | 0, t} + \operatorname {d i a g} \left(\mathrm {e} ^ {\boldsymbol {\rho} _ {s | 0, t}}\right) ^ {1 / 2} Z\right) \\ + \nabla_ {\boldsymbol {\varphi}} \left[ \frac {\| \boldsymbol {\mu} _ {s | 0 , t} + \operatorname {d i a g} \left(\mathrm {e} ^ {\boldsymbol {\rho} _ {s | 0 , t}}\right) ^ {1 / 2} Z - \left(\gamma_ {t | s} \alpha_ {s | 0} \mathbf {x} _ {0} + (1 - \gamma_ {t | s}) \alpha_ {t | s} ^ {- 1} \mathbf {x} _ {t}\right) \| ^ {2}}{2 \sigma_ {s | 0 , t} ^ {2}} - \frac {1}{2} \boldsymbol {\rho} _ {s | 0, t} ^ {T} \mathbf {1} _ {d} \right], \\ \end{array} +$$ + +where $Z \sim \mathcal{N}(0_d, \mathbf{I}_d)$ . We initialize the variational parameters with the mean and covariance of the bridge kernel (3), i.e., at initialization, $\pmb{\mu}_{s|0,t}^0 \coloneqq \gamma_{t|s}\alpha_{s|0}\mathbf{x}_0 + (1 - \gamma_{t|s})\alpha_{t|s}^{-1}\mathbf{x}_t$ and $\pmb{\rho}_{s|0,t}^0 = \log \sigma_{s|0,t}^2\mathbf{I}_d$ . The Gauss_VI routine is summarized in Algorithm 3. + +# Algorithm 3 Gauss_VI routine + +1: Input: vectors $(\mathbf{x}_0, \mathbf{x}_t)$ , timesteps $(s, t)$ , gradient steps $G$ +2: $\pmb{\mu} \gets \gamma_{t|s}\alpha_{s|0}\mathbf{x}_0 + (1 - \gamma_{t|s})\alpha_{t|s}^{-1}\mathbf{x}_t$ +3: $\pmb {\rho}\gets \log \sigma_{s|0,t}^2$ +4: for $g = 1$ to $G$ do +5: $Z\sim \mathcal{N}(0_d,\mathbf{I}_d)$ +6: $(\pmb {\mu},\pmb {\rho})\gets$ OptimizerStep $(\nabla_{\varphi}\mathcal{L}_{t}^{s}(\cdot ,\mathbf{x}_{0},\mathbf{x}_{t},Z))$ +7: end for +8: $Z\sim \mathcal{N}(0_d,\mathbf{I}_d)$ +9: Output: $\mu + \mathrm{diag}(\mathrm{e}^{\rho / 2}) Z$ + +Remark A.1. While the expectation of the squared norm in (17) can be computed exactly, we found that, in practice, doing so degraded the algorithm's performance, producing blurrier images compared to simply using a Monte Carlo estimator for the full expectation. + +Remark A.2. The fact that the density of our target distribution can be computed approximately by plugging the denoiser approximation allows us to add a Metropolis-Hastings (MH) correction with approximate acceptance ratio. Indeed, once we fit the Gaussian approximation, we can improve the accuracy of our sampler by simulating a Markov chain $(\hat{X}_s^k)_k$ where, given $\hat{X}_s^k$ , + +$$ +\hat {X} _ {s} ^ {k + 1} \sim M _ {s} (\mathrm {d} \mathbf {x} _ {s} | \hat {X} _ {s} ^ {k}) := \int \lambda_ {s | 0, t} ^ {\varphi} (z) \bigg [ r _ {s} (\hat {X} _ {s} ^ {k}, z) \delta_ {z} (\mathrm {d} \mathbf {x} _ {s}) + (1 - r _ {s} (\hat {X} _ {s} ^ {k}, z)) \delta_ {\hat {X} _ {s} ^ {k}} (\mathrm {d} \mathbf {x} _ {s}) \bigg ] \mathrm {d} z, +$$ + +with + +$$ +r _ {s} (\mathbf {x} _ {s}, \mathbf {x} _ {s} ^ {*}) = \min \left(1, \frac {\hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s} ^ {*}) q _ {s | 0 , t} (\mathbf {x} _ {s} ^ {*} | \mathbf {x} _ {0} , \mathbf {x} _ {t}) \lambda_ {s | 0 , t} ^ {\varphi} (\mathbf {x} _ {s})}{\hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) q _ {s | 0 , t} (\mathbf {x} _ {s} | \mathbf {x} _ {0} , \mathbf {x} _ {t}) \lambda_ {s | 0 , t} ^ {\varphi} (\mathbf {x} _ {s} ^ {*})}\right). +$$ + +# A.4 Alternative data augmentation and sequence + +Data augmentation. Our algorithm is based on one data-augmentation approach, but alternative augmentations could also be considered. Let $s \in [1, t - 1]$ . Then the most obvious and natural data augmentation involves simply marginalizing out the $\mathbf{x}_0$ variable in (14), yielding + +$$ +\overline {{\pi}} _ {s, t} ^ {\mathbf {y}} (\mathbf {x} _ {s}, \mathbf {x} _ {t}) \propto \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s}) p _ {s | t} (\mathbf {x} _ {s} | \mathbf {x} _ {t}) p _ {t} (\mathbf {x} _ {t}). +$$ + +Its full conditionals are $\overline{\pi}_{s|t}^{\mathbf{y}}(\mathbf{x}_s|\mathbf{x}_t) \propto \hat{g}_s(\mathbf{y}|\mathbf{x}_s)p_{s|t}(\mathbf{x}_s|\mathbf{x}_t)$ and $\overline{\pi}_{t|s}^{\mathbf{y}}(\mathbf{x}_t|\mathbf{x}_s) = q_{t|s}(\mathbf{x}_t|\mathbf{x}_s)$ . The first conditional is intractable for sampling, and we could approximate it with a Gaussian variational distribution, similar to our approach for $\overline{\pi}_{s|0,t}^{\mathbf{y}}(\cdot |\mathbf{x}_0,\mathbf{x}_t)$ . Indeed, this is possible since $\nabla_{\mathbf{x}_s}\log \overline{\pi}_{s|t}^{\mathbf{y}}(\mathbf{x}_s|\mathbf{x}_t) = \nabla_{\mathbf{x}_s}\log \hat{g}_s(\mathbf{y}|\mathbf{x}_s) + \nabla_{\mathbf{x}_s}\log p_s(\mathbf{x}_s) + \nabla_{\mathbf{x}_s}\log q_{t|s}(\mathbf{x}_t|\mathbf{x}_s)$ , which can then be approximated using the parametric approximations $\nabla \log \hat{g}_s^\theta (\mathbf{y}|\mathbf{x}_s)$ and $\nabla \log p_s(\mathbf{x}_s) \approx (-\mathbf{x}_s + \alpha_sD_s^\theta (\mathbf{x}_s)) / (1 - \alpha_s^2)$ . + +The first drawback of this approach is that, in practice, it tends to degrade reconstruction quality—e.g., introducing blurriness—as $t$ tends to 0, due to the poor approximation of the score near the data distribution. Additionally, beyond the loss of quality, we observe that it produces more incoherent reconstructions with noticeable artifacts. We hypothesize that this issue arises because the distribution we aim to approximately sample involves the prior transition $p_{s|t}$ , which can be highly multi-modal when $s \ll t$ . This multi-modality may make the posterior $\overline{\pi}_{s|t}^{\mathbf{y}}(\cdot|\mathbf{x}_t)$ more challenging to approximately sample from. On the other hand, when further conditioning on $\mathbf{x}_0$ , the sampling problem becomes more well-behaved, as we then target the posterior of a Gaussian distribution. Finally, while the score of $\overline{\pi}_{s|t}^{\mathbf{y}}(\mathbf{x}_s|\mathbf{x}_t)$ can be easily approximated, its density cannot, preventing the use of a Metropolis-Hastings correction, unless we use the independent proposal $p_{s|t}(\cdot|\mathbf{x}_t)$ . However, this approach is suboptimal, as it does not incorporate any information from the observation. This is not the case of the data-augmentation approach we use in MGDM as we highlight in Remark A.2. + +Alternative sequence. An alternative to the mixture of posterior approximations (12), on which MGDM is based, is the posterior formed as a mixture of likelihoods: + +$$ +\hat {\pi} _ {t} ^ {\mathbf {y}} (\mathbf {x} _ {t}) = \frac {\sum_ {s = 1} ^ {t - 1} \omega_ {t} ^ {s} \hat {g} _ {t} ^ {s} (\mathbf {y} | \mathbf {x} _ {t}) p _ {t} (\mathbf {x} _ {t})}{\int \sum_ {s = 1} ^ {t - 1} \omega_ {t} ^ {s} \hat {g} _ {t} ^ {s} (\mathbf {y} | \mathbf {x} _ {t} ^ {\prime}) p _ {t} (\mathbf {x} _ {t} ^ {\prime}) \mathrm {d} \mathbf {x} _ {t} ^ {\prime}}, +$$ + +being the $\mathbf{x}_t$ -marginal of the extended distribution + +$$ +\overline {{\pi}} _ {0, \backslash , t} ^ {\mathbf {y}} (s, \mathbf {x} _ {0}, \mathbf {z}, \mathbf {x} _ {t}) \propto \omega_ {t} ^ {s} p _ {0 | s} (\mathbf {x} _ {0} | \mathbf {z}) \hat {g} _ {s} (\mathbf {y} | \mathbf {z}) p _ {s | t} (\mathbf {z} | \mathbf {x} _ {t}) p _ {t} (\mathbf {x} _ {t}). \tag {18} +$$ + +Now, let $(s,\bar{X}_0,\bar{Z},\bar{X}_t)\sim \overline{\pi}_{0,\backslash ,t}^{\mathbf{y}}$ ; then, conditionally on $s$ , the distribution of $(\bar{X}_0,\bar{Z},\bar{X}_t)$ is $\overline{\pi}_{0,s,t}^{\mathbf{y}}$ , whereas + +$$ +s | \bar {X} _ {0}, \bar {Z}, \bar {X} _ {t} \sim \text {C a t e g o r i c a l} \left(\left\{\frac {\omega_ {t} ^ {\ell} \hat {g} _ {\ell} (\mathbf {y} | \bar {Z}) q _ {\ell | 0 , t} (\bar {Z} | \bar {X} _ {0} , \bar {X} _ {t})}{\sum_ {k = 1} ^ {t - 1} \omega_ {t} ^ {k} \hat {g} _ {k} (\mathbf {y} | \bar {Z}) q _ {k | 0 , t} (\bar {Z} | \bar {X} _ {0} , \bar {X} _ {t})} \right\} _ {\ell = 1} ^ {t - 1}\right). +$$ + +A Gibbs sampler targeting (18) is described in Algorithm 4. It allows updating the index $s$ in an observation-driven fashion, but is unfortunately computationally expensive as we need to evaluate the denoiser at $\bar{Z}$ in parallel for $t - 1$ timesteps. A cheaper alternative could be to block the variables $(s,\bar{Z})$ and use an independent MH step to target their joint conditional distribution. Denoting by $\lambda$ the joint proposal distribution on $[1,t - 1]\times \mathbb{R}^d$ used in this independent MH step, the probability of accepting a candidate $(s^{*},\mathbf{z}^{*})$ is + +$$ +r _ {t} \big ((s, \mathbf {z}), (s ^ {*}, \mathbf {z} ^ {*}) \big) = \min \left(1, \frac {\omega_ {t} ^ {s ^ {*}} \hat {g} _ {s ^ {*}} (\mathbf {y} | \mathbf {z} ^ {*}) q _ {s ^ {*} | 0 , t} (\mathbf {z} ^ {*} | \mathbf {x} _ {0} , \mathbf {x} _ {t}) \lambda (s , \mathbf {z})}{\omega_ {t} ^ {s} \hat {g} _ {s} (\mathbf {y} | \mathbf {z}) q _ {s | 0 , t} (\mathbf {z} | \mathbf {x} _ {0} , \mathbf {x} _ {t}) \lambda (s ^ {*} , \mathbf {z} ^ {*})}\right). +$$ + +Remark A.3. Note that we could have used a similar data augmentation (18) for the mixture used in MGDM. This would yield the full conditional + +$$ +s | \bar {X} _ {0}, \bar {Z}, \bar {X} _ {t} \sim \text {C a t e g o r i c a l} \left(\left\{\frac {\omega_ {t} ^ {\ell} \bar {\pi} _ {\ell | 0 , t} ^ {\mathbf {y}} (\bar {Z} | \bar {X} _ {0} , \bar {X} _ {t})}{\sum_ {k = 1} ^ {t - 1} \omega_ {t} ^ {k} \bar {\pi} _ {\ell | 0 , t} ^ {\mathbf {y}} (\bar {Z} | \bar {X} _ {0} , \bar {X} _ {t})} \right\} _ {k = 1} ^ {t - 1}\right), +$$ + +which is, however, intractable due to the normalizing constant involved in each $\overline{\pi}_{\ell |0,t}^{\mathbf{y}}$ + +# Algorithm 4 Gibbs sampler targeting (13) + +1: Input: $(s^r,\bar{X}_0^r,\bar{Z}^r,\bar{X}_t^r)$ +2: draw $s^{r+1} \sim$ Categorical $\left( \left\{ \frac{\omega_t^\ell \hat{g}_\ell(\mathbf{y}|\bar{Z}^r) q_{\ell|0,t}(\bar{Z}^r|\bar{X}_0^r, \bar{X}_t^r)}{\sum_{k=1}^{t-1} \omega_k^k \hat{g}_k(\mathbf{y}|\bar{Z}^r) q_{k|0,t}(\bar{Z}^r|\bar{X}_0^r, \bar{X}_t^r)} \right\}_{k=1}^{t-1} \right)$ +3: draw $\bar{Z}^{r+1} \sim \overline{\pi}_{s^{r+1}|0,t}^{\mathbf{y}}(\cdot|\bar{X}_0^r, \bar{X}_t^r)$ +4: draw $\bar{X}_t^{r + 1} \sim q_{t|s^{r + 1}}(\cdot|\bar{Z}^{r + 1})$ +5: draw $\bar{X}_0^{r + 1}\sim p_{0|s^{r + 1}}(\cdot |\bar{Z}^{r + 1})$ + +# A.5 Related algorithms + +Comparison with Zhang et al. (2024) In this section we clarify the difference between MGDM and the DAPS algorithm (Zhang et al., 2024), which shares some similarities with our approach. The sampling procedure in DAPS relies on sequential approximate sampling from the joint distribution + +$$ +\tilde {\pi} _ {0: T} ^ {\mathbf {y}} \left(\mathbf {x} _ {0: T}\right) := \pi_ {T} ^ {\mathbf {y}} \left(\mathbf {x} _ {T}\right) \prod_ {t = 0} ^ {T - 1} \tilde {\pi} _ {t | t + 1} \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {t + 1}\right), +$$ + +where + +$$ +\tilde {\pi} _ {t | t + 1} ^ {\mathbf {y}} \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {t + 1}\right) := \int q _ {t | 0} \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {0}\right) \pi_ {0 | t + 1} ^ {\mathbf {y}} \left(\mathbf {x} _ {0} \mid \mathbf {x} _ {t + 1}\right) d \mathbf {x} _ {0} \tag {19} +$$ + +and $\pi_{0|t + 1}^{\mathbf{y}}(\mathbf{x}_0|\mathbf{x}_{t + 1}) = \pi_0^{\mathbf{y}}(\mathbf{x}_0)q_{t + 1|0}(\mathbf{x}_{t + 1}|\mathbf{x}_0) / \pi_{t + 1}^{\mathbf{y}}(\mathbf{x}_{t + 1})$ . From this definition it follows that + +$$ +\pi_ {t} ^ {\mathbf {y}} (\mathbf {x} _ {t}) = \int \tilde {\pi} _ {t | t + 1} ^ {\mathbf {y}} (\mathbf {x} _ {t} | \mathbf {x} _ {t + 1}) \pi_ {t + 1} ^ {\mathbf {y}} (\mathbf {x} _ {t + 1}) \mathrm {d} \mathbf {x} _ {t + 1}, +$$ + +and hence that the marginals of the joint distribution $\tilde{\pi}_{0:T}^{\mathbf{y}}$ are $(\pi_t^{\mathbf{y}})_{t=0}^T$ . The canonical backward transition $\pi_{t|t+1}^{\mathbf{y}}(\mathbf{x}_t|\mathbf{x}_{t+1}) \propto \pi_t^{\mathbf{y}}(\mathbf{x}_t)q_{t+1|t}(\mathbf{x}_{t+1}|\mathbf{x}_t)$ has the alternative form + +$$ +\pi_ {t | t + 1} ^ {\mathbf {y}} (\mathbf {x} _ {t} | \mathbf {x} _ {t + 1}) = \int q _ {t | 0, t + 1} (\mathbf {x} _ {t} | \mathbf {x} _ {0}, \mathbf {x} _ {t + 1}) \pi_ {0 | t + 1} ^ {\mathbf {y}} (\mathbf {x} _ {0} | \mathbf {x} _ {t + 1}) \mathrm {d} \mathbf {x} _ {0}, +$$ + +which differs from (19) in the use of the bridge transition $q_{t|0,t+1}$ instead of the forward transition $q_{t|0}$ . + +In order to sample from $\tilde{\pi}_{t|t+1}(\cdot|\mathbf{x}_{t+1})$ , one needs to first sample $X_0 \sim \pi_{0|t+1}^{\mathbf{y}}(\cdot|\mathbf{x}_{t+1})$ and then $X_t \sim q_{t|0}(\cdot|X_0)$ . DAPS performs the former step using Langevin dynamics on an approximation of $\pi_{0|t+1}^{\mathbf{y}}(\cdot|\mathbf{x}_{t+1})$ . More specifically, the authors use the approximation + +$$ +\pi_ {0 | t + 1} ^ {\mathbf {y}} (\mathbf {x} _ {0} | \mathbf {x} _ {t + 1}) \approx \frac {g _ {0} (\mathbf {y} | \mathbf {x} _ {0}) \mathrm {N} (\mathbf {x} _ {0} ; D _ {t + 1} (\mathbf {x} _ {t + 1}) , r _ {t + 1} ^ {2} \mathbf {I} _ {d})}{\int g _ {0} (\mathbf {y} | \mathbf {x} _ {0} ^ {\prime}) \mathrm {N} (\mathbf {x} _ {0} ^ {\prime} ; D _ {t + 1} (\mathbf {x} _ {t + 1}) , r _ {t + 1} ^ {2} \mathbf {I} _ {d}) \mathrm {d} \mathbf {x} _ {0} ^ {\prime}}, +$$ + +where $r_{t + 1}^2$ is a hyperparameter. This approximation follows by noting that $\pi_{0|t + 1}^{\mathbf{y}}(\mathbf{x}_0|\mathbf{x}_{t + 1})\propto g_0(\mathbf{y}|\mathbf{x}_0)p_{0|t + 1}(\mathbf{x}_0|\mathbf{x}_{t + 1})$ and using the Gaussian approximation of $p_{0|t + 1}(\cdot |\mathbf{x}_{t + 1})$ proposed by Song et al. (2023a). The Langevin step is initialized with a sample obtained by discretizing the probability flow ODE (Song et al., 2021) between $t + 1$ and 0. + +Both MGDM and DAPS perform full noising and denoising steps and operate in a similar manner in this respect (with the distinction that we use DDPM instead of the probability flow ODE). The first fundamental difference is that we sample, conditionally on $\mathbf{y}$ and at a random timestep $s$ , by drawing from $\overline{\pi}_{s|0,t}^{\mathbf{y}}(\cdot|\mathbf{x}_0,\mathbf{x}_t) \propto \hat{g}_s(\mathbf{y}|\mathbf{x}_s)q_{s|0,t}(\mathbf{x}_s|\mathbf{x}_0,\mathbf{x}_t)$ . Unlike DAPS, our method does not rely on a density approximation prior to applying an approximate sampler. The second main difference is the fact that within each denoising step, we can increase the number of Gibbs iterations to improve the overall performance, as demonstrated in Figure 3. This is on top of the number of gradient steps that we use to fit the variational approximation and which enhance the performance when we increase them. + +On the other hand, DAPS does not require the computation of vector-Jacobian products of the denoiser and is thus more efficient in terms of memory. However it requires many calls to the likelihood function, which can substantially increase the runtime if it is expensive to evaluate. For example, with a latent diffusion model, the runtime of DAPS is at least three times larger than that of MGDM, RESAMPLE, and PSLD. + +Comparison with Moufad et al. (2024) The more recent MGPS algorithm of Moufad et al. (2024) is also related to MGDM. Similarly to DAPS (Zhang et al., 2024), their methodology relies on sampling approximately from the posterior transition $\pi_{t|t+1}^{\mathbf{y}}(\cdot|\mathbf{x}_{t+1})$ at each step of the backward denoising process. It builds on the following decomposition, which holds for all $s \in [0, t-1]$ : + +$$ +\pi_ {t | t + 1} ^ {\mathbf {y}} (\mathbf {x} _ {t} | \mathbf {x} _ {t + 1}) = \int q _ {t | s, t + 1} (\mathbf {x} _ {t} | \mathbf {x} _ {s}, \mathbf {x} _ {t + 1}) \pi_ {s | t + 1} ^ {\mathbf {y}} (\mathbf {x} _ {s} | \mathbf {x} _ {t + 1}) \mathrm {d} \mathbf {x} _ {s}. +$$ + +One step of MGPS proceeds by first sampling from an approximation of the posterior transition $\pi_{s|t+1}^{\mathbf{y}}(\cdot|\mathbf{x}_{t+1})$ and then sampling from the bridge transition to return back to time $t$ . The approximation of the posterior transition used in the MGPS is + +$$ +\pi_ {s \mid t + 1} ^ {\mathbf {y}} (\mathbf {x} _ {s} | \mathbf {x} _ {t + 1}) \approx \frac {\hat {g} _ {s} ^ {\theta} (\mathbf {y} | \mathbf {x} _ {s}) p _ {s \mid t + 1} ^ {\theta} (\mathbf {x} _ {s} | \mathbf {x} _ {t + 1})}{\int \hat {g} _ {s} (\mathbf {y} | \mathbf {x} _ {s} ^ {\prime}) p _ {s \mid t + 1} ^ {\theta} (\mathbf {x} _ {s} ^ {\prime} | \mathbf {x} _ {t + 1}) \mathrm {d} \mathbf {x} _ {s} ^ {\prime}}. \tag {20} +$$ + +Here one can then choose $s$ to be sufficiently small to enhance the likelihood approximation, while still having an accurate Gaussian approximation of the transition $p_{s|t+1}(\cdot|\mathbf{x}_{t+1})$ . The authors demonstrate, using a solvable toy example, that this trade-off indeed exists; see (Moufad et al., 2024, Example 3.2). The approximate sampling step is then performed by fitting a Gaussian variational approximation to the approximation on the r.h.s. of (20), similarly to what we do in Algorithm 2. + +Both MGDM and MGPS leverage the same idea of using, at step time $t$ , likelihood approximations at earlier steps $s < t$ . While in MGPS the time $s$ is set deterministically as a function of $t$ , we sample it randomly. However, the main difference lies in the step where we sample conditionally on the observation $\mathbf{y}$ . Once the index $s$ is sampled we proceed with $R$ rounds of reverse KL minimization w.r.t. to a different target distribution. Indeed, following Algorithm 2, in the first round we seek to fit a distribution with density proportional to $\mathbf{x}_s \mapsto \hat{g}_s^\theta (\mathbf{y}|\mathbf{x}_s)q_{s|0,t}(\mathbf{x}_s|\hat{X}_0^*,\hat{X}_t)$ , where $\hat{X}_0^*$ is an output from the previous step of the algorithm. At step $r$ , we fit $\mathbf{x}_s \mapsto \hat{g}_s^\theta (\mathbf{y}|\mathbf{x}_s)q_{s|0,t}(\mathbf{x}_s|\hat{X}_0^{r - 1},\hat{X}_t^{r - 1})$ , where $\hat{X}_0^{r - 1}$ is sampled using a few DDPM steps starting from $\hat{X}_s^{r - 1}$ at time $s$ and $\hat{X}_t^{r - 1} \sim q_{t|s}(\cdot |\hat{X}_s^{r - 1})$ . On the other hand, MGPS fits in a single round the distribution with density proportional to $\mathbf{x}_s \mapsto \hat{g}_s^\theta (\mathbf{y}|\mathbf{x}_s)q_{s|0,t + 1}(\mathbf{x}_s|D_{t + 1}^\theta (\hat{X}_{t + 1}),\hat{X}_{t + 1})$ , where $\hat{X}_{t + 1}$ is the output of the previous step. Finally, the authors report that the performance of MGPS improves when the number of gradient steps is increased. In our case, we have two axes, Gibbs iterations $R$ and gradient steps, that allow us to improve the performance when more compute is available. + +# B Experiments details + +# B.1 Choice of weight sequence + +In all our experiments we draw the index $s$ , at time $t_i$ , from $\mathrm{Uniform}[[\tau, t_{i-1}]]$ with $\tau = 10$ . The main motivation behind setting $\tau = 10$ and not $\tau = 1$ , which is more natural, is that we have found that otherwise it may lead to instabilities. This arises typically when an index $s$ is sampled very close to 0 when $t \approx T$ . To avoid such behavior we use a smaller learning rate in Algorithm 3 for the first few iterations and set $\tau > 1$ . For the last $25\%$ diffusion steps we set $s$ deterministically to $t_{i-1}$ as we have found that this slightly improves the reconstructions quality. We also ramp up the number of gradient steps as this significantly sharpens the details in the images. + +While it is more intuitive to sample $s$ close to 0 as it provides the best approximation error for the likelihood, we have found that this can significantly slow the mixing of the Gibbs sampler in very large dimensions and provides rather poor results when used with a small number of Gibbs steps. Practically speaking, significant artifacts arise during the initial iterations of the algorithm due to the optimization procedure, and they tend to persist in subsequent iterations when $s$ is sampled close to 0. To see why this is the case consider the following empirical discussion on a simplified scenario. We write $\mathbf{x} = [\bar{\mathbf{x}},\underline{\mathbf{x}}]$ where $\bar{\mathbf{x}}\in \mathbb{R}^{d_{\mathbf{y}}}$ and $\underline{\mathbf{x}}\in \mathbb{R}^{d - d_{\mathbf{y}}}$ . We assume that $g_0(\mathbf{y}|\mathbf{x}) = \mathrm{N}(\mathbf{y};\bar{\mathbf{x}},\sigma_{\mathbf{y}}^2\mathbf{I}_{d_{\mathbf{y}}})$ , i.e., we observe only the first $d_{\mathbf{y}}$ coordinates of the hidden state. Since $s$ is sampled near 0 we may assume that $\hat{g}_s(\mathbf{y}|\cdot) = g_0(\mathbf{y}|\cdot)$ . Then, sampling $Z\sim \overline{\pi}_{s|0,t}^{\mathbf{y}}(\cdot |\mathbf{x}_0,\mathbf{x}_t)$ is equivalent to sampling + +$$ +\begin{array}{l} \bar {Z} \sim \mathcal {N} \left(\frac {\sigma_ {s | 0 , t} ^ {2}}{\sigma_ {\mathbf {y}} ^ {2} + \sigma_ {s | 0 , t} ^ {2}} \mathbf {y} + \frac {\sigma_ {\mathbf {y}} ^ {2}}{\sigma_ {\mathbf {y}} ^ {2} + \sigma_ {s | 0 , t} ^ {2}} \left[ \gamma_ {t | s} \alpha_ {s | 0} \bar {\mathbf {x}} _ {0} + (1 - \gamma_ {t | s}) \alpha_ {t | s} ^ {- 1} \bar {\mathbf {x}} _ {t} \right], \frac {\sigma_ {\mathbf {y}} ^ {2} \sigma_ {s | 0 , t} ^ {2}}{\sigma_ {\mathbf {y}} ^ {2} + \sigma_ {s | 0 , t} ^ {2}} \mathbf {I} _ {d _ {\mathbf {y}}} \right), \\ \underline {{Z}} \sim \mathcal {N} (\gamma_ {t | s} \alpha_ {s | 0} \underline {{\mathbf {x}}} _ {0} + (1 - \gamma_ {t | s}) \alpha_ {t | s} ^ {- 1} \underline {{\mathbf {x}}} _ {t}, \sigma_ {s | 0, t} ^ {2} \mathbf {I} _ {d - d _ {\mathbf {y}}}), \\ \end{array} +$$ + +Table 4: LPIPS on the FFHQ dataset for the two time-sampling distributions given in (21) and (22). We use $R = 4$ Gibbs steps for the phase retrieval task. + +
DistributionPhase retrieval (R=4)JPEG2Gaussian deblurringMotion deblurring
μt*0.100.140.120.09
μt00.530.190.160.19
+ +![](images/c833dbd2a84ac4cff8c67b8b9e9b10eecae1a3ad55e2a58c5d5cd1bda8d35ff3.jpg) + +![](images/06482d1d885109cccead821213db479ef95944665f6b58fd0661cf01fed1e07d.jpg) +Figure 4: Evolution of the running state $\hat{X}_0^*$ in Algorithm 2 for the two time-sampling distributions given in (21) and (22). + +setting $Z = [\bar{Z}, \underline{Z}]$ and then concatenating both vectors. It is thus seen that the observed part of the state is updated with the observation whereas the bottom part is simply drawn from the prior. Moreover, if $\sigma_{s|0,t}^2 \approx 0$ then $\gamma_{t|s}\alpha_{s|0} \approx 1$ and $\underline{Z}$ is almost the same as $\mathbf{x}_0$ . In Algorithm 2, once we have sampled $\hat{X}_s \sim \overline{\pi}_{s|0,t}^{\mathbf{y}}(\cdot|\hat{X}_0, \hat{X}_t)$ , we first denoise it to obtain the new $\hat{X}_0$ and then noise it to obtain the new $\hat{X}_t$ . As $s$ is sampled near 0, the denoising step will merely modify $\hat{X}_s$ whereas the noisig step will add significant noise to $\hat{X}_s$ and may help with removing the artifacts. This noised sampled has however only a small impact on the next samples $\hat{X}_0, \hat{X}_s$ since $(1 - \gamma_{t|s})\alpha_{t|s}^{-1} \approx 0$ . In short, the first $d_{\mathbf{y}}$ coordinates of the running state $\hat{X}_0^*$ will be quickly replaced by the observation whereas the last $d - d_{\mathbf{y}}$ coordinates will be stuck at their initialization and will evolve only by a small amount throughout the iterations of the algorithm. We illustrate this situation on a concrete example in Figure 4 where we consider a half mask inpainting task. The first and second rows show the evolution of the running state $\hat{X}_0^*$ with the time-sampling distributions + +$$ +\mu_ {i} ^ {*} = \left\{ \begin{array}{l l} \operatorname {U n i f o r m} [ [ \tau , t _ {i - 1} ] ] & \text {i f} \quad i > \lfloor K / 4 \rfloor \\ t _ {i - 1} & \text {e l s e} \end{array} , \right. \tag {21} +$$ + +$$ +\mu_ {i} ^ {0} = \operatorname {U n i f o r m} [ 1, \lfloor t _ {i} / 5 \rfloor ], \tag {22} +$$ + +i.e., the time-sampling distribution we use in all our experiments, where $K$ is the number of diffusion steps, and the one that we use to sample only close to 0, respectively. In Table 4 we compute the LPIPS for both distributions on a subset of the tasks we consider in the main paper. It is clear that $\mu_i^*$ outperforms $\mu_i^0$ , even when we increase the number of Gibbs steps (see phase retrieval task). + +# B.2 Hyperparameters setup of MGDM + +The details about the hyperparameters of MGDM are reported in Table 5. We adjust the optimization of the Gaussian Variational approximation in Algorithm 3 during the first and last diffusion steps. We ramp up the number of gradient steps during the final diffusion steps. This allows us to substantially improve the fine grained details of the reconstructions. Similarly, we reduce the learning rate in the early step to alleviate potential instabilities. + +# B.3 Audio source separation + +In our experiment, the diffusion model employed provided by (Mariani et al., 2023) is trained on the slakh2100 training dataset1, using only the four abundant instruments (bass, drums, guitar and piano) downsampled to $22\mathrm{kHz}$ . The denoiser network is based on a non-latent, time-domain unconditional variant of (Schneider et al., 2023). + +Its architecture follows a U-Net design, comprising an encoder, bottleneck, and decoder. The encoder consists of six layers + +Table 5: The hyperparameters used in MGDM for the considered datasets. The index $i$ of the timesteps ${\left\{ {t}_{i}\right\} }_{i = K}^{0}$ is taken in reverse order. The symbol # stands for "number of". + +
# Gibbs repetitions R# Diffusion steps K# Denoising steps MTime-sampling distributionLearning rate η# Gradient steps G
FFHQR=1K=100M=20μi* as in (21)η = {0.01 if i ≥ [3K/4] 0.03 otherwiseG = {20 if i ≤ [K/4] 5 otherwise
FFHQ LDMR=1K=100M=20μi* as in (21)η = {0.01 if i ≥ [3K/4] 0.03 otherwiseG = {20 if i mod 10 = 0 3 otherwise
ImageNetR=1K=100M=20μi* as in (21)η = {0.01 if i ≥ [3K/4] 0.03 otherwiseG = {20 if i ≤ [K/4] 5 otherwise
Audio-source separationR=6K=20M=15μi* as in (21)η = 0.005G = {20 if i ≤ [K/4] 3 otherwise
Audio-source separation (Best result in Table 3)R=1K=20M=15μi* as in (21)η = 0.005G = 90
+ +with channel numbers [256, 512, 1024, 1024, 1024, 1024], where each layer includes two convolutional ResNet blocks, and multihead attention is applied in the last three layers. The decoder mirrors the encoder structure in reverse. The bottleneck contains a ResNet block, followed by a self-attention mechanism, and then another ResNet block. Training is performed on the four stacked instruments using the publicly available trainer from repository2. + +# B.4 Implementation of the competitors + +In this section, we provide implementation details of the competitors. We adopt the hyperparameters recommended by the authors tune them on each dataset if they are not provided. We emphasize that we use the total number of diffusion steps available (1000 steps) for DPS, PGDM, DDNM, DIFFPIR, and PSLD. For the other algorithms, we tuned the compute time by increasing Langevin/denoising/optimization steps until performance plateaued. The complete set of hyperparameters and their values for both image experiments and audio-sound separation can be found in the supplementary material under the folders config/experiments/sampler and config/exp sounding/sampler. + +DPS. We implemented Chung et al. (2023, Algorithm 1) and selected the hyperparameters of each considered task based on Chung et al. (2023, App. D). We tuned the algorithm for the other tasks, namely, we use $\gamma = 0.2$ for JPEG $2\%$ , $\gamma = 0.07$ for High Dynamic Range tasks, and $\gamma = 1$ for audio-source separation. + +DiffPIR. We implemented Zhu et al. (2023, Algorithm 1) to make it compatible with our existing code base. We adopt the hyperparameters recommended in the official, released version3. We followed the guidelines in (Zhu et al., 2023, Eqn. (13)) to extend the algorithm to nonlinear problems. However, we noticed that the algorithm diverges in these cases and we could not follow up as the paper and the released code lack examples of nonlinear problems. Zhu et al. (2023) provides an FFT-based solution for the motion blur tasks which is only valid in the case of circular convolution. Hence, and since we adapted the experimental setup of Chung et al. (2023), we do not run the algorithm on motion blur task as it uses convolution with reflect padding. For audio-source separation, we found that $\lambda = \mu = 1$ works best. + +DDNM. We adapted the implementation provided in the released code4. Namely, the authors provide classes, in the module functions/svdoperators.py that implement the logic of the algorithm on each degradation operator separately. The adaptation includes factorizing these classes to a single class to support all SVD linear degradation operators. On the other hand, we notice DDNM is unstable for operators whose SVD decomposition is prone to numerical errors, such as Gaussian Blur with wide convolution kernel. This results from the algorithm using the pseudo-inverse of the operator. + +RedDiff. We used the implementation of REDDIFF available in the released code5. For linear problems, we use the pseudo-inverse of the observation as an initialization of the variational optimization problem. On nonlinear problems, for which the pseudo-inverse of the observation is not available, we initialized the optimization with a sample from the standard Gaussian distribution. + +![](images/7e4d612cdeedb5b58a8636a1305fe63e710c134e0899c61123354647c9aec1b0.jpg) +Figure 5: Effect of individually increasing each parameter on the performance of our algorithm for the phase retrieval task. In each case, we vary one parameter while keeping the others fixed to the values specified in the original manuscript. + +![](images/6bff3d48452de0bf7365ab9859f56925b119cf365808208f7a3eb42cb5e242dd.jpg) + +![](images/89cc722482d11f0e1ed6d5f78e54adb9905498b88f5699bb78de95357866258c.jpg) + +![](images/6aeb453f59e8fe0c8ddde4b9efc4533be62121ce74fde14edf38716c4ea7d851.jpg) + +PGDM. We opted for the implementation available in the REDDIFF's repository as some of the authors are co-authors of PGDMas well. Notably, the implementation introduces a subtle deviation from Song et al. (2023a, Algorithm 1): in the algorithm's final step, the guidance term $g$ is scaled by $\alpha_{t}$ ( $\sqrt{\alpha_{t}}$ in their notation) whereas the implementation scales it by $\alpha_{t-1}\alpha_{t}$ . This adjustment improves the algorithm for most tasks except for JPEG dequantization. We found that the original scaling by $\alpha_{t}$ is better in this case. + +PSLD. We implemented the PSLD algorithm provided in Rout et al. (2024, Algorithm 2) and referred to the publicly available implementation6 to set the hyperparameters of the algorithm for the different tasks. + +ReSample. We modified the original code7 provided by the authors to make its hyperparameters directly adjustable, namely, the tolerance $\varepsilon$ and the maximum number of iterations $N$ for solving the optimization problems related to hard data consistency, and the scaling factor for the variance of the stochastic resampling distribution $\gamma$ . We found the algorithm to be sensitive to $\varepsilon$ and that setting it to the noise level of the inverse problem yields the best reconstructions across tasks and noise levels. On the other hand, we noticed that $\gamma$ has less impact on the quality of the reconstructions. Finally, we set a threshold $N = 200$ on the maximum number of gradient iterations to make the algorithm less computationally intensive. + +DAPS. We have the official codebase $^8$ . We referred to Zhang et al. (2024, Table. 7) to set the hyperparameters. For audio-source separation, we set $\sigma_{\mathrm{max}}$ and $\sigma_{\mathrm{min}}$ to match those of the sound model and adapted the Langevin stepsize lr and the standard deviation tau to the audio-separation task. + +PNP-DM. We adapted the implementation provided in the released code9. Specifically, we exposed the coupling parameter $\rho$ including its initial value, minimum value, and decay rate, as well as the number of Langevin steps and its step size. The hyperparameters were set based on Wu et al. (2024, Table 3 and Table 4). For inpainting tasks, while it is theoretically possible to perform the likelihood steps using Gaussian conjugacy (Wu et al., 2024, Sec. 3.1), we found that using Langevin produced better results in practice. For example, the reconstructions in the left figure of Figure 8 are obtained by sampling exactly from the posterior whereas on the r.h.s. we use Langevin dynamics. Although the audio separation task is linear and hence the likelihood steps can be implemented exactly, we encountered similar challenges as in inpainting and therefore we used Langevin here as well. + +# B.5 Experiments reproducibility + +Our code will be made available upon acceptance of the paper. In the anonymous codebase provided as companion of the paper we use $\sqrt{\alpha_t}$ instead of $\alpha_{t}$ to match the conventions of existing codebases. All experiments were conducted on Nvidia Tesla V100 SXM2 GPUs. For the image experiments, we used 300 images from the validation sets of FFHQ and ImageNet $256\times 256$ that we numbered from 0 to 299. The image number was used to seed the randomness of the experiments on that image. For the audio source separation experiments, the slakh2100 test dataset has tracks named following the pattern Track0XXXX, where X represents a digit in $0 - 9$ . The number XXXX was used as the seed for the + +experiments conducted on each track. + +# B.6 Extended results + +We present the complete results with FID, LPIPS, PSNR, and SSIM metrics for the image inverse problems experiment in: Table 6 for FFHQ pixel-space, Table 7 for ImageNet, and in Table 8 for FFHQ LDM. In Figure 5 we provided an extension of the ablation in Figure 3. Similarly, the complete results for the audio source separation experiments that include all competitors are provided in Table 9. + +From Table 6 and Table 7, one can note that DDNM, DIFFPIR and DAPS score better in PSNR and SSIM compared to MGDM but score lower in LPIPS. For most of the tasks we considered, one does not expect to recover an image very close to the reference and thus, metrics that perform pixel-wise comparisons are less relevant and favor images that are overly smooth. We provide evidence for this in the gallery of images below where we compare qualitatively the outputs of our algorithm with those of the competitors. It can be seen that our method provides reconstructions with fine-grained details that are more coherent with the reference image. Note for example that DDNM, DIFFPIR and DAPS outperform MGDM in terms of PSNR and SSIM on the half mask task on ImageNet while failing to reconstruct the missing r.h.s. of the images. + +Table 6: FID and mean LPIPS/PSNR/SSIM metrics along side $95\%$ -confidence interval on FFHQ $256 \times 256$ dataset with $\sigma_{\mathbf{y}} = 0.05$ . + +
TaskMGDMDPSPGDMDDNMDIFFPIRREDIFFDAPSPNP-DM
LPIPS ↓
SR (×4)0.09 ±0.000.09 ±0.000.30 ±0.010.15 ±0.000.10 ±0.000.39 ±0.010.16 ±0.010.10 ±0.00
SR (×16)0.24 ±0.010.23 ±0.010.42 ±0.010.33 ±0.010.23 ±0.010.55 ±0.010.40 ±0.010.27 ±0.01
Box inpainting0.10 ±0.000.17 ±0.010.17 ±0.000.12 ±0.000.14 ±0.000.19 ±0.010.13 ±0.000.18 ±0.01
Half mask0.20 ±0.010.23 ±0.010.24 ±0.010.23 ±0.010.25 ±0.010.28 ±0.010.23 ±0.010.32 ±0.01
Gaussian Deblur0.12 ±0.000.17 ±0.010.87 ±0.020.20 ±0.010.12 ±0.000.24 ±0.010.24 ±0.010.14 ±0.01
Motion Deblur0.09 ±0.000.17 ±0.01---0.22 ±0.010.19 ±0.010.21 ±0.01
JPEG (QF = 2)0.14 ±0.010.34 ±0.031.12 ±0.01--0.32 ±0.010.22 ±0.010.29 ±0.01
Phase retrieval0.11 ±0.020.40 ±0.02---0.26 ±0.020.14 ±0.010.34 ±0.02
Nonlinear deblur0.27 ±0.010.51 ±0.04---0.68 ±0.020.28 ±0.010.31 ±0.01
High dynamic range0.12 ±0.010.40 ±0.06---0.20 ±0.030.10 ±0.010.19 ±0.01
FID ↓
SR (×4)52.2855.0295.2269.7554.26115.0165.6855.32
SR (×16)62.1261.24161.64104.1058.12141.76117.8363.49
Box inpainting52.0889.1360.9964.0668.3464.2460.2975.67
Half mask58.9779.3161.4864.9671.8663.9263.8884.16
Gaussian Deblur55.3760.55295.1973.9254.2971.8276.9856.69
Motion Deblur52.6561.80---102.8870.7686.58
JPEG (QF = 2)56.40107.54305.00--132.8179.09108.89
Phase retrieval83.58146.79---123.9158.53172.20
Nonlinear deblur87.89198.33---113.3892.1291.30
High dynamic range54.56165.70---75.6356.1977.29
PSNR ↑
SR (×4)27.66 ±0.2228.05 ±0.2424.57 ±0.1429.45 ±0.2327.72 ±0.2226.75 ±0.1328.44 ±0.2127.44 ±0.20
SR (×16)21.01 ±0.2020.71 ±0.2118.51 ±0.1422.32 ±0.2120.96 ±0.2021.46 ±0.1719.75 ±0.1720.88 ±0.19
Box inpainting22.38 ±0.2718.81 ±0.2821.05 ±0.2522.34 ±0.3122.39 ±0.3221.46 ±0.2822.06 ±0.3020.42 ±0.28
Half mask15.39 ±0.2715.03 ±0.2715.29 ±0.2816.38 ±0.3516.04 ±0.3615.68 ±0.3416.25 ±0.3014.35 ±0.30
Gaussian Deblur25.64 ±0.2424.03 ±0.2213.34 ±0.1026.62 ±0.2325.78 ±0.2326.68 ±0.2226.12 ±0.2325.89 ±0.21
Motion Deblur27.82 ±0.2024.12 ±0.21---27.48 ±0.1327.07 ±0.2124.91 ±0.24
JPEG (QF = 2)25.57 ±0.1919.56 ±0.6012.57 ±0.10--24.53 ±0.1325.72 ±0.1822.42 ±0.18
Phase retrieval27.55 ±0.6516.56 ±0.63---24.58 ±0.6727.84 ±0.4621.63 ±0.70
Nonlinear deblur23.55 ±0.2716.08 ±0.87---21.94 ±0.2524.56 ±0.3624.08 ±0.32
High dynamic range24.79 ±0.4218.71 ±0.32---21.69 ±0.2026.60 ±0.3821.59 ±0.22
SSIM ↑
SR (×4)0.80 ±0.010.81 ±0.010.56 ±0.000.85 ±0.000.78 ±0.010.68 ±0.000.81 ±0.000.77 ±0.01
SR (×16)0.61 ±0.010.58 ±0.010.42 ±0.010.67 ±0.010.59 ±0.010.60 ±0.010.58 ±0.010.57 ±0.01
Box inpainting0.80 ±0.000.77 ±0.000.70 ±0.000.83 ±0.000.82 ±0.000.70 ±0.000.80 ±0.000.75 ±0.00
Half mask0.67 ±0.010.67 ±0.010.59 ±0.010.74 ±0.010.72 ±0.010.63 ±0.010.71 ±0.010.65 ±0.01
Gaussian Deblur0.73 ±0.010.68 ±0.010.14 ±0.010.77 ±0.010.72 ±0.010.76 ±0.010.75 ±0.010.72 ±0.01
Motion Deblur0.80 ±0.010.70 ±0.01---0.71 ±0.010.78 ±0.010.75 ±0.01
JPEG (QF = 2)0.74 ±0.010.56 ±0.030.10 ±0.01--0.71 ±0.010.76 ±0.010.70 ±0.01
Phase retrieval0.78 ±0.020.49 ±0.02---0.61 ±0.020.81 ±0.010.57 ±0.02
Nonlinear deblur0.67 ±0.010.44 ±0.03---0.42 ±0.010.71 ±0.010.70 ±0.01
High dynamic range0.76 ±0.020.55 ±0.06---0.72 ±0.040.85 ±0.010.69 ±0.01
+ +Table 7: FID and mean LPIPS/PSNR/SSIM metrics along side $95\%$ -confidence interval on ImageNet $256\times 256$ dataset with $\sigma_{\mathbf{y}} = 0.05$ + +
TaskMGDMDPSPGDMDDNMDIFFPIRREDIFFDAPSPNP-DM
LPIPS ↓
SR (×4)0.26 ±0.010.25 ±0.010.56 ±0.020.34 ±0.020.31 ±0.010.57 ±0.020.37 ±0.020.66 ±0.02
SR (×16)0.55 ±0.020.44 ±0.010.62 ±0.010.71 ±0.020.50 ±0.020.85 ±0.020.75 ±0.021.03 ±0.02
Box inpainting0.23 ±0.010.35 ±0.010.29 ±0.010.28 ±0.010.30 ±0.010.36 ±0.010.30 ±0.010.42 ±0.01
Half mask0.31 ±0.010.40 ±0.030.34 ±0.030.38 ±0.030.40 ±0.030.46 ±0.030.40 ±0.010.54 ±0.01
Gaussian Deblur0.30 ±0.010.37 ±0.021.00 ±0.010.45 ±0.020.30 ±0.010.53 ±0.020.59 ±0.020.76 ±0.02
Motion Deblur0.22 ±0.010.40 ±0.04---0.39 ±0.040.42 ±0.020.52 ±0.02
JPEG (QF = 2)0.38 ±0.020.60 ±0.061.32 ±0.01--0.49 ±0.040.45 ±0.020.56 ±0.02
Phase retrieval0.55 ±0.020.62 ±0.02---0.61 ±0.020.50 ±0.020.66 ±0.01
Nonlinear deblur0.41 ±0.010.82 ±0.05---0.66 ±0.050.41 ±0.020.49 ±0.02
High dynamic range0.21 ±0.020.84 ±0.05---0.19 ±0.040.14 ±0.010.31 ±0.02
FID ↓
SR (×4)97.0794.77131.97109.83104.44139.67113.54160.78
SR (×16)142.09124.72181.29223.92135.37228.78224.69269.45
Box inpainting113.49173.77123.99133.41145.42157.76138.02178.59
Half mask106.39144.08112.73111.63118.21133.44114.60147.14
Gaussian Deblur105.92110.73287.63140.06106.64148.75158.50198.25
Motion Deblur94.74114.03---144.47133.07166.30
JPEG (QF = 2)117.15186.13340.95--151.58145.65178.50
Phase retrieval170.71148.61---215.18148.06201.66
Nonlinear deblur175.50298.36---171.00175.44172.58
High dynamic range104.01353.01---99.8194.38126.53
PSNR ↑
SR (×4)23.88 ±0.4424.37 ±0.4918.45 ±0.2624.99 ±0.5023.43 ±0.4223.33 ±0.3524.38 ±0.4616.40 ±0.24
SR (×16)18.12 ±0.3117.66 ±0.3915.27 ±0.2319.93 ±0.4018.40 ±0.3719.06 ±0.3318.18 ±0.3214.00 ±0.17
Box inpainting16.82 ±0.3313.92 ±0.3016.73 ±0.3119.18 ±0.4419.05 ±0.4718.21 ±0.4019.11 ±0.4018.03 ±0.36
Half mask13.77 ±0.2912.15 ±0.1914.05 ±0.1915.97 ±0.2115.64 ±0.2214.84 ±0.2016.00 ±0.3714.88 ±0.26
Gaussian Deblur21.57 ±0.4320.65 ±0.439.92 ±0.0822.89 ±0.4721.80 ±0.4422.72 ±0.4522.41 ±0.4515.85 ±0.22
Motion Deblur24.46 ±0.4221.38 ±0.21---24.06 ±0.1923.64 ±0.4422.47 ±0.40
JPEG (QF = 2)21.42 ±0.3216.33 ±0.275.27 ±0.04--22.07 ±0.1822.68 ±0.3620.74 ±0.30
Phase retrieval16.01 ±0.7114.12 ±0.49---15.41 ±0.5918.44 ±0.7215.02 ±0.50
Nonlinear deblur21.96 ±0.3910.13 ±0.28---20.57 ±0.1822.68 ±0.4422.20 ±0.43
High dynamic range22.90 ±0.579.56 ±0.26---22.12 ±0.2324.69 ±0.4922.23 ±0.46
SSIM ↑
SR (×4)0.65 ±0.020.68 ±0.020.30 ±0.010.71 ±0.020.60 ±0.010.57 ±0.010.66 ±0.020.25 ±0.01
SR (×16)0.31 ±0.010.39 ±0.020.21 ±0.010.49 ±0.020.41 ±0.020.44 ±0.020.44 ±0.020.10 ±0.00
Box inpainting0.71 ±0.010.70 ±0.010.62 ±0.000.77 ±0.010.76 ±0.010.67 ±0.000.74 ±0.010.64 ±0.01
Half mask0.59 ±0.010.58 ±0.030.52 ±0.020.68 ±0.030.67 ±0.030.59 ±0.030.66 ±0.010.57 ±0.01
Gaussian Deblur0.50 ±0.020.50 ±0.020.08 ±0.000.59 ±0.020.51 ±0.020.57 ±0.020.56 ±0.020.20 ±0.01
Motion Deblur0.67 ±0.010.55 ±0.05---0.61 ±0.030.63 ±0.020.57 ±0.02
JPEG (QF = 2)0.51 ±0.010.40 ±0.060.02 ±0.00--0.59 ±0.040.62 ±0.020.57 ±0.02
Phase retrieval0.31 ±0.030.27 ±0.02---0.25 ±0.020.46 ±0.030.23 ±0.01
Nonlinear deblur0.58 ±0.010.25 ±0.06---0.41 ±0.040.61 ±0.020.58 ±0.02
High dynamic range0.72 ±0.020.23 ±0.06---0.72 ±0.040.82 ±0.010.66 ±0.02
+ +Table 8: FID and mean LPIPS/PSNR/SSIM metrics along side $95\%$ -confidence interval on $\mathsf{FFHQ}$ dataset with LDM prior with $\sigma_{\mathbf{y}} = 0.05$ + +
TaskMGDMRESAMPLEPSLDDAPSPNP-DM
LPIPS ↓
SR (×4)0.14 ±0.010.22 ±0.010.21 ±0.010.28 ±0.010.40 ±0.01
SR (×16)0.30 ±0.010.38 ±0.010.36 ±0.010.52 ±0.010.71 ±0.01
Box inpainting0.18 ±0.010.22 ±0.000.27 ±0.010.37 ±0.010.31 ±0.01
Half mask0.26 ±0.010.30 ±0.030.32 ±0.030.49 ±0.010.44 ±0.01
Gaussian Deblur0.18 ±0.010.16 ±0.010.59 ±0.010.32 ±0.010.32 ±0.01
Motion Deblur0.22 ±0.010.20 ±0.030.70 ±0.030.36 ±0.010.36 ±0.01
JPEG (QF = 2)0.23 ±0.010.26 ±0.03-0.32 ±0.010.36 ±0.01
Phase retrieval0.29 ±0.020.39 ±0.02-0.25 ±0.010.50 ±0.02
Nonlinear deblur0.29 ±0.010.33 ±0.04-0.37 ±0.010.37 ±0.01
High dynamic range0.16 ±0.010.12 ±0.03-0.24 ±0.010.24 ±0.01
+ +
FID ↓
SR (×4)63.9178.7478.85110.21131.06
SR (×16)69.26100.4492.16176.67281.53
Box inpainting76.22126.4983.53162.11129.27
Half mask78.3291.7680.00131.68116.16
Gaussian Deblur69.4469.77150.43101.88103.16
Motion Deblur74.4377.97158.40120.74122.12
JPEG (QF = 2)72.7890.39-123.93131.08
Phase retrieval128.57230.42-105.64169.94
Nonlinear deblur100.7399.37-150.54135.81
High dynamic range75.7465.79-102.5489.32
+ +
PSNR ↑
SR (×4)27.39 ±0.2125.85 ±0.2525.80 ±0.3327.45 ±0.2023.81 ±0.21
SR (×16)20.60 ±0.1820.97 ±0.1821.42 ±0.1919.91 ±0.1617.07 ±0.14
Box inpainting21.81 ±0.2818.56 ±0.2120.01 ±0.2811.77 ±0.2619.57 ±0.31
Half mask15.71 ±0.3014.89 ±0.1714.62 ±0.199.13 ±0.2514.15 ±0.28
Gaussian Deblur26.79 ±0.2227.28 ±0.2217.99 ±0.1326.86 ±0.2626.11 ±0.19
Motion Deblur25.27 ±0.2026.73 ±0.1517.71 ±0.1225.37 ±0.2124.65 ±0.18
JPEG (QF = 2)24.27 ±0.1824.77 ±0.15-25.22 ±0.1823.86 ±0.17
Phase retrieval22.54 ±0.6620.18 ±0.61-27.05 ±0.3520.03 ±0.61
Nonlinear deblur23.71 ±0.2724.10 ±0.19-22.03 ±0.2323.28 ±0.26
High dynamic range25.59 ±0.3225.91 ±0.21-20.95 ±0.3820.21 ±0.23
+ +
SSIM ↑
SR (×4)0.79 ±0.010.68 ±0.010.71 ±0.010.79 ±0.010.70 ±0.01
SR (×16)0.58 ±0.010.56 ±0.010.63 ±0.010.59 ±0.010.52 ±0.01
Box inpainting0.78 ±0.000.75 ±0.000.66 ±0.010.70 ±0.010.73 ±0.01
Half mask0.69 ±0.010.67 ±0.020.60 ±0.030.55 ±0.010.65 ±0.01
Gaussian Deblur0.77 ±0.010.75 ±0.010.27 ±0.010.78 ±0.010.77 ±0.01
Motion Deblur0.73 ±0.010.72 ±0.030.24 ±0.020.74 ±0.010.72 ±0.01
JPEG (QF = 2)0.71 ±0.010.66 ±0.03-0.75 ±0.010.72 ±0.01
Phase retrieval0.62 ±0.020.49 ±0.02-0.79 ±0.010.60 ±0.02
Nonlinear deblur0.69 ±0.010.67 ±0.03-0.68 ±0.010.70 ±0.01
High dynamic range0.80 ±0.010.83 ±0.03-0.74 ±0.020.73 ±0.01
+ +Table 9: Mean SI-SDRI along side 95% confidence interval on slakh2100 test dataset. The last row “All” displays the mean over the four stems. Higher metrics are better. + +
StemsMGDMDPSPGDMDDNMDIFFPIRREDDIFFDAPSPNP-DMMSDMISDM\( DEMUCS_{512} \)
Bass18.49 ±0.9216.50 ±0.9816.41 ±1.1014.94 ±1.57-2.34 ±0.67-0.40 ±0.4911.76 ±1.612.90 ±0.7917.1219.3617.16
Drums18.07 ±0.4818.29 ±0.6218.14 ±0.7619.05 ±0.519.47 ±0.60-0.98 ±0.5415.62 ±0.427.89 ±0.6518.6820.9019.61
Guitar16.68 ±1.419.90 ±1.3912.84 ±1.9914.38 ±1.57-1.01 ±0.535.68 ±0.8811.75 ±1.554.51 ±1.1915.3814.7017.82
Piano16.17 ±1.2210.41 ±1.1412.31 ±1.4911.46 ±1.590.97 ±0.955.04 ±0.469.52 ±1.344.09 ±0.6414.7314.1316.32
All17.35 ±1.0113.77 ±1.0314.92 ±1.3314.96 ±1.311.77 ±0.692.33 ±0.5912.16 ±1.234.85 ±0.8216.4817.2717.73
+ +# B.7 Runtime and memory requirement comparison + +We evaluate the runtime and GPU memory consumption for image experiments on the three considered diffusion model priors. Since not all algorithms support every task, we restrict the evaluation to commune tasks. Figure 6 presents the average runtime and GPU memory requirement over both samples and tasks. + +MGDM has memory requirements similar to DPSand PGDMin pixel space and aligns closely with other methods in latent space. Importantly, in latent diffusion which is a highly relevant scenario given the prevalence of latent-space models, MGDM is notably faster than all competitors while consistently achieving strong performance across benchmarks. Conversely, when operating directly in pixel space, it exhibits relatively slower runtimes compared to some alternatives. However, this increase in computational overhead is consistently balanced by improved and stable reconstruction quality across all considered tasks as evidenced by the gallery of examples in Appendix B.9. Thus, we position our method as offering a beneficial trade-off, especially in scenarios where quality and consistency of results are paramount. + +On the other hand, we highlight several important points regarding the competitors' runtime: 1) for latent diffusion, DAPS and PNP-DM perform a significant amount of Langevin steps using the gradient of the likelihood. Since the latter involves a vector jacobian product of the decoder, the runtime increases significantly. More generally, when the likelihood function is expensive to evaluate, DAPS and PNP-DM are expected to be much slower than DPS, PGDM and MGDM. For PNP-DM on FFHQ we have implemented the likelihood step exactly on the linear tasks. On ImageNet however, using Langevin steps provided better results and this explains the significant increase in runtime. + +![](images/4c924dc11817f2f684259d255e8bf053a1e20fe4b4fe18d8d55e7f813e249e68.jpg) + +![](images/dd1ff81d6d8b2478dd4914d7a366de2ad1ce3207b7303844ea77fee34af278bf.jpg) + +![](images/1ea4ea1fd189979a21cfbfe3d7bf4426001873a9e8f121d5545686e3bc7ad571.jpg) +Figure 6: Comparison of the runtime (red bars - left axis) and memory requirement (blue bars - right axis) between the considered algorithms on FFHQ latent space ( $1^{\text{st}}$ row), FFHQ pixel space ( $2^{\text{nd}}$ row), and ImageNet ( $3^{\text{rd}}$ row). + +# B.8 Experiments with high noise setup + +To ensure the performance of the MGDM extend to higher noise setups, we evaluat it on both Half-mask (linear task) and JPEG QF=2% (nonlinear task) while increasing the noise level to $\sigma_{\mathbf{y}} = 0.3$ , increased of 0.05. The experiments were + +conducted on the FFHQ dataset in pixel-space, with MGDM being compared against DPS and DAPS. As evidenced by Table 10, MGDM consistently outperforms the other algorithms, namely in terms of LPIPS. + +Table 10: FID and mean LPIPS/PSNR/SSIM metrics along side $95\%$ -confidence interval on FFHQ $256 \times 256$ dataset with $\sigma_{\mathbf{y}} = 0.3$ + +
TaskMGDMDPSDAPSMGDMDPSDAPSMGDMDPSDAPSMGDMDPSDAPS
LPIPS ↓FID ↓PSNR ↑SSIM ↑
Half mask0.23 ±0.010.29 ±0.010.67 ±0.0156.7779.83136.2615.59 ±0.2814.86 ±0.2715.08 ±0.230.64 ±0.010.58 ±0.010.36 ±0.01
JPEG (QF = 2)0.21 ±0.010.37 ±0.030.24 ±0.0159.78110.6065.1122.70 ±0.1618.69 ±0.5423.62 ±0.150.67 ±0.010.54 ±0.020.69 ±0.01
+ +# B.9 Experiments with Poisson-noise likelihood + +Pervious experiments were performed with Gaussian-noise likelihood, $g_{0}(\mathbf{y}|\mathbf{x}) = \mathrm{N}(\mathbf{y};\mathbf{A}(\mathbf{x}),\sigma_{\mathbf{y}}^{2}\mathbf{I})$ . Here, we extend our evaluation to a Poisson-noise likelihood + +$$ +g _ {0} (\mathbf {y} | \mathbf {x}) = \exp \big (- \lambda \mathbf {A} (\mathbf {x}) \big) \frac {(- \lambda \mathbf {A} (\mathbf {x})) ^ {\mathbf {y}}}{\mathbf {y} !}, +$$ + +where $\lambda > 0$ is the Poisson rate. We compare MGDM against DPS on several tasks: denoising, super-resolution $(\times 4)$ , Gaussian deblurring, and motion deblurring. These experiments were conducted on the FFHQ dataset in pixel space with a Poisson rate of $\lambda = 0.05$ . Notably, while DPS relies on a Gaussian approximation (Chung et al., 2023, Eqn. (19)) due to the inherent challenges of Poisson likelihoods, we directly implement the Poisson likelihood without approximation. As detailed in Table 11, MGDM consistently outperforms DPS across all evaluated metrics. + +Table 11: FID and mean LPIPS/PSNR/SSIM metrics along side $95\%$ -confidence interval on FFHQ $256\times 256$ dataset with Poisson noise with Poisson rate $\lambda = 0.05$ + +
TaskMGDMDPSMGDMDPSMGDMDPSMGDMDPS
LPIPS ↓FID ↓PSNR ↑SSIM ↑
Denoising0.08 ±0.000.15 ±0.0154.7360.4828.81 ±0.1718.96 ±0.160.83 ±0.000.68 ±0.01
SR (×4)0.25 ±0.010.25 ±0.0174.7569.4921.65 ±0.2117.62 ±0.120.65 ±0.010.56 ±0.01
Gaussian Deblur0.20 ±0.010.30 ±0.0164.83100.6323.09 ±0.2216.49 ±0.160.66 ±0.010.49 ±0.01
Motion Deblur0.21 ±0.010.27 ±0.0160.5369.7322.52 ±0.2016.91 ±0.150.66 ±0.010.52 ±0.01
+ +![](images/a9c300aed63eaf1b61ec76a8976104e687aa78bf3d18a6041105b057ed499656.jpg) +Figure 7: Reconstructions for half mask inpainting on FFHQ dataset. + +![](images/3334846b6384a3f0d3da1fbb03b29e6e2e67246e90224210d903c275707af4fd.jpg) +Figure 8: Re constructions for box inpainting on FFHQ dataset. + +![](images/3d9fcf05e970bf7ce0b2a04453e2584443e57c5be470e912bc7e37d3d8a5e1cf.jpg) +Figure 9: Reconstructions for JPEG dequantization $\mathrm{QF} = 2\%$ on FFHQ dataset. + +![](images/094e67c1cf3b25f298afa4271f3d1f93d0f7ffae465d47952de0223a9ecf4c9a.jpg) +Figure 10: Reconstructions Half mask inpainting on ImageNet dataset. + +![](images/671a977362e5fce0b3faef9ec96c73559579e05c9abc71f04fb09a5f5916c5e0.jpg) +Figure 11: Reconstructions for Gaussian deblurring on ImageNet dataset. + +![](images/4f5f2efe8d18703184e12c09876441b30606864effd73790c6f3d180be36d079.jpg) +Figure 12: Reconstructions for motion deblurring on FFHQ dataset. + +![](images/83dd4d4f0c8a42421871b753a4108bf4fdc64ee6f64c04a188592c9435cc7150.jpg) +Figure 13: Reconstructions for half mask inpainting on FFHQ dataset with LDM prior. + +![](images/956ba44cb6f4cbbf841a434d3b82e943be3cb4ada4281ccb51ea70fd1bd3fd4b.jpg) +Observation + +![](images/a11bc9245f919e2bf7e7ddd2764dfbc6d23ff66e7e325bcdf29848c45b2ec573.jpg) +Reference + +![](images/2ba8fb78e8abb19edb1a05130850b774a64a47ac3cb30f4a2198a3fdd7489ea8.jpg) +PNP-DM DAPS PSLD RESAMPLE MGDM +MGDM + +![](images/8c1213cc2724c201e40a868bd6bff4dd46ffff8e425cded8e3f5d0f0e3ed031b.jpg) + +![](images/6f1e296252cdf9fda9b1bb3ca698a5314af948def224649e8de0760f759cc2a3.jpg) + +![](images/608b5f37587f322cebaaf0a88e330bd2510ab173ef20fd781ae31ac16a0f750b.jpg) + +![](images/51d73b7f7676b92e06a9aafd13eb180d1e168907633d1681858f7a935b433d89.jpg) +Figure 14: Reconstructions for $\mathrm{SR} \times 16$ on FFHQ dataset with LDM prior. + +![](images/2c3d4eb3421ed5bedf206840f7c4a6e09918a0a594dd25461c800929e1d4ee19.jpg) + +![](images/6ea7d7fd357fb7c104fbd0dd8228974ac531f6848002b57cc943fe4760910409.jpg) + +![](images/bed3720650ffe9422ca0b84924ea47a52d03046813db7f99b1335c8fffaa7383.jpg) + +![](images/b70e9b5c32da8c392c72ac597ace5b09a2f8357a4142cd66a25eb2b495462965.jpg) + +![](images/60ef3a0fe99902fd1578c9fc4b01ff4596c7443ed5a8a7b60fa7be19c5aa5b70.jpg) +Figure 15: Half mask inpainting on FFHQ dataset. + +![](images/d1d9f0fe12caddfbd084c1aea92ac32f6e82da8a664ab0cfb4e429a848471033.jpg) +Figure 16: Half mask inpainting on ImageNet dataset. + +![](images/da74322273c644b2132c4fdb28efb69c85540d33c5fe1af9468d6f593431e8f8.jpg) +Figure 17: Box inpainting on FFHQ dataset. + +![](images/771b6afdc1402c579dfde4a54562329de6db6e0ad25c4b60676f4117fd7ea167.jpg) +Figure 18: Box inpainting on ImageNet dataset. + +![](images/e0d8cf18c803cea6993d2ddeba16e6c369575cdfa4eeed0abbe2c6af808409d6.jpg) +Figure 19: JPEG dequantization with $\mathrm{QF} = 2$ on FFHQ dataset. + +![](images/a48dc60cebbfd6f0ab37c8173e73feb4938b721d4d1fb9fbded9560eea565f1c.jpg) + +![](images/e42c15fa29d0fcc06ef443403387292b1a45796513c7017c9b73174d239e9f56.jpg) +Figure 20: JPEG dequantization with QF = 2 on ImageNet dataset. + +![](images/d48c8afd62f1e44512b5590ae55d1cba2bbb277f6b30ef9ff3cd5b31da7b59a4.jpg) + +![](images/b3d273c885d7601120cc749fed6e9a8069aee7efe4584119caebb8ebfd5ef974.jpg) +Figure 21: Motion deblurring on FFHQ dataset. + +![](images/8d0a19ea8b27c3cba0eb4e55e974e7fc27b1929bd0dc2c5f36561eaa7610d164.jpg) +Figure 22: Motion deblurring on ImageNet dataset. + +![](images/074b4c14f9cd98e508bc66316c5c46efc696085116d220afd488afa8876771b3.jpg) +Figure 23: $\mathrm{SR}(16\times)$ on FFHQ dataset. + +![](images/f051607b309ef5fdca88fddead81996a5a0e3c328d534827211791712cd48dc9.jpg) +Figure 24: $\mathrm{SR}(16\times)$ on ImageNet dataset. + +![](images/9b2c4269344768ff6a6cbfce7aecc696c57c343702dc8dd1885b45ddf09f1beb.jpg) +Figure 25: High dynamic range on ImageNet dataset. + +![](images/9e3ce29533dde20a89c8b83bc49a4076aeb3756d5c10b2fc09e421bfc4e7c677.jpg) +Figure 26: $\mathrm{SR}(4\times)$ on FFHQ dataset with latent diffusion. + +![](images/7fe95a98ea6812a7e4da5640e24f2ab9e816e7fe9607a3cac25f3984b0525998.jpg) + +![](images/4db9dd808740aa0df9ad64ade7bfd938588657dbb10cca69bbca3af70e1f2703.jpg) +Figure 27: $\mathrm{SR}(16\times)$ on FFHQ dataset with latent diffusion. + +![](images/1deefe6e04b88c0348264dae09f58dcff144519eafcd256239df8b503790c060.jpg) +Figure 28: Half mask on FFHQ dataset with latent diffusion. \ No newline at end of file diff --git a/amixturebasedframeworkforguidingdiffusionmodels/images.zip b/amixturebasedframeworkforguidingdiffusionmodels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..360fde8c424203c0bdf05fa51334744a8204b733 --- /dev/null +++ b/amixturebasedframeworkforguidingdiffusionmodels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6be6c5cc500fb3eb3d4856b48742d9dbbb648cbb7e6faabdc2623a69da9a6bcc +size 8165640 diff --git a/amixturebasedframeworkforguidingdiffusionmodels/layout.json b/amixturebasedframeworkforguidingdiffusionmodels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..415e52d28bf1fa7cb117f8f4b106b364d41fa43a --- /dev/null +++ b/amixturebasedframeworkforguidingdiffusionmodels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a65f5abb46f5dd2c3eeab5e2295a51705be45603604545ccae3696fa2c5c6e81 +size 1260484 diff --git a/howcantransformerspredictpseudorandomnumbers/3bbdd284-a0d6-49bf-8936-4fb5fce85525_content_list.json b/howcantransformerspredictpseudorandomnumbers/3bbdd284-a0d6-49bf-8936-4fb5fce85525_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..44a228018a48a2ac657f49fdc9e0789bc656ebf8 --- /dev/null +++ b/howcantransformerspredictpseudorandomnumbers/3bbdd284-a0d6-49bf-8936-4fb5fce85525_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c2726f9ddf408cfc03d098f8cdf67572ea00b2048baee47f1deb653d5fce016 +size 178179 diff --git a/howcantransformerspredictpseudorandomnumbers/3bbdd284-a0d6-49bf-8936-4fb5fce85525_model.json b/howcantransformerspredictpseudorandomnumbers/3bbdd284-a0d6-49bf-8936-4fb5fce85525_model.json new file mode 100644 index 0000000000000000000000000000000000000000..31f84287ba4af09052e3909fd0e20a4e79b88b71 --- /dev/null +++ b/howcantransformerspredictpseudorandomnumbers/3bbdd284-a0d6-49bf-8936-4fb5fce85525_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54229e57a403075ba15805e9de862a7996dbff3bb620cee6305427aae7d3243a +size 209301 diff --git a/howcantransformerspredictpseudorandomnumbers/3bbdd284-a0d6-49bf-8936-4fb5fce85525_origin.pdf b/howcantransformerspredictpseudorandomnumbers/3bbdd284-a0d6-49bf-8936-4fb5fce85525_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..214291c8b113b7ee4353a03df730ad03f67fd744 --- /dev/null +++ b/howcantransformerspredictpseudorandomnumbers/3bbdd284-a0d6-49bf-8936-4fb5fce85525_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c32fbf53d0921ab7af11e69246c09e795054b6c32551518b7549721a831b633 +size 18564027 diff --git a/howcantransformerspredictpseudorandomnumbers/full.md b/howcantransformerspredictpseudorandomnumbers/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a3f6603acf5234fa04a6c1658900262779056084 --- /dev/null +++ b/howcantransformerspredictpseudorandomnumbers/full.md @@ -0,0 +1,832 @@ +# (How) Can Transformers Predict Pseudo-Random Numbers? + +Tao Tao\*1 Darshil Doshi\*1 Dayal Singh Kalra\*2 Tianyu He\*1 Maisam Barkeshli 13 + +{tao2021, ddoshi, dayal, tianyuh, maissam}@umd.edu + +# Abstract + +Transformers excel at discovering patterns in sequential data, yet their fundamental limitations and learning mechanisms remain crucial topics of investigation. In this paper, we study the ability of Transformers to learn pseudo-random number sequences from linear congruential generators (LCGs), defined by the recurrence relation $x_{t + 1} = ax_t + c \mod m$ . We find that with sufficient architectural capacity and training data variety, Transformers can perform in-context prediction of LCG sequences with unseen moduli ( $m$ ) and parameters ( $a, c$ ). By analyzing the embedding layers and attention patterns, we uncover how Transformers develop algorithmic structures to learn these sequences in two scenarios of increasing complexity. First, we investigate how Transformers learn LCG sequences with unseen ( $a, c$ ) but fixed modulus; and demonstrate successful learning up to $m = 2^{32}$ . We find that models learn to factorize $m$ and utilize digit-wise number representations to make sequential predictions. In the second, more challenging scenario of unseen moduli, we show that Transformers can generalize to unseen moduli up to $m_{\mathrm{test}} = 2^{16}$ . In this case, the model employs a two-step strategy: first estimating the unknown modulus from the context, then utilizing prime factorizations to generate predictions. For this task, we observe a sharp transition in the accuracy at a critical depth $d = 3$ . We also find that the number of in-context sequence elements needed to reach high accuracy scales sublinearly with the modulus. + +*Equal contribution – authors listed in pseudo-random order. +1Department of Physics, University of Maryland, College Park, USA 2Department of Computer Science, University of Maryland, College Park, USA 3Joint Quantum Institute, University of Maryland, College Park, USA. Correspondence to: Maisam Barkeshli . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +We open source the code to reproduce our results: https:// + +# 1. Introduction + +Transformer-based language models have proven to be extremely powerful sequence generative models. With copious amounts of training data and computational resources, they can identify and learn complex patterns from training corpora, resulting in numerous remarkable capabilities (Vaswani et al., 2017; Dosovitskiy et al., 2021). Recent research has demonstrated that these models, when provided with sufficient context and inference compute, can acquire new patterns and capabilities without additional training through techniques such as in-context learning (Radford et al., 2019) and chain-of-thought reasoning (Wei et al., 2023). While these models have achieved unprecedented success, understanding what underlying patterns are learned and how they learn them remains a significant challenge. Pseudo-Random Number Generators (PRNGs) represent an interesting test case for exploring these challenges. These algorithms, which are fundamental to modern cryptography and computer science, are designed to produce outputs that pass statistical tests for randomness, but nevertheless arise from mathematical patterns that could potentially be learned by sufficiently powerful sequence models. + +This intersection between Transformer models' pattern-learning capabilities and the structured yet obfuscated nature of PRNG outputs raises intriguing questions about both the capabilities and limitations of these models. Can Transformers learn to predict PRNG outputs given sufficient training data, model capacity, and context? If so, what implications does this have for our understanding of both Transformer architectures and PRNGs? Do the Transformers learn the underlying generating algorithm or merely detect shortcuts and spurious patterns? What effect do model capacity, data variety, training methodologies, and context length have on the capabilities of Transformers? + +This work aims to answer these questions by focusing on learning sequences obtained from linear congruential generators (LCGs) using GPT-style autoregressive Transformers. We demonstrate how Transformers can successfully learn LCGs with moduli up to $m = 2^{32}$ . We perform interpretability analyses, uncovering emergent structures in + +the embedding layers, attention heads, and underlying algorithms that the Transformer uses to learn the sequences. We also perform several systematic scaling analyses to understand the effect of architecture and sequence complexity on model performance and in-context learning ability. + +# 1.1. Related works + +Our study on the learnability of PRNGs for Transformers touches on several modern and classic topics. + +Interpretability and Modular Arithmetic: A growing body of work examines the circuits, algorithms and structures learned by Transformers (Sharkey et al., 2025; Olsson et al., 2022; Ahn et al., 2023; von Oswald et al., 2023; Akyurek et al., 2023; Hendel et al., 2023; Liu et al., 2024). A notably fruitful setting involves simple modular arithmetic problems (Power et al., 2022; Gromov, 2023; Nanda et al., 2023; Zhong et al., 2023; Doshi et al., 2024a;b; He et al., 2024). Our work adds to this by reverse-engineering the underlying algorithms and uncovering emergent structures in learning pseudo-random number sequences. + +**Cracking PRNGs:** There is a classic duality between cryptography and learning theory (Rivest, 1991), and cracking PRNGs is an important topic in cryptography. Nevertheless, deep learning-based attacks have received limited attention in the post-Transformer era. Amigo et al. (2021) demonstrated that a fully-connected neural network can predict the outputs of a modified LCG with fixed (irrational) parameters $(a, c, m) = (1, \pi, 1)$ . In comparison, we systematically analyze the harder cases of unseen parameters using Transformers, reverse-engineer the learned algorithms, and study effects of scale and complexity. + +Formal Grammars: LCG can also be viewed as a formal language (Type-3 regular grammar) lying within the Chomsky hierarchy (Chomsky, 1956). Formal languages provide an interesting setting for synthetic datasets that can be used to understand the properties of neural networks in controlled settings (Delétang et al., 2023; Allen-Zhu & Li, 2024; Cagnetta et al., 2024; Cagnetta & Wyart, 2024). + +Chaotic time-series: A major application of neural networks is predicting time-series for chaotic dynamics, such as weather prediction (Lam et al., 2023) and financial modeling. PRNGs provide an analog of such dynamics in the discrete setting. + +# 1.2. Linear Congruential Generators + +LCG is a simple PRNG that generates the next number in a sequence $(x_0, x_1, \ldots, x_t)$ according to the map: + +$$ +x _ {t + 1} = \left(a x _ {t} + c\right) \mod m, \tag {1} +$$ + +where $m > 0$ is the modulus, $0 < a < m$ is the multiplier and $0 \leq c < m$ is referred to as the increment. An LCG map + +is uniquely defined by the choice of $m, a, c$ and the initial seed $x_0$ . An important quantity that determines the complexity of an LCG sequence is its period: $1 \leq \mathcal{T}_m(a, c) \leq m$ . As we will show in the following sections, the period of a sequence plays a major role in the difficulty of prediction with Transformers. According to the Hull-Dobell Theorem (Hull & Dobell, 1962), the period $\mathcal{T}_m(a, c) = m$ if and only if the values of $a$ and $c$ satisfy the following criteria: (i) $m$ and $c$ are coprime, (ii) $a - 1$ is divisible by all prime factors of $m$ , (iii) $a - 1$ is divisible by 4 if $m$ is divisible by 4. We evaluate (test) all our models exclusively on sequences that obey the criteria of this theorem. + +LCGs are widely utilized for their speed and simplicity, often forming the core of more complex PRNGs like PCG-64, which is used in NumPy. LCGs perform poorly at small bit sizes but improve rapidly with larger state sizes. For instance, an LCG with 88 bits of state can pass the stringent BigCrush randomness test (O'Neill, 2014). + +# 2. Training Setup + +We train decoder-only Transformers to autoregressively predict the next number in LCG sequences. This means it takes as input an LCG sequence $(x_0, \dots, x_{L-1})$ , outputs a sequence $(y_0, \dots, y_{L-1})$ , and trained so $y_t$ matches $x_{t+1}$ . + +To predict an unknown LCG sequence, the Transformer needs to infer $m$ , $a$ , and $c$ in-context. We test the model's generalization ability in two distinct paradigms of increasing difficulty: FM: The model is trained and tested on sequences with a fixed modulus $m$ . UM: Model is trained on varying moduli, and tested on unseen moduli $M_{\mathrm{test}} = \{m_{\mathrm{test}}\}$ . We highlight the key details of our experimental setups here and provide an extensive discussion in Appendix A. + +# 2.1. Dataset Generation and Evaluation + +The settings below are used in Sections 3 and 4. In order to achieve better performance, we used a larger and higher-quality dataset in Section 5, which we detail later. + +Fixed Modulus (FM): Given a modulus $m$ , we apply the Hull-Dobell Theorem to determine the possible values of $(a, c)$ that maximize the period. We then randomly select 64 values of $a$ and $c$ to generate the test dataset. To generate the training dataset, we exclude these test choices of $(a, c)$ and uniformly sample $N = 100,000$ LCG sequences of length $L + 1$ (where $L$ is the context length), with $n_a$ values of multipliers and $n_c$ values of increments. For each set of parameters $(a, c)$ , we sample an LCG sequence with a randomly selected initial seed $x_0$ . Note that the training dataset includes sequences with varying periods, while the test data only contains sequences that maximize the period. + +Generalization to Unseen Modulus (UM): In this more + +challenging paradigm, we first select a set of test moduli $M_{\mathrm{test}} = \{m_{\mathrm{test}}\}$ that would be reserved exclusively for evaluation. For each test modulus $m_{\mathrm{test}} \in M_{\mathrm{test}}$ , we determine the values of $(a,c)$ that maximize the period. We then randomly select 64 values of $a$ and $c$ each to generate the test dataset. These $64^2$ $(a,c)$ pairs are not considered while generating the training dataset. + +For the training dataset generation, we sample $n_m$ modulus values from the range $[L, m_{\max}]$ , with $m_{\max} = \lfloor 1.2 \max(M_{\mathrm{test}}) \rfloor$ , while excluding all the values in $M_{\mathrm{test}}$ . For each modulus value $m$ , we uniformly select $n_a$ multipliers and $n_c$ increments, excluding the ones reserved for testing. For each triplet $(a, c, m)$ , we generate a sequence of length $L + 1$ using a randomly selected initial seed $x_0$ . This results in a total of $N = n_m \times n_a \times n_c$ training sequences. + +We found that $n_m \gtrsim m_{\mathrm{test}} / 4$ yields good generalization performance. Based on this relationship and our target total number of training examples $N$ , we sample $n_a = n_c = \sqrt{\frac{N}{m_{\mathrm{test}} / 4}}$ values of multipliers and increments. Unless explicitly specified, we use this setting as the default configuration for all experiments. + +In both paradigms, test accuracy is averaged over all $(a,c)$ test pairs and multiple initial seeds $x_0$ per pair. Accuracies are tracked at all sequence positions $1\leq t\leq L$ + +# 2.2. Tokenization, Architecture, and Optimizer + +In Sections 3 and 4, each number is tokenized as a unique token, using a dictionary of size $m$ (FM) or $m_{\max}$ (UM). We employ GPT-style Transformers with learnable positional embeddings and weight tying (Press & Wolf, 2017). + +When we scale up to larger moduli in Section 5, we restrict the dictionary size to $b$ by tokenizing each number in the sequence in base- $b$ (e.g. $b = 2^8$ , $3^5$ ). This results in $\lceil \log_b m \rceil$ tokens for each number. We also apply (modified) abacus positional embeddings (McLeish et al., 2024). + +The model architecture is characterized by the number of blocks (depth), embedding dimension ( $d_{\mathrm{model}}$ ), number of attention heads ( $n_{\mathrm{heads}}$ ). Models are trained with AdamW (Loshchilov & Hutter, 2019) and CrossEntropy loss. + +# 3. Training Results + +We begin by investigating the minimal model that can solve the two tasks in consideration. Surprisingly, we found that Transformers only require one layer and one attention head to learn the FM task, as shown in Figure 2 (a) (for further results, see Appendix B). Conversely, the UM task requires a stronger architecture and careful hyperparameter tuning. Appendix C shows that model performance depends on the modulus, with prime moduli being challenging in the FM + +![](images/8d59bafd25dd73d6d72511072eafcc2294bdab395d7291c7739fc8b6c6097ddb.jpg) +Figure 1. Accuracy of predicting the last number (token) in the sequence: phase diagrams w.r.t. various depths and $n_{\mathrm{heads}}$ values. (a) $m_{\mathrm{test}} = 2048$ , constant width: $d_{\mathrm{model}} = 768$ . (b) $m_{\mathrm{test}} = 4096$ , width scaled proportionally: $d_{\mathrm{model}} = 128 \times n_{\mathrm{heads}}$ . + +![](images/a7be3f664413a1d1125f2e99526fd3d11bdff4ba41cdd7b46e208f0b16b8011c.jpg) + +setting but not in the UM setting. + +In Figure 1 we show how the performance varies with model depth and the number of attention heads. In Figure 1(a) we keep the embedding dimension fixed to $d_{\mathrm{model}} = 768$ , whereas in Figure 1(b) we scale it proportionally to the number of heads ( $d_{\mathrm{model}} = 128 \times n_{\mathrm{heads}}$ ). In both cases, we find that a minimum of three layers are required for effective generalization, with performance degrading sharply below this threshold. Further analysis across multiple $m_{\mathrm{test}}$ values (see Appendix D) confirms that this minimal depth requirement is universal. We also observe that additional attention heads improve model performance, with substantial gain occurring when increasing from one to two heads. + +Several prior studies have also observed sharp changes in model capabilities as a function of model depth. This includes induction head formation (Olsson et al., 2022), in-context learning of modular addition (He et al., 2024) and various in-context generalization tasks (Chen & Zou, 2024). In general it is unclear to what extent these sharp depth-dependences are due to jumps in expressivity or trainability. + +The UM task shows strong sensitivity to hyperparameters. As we increase $m_{\mathrm{test}}$ while keeping the model size fixed, we observe two key phenomena: the optimal learning rate $(\eta)$ and weight decay strength $(\lambda)$ shift significantly, and simultaneously, the range of hyperparameter resulting in effective performance narrows (see Appendix A.5). + +We then carefully examine the training dynamics in both FM and UM settings (Figure 2). We categorize the training sequences into two groups: i) sequences with periods shorter than the context length, which can be solved through simple copying, and ii) sequences with periods longer than the context length, which require the model to deduce underlying rules for prediction. Our analysis reveals that the model first acquires copying ability for group i) in the early stages of training, and later "groks" the solution for group ii) (Power et al., 2022). Notably, the model's ability to generalize to test modulus $m_{\mathrm{test}}$ emerges simultaneously with this grokking phenomenon. These results demonstrate that + +![](images/b575e65bd176777b9f8354f87207b5c41d2d3c854f3ba1c91be2de5760b89402.jpg) +Figure 2. Training/test accuracy curves for predicting last number (token). (a) FM: $(m = 2048, \text{depth} = 1, n_{\text{heads}} = 1, d_{\text{model}} = 768)$ Test accuracy "groks" when training accuracy reaches near $100\%$ . (b) UM: $(m_{\text{test}} = 2048, \text{depth} = 6, n_{\text{heads}} = 4, d_{\text{model}} = 768)$ Test accuracy "groks" simultaneously with training accuracy on sequences with period longer than context length $(T_m > L = 256)$ , indicating delayed discovery of underlying rules. + +![](images/e5d9e8eb415a835c9851b9861a920fc837c6883e4ed9106c5c4b81b409da54ca.jpg) + +the model develops different capabilities at distinct stages of training, with generalization ability emerging only after the model learns the underlying rules through solving the more challenging sequences. In Appendix E, we present an ablation study where models are trained exclusively on either short-period or long-period sequences. Our findings indicate that training exclusively on long-period sequences enables model generalization. + +# 4. Interpreting How Transformers Predict PRNGs + +In this section, we uncover the underlying algorithms implemented by the models for both FM and UM cases. While certain details of the algorithms differ in the two cases, they share common properties originating from the underlying LCG structure. We first discuss properties of LCG sequences that will be useful in interpreting model behaviors. + +# 4.1. Residual Number System Representations + +Consider an LCG sequence with modulus $m = 2048 = 2^{11}$ . Each number in this sequence can be represented as an 11-digit binary number: + +$$ +x \bmod 2 ^ {1 1} = \alpha_ {0} 2 ^ {0} + \alpha_ {1} 2 ^ {1} + \dots + \alpha_ {1 0} 2 ^ {1 0}, \tag {2} +$$ + +where $\{\alpha_0,\dots ,\alpha_{10}\}$ are the binary-valued digits (bits). + +A useful property of LCGs with modulus $m = 2^{(\cdot)}$ is that each digit in the binary representation has a fixed period along the sequence. As shown in Figure 3, for a sequence of period $\mathcal{T}_m = m = 2^{11}$ , the $w^{th}$ lowest digit has a period of $2^w$ (Knuth, 1997). Thus, lower (higher) digits have smaller (larger) periods along LCG sequences. (See Appendix F.1 for a detailed derivation.) We will see later that trained Transformers have emergent structures that find these binary representations and utilize them to make systematic predictions from the context. Notably, the per-digit period plays an important role in the prediction accuracy of that + +![](images/227ddb782717cd3a9e7e13548813b736a2280a32e130d0d46e568efc87da225e.jpg) + +![](images/d59d11225bdb06fc4e089588245f79583a216e6ab00309535046eb26625ebc10.jpg) +Figure 3. Bit-wise periods in an example LCG sequence generated with $m = 2048$ , $a = 293$ , $c = 1033$ , which follows the Hull-Dobell theorem. In binary representation $w$ -th lowest bit has a period of $2^w$ , for $w \in \{1, \ldots, 11\}$ . Writing a new sequence by skipping every 2nd step ( $r = 2$ ) reduces the periods of all the bits by a factor of 2, rendering the lowest bit constant. $r = 2^k$ reduces bit-wise periods by a factor of $2^k$ , with last $k$ digits constant. + +digit. To understand this, consider the $r$ -step iteration of Equation (1): + +$$ +x _ {t + r} = a ^ {r} x _ {t} + \sum_ {i = 1} ^ {r} a ^ {i - 1} c \mod m. \tag {3} +$$ + +In this new sequence wherein we skip $r$ steps, the period of each digit $\alpha_{w-1}$ reduces from $2^w$ to $2^w / \gcd(r, 2^w)$ . Consequently, the higher digits become relatively simpler to predict due to reduced periods while some lower digits become trivial to predict due to being constant along this new sequence. We demonstrate this for $m = 2048$ in Figure 3 (top panel). The digit-wise periods in the new sequence with $r = 2$ are reduced by a factor of 2, while the last digit is simply constant. Higher values of $r = 2^k$ will lead to even further simplifications of the sequence. Transformers can simplify the task of predicting LCG sequences by utilizing $r$ -step iterations from the in-context examples – with longer contexts leading to larger values of $r$ . Consequently, the per-digit and overall accuracies improve substantially with context (see Figure 4). + +While moduli of the form $m = 2^{(\cdot)}$ lead Transformers to find binary representations, similar simplifications in composite moduli require more general representations of the Residual Number System (RNS) (Garner, 1959). RNS represents numbers by their values modulo pairwise coprime factorizations of $m$ . Specifically, consider sequences with a composite modulus $m$ , which has a prime factorization $m = p_1^{w_1}p_2^{w_2}\dots p_q^{w_q}$ . In this case, we can uniquely represent each number $(x\bmod m)$ as the tuple of residuals $(x\bmod p_1^{w_1},x\bmod p_2^{w_2},\ldots ,x\bmod p_q^{w_q})$ . Analogous to Equation (2), we can further decompose each residual, + +$$ +x \bmod p _ {j} ^ {w _ {j}} = \alpha_ {j, 0} p _ {j} ^ {0} + \alpha_ {j, 1} p _ {j} ^ {1} + \dots + \alpha_ {j, w _ {j} - 1} p _ {j} ^ {w _ {j} - 1} \tag {4} +$$ + +where $\alpha_{j,w} \in \{0,1,\dots,p_j - 1\}$ are base- $p_j$ digits. We refer to $\{\alpha_{j,w}\}$ as the "RNS representation" in the remainder of the text. When $\mathcal{T}_m = m$ , each digit $\alpha_{j,w}$ has a period of $p_j^w$ (derivation in Appendix F.2). The $r$ step iteration Equation (3) reduces the period of each digit $\alpha_{j,w}$ from $p_j^w$ to $p_j^w / \gcd(r, p_j^w)$ . This results in simplification of the prediction task whenever $r = p_1^{k_1} p_2^{k_2} \cdots p_q^{k_q}$ . We will see that identifying the RNS representations is a key simplification that the Transformer discovers in learning LCG sequences. + +# 4.2. Interpretability: Fixed Modulus + +# Qualitative Algorithm (fixed modulus): + +i. Find RNS representations of inputs from the learned prime factorization of $m$ +ii. Look back $r = p_j^k$ steps in the context and copy the lowest $k$ digits, for different prime factors $(p_j)$ of $m$ +iii. Using these $r$ -step iterations, predict the higher digits of the simplified sequence + +We now discuss the algorithm implemented by Transformers trained on LCG with a fixed modulus. We will show that, despite being provided integers as inputs, the model develops emergent structures that create and leverage the RNS representation of the inputs. We will focus on the setup with a 1-layer, single-head Transformer trained on LCG with $m = 2048$ . Similar results for composite moduli (e.g. $m = 7776$ ) and different model sizes are presented in Appendix G. We emphasize that this algorithm works for arbitrary $a, c, x_0$ for a given $m$ . + +![](images/3205363ba90a97788eade4b03c6d7f9c391a198c315c02c9138bb01d65a85bc7.jpg) +Figure 4. FM: Test accuracy for $m = 2048$ , depth $= 1$ , $n_{\mathrm{heads}} = 1$ , $d_{\mathrm{model}} = 768$ , averaged over $a, c$ , and seeds. (a) Test accuracy w.r.t. token positions. Ladder-like structure appears, with jumps occurring at $2^{k}$ -th positions. (b) We represent numbers as an eleven-digit binary number ( $2048 = 2^{11}$ ) and compute the per-digit test accuracy of model predictions. + +![](images/7dcb10a50a045be1e6a46ab560beec239f6e56bda3e59bb65505e43e9320d23f.jpg) +Figure 5. FM: $(a = 1589, c = 629)$ Embedding layer. (a1) 1st principal component groups the numbers mod 2. (a2) 2nd and 3rd principal components group numbers mod 4. (b) Embedding vectors of different numbers exhibit high cosine similarity when they are spaced $2^k$ apart, with the similarity increasing with $k$ . + +We begin by analyzing the average accuracy of a trained + +Transformer model as a function of token position along the context, shown in Figure 4 (a). (Recall that in this section a token corresponds to an integer of the LCG sequence). The accuracy exhibits a ladder-like structure, with each jump occurring exactly at the $2^{k}$ -th token position. These successive transitions can be explained using binary representations and $r$ -step recurrence (Equation (3)). Specifically, to predict the token at position $t \geq 2^{k}$ , the model can look back in the context at position $t - 2^{k}$ and implement $r = 2^{k}$ -step iteration. This allows the model to (i) copy the lowest $k$ bits since they remain unchanged; and (ii) simplify the higher bits, since their periods get reduced by a factor $2^{k}$ . We note that the accuracy trend remains unchanged across different choices of $a$ and $x_{0}$ (see Figure 21). + +Next, in Figure 4(b), we compute the per-digit accuracy by converting both model predictions and ground truth labels to their binary representations according to Equation (2). We observe that the model can predict more digits correctly with more context, with sharp transitions occurring at $2^{k}$ -th token positions. This is a direct result of the sequences becoming increasingly more simplified as the model can look farther back in the context and utilize $(r = 2^{k})$ -step iterations. Since these simplifications occur in the form of digit-wise periods, Figure 4(b) serves as direct evidence that the model is internally developing and utilizing binary representations. The sequential learning of digits also explains the ladder-like structure of the accuracy in Figure 4(a). We find that the overall average accuracy (Figure 4(a)) multiplicatively depends on the per-digit accuracies (Figure 4(b)) (empirical proof in Figure 22(b))1 + +$$ +\operatorname {a c c} _ {\text {o v e r a l l}} = \left(\operatorname {a c c} _ {\text {d i g i t 1}}\right) \left(\operatorname {a c c} _ {\text {d i g i t 2}}\right) \dots \left(\operatorname {a c c} _ {\text {d i g i t 1 1}}\right). \tag {5} +$$ + +Next, we investigate how various components of the model implement the algorithm outlined earlier this section. + +![](images/e42356d59e2af2c3b9dd16b35558f3c62ce5774085fba686c9ab91175296b30f.jpg) +(b) Cosine similarity of embedding vectors + +![](images/00496d0dbafc64f9a8ca2321355faa5f4f78ccef30b042a4f01a51637d24c861.jpg) + +![](images/c7dc80bab0b8a3d71ce6ff923f7b0c9667d8e7c70b4ecadadc9253b5d064a0cb.jpg) + +![](images/5821a8633804b27d6274a9d79882f4b95f00b1e87df421dfb20e511af64b6534.jpg) +Figure 6. FM: $(m = 2^{11}, a = 1589, c = 629)$ (a) Attention weights: each query attends most strongly to the tokens $2^k$ and $2^{k-1}$ distance backward, for the highest possible value of $k$ , enabling copying of lowest $k$ bits. The other faint lines facilitate the prediction of higher bits. (b) Post-ReLU hidden layer MLP activations at token position $t = 129$ (extracted using sequences with different $x_0$ ) as a function of the target number $x_{130}$ which it is supposed to predict. Each neuron gets activated only while predicting a specific $x_{130}$ , exhibiting a sparse, periodic pattern. (c) Output of the MLP block projected onto the (un)embedding matrix; after masking out all but a single given hidden-layer neuron. The green dot denotes the value at the target number. Each neuron resolves the correct prediction up to a periodic structure. (d) Output of the MLP block projected onto the (un)embedding matrix; after combining the signal from multiple neurons (i.e. gradually un-masking the neurons). The per-neuron periodic patterns constructively interfere at the correct output. + +![](images/82925bb40d1fdad753f2560a9d89aecf7617b5b14e826410e0ab66b6c565b55e.jpg) + +![](images/24143d40c7fc3b858bb3aa811b49ed912f3f33c5fb4e4250c1f2c578b022145a.jpg) + +Step i: We begin by conducting Principal Components Analysis (PCA) of the embedding matrix, which shows how the model performs prime factorization to develop the binary representations (RNS for general $m$ ). Figure 5(a1) shows the projections of all numbers $x \in \{0, \dots, 2047\}$ along the first principal component of the embedding. We observe that the model groups the numbers into modulo 2 clusters along the first principal component. Similarly, the 2nd and 3rd principal components group the numbers into modulo 4 clusters (Figure 5(a2)). In general, we find principal directions that group the numbers into modulo $2^{(\cdot)}$ (see Figure 24). By clustering the numbers according to their remainder modulo different prime-powers, these principal directions naturally encode the digit-wise representations of the inputs. In Figure 5(b), we check the cosine similarity between the embedding vectors of different numbers. We see that the more digits two numbers share in the binary representation, the higher the cosine similarity of their embedding. This is a consequence of these numbers having similar components along principal directions corresponding to those digits. For composite moduli, we find similar clustering according to different prime factors of $m$ (see Figures 25, 26). + +Step ii, iii: In Figure 6(a) we examine the attention weights and find that to predict the number at position $t$ , the model attends most strongly to the position $t - 2^k$ for the highest possible value of $k$ s.t. $t \geq 2^k$ (i.e. $k = \lfloor \log_2 t \rfloor$ ). This corresponds to the brightest line in Figure 6(a). Using the binary representation of the $(t - 2^k)$ -th token, the model can copy the lowest $k$ bits and simplify the prediction of higher bits. Additionally, the second brightest line appears at the position $t - 2^{k-1}$ , along with other faint lines at intermediate distances (multiples of $t - 2^{k'}$ for $k' < k-1$ ). The information obtained from all these lines are utilized by + +the model in predicting the higher bits. + +To verify that the brightestest line enables the copying of lower bits and that the second brightest line facilitates the prediction of higher bits, we performed the following two experiments. (i) For each query in the attention head, we mask out all keys except for the one at position $t - 2^k$ . We then measure the performance of this ablated model, shown in Figure 20(a). We observe that the model retains the ability to copy the $k$ lowest bits, but loses the ability to predict the higher bits. (ii) Next, we repeat the above ablation experiment while masking out all keys except the ones at positions $t - 2^k$ and $t - 2^{k-1}$ , shown in Figure 20(b). This results in a drastic improvement in the prediction of the higher bits compared to (i), confirming our assertions. + +After the attention layer collects information about previous tokens, the MLP block ${}^{2}$ processes the information to make predictions. We find that each hidden neuron (post-ReLU) in the MLP exhibits a periodic response with a distinct period, as a function of the target prediction. Consider the MLP at token position $t$ . The input to the transformer at this position is $x_{t}$ and the output $y_{t}$ , should match the next number in the sequence $x_{t + 1}$ . In Figure 6(b) we show the activation value of selected neurons at token position $t = 129$ as a function of the target $x_{130}$ , for $m$ different sequences obtained by changing the seed $x_{0}$ for a given LCG sequence. We observe that only a sparse set of neurons are activated for a given target $x_{130}$ and that there is a strong spiked periodic structure in the response of each neuron as a function of $x_{130}$ , with neuron-specific frequencies. + +The subsequent fully connected layer in the MLP block aggregates the contributions from all the activated neurons to + +make the correct prediction (McCracken et al., 2025). To visualize the contributions from an individual neuron, we mask out the contribution from all other neurons and extract the MLP output for a fixed input sequence. We then project this output onto the (un)embedding matrix, which shows us the contribution of that single neuron in making the correct prediction. In Figure 6(c) we show that each neuron resolves the target number $x_{130}$ up to a distinct periodic pattern. The periodic patterns from different neurons constructively interfere at the target. In Figure 6(d), we observe that gradually adding contributions from multiple neurons resolves the correct output with increasing accuracy. + +# 4.3. Interpretability: Generalization to Unseen Modulus + +# Qualitative Algorithm (unseen modulus): + +i. Encode information about various possible prime factorizations +ii. Estimate the modulus via the largest number in context +iii. Combine steps i and ii to construct correct RNS representations, then implement steps ii and iii from the fixed modulus algorithm + +Unlike the FM case, the training set for UM is generated using many different moduli $m$ , unseen at test time. Since each modulus has its own RNS representation incompatible with other moduli, the model must implement a different, more general algorithm to solve UM tasks. + +We analyze how the embedding layer and attention heads of a 4-layer Transformer model help implement the above algorithm to solve the UM task. The model is trained on a dataset generated with $n_m = n_a = n_c = 128$ , where $m_{\mathrm{max}} = 2457$ . To avoid leakage between training and test sets, we specifically exclude the moduli $m_{\mathrm{test}} \in \{1800 = 2^3 \cdot 3^2 \cdot 5^2, 2048 = 2^{11}, 2352 = 2^4 \cdot 3 \cdot 7^2\}$ from the training set. Note that the choice $m_{\mathrm{max}} = \lfloor 1.2 \cdot 2048 \rfloor$ is made to maintain consistency with the setting in Figure 1(a). + +Figure 7. UM: PCA analysis of the embedding layer. +![](images/1274d75d87135e5420edbcc20acc13d57a23d4f6f305062f7e87b5f240220bc5.jpg) +3We read-out MLP outputs instead of network outputs to avoid distortion from the skip connection. + +![](images/8ff8179d3b029903ab5c6a7e31539993270914f1d0324e43903361c23a81f901.jpg) + +Step i: We first analyze the embedding layer. In Figure 7(a), PCA shows a semi-circular structure along the first principal component, with the second principal component separating even and odd numbers. This semi-circle resembles the circular patterns seen in modular arithmetic tasks (Power et al., 2022; Zhong et al., 2023), but since our model is trained on multiple moduli, it cannot form a closed circle by identifying a unique 0 value. Figure 7(b) further shows that the 2nd and 3rd principal components group numbers by their remainders modulo 2 and 3, which likely reflects their prevalence as prime factors in the training set. + +Note with varying moduli, the model need not form a binary encoding as before. Instead, we find attention heads in first layer group embedded numbers by remainders modulo different primes, each head specializing in a particular factor. This specialization allows the model to construct RNS representations with various prime bases. + +To investigate head specialization, we analyze afforementioned first-layer attention heads in Figure 8, presenting PCA results for selected heads in panels (a1, b1, c1). For each, we input sequences using the corresponding $m_{\mathrm{test}}$ and randomly selected $(a, c)$ pairs (per the Hull-Dobell Theorem), then isolate the output $H^{(h)}$ for each head by zeroing out all other heads. We perform PCA at token position $t = 0$ ( $\mathrm{PCA}(H^{(h)}[:, 0, :])$ ), then projecting each number's feature vector $H^{(h)}[x, t, :]$ onto the top two principal components and labeling each point with its corresponding $x$ . + +The analysis shows that each head groups numbers by their remainder modulo different prime factors, enabling the model to select suitable representations in later layers. The prominence of small primes in the top principal components likely reflects their frequency in the training data. Furthermore, we believe the performance gains observed in Figure 1 with more heads can be partly attributed to the model's improved capacity to capture additional prime factors for constructing RNS representations. More examples of specialization across various $(a, c, m_{\mathrm{test}}, x_0, t)$ are provided in Figure 27 (Appendix H.1). + +To further demonstrate that these heads directly influence the model's performance, we measured per-digit accuracy before and after pruning each specialized head, as shown in panels (a2, b2, c2) and (a3, b3, c3). For pruning, we replace the head's output with its mean value $\text{mean}(\pmb{H}^{(h)}[:, :, :]) \in \mathbb{R}$ across all positions (using 10% of randomly selected training sequences), which preserves signal scale and avoids catastrophic model degradation. The results show that pruning a head responsible for a particular prime factor significantly impairs performance on corresponding digits, while other digits are less affected. For instance, in panel (a3), the model's ability to compute $7^1$ and $7^2$ digits is lost, while base-2 and base-3 digits remain above chance. Similarly, in (b3), removing the modulo-2 head + +![](images/5cd04f15806f3cb213ea7d76e03d3d51dfb01346792646ae35e6396e4f8ae29f.jpg) + +![](images/eabd410f161deef12096f07e1dec86ec307e1a1c66bf641d6720ace3fe40a3dc.jpg) +Figure 8. UM: PCA analysis of attention heads specialized for different prime factors and their impact on per-digit accuracy. (a1, b1, c1) PCA of outputs from specific heads; the first two principal components group numbers by remainder modulo 14, 4, and 3, respectively. (a2, b2, c2) Test accuracy for individual digits with representations from Equation (4) for each $m_{\mathrm{test}}$ . (a3, b3, c3) Per-digit test accuracy after pruning these heads, showing substantial performance degradation on the affected digits. + +erases all corresponding digit accuracy, and in (c3), pruning the modulo-3 head greatly reduces base-3 digit performance, but leaves base-2 and base-5 largely intact. + +Finally, we further validate the link between head specialization and digit-wise accuracy by pruning irrelevant heads. For $m_{\mathrm{test}} = 2048$ , pruning heads responsible for modulo 7 or 3 (as in panels (a1) or (c1)) yields the results in Figure 28. Interestingly, removing the modulo-3 head sometimes improves performance for specific token positions, while others show minimal degradation. These findings reinforce the connection between head specialization and digit-wise computation; further details can be found in Appendix H.2. + +Step ii: The performance variations observed above suggest that the model is internally uncertain about which RNS representation to use, likely due to difficulty in determining $m_{\mathrm{test}}$ . As we discuss below, the model appears to estimate $m_{\mathrm{test}}$ greedily via in-context learning. + +In Figure 9(a), using a sequence with $x_0 = 1$ , $a = 5$ , $c = 31$ and $m_{\mathrm{test}} = 2048$ , we observe a first-layer attention head that attends primarily to the largest numbers, as seen by the vertical lines in the attention weights. To analyze this further, in panel (b), we extract the output $H^{(h)} \in \mathbb{R}^{1 \times L \times d_{\mathrm{model}}}$ from this head for the same sequence and compute its cosine similarity with token embeddings for all $x < m_{\mathrm{test}}$ , producing a $\mathbb{R}^{L \times m_{\mathrm{test}}}$ matrix for the heatmap. This reveals that the head's output consistently has the highest similarity with the largest numbers that has been seen in context, + +![](images/6a21370a08287747b3d6e974d2c9028e96c26e37b1c296961b7d2f0e0ba61596.jpg) + +![](images/8ecf8fc21330c8b9e3ff8de7bf8bc6aaefbab37c2e6f669bf6b5c6aa3fe29cb0.jpg) + +![](images/964d05f9b68f419ab34913ca5bf71c4e5978b3fc5841b37ad6dd3aef57edfcf4.jpg) +Figure 9. UM: Attention head (layer 1, head 6) specialized in estimating $m_{\mathrm{test}}$ . (a) Queries attend to largest keys; (b) the head produces features with the highest cosine similarity to $m_{\mathrm{test}}$ ; (c) patching this head with features from sequences with $m_{\mathrm{patch}} = 1024$ (same $a, c$ ) steers the model to predict numbers $n < m_{\mathrm{patch}}$ . + +indicating a greedy estimation of $m_{\mathrm{test}}$ . + +To further verify that this head estimates $m_{\mathrm{test}}$ for later layers, we conduct a patching experiment (Zhang & Nanda, 2024), as shown in Figure 9(c). We generate a new sequence with the same $a$ , $c$ , and $x_0$ , but with $m_{\mathrm{patch}} = 1024$ , and extract $H^{(h)}$ patch $\in \mathbb{R}^{1 \times L \times d_{\mathrm{model}}}$ from this head. We then overwrite the output $H^{(h)}$ in a forward pass for the original sequence $(m_{\mathrm{test}} = 2048)$ with $H^{(h)}$ patch. The model now frequently predicts numbers smaller than $m_{\mathrm{patch}}$ . As shown in Figure 30 (Appendix H.3), patching other heads disrupts predictions but never induces a similar qualitative shift, confirming this head's unique role in estimating $m_{\mathrm{test}}$ . + +One might expect that even a small error in estimating $m_{\mathrm{test}}$ would invalidate predictions, but this is not necessarily the case. As shown in Section 4.2, if the correct representation is chosen, the lower bits maintain a strong periodic signal. Since the model can prepare multiple RNS representations (as demonstrated in step i), a sufficiently close estimate of $m_{\mathrm{test}}$ allows these lower bits to guide the model toward the correct representation. Further discussion is provided in Appendix H.4 and step iii. + +Step iii: Once the necessary features are prepared, subsequent layers implement the rest of the algorithm. As in the FM case, we observe a ladder pattern in digit-wise accuracy for lower digits at early token positions. This pattern, which demonstrates the copying bias, is visible in Figure 8(b2). + +More careful inspection of Figure 8(b2) shows the model copies the lowest 5 digits. Interestingly, given the estimated $m_{\mathrm{test}} = 2033$ from step ii, the model effectively reduces it to $2033 / 2^5 \approx 63.53$ . Furthermore, since the model operates on integers, it could round it to 64, yielding $64 \cdot 2^5 = 2048 = m_{\mathrm{test}}$ . Thus, the model in principle, can predict higher digits accurately without the exact value of $m_{\mathrm{test}}$ . + +While some algorithmic transition from lower to higher digits clearly occurs, the exact mechanism remains unclear. The sharp transition in per-digit performance at the $2^{5}$ digit in Figure 8(b2) supports this argument. Nevertheless, we believe the model applies an algorithm similar to FM for higher bits, which we will elaborate on in Appendix H.5. + +# 5. Scaling Up the Modulus + +In this section, we investigate training upon scaling up the LCG modulus, with the following modifications: + +Base-b tokenization: To avoid massive dictionary sizes for large $m$ , we implement a base- $b$ tokenization scheme. Each integer is decomposed into a sequence of base- $b$ digits, beginning with the least significant digit; resulting in a vocabulary size of $b$ for any $m$ (for details see Appendix I.1). Based on the discussion in Section 4.1, it is beneficial to choose $b$ such that $\gcd(b, m) = b$ . + +Abacus Embeddings: We encode positional information using a variant of the Abacus embedding (McLeish et al., 2024), as a sum of two learnable vectors. One vector encodes the position of the integer within the sequence, while the other encodes the position of each digit within the integer (for details, see Appendix I.2). + +Fixed Modulus: For each modulus $m = 2^k$ , where $k$ is an integer in the range $16 \leq k \leq 32$ , we train a 2-layer model with $d_{\mathrm{model}} = 1024$ and a vocabulary size of 256. We select training sequences via the Hull-Dobell theorem, setting $n_a = n_c = 1024$ (See Appendix I.3 for training details). For the test dataset, we choose 512 values of $a$ and 64 values of $c$ that differ from those in the training set. + +The quality of an LCG largely depends on its multiplier, traditionally evaluated via the spectral test (Knuth, 1997). In Figure 10(a), we test our model on both spectrally optimal Steele multipliers (Steele & Vigna, 2021) and arbitrary multipliers for $m = 2^{32}$ . While achieving $100\%$ test accuracy with equal in-context sequence lengths, the model performs consistently worse on Steele-generated sequences compared to those from arbitrary multipliers. + +In Figure 10(b), a log-log plot reveals that the number of incontext sequence elements needed for $100\%$ test accuracy scales sublinearly with modulus $m$ as $m^{\gamma}$ , where $\gamma \approx 1/4$ . + +Unseen modulus: For the UM case, we train a 6-layer Transformer on a dataset with $n_m = 32,768$ , $n_a = 128$ , $n_c = 1$ with $1024 < m_{\mathrm{train}} < 65,536$ . Sequences are length 512, each integer tokenized as two bytes (context length 1023). As before, test data uses unseen $m_{\mathrm{test}}$ and $(a, c)$ , focusing on $m_{\mathrm{test}} = 2^k$ , $3^k$ . Figure 11 shows that the number of in-context sequence elements needed to reach $60\%$ test accuracy scales as $m_{\mathrm{test}}^\gamma$ ( $0.24 \leq \gamma \leq 0.33$ ). The averaged test accuracy of each number in the sequence is shown in + +![](images/97920a08cffc776716c0f74a7ddffda61d9680eca50125f7e2eeb5f3edce8e88.jpg) +Figure 10. FM: (a) Average test accuracy $(m = 2^{32})$ vs number of in-context sequence elements. (b) The number of in-context sequence elements required to achieve $100\%$ test accuracy (minimum of 5 runs). (See Appendix I.3 for details) + +![](images/47c0fae2be98c25f50c35aa4410d2b794b1fcfd407e2210a966c7cee91d29c0b.jpg) + +Appendix I.4. Test performance is influenced by the tokenization base, since the tokenization base highlights the periodic structure of LCGs making it more apparent and easier for the model to leverage during training and prediction. To confirm this, we train a model with tokenization base 243. In Figure 11, $m_{\mathrm{test}} = 2^k (3^k)$ sequences scale better when the tokenization base is $256 = 2^8$ ( $243 = 3^5$ ). + +![](images/0247f7e6d1d4be5c8f923c15c79f4fbfa55732a1feb367d44a1c06103feaf7ff.jpg) +Figure 11. UM: The number of in-context sequence elements needed for $60\%$ test accuracy grows sublinearly with modulus $m$ , depending on compatibility between $m$ and tokenization. (a) Base- $2^{8}$ tokenization; (b) base- $3^{5}$ tokenization. + +![](images/860a55047a85627139793636bb34678f2b7dcbe12332f8fcacebbde1ff10ca0b.jpg) + +# 6. Conclusion + +We have investigated Transformer training on LCG sequences, focusing on fixed modulus training as well as generalization to unseen moduli. In both cases, we have uncovered the algorithm used by the model to solve these tasks and highlighted the model components that implement the steps of the algorithm. We have found that the model finds and utilizes prime factorizations of $m$ and RNS representations of numbers to simplify the sequences and make predictions. We have provided the modified training recipe for scaling up the modulus in both FM and UM settings, and shown their scaling behaviors. + +Limitations and future work: The results of this paper were limited to scales $m \leq 2^{32}$ . It would be interesting to test our results on much larger moduli as well. We leave the exploration of PRNGs that are built upon LCGs, such as PCGs and truncated LCGs for future works. It would also be interesting to make the training even more unbiased, by training on general classes of arithmetic sequences. + +# Acknowledgements + +M.B. thanks Carl Miller for discussions on PRNGs. This work is supported by NSF DMR-2345644 (D.S.K., T.T., and M.B.), and by an NSF CAREER award DMR-2045181 (T.H. and D.D.). The authors acknowledge the University of Maryland supercomputing resources (http://hpcc.umd.edu) made available for conducting the research reported in this paper. + +# Impact Statement + +Our work advances the understanding of how neural networks learn deterministic sequences, specifically LCGs. While this capability cannot compromise mainstream cryptographic systems, which use far more sophisticated techniques, our insights may contribute to the development of more robust cryptographic algorithms and a better understanding of neural networks' computational capabilities. + +# References + +Ahn, K., Cheng, X., Daneshmand, H., and Sra, S. Transformers learn to implement preconditioned gradient descent for in-context learning. In Oh, A., Neumann, T., Globerson, A., Saenko, K., Hardt, M., and Levine, S. (eds.), Advances in Neural Information Processing Systems, volume 36, pp. 45614-45650. Curran Associates, Inc., 2023. URL https://openreview.net/forum?id=LziniAXEI9. +Akyurek, E., Schuurmans, D., Andreas, J., Ma, T., and Zhou, D. What learning algorithm is in-context learning? investigations with linearmodels, 2023. URL https://openreview.net/forum?id=0g0X4H8yN4I. +Allen-Zhu, Z. and Li, Y. Physics of language models: Part 1, learning hierarchical language structures. 2024. URL https://arxiv.org/abs/2305.13673. +Amigo, G., Dong, L., and Marks Ii, R. J. Forecasting pseudo random numbers using deep learning. In 2021 15th International Conference on Signal Processing and Communication Systems (ICSPCS), pp. 1-7, 2021. doi: 10.1109/ICSPCS53099.2021.9660301. +Cagnetta, F. and Wyart, M. Towards a theory of how the structure of language is acquired by deep neural networks. arXiv preprint arXiv:2406.00048, 2024. +Cagnetta, F., Petrini, L., Tomasini, U. M., Favero, A., and Wyart, M. How deep neural networks learn compositional data: The random hierarchy model. *Physical Review X*, 14(3):031001, 2024. +Chen, X. and Zou, D. What can transformer learn with varying depth? case studies on sequence learning + +tasks. In Forty-first International Conference on Machine Learning, 2024. URL https://openreview.net/forum?id=YNbCbcGyXE. +Chomsky, N. Three models for the description of language. IRE Transactions on information theory, 2(3):113-124, 1956. +Delétang, G., Ruoss, A., Grau-Moya, J., Genewein, T., Wenliang, L. K., Catt, E., Cundy, C., Hutter, M., Legg, S., Veness, J., and Ortega, P. A. Neural networks and the chomsky hierarchy, 2023. URL https://arxiv.org/abs/2207.02098. +Doshi, D., Das, A., He, T., and Gromov, A. To grok or not to grok: Disentangling generalization and memorization on corrupted algorithmic datasets. In The Twelfth International Conference on Learning Representations, 2024a. URL https://openreview.net/forum?id=UHjE5v5MB7. +Doshi, D., He, T., Das, A., and Gromov, A. Grokking modular polynomials, 2024b. URL https://arxiv.org/abs/2406.03495. +Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., and Houlsby, N. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=YicbFdNTTy. +Garner, H. L. The residue number system. In Papers Presented at the the March 3-5, 1959, Western Joint Computer Conference, IRE-AIEE-ACM '59 (Western), pp. 146-153, New York, NY, USA, 1959. Association for Computing Machinery. ISBN 9781450378659. doi: 10.1145/1457838.1457864. URL https://doi.org/10.1145/1457838.1457864. +Gromov, A. Grokking modular arithmetic, 2023. URL https://arxiv.org/abs/2301.02679. +He, T., Doshi, D., Das, A., and Gromov, A. Learning to grok: Emergence of in-context learning and skill composition in modular arithmetic tasks. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=aVh9KRZdRk. +Hendel, R., Geva, M., and Globerson, A. In-context learning creates task vectors, 2023. +Hull, T. E. and Dobell, A. R. Random number generators. SIAM Review, 4(3):230-254, 1962. doi: 10.1137/1004061. URL https://doi.org/10.1137/1004061. + +Knuth, D. E. The art of computer programming, volume 2 (3rd ed.): seminumerical algorithms. Addison-Wesley Longman Publishing Co., Inc., USA, 1997. ISBN 0201896842. +Lam, R., Sanchez-Gonzalez, A., Willson, M., Wirnsberger, P., Fortunato, M., Alet, F., Ravuri, S., Ewalds, T., Eaton-Rosen, Z., Hu, W., et al. Learning skillful medium-range global weather forecasting. Science, 382(6677):1416-1421, 2023. +Liu, S., Ye, H., Xing, L., and Zou, J. In-context vectors: Making in context learning more effective and controllable through latent space steering, 2024. +Loshchilov, I. and Hutter, F. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=Bkg6RiCqY7. +McCracken, G., Moisescu-Pareja, G., Letourneau, V., Precup, D., and Love, J. Uncovering a universal abstract algorithm for modular addition in neural networks, 2025. URL https://arxiv.org/abs/2505.18266. +McLeish, S., Bansal, A., Stein, A., Jain, N., Kirchenbauer, J., Bartoldson, B. R., Kailkhura, B., Bhatele, A., Geiping, J., Schwarzschild, A., and Goldstein, T. Transformers can do arithmetic with the right embeddings, 2024. URL https://arxiv.org/abs/2405.17399. +Nanda, N., Chan, L., Lieberum, T., Smith, J., and Steinhardt, J. Progress measures for grokking via mechanistic interpretability. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=9XFSbDPmdW. +Olsson, C., Elhage, N., Nanda, N., Joseph, N., DasSarma, N., Henighan, T., Mann, B., Askell, A., Bai, Y., Chen, A., et al. In-context learning and induction heads. arXiv preprint arXiv:2209.11895, 2022. +O'Neill, M. E. Pcg: A family of simple fast space-efficient statistically good algorithms for random number generation. 2014. URL https://apisemantic scholar.org/CorpusID:3489282. +Power, A., Burda, Y., Edwards, H., Babuschkin, I., and Misra, V. Grokking: Generalization beyond overfitting on small algorithmic datasets. arXiv preprint arXiv:2201.02177, 2022. +Press, O. and Wolf, L. Using the output embedding to improve language models. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pp. 157-163, 2017. + +Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., and Sutskever, I. Language models are unsupervised multitask learners. 2019. +Rivest, R. L. Cryptography and machine learning. In International Conference on the Theory and Application of Cryptology, pp. 427-439. Springer, 1991. +Sharkey, L., Chughtai, B., Batson, J., Lindsey, J., Wu, J., Bushnaq, L., Goldowsky-Dill, N., Heimersheim, S., Ortega, A., Bloom, J., Biderman, S., Garriga-Alonso, A., Conmy, A., Nanda, N., Rumbelow, J., Wattenberg, M., Schoots, N., Miller, J., Michaud, E. J., Casper, S., Tegmark, M., Saunders, W., Bau, D., Todd, E., Geiger, A., Geva, M., Hoogland, J., Murfet, D., and McGrath, T. Open problems in mechanistic interpretability. 2025. URL https://arxiv.org/abs/2501.16496. +Steele, G. and Vigna, S. Computationally easy, spectrally good multipliers for congruential pseudorandom number generators, 2021. URL https://arxiv.org/abs/2001.05304. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS'17, pp. 6000-6010, Red Hook, NY, USA, 2017. Curran Associates Inc. ISBN 9781510860964. +von Oswald, J., Niklasson, E., Randazzo, E., Sacramento, J., Mordvintsev, A., Zhmoginov, A., and Vlademyrov, M. Transformers learn in-context by gradient descent, 2023. +Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E., Le, Q., and Zhou, D. Chain-of-thought prompting elicits reasoning in large language models, 2023. URL https://arxiv.org/abs/2201.11903. +Zhang, F. and Nanda, N. Towards best practices of activation patching in language models: Metrics and methods. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=Hf17y6u9BC. +Zhong, Z., Liu, Z., Tegmark, M., and Andreas, J. The clock and the pizza: Two stories in mechanistic explanation of neural networks. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=S5wmbQc1We. + +# A. Experimental Details + +This section provides further details about model architecture, dataset construction, and optimization. + +# A.1. Dataset Construction + +Fixed Modulus (FM): Given a modulus $m$ , we apply the Hull-Dobell Theorem to determine the possible values of $(a, c)$ that maximize the period. We then randomly select 64 values of $a$ and $c$ to generate the test dataset. To generate the training dataset, we exclude these test choices of $(a, c)$ and uniformly sample $N = 100,000$ LCG sequences of length $L$ (context length) with $n_a$ values of multipliers and $n_c$ values of increments. For each set of parameters $(a, c)$ , we sample an LCG sequence with a randomly selected initial seed $x_0$ . Note that the training dataset includes sequences with varying periods, while the test data only contains sequences that maximize the period. + +![](images/9b496818d6b502e5c0e49ac56c5b31466ca21831ef547702597fc96d006dfa1b.jpg) +Figure 12. The impact of training dataset parameters $(n_{m}, n_{a}, n_{c})$ on unseen modulus task performance. + +![](images/19d53be9a512e2baf18db161bea6ec10da187ba9d0d3c31f9a1f6b60a638b47a.jpg) + +![](images/294f3f9fb05c3512cf7314daf3eae3bb2d4fef180167f3ac7496380413a70ae2.jpg) + +Generalization to Unseen Modulus (UM): For the test dataset, we first select a set of test moduli $M_{\mathrm{test}} = \{m_{\mathrm{test}}\}$ that would be reserved exclusively for evaluation. For each test modulus $m_{\mathrm{test}} \in M_{\mathrm{test}}$ , we apply the Hull-Dobell Theorem to determine the values of $(a, c)$ that maximize the period. We then randomly select 64 values of $a$ and $c$ to generate the test dataset. These 64 $(a, c)$ values are not considered while generating the training dataset. + +For the training dataset generation, we sample the $n_m$ modulus values from the range $[L, \lfloor 1.2\max(M_{\mathrm{test}})\rfloor]$ while excluding all the values in $M_{\mathrm{test}}$ . For each modulus value $m$ , we uniformly select $n_a$ multipliers $(0 < a < m)$ and $n_c$ increments $(0 \leq c < m)$ , excluding the ones reserved for testing. For each parameter $(a, c, m)$ , we generate a sequence of length $L$ using a randomly selected initial seed $x_0$ . This results in a total of $N = n_m \times n_a \times n_c$ training sequences. We report that $N = 400,000$ served sufficient from the modulus values considered in this work. + +Next, we examine the effect of training dataset composition $(n_{m}, n_{a}, n_{c})$ on the performance. Figure 12 shows the test accuracy primarily depends on $n_{p}$ and marginally on $n_{a}$ and $n_{c}$ . Furthermore, we found that $n_{m} \gtrsim m_{\mathrm{test}} / 4$ yields good generalization performance (result not shown here). Based on this relationship and our target total number of training examples $N$ , we sample $n_{a} = n_{c} = \sqrt{\frac{N}{m_{\mathrm{test}} / 4}}$ values of multipliers and increments. Unless explicitly specified, we use these parameter settings as the default configuration for all experiments. + +# A.2. Model Architecture Details + +We consider GPT-style Transformers (Radford et al., 2019) with learnable positional embeddings and weight tying (Press & Wolf, 2017). The model architecture is characterized by the number of blocks (depth), embedding dimension ( $d_{\mathrm{model}}$ ), and number of attention heads ( $n_{\mathrm{heads}}$ ). For most experiments, we use GELU activations, except in Section 4, where we use ReLU activations for better interpretability. + +# A.3. Training Details + +We train the models with Cross-entropy loss using AdamW optimizer (Loshchilov & Hutter, 2019) with momentum hyperparameters $\beta_{1} = 0.9$ and $\beta_{2} = 0.99$ . We implement a linear learning rate warmup over the first 2048 steps with an initial learning rate of zero and the target learning rate $\eta$ . By default, all experiments employ a batch size of 256. Weight decay is only applied to non-bias parameters. + +In the unseen modulus case, we observed that both the optimal target learning rate $\eta$ and weight decay strength $\lambda$ + +![](images/3d706cc3214c9c71341e2a38d3b84db53381ef0f8a4c575e1617df55e767d7aa.jpg) +Figure 13. Heatmap of test accuracy of a 6 layer Transformer with learning rate and weight decay as the axes. As the modulus is increased from 1024 to 16, 384 the range of hyperparameters resulting in reasonable accuracy becomes narrow. + +![](images/bd3d5dfcdb7edd9f5accf88cd073b528f5d033f0641258fa3f41eff7e0593a15.jpg) + +![](images/934a23c6a19bea58c6a92bd70247f92b2354037d096d7542d2e4180c55dd22c9.jpg) + +are highly sensitive to minute changes in training dataset properties (modulus $m_{\mathrm{test}}$ , number of LCG parameters $n_m$ , $n_a$ , $n_c$ and total number of examples $N$ ) and architectural changes (depth and embedding dimension). To determine the optimal hyperpamraters, we scan the learning rates $\eta \in \{3e - 05, 1e - 04, 3e - 04, 1e - 03\}$ and weight decay strengths $\lambda \in \{0.01, 0.1, 1.0, 3.0\}$ . + +# A.4. Training Cost + +In Figure 10, the training of the $m = 2^{32}$ model was conducted using four NVIDIA A100 GPUs, requiring a total of 21.82 hours. The $m = 2^{16}$ model completed training in 4.83 hours under the same hardware setup. Despite having the same model size, the increased context length in the $m = 2^{32}$ model led to a significantly higher computational cost. + +In Figure 11, both models were trained on a single NVIDIA H100 GPU for 22 hours. + +# A.5. Hyperparameter Space Shrinking with increasing modulus + +We also report a surprising phenomenon in the unseen modulus case, which we refer to. as the 'hyperparameter space shrinking.' As we increase the test modulus $m_{\mathrm{test}}$ while keeping the model architecture fixed, we observe that the optimal learning rate $(\eta)$ and weight decay strength $(\lambda)$ shift significantly. Moreover, the range of these hyperparameter values that yield reasonable performance becomes increasingly narrow. Figure 13 shows this result for a 6 layer Transformer. + +# B. Fixed Modules Training Results + +For the FM case, we find that a single attention head in one layer is sufficient to solve the task when the modulus is not a prime number. In Figure 14, we present the model's training loss and performance across training steps for $m = 2048$ . Notably, panels (c, f) reveal a significant disparity between training and test loss, indicating a grokking transition during the training process. Similarly, we plot in Figure 15 for similar curves for $m = 7776$ , where all curves are qualitatively the same. + +# C. Prime Moduli + +In the FM setting, when $m$ is a prime number, the task becomes much harder. Since there are no digit-wise periodic patterns, the model cannot perform the algorithm described in Section 4.2. In Figure 16, we trained two identical models to learn $m = 2039$ and $m = 2048$ , and we observe that the task with $m = 2039$ cannot be learned within the same number of training steps. Note that to rule out potential constraints from model capability, we used depth 2 models (as opposed to depth 1 in the main text) in both cases. + +In the UM setting, the model exhibits similar test performance on sequences with prime $m$ and sequences with $m$ as a power of two, as shown in Figure 17. We hypothesize that training on a diverse set of moduli helps the model rely less on the digit patterns and instead focus on more generalizable structure. + +![](images/5980f52f3af5ae5771f0ae6ebc0e3c42387fb9b02a15bfab391c530be2a20aa8.jpg) + +![](images/619e95c3c2ed64d59cff8be869b32e557cf5ae3e96a3da65afeff5f18ed68f7d.jpg) + +![](images/e6336952afa4e6c36dc2158e61de6a17745b1fca7315f31e5b081b7c19cb1e2e.jpg) + +![](images/daa50771e7a34f9351f9c05a2b7bd506f7be3d26e749fb863dff1a51fe7d48f9.jpg) +Figure 14. Test accuracy and train/test loss for $m = 2048 = 2^{11}$ , depth=1. (a,b,c) $n_{\mathrm{heads}} = 1$ (d,e,f) $n_{\mathrm{heads}} = 4$ . + +![](images/90800845055e2b8a7dc976e6ac152990aff9ccf817b09aa9ac8779480913e1a3.jpg) + +![](images/0710f612e2f85ab2bcaa38f7ad90382810529faeaa1869f5efd4bbf772ec0877.jpg) + +![](images/5aa5eedd7c4324d702c523b47abcb6a2f9729b6d3205873555f03264a6db23c7.jpg) + +![](images/3a916345fd1362951f4bf49e859fe5c2975cf46a850b912d00c776392807ed5f.jpg) + +![](images/2a00f1bec953a265af81a1f206ec5bfb71dbaf21cfc727daa7430c80b2538d48.jpg) + +![](images/e197fcfe3f725271a9b8f44b8f8f656d6c2742188d81f38e6ee9235f2b47576a.jpg) +Figure 15. Test accuracy and train/test loss for $m = 7776 = 2^5 \cdot 3^5$ , depth=1. (a,b,c) $n_{\mathrm{heads}} = 1$ (d,e,f) $n_{\mathrm{heads}} = 4$ . + +![](images/fa63a2f90d18db23edfb1ddb3bad0ff99d62f4a1a500eceb445d88db47fc12ad.jpg) + +![](images/183b937794a89aff82f450b383e43ac8dcf9638b4a80119cbf61378ba88cc77d.jpg) + +# D. Critical Depth for the Unseen Modulus Task + +This section analyzes the depth and embedding dimension requirements for successfully training a Transformer on the unseen modulus task. The experimental details are the same as described in Appendix A. + +We varied depths $\in \{2,3,4,6,8\}$ and embedding dimensions in $d_{\mathrm{model}} \in \{512,768,1024,1280\}$ , with the head dimension fixed to $d_{\mathrm{head}} = 128$ . For each depth and width, we scanned learning rates $\eta \in \{3e - 05,1e - 04,3e - 04,1e - 03\}$ and weight decay strengths $\lambda \in \{0.01,0.1,1.0,3.0\}$ to identify the optimal hyperparameters. We report that the optimal learning rate and weight decay strength heavily vary with depth, embedding dimension, and training dataset. For $m_{\mathrm{eval}} = \{1024,4096\}$ , the models were trained for $T = 100,000$ steps, while for $m_{\mathrm{eval}} = 16,384$ , the models required a longer training for $T = 200,000$ steps. + +Figure 18 shows the test accuracy heatmaps with depth and embedding dimensions as the two axes. These results demonstrate that a minimum depth of 3 is required to learn the LCG sequence prediction task, with a marginal dependence on embedding dimension. This suggests the unseen modulus task requires a minimal computational depth of three to capture the underlying structure of LCGs. + +![](images/e5ebea0e6a1cc62423895870d7c025d8797fd12c31c00a56d754a9d6bce3983d.jpg) +(a) Test Accuracy + +![](images/e2c12f0635aec53f7d4fddabe5f88b0169d39e35e788dc75e11a36c683277c7d.jpg) +(b) Training Accuracy + +![](images/77d02cebdae06c07da72585681b9ec56682197e643dfee5791cc167bcd0909d4.jpg) +(c) Training Loss + +![](images/984184371d960018969bdeb15375359ac4bd4d2ba409fe41bf0122be5d987261.jpg) +Figure 16. FM: Comparison between $m = 2039$ (prime) and $m = 2048$ (power-of-two), with both models trained for 50,000 steps. Each model has depth 2 and $d_{\mathrm{model}} = 1024$ . The test set consists of sequences with the same periods, while the training set includes arbitrary multipliers not present in the test set. + +![](images/0985fd8ec0f3c50292d097ad612524942eff1e2272113b9f940c5a0a8107e23d.jpg) +Figure 18. Test accuracy heatmaps of with depth and embedding dimensions as the two axes. + +![](images/17058422830a6cb138f86764b95e6656122fa8ca3dff38aaf803da9ec2e3d2d8.jpg) +Figure 17. UM: Test accuracy comparison between $m = 2039$ (prime), $m = 1801$ (prime) and $m = 2048$ (power-of-two). The model was trained for 100,000 steps on a dataset consisting of 262,144 sequences with 512 distinct training moduli not present in the test set. + +![](images/417d4f87b7754a35fff2a859bf649fe8b07300974661c4bc1bc8d0d7bf3a0139.jpg) + +# E. Training Time Interpretability + +In this section, we examine the order in which training sequences with different periods are learned during training. For this experiment, we consider a six-layer Transformer with 4 heads and an embedding dimension of 768. For this experiment, we generate sequences of length 512 using 128 unseen moduli and 128 values of $a$ and $c$ each. The model is trained with Adam hyperparameters: $\eta = 3 \times 10^{-4}\beta_{1} = 0.9$ , $\beta_{2} = 0.99$ and weight decay strength $\lambda = 1.0$ . + +Figure 19(left) compares the training accuracy of sequences with different periods relative to the context length 512. We + +![](images/53cfc7dad71c0e54cf13fb952e21878e75de3566a44955be653e6c99dcb5d6e2.jpg) +Figure 19. (left) Comparison of the training accuracy of sequences with different periods relative to the context length 512, (center) Accuracy when the model is only trained on sequences with period $< 512$ , (right) Accuracy when the model is trained on sequences with period $>512$ . + +![](images/b739a98f169f85a7cea7c3a6b232f9dfa0519c3cdc530e6a6ec9984315dd0b69.jpg) + +![](images/b528d79edebbdc69ce1656066ab88aaefa9c2035b7d0333f58a90e8e6643dd9b.jpg) + +observe that sequences with period $< 512$ are memorized early in training, while the accuracy of long-period sequences coincides with the test accuracy. Next, we perform two more experiments by training the model on datasets consisting of (1) sequences with period $< 256$ , and (2) sequences with period $>512$ . Figure 19(center, right) show the results of these experiments. The model fails to generalize when trained only on low-period sequences while training only on long-period sequences eliminates grokking. + +# F. LCG Properties + +# F.1. The period of the lower $k$ -th bit when $m$ is power of 2 + +In this section, we show that for a sequence of period $\mathcal{T}_m = m = 2^K$ , the $k$ -th lowest digit has a period of $2^k$ along the sequence. Consider an LCG sequence: + +$$ +x _ {t + 1} = \left(a x _ {t} + c\right) \mod m, \tag {6} +$$ + +where $m$ is a power of 2, $m$ and $c$ are coprime and $a - 1$ is divisible by 4. The period of sequence $x_{t}$ is $m$ (Hull & Dobell, 1962). The lower $k$ -th bits of $x_{t}$ is given by: + +$$ +b _ {t, k} = \frac {z _ {t , k} - z _ {t , k - 1}}{2 ^ {k - 1}}, \tag {7} +$$ + +where $z_{t,k} = x_t \mod 2^k$ . Therefore, if $z_{t,k}$ has a period of $2^k$ , then the lower $k$ bits also have a period of $2^k$ . Below, we show that $z_{t,k}$ has a period of $2^k$ . + +For an integer $M_{t}$ , we can can re-write $x_{t}$ as: + +$$ +x _ {t} = z _ {t, k} + M _ {t} 2 ^ {k}. \tag {8} +$$ + +Next, we substitute Equation (6) into the definition of $z_{t + 1,k}$ : + +$$ +\begin{array}{l} z _ {t + 1, k} = x _ {t + 1} \mod 2 ^ {k}, \\ = \left[ \left(a x _ {t} + c\right) \mod m \right] \mod 2 ^ {k}. \tag {9} \\ \end{array} +$$ + +As $m$ is divisible by $2^k$ , this simplifies to: + +$$ +\begin{array}{l} z _ {t + 1, k} = \left(a z _ {t, k} + c\right) \mod 2 ^ {k}, \\ = \left(a z _ {t, k} + a M _ {t} 2 ^ {k} + c\right) \mod 2 ^ {k}, \\ = \left(a z _ {t, k} + c\right) \mod 2 ^ {k}. \tag {10} \\ \end{array} +$$ + +Therefore, $z_{t,k}$ follows its own LCG recurrence with the same $a$ and $c$ but with a reduced modulus $2^k$ . Because $2^k$ and $c$ are coprime and $a - 1$ is divisible by 4, the period of $z_n$ is $2^k$ . Thus, the period of the lower $k$ bits is $2^k$ . + +Since $z_{n,k}$ has period $2^k$ and $z_{n,k-1}$ has period $2^{k-1}$ , the period of $b_{n,k}$ is $2^k$ . + +# F.2. Derivation of Equation (4) + +We now derive Equation (4) of the main text: + +$$ +x _ {t} \bmod p _ {i} ^ {w _ {q}} = \alpha_ {i, 0, t} p _ {i} ^ {0} + \alpha_ {i, 1, t} p _ {i} ^ {1} + \dots + \alpha_ {i, w _ {i} - 1, t} p _ {i} ^ {w _ {i} - 1}, +$$ + +where $\alpha_{i,w,t} \in \{0,1,\dots,p_i - 1\}$ are base- $p_i$ digits. When the period of $x_t$ is m, each digit $\alpha_{j,w,t}$ has a period of $p_i^w$ . + +Consider an LCG sequence: + +$$ +x _ {t + 1} = \left(a x _ {t} + c\right) \mod m, \tag {11} +$$ + +where $m$ has a prime factorization $m = p_1^{w_1}p_2^{w_2}\dots p_q^{w_q}$ , $m$ and $c$ are coprime, $a - 1$ is divisible by all prime factors of $m$ and $a - 1$ is divisible by 4 if $m$ is divisible by 4 (Hull & Dobell, 1962). + +Consider the residulas $R_{i,t} = x_t \mod p_i^{w_i}$ , where $i \in \{1 \ldots q\}$ . We have: + +$$ +x _ {t} = R _ {i, t} + M _ {i, t} p _ {i} ^ {w _ {i}}, \tag {12} +$$ + +where $M_{i,t}$ is an integer. + +Substituting Equations (11) and (12) into the definition of $R_{i,t + 1}$ : + +$$ +\begin{array}{l} R _ {i, t + 1} = x _ {t + 1} \mod p _ {i} ^ {w _ {i}}, \\ = \left[ \left(a x _ {t} + c\right) \mod m \right] \mod p _ {i} ^ {w _ {i}}, \\ = \left(a x _ {t} + c\right) \mod p _ {i} ^ {w _ {i}}, \\ = \left(a R _ {i, t} + a M _ {i, t} p _ {i} ^ {w _ {i}} + c\right) \mod p _ {i} ^ {w _ {i}}, \\ = \left(a R _ {i, t} + c\right) \mod p _ {i} ^ {w _ {i}}. \tag {13} \\ \end{array} +$$ + +Next we consider $z_{i,k,t}$ , which is the lower $k$ base- $p_i$ digits of $R_{i,t}$ : + +$$ +z _ {i, k, t} = R _ {i, t} \mod p _ {i} ^ {k}. \tag {14} +$$ + +Similarly, the recurrence of $z_{i,k,t}$ can be simplified as: + +$$ +\begin{array}{l} z _ {i, k, t + 1} = R _ {i, t + 1} \mod p _ {i} ^ {k}, \\ = \left[ \left(a R _ {i, t} + c\right) \mod p _ {i} ^ {w _ {i}} \right] \mod p _ {i} ^ {k}, \\ = \left(a R _ {i, t} + c\right) \mod p _ {i} ^ {k}, \\ = \left(a z _ {i, k, t} + c\right) \mod p _ {i} ^ {k}. \tag {15} \\ \end{array} +$$ + +$z_{i,k,t}$ follows an LCG recurrence with the same $a$ and $c$ and a reduced modulus $p_i^k$ . Because $p_i^k$ and $c$ are coprime and $a - 1$ is divisible by $p_i$ , the period of $z_{i,k,t}$ is $p_i^k$ . + +$\alpha_{i,k,t}$ , which is the lower $k$ -th base- $p_i$ digits of $y_{i,t}$ , can be written as: + +$$ +\alpha_ {i, k, t} = \frac {z _ {i , k , t} - z _ {i , k - 1 , t}}{p _ {i} ^ {k - 1}}. \tag {16} +$$ + +Since $z_{i,k,t}$ has period $p_i^k$ , the period of $\alpha_{i,k,t}$ is $p_i^k$ . + +# G. Fixed Modulus Interpretability + +In this subsection, we show additional results on the model's behavior on the FM task. + +![](images/835571f14a76f0a015d781be40367e74784374d91643bb5de39d4f0d3548b592.jpg) +(a) + +![](images/785280be76924885760da2865d5b0919735797df283d1bb2e8f05d37ca93fd04.jpg) +(b) + +![](images/d8040d10327d2fec2082d98305c3c2d91665cbd264ddbed662d831519d5dfe85.jpg) +Figure 20. $(m = 2048, l = 1, n_{\mathrm{head}} = 1, d_{\mathrm{model}} = 768)$ Per-digit test accuracies in binary representation, with attention masking (at inference time). $m = 2048 = 2^{11}$ , depth=1, $n_{\mathrm{heads}} = 1, d_{\mathrm{model}} = 768$ , averaged over $a, c$ and initial seeds. (a) For each query, only the attention to key at position $t - 2^k$ (where $k = \lfloor \log_2 t \rfloor$ ) is kept. All other attention weights are masked out. In this case, the model can successfully copy the last $k$ bits, but cannot predict higher bits. (b) For each query, only the attention to key at positions $t - 2^k$ and $t - 2^k$ are kept. All other attention weights are masked out. In this case, the model can predict higher bits with fairly high accuracy – this is remarkable given that majority of the attention weights are masked out. + +![](images/22ba733ec41ac83c6609cd5f738e52f54d97a6eab632a5f59ab3821060c2ce47.jpg) +Figure 21. Test accuracy vs token positions for $m = 2048 = 2^{11}$ , depth=1, various values of $a, c$ . (a,b) $n_{\mathrm{heads}} = 1$ (c,d) $n_{\mathrm{heads}} = 4$ . The accuracies for different $a$ and $c$ are exactly on top of each other. + +![](images/bf3475ea644eaa462e2edff6a2f226e4a8732010d0da059fc61d521b6398c37f.jpg) + +![](images/56e8008634291f1d9f135bbf3e5eabcde3bb28fd1a857052b7aa6844769c738b.jpg) + +![](images/f36fdaef428f3ef2989c0633f0d199d252cc049108ed6dac72144e7ea4a44270.jpg) +$\mathsf{n}_{\mathrm{heads}} = 1$ + +![](images/b9ca52828ca00735603dd8d843e6868233488579afe7825d9b3c35035d2a7720.jpg) + +![](images/c1aa0d09c6fc6f9d8f16bc7739ec2d22b886564ca7ebadb978acf1e889e18894.jpg) + +![](images/aeae76e7e4c27ab7c72409f894a2338e505505f9e50ba8ac89426f8a6714ac2d.jpg) +$\mathsf{n}_{\mathrm{heads}} = 4$ + +![](images/3224af968859d88911c9d68020d023a53d1bca543563f1048679aa3264989fbb.jpg) +Figure 22. Test accuracy for $m = 2048 = 2^{11}$ , depth=1, $n_{\mathrm{heads}} \in \{1,4\}$ , $d_{\mathrm{model}} = 768$ . (a,d) Test accuracy averaged over $a$ , $c$ and initial seeds. (b,e) Multiplication of per-digit test accuracies - matches exactly with the average test accuracy. (c,f) Per-digit accuracy in binary representation. + +![](images/a6a5344ca9f3231f9e588327314677b8fa6519d5913229c50941e9c2cdee6808.jpg) + +![](images/42c85500aa503b7aaaf8a6cb94f971060cb00e4a5513487066603516c74a1bab.jpg) + +![](images/958f1eb64bfe2460e1c25e6c436f1eec4bd113d8f2927eb6249f05f3da3ad213.jpg) + +![](images/bdddc723740b440b7050dccf762a5772fc762a85c1a167db364ebb5497efc3fa.jpg) + +![](images/c55b9f834967cbcae94ef4075d3eeae81d0a13faafe9e42cba4424fcfce9a415.jpg) +Figure 23. Test accuracy for $m = 7776 = 2^{5}3^{5}$ , depth=1, $n_{\mathrm{heads}} \in \{1,4\}$ , $d_{\mathrm{model}} = 768$ . (a,d) Test accuracy averaged over $a$ , $c$ and initial seeds. (b,e) Multiplication of per-digit test accuracies - matches exactly with the average test accuracy. (c,f) Per-digit accuracy in RNS representation. + +![](images/72d112e45329b322459bddfa6f723f61ae6876696dbbf15b499a55ff380c8d18.jpg) + +![](images/56b1af2c47f2bd3a0644ec2f50f3e1e7611624ea6a3589ca15be5b29d93ac619.jpg) + +![](images/75766eb596a48cf468b7f1f557014b4ab0ce7ef8615e58dea99da6b84119d909.jpg) +Figure 24. Projections along Top 6 principal components of the embedding matrix, for $m = 512$ , depth=1, $n_{\mathrm{heads}} = 1$ , $d_{\mathrm{model}} = 768$ . + +![](images/3bf0720cf121719393463884bb1e4cb2f6e1c22a0e933a077c269c3ed2b38e98.jpg) +Figure 25. Projections along Top 6 principal components of the embedding matrix, for $m = 7776$ , depth=1, $n_{\mathrm{heads}} = 1$ , $d_{\mathrm{model}} = 768$ . + +![](images/e6b313689d59dd0f1d4fb1adec88ef2201b83e3bc85844723f1cf83897be8d2e.jpg) +Figure 26. Projections along Top 6 principal components of the embedding matrix, for $m = 1800$ , depth=1, $n_{\mathrm{heads}} = 1$ , $d_{\mathrm{model}} = 768$ . + +# H. Unseen Modulus Interpretability + +# H.1. Extra PCA plots for first layer heads + +We present additional PCA analyses of attention heads shown in Figure 8, examining $\mathrm{PCA}(H^{(h)}[:t,:])$ for each head $h$ across various combinations of $a$ , $c$ , $x_0$ , $m_{\mathrm{test}}$ , and position $t$ . The results are depicted in Figure 27, where we include two additional first-layer heads (heads 2 and 3) that are responsible for performing operations related to modulo 5. Notably, with different choices of $a$ , $c$ , $m_{\mathrm{test}}$ and $t$ compared to Figure 8 (a1, b1, c1), the clustering behavior remains unchanged. + +Note the emergence of attention heads dedicated to processing modulo 2, 3, 5, and 7 can likely be attributed to the prevalence of these prime factors in the training set. + +![](images/b1ec28789f87e0819c80714c666f828e16268c504494924cfcd10516657f6de4.jpg) +(a) $a = 13, c = 3, m_{\mathrm{test}} = 2048, t = 0$ + +![](images/073bab906c5487bfbbcdff35f01421bc718693424343f567fc23866737d5d092.jpg) +(b) $a = 9, c = 3, m_{\mathrm{test}} = 2048, t = 128$ + +![](images/334aa10c0e42894403dd78ed238f946e703e409b78856eab0affb7a7754a501e.jpg) +(c) $a = 61, c = 7, m_{\mathrm{test}} = 1800, t = 47$ +Figure 27. PCA analysis of first-layer heads. Although the ordering of numbers varies, the grouping behavior discussed in Section 4.3 remains invariant to changes in $a$ , $c$ , $m$ , $x_0$ , and $t$ . Note that the last head is the head that appears in Figure 9, which does not exhibit a strong grouping bias. + +# H.2. Pruning heads corresponding to irrelevant prime factors + +To further validate our findings from Figure 8 in Section 4.3 regarding the correlation between attention heads and digit-wise accuracy, we conduct additional pruning experiments. The results of these experiments are presented in Figures 28 and 29. + +# H.3. Patching other heads + +In Figure 30, we present patching experiments for heads not previously shown in Figure 9. We focus only on selected heads where patching significantly affects predictions. Notably, none of these cases exhibit qualitative changes stemming from modulus alterations, further supporting our assertion that the head shown in Figure 9 is specifically responsible for estimating $m_{\mathrm{test}}$ . + +![](images/10cc670292f49c83c03da65202813b1d6faf44e795cfe9cc7611f544f8da5a87.jpg) +(a) Original Model + +![](images/90595d32ad83d61df54fe049444135599c42523c2501df2ced5e75d37df435da.jpg) +Figure 28. Per-digit accuracy for $m_{\mathrm{test}} = 2048$ after pruning specific attention heads. (a) Results from the same model used in Section 4.3, identical to Figure 8 (b2); (b) Performance after pruning the attention head responsible for grouping numbers by their values modulo 3, which is irrelevant for solving sequences with $m_{\mathrm{test}}$ (containing only the prime factor 2). After pruning, the model's performance shows marginal improvement for specific early bits at lower token positions; (c) Performance after pruning the attention head responsible for grouping numbers by their values modulo 14. The model's performance on $m_{\mathrm{test}}$ decreases significantly, as this head partially contributes to processing relevant prime factors. However, since the primary head responsible for binary representation remains intact, the model maintains partial functionality. + +![](images/1a3f4775a59445010a65b3466a4297139718b3dd4dd47f38656d34463d6c61aa.jpg) +(b) Prune modulo 3 head + +![](images/1fd84f1f6d5031cd127f8dc54d6a77f06f44d96d97290cf68903dddee71ae804.jpg) + +![](images/8abc471f70e010bf2a986fd4cf3d91c28342ad96d223d423fcbc0bbfc14ae1be.jpg) +(c) Prune modulo 14 head + +![](images/96e80a680c3d5e17d2d347aacb66829aa11de82ff6fcd20732fb3453dd9e295c.jpg) +(a) Original Model + +![](images/8041e1fb05aefd2190ecece2df8f48322add51af25a59c5b2db9efdc1e66e0b8.jpg) + +![](images/f04ff29abfe8199a18e75f18505a4d54c2de6c634d3b70f187925296bd45f16e.jpg) +(b) Prune modulo 3 head + +![](images/d2bc6ea71ca42a39eb0c5920a25bea575685153c17df9c32fc982e5eb3780c59.jpg) + +![](images/a91185ec9a36a012dd33bcda96a650439ca9a0df4f2660a1dac1ea24a13e05b2.jpg) +(c) Prune modulo 2 head +Figure 29. Per-digit accuracy for $m_{\mathrm{test}} = 2352$ after pruning specific attention heads. (a) Results from the same model used in Section 4.3, identical to Figure 8 (b2); (b) Performance after pruning the attention head responsible for grouping numbers by their values modulo 3, which is relevant for one specific digit in this case. After pruning, the model's performance shows a clear degradation, with the strongest one happening exactly at the digit corresponding to modulo 3 (c) Performance after pruning the attention head responsible for grouping numbers by their values modulo 2. The model's performance on $m_{\mathrm{test}}$ got obliterated, as there are many base-2 digits in the RNS representation of $m_{\mathrm{test}}$ in this case. + +# H.4. In-accurate estimation of $m_{\mathrm{test}}$ + +From the cosine-similarity panel in Figure 9, we observe that the model's estimation approximates the target $m_{\mathrm{test}} = 2048$ . However, detailed analysis reveals that the highest cosine-similarity occurs at $m_{\mathrm{est}} = 2033 = 19 \cdot 107$ , with neighboring values exhibiting similarly high cosine-similarity values. If we assume $m_{\mathrm{est}}$ represents the model's internal belief, then the prime representation would consist solely of powers of 19 and 107. Such a representation can only produce periodic structures for the $k$ -th bit of a binary number when $r = \operatorname{lcm}(19, 2^k)$ . Consequently, patterns before reaching that period would appear random in this representation, providing a weaker signal compared to the correct representation. This explains why the model preferentially selects binary representation for lower bits when $m_{\mathrm{test}} = 2048$ . + +For higher bits, the low-bit representation can be determined up to $2^{k}$ bits through copying. If the model utilizes this information in later stages, the precision of $m_{\mathrm{est}}$ can be drastically improved. Specifically, when $\lfloor m_{\mathrm{est}} / 2^{k}\rfloor = \lfloor m_{\mathrm{test}} / 2^{k}\rfloor$ , the model can identify the correct representation as long as $|m_{\mathrm{test}} - m_{\mathrm{est}}| < 2^{k}$ . This argument can be extended to any other composite $m_{\mathrm{test}}$ . Note that this argument is hypothetical; further proof of this mechanism remains in future work. + +![](images/c1db80e1996ab297bd242d901d633b59561aef93956b83d446d663d0649a0b7f.jpg) +(a) layer 1, head 4 + +![](images/f2039128028f180c0a9595377293d015b56c26fa4b56e7a109f863f9c3f32b8b.jpg) +(b) layer 2, head 4 + +![](images/3595517a7b1a9af87b40f81fab429afaa1f85dd5dcd868eed860e0d764a0af6e.jpg) +(c) layer 3, head 6 + +![](images/eb38ba6877978eb1fa0e48a4e89a3f1ac0c7ccd2ce3a567a6ff86a0fd0ef5133.jpg) +(d) layer 4, head 1 +Figure 30. Patching experiments following the setting of Figure 9 in the main text. None of these heads, after patching, make the model believe that the modulus is close to $m_{\mathrm{patch}}$ . + +# H.5. Evidence for Step iii + +In Figure 31, we present attention patterns and token distance statistics for a selected attention head in later layers, with the same model as the one used in Section 4.3. The token distances are measured by the spacing between keys with top-4 attention weights for a given query. Our analysis reveals that the model develops a head capable of dynamically adjusting their lookback distance for computations based on $m_{\mathrm{test}}$ , which we interpret as evidence for step iii of the algorithm proposed in Section 4.3. + +![](images/6220d430e5c2fea70722a15f0cd082dec9383fd23c160f0804409c232e5d3ebe.jpg) + +![](images/f82988a2771b9f78834c484041256633d65d42794d1c79d960f1647eee86d450.jpg) + +![](images/be95ceb84595ac57ffa46462bd5bbf517aed741ec44de5b4a8c34c4b847cb6f3.jpg) +Figure 31. Attention patterns and token distance statistics for layer 2, head 3 of the model analyzed in Section 4.3. (a1, b1) Results for a sequence with $m_{\mathrm{test}} = 2048$ , $a = 5$ , and $c = 31$ . The statistics reveal that the model consistently looks back at distances that are multiples of 4, which divides $m_{\mathrm{test}}$ and enables the correct copy behavior. (a2, b2) Results for a sequence with $m_{\mathrm{test}} = 2352$ , $a = 85$ , and $c = 5$ . In contrast to panels (a1, b1), the same attention head now consistently looks back at distances that are multiples of 14, which allows the model to copy lower digits from the context. This adaptive behavior demonstrates that the model has acquired the ability to dynamically adjust its lookback distance by $r$ iterations to copy the lower digits and leave the higher digits to the later layers for computation. + +![](images/8ada2e81f49ee242ce6bd35a092a2df76a42e80cca31f4b92da0e64d1c1765ce.jpg) + +# I. Scaling Up the Modulus + +# I.1. Base-b tokenization + +To convert an integer $x$ to base $b$ with the least significant digit (LSD) first, repeatedly divide $x$ by $b$ , storing remainders: + +$$ +d _ {k} = x \mod b, \quad x = \lfloor x / b \rfloor . \tag {17} +$$ + +Stop when $x = 0$ . The sequence $(d_0, d_1, \ldots)$ is the base- $b$ representation in LSD-first order. + +Example: Converting $x = 3,214,748,365$ to base 256: + +$$ +3, 2 1 4, 7 4 8, 3 6 5 \div 2 5 6 = 1 2, 5 5 7, 6 1 0 \text {r e m a i n d e r} 2 0 5, \quad d _ {0} = 2 0 5, +$$ + +$$ +1 2, 5 5 7, 6 1 0 \div 2 5 6 = 4 9, 0 5 3 \text {r e m a i n d e r} 4 2, \quad d _ {1} = 4 2, +$$ + +$$ +4 9, 0 5 3 \div 2 5 6 = 1 9 1 \text {r e m a i n d e r} 1 5 7, \quad d _ {2} = 1 5 7, +$$ + +$$ +1 9 1 \div 2 5 6 = 0 \text {r e m a i n d e r} 1 9 1, \quad d _ {3} = 1 9 1. +$$ + +The final LSD-first representation consists of four tokens: + +$$ +(2 0 5, 4 2, 1 5 7, 1 9 1) _ {2 5 6}. +$$ + +Each token is then one-hot encoded into a $b$ -dimensional vector, where only the index corresponding to the token value is set to 1. These one-hot vectors are then fed into a token embedding layer with an embedding dimension of $d_{model} = 1024$ . + +# I.2. Abacas Embeddings + +The positional embedding for the $j$ -th lower digit of the $i$ -th number in the sequence is defined as: + +$$ +\operatorname {P o s E m b e d} \left(T _ {i, j}\right) = E _ {\text {i n t}} (i) + E _ {\text {d i g i t}} (j) \tag {18} +$$ + +where $T_{i,j}$ represents the token corresponding to the $j$ -th digit of the $i$ -th integer. + +- $E_{\mathrm{int}}(i), E_{\mathrm{digit}}(j) \in \mathbb{R}^{d_{\mathrm{model}}}$ are learnable embeddings. +- $E_{\mathrm{int}}(i)$ encodes the integer's position in the sequence. +- $E_{\mathrm{digit}}(j)$ encodes the digit's relative position within the integer. + +This embedding scheme ensures that each token captures both the integer's global position and the byte's local position. Figure 32 provides a visualization of base- $b$ tokenization and abacus embedding. + +# I.3. Fixed Modulus + +For each modulus $m = 2^k$ , where $k \in [16,32]$ , we train a 2-layer GPT model with an embedding dimension of 1024 and a vocabulary size 256. The train set consists of $n_a = 1024$ multipliers and $n_c = 1024$ increments, selected via the Hull-Dobell theorem. One LCG sequence of length 512 is included in the train set for each (a, c) pair, resulting in a total training set size of $n_a \times n_c = 1,048,576$ . For each modulus, the model is trained for 200,000 steps with a batch size of 512. The context length is $512 \times$ the digit length of $m$ in the byte representation $-1$ . For $m = 2^{32}$ , the digit length in byte representation is 4; therefore, the context length is 2047. Training was performed using 4 A100 GPUs over a total duration of 21.82 hours. For $m = 65536$ , the digit length in byte representation is 2, resulting in a context length of 1023, with training taking 4.83 hours. For each modulus, the test set includes 512 unseen $a$ values and 64 unseen $c$ values selected via the Hull-Dobell theorem. + +The model may converge to different solutions depending on two random seeds: one for model initialization and batch shuffling, and another for dataset generation. Figure 35 shows the median performance across five runs, with the shaded region representing the range between the minimum and maximum values. For larger moduli, not all models successfully find a solution that achieves $100\%$ test accuracy. + +![](images/6d73c60ebaf0e6b9176b59ddf36af0076f246be0a3e581b073a0f4c6b687abdb.jpg) +Figure 32. Visualization of base- $b$ tokenization and abacus embeddings. Abacus embedding 1 is shared by all the digits within the integer, while Abacus embedding 2 varies within the digit but is shared by all integers. + +![](images/d69bfcb238ca833a2926bfe412a4e27536dc47d38e7e288315bfc33f5e692520.jpg) +(a) PyTorch seed $= 9$ dataset seed $= 71$ + +![](images/ac2a8d9c938dbe3a3275786625bfe0451d9d08edd81241931c1c2f3021ffa1d2.jpg) +(b) PyTorch seed $= 10$ data seed $= 71$ + +![](images/6da603b5f4d3331fc75fb1d48fd4bc2dca5f6b3ae18108ff9bc56278a512632f.jpg) +(c) PyTorch seed $= 11$ data seed $= 71$ + +![](images/0c45140f23672a8049b33b251633f3e4de088abd6b120d218f26ac5cb4e66667.jpg) +(d) PyTorch seed $= 11$ data seed $= 71$ + +![](images/3b904366f044d9ce10bc88e9843d24b054b78abca2ce35bc79efe3a1b2a67877.jpg) +(e) PyTorch seed $= 11$ data seed $= 72$ + +![](images/c0a32a2307fdb0428217bbab9f1b8a16bc4ccbd6034b32240c5acb076fc5fe5a.jpg) +(f) PyTorch seed $= 11$ data seed $= 73$ +Figure 33. Test accuracy vs. Number index for $m = 2^{20}$ . First Row: Three models trained on the same dataset, each using a unique PyTorch random seed that controls model initialization and batch shuffling. Second Row: Three models trained on different datasets, with each dataset generated using a unique random seed controlling NumPy randomness for sampling $a$ , $c$ , and $x_0$ . All models converged to solutions that achieved and sustained $100\%$ test accuracy, but differed in the number of in-context examples required to reach this performance. + +![](images/12e69234a78123ef07e1b5c79cc8de1f38756b2271ae099eb6b041206e7133f2.jpg) +(a) PyTorch seed $= 9$ dataset seed $= 71$ + +![](images/ac94ec6d62ebbc87f69d98b6a06c06e342bd6f7428e91003d18f9fda224734c6.jpg) +(b) PyTorch seed $= 10$ dataset seed $= 71$ + +![](images/b7558882a7af56bb050bda701fdbb24cd6a152611ebbfc49a5d5ff9daded6d70.jpg) +(c) PyTorch seed $= 11$ dataset seed $= 71$ + +![](images/8d9f0c254bc071836e922e78103c65b6e6795b1e95cb72ce546a316175cde559.jpg) +(d) PyTorch seed $= 11$ dataset seed $= 71$ + +![](images/5ce5d7cde2793e8de091a1356f4a884b23ed24b23be2ac08deff8ebfe8f8c786.jpg) +(e) PyTorch seed $= 11$ dataset seed $= 72$ + +![](images/ed082fb1bb846d2d321ec5195e1ff77061c77231295d25fd1502f8dedaf89233.jpg) +(f) PyTorch seed $= 11$ dataset seed $= 73$ +Figure 34. Test accuracy vs Number index for $m = 2^{32}$ . First Row: Three models trained on the same dataset, each using a unique PyTorch random seed that controls model initialization and batch shuffling. Second Row: Three models trained on different datasets, with each generated using a unique random seed controlling NumPy randomness for sampling $a$ , $c$ , and $x_0$ . Only one of the five models found a solution that achieved and sustained $100\%$ test accuracy. + +![](images/d72fc4e922fe24c4e74677675cf4bd511de307be24e82d4b8a4b8e8778627db6.jpg) +Figure 35. Median number of in-context sequence elements required to achieve $100\%$ test accuracy across five runs. The shaded region represents the min-max range. + +# I.4. Unseen Modulus + +We train a 6-layer GPT model on a dataset that comprises $n_m = 32$ , 768 moduli, with $n_a = 128$ training $a$ values and $n_c = 1$ training $c$ values per modulus. This results in a total of $n_m \times n_a \times n_c = 4$ , 194, 304 sequences, each of length 512 in the training set. In Figure 36a, where the tokenization base is 256, $1024 < m_{\mathrm{train}} < 65536$ . In Figure 36b, where the tokenization base is 243, $1024 < m_{\mathrm{train}} < 59049$ . Multipliers are selected based on the Hull-Dobell theorem when + +sufficient qualifying $a$ values are available; otherwise, random $a$ values are used to ensure 128 multipliers for each modulus. The models with approximately 76M parameters were trained on 16 million sequences over 400,000 steps, using a batch size of 128 on a single H100 GPU for 22.62 hours. Because LCGs are typically defined for moduli that are powers of prime numbers, the model is tested on moduli that are powers of the primes 2, 3, 5, and 7. The test set consists of 512 unseen $a$ values and 64 unseen $c$ values selected via the Hull-Dobell theorem for each test modulus. + +Test performance is influenced by the tokenization base, exhibiting a bias toward moduli that share the same base as the tokenization method. For instance, in Figure 36 (a) when using a byte-level representation, the model achieves better performance on moduli $m_{\mathrm{test}} = 2^k$ compared to $m_{\mathrm{test}} = 3^k$ , $5^k$ , or $7^k$ . As contrasted with Figure 36 (b) where the tokenization base is $243 = 3^5$ , the model performs better on moduli $m = 3^k$ . This behavior is likely due to the property of LCGs, where for moduli that are powers of a prime $b$ , the lowest $k$ -th digit exhibits a period of $b^k$ . Tokenization in such a base highlights this periodic structure, making it more apparent and easier for the model to leverage during training and prediction. + +![](images/8b25e565c898ab89861ad1d6713d642e51ab76cc198a2a1688ee022446b4a914.jpg) +(a) Tokenization base $= 256 = 2^{8}$ + +![](images/92ec39c8c9d33b05cb145941996a1d44716e6c389864a97debbedd259d2a9681.jpg) +(b) Tokenization base $= 243 = 3^{5}$ +Figure 36. Test accuracy vs Number index. In (a), the moduli 2048 and 16384 (blue curves) have the same root 2 as the tokenization base 256. The model performs better on these two moduli. In (b), the moduli 2178 and 19683 (orange curves) have the same root 3 as the tokenization base 243. The model performs better on these two moduli. \ No newline at end of file diff --git a/howcantransformerspredictpseudorandomnumbers/images.zip b/howcantransformerspredictpseudorandomnumbers/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..22efb67842c73896f8101e9ce52c1e0e9dd7d28a --- /dev/null +++ b/howcantransformerspredictpseudorandomnumbers/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42b7215f6dd8d71e1b2a9cff4f68cc86741de2a2a4c6e7344a7576c9b39c6089 +size 1986865 diff --git a/howcantransformerspredictpseudorandomnumbers/layout.json b/howcantransformerspredictpseudorandomnumbers/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..53dae48467235c7569fe19d022e69082d84dbd19 --- /dev/null +++ b/howcantransformerspredictpseudorandomnumbers/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4cafeb20e37ed8012bd1eb21678f8f2b87e4011d69d3c6184845e38dcf72195d +size 1372729 diff --git a/howdolanguagemodelstrackstate/695912dc-99b2-4f17-bf7d-f54159e0f6ec_content_list.json b/howdolanguagemodelstrackstate/695912dc-99b2-4f17-bf7d-f54159e0f6ec_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..40941cededbc39c6d4f2b73dfee8505776b203d8 --- /dev/null +++ b/howdolanguagemodelstrackstate/695912dc-99b2-4f17-bf7d-f54159e0f6ec_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7cbe7e003b3248e93102ce406b2d7de768b82a5ba66bfaa16dc4cb41bba289df +size 150388 diff --git a/howdolanguagemodelstrackstate/695912dc-99b2-4f17-bf7d-f54159e0f6ec_model.json b/howdolanguagemodelstrackstate/695912dc-99b2-4f17-bf7d-f54159e0f6ec_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f476895f0c3ca76755db37245aae64f5d036f1cb --- /dev/null +++ b/howdolanguagemodelstrackstate/695912dc-99b2-4f17-bf7d-f54159e0f6ec_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4568aa394c524eaeff8631ca1eda78540f5abb9691beab1946d8f0268c60bea +size 176112 diff --git a/howdolanguagemodelstrackstate/695912dc-99b2-4f17-bf7d-f54159e0f6ec_origin.pdf b/howdolanguagemodelstrackstate/695912dc-99b2-4f17-bf7d-f54159e0f6ec_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ed90ac69751594b36252af746404e4e4d384c12e --- /dev/null +++ b/howdolanguagemodelstrackstate/695912dc-99b2-4f17-bf7d-f54159e0f6ec_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acdc090bc88df6c53416e658b89d34b0df3ea9cf023906f0df615c06324d8d03 +size 17520536 diff --git a/howdolanguagemodelstrackstate/full.md b/howdolanguagemodelstrackstate/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ea18be1c670c0679963ce4480ecd9fde19dd39ec --- /dev/null +++ b/howdolanguagemodelstrackstate/full.md @@ -0,0 +1,625 @@ +# (How) Do Language Models Track State? + +Belinda Z. Li1 Zifan Carl Guo1 Jacob Andreas1 + +# Abstract + +Transformer language models (LMs) exhibit behaviors—from storytelling to code generation—that seem to require tracking the unobserved state of an evolving world. How do they do this? We study state tracking in LMs trained or fine-tuned to compose permutations (i.e., to compute the order of a set of objects after a sequence of swaps). Despite the simple algebraic structure of this problem, many other tasks (e.g., simulation of finite automata and evaluation of boolean expressions) can be reduced to permutation composition, making it a natural model for state tracking in general. We show that LMs consistently learn one of two state tracking mechanisms for this task. The first closely resembles the "associative scan" construction used in recent theoretical work by Liu et al. (2023) and Merrill et al. (2024). The second uses an easy-to-compute feature (permutation parity) to partially prune the space of outputs, and then refines this with an associative scan. LMs that learn the former algorithm tend to generalize better and converge faster, and we show how to steer LMs toward one or the other with intermediate training tasks that encourage or suppress the heuristics. Our results demonstrate that transformer LMs, whether pre-trained or fine-tuned, can learn to implement efficient and interpretable state-tracking mechanisms, and the emergence of these mechanisms can be predicted and controlled. Code and data are available at https://github.com/belindal/state-tracking. + +# 1. Introduction + +Language models (LMs) are trained to model the surface form of text. A growing body of work suggests that model internals contain a latent, decodable state of the world—e.g., situations described by language and results of program + +execution—to support prediction (Li et al., 2021; Nanda et al., 2023; Li et al., 2023). However, the mechanisms that LMs use to construct these representations are not understood. Do LMs simulate state evolution step by step across successive hidden layers or token representations (Yang et al., 2024)? Are states approximated through a complex collection of heuristics (jylin04 et al., 2024)? Is state tracking an illusion (Bender & Koller, 2020)? + +This paper studies the implementation and emergence of state tracking mechanisms in language models using permutation composition as a model system: given a fixed set of objects, we train or fine-tune LMs to predict the final position of each object after a sequence of rearrangements. Previous work has used versions of this task to evaluate LMs' empirical state tracking abilities (Li et al., 2021; Kim & Schuster, 2023; Li et al., 2023). Additionally, as shown by Barrington (1989), many complex, natural, state-tracking tasks—including simulation of finite automata and evaluation of Boolean expressions—can be reduced to permutation tracking with five or more objects. This makes it a natural model for studying state tracking in general. + +Our analysis proceeds in several steps. §2 provides technical preliminaries: §2.1 and §2.2 introduce state tracking problems and the permutation composition task we use to model them (Figure 1A), and §2.3 reviews the set of interpretability tools we use to analyze LM computations. Next, §3 lays out a family of algorithms that past work has suggested LMs might, in principle, use to solve the state tracking task (Figure 1D), and describes the signatures—expected readouts from different interpretability methods—that we would expect to find if a given algorithm is implemented (Figure 1B-C). + +Finally, §4 and §5 present experimental findings. Across a range of sizes, architectures, and pretraining schemes, we find that LMs consistently learn one of two state tracking mechanisms. The first mechanism, which we call the "associative algorithm" (AA), resembles the associative scan construction used by Liu et al. (2023) and Merrill & Sabharwal (2024) to establish theoretical lower bounds on the expressive capacity of Transformers. The second mechanism, which we call the "parity-associative algorithm" (PAA), first rules out a subset of final states using an easy-to-compute permutation parity heuristic, then uses an associative scan + +![](images/318e6e0a15a2fd87446f93e8111f7c93846fd53b9d28737e4e3830b30d721cb8.jpg) + +![](images/81ed49a8702dd39b4e0e8d5a4829b9ae2aebd38190ae58e3a61896e502f9f215.jpg) +D Transformer-Implementable Algorithms + +# B Prefix Patching Signature + +How much of prefix must be modified at each layer to change outputs? + +Patch prefix up to this token on this layer + +![](images/ec76a7c08c09824724940567450ba0f0ce346da52e7f3b0f8bf7cb0037bf832e.jpg) + +Correctly predicts final state when prefix up to this cell is patched. +Rules out a subset of states, but does not uniquely identify the correct state, when prefix up to this cell is patched. +Predicts final state with chance accuracy. + +# C Probing Signature + +What percentage of the state/ state parity sequence can be accurately probed from LMs' intermediate layers? + +Train linear probe to decode $n$ th state in sequence from $n$ th position in each layer's representations + +![](images/fc83095bc76fa64fcc0efdba5398679bb9b6a138c58a9075e96149d0127f5a97.jpg) + +State Probe +State Parity Probe (chanc accuracy is 0.5) + +![](images/8b9990711acc8202f0625d374c5362e075bce2a78e8f71a66aa277a8610ee7ea.jpg) +Figure 1. We use permutation word problems as a simple model of state tracking. Actions are permutations, and states are the products of those permutations; the current state can be tracked by taking the cumulative product from left to right (§2). We identify several possible algorithms that Transformers may use to solve permutation word problems: sequential, parallel, associative, and parity-associative (§3). Above, we depict the "signatures" of each algorithm under two types of interpretability analysis: prefix patching, where we create pairs of prompts differing only on the first token, then substitute all activation except the prefix up to a token at a particular layer, and probing, where we train a linear probe to map from last-token representations across the layers to either the final state or the final state parity (§2.3). Note: the dotted lines indicate two different probing signatures consistent with this algorithm (see Appendix C.3 for more details). + +to obtain a final prediction. Notably, we fail to find evidence for either step-by-step simulation or fully parallel composition, despite their being theoretically implementable by LMs. We support our findings with evidence from representation interventions (Meng et al., 2022; Zhang & Nanda, 2024; §4.2), probes (Shi et al., 2016; §4.3), patterns in prediction errors (Zhong et al., 2024; §4.4), attention maps (Clark et al., 2019; §4.5), and training dynamics (McCoy et al., 2020; + +Olsson et al., 2022; Hu et al., 2023; §5.1). + +The scan operation for PAA appears difficult for LMs to implement robustly, and the choice of mechanism sometimes significantly impacts model performance on long sequences (§5.1). Whether a given LM learns AA or PAA is highly stochastic (§5.2). However, each is associated with a characteristic set of phase transitions in the training loss (Chen et al., 2024), and LMs can be steered toward one solution or + +the other by training on an intermediate task that encourages or discourages LMs from learning a parity heuristic (§5.3). + +As pretrained LMs sometimes re-use circuits when finetuned on related tasks (Prakash et al., 2024; Merullo et al., 2024), our results suggest a possible mechanism by which real-world LMs might perform state tracking when modeling language, code, and games. We show preliminary evidence of these algorithms on a version of our permutation composition tasks expressed in natural language (Appendix E). Looking beyond state tracking, these findings underscore both the complexity and variability of LM solutions to complex tasks, which may involve both heuristic features and structured solutions. + +# 2. Background and Preliminaries + +# 2.1. State Tracking + +Inferring common ground in discourse (Li et al., 2021), navigating the environment (Vafa et al., 2024), reasoning about code (Merrill et al., 2024), and playing games (Li et al., 2023; Karvonen, 2024) all require being able to track the evolving state of a real or abstract world. There has been significant interest in understanding whether (and how) LMs can perform these tasks. In theoretical work, researchers have observed that many natural state-tracking problems (including the ones listed above) are associated with the complexity class $\mathsf{NC}^1$ , but Transformers cannot track the state of arbitrarily long inputs (Merrill et al., 2022; Huet et al., 2025; Bhattamishra et al., 2020; Delétang et al., 2023; Strobl et al., 2024). However, prior work has shown that Transformers with $O(\log n)$ depth can model inputs of up to length $n$ (Liu et al., 2023; Merrill & Sabharwal, 2024). Empirical work, meanwhile, has found that large LMs learn to solve state tracking problems (Kim & Schuster, 2023) and encode state information in their representations (Li et al., 2021; Li et al., 2023). But a mechanistic understanding of how trained LMs infer these states has remained elusive. + +# 2.2. Permutation Group Word Problems + +Toward this understanding, the experiments in this paper focus on one specific state tracking problem, permutation composition. At a high level, this problem presents LMs with a set of objects and a sequence of reshuffling operations; LMs must then compute the final order of the objects after all reshufflings have been applied (Figure 1A). Though less familiar than discourse tracking or program evaluation, Kim & Schuster (2023) used a version of this task to evaluate LM state tracking. More importantly, as shown by Barrington (1989) and recently highlighted by Merrill et al. (2024), permutation tracking (with five or more objects) is $\mathsf{NC}^1$ -complete, meaning any other state tracking task in this family can be converted into a permutation tracking class. + +This, combined with its simple structure, makes it a natural model system for studying state tracking in general. + +More formally, the finite symmetric group $S_{n}$ comprises the set of permutations of $n$ objects equipped with a composition operation. For example, 42315 denotes the permutation of 5 objects (i.e. in $S_{5}$ ) that moves the first object to the fourth position, the second object to the second position, etc. Importantly for our findings in this paper, every permutation can be expressed as a composition of two-element swaps (in Figure 1A, $a_{0}$ , but not $a_{1}$ , is an example of a swap). The parity of a permutation (even or odd) is the parity of the number of swaps needed to create it. + +The composition of two permutations, standardly denoted $a_1 \circ a_0$ , is the result of applying $a_1$ after $a_0$ . Inputs to sequence models in machine learning are typically written with earlier inputs before later inputs (i.e., left-to-right), so for consistency with this convention, we will write $a_0a_1$ to denote the application of $a_0$ then $a_1$ . Figure 1A shows the result of composing 42315 and 12534 in sequence. + +Finally, the word problem on $S_{n}$ is the problem of computing the product of a sequence of permutations. This product itself corresponds to a single permutation (32514 in Figure 1). But, following the intuition given at the beginning of the section, it may equivalently be interpreted as the final ordering of the objects being rearranged (DBAEC in Figure 1A). Following this intuitive explanation (and by analogy to other state tracking problems), we will use $a_{t}$ to denote a single permutation ("action") in a sequence, and $s_{t} = a_{0}\dots a_{t}$ to denote the result of a sequence of permutations (a "state"). + +Given a sequence of permutations, we use $\epsilon(a_{t})$ to denote the parity of the $t$ th permutation, so: + +$$ +\epsilon \left(s _ {t}\right) = \epsilon \left(a _ {0} \dots a _ {t}\right) = \sum_ {i} \epsilon \left(a _ {i}\right) \mod 2 \tag {1} +$$ + +(where $\epsilon$ is 0 for even permutations and 1 for odd ones). + +All experiments in this paper train transformer language models to solve the word problem: they take as input a sequence of actions $[a_0, \dots, a_t]$ , and output a sequence of state predictions $[s_0, \dots, s_t]$ . We also validate our findings on a natural language version of this task in Appendix E, where permutations are expressed as instructions like swap positions 2 and 3. + +# 2.3. Interpretability Methods + +Our experiments employ several interpretability techniques to understand how LMs solve permutation word problems, which we briefly describe below. Throughout this paper, we use $h_{t,l}$ to denote the internal LM representation at token position $t$ after Transformer layer $l$ , with $T$ and $L$ denoting the maximum input length and number of layers respectively. + +Probing In probing experiments (Shi et al., 2016), we fix the target LM, then train a smaller "probe" model (e.g. a linear classifier) to map LM hidden representations $h$ to quantities $z$ hypothesized to be encoded by the LM (Figure 1C). Our experiments specifically evaluate whether (1) the state $s_t$ , and (2) the final state parity is linearly encoded in intermediate-layer representations. For each layer $l$ , we train (1) a state probe to predict $p(s_t \mid h_{t,l})$ and (2) a parity probe to predict $p(\epsilon(s_t) \mid h_{t,l})$ . Given a trained LM, we collect representations on one set of input sequences to train the probe, then evaluate probe accuracy on a held-out set. + +Activation Patching Probing experiments reveal what information is present in an LM's representations, but not that this information is used by the LM during prediction. Activation patching is a method for determining which representations play a causal role in prediction. Portions of the LM's internal representations are overwritten ("patched") with representations derived from alternative inputs; if predictions change, we may conclude that the overwritten representations was used for prediction (Meng et al., 2022; Zhang & Nanda, 2024; Heimersheim & Nanda, 2024). + +Let $p(y \mid x; h \gets h')$ denote the probability that an LM assigns to the output $y$ given an input $x$ , but with the representation $h$ replaced by some other representation $h'$ . In a typical experiment, we first construct a "clean" input $x$ that we wish to analyze, and a "corrupted" input $x'$ that alters or removes information from $x$ (e.g. by adding noise or changing its semantics). Next, we compute the most probable outputs from clean and corrupted inputs: + +$$ +\widehat {y} = \underset {y} {\arg \max } p (y \mid x) +$$ + +$$ +\widehat {y ^ {\prime}} = \arg \max _ {y} p (y \mid x ^ {\prime}) +$$ + +We then re-run the LM on the corrupted input $x'$ , but substitute a hidden representation from the clean input $x$ , and measure how much prediction shifts toward the clean output $\hat{y}$ using the normalized logit difference (Wang et al., 2023): + +$$ +\mathrm {N L D} = \frac {\mathrm {L D} \left(x ^ {\prime} ; h _ {t , l} \leftarrow h _ {t , l} ^ {\text {c l e a n}}\right) - \mathrm {L D} \left(x ^ {\prime}\right)}{\mathrm {L D} (x) - \mathrm {L D} \left(x ^ {\prime}\right)} \tag {2} +$$ + +where + +$$ +\operatorname {L D} (\cdot) = \log p (\widehat {y} \mid \cdot) - \log p (\widehat {y ^ {\prime}} \mid \cdot) +$$ + +and the representation $h_{t,l}^{\mathrm{clean}}$ is taken from the clean run of the model. A value of NLD close to 1 indicates that we have restored a part of the circuit that computes $\hat{y}$ . + +In this paper, we evaluate which representations are involved in prediction by presenting models with a clean sequence $[a_0,a_1,\dots ,a_t]$ associated with a final state $s_t$ . We then produce a corrupted sequence differing only in the first token, $[a_0',a_1,\dots ,a_t]$ , associated with a final state + +$s_t^\prime$ . We then identify the hidden states that, when patched in, cause the model to output $s_t$ rather than $s_t^\prime$ with high probability. Our main experiments specifically perform prefix patching, where all hidden representations up to index $t$ ( $h_{1:t,l} \gets h_{1:t,l}^{\mathrm{clean}}$ ) are patched at a particular layer $l$ (Figure 1B). Prefix patching allows us to localize how information gets progressively transferred to the final token as we move deeper into the network. A value close to 1 means that some part of the prefix representation was used for prediction; a value close to 0 means that no part was. + +We also experiment with other types of localization techniques (including suffix and window patching), as well as zero-ablating certain activations in Appendix B. + +# 3. What Algorithms Can Transformers Implement in Theory? + +To use the methods described in §2.3 to interpret model behavior, we must first establish a phenomenology for LM state tracking—identifying candidate state tracking algorithms that might be implemented by the model, along with the empirical probing and activation patching results we would expect to find if these algorithms are implemented. Below, we describe a set of state tracking mechanisms suggested by the existing literature. + +For each mechanism, we first present a sketch of an implementation, in the form of rules for computing the value stored in the hidden state for each layer and timestep. We then describe the "signature" of each algorithm—the result we would expect from the application of prefix patching and probing techniques described in the preceding section. + +# 3.1. Sequential Algorithm + +The sequential algorithm composes permutations one at a time from left to right (analogous to a mechanism some LMs use to solve multi-hop reasoning problems; Yang et al., 2024). Signatures of this algorithm would provide evidence that LMs implement step-by-step "simulation" in their hidden states to solve state tracking tasks. In this algorithm, each hidden state $h_{t,l}$ stores the associated action $a_t$ until $s_t$ can be computed, maintaining $h_{t,t} = s_t$ . As shown in the first row of Figure 1D, this computation depends only on hidden states with $l \leq t$ . + +
ht,0 = at ∨t// initialize actions
(h0,0 = st)// by definition; see §2.2
for t = 1..T, l = 1..L do
if l < t then ht,l = ht,l-1 = at// propagate actions
if l = t then ht,l = ht-1,l-1ht,l-1
= st-1at = st// update states
if l > t then ht,l = ht,l-1 = st// propagate states
end for
+ +Patching Signature Because of this dependency, any patching experiment that replaces only hidden states with $l > t$ will not affect the final model predictions, leading to the upper triangular patching signature shown in the first row of Figure 1B. + +Probing Signature Because $s_t$ can only be predicted at layer $l = t$ , we expect a state probe to show a linear dependence on depth: for sequences of maximum length $T$ , a probe at layer $l$ will correctly label an $l / T$ fraction of states. If these state representations linearly encode parity, then the accuracy of the parity probe will also increase linearly; otherwise, it will remain constant. + +# 3.2. Parallel Algorithm + +As noted in §2.2, the word problem on $S_{5}$ belongs to $\mathsf{NC}^{1}$ (and thus requires a circuit depth that scales logarithmically with sequence length). The word problem on $S_{3}$ , however, belongs to $\mathsf{TC}^{0}$ , the class of decision problems with constant-depth threshold circuits. See discussion in Appendix A and Merrill & Sabharwal (2023). A constant-depth circuit will give rise to a set of hidden-state dependencies like the second row of Figure 1D. + +**Patching Signature** Let $l_{P}$ denote the number of layers needed to implement the constant-depth circuit for this task. For patching interventions conducted at or earlier than layer $l_{P}$ , we expect the model's predictions to change; at deeper layers than $l_{P}$ , interventions will have no effect at all, resulting in the L-shaped pattern shown in the second row of Figure 1B. + +Probing Signature We expect the probe to obtain perfect accuracy within a constant number of layers. Because the algorithm described in Appendix A computes state parity as an intermediate quantity, the parity probe will also obtain perfect accuracy within a constant number of layers. + +# 3.3. Associative Algorithm + +In the associative algorithm (AA), Transformers compose permutations hierarchically: in each layer, adjacent sequences of permutations are grouped together and their product is computed. This is analogous to recursive scan in Liu et al. (2023) and flattened expression evaluation in Merrill et al. (2024). This algorithm takes advantage of the associative nature of the product of permutations, whereby $a_0a_1a_2a_3 = (a_0a_1)(a_2a_3)$ . It ensures that $h_{t,l} = a_{t - 2^l +1}\dots a_t$ , and thus that $h_{t,\log (t + 1)} = a_0\dots a_t$ . Signatures of this algorithm would provide evidence that LMs perform state tracking not by encoding states, but rather by mapping between states, for prefixes of increasing length. + +
ht,0 = at ∨t// initialize actions
for t = 0..T, l = 1..L do
if l ≤ log(t + 1) then
ht,l = ht-2l-1,l-1ht,t,l-1
= at-2l+1···at// compose actions
else ht,l = ht,t-l-1 = st// propagate actions
end for
+ +(Defining $h_{t < 0,l} = h_{0,l}$ for notational convenience.) + +As seen in the third row of Figure 1D, the model's prediction for $s_t$ depends on the hidden representation $h_{t/2}$ in the layer before the final state is computed, the representation at $h_{t/4}$ in the layer before that, etc. + +Patching Signature Consequently, for AA, the length of the prefix that must be modified to alter model behavior increases exponentially in depth, resulting in the signature in the third row of Figure 1B. + +Probing Signature We similarly expect to see an exponentially increasing state probe accuracy (because $s_t$ becomes predictable at layer $l = \log t$ , a probe at layer $l$ will correctly label a $2^l / T$ fraction of states). If state parity is encoded in state representations, then parity probe accuracy will also increase exponentially. + +# 3.4. Parity-Associative Algorithm + +In this algorithm (PAA), LMs compute the final state in two stages: first computing the parity of the state (which can be performed in a constant number of layers using a subroutine from the Parallel algorithm); then separately computing the remaining information needed to identify the final state (the "parity complement") using a procedure analogous to AA. (Unlike the preceding algorithms, we are not aware of any previous proposals for solving permutation composition problems in this way; but as we will see, it is useful for understanding interactions between "heuristic" and "algorithmic" solutions in real LMs.) + +We model implementation of PAA with hidden states comprising two "registers" $\epsilon$ and $\kappa$ (i.e. $h_{t,l} = (\epsilon_{t,l},\kappa_{t,l})$ which store the parity and complement respectively. + +
κ0,t = at ∨t// initialize actions
ε0,t = par(st) ∀t// compute parities (App. A)
for t = 0..T, l = 1..L do
εt,l = εt,l-1// propagate parities
if l ≤ log(t+1) then
κt,l = comp(κt-2l-1,l-1κt,l-1)// compose
else κt,l = κt,l-1// propagate complements
end for
+ +In this algorithm, the hidden state at position $i$ holds that + +position's state parity and parity complement (if computed at this point). Parity, like $S_{3}$ , may be computed with a constant number of layers. The algorithm sketch given above is deliberately vague about the implementation of the parity complement composition operation (comp). In practice, different representations of this complement appear to be learned across different runs; see Figure 10 for evidence that these representations are computed using a brittle (and perhaps heuristic- or memorization-based) mechanism. + +**Patching Signature** If the corrupted input has a different parity from the clean input, then in layers deeper than those used to compute parity, it is necessary to restore the entire prefix to cause the LM to assign full probability to the clean prediction. On these inputs, prefix patching will show a signature similar to the parallel algorithm (see Figure 8B). However, if the corrupted input has the same parity as the clean input, the portion of the hidden state computed in parallel remains the same, while its complement is computed using the same mechanism as the associative algorithm (see Figure 8A). These inputs will thus exhibit an AA-like (exponentially-shaped) patching pattern. When averaged together, parity-matched and parity-mismatched patching will produce a pattern with two regions, one shaped like the associative algorithm (associated with a $50\%$ restoration in accuracy) and one shaped like the parallel algorithm (associated with a $100\%$ restoration in accuracy). Again, this may be most easily understood graphically (Figure 1). + +Probing Signature We expect state probes to improve exponentially with depth, while parity probes converge to $100\%$ at a constant depth. + +# 4. What Mechanisms do Transformers Learn? + +In this section, we compare these theoretical state tracking mechanisms to empirical properties of LMs trained for permutation tasks. It is important to emphasize that the various signatures described above provide necessary, but not sufficient, conditions for implementation of the associated algorithm; the exact mechanism that LMs use in practice is likely complex and dependent on other input features not captured by the algorithms described above. + +Nevertheless, our experiments successfully rule out some possible state tracking mechanisms and identify algorithmic features likely to be shared between the idealized mechanisms above and the true behavior learned by transformers. Specifically, our experiments yield evidence consistent with the associative algorithm (AA) in some models and the parity-associative algorithm (PAA) in other models, across architectures, sizes, and initializations. + +# 4.1. Experimental Setup + +We generate 1 million unique length-100 sequences of permutations in both $S_{3}$ and $S_{5}$ . We split the data 90/10 for training/analysis, and fine-tune these models (using a cross-entropy loss) to predict the state corresponding to each prefix of each action sequence: + +$$ +\mathcal {L} = - \sum_ {t = 0} ^ {9 9} \log p _ {\mathrm {L M}} \left(s _ {t} \mid a _ {0} \dots a _ {t}\right), \tag {3} +$$ + +where $p_{\mathsf{LM}}(s_n \mid a_0 \dots a_t)$ is the probability the language model places on state token $s_n$ when conditioned on the length- $n$ prefix of the document. + +Except where noted, we begin with Pythia-160M models pre-trained on the Pile dataset (Biderman et al., 2023). Regardless of initialization scheme, we fine-tune models for 20 epochs on Equation (3) using the AdamW optimizer with learning rate 5e-5 and batch size 128. For larger models (above 700M parameters), we train using bfloat16. + +# 4.2. Activation Patching + +For both the $S_{3}$ and $S_{5}$ tasks, across training runs, we find that activation patching results exhibit two broad clusters of behavior. For some trained models, they match the activation patching signature associated with AA; in others, they match the signature of PAA—even when the only source of variability across training runs is the order in which data is presented. Results for prototypical AA- and PAA-type models, on both $S_{3}$ and $S_{5}$ , are shown in Figure 2. Additional patching results in Appendix B confirm that patching intermediate representations of PAA-type models (the light + +![](images/bc50f9384f06bc1811052db8cdecc7144cd3dd06076ef774a8b5d33f67b1ba52.jpg) +Figure 2. Activation patching on the residual stream for various Pythia models trained on $S_{3}$ and $S_{5}$ . Each cell at layer $l$ and token $t$ represents the probability of the correct final state when the entire prefix up to $t$ at layer $l$ is restored. We find signatures matching the AA and PAA algorithms from Figure 1, with both models ignoring exponentially longer prefixes as we traverse down the layers, and PAA models containing intermediate representations that encode some information about the final state, but not its parity. + +![](images/5d1c77e94c6e21d718058bc75e1037dc2faa4c04893c6c3da0cd03a510a24152.jpg) +Figure 3. Accuracy of state probe and state parity probe across layers on $S_{3}$ and $S_{5}$ models sometimes match signatures for AA, and sometimes PAA. In all models, the state probe accuracy increases roughly exponentially with model depth. We find that in PAA models, the parity of the state is linearly decodable from earlier intermediate layers, while in the AA models shown above, the parity is never linearly encoded in any layer of the model. (In other AA models, the parity can only be linearly decoded at the final layer.) + +![](images/9e0c71bbf9652890790b8c5c22472b10d6cbb9ef0e7a84f9ab4130fdc5526c60.jpg) + +![](images/e12d896fb9ebe8544949f29de7259d0a7ab75bf68e07412c96df1aecb66e4a93.jpg) + +![](images/e7ff7c25d391d19abc10143ea6a9fd4fc53e38c719fc24fc132f639e4393f61d.jpg) + +![](images/1f4f3dbacf8fedf46a9082f76f427c8e85c3635f3c2a7920e31077b9917b61d2.jpg) +Figure 4. In models that learn PAA on $S_{3}$ , representations of the final product can be geometrically decomposed into two orthogonal directions, corresponding to the parity of the product (represented as the Z-axis in the above graph) and cluster identity of the product (represented by the X-Y plane). Note that the clusters are at 60 degrees to each other, and products of different parities within a cluster are equidistant from each other, with odd-parity products in one plane, and even-parity products in another plane. + +colored cells in Figure 2) results specifically in predictions with incorrect parity. We find standard deviations to be low in Figure 9, confirming the robustness of our signatures. + +# 4.3. Probing + +Test set accuracies of linear probes across LM layers $l$ are plotted in Figure 3. We report standard deviations of these accuracies in Table 1, which are all less than $10^{-3}$ . We again find empirical signatures consistent with those predicted by AA and PAA, on both $S_{3}$ and $S_{5}$ . Models with AA-type probing signatures always have AA-type patching signatures, and vice versa. Throughout the rest of this paper, we refer to models (and state-tracking mechanisms) as "AA-type" or "PAA-type" based on which cluster of signatures they exhibit. Results in Appendix C break down probe accuracies by sequence length, confirming that models solve sequences of exponentially longer length at deeper layers. + +What exactly is the "non-parity residual" for PAA models? We visualize the linear components of representations near the final layer(s) of PAA models trained on $S_{3}$ . The rep + +resentations of states can be cleanly decomposed into two orthogonal parts: the parity of the product and a residual cluster identity, forming a triangular prism. In Figure 4, we project representations from the PAA model for each of the six states onto these components. Even-parity states (darker colors) and odd-parity states (lighter colors) are symmetric. The three cluster "spokes" are spaced 60 degrees apart. $^2$ + +# 4.4. Generalization by Sequence Length + +We next evaluate the state and parity accuracy of AA- and PAA-type models for held-out inputs of varying length. In general, we find that models learn to generalize perfectly to sequences of up to the length of their training data, then face a steep accuracy dropoff after (which we refer to as the "cutoff length"), rather than generalizing uniformly across all sequence lengths. + +In Figure 5, where we plot the cutoff lengths at which each accuracy dips below $98\%$ . We find that for models that learn PAA, the parity accuracy cutoff length is much longer than the state accuracy cutoff length, whereas, for models that learn an AA-type mechanism, the two cutoff lengths are equal. Furthermore, models that learn an AA-type mechanism tend to generalize better overall. + +# 4.5. Attention Patterns + +We look at attention patterns of LMs and check whether they can be used to differentiate between PAA models and AA models. Specifically, we find that in the early layers, PAA models exhibit parity heads, heads that place attention to odd-parity actions. Recall that the parity of a state can be determined by counting the number of odd-parity actions, and taking the parity of the count (Equation (1)). Examples of the parity head attention pattern are shown in Figure 15. We find no evidence of parity heads in any layer of AA models. (See Appendix F for a formal metric measuring how much an attention head behaves like a parity head.) + +![](images/e51785909cf2d322de117c5e30c96bc3508a84ab33a07ffb8e11ca8428388623.jpg) +Figure 5. Generalization curves showing state and parity prediction accuracy as sequence lengths vary. Models are trained on length-100 sequences and asked to generalize to varying lengths of sequences. We plot generalization curves for AA and PAA models on $S_{3}$ and $S_{5}$ . In each plot, we show the $98\%$ cutoff threshold, the sequence length at which accuracy dips below $98\%$ . In the models that learned PAA, the parity cutoff is larger than the state cutoff, while in models that learned AA, the parity cutoff equals the state cutoff. Generally speaking, models that learned AA generalize better than ones that learned PAA. + +![](images/c1f8c45571ca9290b7b0dcf6cea69193d26295dee481e60be4c7dd7f27a59713.jpg) +Figure 6. Annotated training curves for models that learn the AA and PAA algorithms. In PAA models (blue), we find that convergence happens in two phases: in the first phase, they learn to generalize parities up to sequence length 100, and in the second, they learn to generalize the states. In AA models (orange), parities and states are learned simultaneously. Note that AA models also tend to converge faster to (ultimately) a lower loss than PAA models. + +We also find evidence that attention patterns in AA models sparsify in later layers of the network, forming a tree-like pattern expected of AA, shown in Figure 16. + +# 5. Why do Transformers Learn One Mechanism or Another? + +Having determined that trained models consistently exhibit AA- or PAA-like signatures, we next study the factors that + +determine which mechanism emerges during training. + +# 5.1. When in Training Do Distinct Mechanisms Arise? + +We find that an LM's eventual mechanism can be identified very early in training, based on the pattern of prediction errors. As in Figure 6, LMs that eventually learn AA improve the quality of their parity and state predictions in lockstep, while LMs that learn PAA learn in two phases: they first converge on learning parity over the entire length of the + +training sequence; and only then do they learn to accurately predict the state itself.3 + +Because it is possible to identify these patterns early in training, our subsequent experiments classify LMs as AA-type or PAA-type based on generalization curves (Section 4.4) after 10k training steps, rather than waiting for the full probing and patching signatures to emerge. + +# 5.2. What Factors Affect Which Mechanism is Learned? + +Whether an LM learns AA or PAA is a deterministic function of four factors: model architecture, size, initialization scheme, and fine-tuning data order. Our next experiments evaluate each of these factors in turn. We explore two different model architecture families of various sizes (GPT-2, Radford et al., 2019, and Pythia, Biderman et al., 2023), several different model initializations (pre-trained on the Pile and trained from scratch with different random initializations), and up to 12 different data ordering seeds. + +We find that model architecture and initialization, rather than model size, are the biggest determining factors of what mechanism the model chooses to learn. Figure 7 shows the ratio of LMs that learn each mechanism, aggregated by model architecture and initialization. The low variance indicates a minimal effect of model size. GPT-2 models, pre-trained or not, are split roughly evenly between the two mechanisms, while Pythia models tend to learn AA when pre-trained on the Pile, and PAA when not. + +![](images/ee1f9e52c21f4de9d90448e54fc9e62ccbe91ab7106b6e9d74631ecc5799d7c7.jpg) +Figure 7. Proportion of GPT-2 and Pythia models that learn an AA-type mechanism, a PAA-type mechanism, or neither under different training regimes described in Section 5. + +# 5.3. How Does Pre-training Affect Mechanism Choice? + +We show that appropriately designed intermediate tasks can encourage models to learn one mechanism or the other. + +Topic Modeling As a controlled way of studying how the next-token-prediction (NTP) objective affects which + +mechanism LMs converge to, we generate length-100 documents with only $S_{3}$ elements as vocabulary items, and pre-train (randomly initialized) LMs with NTP on these documents, before training them on $S_{3}$ . Specifically, the documents are generated from a topic model with parameters: # of topics = 4, $\alpha = 0.3$ , and $\beta = 0.1$ , where $\alpha$ is the density of topics in each document and $\beta$ is density of words in each topic. As shown in Figure 7, when from-scratch LMs are trained with our topic modeling NTP objective, they always learn an AA-type mechanism. + +Parity Prediction We first train the entire model on predicting the state parity of the sequence to output token 1 if odd and $\emptyset$ if even, before transitioning to training on the actual $S_{3}$ objective. In Figure 7, we show that we can induce GPT-2 and Pythia models to learn PAA when trained from scratch on parity. Notably, from-scratch Pythia models already tend to learn PAA as a baseline behavior. Therefore, we also apply this curriculum on Pythia models pre-trained on the Pile, and find that it consistently converts the mechanism learned from AA-type to PAA-type. $^{5}$ + +Control: Random Next-Token-Prediction As a control, we train LMs on length-100 documents of random $S_{3}$ elements sampled from a uniform distribution. We confirm that the control fine-tuning did not affect the ratio with which LMs learned each mechanism. + +# 6. Conclusion + +We have shown that LMs trained on permutation tracking tasks learn one of two distinct mechanisms: one consistent with an "associative algorithm" (AA) that composes action subsequences in parallel across successive layers; and another with a "parity-associative algorithm" (PAA) which first computes a shallow parity heuristic in early layers and then computes a residual to the parity using an associative procedure. LMs that learn an AA-type mechanism tend to generalize better and converge faster; different choices of model architecture and training scheme encourage the discovery of one mechanism over another. + +While a large number of other state tracking tasks can be reduced to the more complex permutation task we study $(S_{5})$ , our experiments leave open the question of whether the specific mechanisms LMs use to solve $S_{5}$ are also deployed for these other tasks. + +# Impact Statement + +The $S_{3}$ and $S_{5}$ tasks we choose to study in this paper can be generalized to many different state tracking scenarios funda + +mental to many aspects of reasoning capabilities. Methods for identifying mechanisms that LMs implement, especially when these differ from human-designed algorithms, can provide crucial insights on how to build more robust LMs, control their behavior, and predict their failures. Our experiments focus on small-scale models, and we do not anticipate any immediate ethical considerations associated with our findings. + +# Acknowledgments + +This work was supported by the OpenPhilanthropy foundation, the MIT Quest for Intelligence, and the National Science Foundation under grant IIS-2238240. BZL is additionally supported by a Clare Boothe Luce fellowship, and JA is supported by a Sloan fellowship. This work benefited from many conversations during the Simons Institute Program on Language Models and Transformers. The authors would also like to thank Reuben Stern, Sebastian Zhu, and Gabe Grand for feedback on drafts of the paper. + +# References + +Barrington, D. A. Bounded-width polynomial-size branching programs recognize exactly those languages in NC1. Journal of Computer and System Sciences, 38(1):150-164, 1989. ISSN 0022-0000. doi: https://doi.org/10.1016/0022-0000(89)90037-8. URL https://www.sciencedirect.com/science/article/pii/00220000899900378. +Bender, E. M. and Koller, A. Climbing towards NLU: On meaning, form, and understanding in the age of data. In Jurafsky, D., Chai, J., Schluter, N., and Tetreault, J. (eds.), Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 5185-5198, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.463. URL https://aclanthology.org/2020.acl-main.463/. +Bhattachamishra, S., Ahuja, K., and Goyal, N. On the Ability and Limitations of Transformers to Recognize Formal Languages. In Webber, B., Cohn, T., He, Y., and Liu, Y. (eds.), Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 7096-7116, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.emnlp-main.576. URL https://aclanthology.org/2020.emnlp-main.576/. +Biderman, S., Schoelkopf, H., Anthony, Q. G., Bradley, H., O'Brien, K., Hallahan, E., Khan, M. A., Purohit, S., Prashanth, U. S., Raff, E., et al. Pythia: A suite for analyzing large language models across training and scaling. + +In International Conference on Machine Learning, pp. 2397-2430. PMLR, 2023. +Chen, A., Shwartz-Ziv, R., Cho, K., Leavitt, M. L., and Saphra, N. Sudden Drops in the Loss: Syntax Acquisition, Phase Transitions, and Simplicity Bias in MLMs. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=M05PiKHELW. +Clark, K., Khandelwal, U., Levy, O., and Manning, C. D. What does BERT look at? an analysis of BERT's attention. In Linzen, T., Chrupaña, G., Belinkov, Y., and Hupkes, D. (eds.), Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pp. 276-286, Florence, Italy, August 2019. Association for Computational Linguistics. doi: 10.18653/v1/W19-4828. URL https://aclanthology.org/W19-4828/. +Delétang, G., Ruoss, A., Grau-Moya, J., Genewein, T., Wen-liang, L. K., Catt, E., Cundy, C., Hutter, M., Legg, S., Veness, J., and Ortega, P. A. Neural Networks and the Chomsky Hierarchy. In 11th International Conference on Learning Representations, 2023. +Heimersheim, S. and Nanda, N. How to use and interpret activation patching. arXiv preprint arXiv:2404.15255, 2024. +Hu, M. Y., Chen, A., Saphra, N., and Cho, K. Latent state models of training dynamics. Transactions on Machine Learning Research, 2023. ISSN 2835-8856. URL https://openreview.net/forum?id=NE2xXWo0LF. +Huet, A., Houidi, Z. B., and Rossi, D. Episodic memories generation and evaluation benchmark for large language models. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=6ycX677p21. +jylin04, JackS, Karvonen, A., and Can. OthelloGPT learned a bag of heuristics, 2024. URL https://www.lesswrong.com/posts/gcpNuEZnxAPayaKBY/othellogpt-learned-a-bag-of-heuristics-1. +Karvonen, A. Emergent World Models and Latent Variable Estimation in Chess-Playing Language Models. In First Conference on Language Modeling, 2024. URL https://openreview.net/forum?id=PPTrmvEnpW. +Kim, N. and Schuster, S. Entity Tracking in Language Models. In Rogers, A., Boyd-Graber, J., and Okazaki, N. (eds.), Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 3835-3855, Toronto, Canada, July 2023. Association for Computational Linguistics. + +doi: 10.18653/v1/2023.acl-long.213. URL https://aclanthology.org/2023.acl-long.213/. +Li, B. Z., Nye, M., and Andreas, J. Implicit Representations of Meaning in Neural Language Models. In Zong, C., Xia, F., Li, W., and Navigli, R. (eds.), Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 1813-1827, Online, August 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.acl-long.143. URL https://aclanthology.org/2021.acl-long.143/. +Li, K., Hopkins, A. K., Bau, D., Viégas, F., Pfister, H., and Wattenberg, M. Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Task. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=DeG07_TcZvT. +Liu, B., Ash, J. T., Goel, S., Krishnamurthy, A., and Zhang, C. Transformers Learn Shortcuts to Automata. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=De4FYqjFueZ. +McCoy, R. T., Min, J., and Linzen, T. BERTs of a feather do not generalize together: Large variability in generalization across models with similar test set performance. In Alishahi, A., Belinkov, Y., Chrupa, G., Hupkes, D., Pinter, Y., and Sajjad, H. (eds.), Proceedings of the Third BlackboxNLP Workshop on Analyzing and Interpreting Neural Networks for NLP, pp. 217-227, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.blackboxnlp-1.21. URL https://aclanthology.org/2020.blackboxnlp-1.21/. +Meng, K., Bau, D., Andonian, A., and Belinkov, Y. Locating and editing factual associations in GPT. Advances in Neural Information Processing Systems, 35:17359-17372, 2022. +Merrill, W. and Sabharwal, A. The Parallelism Tradeoff: Limitations of Log-Precision Transformers. Transactions of the Association for Computational Linguistics, 11:531-545, 2023. doi: 10.1162/tacl_a_00562. URL https://aclanthology.org/2023.tacl-1.31/. +Merrill, W. and Sabharwal, A. A Little Depth Goes a Long Way: The Expressive Power of Log-Depth Transformers. In NeurIPS 2024 Workshop on Mathematics of Modern Machine Learning, 2024. +Merrill, W., Sabharwal, A., and Smith, N. A. Saturated Transformers are Constant-Depth Threshold Circuits. + +Transactions of the Association for Computational Linguistics, 10:843-856, 2022. doi: 10.1162/tacl_a_00493. URL https://aclanthology.org/2022.tacl-1.49/. +Merrill, W., Petty, J., and Sabharwal, A. The Illusion of State in State-Space Models. In *Forty-first International Conference on Machine Learning*, 2024. URL https://openreview.net/forum?id=QZgo9JZpLq. +Merullo, J., Eickhoff, C., and Pavlick, E. Circuit Component Reuse Across Tasks in Transformer Language Models. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=fpoAYV6Wsk. +Nanda, N., Lee, A., and Wattenberg, M. Emergent Linear Representations in World Models of Self-Supervised Sequence Models, 2023. URL https://arxiv.org/abs/2309.00941. +Olsson, C., Elhage, N., Nanda, N., Joseph, N., DasSarma, N., Henighan, T., Mann, B., Askell, A., Bai, Y., Chen, A., Conerly, T., Drain, D., Ganguli, D., Hatfield-Dodds, Z., Hernandez, D., Johnston, S., Jones, A., Kernion, J., Lovitt, L., Ndousse, K., Amodei, D., Brown, T., Clark, J., Kaplan, J., McCandlish, S., and Olah, C. In-context Learning and Induction Heads. Transformer Circuits Thread, 2022. https://transformer-circuits.pub/2022/incontext-learning-and-induction-heads/index.html. +Prakash, N., Shaham, T. R., Haklay, T., Belinkov, Y., and Bau, D. Fine-Tuning Enhances Existing Mechanisms: A Case Study on Entity Tracking. In Proceedings of the 2024 International Conference on Learning Representations, 2024. arXiv:2402.14811. +Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., Sutskever, I., et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019. +Shi, X., Padhi, I., and Knight, K. Does string-based neural MT learn source syntax? In Su, J., Duh, K., and Carreras, X. (eds.), Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 1526-1534, Austin, Texas, November 2016. Association for Computational Linguistics. doi: 10.18653/v1/D16-1159. URL https://aclanthology.org/D16-1159/. +Strobl, L., Merrill, W., Weiss, G., Chiang, D., and An-gluin, D. What Formal Languages Can Transformers Express? A Survey. Transactions of the Association for Computational Linguistics, 12:543-561, 2024. doi: 10.1162/tacl_a_00663. URL https://aclanthology.org/2024.tacl-1.30/. + +Vafa, K., Chen, J. Y., Rambachan, A., Kleinberg, J., and Mullainathan, S. Evaluating the World Model Implicit in a Generative Model. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=aVK4JFpegy. +Wang, K. R., Variengien, A., Conmy, A., Shlegeris, B., and Steinhardt, J. Interpretability in the wild: a circuit for indirect object identification in GPT-2 small. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=NpsVSN6o4u1. +Yang, S., Gribovskaya, E., Kassner, N., Geva, M., and Riedel, S. Do Large Language Models Latently Perform Multi-Hop Reasoning? In Ku, L.-W., Martins, A., and Srikumar, V. (eds.), Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 10210-10229, Bangkok, Thailand, August 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.acl-long.550. URL https://aclanthology.org/2024.acl-long.550/. +Zhang, F. and Nanda, N. Towards best practices of activation patching in language models: Metrics and methods. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=Hf17y6u9BC. +Zhong, Z., Liu, Z., Tegmark, M., and Andreas, J. The clock and the pizza: Two stories in mechanistic explanation of neural networks. Advances in Neural Information Processing Systems, 36, 2024. + +# A. A Constant-Depth Algorithmexists for $S_{3}$ + +$S_{5}$ is the smallest non-solvable permutation group. $S_{3}$ is isomorphic to $D_{3}$ , the symmetry group of an equilateral triangle, which can be generated by a transposition $a = (23)$ and a 3-cycle $b = (123)$ . These generators satisfy the relation $ab = ba^{-1}$ , which allows any word problem in $S_{3}$ to be reduced by tracking (1) the cumulative parity of transpositions and (2) the count of 3-cycles modulo 3. Since both parity checking and modular counting can be computed using constant-depth threshold circuits, the word problem for $S_{3}$ belongs to $\mathsf{TC}^0$ . + +# B. Full Activation Patching Results + +In the activation patching experiments, we overwrite ("patch") portions of the LM's internal representations and compute how much the resulting logits have changed. As discussed in Section 2.3, we perform prefix patching to localize important token positions. However, in addition to prefix patching, we also explore the following types of localization methods: + +1. In suffix patching, all tokens starting from $t$ up to one before the last token of the sequence $(h_{t:|A| - 1,l})$ are patched at a particular layer $l$ .7 +2. In window patching, all tokens in a $w$ -width window starting from $t$ ( $h_{t:t + w - 1,l}$ ) are patched at layer $l$ . + +For each of the above localization techniques, we patch the representation with several different types of content: + +1. In representation deletion, we overwrite target representation(s) entirely with a zero vector, + +$$ +h _ {t, l} = \mathbf {0} +$$ + +and measure the NLD as follows: + +$$ +\mathrm {N L D} = \frac {\mathrm {L D} (a _ {1} \dots a _ {t}) - \mathrm {L D} (a _ {1} \dots a _ {t} ; h _ {t , l} \leftarrow \mathbf {0})}{\mathrm {L D} (a _ {1} \dots a _ {t})} +$$ + +2. In representation substitution, we overwrite the representation(s) with those derived from running the LM on a minimally different (corrupted) representation $P_{\mathrm{corr}}$ . This is the setting described in Section 2.3. + +Full results are shown in Figure 8. In general, we discover the following: + +In PAA models, parities are computed in parallel in early-mid layers We use prefix substitution patching described in Section 2.3, but plot pairs that have same parity final states $(\epsilon (\widehat{y}) = \epsilon (\widehat{y^{\prime}}))$ separately from pairs that have opposite parity final states $(\epsilon (\widehat{y})\neq \epsilon (\widehat{y^{\prime}}))$ + +Results are shown in Figure 8A (for same parity) and 8B (for opposite parity). We find that in AA models, parities are computed with the state - with both the same-parity and opposite-parity patching patterns displaying the same exponential curve. However, in PAA models, the patching patterns for same- and opposite-parities differ drastically. When parities are the same, only the parity complement must be computed to infer the final state; the patching pattern in this case indicates that the parity complement is computed in an associative manner. When the parities are different, the patching signature has a component that resembles a parallel patching signature, which is where the parity is computed. Restoring prefixes of layers before the parity is computed results in the entire prediction being of the correct parity, while restoring prefixes of layers after that results in the entire prediction being of the incorrect parity. We see that parities are computed roughly in parallel at early layers (around layers 3-5). Note that there is a middle region where restoring the prefixes shifts the logits towards the correct prediction, but not $100\%$ : when prefixes in these regions are restored, the LM does not know the parity of the final answer, but does know some aspects of the parity complement, which was computed in an associative manner. + +![](images/6d0c20a46f962edf526589671c292521016d9417d309311022e3a333265de64a.jpg) +A +Prefix Substitution Patching (Same Parity) + +![](images/a2a2d1af298d06e95d46e93d666dd0aa73f8fcc6afe43e68a1b6ea259a52667e.jpg) +B +Prefix Substitution Patching (Opposite Parity) + +![](images/70b7b343c85e88336c3ae9f1a52295d01c3291f3298ca8ebbb9782d0b4d44e4c.jpg) +C +Suffix Deletion Patching + +![](images/f420d909344222a1951300d283d7a4e1cecde302dfa06cd2be4152960dc2d85b.jpg) +D +Window Deletion Patching + +![](images/4b446c116c3c9794d942ac7fdf89c9c1c3b848fbfa878de7625099590145a137.jpg) +Normalized Logit Difference +Figure 8. Activation patching results across different types of localization (prefix, suffix, window patching) and different types of patching content (substitution, deletion). (A): Prefix-substitution results on only sequences with the same parity. We see the same exponential patching pattern in both AA and PAA models, showing that parity complements are computed in the same associative manner. (B): Prefix-substitution results on only sequences with opposite parities. We see the exponential patching pattern in AA models, meaning that in AA models, parities are computed with the state. In PAA models, however, the patching pattern is roughly parallel, meaning parities are computed roughly in parallel in early layers. (C): Suffix-deletion results show that we can ignore progressively longer sequences of suffixes as we go down the layers of the network, consistent with how we believe AA and PAA work. (D): Window-deletion results show that important activations are arranged hierarchically, again consistent with how we believe AA and PAA work. + +Increasingly longer suffixes are ignored for AA and PAA models in later layers In Figure 8C, we show suffix deletion patching results, finding that we can swap out exponentially longer both AA and PAA models without affecting the prediction. This is in line with how the associative algorithm in either model works: suffixes of progressively longer lengths are collected into the final token as we go down the layers. + +Important activations are arranged hierarchically In Figure 8D, we show window deletion patching results, with a window size of 1. We find a patching pattern consistent with the associative algorithm: deleting any single token in the early layers is extremely important, but the spacing of important tokens gets sparser as we go down the layers, consistent with the depiction of AA/PAA in Figure 1. At the bottom layers, deleting any single token is unimportant for the final computation of the state. + +Patching signatures are relatively consistent across examples In Figure 9, we plot the standard deviations across 200 pairs of S3 inputs for the following three sets of results: (A) prefix substitution patching of AA models, (B) prefix + +![](images/0f4d1bf62b13686e976a173a9c2cf7d60b0cf9bbaf46750f6fa21f7d03488202.jpg) +Figure 9. Standard deviations of the prefix substitution activation patching results across 200 S3 input pairs, for (A) AA models, (B) PAA models on pairs with the same parity, and (C) PAA models on pairs with opposite parity. We find generally low standard deviations across examples. + +substitution patching of PAA models (opposite parity inputs), (C) prefix substitution patching of PAA models (same parity inputs). We find relatively low standard deviations in all three cases, showing that these signatures hold across different examples. + +# C. Full Probing Results + +# C.1. Probing signatures are relatively consistent across examples + +We investigate the sensitivity of our probing signatures to the data on which the probe was trained. We focus on Pythia models trained on S3. For each model type (PAA vs. AA) and each probe type (parity vs. state probe), we train 10 different probes across 10 different random subsets of the S3 dataset, and report the standard deviations of their accuracies across the 10 runs. Results can be found in Table 1. We find low standard deviations (less than $10^{-3}$ ) in all four cases, indicating that our probe signatures are robust to different subsets of the data and to randomness in probe training. + +# C.2. Probe accuracies over sequence lengths + +How do the probe accuracies in Figure 3 decompose over sequence lengths? We sweep over $S_{3}$ sequences $a_{1}\ldots a_{i}$ of lengths ranging from $i = 5$ to 100, and train a linear probe that takes in input $h_{t,l}|a_1\ldots a_t$ —the layer- $l$ , position- $t$ representation of the model on input sequence $a_{1}\ldots a_{i}$ with $t < i$ —and aims to predict the final state $s_i$ from the hidden representation. + +The mean probability the probe put on the correct answer is plotted in Figure 10. We find that, generally speaking, both AA and PAA linearly encode states of exponentially longer sequences as they go down the layers. We find evidence that the PAA models use their intermediate layers to compute parity in parallel: at around the second residual layer, PAA models place $\frac{1}{3}$ probability on the correct answer (there are three actions of each parity in $S_{3}$ ). + +# C.3. Examples of Associative Algorithm Representations that Do or Do Not Linearly Encode Parity + +As shown in Figure 1, models that learn AA sometimes encode parity linearly at the final layer but sometimes do not. The examples shown in Figure 3 all do not linearly encode parity at the final layer. We show a 3D visualization of the $S_{3}$ AA model's final hidden representations along the three principal components of the representation (which explain $41.8\%$ of the variance in the data) in Figure 11. As we can see, parity is not linearly encoded at the final layer. In Figure 12, we show + +
LayerPythia on S3 (PAA)Pythia on S3 (AA)
State ProbeParity ProbeState ProbeParity Probe
04.16 × 10-63.03 × 10-66.33 × 10-62.71 × 10-6
13.36 × 10-63.31 × 10-62.62 × 10-62.82 × 10-6
24.52 × 10-65.45 × 10-61.46 × 10-68.97 × 10-7
34.31 × 10-55.59 × 10-45.00 × 10-61.38 × 10-6
41.58 × 10-53.72 × 10-54.16 × 10-61.11 × 10-6
51.70 × 10-55.38 × 10-61.97 × 10-61.11 × 10-6
61.87 × 10-57.02 × 10-64.73 × 10-61.59 × 10-6
71.29 × 10-51.34 × 10-57.79 × 10-63.05 × 10-6
83.18 × 10-53.08 × 10-51.18 × 10-52.64 × 10-6
92.96 × 10-46.85 × 10-52.36 × 10-53.53 × 10-6
103.10 × 10-47.98 × 10-52.60 × 10-52.96 × 10-6
111.86 × 10-48.22 × 10-58.83 × 10-62.77 × 10-6
127.05 × 10-54.01 × 10-51.20 × 10-62.75 × 10-6
+ +Table 1. Standard deviations across probe accuracies. We focus our analysis on S3 Pythia models and train 10 probes on different subsets of the S3 dataset. Standard deviations are tiny in all cases, indicating robust signatures. + +![](images/b75b8167ba32de941aebdc0df69eaaf5ee9ee774854072bbd35413edae4cfe33.jpg) + +![](images/b5d5656519c6df36be948193cac35a6728b400529f47933bd69153c8ecb56468.jpg) +Figure 10. We plot the average accuracy of a linear probe trained to predict the final state of an action sequence $A$ , given the corresponding final-token hidden representation of AA and PAA models on $A$ . We find that both types of models can handle longer sequence lengths as we go down the network, and that PAA models compute the parities of sequences at roughly layer 2, after which they can get the parity of the state correct but not the exact state. + +final-layer hidden representations from an AA model that does linearly encode the parity (from-scratch GPT2-base on $S_{3}$ ). When projected onto three components that explain $49.9\%$ of the variance in the data, we find a clear linear separation between the odd and even parity representations. + +# D. Full Linear Decomposition Results + +# D.1. $S_{3}$ + +We visualize the linear decomposition of the last-layer or penultimate-layer representations across various PAA models. We find the triangular prism shape similar to Figure 4 in all of them, but there was no consistency in which states were paired to form the clusters. + +One interpretation is that PAA models may be learning various presentations of $S_{3}$ , with each clustering configuration corresponding to a different presentation. Generally speaking, $S_{n}$ can be generated by a 2-cycle and an $n$ -cycle: any permutation of $S_{n}$ can be created by composing these two permutations. For example, $S_{3}$ can be generated by the 2-cycle $1 \leftrightarrow 2$ and 3-cycle $1 \rightarrow 2 \rightarrow 3 \rightarrow 1$ , which corresponds to the clustering $\{(123, 213), (312, 132), (231, 321)\}$ : the states + +![](images/30c8e3c8d2f630ec952e6a46a5f56d6bcdf6a71aa95a9c27216e0b7e6a7ef4c6.jpg) + +![](images/c7d4eab77e16f171173a09473d49849fcc2cd2e12f9357f2a67fc9476cd5fe7a.jpg) + +![](images/d946b702b944c37cd647ba5db9caf33449ee80b78784a1121e0f7a914b46aded.jpg) + +![](images/25bcfb413298ffa2fa9698a1c461c5e10e9ba693e0c1589b4100ad687ec234d1.jpg) +Figure 11. Example activations from an AA model that does not linearly encodes parity at the final layer, projected on three principal components with a total explained variance of $41.8\%$ . Blue points have even parity, while orange points have odd parity. +Figure 12. Example activations from an AA model that does linearly encode parity at the final layer. Blue points have even parity, while orange points have odd parity. (Left) State and state parity probe signatures of this model. (Right) projection of hidden representations onto three components with a total explained variance of $49.9\%$ . + +within the cluster can be transformed into each other by applying $1 \leftrightarrow 2$ , while states between clusters are related to each other by $1 \rightarrow 2 \rightarrow 3 \rightarrow 1$ . PAA models that cluster according to this pattern may have learned these generators. + +# D.2. $S_{5}$ + +What happens in models that learn PAA in $S_{5}$ ? We visualize the penultimate-layer representation of a Pythia-160M model that learned PAA on $S_{5}$ in 3D space, with parity along one axis and two orthogonal directions along the other two. We find 4 distinct clusters, corresponding to the position of 1 in the state (states having 1 in position 4 and 1 in position 5 are clustered together). + +# E. Simulating State Tracking in Natural Language + +To emulate a more practical scenario, we train pre-trained and from-scratch Pythia models on a version of the S3 permutation composition task expressed in natural language. For example, the permutation "132" would be expressed as "swap positions 2 and 3," while "312" would be "rotate the last item to the front." We train LLMs to predict the final state (e.g., 231) from the final period token of the sequence. For example, the following sequence: + +![](images/7dd554effc32ed87f097e2a6e6c8f37af4117328bb274a9312e2cc72af18d921.jpg) +Figure 13. Projecting models that learn PAA on $S_{5}$ into 3D space. Unlike PAA models on $S_{3}$ (Figure 4), the state cannot be fully represented by a clean decomposition into 3 directions (notice the colors superimposed on each other). However, we do still find symmetry across the parity axis, similar to $S_{3}$ . Moreover, there are 4 neat clusters, one at the center, and three outward protruding "prongs". We find that the clusters correspond to the position of 1 in the state. + +![](images/3c1c22e2acc3d6444cdfbbba09156bd6cc0d6a1b7bf922a4b1d1b3d133ead9f1.jpg) + +![](images/4d9fe6a3f982f80495876f70d53bc6b2470eda0ed876dc3a301aaf478b436aa7.jpg) + +![](images/a3d6eb92104017b5729980054fa062d65d107d1ed318e40e5b862b41b26e017f.jpg) + +Swap positions 2 and 3. Rotate the last item to the front. Swap positions 1 and 2. + +would map to permutation sequence "132, 312, 213" and finally correspond to the state "123" after the swaps. We then conduct a similar style of probing and activation patching experiments on models trained on this task. + +# E.1. Probing experiments + +We train probes to map from the activation of each layer at the position of the final “.” token to the final state. Shown in Figure 14, as in our results on synthetic data, probing results are consistent with associative mechanisms – the state probe improves exponentially over layers. In pre-trained Pythia, we see the model represent the state parity much earlier (in terms of layer) than the actual state representation, a signature of the PAA algorithm. For non-pre-trained Pythia, the accuracy of the state and state parity probes increases at a similar rate, indicating that it is more likely learning an associative algorithm; whether it is the strict AA algorithm we identified in the synthetic case is unclear. + +# E.2. Activation patching experiments + +We patch prefixes up to a fixed token position. As shown in Figure 14, both models display a distinctly associative signature with exponentially longer prefixes being disregarded for the final state prediction as depth increases. Furthermore, the pre-trained Pythia model possesses a light blue middle section – a sign of the PAA algorithm. Interestingly, the pre-trained Pythia results are significantly more “compressed” over the layers – the LLM computes the state very early on. We suspect this may be due to the pre-trained LLM taking advantage of its innate natural language understanding (and perhaps pre-trained state tracking abilities!) to quickly solve the task in an early layer. + +# F. Full Attention Heads Analysis + +# F.1. Formalizing Parity Heads + +To formalize a metric for whether an attention head behaves like a parity head, we define a parity head score as the percentage of sequence lengths (ranging from 5 to 80) over which the head places significantly more attention on odd-parity permutations than even-parity permutations, measuring significance using a $95\%$ confidence interval. + +Definition F.1. Let $\alpha_{i,\ell}^{(H)}(x)$ be the attention weight of the $H$ th attention head in layer $\ell$ at position $i$ for input $x$ where $x$ is the list of actions $[a_1\ldots a_t]$ . + +![](images/89b6dc0a9c97cc170adbe213806246c3ad453c94c82ff34cf12fe472faa7386c.jpg) +Pretrained Pythia-160M +Activation Patching + +![](images/6fa50a50089d737feb44d6537d98bfe09a352458664946888fb8b63762ca538f.jpg) +Probing + +![](images/f58d925f8f810181c13fe1cd2a8d6cc3be0ed4157a96a0e7f1fa77d152235553.jpg) +Non-pretrained Pythia-160M + +![](images/879a996541beecef75e43e8fd5c44df03ef2784aa177291dd009e7c63dbc1e37.jpg) +Figure 14. Patching and probing result for Pythia models trained on natural language permutation composition task. We plot the signature of a pre-trained Pythia model (top) and a non-pre-trained Pythia model (bottom). In both cases, the signatures are consistent with the state being learned associatively (both the patching signature and state probe have an exponential curve). The signature of the pre-trained model is consistent with a PAA signature, with the parity probe converging in early layers, and the activation patching signature containing a light-blue middle section. + +Define the sets of attention weights on odd and even tokens of $x$ as: + +$$ +\mathcal {A} _ {\ell , H, \text {o d d}} (x) = \left\{\alpha_ {i, \ell} ^ {H} (x): a _ {i} \text {i s o d d} \right\}, +$$ + +$$ +\mathcal {A} _ {\ell , H, \text {e v e n}} (x) = \left\{\alpha_ {i, \ell} ^ {H} (x): a _ {i} \text {i s e v e n} \right\}. +$$ + +We find heads that respond to parity can be local: for example, attention head 5 in layer 1 responds to odd-parity permutations in the midpoint of the sequence, while attention head 4 responds to ones late in the sequence. + +Thus, we record the parity head score $\sigma_{\ell ,H,\text{parity}}$ , which measures the proportion of the sequence for which more attention is placed on odd-parity actions compared to even-parity actions: + +$$ +\sigma_ {\ell , H, \text {p a r i t y}} = \frac {1}{L - 5} \cdot \sum_ {t = 5} ^ {L} \sigma_ {\ell , H, \text {p a r i t y}, t}, \quad \text {w h e r e} +$$ + +$$ +\sigma_ {\ell , H, \text {p a r i t y}, t} = 1 \left(\mathbb {E} \left[ \mathcal {A} _ {\ell , H, \text {o d d}} ([ a _ {1} \dots a _ {i} ]) \right] - 0. 9 5 \cdot \mathrm {C I} _ {\ell , H, \text {o d d}} ([ a _ {1} \dots a _ {i} ]) > \mathbb {E} \left[ \mathcal {A} _ {\ell , H, \text {e v e n}} ([ a _ {1} \dots a _ {i} ]) ]\right)\right). +$$ + +Here, $[a_1\ldots a_i]$ denotes the first $i$ elements of the sequence $x$ , and $\mathrm{CI}_{\ell ,H,\mathrm{odd}}$ refers to the confidence interval around the average attention weights on odd-parity tokens. We use sequence lengths of up to $L = 80$ for $S_{3}$ and $L = 50$ for $S_{5}$ . + +We find no evidence of parity heads in any layer of AA models. However, we find at least two attention heads with $\sigma$ significantly exceeding $50\%$ in the first few layers of PAA models, highlighted in Table 2. + +# F2. AA Attention Patterns + +What sorts of attention patterns appear in AA models? Because attention is dense, we visualize only the top-K attention traces from and to each position at each layer. Specifically, we plot the attentions of an LM on an input as a graph with: + +![](images/6f44c4bcf5632900290a19f42c5b98eedd3da3b21a3b729df700172661407837.jpg) +Figure 15. Examples of parity heads in a PAA model. We plot heatmaps showing attention weights on each source token at each target token location (we show up to only 60 source tokens for heads 4 and 5 for the sake of space). We draw arrows / yellow lines at source tokens corresponding to odd-parity actions. Note that parity heads attend almost exclusively to odd-parity tokens. + +![](images/53033be53c929d1556f76435a6db606a56b4a628922e43a9a652d5ac83858f07.jpg) + +![](images/7eb77cb5ce3074c1923e6acf3687887b9efb84ba6ce2aab6d0e1abe843fe09f8.jpg) + +
AlgorithmLayerHeadParity Head Score
S3(PAA)1190.1%±3.0%
1486.4%±8.2%
0567.1%±5.1%
S3(AA)043.3%±4.5%
273.0%±6.1%
1102.0%±4.0%
S5(PAA)3383.6%±9.6%
3280.6%±6.2%
2650.3%±22.4%
S5(AA)075.9%±8.2%
033.8%±5.4%
003.2%±4.3%
+ +Table 2. Top-3 parity head scores across all attention heads in each type of model. We report average parity head scores $(\%)$ over 100 examples, as well as their standard deviations. Informally, this metric captures the proportion of the sequence over which more attention is placed on odd-parity actions than even-parity actions. + +![](images/c3d5eef44eac7110112bb2642debfe5f3f115929eb43b5f168a378fe13dfa246.jpg) +Figure 16. Attention patterns in AA models form a tree-like pattern, with tokens in successive layers attending to larger windows of downstream tokens. This is in line with how we expect the associative algorithm to function. We plot only the most salient attention weights by pruning edges for which the attention weight is $< 0.95$ , the target token is not in the top-3 attended-to tokens from the source token, or the source token is not in the top-10 attended-from tokens for the target token. We expect that the attention patterns visualized here do not form a single clean tree, but the superimposition of multiple trees. + +1. Nodes $(t,l)$ for each token position $t$ and layer $l$ , +2. Edges between two nodes $(t_1, l - 1)$ and $(t_2, l)$ if position $t_2$ at layer $l$ attends to position $t$ at layer $l - 1$ . We define "atends to" as follows: + +Let $\alpha_{t_1\to t_2}^{(l)}$ denote the maximum attention weight (across all attention heads at layer $l$ ) from position $t_1$ at layer $l - 1$ to position $t_2$ at layer $l$ . + +We say $(t_2, l)$ attends to $(t_1, l - 1)$ if all of the following conditions are met: + +(a) $\alpha_{t_1\to t_2}^{(l)} > 0.95$ +(b) $\alpha_{t_1\to t_2}^{(l)}\in \mathrm{top - 3}(\{\alpha_{i\to t_2}^{(l)}:i\in [1,n]\})$ .. $t_1$ is among the top-3 attended-to tokens for $t_2$ at layer $l$ +(c) $\alpha_{t_1\to t_2}^{(l)}\in \mathrm{top - }10(\{\alpha_{t_1\to j}^{(l)}:k\in [1,n]\})$ .. $t_2$ is among the top-10 attended-from tokens for $t_1$ at layer $l - 1$ + +We show example attention patterns for an AA model on three sample prompts in Figure 16. We only plot the attention subgraph directly connected to the final token position at the final layer (which is used to predict the state). We find that attention in AA models forms a tree-like pattern where successive layers attend to wider and wider context windows, with nodes that are more and more spaced apart. This is in line with how we believe the associative algorithm works: adjacent pairs of actions are grouped together at each layer in a hierarchical manner. + +Note that the tree is not entirely clean: there are redundant edges and edges that cross over each other. We suspect that the subgraph we've picked up on is not a single tree, but rather the superimposition of multiple trees, each potentially contributing to not just the prediction for the final token, but also the predictions of the previous tokens. + +# G. How are these algorithms learned over the course of training? + +We conduct a more detailed analysis of the training phases for two Pythia models trained on the $S_{5}$ task: one that learned AA and one that learned PAA. The training curves are shown in Figure 6, and we investigate the generalization behavior at different points along these curves. Both models improve over training by progressively generalizing to longer sequence lengths, rather than making uniform gains across all lengths. In the case of the PAA model, convergence appears to occur in two distinct phases: first, the model learns the parity of states across the entire length-100 sequence, followed by learning how to predict the state. By contrast, the AA model learns to generalize parity and state simultaneously. + +# H. Additional Factors Influencing Learned Algorithm + +# H.1. Model Size + +We have investigated whether model size influences which algorithm the models learn to implement. As shown in Figure 17, model size empirically does not seem to have much effect on the choice of learned algorithm, with model architecture and initialization having a much bigger effect. Some notable differences between the GPT-2 and Pythia architecture are the use of rotary embeddings, parallelized attention, and feedforward layers rather than sequential, and untied embedding and unembedding. + +# H.2. Topic Modeling + +The topic model used in Section 5.3 is parameterized as follows: We generate the distribution of the 4 topics in each document using a random Dirichlet distribution with $\alpha = 0.3$ . The distribution $p(\text{token} \mid \text{topic})$ for each token 123, 132, 213, 231, 312, 321 is: + +$$ +\left[ \begin{array}{l l l l l l} 3. 0 6 \cdot 1 0 ^ {- 2}, & 1. 1 1 \cdot 1 0 ^ {- 1}, & 5. 7 9 \cdot 1 0 ^ {- 4}, & 6. 4 5 \cdot 1 0 ^ {- 3}, & 6. 5 8 \cdot 1 0 ^ {- 3}, & 8. 4 5 \cdot 1 0 ^ {- 1} \\ 3. 3 6 \cdot 1 0 ^ {- 1}, & 1. 6 9 \cdot 1 0 ^ {- 4}, & 6. 6 3 \cdot 1 0 ^ {- 1}, & 8. 0 5 \cdot 1 0 ^ {- 7}, & 1. 6 8 \cdot 1 0 ^ {- 7}, & 7. 8 1 \cdot 1 0 ^ {- 4} \\ 7. 9 2 \cdot 1 0 ^ {- 5}, & 1. 4 1 \cdot 1 0 ^ {- 2}, & 9. 4 4 \cdot 1 0 ^ {- 1}, & 4. 5 3 \cdot 1 0 ^ {- 4}, & 4. 1 3 \cdot 1 0 ^ {- 2}, & 3. 2 7 \cdot 1 0 ^ {- 1 1} \\ 2. 8 5 \cdot 1 0 ^ {- 3}, & 1. 2 9 \cdot 1 0 ^ {- 9}, & 7. 0 6 \cdot 1 0 ^ {- 1}, & 6. 3 7 \cdot 1 0 ^ {- 7}, & 2. 5 8 \cdot 1 0 ^ {- 3}, & 2. 8 9 \cdot 1 0 ^ {- 1} \end{array} \right] +$$ + +We also trained LMs using a topic model with a second token-topic distribution, aiming to distinguish the effect of this particular topic distribution from the effect of topic modeling pretraining in general. On the second distribution, we also find that both randomly initialized GPT-2 and Pythia models learn AA in Figure 18. The $p(\text{token} \mid \text{topic})$ distribution for this model is listed below: + +$$ +\left[ \begin{array}{c c c c c c} 9. 3 1 \cdot 1 0 ^ {- 1} & 2. 3 2 \cdot 1 0 ^ {- 3} & 1. 3 8 \cdot 1 0 ^ {- 8} & 5. 8 6 \cdot 1 0 ^ {- 1 0} & 4. 6 2 \cdot 1 0 ^ {- 5} & 6. 6 3 \cdot 1 0 ^ {- 2} \\ 2. 1 0 \cdot 1 0 ^ {- 4} & 3. 1 2 \cdot 1 0 ^ {- 4} & 9. 3 2 \cdot 1 0 ^ {- 7} & 9. 0 7 \cdot 1 0 ^ {- 6} & 2. 5 3 \cdot 1 0 ^ {- 1} & 7. 4 7 \cdot 1 0 ^ {- 1} \\ 4. 9 5 \cdot 1 0 ^ {- 1} & 1. 1 8 \cdot 1 0 ^ {- 3} & 4. 5 5 \cdot 1 0 ^ {- 1} & 2. 1 7 \cdot 1 0 ^ {- 2} & 1. 8 6 \cdot 1 0 ^ {- 8} & 2. 7 1 \cdot 1 0 ^ {- 2} \\ 6. 5 5 \cdot 1 0 ^ {- 1} & 4. 9 2 \cdot 1 0 ^ {- 4} & 3. 4 4 \cdot 1 0 ^ {- 1} & 2. 2 8 \cdot 1 0 ^ {- 7} & 1. 9 4 \cdot 1 0 ^ {- 4} & 2. 1 4 \cdot 1 0 ^ {- 8} \end{array} \right] +$$ + +![](images/4f37ab1d9a90fe5aeb98ebe39952d97cfae30c77820b5e9c80a4227cfb49ce39.jpg) + +![](images/25f0affd820d065a8a007f1bb06efe0d69c1c51e7cc2282d35782a27df568ace.jpg) + +![](images/3ab2a94abd9ff247daf2a327fb177b6b07ff8d472cdaac01627fe55190ca140e.jpg) +Figure 17. Proportion of $S_{3}$ algorithms learned by models of various sizes from the GPT-2 and Pythia families. Model architecture and initialization are much bigger factors in influencing the algorithms learned than model size. + +![](images/0e5dd29faea405439b4b717dc5525eb9d0bd3935c72987f02dae417c1badeba3.jpg) + +# H.3. Parity Loss Curriculum + +We explored an additional procedure that encourages models to learn parity via an extra loss term. We train an extra linear classifier that takes in the residual activations of an early layer (e.g., layer 3) in which we find parity to be typically computed through probing. We train with this additional loss term to induce the representation to linearly encode parity early on. The classifier is trained to output (1) parity or (2) a (parity, action) tuple, to ensure that the residual also encodes the original action, and not just the parity. After training, we evaluate the model on the original $S_{3}$ task. Both procedures induce the model to learn PAA consistently, though the (parity, action) classifier typically allows the model to generalize better. + +# H.4. Length Curriculum + +We implemented a curriculum training approach where the model was progressively exposed to documents of increasing length. We first trained on only the initial 10 tokens, then expanded to 25 tokens, 50 tokens, and finally the complete 100-token sequences. Each stage of the curriculum was trained for a fixed number of epochs (data). The goal of such a curriculum is to push the model to learn the associative algorithm (AA), as the parity heuristic, we hypothesize, might be less useful for shorter sequences. However, empirically, such a curriculum has no obvious effect on the kind of algorithm the model learns. Of the 5 trials, 2 trials of GPT-2 learn AA, and the other 3 trials learn PAA. + +We discovered that all five models can perfectly generalize both parity and state when trained on the first 25 tokens. It is only when trained to generalize to sequence length 50 that the distinction between PAA and AA emerges. Models learning the PAA algorithm do not generalize, while models learning AA can generalize from length 25 to 50, as illustrated by Figure 19. This further confirms our finding that the model learns the $S_{3}$ algorithm early on. + +![](images/a1c534b0030f433c99ef0f18701e986a406f5ddc0687afb087f19fa785347c2c.jpg) +Figure 18. Proportion of $S_{3}$ algorithms learned by models first pre-trained on the two topic models compared to the randomly initialized baselines. Topic modeling, regardless of the specific distributions, pushes the model to learn AA. + +![](images/83deee6bed943cf6af9dc5d68e9cedcf685c43e1a3cc5021a11cf49166d003f4.jpg) + +![](images/6f887cbb08884cb5e0b034718facf84fda8ce03070d02f531615b9c3ec3df3d6.jpg) + +![](images/3b52388df7c5c595a0883849e7e96a85a92712b505f22226ae447a177dfbaa2a.jpg) + +![](images/1c913d0780138d3d2222930378f0d595bb3040bb0a7fc90156e1f8bbded6c362.jpg) + +![](images/f2b52eca8b6975a2856e1d0ce6dedfc2aeb7a9f9b52ca99ceaa1fb42edb72d42.jpg) + +![](images/e92f7d41350441092b04384a75af7a4dd5b4e1080fad0396dfcde6e24ef64340.jpg) +Figure 19. Model generalization curves when trained using a length curriculum after training on 10, 25, 50, and 100 tokens, respectively. While the length curriculum doesn't push the model to learn one algorithm or the other, it shows that the model learns these algorithms early on, as indicated by whether the model can generalize well from training on 25 tokens to 50 tokens. + +![](images/db70875e9a77c6634098064d435424b00efb9431a6092989315d7d98e67ddda2.jpg) + +![](images/f3ad4f6824e57d754427b85f9c6ed83586164354c80f9339d0f08e0586730691.jpg) + +![](images/82361238145aaab9edfc0568642d551d9e1e54efc1078635eae4b281efa812ca.jpg) \ No newline at end of file diff --git a/howdolanguagemodelstrackstate/images.zip b/howdolanguagemodelstrackstate/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4ec0949a61970c23194ded285e3a386c748b9e3d --- /dev/null +++ b/howdolanguagemodelstrackstate/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f6fb62a178598ff59bbe6451e22eafe9e57690375a4a3241d3fbc80a3e95ad4 +size 2105023 diff --git a/howdolanguagemodelstrackstate/layout.json b/howdolanguagemodelstrackstate/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8e17b4441d3e41831d61ec47622aeef1ad1b80df --- /dev/null +++ b/howdolanguagemodelstrackstate/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5c34708d8e432448ccb4b5985ce93509d1c44c94c5e2085cd5490cdb5e7a64a +size 821759 diff --git a/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/5fbb46ea-2214-4236-ba77-8c515feb1cc3_content_list.json b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/5fbb46ea-2214-4236-ba77-8c515feb1cc3_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b5c0e7d2adf512f9364866f5313a2a9c4df8ad0c --- /dev/null +++ b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/5fbb46ea-2214-4236-ba77-8c515feb1cc3_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:770bbc19cd031240c0e4f921c1fab8370a68264a089bdf05bc4aa9a2a2ae3c88 +size 183600 diff --git a/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/5fbb46ea-2214-4236-ba77-8c515feb1cc3_model.json b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/5fbb46ea-2214-4236-ba77-8c515feb1cc3_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ea28d27e0e1111354759d8998462eefcf6fe0072 --- /dev/null +++ b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/5fbb46ea-2214-4236-ba77-8c515feb1cc3_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ee97ec38d827fcd0015134c59a078ba410596a2fb3c3b7885795bbf7842df67 +size 222689 diff --git a/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/5fbb46ea-2214-4236-ba77-8c515feb1cc3_origin.pdf b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/5fbb46ea-2214-4236-ba77-8c515feb1cc3_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1941ea9af0bfdf3b47aae8f98515de0e2915ffe3 --- /dev/null +++ b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/5fbb46ea-2214-4236-ba77-8c515feb1cc3_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4715630e9e447c14806af38a22389ead1959f976e1ab1274e7063cc977673cb1 +size 1341609 diff --git a/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/full.md b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b6360280085394274178a32658ef14bd8e151cc4 --- /dev/null +++ b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/full.md @@ -0,0 +1,701 @@ +# $K^2$ VAE: A Koopman-Kalman Enhanced Variational AutoEncoder for Probabilistic Time Series Forecasting + +Xingjian Wu $^{*1}$ Xiangfei Qiu $^{*1}$ Hongfan Gao $^{1}$ Jilin Hu $^{1}$ Bin Yang $^{1}$ Chenjuan Guo $^{1}$ + +# Abstract + +Probabilistic Time Series Forecasting (PTSF) plays a crucial role in decision-making across various fields, including economics, energy, and transportation. Most existing methods excel at short-term forecasting, while overlooking the hurdles of Long-term Probabilistic Time Series Forecasting (LPTSF). As the forecast horizon extends, the inherent nonlinear dynamics have a significant adverse effect on prediction accuracy, and make generative models inefficient by increasing the cost of each iteration. To overcome these limitations, we introduce $K^2$ VAE, an efficient VAE-based generative model that leverages a KoopmanNet to transform nonlinear time series into a linear dynamical system, and devises a KalmanNet to refine predictions and model uncertainty in such linear system, which reduces error accumulation in long-term forecasting. Extensive experiments demonstrate that $K^2$ VAE outperforms state-of-the-art methods in both short- and long-term PTSF, providing a more efficient and accurate solution. + +# 1. Introduction + +In recent years, time series analysis has seen remarkable progress, with key tasks such as anomaly detection (Wang et al., 2023; Liu & Paparrizos, 2024; Miao et al., 2025; Hu et al., 2024; Wu et al., 2025c), classification (Yao et al., 2024; Campos et al., 2023), and imputation (Gao et al., 2025; Wang et al., 2024a;c; Yu et al., 2025a), among others (Wang et al., 2024b; Miao et al., 2024a; Liu et al., 2025a; Huang et al., 2023; Yao et al., 2023), gaining attention. Among these, Probabilistic Time Series Forecasting (PTSF) is a crucial and widely studied task. By quantifying the stochastic temporal evolutions of multiple continuous variables, it + +*Equal contribution ${}^{1}$ School of Data Science and Engineering, East China Normal University,Shanghai,China. Correspondence to: Bin Yang . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/e135af47838922e6f274a1d5cc82ef40463e54811013c58c482dd261d6a72dbb.jpg) +Figure 1. We compare three native probabilistic forecasting models including GRU MAF, TimeGrad, and CSDI with three point forecasting models equipped with distributional heads including FITS, PatchTST, and iTransformer on ETTh1. Longer forecasting horizons lead to rapid collapse of the CRPS metric (lower is better) on probabilistic forecasting models, even worse than point forecasting models. + +provides significant support for decision-making in various fields such as economics (Sezer et al., 2020; Huang et al., 2022b), traffic (Wu et al., 2024b; 2025d; Pan et al., 2023a; Cirstea et al., 2022b; Fang et al., 2021; Yang et al., 2021; 2022), energy (Wang et al., 2024d; Guo et al., 2015; Sun et al., 2022), and AIOps (Lin et al., 2024a; Campos et al., 2022; Chen et al., 2023; Pan et al., 2023c; Lin et al., 2025). In these practical applications, an urgent need is to extend the prediction time to the distant future, known as Long-term Probabilistic Time Series Forecasting (LPTSF), which is highly meaningful for long-term planning and early warning. Most existing methods excel at short-term problem settings, such as predicting up to 48 steps or fewer (Rasul et al., 2021a; Kollovieh et al., 2023; Rasul et al., 2021b), while directly applying these methods to long-term forecasting tasks often results in poor performance—see Figure 1. + +However, probabilistic forecasting faces numerous challenges in long-term forecasting tasks. First, the inherent nonlinearity of time series challenges probabilistic models in modeling dynamic evolution. Due to factors such as non-stationarity and complex interdependencies between + +variables, time series typically exhibit nonlinear characteristics, complicating the construction of probabilistic models. Specifically, the nonlinearity makes it difficult for these models to derive a simple equation that precisely describes the state transition process. As a result, the uncertainties within the models are also hard to quantify, particularly in long-term forecasting tasks. Second, as the forecasting horizon extends, the accuracy and efficiency become major bottlenecks. Longer forecasting horizons lead to more intricate target distributions, which causes remarkable error accumulation. It also makes the diffusion-based (Kollovieh et al., 2023; Rasul et al., 2021a) or flow-based models (Rasul et al., 2021b) difficult to find a clear probabilistic transition path and inefficient to perform each iteration, which results in more computational consumption but worse performance. + +Since the nonlinearity in time series leads to the dynamic evolution of complex patterns, probabilistic models struggle to effectively capture these changes and accurately model their evolution. To tackle this thorny issue, Koopman Theory (Koopman, 1931) provides a linearization approach to transform the nonlinear time series into the space of measurement function, which is a theoretically infinite-dimensional space characterizing all measurements of the dynamical system at each moment, and the transition process of these measurements can be captured by a linear Koopman Operator (Lan & Mezić, 2013). On the other hand, in order to accurately and efficiently model the process uncertainty and mitigate the error accumulation phenomenon in long-term forecasting, the Kalman Filter (Welch, 1995) provides a solution, which fuses observations from multiple sensors to extract the Kalman gains, to refine the prediction and process uncertainty. This inspires us to transform the probabilistic time series forecasting into modeling the process uncertainty of a linear dynamical system in the space of the measurement function. + +In this study, we propose $K^2$ VAE, a generative probabilistic forecasting model tailored for LPTSF—see Figure 2. First, to handle the nonlinearity and capture the underlying dynamics in time series, we patchify the time series into tokens and model them through the KoopmanNet. The KoopmanNet provides a way to simulate the Koopman Theory, which transforms the nonlinear time series into latent measurements, and fit the Koopman Operator to construct a "biased" linear dynamical system easy to describe and model. Second, to achieve accurate long-term forecasting performance, we design a KalmanNet in a data-driven manner based on the principle of Kalman Filter. Through integrating the residual nonlinear information as control inputs, while treating the biased linear dynamical system as the observation, the KalmanNet predicts and updates to model and refine the uncertainty with Kalman gain. This effectively mitigates the error accumulation of the linear system and helps construct the variational distribution in the space of the measurement + +function with clear semantics. Compared to diffusion-based models or flow-based models with longer generation processes, which cause more computational consumption and memory overhead, $K^2$ VAE adopts a VAE-based structure composed of lightweight but effective KoopmanNet and KalmanNet, which contributes to fast one-step generation and lower memory occupation. The contributions are summarized as follows: + +- To address PTSF, we propose an efficient framework called $K^2$ VAE. It transforms nonlinear time series into a linear dynamical system. Through predicting and refining the process uncertainty of the system, $K^2$ VAE demonstrates strong generative capability and excells in both the short- and long-term probabilistic forecasting. +- To distangle the complex nonlinearity in the time series, we design a KoopmanNet to fully exploit the underlying linear dynamical characteristics in the space of measurement function, simplify the modeling, and thus contributing to high model efficiency. +- To mitigate the error accumulation in LPTSF, we devise a KalmanNet to model, and refine the prediction and uncertainty iteratively. +- Comprehensive experiments on both short- and long-term PTSF show that $K^2$ VAE outperforms state-of-the-art baselines. Additionally, all datasets and code are available at https://github.com/decisionintelligence/K2VAE. + +# 2. Preliminaries + +Koopman Theory. Koopman Theory (Koopman, 1931; Lan & Mezić, 2013) is a widely used mathematical tool for dynamic system analysis, providing a way to linearize the nonlinear systems. For nonlinear system $x_{k + 1} = f(x_k)$ , where $x_{k}$ denotes system state and $f$ is a nonlinear function, it assumes that the system's state can be mapped into the space of measurement function $\psi$ , where it can be modeled by an infinite-dimensional linear Koopman Operator $\mathcal{K}$ : + +$$ +\psi \left(x _ {k + 1}\right) = \psi \left(f \left(x _ {k}\right)\right) = \mathcal {K} \circ \psi \left(x _ {k}\right) \tag {1} +$$ + +Koopman Theory helps understand the underlying dynamics of complex nonlinear systems and serves as a powerful tool to linearize them for ease of process. + +Kalman Filter. Kalman Filter (Welch, 1995; Simon, 2001) is a recursive algorithm used for estimating the state of a linear dynamic system. It works in two steps: first, it predicts the current state $x_{k}$ and uncertainty covariance matrix $\mathbf{P}_k$ based on the system's state transition equation; then, it updates the estimation by incorporating the difference between the measurement and prediction, known as Kalman gain $K_{k}$ . The Kalman Filter effectively fuses information + +![](images/f6225fe32aa00943622693305aac8d3e76e194a65a5d3569a59c4badc7c1ec63.jpg) +Figure 2. The data flow of $K^2$ VAE. It models time series through the KoopmanNet, which constructs a biased linear system. Then the linear system is refined through the KalmanNet while the uncertainty is modeled. Finally, the target distributions over the horizon are predicted through the Decoder. + +from multiple sensors to enhance estimation accuracy while modeling the uncertainty of the system. + +VAE for Probabilistic Time Series Forecasting. PTSF can be treated as a conditional generative task, i.e., generating forecasting horizon $\hat{Y} = [\hat{x}_{T + 1},\hat{x}_{T + 2},\dots ,\hat{x}_L]\in \mathbb{R}^{N\times L}$ given context series $X = [x_{1},x_{2},\dots ,x_{T}]\in \mathbb{R}^{N\times T}$ , where $N$ denotes the number of variables, $T$ denotes the context length, and $L$ denotes the forecasting horizon. The objective is to model the conditional distribution $\mathbb{P}(Y|X)$ and sample from it to obtain $\hat{Y}$ . When using Variational AutoEncoder (Higgins et al., 2017; Pu et al., 2016), the log-likelihood objective is optimized through the Evidence Lower Bound (2) which is obtained by Jensen Inequality: + +$$ +\begin{array}{l} \mathcal {L} _ {E L B O} = \\ - \mathbb {E} [ \log \mathbb {P} (Y | Z, X) ] + D _ {K L} (\mathbb {Q} (Z | X) | | \mathbb {P} (Z | X)) \tag {2} \\ \end{array} +$$ + +In our proposed $K^2\mathrm{VAE}$ , we meticulously construct the variational distribution $\mathbb{Q}(Z|X)$ , aligning it with the uncertainty of the dynamical system. This endows the latent space in $K^2\mathrm{VAE}$ with clear semantics, enhancing its generative capabilities in PTSF. + +# 3. Methodology + +# 3.1. $K^2$ VAE Architecture + +As demonstrated in Figure 3, $K^2$ VAE consists of four main components: Input Token Embedding, KoopmanNet, KalmanNet, and Decoder. The KoopmanNet and KalmanNet constitute the Encoder of $K^2$ VAE. To facilitate comprehension, we present the Data Flow-see Figure 2. + +Overall, $K^2$ VAE employs a meticulously designed pipeline to model the time series at the perspective of dynamic system. First, the Input Token Embedding module patchifys the time series into tokens. Then the KoopmanNet projects them into the space of measurement function, where the inherent nonlinearity and intricate joint distribution between variables are reconsidered for ease. Sequentially, the Koopman Operator is fitted and iterates over the first token to delineate a linear system. Obviously, the perfect measurement function which constructs an absolute linear system is the ideal + +objective, which means the series generated by the Koopman Operator is biased. We then design the KalmanNet to refine such biased linear system and model the uncertainty by outputting the covariance matrix of multi-dimensional state vector, which assigns the variational posterior distribution $\mathbb{Q}(Z|X)$ in the space of measurement function with clear semantics. The Decoder works as the inverse measurement function $\psi^{-1}$ to map the samples from $\mathbb{Q}(Z|X)$ to the original space, which also serves as the decoder of VAE and models the target distribution $\mathbb{P}(Y|Z,X)$ of the forecasting horizon. + +# 3.1.1. INPUTTOKEN EMBEDDING + +Since Triformer (Cirstea et al., 2022a) first proposes the Patching technique, existing works (Nie et al., 2023; Wu et al., 2025c) demonstrate that considering a patch as the "token" retains most semantic information and helps establish meaningful state transition procedure for autoregressive models. Our proposed $K^2 \mathrm{VAE}$ also works like an autoregressive dynamic system to model the state transition procedure. Different from those Channel-Independent models which divides patches for each channel and projects them independently, we consider multivariate patches as tokens to implicitly model the cross-variable interaction during state transition. We divide the context series $X = [x_{1}, x_{2}, \dots, x_{T}] \in \mathbb{R}^{N \times T}$ into non-overlapping patches: + +$$ +X ^ {P} = \left[ x _ {1} ^ {P}, x _ {2} ^ {P}, \dots , x _ {n} ^ {P} \right] \in \mathbb {R} ^ {N \times s \times n}, \tag {3} +$$ + +where $s = T / n$ denotes the patch size, $n$ denotes the patch number, and $x_{i}^{P} \in \mathbb{R}^{N \times s}$ denotes a patch. Then $X^{P}$ are embedded into high-dimensional hidden space: + +$$ +X ^ {P ^ {\prime}} = \operatorname {P r o j e c t i o n} (\text {F l a t t e n} (X ^ {P})), \tag {4} +$$ + +where patches are first flattened into $\mathbb{R}^{(N\times s)\times n}$ and then mapped into embeddings $X^{P^{\prime}}\in \mathbb{R}^{d\times n}$ through a linear projection to fuse the variable information. + +# 3.1.2. $K^2$ VAE ENCODER + +Linearizing with the KoopmanNet. Since there exists variable-wise periodic misalignment or temporal nonstationarity in realistic multivariate time series, yielding + +![](images/bdf1ae33b62a1275b86303e408029965417e82dd5e653f4db58a3070380b2f30.jpg) +Figure 3. The architecture of $K^2$ VAE. Input Token Embedding Module patchifys the time series into tokens and applies Embedding. Encoder Module consists of KoopmanNet and KalmanNet, transforming the tokens into linear system in the space of measurement function, refining it and modeling the process uncertainty as the variational distribution. After resampling from the variational distribution, Decoder module constructs the likelihood distribution about the forecasting horizon. + +non-linearity, $K^2$ VAE applies Koopman Theory (Koopman, 1931) to construct the measurement function to project the system states into measurements which can be modeled as a linear system. Practically, we use a learnable MLP-based network to serve as the measurement function $\psi$ : + +$$ +X ^ {P ^ {*}} = \psi (X ^ {P ^ {\prime}}) = \left[ x _ {1} ^ {P ^ {*}}, x _ {2} ^ {P ^ {*}}, \dots , x _ {n} ^ {P ^ {*}} \right], \qquad (5) +$$ + +where $X^{P^*} \in \mathbb{R}^{d \times n}$ denotes the projected tokens in the measurement space. To capture the transition rule, we utilize the one-step eDMD (Schmid, 2010; Liu et al., 2023) over $X^{P^*}$ to efficiently find the best fitted $\mathcal{K}_{loc}$ : + +$$ +X _ {b a c k} ^ {P ^ {*}} = \left[ x _ {1} ^ {P ^ {*}}, x _ {2} ^ {P ^ {*}}, \dots , x _ {n - 1} ^ {P ^ {*}} \right], \tag {6} +$$ + +$$ +X _ {f o r e} ^ {P ^ {*}} = \left[ x _ {2} ^ {P ^ {*}}, x _ {3} ^ {P ^ {*}}, \dots , x _ {n} ^ {P ^ {*}} \right], \tag {7} +$$ + +$$ +\mathcal {K} _ {l o c} = X _ {f o r e} ^ {P ^ {*}} \left(X _ {b a c k} ^ {P ^ {*}}\right) ^ {\dagger}, \tag {8} +$$ + +where $(X_{\text{back}}^{P^*})^\dagger$ denotes the Moore-Penrose inverse of $X_{\text{back}}^{P^*}$ . $\mathcal{K}_{\text{loc}}$ effectively captures the local transition rule in the space of current measurement function. However, when $\psi$ is underfitted, the low quality of the space may cause numerical instability or guide the model to converge in a wrong direction. To mitigate this issue and capture the global-shared dynamics, we introduce a learnable part $\mathcal{K}_{\text{glo}}$ . Then we delineate the system through the Koopman Operator $\mathcal{K} = \mathcal{K}_{\text{loc}} + \mathcal{K}_{\text{glo}}$ : + +$$ +\hat {X} ^ {C} = \left[ \hat {x} _ {1} ^ {C}, \hat {x} _ {2} ^ {C}, \dots , \hat {x} _ {n} ^ {C} \right], \tag {9} +$$ + +$$ +\hat {X} ^ {H} = \left[ \hat {x} _ {1} ^ {H}, \hat {x} _ {2} ^ {H}, \dots , \hat {x} _ {m} ^ {H} \right], \tag {10} +$$ + +$$ +\hat {x} _ {i} ^ {C} = \left(\mathcal {K}\right) ^ {i - 1} x _ {1} ^ {P ^ {*}}, \hat {x} _ {i} ^ {H} = \left(\mathcal {K}\right) ^ {i + n - 1} x _ {1} ^ {P ^ {*}}, \tag {11} +$$ + +where $\hat{X}^C\in \mathbb{R}^{d\times n}$ denotes the reconstruction context generated by Koopman Operator $\kappa \in \mathbb{R}^{d\times d}$ and $\hat{X}^H\in \mathbb{R}^{d\times m}$ is the predicted horizon, $m = L / s$ means that predicting $L$ steps in the original space is equivalent to predicting $m$ steps in the space of measurement function. + +Modeling the Uncertainty with the KalmanNet. Since we adopt a data-driven paradigm to model the measurement function $\psi$ and Koopman Operator $\mathcal{K}$ , it exists bias between the generated $\hat{X}^C$ and $X^{P^*}$ during optimization, known as a biased linear system. Inspired by Kalman Filter (Welch, 1995; Simon, 2001) which is born to refine such biased linear sytem, we devise a KalmanNet to model and refine the uncertainty adaptively, aligning it with the variational distribution $\mathbb{Q}(Z|X)$ in the latent measurement space. Specifically, we first fully reuse the nonlinear residual through the Integrator based on an Encoder-Only Vanilla Transformer (Vaswani et al., 2017): + +$$ +X ^ {R e s} = X ^ {P ^ {*}} - \hat {X} ^ {C}, \tag {12} +$$ + +$$ +U = \operatorname {I n t e g r a t o r} \left(X ^ {R e s}\right) = \left[ u _ {1}, u _ {2}, \dots , u _ {m} \right], \tag {13} +$$ + +where $U \in \mathbb{R}^{d \times m}$ denotes the output integrated by the Integrator. We then construct the Process Model of KalmanNet, which describes the state transition process: + +$$ +z _ {k} = A z _ {k - 1} + B u _ {k} + w _ {k}, \tag {14} +$$ + +$$ +z _ {0} = x _ {n} ^ {P ^ {*}}, \tag {15} +$$ + +where $A \in \mathbb{R}^{d \times d}$ is the state transition matrix, $B \in \mathbb{R}^{d \times d}$ is the control input matrix, and $w_{k} \sim \mathcal{N}(\mathbf{0}, Q)$ is the process noise and $Q$ is its covariance matrix. Sequentially, we construct the Observation Model: + +$$ +o _ {k} = H z _ {k} + v _ {k}, \tag {16} +$$ + +where $H \in \mathbb{R}^{d \times d}$ is the observation matrix and we treat the prediction $\hat{X}^H$ as the prior observation in Update Step (20). $v_k \sim \mathcal{N}(\mathbf{0}, R)$ is the observation noise and $R$ is its covariance matrix. Our goal is to reuse the information from the nonlinear residual, and integrate it into the linear system constructed by KoopmanNet, thus obtaining a more accurate linear system and modeling the uncertainty. In the KalmanNet, all the matrices are learnable. Additionally, we + +initialize the covariance matrices $Q$ and $R$ as identity matrices and use lower triangular matrices $L_{Q}$ and $L_{R}$ to keep the positive definiteness: $Q = L_{Q}L_{Q}^{T}$ and $R = L_{R}L_{R}^{T}$ . + +Then we conduct the Prediction Step and Update Step iteratively, the Prediction Step can be formulated as: + +$$ +\hat {z} _ {k} = A z _ {k - 1} + B u _ {k}, \tag {17} +$$ + +$$ +\hat {\mathrm {P}} _ {k} = A \mathrm {P} _ {k - 1} A ^ {T} + Q, \tag {18} +$$ + +where $\hat{z}_k$ is the predicted state and $\hat{\mathrm{P}}_k$ is the predicted covariance matrix of the process uncertainty. Then the Update Step measures the weight between observation and prediction through Kalman gain $K_{k}$ to refine the system: + +$$ +K _ {k} = \hat {\mathrm {P}} _ {k} H ^ {T} \left(H \hat {\mathrm {P}} _ {k} H ^ {T} + R\right) ^ {- 1}, \tag {19} +$$ + +$$ +z _ {k} = \hat {z} _ {k} + K _ {k} \left(\hat {x} _ {k} ^ {H} - H \hat {z} _ {k}\right), \tag {20} +$$ + +$$ +\mathrm {P} _ {k} = \left(I - K _ {k} H\right) \hat {\mathrm {P}} _ {k}, \tag {21} +$$ + +where $z_{k}$ and $\mathrm{P}_k$ is the refined state vector and covariance matrix. We then obtain the refined predictions $Z = [z_{1},z_{2},\dots ,z_{m}]$ and covariance matrices of each token $\mathrm{P} = [\mathrm{P}_1,\mathrm{P}_2,\dots ,\mathrm{P}_m]$ , which describes the temporal process uncertainty in the dynamical system. We show that the process also obeys the basic assumptions of Koopman Theory in Section 3.2. To fully utilize the ability of the Integrator, we make a skip connection: + +$$ +Z ^ {\prime} = Z + U \tag {22} +$$ + +During the training process, the model leverages the Integrator to integrate nonlinear information and gradually adjust the topological structure of the measurement space. Optimized by $\mathcal{L}_{Rec}$ (27), the deviation of the linear system constructed by the KoopmanNet gradually decreases, causing $U\rightarrow 0$ . This facilitates a linear dynamical system in the measurement space and gradually reduces dependence on the Integrator. + +# 3.1.3. $K^2$ VAE DECODER + +After obtaining the prediction $Z'$ , and the covariance matrix $P$ of process uncertainty, the variational distribution is formulated as $\mathbb{Q}(Z|X) = \mathcal{N}(Z', P)$ . During training, we conduct reparameterization sampling from it to keep the ensure the propagation of the gradient. Finally, we utilize the Decoder to map the samples back to the original space and model the $\mathbb{P}(Y|Z)$ with an isotropic Gaussian distribution. Specifically, the Decoder consists of two same MLP structures as the inverse of the Koopman Encoder $\psi$ , we formalize them as $\psi_{\mu}^{-1}$ and $\psi_{\sigma}^{-1}$ : + +$$ +Z ^ {\text {s a m p l e}} = \operatorname {R e s a m p l e} (\mathbb {Q} (Z | X)), \tag {23} +$$ + +$$ +\mu = \psi_ {\mu} ^ {- 1} (Z ^ {s a m p l e}), \sigma = \psi_ {\sigma} ^ {- 1} (Z ^ {s a m p l e}), \tag {24} +$$ + +$$ +X ^ {R e c} = \psi_ {\mu} ^ {- 1} \left(\hat {X} ^ {C}\right), \tag {25} +$$ + +so that the $\mathbb{P}(Y|Z) = \mathcal{N}(\mu, \sigma)$ is modeled. We also map back the Koopman reconstruction $\hat{X}^C$ from the measurement space to optimize the $\mathcal{L}_{Rec}$ (27), which helps measurement function $\psi$ to build a linear system. + +# 3.1.4. OVERALL LEARNING OBJECTIVE + +The overall learning objective is weighted by $\mathcal{L}_{ELBO}$ and $\mathcal{L}_{Rec}$ : + +$$ +\begin{array}{l} \mathcal {L} _ {E L B O} = - \mathbb {E} [ \log \mathbb {P} (Y | Z, X) ] + \\ D _ {K L} (\mathbb {Q} (Z | X) | | \mathbb {P} (Z | X)), \tag {26} \\ \end{array} +$$ + +$$ +\mathcal {L} _ {R e c} = \left\| X - X ^ {R e c} \right\| _ {2} ^ {2}, \tag {27} +$$ + +where the $\mathcal{L}_{ELBO}$ ensures the fundamental mechanism of $K^2\mathrm{VAE}$ . The prior distribution is $\mathbb{P}(Z|X) = \mathcal{N}(\mathbf{0},I)$ , where we hope the linear system in measurement space converge to a stable state. $\mathcal{L}_{Rec}$ facilitates the linearization of the measurement space. + +# 3.2. Theoretical Analysis + +# 3.2.1. THE STABILITY OF KALMANNET + +Since the proposed KalmanNet works in a data-driven manner, the floating-point operation error may cause the covariance matrix $\mathbf{P}$ losing positive definiteness, which often occurs in the step (21). To mitigate this, we utilize a numerically stable form for this step. + +Theorem 3.1. The positive-definiteness of covariance matrix $P_{k}$ during the update step $\mathrm{P}_k = (I - K_kH_k)\hat{\mathrm{P}}_k$ can be retained through a numerically stable form: + +$$ +\mathrm {P} _ {k} = \frac {1}{2} \left(\mathrm {P} _ {k} + \mathrm {P} _ {k} ^ {T}\right), \tag {28} +$$ + +$$ +\mathrm {P} _ {k} ^ {\text {d u a l}} = \left(I - K _ {k} H _ {k}\right) \hat {\mathrm {P}} _ {k} \left(I - K _ {k} H _ {k}\right) ^ {T} + K _ {k} R _ {k} K _ {k} ^ {T}, \tag {29} +$$ + +where (28) ensures the symmetry, (29) stabilizes the positive-definiteness by decomposing the formula into the sum of two positive definite terms, which better ensures positive definiteness during floating operation. + +# 3.2.2. THE CONVERGENCE OF $K^2$ VAE + +Since $K^2\mathrm{VAE}$ models a linear dynamical system in the measurement space where the Koopman Operator serves as the state transition equation, we hope that the convergence state of the KalmanNet does not violate the assumptions of Koopman Theory. In $K^2\mathrm{VAE}$ , we meticulously design the KalmanNet by making it gradually converge to the Koopman Operator in the forecasting horizon. + +Theorem 3.2. When $U \to 0$ , the state transition equation of the KalmanNet in $K^2$ VAE gradually converges to the Koopman Operator: + +We provide the proof of Theorem 3.1-3.2 in Appendix A. + +Table 1. Statistical information of the datasets. + +
HorizonDataset#var.rangefreq.timestepsDescription
Long-termETTh1/h2-L7R+H17,420Electricity transformer temperature per hour
ETTm1/m2-L7R+15min69,680Electricity transformer temperature every 15 min
Electricity-L321R+H26,304Electricity consumption (Kwh)
Traffic-L862(0,1)H17,544Road occupancy rates
Exchange-L8R+Busi. Day7,588Daily exchange rates of 8 countries
ILI-L7(0,1)W966Ratio of patients seen with influenza-like illness
Weather-L21R+10min52,696Local climatological data
Short-termETTh1/h2-S7R+H17,420Electricity transformer temperature per hour
ETTm1/m2-S7R+15min69,680Electricity transformer temperature every 15 min
Exchange-S8R+Busi. Day6,071Daily exchange rates of 8 countries
Solar-S137R+H7,009Solar power production records
Electricity-S370R+H5,833Electricity consumption
Traffic-S963(0,1)H4,001Road occupancy rates
+ +Table 2. Comparison on short-term probabilistic forecasting scenarios across eight real-world datasets. Lower CRPS or NMAE values indicate better predictions. The means and standard errors are based on 5 independent runs of retraining and evaluation. Red: the best, Blue: the 2nd best. + +
ModelMetricExchange-SSolar-SElectricity-STraffic-SETTh1-SETTh2-SETTm1-SETTm2-S
FITSCRPS0.012±0.0020.516±0.0110.068±0.0030.298±0.0220.320±0.0170.212±0.0120.193±0.0050.199±0.003
NMAE0.017±0.0030.701±0.0140.092±0.0040.392±0.0280.423±0.0330.278±0.0090.249±0.0070.260±0.011
PatchTSTCRPS0.052±0.0160.491±0.0080.063±0.0030.278±0.0180.314±0.0220.207±0.0060.234±0.0110.212±0.018
NMAE0.069±0.0130.663±0.0100.085±0.0060.363±0.0230.407±0.0300.260±0.0090.271±0.0090.257±0.011
iTransformerCRPS0.059±0.0180.504±0.0120.066±0.0040.244±0.0110.317±0.0200.219±0.0080.254±0.0120.201±0.018
NMAE0.081±0.0220.695±0.0170.087±0.0060.319±0.0190.408±0.0280.276±0.0170.291±0.0170.242±0.009
KoopaCRPS0.012±0.0010.545±0.0160.085±0.0140.253±0.0180.326±0.0130.211±0.0190.288±0.0220.220±0.015
NMAE0.015±0.0020.742±0.0220.112±0.0190.330±0.0190.423±0.0170.266±0.0220.329±0.0260.278±0.022
TSDiffCRPS0.077±0.0190.568±0.0150.111±0.0130.189±0.0090.304±0.0160.204±0.0060.209±0.0130.124±0.008
NMAE0.096±0.0240.635±0.0120.115±0.0180.206±0.0110.400±0.0250.272±0.0150.276±0.0080.162±0.008
D3VAECRPS0.011±0.0020.769±0.0290.071±0.0090.143±0.0080.324±0.0190.216±0.0150.198±0.0150.303±0.024
NMAE0.012±0.0020.998±0.0490.092±0.0130.178±0.0130.410±0.0160.267±0.0180.250±0.0180.378±0.031
GRU NVPCRPS0.019±0.0060.530±0.0080.062±0.0030.168±0.0080.398±0.0340.309±0.0230.455±0.0290.276±0.014
NMAE0.024±0.0070.670±0.0110.081±0.0060.209±0.0130.477±0.0400.375±0.0240.584±0.0470.349±0.028
GRU MAFCRPS0.012±0.0030.486±0.0070.056±0.0020.144±0.0220.258±0.0130.160±0.0080.151±0.0090.146±0.011
NMAE0.016±0.0020.603±0.0090.073±0.0040.182±0.0290.326±0.0160.208±0.0030.198±0.0040.193±0.008
Trans MAFCRPS0.012±0.0010.442±0.0110.054±0.0020.133±0.0040.309±0.0090.200±0.0120.139±0.0050.180±0.010
NMAE0.016±0.0010.577±0.0140.071±0.0030.160±0.0060.400±0.0110.256±0.0090.162±0.0060.224±0.009
TimeGradCRPS0.009±0.0010.465±0.0160.057±0.0020.130±0.0050.273±0.0070.184±0.0060.186±0.0030.148±0.004
NMAE0.012±0.0020.609±0.0150.073±0.0040.155±0.0070.356±0.0130.224±0.0140.246±0.0070.189±0.006
CSDICRPS0.009±0.0010.392±0.0060.051±0.0010.147±0.0140.262±0.0120.133±0.0060.140±0.0120.144±0.018
NMAE0.013±0.0010.533±0.0070.066±0.0010.175±0.0130.339±0.0090.161±0.0130.169±0.0210.181±0.024
K2VAECRPS0.009±0.0010.367±0.0050.053±0.0020.129±0.0040.256±0.0080.128±0.0060.135±0.0080.122±0.008
NMAE0.009±0.0010.480±0.0080.068±0.0020.157±0.0070.312±0.0080.140±0.0070.152±0.0070.146±0.009
+ +# 4. Experiments + +In this section, we provide empirical results to show the strong performance of $K^2$ VAE against state-of-art baselines on both short- and long-term probabilistic forecasting tasks. We also analyze the model efficiency and the key parameters of $K^2$ VAE as the proof of architectural superiority. + +# 4.1. Experimental Setup + +Datasets. We conduct experiments on 8 datasets of short-term forecasting and 9 datasets of long-term forecasting based on ProbTS (Zhang et al., 2024a), a comprehen + +sive benchmark used to evaluate probabilistic forecasting tasks. Specifically, we use the datasets ETTh1-S, ETTh2-S, ETTm1-S, ETTm2-S, Electricity-S, Solar-S, Traffic-S, and Exchange-S for short-term forecasting, of which the context length $T$ is equivalent to forecasting horizon $L$ with $T = L = 30$ for Exchange-S and $T = L = 24$ for the others. For long-term forecasting, we use the datasets ETTh1-L, ETTh2-L, ETTm1-L, ETTm2-L, Electricity-L, Traffic-L, Exchange-L, Weather-L, and ILI-L with forecasting horizon $L \in \{24, 36, 48, 60\}$ for ILI-L and $L \in \{96, 192, 336, 720\}$ for the others. Note that we fix the context length of all the models with $T = 36$ for ILI-L and $T = 96$ for the others to + +Table 3. Comparison on long-term probabilistic forecasting (forecasting horizon L=720) scenarios across nine real-world datasets. Lower CRPS or NMAE values indicate better predictions. The means and standard errors are based on 5 independent runs of retraining and evaluation. Red: the best, Blue: the 2nd best. The full results of all four horizons 96, 192, 336, 720 are listed in Table 9, 10 in Appendix C.5. + +
ModelMetricETTm1-LETTm2-LETTh1-LETTh2-LElectricity-LTraffic-LWeather-LExchange-LILI-L
FITSCRPS0.305±0.0240.449±0.0340.348±0.0250.314±0.0220.115±0.0240.374±0.0040.267±0.0030.074±0.0110.211±0.011
NMAE0.406±0.0720.540±0.0520.468±0.0120.401±0.0220.149±0.0120.453±0.0220.317±0.0210.097±0.0110.245±0.017
PatchTSTCRPS0.304±0.0290.229±0.0360.323±0.0200.304±0.0180.127±0.0150.214±0.0010.142±0.0050.097±0.0070.233±0.019
NMAE0.382±0.0660.288±0.0340.428±0.0240.371±0.0210.164±0.0240.253±0.0120.152±0.0290.126±0.0010.287±0.023
iTransformerCRPS0.455±0.0210.311±0.0240.350±0.0190.542±0.0150.109±0.0440.284±0.0040.133±0.0040.087±0.0230.222±0.020
NMAE0.490±0.0380.385±0.0420.449±0.0220.667±0.0120.140±0.0090.361±0.0300.147±0.0190.113±0.0150.278±0.017
KoopaCRPS0.295±0.0270.233±0.0250.318±0.0090.293±0.0260.113±0.0180.358±0.0220.140±0.0070.091±0.0120.228±0.022
NMAE0.377±0.0370.290±0.0330.412±0.0080.286±0.0420.149±0.0250.432±0.0320.162±0.0090.116±0.0220.288±0.031
TSDiffCRPS0.478±0.0270.344±0.0460.516±0.0270.406±0.0560.478±0.0050.391±0.0020.152±0.0030.082±0.0100.263±0.022
NMAE0.622±0.0450.416±0.0650.657±0.0170.482±0.0220.622±0.1420.478±0.0060.141±0.0260.142±0.0090.272±0.020
GRU NVPCRPS0.546±0.0360.561±0.2730.502±0.0390.539±0.0900.114±0.0130.211±0.0040.110±0.0040.079±0.0090.307±0.005
NMAE0.707±0.0500.749±0.3850.643±0.0460.688±0.1610.144±0.0170.264±0.0060.135±0.0080.103±0.0090.333±0.005
GRU MAFCRPS0.536±0.0330.272±0.0290.393±0.0430.990±0.0230.106±0.007-0.122±0.0060.160±0.0190.172±0.034
NMAE0.711±0.0810.355±0.0480.496±0.0191.092±0.0190.136±0.098-0.149±0.0340.182±0.0100.216±0.014
Trans MAFCRPS0.688±0.0430.355±0.0430.363±0.0530.327±0.033--0.113±0.0040.148±0.0170.155±0.018
NMAE0.822±0.0340.475±0.0290.455±0.0250.412±0.020--0.148±0.0400.191±0.0060.183±0.019
TimeGradCRPS0.621±0.0370.470±0.0540.523±0.0270.445±0.0160.108±0.0030.220±0.0020.113±0.0110.099±0.0150.295±0.083
NMAE0.793±0.0340.561±0.0440.672±0.0150.550±0.0180.134±0.0040.263±0.0010.136±0.0200.113±0.0160.325±0.068
CSDICRPS0.448±0.0380.239±0.0350.528±0.0120.302±0.040--0.087±0.0030.143±0.0200.283±0.012
NMAE0.578±0.0510.306±0.0400.657±0.0140.382±0.030--0.102±0.0050.173±0.0200.299±0.013
K2VAECRPS0.294±0.0260.221±0.0230.314±0.0110.280±0.0140.057±0.0050.200±0.0010.084±0.0030.069±0.0050.142±0.008
NMAE0.373±0.0320.275±0.0350.396±0.0120.278±0.0200.117±0.0190.248±0.0100.099±0.0090.084±0.0170.167±0.007
+ +Due to the excessive time and memory consumption, some results are unavailable and denoted as -. + +ensure a fair comparison. Details are shown in Table 1. + +Baselines. We compare $K^2$ VAE with 11 strong baselines, including 4 point forecasting models: FITS (Xu et al., 2024), PatchTST (Nie et al., 2023), iTransformer (Liu et al., 2024), and Koopa (Liu et al., 2023), as well as 7 generative models: TSDiff (Kollovieh et al., 2023), $D^3$ VAE (Li et al., 2022), GRU NVP, GRU MAF, Trans MAF (Rasul et al., 2021b), TimeGrad (Rasul et al., 2021a), and CSDI (Tashiro et al., 2021), in both short-term and long-term probabilistic forecasting scenarios. The point forecasting models are equipped with gaussian heads to predict the distributions. Detailed descriptions of these models can be found in Appendix C.2. + +Evaluation Metrics. We use two commonly-used metrics CPRS (Continuous Ranked Probability Score) and NMAE (Normalized Mean Absolute Error) to evaluate the probabilistic forecasts. Detailed descriptions of these metrics can be found in Appendix C.3. + +# 4.2. Main Results + +Comprehensive probabilistic forecasting results are listed in Table 2 and Table 3 with the best in red and the second in blue. We have the following observations: + +1) $K^2$ VAE outperforms state-of-the-art baselines, showing notable improvements in predictive performance. In short-term scenarios, it achieves a $7.3\%$ reduction in CRPS and $14.5\%$ reduction in NMAE compared to the second- + +best baseline, CSDI. In long-term scenarios, it surpasses PatchTST with improvements of $20.9\%$ and $19.9\%$ . + +2) $K^2$ VAE shows significant advantage on nonstationary time seris datasets such as Exchange-S and Exchange-L. There exists distribution drift phenomenon in these datasets, which causes non-linearity and hinders the prediction and uncertainty modeling. Though diffusion-based and flow-based models are theoretically capable of fitting any distributions, they struggle to construct explicit probability transition paths to reach such complex destinations. While $K^2$ VAE simplifies this difficulty through modeling the time series in a linear dynamical system, where the uncertainty is more explicit and easier to be modeled. + +3) $K^2$ VAE also shows stable and strong performance with respect to the varying forecasting horizons—see Table 9 and Table 10 in Appendix C.5. The performance of most baselines drops significantly as the forecasting horizon extends, while $K^2$ VAE maintains superiority. One potential reason is that $K^2$ VAE utilizes the KoopmanNet to effectively handle the inherent nonlinearity in long-term forecasting. Another reason is that the KalmanNet mitigates the error accumulation by integrating diverse information. + +# 4.3. Ablation Studies + +# 4.3.1. VARIANTS OF KOOPMAN OPERATOR + +We design the local Koopman Operator $\mathcal{K}_{loc}$ obtained by one-step eDMD and a learnable part $\mathcal{K}_{glo}$ . As one-step + +eDMD estimates the $\mathcal{K}_{loc}$ through matrix calculation, which relies on the local quality of the space of measurement function. Once the initialization leads to an ill-conditioned topological structure, the one-step eDMD suffers from the numerical calculation error or guides the model to converge in a wrong direction, which often occurs in long-term probabilistic forecasting scenarios and hinders the performance. To enhance the robustness, we adopt a global learnable part $\mathcal{K}_{glo}$ to mitigate this phenomenon while capturing the global-shared dynamics. As shown in Table 4, mixed Koopman Operator $\mathcal{K} = \mathcal{K}_{loc} + \mathcal{K}_{glo}$ demonstrates better performance on both short- and long-term tasks while providing rrobustness to avoid calculation error if $\mathcal{K}_{loc}$ fails. Complete experimental results are provided in Table 12 in Appendix C.6. + +Table 4. Comparison on different Koopman Operators. Lower values indicate better performance. Red: the best. L: the forecasting horizon. The full results can be found in Table 12 in Appendix C.6. + +
Koopman OperatorMetricsElectricity-L (L = 720)ETTm1-L (L = 720)Exchange-S (L = 30)Solar-S (L = 24)
KlocCRPS--0.012±0.0020.450±0.012
NMAE--0.014±0.0020.566±0.015
KgloCRPS0.065±0.0070.311±0.0240.011±0.0010.374±0.004
NMAE0.130±0.0240.395±0.0270.013±0.0010.488±0.008
Kloc + KgloCRPS0.057±0.0050.294±0.0260.009±0.0010.367±0.005
NMAE0.117±0.0190.373±0.0320.009±0.0010.480±0.008
+ +Due to the numerical instability, some results are unavailable and denoted as - + +# 4.3.2. CONNECTIONS IN KALMANNET + +We adopt an Integrator to assist the KalmanNet for faster convergence, which potentially helps tune the topological structure of the space of measurement function into the linear dynamical system. Specifically, the Integrator integrates the non-linear residual into the control input of KalmanNet, which is proved not to affect the prior of Koopman Theory in Section 3.2. We also make a skip connection between Integrator and the KalmanNet for the final prediction, this constraints Integrator predicting residuals from residuals. Since the space of the measurement space is optimized to converge to a linear system, the Integrator serves as an assistant and gradually stop helping the model. We showcase the different variants in Table 5, to which only some of the features mentioned above are applied. + +We observe that our adopted Mixed variant outperforms others, because it provides gains for the KalmanNet, which integrates non-linear information for adaption, and provides constraints for the Integrator, which makes full use of it without destroying the assumptions of Koopman Theory. The variant "w/o skip connection" completely depends on the linear fitting ability of the KalmanNet, which is hard to disentangle the nonlinear components in the early stages of training, thus potentially hindering the modeling of process uncertainty. On the other hand, the variant "w/o control + +Table 5. Comparison on different connections in KalmanNet. Lower values indicate better performance. Red: the best. L: the forecasting horizon. The full results can be found in Table 13 in Appendix C.6. + +
Connections in KalmanNetMetricsElectricity-L (L = 720)ETTm1-L (L = 720)Exchange-S (L = 30)Solar-S (L = 24)
w/o IntegratorCRPS0.082±0.0110.359±0.0240.015±0.0020.398±0.005
NMAE0.188±0.0280.442±0.0290.022±0.0010.531±0.010
w/o skip connectionCRPS0.063±0.0070.315±0.0160.011±0.0010.388±0.006
NMAE0.131±0.0150.402±0.0300.013±0.0040.511±0.008
w/o control inputCRPS0.069±0.0050.322±0.0170.013±0.0060.423±0.005
NMAE0.142±0.0180.418±0.0220.017±0.0030.560±0.009
MixedCRPS0.057±0.0050.294±0.0260.009±0.0010.367±0.005
NMAE0.117±0.0190.373±0.0320.009±0.0010.480±0.008
+ +input" gives too little support for KalmanNet to adaptively refine the prediction and process uncertainty. Complete experimental results are provided in Table 13 in Appendix C.5. + +# 4.3.3. ABLATIONS OF KOOPMANNET & KALMANNET + +As the most important modules, the KoopmanNet and KalmanNet jointly contribute to state-of-the-art performance of $K^2$ VAE. To evaluate their impact, we conduct ablation studies and the results are shown in Table 6. + +It is observed that both the KoopmanNet and KalmanNet show indispensability in probabilistic forecasting. Since the KoopmanNet ensures the linearization of the modeling, it shows greater impact in forecasting performance. Another reason is that KalmanNet does not excell at non-linear modeling because it is based on the linear kalman filter. + +Table 6. Ablations on KoopmanNet and KalmanNet. Lower values indicate better performance. Red: the best. L: the forecasting horizon. The full results can be found in Table 14 in Appendix C.6. + +
VariantsMetricsElectricity-L (L = 720)ETTm1-L (L = 720)Exchange-S (L = 30)Solar-S (L = 24)
w/o KoopmanNetCRPS0.074±0.0090.443±0.0340.014±0.0020.385±0.008
NMAE0.162±0.0150.601±0.0580.016±0.0010.528±0.014
w/o KalmanNetCRPS0.089±0.0110.398±0.0380.011±0.0010.375±0.005
NMAE0.192±0.0230.539±0.0440.012±0.0010.499±0.009
K2VAECRPS0.057±0.0050.294±0.0260.009±0.0010.367±0.005
NMAE0.117±0.0190.373±0.0320.009±0.0010.480±0.008
+ +# 4.4. Model Efficiency + +We evaluate the model efficiency from three aspects: probabilistic forecasting performance (CRPS), inference time (sec/sample), and maxgpu memory (GB). Figure 4 showcases a common scenario on Electricity-L (96-96), which reflects the overall relative relationships on above-mentioned three aspects. $K^2$ VAE achieves best forecasting performance while occupying the minimumgpu memory and having the fastest inference speed. One reason is that $K^2$ VAE applies KoopmanNet and KalmanNet, composed of several lightweight MLPs or linear layers, to efficiently build the variational distribution as process uncertainty, thus enhancing generation capability of $K^2$ VAE. Another reason + +![](images/2f79f639db9230c60f0f8d685c0389a99e6df2ee066cb4a2cf3624c39529b1fd.jpg) +Figure 4. Model efficiency comparison. All the statistical data is obtained on the Electricity-L ( $T = L = 96$ ). Sample-wise inference time and maxgpu memory is obtained with batch size equals 1. Lower values of CRPS indicate better performance. + +is that $K^2$ VAE utilizes the VAE architecture and obeys the one-step-generation paradigm, while diffusion-based or flow-based models have longer probabilistic transition paths, which produces more intermediate results and consumes longer duration. More evidence of model efficiency is provided in Table 11 in Appendix C.5. + +# 5. Related Works + +# 5.1. Probabilistic Time Series Forecasting + +Probabilistic forecasting aims to provide the predictive distribution of the target variable. With the rapid development of deep learning, new methods are continually emerging. DeepAR (Salinas et al., 2020) uses recurrent neural networks (RNNs) to model the transitions of hidden states and generates a Gaussian distribution for predictions. Following the autoregressive paradigm, DeepState (Rangapuram et al., 2018) and DSSMF (Li et al., 2019) combine state space models with deep learning to improve forecasting accuracy. MANF (Feng et al., 2024) and ProTran (Tang & Matteson, 2021) introduced attention-based methods that enhance the model's ability to capture long-range dependencies, further improving forecasting accuracy. Diffusion models, such as those proposed by TimeGrad (Rasul et al., 2021a), TSDiff (Kollovieh et al., 2023), and CSDI (Tashiro et al., 2021), approach the forecasting task as a denoising process, excelling in handling high-dimensional data. Another approach involves using more complex distribution forms, such as normalizing flows (Rasul et al., 2021b), to further enhance forecasting performance. Compared with RNN-based or State Space models, $K^2$ VAE also autoregressively models the time series in a linear dynamical system, but mitigates the error accumulation through KalmanNet. Compared with generative diffusion-based or flow-based models, $K^2$ VAE adopts the VAE structure and follows single-step-generation principle, achieves faster inference speed, lower + +memory occupation, and better performance. + +# 5.2. VAE for Time Series + +Variational Autoencoders (VAEs) (Kingma & Welling, 2014) have found wide applicability across various time series tasks. In time series generation, VAEs synthesize time series by encoding the data into a lower-dimensional latent space and then decoding it to recreate similar sequences, which helps preserve the statistical properties of the original data, making VAEs valuable for data augmentation (Li et al., 2023a; Desai et al., 2021). In time series imputation, VAEs recover missing values by learning the underlying latent structure of the data (Boquet et al., 2019; Li et al., 2021). By capturing temporal dependencies and relationships, they help restore incomplete time series with high accuracy. In time series anomaly detection, VAEs are used to learn the expected patterns within time series data and flag deviations that indicate anomalous behavior (Huang et al., 2022a; Wang et al., 2024f). In time series forecasting, TimeVAE (Desai et al., 2021) and $D^3$ VAE (Li et al., 2022) are tailored for short-term probabilistic foercasting tasks. Koopa (Liu et al., 2023), as a strong baseline based on Koopman Theory, is tailored for long-term deterministic forecasting by adopting multi-scale MLP structures, which also falls short in probabilistic forecasting. Compared to these methods, $K^2$ VAE is tailored for LPTSF, which considers the inherent nonlinearity of time series through a KoopmanNet and tackles the error accumulation through a KalmanNet, thus enhancing the ability to predict long-term future distributions. This facilitates better decision-making in dynamic and uncertain environments. + +# 6. Conclusion + +In this work, we propose a VAE-based probabilistic forecasting model called $K^2$ VAE to solve PTSF. By leveraging the KoopmanNet, $K^2$ VAE transforms nonlinear time series into a linear dynamical system, which allows for a more effective representation of state transitions and the inherent process uncertainties. Furthermore, the KalmanNet provides a solution to model the uncertainty in the linear dynamical system, mitigating the error accumulation in long-term forecasting tasks. Through comprehensive experiments, we demonstrate that $K^2$ VAE not only outperforms existing state-of-the-art methods in both short- and long-term probabilistic forecasting tasks, but also achieves fascinating model efficiency. + +In the future, we hope to continuously study the one-step generation paradigm in time series probabilistic modeling to further improve the model performance and efficiency. Another primary direction is to pioneer the exploration of foundation probabilistic time series forecasting models, which can work effectively in zero-shot scenarios. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# Acknowledgements + +This work was partially supported by National Natural Science Foundation of China (62472174, 62372179). Bin Yang is the corresponding author of the work. + +# References + +Boquet, G., Vicario, J. L., Morell, A., and Serrano, J. Missing data in traffic estimation: A variational autoencoder imputation method. In ICASSP, pp. 2882-2886, 2019. +Box, G. E. and Pierce, D. A. Distribution of residual autocorrelations in autoregressive-integrated moving average time series models. Journal of the American Statistical Association, 65(332):1509-1526, 1970. +Breiman, L. Random forests. Machine learning, 45:5-32, 2001. +Campos, D., Kieu, T., Guo, C., Huang, F., Zheng, K., Yang, B., and Jensen, C. S. Unsupervised time series outlier detection with diversity-driven convolutional ensembles. Proc. VLDB Endow., 15(3):611-623, 2022. +Campos, D., Zhang, M., Yang, B., Kieu, T., Guo, C., and Jensen, C. S. Lightts: Lightweight time series classification with adaptive ensemble distillation. Proc. ACM Manag. Data, 1(2):171:1-171:27, 2023. +Chen, T. and Guestrin, C. Xgboost: A scalable tree boosting system. In SIGKDD, pp. 785-794, 2016. +Chen, Y., Huang, X., Zhang, Q., Li, W., Zhu, M., Yan, Q., Li, S., Chen, H., Hu, H., Yang, J., et al. Gim: A million-scale benchmark for generative image manipulation detection and localization. arXiv preprint arXiv:2406.16531, 2024. +Chen, Y., Huang, S., Cheng, Y., Chen, P., Rao, Z., Shu, Y., Yang, B., Pan, L., and Guo, C. AimTS: Augmented series and image contrastive learning for time series classification. In ICDE, 2025. +Chen, Z., Ding, L., Chu, Z., Qi, Y., Huang, J., and Wang, H. Monotonic neural ordinary differential equation: Time-series forecasting for cumulative data. In CIKM, pp. 4523-4529, 2023. +Cirstea, R., Guo, C., Yang, B., Kieu, T., Dong, X., and Pan, S. Triformer: Triangular, variable-specific attentions for long sequence multivariate time series forecasting. In *IJCAI*, pp. 1994–2001, 2022a. + +Cirstea, R.-G., Yang, B., Guo, C., Kieu, T., and Pan, S. Towards spatio-temporal aware traffic time series forecasting. In ICDE, pp. 2900-2913, 2022b. +Cui, K., Liu, S., Feng, W., Deng, X., Gao, L., Cheng, M., Lu, H., and Yang, L. T. Correlation-aware cross-modal attention network for fashion compatibility modeling inUGC systems. ACM Transactions on Multimedia Computing, Communications and Applications, 2024a. +Cui, K., Tang, W., Zhu, R., Wang, M., Larsen, G. D., Pauca, V. P., Alqahtani, S., Yang, F., Segurado, D., Fine, P., et al. Real-time localization and bimodal point pattern analysis of palms using uav imagery. arXiv preprint arXiv:2410.11124, 2024b. +Cui, K., Zhu, R., Wang, M., Tang, W., Larsen, G. D., Pauca, V. P., Alqahtani, S., Yang, F., Segurado, D., Lutz, D., et al. Detection and geographic localization of natural objects in the wild: A case study on palms. arXiv preprint arXiv:2502.13023, 2025. +Dai, T., Wu, B., Liu, P., Li, N., Bao, J., Jiang, Y., and Xia, S.-T. Periodicity decoupling framework for long-term series forecasting. In ICLR, 2024. +Desai, A., Freeman, C., Wang, Z., and Beaver, I. Timevae: A variational auto-encoder for multivariate time series generation. arXiv preprint arXiv:2111.08095, 2021. +Fang, Z., Pan, L., Chen, L., Du, Y., and Gao, Y. MDTP: A multi-source deep traffic prediction framework over spatio-temporal trajectory data. Proc. VLDB Endow., 14 (8):1289-1297, 2021. +Feng, S., Miao, C., Xu, K., Wu, J., Wu, P., Zhang, Y., and Zhao, P. Multi-scale attention flow for probabilistic time series forecasting. IEEE Trans. Knowl. Data Eng., 36(5): 2056-2068, 2024. +Gao, H., Shen, W., Qiu, X., Xu, R., Yang, B., and Hu, J. Sddts: Exploring the potential of linear state space models for diffusion models in time series imputation. In SIGKDD, 2025. +Godahewa, R., Bergmeir, C., Webb, G. I., Hyndman, R. J., and Montero-Manso, P. Monash time series forecasting archive. arXiv preprint arXiv:2105.06643, 2021. +Guo, C., Yang, B., Andersen, O., Jensen, C. S., and Torp, K. Ecomark 2.0: empowering eco-routinging with vehicular environmental models and actual vehicle fuel consumption data. *GeoInformatica*, 19:567-599, 2015. +Higgins, I., Matthew, L., Pal, A., Burgess, C. P., Glorot, X., Botvinick, M. M., Mohamed, S., and Lerchner, A. beta-vae: Learning basic visual concepts with a constrained variational framework. *ICLR (Poster)*, 3, 2017. + +Hu, S., Zhao, K., Qiu, X., Shu, Y., Hu, J., Yang, B., and Guo, C. Multirc: Joint learning for time series anomaly prediction and detection with multi-scale reconstructive contrast. arXiv preprint arXiv:2410.15997, 2024. +Hu, Y., Liu, P., Zhu, P., Cheng, D., and Dai, T. Adaptive multi-scale decomposition framework for time series forecasting. In AAAI, 2025a. +Hu, Y., Zhang, G., Liu, P., Lan, D., Li, N., Cheng, D., Dai, T., Xia, S.-T., and Pan, S. Timefilter: Patch-specific spatial-temporal graph filtration for time series forecasting. ICML, 2025b. +Huang, Q., Shen, L., Zhang, R., Ding, S., Wang, B., Zhou, Z., and Wang, Y. Crossgnn: Confronting noisy multivariate time series via cross interaction refinement. In NeurIPS, pp. 46885-46902, 2023. +Huang, T., Chen, P., and Li, R. A semi-supervised vae based active anomaly detection framework in multivariate time series for online systems. In WWW, pp. 1797-1806, 2022a. +Huang, X., Yang, Y., Wang, Y., Wang, C., Zhang, Z., Xu, J., Chen, L., and Vazirgiannis, M. Dgraph: A large-scale financial dataset for graph anomaly detection. In NeurIPS, pp. 22765-22777, 2022b. +Hyndman, R., Koehler, A. B., Ord, J. K., and Snyder, R. D. Forecasting with exponential smoothing: the state space approach. 2008. +Jing, P., Cui, K., Guan, W., Nie, L., and Su, Y. Category-aware multimodal attention network for fashion compatibility modeling. IEEE Transactions on Multimedia, 25: 9120-9131, 2023. +Jing, P., Cui, K., Zhang, J., Li, Y., and Su, Y. Multimodal high-order relationship inference network for fashion compatibility modeling in internet of multimedia things. IEEE Internet of Things Journal, 11(1):353-365, 2024. +Ke, G., Meng, Q., Finley, T., Wang, T., Chen, W., Ma, W., Ye, Q., and Liu, T.-Y. Lightgbm: A highly efficient gradient boosting decision tree. Advances in Neural Information Processing Systems, 30, 2017. +Kingma, D. P. and Welling, M. Auto-encoding variational bayes. In ICLR, 2014. +Kollovieh, M., Ansari, A. F., Bohlke-Schneider, M., Zschiegner, J., Wang, H., and Wang, Y. Predict, refine, synthesize: Self-guiding diffusion models for probabilistic time series forecasting. In NeurIPS, 2023. +Koopman, B. O. Hamiltonian systems and transformation in hilbert space. Proceedings of the National Academy of Sciences, 17(5):315-318, 1931. + +Lan, Y. and Mezić, I. Linearization in the large of nonlinear systems and koopman operator spectrum. Physica D: Nonlinear Phenomena, 242(1):42-53, 2013. +Li, H., Yu, S., and Principe, J. Causal recurrent variational autoencoder for medical time series generation. In AAAI, volume 37, pp. 8562-8570, 2023a. +Li, J., Ren, W., and Han, M. Variational auto-encoders based on the shift correction for imputation of specific missing in multivariate time series. Measurement, 186: 110055, 2021. +Li, L., Yan, J., Yang, X., and Jin, Y. Learning interpretable deep state space model for probabilistic time series forecasting. In *IJCAI*, pp. 2901-2908, 2019. +Li, Y., Lu, X., Wang, Y., and Dou, D. Generative time series forecasting with diffusion, denoise, and disentanglement. Advances in Neural Information Processing Systems, 35: 23009-23022, 2022. +Li, Y., Wang, H., Li, Z., Wang, S., Dev, S., and Zuo, G. Daanet: Dual attention aggregating network for salient object detection. In 2023 IEEE International Conference on Robotics and Biomimetics (ROBIO), pp. 1-7, 2023b. +Li, Y., Wang, H., Xu, J., Ma, Z., Wu, P., Wang, S., and Dev, S. CP2M: Clustered-Patch-Mixed Mosaic Augmentation for Aerial Image Segmentation. arXiv preprint arXiv:2501.15389, 2025a. +Li, Y., Wang, H., Xu, J., Wu, P., Xiao, Y., Wang, S., and Dev, S. DDUNet: Dual Dynamic U-Net for Highly-Efficient Cloud Segmentation. arXiv preprint arXiv:2501.15385, 2025b. +Li, Z., Qiu, X., Chen, P., Wang, Y., Cheng, H., Shu, Y., Hu, J., Guo, C., Zhou, A., Jensen, C. S., and Yang, B. TSMF-Bench: Comprehensive and unified benchmarking of foundation models for time series forecasting. In SIGKDD, 2025c. +Lin, S., Lin, W., Wu, W., Zhao, F., Mo, R., and Zhang, H. Segrnn: Segment recurrent neural network for long-term time series forecasting. arXiv preprint arXiv:2308.11200, 2023. +Lin, S., Lin, W., Wu, K., Wang, S., Xu, M., and Wang, J. Z. Cocv: A compression algorithm for time-series data with continuous constant values in iot-based monitoring systems. *Internet of Things*, 25:101049, 2024a. +Lin, S., Lin, W., Wu, W., Chen, H., and Yang, J. SparseTSF: Modeling long-term time series forecasting with 1k parameters. In ICML, pp. 30211-30226, 2024b. + +Lin, S., Lin, W., Xinyi, H., Wu, W., Mo, R., and Zhong, H. Cyclenet: Enhancing time series forecasting through modeling periodic patterns. In NeurIPS, 2024c. +Lin, S., Lin, W., Zhao, F., and Chen, H. Benchmarking and revisiting time series forecasting methods in cloud workload prediction. Cluster Computing, 28(1):71, 2025. +Liu, C., Xu, Q., Miao, H., Yang, S., Zhang, L., Long, C., Li, Z., and Zhao, R. Timecma: Towards llm-empowered multivariate time series forecasting via cross-modality alignment. In AAAI, volume 39, pp. 18780-18788, 2025a. +Liu, P., Guo, H., Dai, T., Li, N., Bao, J., Ren, X., Jiang, Y., and Xia, S.-T. Calf: Aligning llms for time series forecasting via cross-modal fine-tuning. AAAI, 39(18): 18915-18923, 2025b. +Liu, P., Wu, B., Hu, Y., Li, N., Dai, T., Bao, J., and Xia, S.-T. Timebridge: Non-stationarity matters for long-term time series forecasting. In ICML, 2025c. +Liu, Q. and Paparrizos, J. The elephant in the room: Towards a reliable time-series anomaly detection benchmark. In NeurIPS, 2024. +Liu, Y., Li, C., Wang, J., and Long, M. Koopa: Learning nonstationary time series dynamics with koopman predictors. Advances in neural information processing systems, 36: 12271-12290, 2023. +Liu, Y., Hu, T., Zhang, H., Wu, H., Wang, S., Ma, L., and Long, M. Inverter transformers: Inverted transformers are effective for time series forecasting. In ICLR, 2024. +Matheson, J. E. and Winkler, R. L. Scoring rules for continuous probability distributions. Management science, 22 (10):1087-1096, 1976. +Miao, H., Liu, Z., Zhao, Y., Guo, C., Yang, B., Zheng, K., and Jensen, C. S. Less is more: Efficient time series dataset condensation via two-fold modal matching. PVLDB, 18(2):226-238, 2024a. +Miao, H., Zhao, Y., Guo, C., Yang, B., Zheng, K., Huang, F., Xie, J., and Jensen, C. S. A unified replay-based continuous learning framework for spatio-temporal prediction on streaming data. In ICDE, pp. 1050-1062, 2024b. +Miao, H., Xu, R., Zhao, Y., Wang, S., Wang, J., Yu, P. S., and Jensen, C. S. A parameter-efficient federated framework for streaming time series anomaly detection via lightweight adaptation. TMC, 2025. +Nie, Y., Nguyen, N. H., Sinthong, P., and Kalagnanam, J. A time series is worth 64 words: Long-term forecasting with transformers. In ICLR, 2023. + +Pan, Z., Sharma, A., Hu, J. Y.-C., Liu, Z., Li, A., Liu, H., Huang, M., and Geng, T. Ising-traffic: Using ising machine learning to predict traffic congestion under uncertainty. In AAAI, volume 37, pp. 9354–9363, 2023a. +Pan, Z., Wang, Y., Zhang, Y., Yang, S. B., Cheng, Y., Chen, P., Guo, C., Wen, Q., Tian, X., Dou, Y., et al. Magicscaler: Uncertainty-aware, predictive autoscaling. In Proc. VLDB Endow., 2023b. +Pan, Z., Wang, Y., Zhang, Y., Yang, S. B., Cheng, Y., Chen, P., Guo, C., Wen, Q., Tian, X., Dou, Y., et al. MagicScaler: Uncertainty-aware, predictive autoscaling. Proc. VLDB Endow., 16(12):3808-3821, 2023c. +Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., Desmaison, A., Kopf, A., Yang, E. Z., DeVito, Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B., Fang, L., Bai, J., and Chintala, S. Pytorch: An imperative style, high-performance deep learning library. In NeurIPS, pp. 8024-8035, 2019. +Pu, Y., Gan, Z., Henao, R., Yuan, X., Li, C., Stevens, A., and Carin, L. Variational autoencoder for deep learning of images, labels and captions. Advances in neural information processing systems, 29, 2016. +Qiu, X., Hu, J., Zhou, L., Wu, X., Du, J., Zhang, B., Guo, C., Zhou, A., Jensen, C. S., Sheng, Z., and Yang, B. TFB: towards comprehensive and fair benchmarking of time series forecasting methods. Proc. VLDB Endow., 17(9): 2363-2377, 2024. +Qiu, X., Cheng, H., Wu, X., Hu, J., and Guo, C. A comprehensive survey of deep learning for multivariate time series forecasting: A channel strategy perspective. arXiv preprint arXiv:2502.10721, 2025a. +Qiu, X., Li, X., Pang, R., Pan, Z., Wu, X., Yang, L., Hu, J., Shu, Y., Lu, X., Yang, C., Guo, C., Zhou, A., Jensen, C. S., and Yang, B. Easytime: Time series forecasting made easy. In ICDE, 2025b. +Qiu, X., Li, Z., Qiu, W., Hu, S., Zhou, L., Wu, X., Li, Z., Guo, C., Zhou, A., Sheng, Z., Hu, J., Jensen, C. S., and Yang, B. TAB: Unified benchmarking of time series anomaly detection methods. In Proc. VLDB Endow., 2025c. +Qiu, X., Wu, X., Lin, Y., Guo, C., Hu, J., and Yang, B. DUET: Dual clustering enhanced multivariate time series forecasting. In SIGKDD, pp. 1185-1196, 2025d. +Rangapuram, S. S., Seeger, M. W., Gasthaus, J., Stella, L., Wang, Y., and Januschowski, T. Deep state space models for time series forecasting. In NeurIPS, pp. 7796-7805, 2018. + +Rasul, K., Seward, C., Schuster, I., and Vollgraf, R. Autoregressive denoising diffusion models for multivariate probabilistic time series forecasting. In ICML, volume 139, pp. 8857-8868, 2021a. +Rasul, K., Sheikh, A., Schuster, I., Bergmann, U. M., and Vollgraf, R. Multivariate probabilistic time series forecasting via conditioned normalizing flows. In *ICLR*, 2021b. +Salinas, D., Flunkert, V., Gasthaus, J., and Januschowski, T. Deepar: Probabilistic forecasting with autoregressive recurrent networks. International journal of forecasting, 36(3):1181-1191, 2020. +Schmid, P. J. Dynamic mode decomposition of numerical and experimental data. Journal of fluid mechanics, 656: 5-28, 2010. +Sezer, O. B., Gudelek, M. U., and Özbayoglu, A. M. Financial time series forecasting with deep learning: A systematic literature review: 2005-2019. Appl. Soft Comput., 90:106181, 2020. +Simon, D. Kalman filtering. Embedded systems programming, 14(6):72-79, 2001. +Sun, Y., Xie, Z., Wang, H., Huang, X., and Hu, Q. Solar wind speed prediction via graph attention network. *Space Weather*, 20(7), 2022. +Tang, B. and Matteson, D. S. Probabilistic transformer for time series analysis. In NeurIPS, pp. 23592-23608, 2021. +Tashiro, Y., Song, J., Song, Y., and Ermon, S. CSDI: conditional score-based diffusion models for probabilistic time series imputation. In NeurIPS, pp. 24804-24816, 2021. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. In NeurIPS, pp. 5998-6008, 2017. +Wang, C., Zhuang, Z., Qi, Q., Wang, J., Wang, X., Sun, H., and Liao, J. Drift doesn't matter: Dynamic decomposition with diffusion reconstruction for unstable multivariate time series anomaly detection. In NeurIPS, pp. 10758-10774, 2023. +Wang, H., Chen, Z., Liu, Z., Li, H., Yang, D., Liu, X., and Li, H. Entire space counterfactual learning for reliable content recommendations. IEEE Trans. Autom. Sci. Eng., pp. 1-12, 2024a. +Wang, H., Chen, Z., Liu, Z., Li, H., Yang, D., Liu, X., and Li, H. Entire space counterfactual learning for reliable content recommendations. IEEE Transactions on Information Forensics and Security, 2024b. + +Wang, H., Chen, Z., Liu, Z., Pan, L., Xu, H., Liao, Y., Li, H., and Liu, X. Spot-i: Similarity preserved optimal transport for industrial IoT data imputation. IEEE Transactions on Industrial Informatics, 2024c. +Wang, H., Wang, Z., Niu, Y., Liu, Z., Li, H., Liao, Y., Huang, Y., and Liu, X. An accurate and interpretable framework for trustworthy process monitoring. IEEE Trans. Artif. Intell., 5(5):2241-2252, 2024d. +Wang, H., Chen, Z., Zhang, H., Li, Z., Pan, L., Li, H., and Gong, M. Debiased recommendation via Wasserstein causal balancing. ACM Transactions on Information Systems, 2025a. +Wang, J., Zhang, Z., He, Y., Song, Y., Shi, T., Li, Y., Xu, H., Wu, K., Qian, G., Chen, Q., et al. Enhancing code llms with reinforcement learning in code generation. arXiv preprint arXiv:2412.20367, 2024e. +Wang, Y., Qiu, Y., Shu, Y., Rao, Z., Pan, L., Yang, B., and Chenjuan, G. Lightgts: A lightweight general time series forecasting model. In ICML, 2025b. +Wang, Y., Qiu, Y., Zhao, k., Shu, Y., Rao, Z., Pan, L., Yang, B., and Chenjuan, G. Towards a general time series forecasting model with unified representation and adaptive transfer. In ICML, 2025c. +Wang, Z., Pei, C., Ma, M., Wang, X., Li, Z., Pei, D., Rajmohan, S., Zhang, D., Lin, Q., Zhang, H., et al. Revisiting vae for unsupervised time series anomaly detection: A frequency perspective. In WWW, pp. 3096-3105, 2024f. +Welch, G. An introduction to the kalman filter. 1995. +Wu, H., Hu, T., Liu, Y., Zhou, H., Wang, J., and Long, M. Timesnet: Temporal 2d-variation modeling for general time series analysis. In ICLR, 2023a. +Wu, W., Qiu, X., Song, S., Huang, X., Ma, F., and Xiao, J. Prompt categories cluster for weakly supervised semantic segmentation. arXiv preprint arXiv:2412.13823, 2024a. +Wu, W., Dai, T., Chen, Z., Huang, X., Ma, F., and Xiao, J. Generative prompt controlled diffusion for weakly supervised semantic segmentation. Neurocomputing, pp. 130103, 2025a. +Wu, W., Song, S., Qiu, X., Huang, X., Ma, F., and Xiao, J. Image fusion for cross-domain sequential recommendation. In Companion Proceedings of the ACM Web Conference 2025, 2025b. +Wu, X., Zhang, D., Zhang, M., Guo, C., Yang, B., and Jensen, C. S. AutoCTS+: Joint neural architecture and hyperparameter search for correlated time series forecasting. Proc. ACM Manag. Data, 1(1):97:1-97:26, 2023b. + +Wu, X., Wu, X., Yang, B., Zhou, L., Guo, C., Qiu, X., Hu, J., Sheng, Z., and Jensen, C. S. AutoCTS++: zero-shot joint neural architecture and hyperparameter search for correlated time series forecasting. The VLDB Journal, 33 (5):1743-1770, 2024b. +Wu, X., Qiu, X., Li, Z., Wang, Y., Hu, J., Guo, C., Xiong, H., and Yang, B. CATCH: Channel-aware multivariate time series anomaly detection via frequency patching. In ICLR, 2025c. +Wu, X., Wu, X., Zhang, D., Zhang, M., Guo, C., Yang, B., and Jensen, C. S. Fully automated correlated time series forecasting in minutes. In Proc. VLDB Endow., volume 18, pp. 144-157, 2025d. +Xu, Z., Zeng, A., and Xu, Q. FITS: modeling time series with 10k parameters. In ICLR, 2024. +Yang, S. B., Guo, C., Hu, J., Tang, J., and Yang, B. Unsupervised path representation learning with curriculum negative sampling. In *IJCAI*, pp. 3286-3292, 2021. +Yang, S. B., Guo, C., and Yang, B. Context-aware path ranking in road networks. IEEE Trans. Knowl. Data Eng., 34(7):3153-3168, 2022. +Yao, Y., Li, D., Jie, H., Chen, L., Li, T., Chen, J., Wang, J., Li, F., and Gao, Y. Simplets: An efficient and universal model selection framework for time series forecasting. Proc. VLDB Endow., 16(12):3741-3753, 2023. +Yao, Y., Jie, H., Chen, L., Li, T., Gao, Y., and Wen, S. Tsec: An efficient and effective framework for time series classification. In ICDE, pp. 1394-1406, 2024. +Yi, Q., He, Y., Wang, J., Song, X., Qian, S., Zhang, M., Sun, L., and Shi, T. Score: Story coherence and retrieval enhancement for ai narratives. arXiv preprint arXiv:2503.23512, 2025. +Yu, C., Wang, F., Shao, Z., Sun, T., Wu, L., and Xu, Y. Dsformer: A double sampling transformer for multivariate time series long-term prediction. In CIKM, pp. 3062-3072, 2023. +Yu, C., Wang, F., Shao, Z., Qian, T., Zhang, Z., Wei, W., and Xu, Y. Ginar: An end-to-end multivariate time series forecasting model suitable for variable missing. In SIGKDD, pp. 3989-4000, 2024a. +Yu, C., Wang, F., Shao, Z., Qian, T., Zhang, Z., Wei, W., An, Z., Wang, Q., and Xu, Y. Ginar+: A robust end-to-end framework for multivariate time series forecasting with missing values. IEEE Transactions on Knowledge and Data Engineering, pp. 1-14, 2025a. + +Yu, X., Elazab, A., Ge, R., Jin, H., Jiang, X., Jia, G., Wu, Q., Shi, Q., and Wang, C. Ich-scnet: Intracerebral hemorrhage segmentation and prognosis classification network using clip-guided sam mechanism. In 2024 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), pp. 2795-2800, 2024b. +Yu, X., Li, X., Ge, R., Wu, S., Elazab, A., Zhu, J., Zhang, L., Jia, G., Xu, T., Wan, X., et al. Ichpro: Intracerebral hemorrhage prognosis classification via joint-attention fusion-based 3d cross-modal network. In 2024 IEEE International Symposium on Biomedical Imaging (ISBI), pp. 1-5, 2024c. +Yu, X., Elazab, A., Ge, R., Zhu, J., Zhang, L., Jia, G., Wu, Q., Wan, X., Li, L., and Wang, C. Ich-prnet: a cross-modal intracerebral haemorrhage prognostic prediction method using joint-attention interaction mechanism. Neural Networks, 184:107096, 2025b. +Zeng, A., Chen, M., Zhang, L., and Xu, Q. Are transformers effective for time series forecasting? In AAAI, volume 37, pp. 11121-11128, 2023. +Zhang, J., Wen, X., Zhang, Z., Zheng, S., Li, J., and Bian, J. ProbTS: Benchmarking point and distributional forecasting across diverse prediction horizons. In NeurIPS, 2024a. +Zhang, Q. and Qi, Y. Can mllms guide weakly-supervised temporal action localization tasks? arXiv preprint arXiv:2411.08466, 2024. +Zhang, Q., Liu, X., Li, W., Chen, H., Liu, J., Hu, J., Xiong, Z., Yuan, C., and Wang, Y. Distilling semantic priors from sam to efficient image restoration models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 25409-25419, 2024b. +Zhang, Q., Qi, Y., Tang, X., Fang, J., Lin, X., Zhang, K., and Yuan, C. Indprompter: Adapting sam to image manipulation detection by cross-view automated prompt learning. arXiv preprint arXiv:2502.02454, 2025a. +Zhang, Q., Qi, Y., Tang, X., Yuan, R., Lin, X., Zhang, K., and Yuan, C. Rethinking pseudo-label guided learning for weakly supervised temporal action localization from the perspective of noise correction. arXiv preprint arXiv:2501.11124, 2025b. +Zhao, K., Guo, C., Cheng, Y., Han, P., Zhang, M., and Yang, B. Multiple time series forecasting with dynamic graph modeling. Proc. VLDB Endow., 17(4):753-765, 2023. +Zhou, H., Zhang, S., Peng, J., Zhang, S., Li, J., Xiong, H., and Zhang, W. Informer: Beyond efficient transformer for long sequence time-series forecasting. In AAAI, volume 35, pp. 11106-11115, 2021. + +# A. Theoretical Analyses + +# A.1. The Stability of KalmanNet + +Since the proposed KalmanNet works in a data-driven manner, the floating-point operation error may cause the covariance matrix $\mathbf{P}$ losing positive definiteness, which often occurs in the step (21). To mitigate this, we utilize a numerically stable form for this step. + +Theorem A.1. The positive-definiteness of covariance matrix $P_{k}$ during the update step $\mathrm{P}_k = (I - K_kH_k)\hat{\mathrm{P}}_k$ can be retained through a numerically stable form: + +$$ +\mathrm {P} _ {k} = \frac {1}{2} \left(\mathrm {P} _ {k} + \mathrm {P} _ {k} ^ {T}\right), \tag {30} +$$ + +$$ +\mathrm {P} _ {k} ^ {\text {d u a l}} = \left(I - K _ {k} H _ {k}\right) \hat {\mathrm {P}} _ {k} \left(I - K _ {k} H _ {k}\right) ^ {T} + K _ {k} R _ {k} K _ {k} ^ {T} \tag {31} +$$ + +Proof. The goal is to demonstrate the equivalence of the numerically stable form and original form: $\mathrm{P}_k^{dual} = \mathrm{P}_k$ . + +$$ +\begin{array}{l} \mathrm {P} _ {k} ^ {d u a l} = (I - K _ {k} H _ {k}) \hat {\mathrm {P}} _ {k} (I - K _ {k} H _ {k}) ^ {T} + K _ {k} R _ {k} K _ {k} ^ {T}, \\ = (I - K _ {k} H _ {k}) \hat {\mathrm {P}} _ {k} - (I - K _ {k} H _ {k}) \hat {\mathrm {P}} _ {k} H _ {k} ^ {T} K _ {k} ^ {T} + K _ {k} R _ {k} K _ {k} ^ {T}, \\ = \left(I - K _ {k} H _ {k}\right) \hat {\mathrm {P}} _ {k} - \hat {\mathrm {P}} _ {k} H _ {k} ^ {T} K _ {k} ^ {T} + K _ {k} H _ {k} \hat {\mathrm {P}} _ {k} H _ {k} ^ {T} K _ {k} ^ {T} + K _ {k} R _ {k} K _ {k} ^ {T}, \\ = \left(I - K _ {k} H _ {k}\right) \hat {\mathrm {P}} _ {k} - \hat {\mathrm {P}} _ {k} H _ {k} ^ {T} K _ {k} ^ {T} + K _ {k} \left(H _ {k} \hat {\mathrm {P}} _ {k} H _ {k} ^ {T} + R _ {k}\right) K _ {k} ^ {T}, \\ \end{array} +$$ + +$$ +K _ {k} = \hat {\mathrm {P}} _ {k} H _ {k} ^ {T} \left(H _ {k} \hat {\mathrm {P}} _ {k} H _ {k} ^ {T} + R\right) ^ {- 1}, +$$ + +$$ +\begin{array}{l} \mathrm {P} _ {k} ^ {d u a l} = (I - K _ {k} H _ {k}) \hat {\mathrm {P}} _ {k} - \hat {\mathrm {P}} _ {k} H _ {k} ^ {T} K _ {k} ^ {T} + \hat {\mathrm {P}} _ {k} H _ {k} ^ {T} K _ {k} ^ {T}, \\ = (I - K _ {k} H _ {k}) \dot {\mathrm {P}} _ {k} = \mathrm {P} _ {k}, \\ \end{array} +$$ + +$\mathrm{P}_k^{dual}$ is numerically equivalent to the original $\mathrm{P}_k$ + +where (30) ensures the symmetry, (31) stabilizes the positive-definiteness by decomposing the formula into the sum of two positive definite terms, which better ensures positive definiteness during floating operation. + +# A.2. The Convergence of $K^2$ VAE + +Since $K^2$ VAE models a linear dynamical system in the measurement space where the Koopman Operator serves as the state transition equation, we hope that the convergence state of the KalmanNet does not violate the assumptions of Koopman Theory. In $K^2$ VAE, we meticulously design the KalmanNet by making it gradually converge to the Koopman Operator in the forecasting horizon. + +Theorem A.2. When $U \to 0$ , the state transition equation of the KalmanNet gradually converges to the Koopman Operator. + +Proof. Under the assumptions of Koopman Theory, $u_{k} \to 0$ means the linear system constructed by Koopman Operator has little bias in the current measurement space, which leads to high performance in prediction. Meanwhile, the Predict and Update Steps of $z_{t}$ are converted to: + +$$ +\text {P r e d i c t}: \quad \hat {z} _ {k} = A z _ {k - 1} \tag {32} +$$ + +$$ +\text {U p d a t e :} K _ {k} = \hat {\mathrm {P}} _ {k} H ^ {T} \left(H \hat {\mathrm {P}} _ {k} H ^ {T} + R\right) ^ {- 1}, \tag {33} +$$ + +$$ +z _ {k} = \hat {z} _ {k} + K _ {k} \left(\hat {x} _ {k} ^ {H} - H \hat {z} _ {k}\right) \tag {34} +$$ + +In this basic case, the state transition equation obeys the basic assumptions of Koopman Theory and $A$ can be treated as a "fine-tuned" Koopman Operator $\mathcal{K}$ which is enhanced by the Kalman gain and has stronger generalization ability. + +We then consider the special case that KalmanNet fully relies on the observation $\hat{x}_k^H$ from the linear system constructed by Koopman Operator $\mathcal{K}$ , thus $H\to I, A\to 0, R\to 0$ , the Predict and Update Steps are converted to: + +$$ +\text {P r e d i c t}: \quad \hat {z} _ {k} = 0 \tag {35} +$$ + +$$ +\text {U p d a t e :} \quad z _ {k} = \hat {x} _ {k} ^ {H} \tag {36} +$$ + +The system constructed by KalmanNet can be treated as $z_{t} = \mathcal{K}z_{t - 1}$ equivalent to the original Koopman Operator. + +![](images/7e2d2798ca79497b3ebbc54b4e21073a54f03ced5ca444ba0dca8e046a8730fc.jpg) + +# B. Related Works + +# B.1. Time Series Forecasting + +Time series forecasting (TSF) predicts future observations based on historical observations. TSF methods are mainly categorized into three distinct approaches: (1) statistical learning-based methods, (2) machine learning-based methods, and (3) deep learning-based methods. Early TSF methods primarily rely on statistical learning approaches such as ARIMA (Box & Pierce, 1970), ETS (Hyndman et al., 2008), and VAR (Godahewa et al., 2021). With advancements in machine learning, methods like XGBoost (Chen & Guestrin, 2016), Random Forests (Breiman, 2001), and LightGBM (Ke et al., 2017) gain popularity for handling nonlinear patterns. However, these methods still require manual feature engineering and model design. Recently, deep learning has made impressive progress in natural language processing (Chen et al., 2024; Zhang & Qi, 2024; Wang et al., 2024e; Wu et al., 2024a; 2025a), computer vision (Zhang et al., 2025b; 2024b; Wu et al., 2025b; Cui et al., 2024b; Yu et al., 2024b; Li et al., 2025a;b; Yu et al., 2024c), multimodal (Zhang et al., 2025a; Cui et al., 2024a; Jing et al., 2023; 2024), and other aspects (Wang et al., 2025a; Yu et al., 2025b; Cui et al., 2025; Yi et al., 2025; Li et al., 2023b; Miao et al., 2024b; Wu et al., 2023b; Zhao et al., 2023; Chen et al., 2025). Studies have shown that learned features may perform better than human-designed features (Qiu et al., 2025b;a; Liu et al., 2025b; Yu et al., 2024a). Leveraging the representation learning of deep neural networks (DNNs), many deep learning-based methods emerge. TimesNet (Wu et al., 2023a) and SegRNN (Lin et al., 2023) model time series as vector sequences, using CNNs or RNNs to capture temporal dependencies. Additionally, Transformer architectures, including Informer (Zhou et al., 2021), Dsformer (Yu et al., 2023), TimeFilter (Hu et al., 2025b), TimeBridge (Liu et al., 2025c), PDF (Dai et al., 2024), Triformer (Cirstea et al., 2022a), PatchTST (Nie et al., 2023), ROSE (Wang et al., 2025c), LightGTS (Wang et al., 2025b), and MagicScaler (Pan et al., 2023b) capture complex relationships between time points more accurately, significantly improving forecasting performance. MLP-based methods, including DUET (Qiu et al., 2025d), AMD (Hu et al., 2025a), SparseTSF (Lin et al., 2024b), CycleNet (Lin et al., 2024c), NLinear (Zeng et al., 2023), and DLinear (Zeng et al., 2023), adopt simpler architectures with fewer parameters but still achieve highly competitive forecasting accuracy. + +# C. Experimental Details + +# C.1. Datasets + +In order to comprehensively evaluate the performance of $K^2$ VAE, we conduct experiments on 8 datasets of short-term forecasting and 9 datasets of long-term forecasting under the framework of ProbTS (Zhang et al., 2024a), a comprehensive benchmark used to evaluate probabilistic forecasting tasks. Specifically, we use the datasets ETTh1-S, ETTh2-S, ETTm1-S, ETTm2-S, Electricity-S, Solar-S, Traffic-S, and Exchange-S for short-term forecasting, of which the context length is equivalent to forecasting horizon with $T = L = 30$ for Exchange-S and $T = L = 24$ for the others. For long-term forecasting, we use the datasets ETTh1-L, ETTh2-L, ETTm1-L, ETTm2-L, Electricity-L, Traffic-L, Exchange-L, Weather-L, and ILI-L with prediction length $L \in \{24, 36, 48, 60\}$ for ILI-L and $L \in \{96, 192, 336, 720\}$ for the others. Note that we fix the context length of all the models with $T = 36$ for ILI-L and $T = 96$ for the others to ensure a fair comparison. Please note that although datasets with the same prefix may appear similar, they are not necessarily the same. For example, Electricity-L and Electricity-S are not the same dataset, despite both having the prefix "Electricity." The datasets we use are all derived from the authoritative probabilistic forecasting benchmark, ProbTS. Furthermore, due to the differences in long-term and short-term tasks, the datasets used for long-term and short-term forecasting in ProbTS and $K^2$ VAE are also different. Table 7 lists statistics of the multivariate time series datasets. + +# C.2. Baselines + +In the realm of probabilistic time series forecasting, numerous models have surfaced in recent years. Following the experimental setting in ProbTS, we compare $K^2$ VAE with 11 strong baselines including 4 point forecasting models: FITS, PatchTST, iTransformer, Koopa, and 7 generative models: TSDiff, $D^3$ VAE, GRU NVP, GRU MAF, Trans MAF, TimeGrad, CSDI on both short-term and long-term probabilistic forecasting scenarios. The specific code repositories for each of these models—see Table 8. + +# C.3. Evaluation Metrics + +We use two commonly-used metrics NMAE (Normalized Mean Absolute Error) and CPRS (Continuous Ranked Probability Score) in ProbTS (Zhang et al., 2024a) to evaluate the probabilistic forecasts. + +Table 7. Dataset Summary. + +
HorizonDataset#var.rangefreq.timestepsDescription
Long-termETTh1/h2-L7R+H17,420Electricity transformer temperature per hour
ETTm1/m2-L7R+15min69,680Electricity transformer temperature every 15 min
Electricity-L321R+H26,304Electricity consumption (Kwh)
Traffic-L862(0,1)H17,544Road occupancy rates
Exchange-L8R+Busi. Day7,588Daily exchange rates of 8 countries
ILI-L7(0,1)W966Ratio of patients seen with influenza-like illness
Weather-L21R+10min52,696Local climatological data
Short-termETTh1/h2-S7R+H17,420Electricity transformer temperature per hour
ETTm1/m2-S7R+15min69,680Electricity transformer temperature every 15 min
Exchange-S8R+Busi. Day6,071Daily exchange rates of 8 countries
Solar-S137R+H7,009Solar power production records
Electricity-S370R+H5,833Electricity consumption
Traffic-S963(0,1)H4,001Road occupancy rates
+ +Table 8. Code repositories for baselines. + +
BaselinesCode repositories
Koopahttps://github.com/thuml/koopa
iTransformerhttps://github.com/thuml/iTransformer
FITShttps://github.com/VEWOXIC/FITS
PatchTSThttps://github.com/yuqinie98/PatchTST
TSDiffhttps://github.com/amazon-science/unconditional-time-series-diffusion
D3VAEhttps://github.com/PaddlePaddle/PaddleSpatial/tree/main/research/D3VAE
GRU NVPhttps://github.com/zalandoresearch/pytorch-ts
GRU MAFhttps://github.com/zalandoresearch/pytorch-ts
Trans MAFhttps://github.com/zalandoresearch/pytorch-ts
TimeGradhttps://github.com/yuqinie98/PatchTST
CSDIhttps://github.com/ermongroup/CSDI
K2VAE (ours)https://github.com/decisionintelligence/K2VAE
+ +Normalized Mean Absolute Error (NMAE) The Normalized Mean Absolute Error (NMAE) is a normalized version of the MAE, which is dimensionless and facilitates the comparability of the error magnitude across different datasets or scales. The mathematical representation of NMAE is given by: + +$$ +\mathrm {N M A E} = \frac {\sum_ {k = 1} ^ {K} \sum_ {t = 1} ^ {T} \left| x _ {t} ^ {k} - \hat {x} _ {t} ^ {k} \right|}{\sum_ {k = 1} ^ {K} \sum_ {t = 1} ^ {T} \left| x _ {t} ^ {k} \right|}. \tag {37} +$$ + +Continuous Ranked Probability Score (CRPS) The Continuous Ranked Probability Score (CRPS) (Matheson & Winkler, 1976) quantifies the agreement between a cumulative distribution function (CDF) $F$ and an observation $x$ , represented as: + +$$ +\operatorname {C R P S} = \int_ {\mathbb {R}} (F (z) - \mathbb {I} \{x \leq z \}) ^ {2} d z, \tag {38} +$$ + +where $\mathbb{I}\{x\leq z\}$ denotes the indicator function, equating to one if $x\leq z$ and zero otherwise. + +Being a proper scoring function, CRPS reaches its minimum when the predictive distribution $F$ coincides with the data distribution. When using the empirical CDF of $F$ , denoted as $\hat{F}(z) = \frac{1}{n} \sum_{i=1}^{n} \mathbb{I}\{X_i \leq z\}$ , where $n$ represents the number of samples $X_i \sim F$ , CRPS can be precisely calculated from the simulated samples of the conditional distribution $p_\theta(\mathbf{x}_t | \mathbf{h}_t)$ . In our practice, 100 samples are employed to estimate the empirical CDF. + +# C.4. Implementation Details + +For each method, we adhere to the hyper-parameter as specified in their original papers. Additionally, we perform hyperparameter searches across multiple sets, with a limit of 8 sets. The optimal result is then selected from these evaluations, contributing to a comprehensive and unbiased assessment of each method's performance. + +The "Drop Last" issue is reported by several researchers (Qiu et al., 2024; 2025c; Li et al., 2025c). That is, in some previous works evaluating the model on test set with drop-last=True setting may cause additional errors related to test batch size. In our experiment, to ensure fair comparison in the future, we set the drop last to False for all baselines to avoid this issue. + +All experiments are conducted using PyTorch (Paszke et al., 2019) in Python 3.10 and execute on an NVIDIA Tesla-A800 GPU. The training process is guided by the $\mathcal{L}_{ELBO}$ and $\mathcal{L}_{Rec}$ , employing the ADAM optimizer. Initially, the batch size is set to 32, with the option to reduce it by half (to a minimum of 8) in case of an Out-Of-Memory (OOM) situation. To ensure reproducibility and facilitate experimentation, datasets and code are available at: https://github.com/decisionintelligence/K2VAE. + +# C.5. Full Results + +We provide all the main results of LPTSF in Table 9 and Table 10, covering all four horizons ( $L \in \{96, 192, 336, 720\}$ ) on 9 real world datasets. The results show that $K^2$ VAE achieves a comprehensive lead in long-term prediction tasks, not only outperforming generative models specialized for probabilistic prediction but also demonstrating significant advantages compared to long-term point-based prediction models. + +We provide the complete results of ablation studies in Table 12-13. We compare the different variants under various tasks across different horizons, empirical results demonstrate that $K^2$ VAE adopts the most appropriate design. + +We also provide the complete efficiency analyses under different forecasting scenarios, which demonstrates that our proposed $K^2$ VAE exhibits low memory overhead, fast inference speed, and high accuracy across various tasks. Compared to generative models such as those diffusion-based or flow-based models, $K^2$ VAE is both more precise and lightweight. + +Table 9. Results of CRPS (meanstd) on long-term forecasting scenarios, each containing five independent runs with different seeds. The context length is set to 36 for the ILI-L dataset and 96 for the others. Lower CRPS values indicate better predictions. The means and standard errors are based on 5 independent runs of retraining and evaluation. Red: the best, Blue: the 2nd best. + +
DatasetHorizonKoopaiTransformerFITSPatchTSTGRU MAFTrans MAFTSDiffCSDITimeGradGRU NVP\( K^2 \)VAE
ETTm1-L960.285±0.0180.301±0.0330.267±0.0230.261±0.0510.295±0.0550.313±0.0450.344±0.0500.236±0.0060.522±0.1050.383±0.0530.232±0.010
1920.289±0.0240.314±0.0230.261±0.0220.275±0.0300.389±0.0330.424±0.0290.345±0.0350.291±0.0250.603±0.0920.396±0.0300.259±0.013
3360.286±0.0350.311±0.0290.275±0.0300.285±0.0280.429±0.0210.481±0.0190.462±0.0430.322±0.0330.601±0.0280.486±0.0320.262±0.030
7200.295±0.0270.455±0.0210.305±0.0240.304±0.0290.536±0.0330.688±0.0430.478±0.0270.448±0.0380.621±0.0370.546±0.0360.294±0.026
ETTm2-L960.178±0.0230.181±0.0310.162±0.0530.142±0.0340.177±0.0240.227±0.0130.175±0.0190.115±0.0090.427±0.0420.319±0.0440.126±0.007
1920.185±0.0140.190±0.0100.185±0.0530.172±0.0230.411±0.0260.253±0.0370.255±0.0290.147±0.0080.424±0.0610.326±0.0250.148±0.009
3360.198±0.0150.206±0.0550.218±0.0530.195±0.0420.377±0.0230.253±0.0130.328±0.0470.190±0.0180.469±0.0490.449±0.1450.164±0.010
7200.233±0.0250.311±0.0240.449±0.0340.229±0.0360.272±0.0290.355±0.0430.344±0.0460.239±0.0350.470±0.0540.561±0.2730.221±0.023
ETTh1-L960.307±0.0330.292±0.0320.294±0.0230.312±0.0360.293±0.0370.333±0.0450.395±0.0520.437±0.0180.455±0.0460.379±0.0300.264±0.020
1920.301±0.0140.298±0.0200.304±0.0280.313±0.0340.348±0.0750.351±0.0630.467±0.0440.496±0.0510.516±0.0380.425±0.0190.290±0.016
3360.312±0.0190.327±0.0430.318±0.0230.319±0.0350.377±0.0260.371±0.0310.450±0.0270.454±0.0250.512±0.0260.458±0.0540.308±0.021
7200.318±0.0090.350±0.0190.348±0.0250.323±0.0200.393±0.0430.363±0.0530.516±0.0270.528±0.0120.523±0.0270.502±0.0390.314±0.011
ETTh2-L960.199±0.0120.185±0.0130.187±0.0110.197±0.0210.239±0.0190.263±0.0200.336±0.0210.164±0.0130.358±0.0260.432±0.1410.162±0.009
1920.198±0.0220.199±0.0190.195±0.0220.204±0.0550.313±0.0340.273±0.0240.265±0.0430.226±0.0180.457±0.0810.625±0.1700.186±0.018
3360.262±0.0190.271±0.0330.246±0.0440.277±0.0540.376±0.0340.265±0.0420.350±0.0310.274±0.0220.481±0.0780.793±0.3190.257±0.023
7200.293±0.0260.542±0.0150.314±0.0220.304±0.0180.990±0.0230.327±0.0330.406±0.0560.302±0.0400.445±0.0160.539±0.0900.280±0.014
Electricity-L960.110±0.0040.102±0.0040.105±0.0060.126±0.0050.083±0.0090.088±0.0140.344±0.0060.153±0.1370.096±0.0020.094±0.0030.073±0.002
1920.109±0.0110.104±0.0140.112±0.1040.123±0.0320.093±0.0240.097±0.0090.345±0.0060.200±0.0940.100±0.0040.097±0.0020.080±0.004
3360.121±0.0110.104±0.0100.111±0.0140.131±0.0240.095±0.001-0.462±0.054-0.102±0.0070.099±0.0010.054±0.001
7200.113±0.0180.109±0.0440.115±0.0240.127±0.0150.106±0.007-0.478±0.005-0.108±0.0030.114±0.0130.057±0.005
Traffic-L960.297±0.0190.256±0.0040.258±0.0040.194±0.0020.215±0.0030.208±0.0040.294±0.003-0.202±0.0040.187±0.0020.086±0.001
1920.308±0.0090.250±0.0020.275±0.0030.198±0.004--0.306±0.004-0.208±0.0030.192±0.0010.088±0.002
3360.334±0.0170.261±0.0010.327±0.0010.204±0.002--0.317±0.006-0.213±0.0030.201±0.0040.195±0.003
7200.358±0.0220.284±0.0040.374±0.0040.214±0.001--0.391±0.002-0.220±0.0020.211±0.0040.200±0.001
Weather-L960.132±0.0080.131±0.0110.210±0.0130.131±0.0070.139±0.0080.105±0.0110.104±0.0200.068±0.0080.130±0.0170.116±0.0130.080±0.007
1920.133±0.0170.132±0.0180.205±0.0190.131±0.0140.143±0.0200.142±0.0220.134±0.0120.068±0.0060.127±0.0190.122±0.0210.079±0.009
3360.136±0.0210.132±0.0100.221±0.0050.137±0.0080.129±0.0120.133±0.0140.137±0.0100.083±0.0020.130±0.0060.128±0.0110.082±0.010
7200.140±0.0070.133±0.0040.267±0.0030.142±0.0050.122±0.0060.113±0.0040.152±0.0030.087±0.0030.113±0.0110.110±0.0040.084±0.003
Exchange-L960.063±0.0060.061±0.0030.048±0.0040.063±0.0060.026±0.0100.028±0.0020.079±0.0070.028±0.0030.068±0.0030.071±0.0060.031±0.002
1920.065±0.0200.062±0.0100.049±0.0110.067±0.0080.034±0.0090.046±0.0170.134±0.0120.134±0.0120.143±0.0200.143±0.0210.129±0.011
3360.072±0.0080.067±0.0080.052±0.0130.071±0.0170.058±0.0230.045±0.0100.181±0.0170.181±0.0170.172±0.0170.172±0.0170.172±0.017
7200.091±0.0120.087±0.0230.074±0.0110.097±0.0070.160±0.0190.148±0.0170.148±0.0170.143±0.0200.143±0.0210.143±0.0210.143±0.021
ILI-L240.245±0.0180.212±0.0130.233±0.0150.312±0.0140.097±0.010------
360.214±0.008----------
48-----------
60-----------
+ +Due to the excessive time and memory consumption, some results are unavailable in our implementation and denoted as - + +Table 10. Results of NMAE (meanstd) on long-term forecasting scenarios, each containing five independent runs with different seeds. The context length is set to 36 for the ILI-L dataset and 96 for the others. Lower NMAE values indicate better predictions. The means and standard errors are based on 5 independent runs of retraining and evaluation. Red: the best, Blue: the 2nd best. + +
DatasetHorizonKoopaiTransformerFITSPatchTSTGRU MAFTrans MAFTSDiffCSDITimeGradGRU NVP\( K^2\text{VAE} \)
ETTm1-L960.362±0.0220.369±0.0290.349±0.0320.329±0.1000.402±0.0870.456±0.0420.441±0.0210.308±0.0050.645±0.1290.488±0.0580.284±0.011
1920.365±0.0320.384±0.0410.341±0.0320.338±0.0220.476±0.0460.553±0.0120.441±0.0190.377±0.0260.748±0.0840.514±0.0420.323±0.020
3360.364±0.0260.380±0.0200.356±0.0220.344±0.0130.522±0.0190.590±0.0470.571±0.0330.419±0.0420.759±0.0150.630±0.0290.330±0.014
7200.377±0.0370.490±0.0380.406±0.0720.382±0.0660.711±0.0810.822±0.0340.622±0.0450.578±0.0510.793±0.0340.707±0.0500.373±0.032
ETTm2-L960.225±0.0390.221±0.0390.210±0.0400.216±0.0350.212±0.0820.279±0.0310.224±0.0330.146±0.0120.525±0.0470.413±0.0590.144±0.011
1920.233±0.0260.229±0.0310.234±0.0380.215±0.0220.535±0.0290.292±0.0410.316±0.0400.189±0.0120.530±0.0600.427±0.0330.170±0.009
3360.267±0.0230.245±0.0490.276±0.0190.234±0.0240.407±0.0430.309±0.0320.397±0.0510.248±0.0240.566±0.0470.580±0.1690.187±0.021
7200.290±0.0330.385±0.0420.540±0.0520.288±0.0340.355±0.0480.475±0.0290.416±0.0650.306±0.0400.561±0.0440.749±0.3850.275±0.035
ETTh1-L960.407±0.0520.386±0.0920.393±0.1420.407±0.0220.371±0.0340.423±0.0470.510±0.0290.557±0.0220.585±0.0580.481±0.0370.336±0.041
1920.396±0.0220.388±0.0410.406±0.0790.405±0.0880.430±0.0220.451±0.0120.596±0.0560.625±0.0650.680±0.0580.531±0.0180.372±0.023
3360.406±0.0280.415±0.0220.410±0.0630.412±0.0240.462±0.0490.481±0.0410.581±0.0350.574±0.0260.666±0.0470.580±0.0640.394±0.022
7200.412±0.0080.449±0.0220.468±0.0120.428±0.0240.496±0.0190.455±0.0250.657±0.0170.657±0.0140.672±0.0150.643±0.0460.396±0.012
ETTh2-L960.249±0.0150.234±0.0110.243±0.0090.247±0.0280.292±0.0120.345±0.0420.421±0.0330.214±0.0180.448±0.0310.548±0.1580.189±0.010
1920.249±0.0320.247±0.0400.252±0.0220.265±0.0910.376±0.1120.343±0.0440.339±0.0330.294±0.0270.575±0.0890.766±0.2230.213±0.021
3360.274±0.0270.297±0.0290.291±0.0320.314±0.0450.454±0.0570.333±0.0780.427±0.0410.353±0.0280.606±0.0950.942±0.4080.263±0.039
7200.286±0.0420.667±0.0120.401±0.0220.371±0.0211.092±0.0190.412±0.0200.482±0.0220.382±0.0300.550±0.0180.688±0.1610.278±0.020
Electricity-L960.146±0.0150.134±0.0020.137±0.0020.168±0.0120.108±0.0090.114±0.0100.441±0.0130.203±0.1890.119±0.0030.118±0.0030.093±0.002
1920.143±0.0230.137±0.0220.143±0.1120.163±0.0320.120±0.0330.131±0.0080.441±0.0050.264±0.1290.124±0.0050.121±0.0030.102±0.010
3360.151±0.0170.136±0.0020.139±0.0020.168±0.0100.122±0.018-0.571±0.022-0.126±0.0080.123±0.0010.107±0.002
7200.149±0.0250.140±0.0090.149±0.0120.164±0.0240.136±0.098-0.622±0.142-0.134±0.0040.144±0.0170.117±0.019
Traffic-L960.377±0.0240.332±0.0080.332±0.0070.228±0.0100.274±0.0120.265±0.0070.342±0.042-0.234±0.0060.231±0.0030.230±0.010
1920.388±0.0110.326±0.0090.350±0.0100.225±0.012--0.354±0.012-0.239±0.0040.236±0.0020.234±0.003
3360.416±0.0280.335±0.0100.405±0.0110.242±0.022--0.392±0.006-0.246±0.0030.248±0.0060.242±0.007
7200.432±0.0320.361±0.0300.453±0.0220.253±0.012--0.478±0.006-0.263±0.0010.264±0.0060.248±0.010
Weather-L960.146±0.0190.144±0.0170.279±0.0270.145±0.0160.176±0.0110.139±0.0100.113±0.0220.087±0.0120.164±0.0230.145±0.0170.086±0.011
1920.148±0.0220.145±0.0150.264±0.0130.144±0.0120.166±0.0220.160±0.0370.144±0.0200.086±0.0070.158±0.0240.147±0.0250.083±0.011
3360.152±0.0320.146±0.0110.283±0.0210.149±0.0230.168±0.0140.170±0.0270.138±0.0330.098±0.0020.162±0.0060.160±0.0120.093±0.010
7200.162±0.0090.147±0.0190.317±0.0210.152±0.0290.149±0.0340.148±0.0400.141±0.0260.102±0.0050.136±0.0200.135±0.0080.099±0.009
Exchange-L960.079±0.0050.077±0.0010.069±0.0070.079±0.0020.033±0.0030.036±0.0090.090±0.0100.036±0.0050.079±0.0020.091±0.0090.032±0.002
1920.081±0.0150.078±0.0080.069±0.0070.081±0.0020.044±0.0040.058±0.0070.106±0.0100.058±0.0050.100±0.0190.087±0.0050.040±0.005
3360.086±0.0030.083±0.0050.071±0.0050.085±0.0100.074±0.017------
7200.116±0.0220.113±0.0150.097±0.011--------
ILI-L240.303±0.0210.265±0.027---------
360.262±0.013----------
48-----------
60-----------
+ +Due to the excessive time and memory consumption, some results are unavailable in our implementation and denoted as - + +# C.6. Model Analysis + +Table 11. Comparison on model efficiency. Lower values of Inference Speed (sec/sample) or Memory (GB) indicate higher model efficiency. L: the forecasting horizon. The results are obtained with batch size equals 1. Red: the best, Blue: the 2nd best. + +
ModelMetricElectricity-L (L = 720)ETtm1-L (L = 720)Exchange-S (L = 30)Solar-S (L = 24)Electricity-L (L = 96)ETtm1-L (L = 96)Electricity-L (L = 192)ETtm1-L (L = 192)Electricity-L (L = 336)ETtm1-L (L = 336)
TSDiffInference Speed43.0682.8411.2691.8584.7701.20012.3391.31420.5821.676
Memory0.8960.3320.0330.0400.2550.0840.3300.1220.4790.184
GRU NVPInference Speed26.2963.4600.4050.6653.4500.5807.4141.11512.4411.856
Memory0.4270.0230.0140.0400.1450.0140.1730.0150.2440.018
GRU MAFInference Speed435.10518.6350.8179.12049.4421.631177.864.853290.0009.088
Memory0.3720.0280.0130.0400.1290.0230.1750.0240.2460.025
Trans MAFInference Speed532.15119.4010.8839.27545.3671.900169.3685.336311.95410.130
Memory0.3680.0810.0110.0370.1470.0730.2010.0760.2720.075
TimeGradInference Speed--24.89619.641113.10394.888142.104155.013-284.951
Memory--0.0160.0410.1280.0160.1490.022-0.034
CSDIInference Speed-86.18219.25129.251388.31516.328659.42825.838-39.883
Memory-0.1330.1820.7231.4110.0273.0240.033-0.051
K2VAEInference Speed39.8340.9980.3090.4833.3100.2578.8360.37417.9610.475
Memory0.4740.0280.0110.0170.0940.0130.1540.0150.2400.019
+ +Due to the excessive time and memory consumption, some results are unavailable in our implementation and denoted as - + +Table 12. Comparison on different Koopman Operators. Lower CRPS or NMAE values indicate better performance. Red: the best. L: the forecasting horizon. + +
Koopman OperatorMetricsElectricity-L (L = 720)ETTm1-L (L = 720)Exchange-S (L = 30)Solar-S (L = 24)Electricity-L (L = 96)ETTm1-L (L = 96)Electricity-L (L = 192)ETTm1-L (L = 192)Electricity-L (L = 336)ETTm1-L (L = 336)
KlocCRPS--0.012±0.0020.450±0.0120.077±0.0030.298±0.0220.114±0.008---
NMAE--0.014±0.0020.566±0.0150.101±0.0040.387±0.0140.134±0.011---
KgloCRPS0.065±0.0070.311±0.0240.011±0.0010.374±0.0040.079±0.0040.248±0.0160.082±0.0040.263±0.0120.057±0.0020.268±0.026
NMAE0.130±0.0240.395±0.0270.013±0.0010.488±0.0080.109±0.0050.304±0.0210.106±0.0120.329±0.0170.114±0.0030.341±0.020
Kloc + KgloCRPS0.057±0.0050.294±0.0260.009±0.0010.367±0.0050.073±0.0020.232±0.0100.080±0.0040.259±0.0130.054±0.0010.262±0.030
NMAE0.117±0.0190.373±0.0320.009±0.0010.480±0.0080.093±0.0020.284±0.0110.102±0.0100.323±0.0200.107±0.0020.330±0.014
+ +Due to the numerical instability, some results are unavailable in our implementation and denoted as - + +Table 13. Comparison on different connections of KalmanNet. Lower CRPS or NMAE values indicate better performance. Red: the best. L: the forecasting horizon. + +
Connections in KalmanNetMetricsElectricity-L (L = 720)ETTm1-L (L = 720)Exchange-S (L = 30)Solar-S (L = 24)Electricity-L (L = 96)ETTm1-L (L = 96)Electricity-L (L = 192)ETTm1-L (L = 192)Electricity-L (L = 336)ETTm1-L (L = 336)
w/o AuxiliaryNetCRPS0.082±0.0110.359±0.0240.015±0.0020.398±0.0050.083±0.0010.268±0.0140.107±0.0080.263±0.0140.074±0.0040.267±0.025
NMAE0.188±0.0280.442±0.0290.022±0.0010.531±0.0100.099±0.0030.348±0.0110.142±0.0120.336±0.0160.147±0.0030.346±0.018
w/o skip connectionCRPS0.063±0.0070.315±0.0160.011±0.0010.388±0.0060.092±0.0040.243±0.0120.087±0.0020.277±0.0130.058±0.0010.266±0.019
NMAE0.131±0.0150.402±0.0300.013±0.0040.511±0.0080.116±0.0030.292±0.0100.114±0.0070.376±0.0220.119±0.0010.349±0.022
w/o control inputCRPS0.069±0.0050.322±0.0170.013±0.0060.423±0.0050.079±0.0020.242±0.0110.084±0.0030.269±0.0170.064±0.0010.271±0.026
NMAE0.142±0.0180.418±0.0220.017±0.0030.560±0.0090.104±0.0010.295±0.0120.108±0.0070.341±0.0190.128±0.0020.356±0.015
MixedCRPS0.057±0.0050.294±0.0260.009±0.0010.367±0.0050.073±0.0020.232±0.0100.080±0.0040.259±0.0130.054±0.0010.262±0.030
NMAE0.117±0.0190.373±0.0320.009±0.0010.480±0.0080.093±0.0020.284±0.0110.102±0.0100.323±0.0200.107±0.0020.330±0.014
+ +Table 14. Ablations on KoopmanNet and KalmanNet. Lower CRPS or NMAE values indicate better performance. Red: the best. L: the forecasting horizon. + +
VariantsMetricsElectricity-L (L = 720)ETTm1-L (L = 720)Exchange-S (L = 30)Solar-S (L = 24)Electricity-L (L = 96)ETTm1-L (L = 96)Electricity-L (L = 192)ETTm1-L (L = 192)Electricity-L (L = 336)ETTm1-L (L = 336)
w/o KoopmanNetCRPS0.074±0.0090.443±0.0340.014±0.0020.385±0.0080.079±0.0030.265±0.0180.087±0.0060.288±0.0190.114±0.0060.291±0.037
NMAE0.162±0.0150.601±0.0580.016±0.0010.528±0.0140.112±0.0060.328±0.0220.112±0.0120.382±0.0270.175±0.0090.372±0.027
w/o KalmanNetCRPS0.089±0.0110.398±0.0380.011±0.0010.375±0.0050.098±0.0040.278±0.0230.091±0.0030.375±0.0250.266±0.0120.301±0.035
NMAE0.192±0.0230.539±0.0440.012±0.0010.499±0.0090.133±0.0080.338±0.0120.122±0.0110.443±0.0330.359±0.0170.394±0.018
K2VAECRPS0.057±0.0050.294±0.0260.009±0.0010.367±0.0050.073±0.0020.232±0.0100.080±0.0040.259±0.0130.054±0.0010.262±0.030
NMAE0.117±0.0190.373±0.0320.009±0.0010.480±0.0080.093±0.0020.284±0.0110.102±0.0100.323±0.0200.107±0.0020.330±0.014
+ +# C.7. Showcases + +We provide some showcases of $K^2$ VAE in Figure 5, 6, and 7, which demonstrates the strong interval estimation capabilities of $K^2$ VAE. We observe that $K^2$ VAE achieves good performance in $95\%$ confidence interval, which means the forecasting horizon of the time series is well modeled and estimated. + +![](images/e6caca28b368a9f05f71e9e190502b89e0dda00f8e4ce69239d45179fff6162c.jpg) + +![](images/b5c5b9d9d203ed547011facea81d125c08475a04bdcecaad34c270bef0b37eca.jpg) + +![](images/722a8010fe80d5e01492ce4454ef0fa759e092d9b22d43712dda0947e51efce8.jpg) + +![](images/f09095f3911c7ad3a8e3eab11ecf0b99a8e3cc9ef80405eb585c5a47049576a5.jpg) +Figure 5. Visualization of input-24-predict-24 results on the Solar-S dataset. + +![](images/8684f445615da63c63a45b3ea19e61f390279ea807cbfc9e85fff9ced0f960fd.jpg) + +![](images/7dad8846c8b2866c19b463650c8e77e9757b5f909147b7fda90ed6845290e839.jpg) + +![](images/ee4482a0cfb8cbe29af338e0841c5bb13fd6f2365091e0a3dab4753963508ac6.jpg) + +![](images/467bc78890a43b2be1809938050fce151a32d257fea005b558539e2154e86441.jpg) + +![](images/5631586acf9f09c7b8aa5cd8aab0c567157378d573b4afc097bf5f9b462129a4.jpg) + +![](images/450db2676aae56e87e5ded3c032d20e644d3faa10d8e465c2dd23b580baa9b9f.jpg) +Figure 6. Visualization of input-96-predict-96 results on the ETTm1-L dataset. + +![](images/26893774809a5bf3230b53f3fb31e7b0215d076f0f64cec1ca9411e35a8e5daf.jpg) + +![](images/a7309de6f8d1fe506727b17a5648c2993a5c90cce32dac6d1069182a814150ad.jpg) + +![](images/959ae3cf5dd6eaf89191d25bc933007caed2895e645b3c253edc1bec36776c07.jpg) + +![](images/921a398dca80c7b23354cb4159c0affaf622ed9692574fae80462d14f1cfdd44.jpg) + +![](images/75dbe079b0e886be577fd473564925d41a81601783db4d7c2f9555dce6ce3122.jpg) + +![](images/ad6685c21c20d89478fcad13ace1e23d3dfa0d8dbcb0e0dce87d6f151dff9c48.jpg) +Figure 7. Visualization of input-96-predict-96 results on the Electricity-L dataset. + +![](images/535c2436316236092c385826983ea4f40aef2b01072e1e3c6c34b424b4ae71a9.jpg) + +![](images/f48fee803493cfd5b354767512f08372f41e6309f3c0403d1bd07e5cd8428cd0.jpg) \ No newline at end of file diff --git a/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/images.zip b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..81c09fc4d3b4fc5caeb3db035dc1ef3c2a47e7cc --- /dev/null +++ b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5cbe5f667dae8a34df4d6d3dcff6a0c4859f2b479b93f4b1449de2b21b17395 +size 2316260 diff --git a/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/layout.json b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d730c82f01cb7fe7fc89820b652585cc9c10ec9e --- /dev/null +++ b/k2vaeakoopmankalmanenhancedvariationalautoencoderforprobabilistictimeseriesforecasting/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b33f9fd0de4ac14c1ff37088b93ea55a1fe7a26b2e75d3518c689e1ecfd4052a +size 859053 diff --git a/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/95db5337-6c04-4ac6-82a6-686d937752ac_content_list.json b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/95db5337-6c04-4ac6-82a6-686d937752ac_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fe82e31d26da679a88106bba90a7b2634a2f11ad --- /dev/null +++ b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/95db5337-6c04-4ac6-82a6-686d937752ac_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:110276a9bb7e85ea338f10c21d84cf54d6ed3bb52a2486ffa9e88b7628a6e03f +size 153872 diff --git a/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/95db5337-6c04-4ac6-82a6-686d937752ac_model.json b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/95db5337-6c04-4ac6-82a6-686d937752ac_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f9f86b7c25f1744b9a3c6b73859371ee4bc68aed --- /dev/null +++ b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/95db5337-6c04-4ac6-82a6-686d937752ac_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e7baf9611954a2f969b90b33a178695f5d37b4efb86da25ac5e329bd21518aa +size 186523 diff --git a/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/95db5337-6c04-4ac6-82a6-686d937752ac_origin.pdf b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/95db5337-6c04-4ac6-82a6-686d937752ac_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..155f27b9955165a445cf11980e91a56aeea34653 --- /dev/null +++ b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/95db5337-6c04-4ac6-82a6-686d937752ac_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0147d4011c9200fecd08e01e91c1bbef78317b07d3310bb611bb04538740e57f +size 7774910 diff --git a/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/full.md b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..dc60894a2d0237182028c6974440b035b0f21446 --- /dev/null +++ b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/full.md @@ -0,0 +1,680 @@ +# VistaDPO : Video Hierarchical Spatial-Temporal Direct Preference Optimization for Large Video Models + +Haojian Huang\*1 Haodong Chen\*2 Shengqiong Wu3 Meng Luo3 Jinlan Fu3 Xinya Du4 Hanwang Zhang5 Hao Fei3 + +# Abstract + +Large Video Models (LVMs) built upon Large Language Models (LLMs) have shown promise in video understanding but often suffer from misalignment with human intuition and video hallucination issues. To address these challenges, we introduce VistaDPO, a novel framework for Video Hierarchical Spatial-Temporal Direct Preference Optimization. VistaDPO enhances text-video preference alignment across three hierarchical levels: i) Instance Level, aligning overall video content with responses; ii) Temporal Level, aligning video temporal semantics with event descriptions; and iii) Perceptive Level, aligning spatial objects with language tokens. Given the lack of datasets for fine-grained video-language preference alignment, we construct VistaDPO-7k, a dataset of 7.2K QA pairs annotated with chosen and rejected responses, along with spatial-temporal grounding information such as timestamps, keyframes, and bounding boxes. Extensive experiments on benchmarks such as Video Hallucination, Video QA, and Captioning performance tasks demonstrate that VistaDPO significantly improves the performance of existing LVMs, effectively mitigating video-language misalignment and hallucination. The code and data are available at VistaDPO Repository. + +# 1. Introduction + +Achieving human-like reasoning capabilities for videos is a critical research topic in the field of AI. In recent years, Large Video Models (LVMs) (Li et al., 2023; Zhang et al., 2023a; Lin et al., 2023; Li et al., 2024c; Wu et al., 2024a; Cheng et al., 2024b; Fei et al., 2024b; Jin et al., 2024; Qian et al., 2024; Li et al., 2025) have garnered signifi + +*Equal contribution 1The University of Hong Kong 2The Hong Kong University of Science and Technology 3National University of Singapore 4University of Texas at Dallas 5Nanyang Technological University. Correspondence to: Hao Fei . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/21923c16c58e4fb100d3257b4fa716f13b9383b8dd09bad734114f9ffab683af.jpg) +Figure 1. (a) Traditional textual DPO overlooks multimodal information, limiting video-language tasks. (b) Existing multimodal DPO methods rely on coarse alignment, missing rich temporal and perceptual details. (c&d) VistaDPO overcomes these limitations with a hierarchical spatiotemporal preference optimization framework, enabling fine-grained video-language alignment and precise reasoning over video dynamics. Here, $y_{w}$ is the preferred response over $y_{l}$ , and $v_{w}$ the visual input more likely to produce it than $v_{l}$ . + +cant research attention. Built upon Large Language Models (LLMs) (Touvron et al., 2023; Bai et al., 2023; Peng et al., 2023; Dubey et al., 2024), LVMs leverage the powerful intelligence of LLMs in language, achieving unprecedented understanding of video content. However, increasing studies reveal that LVMs encounter critical issues, such as video understanding that deviates from human intuition (Zhou et al., 2024a; Fei et al., 2024a; Cheng et al., 2024a; Hu et al., 2024) or the phenomenon of video hallucination (Wang et al., 2024; Sahoo et al., 2024; Yuan et al., 2024), where the model outputs content that does not align with the input, e.g., user instructions, video content. The root of these issues lies in the inherent nature of current LVM architectures (Yan et al., 2021; Cheng et al., 2024b; Lin et al., 2023), where most LVMs integrate a video encoder (e.g., ViT) into text- + +oriented LLMs through a connector to achieve video signal interpretation. Since backbone LLMs undergo extensive pre-training on large-scale language data while video encoders lack peer capability, this gap leads LLMs to produce overly confident outputs based on biased or even incorrect perceptions of video content from the encoder. While the supervised fine-tuning (SFT) with video-language pairs (Wang et al., 2024; Leng et al., 2024; Yuan et al., 2024) can partially improve the alignment between the two modalities in LVMs, fundamentally addressing the issue requires reliance on extremely large-scale data. + +Recently, Direct Preference Optimization (DPO) (Rafailov et al., 2024) has been proposed as a promising alternative to SFT. It trains LLMs to prefer responses chosen by evaluators over rejected ones when presented with a user query. By identifying which response better aligns with human preferences rather than requiring precise target outputs, DPO significantly alleviates dependence on annotated data while enhancing alignment with human values and effectively addressing hallucination issues. Some follow-up studies (Xie et al., 2024; Liu et al., 2024d; Zhou et al., 2024b; Fu et al., 2025b) have extended DPO from textual to multimodal LLMs, facilitating cross-modal alignment and improving the generalization capabilities of the models. Most recently, Hound-DPO (Zhang et al., 2024b) pioneers a video DPO, demonstrating that tailored rewards through DPO can significantly enhance the performance of LVMs. Unfortunately, we find that this work straightforwardly applies the DPO strategy designed for image-text LLMs to video-language preference alignment (as shown in Figure 1), which introduces two critical limitations. First, Zhang et al. (2024b) fails to adequately consider the temporal characteristics of videos. Unlike static images, videos always require both spatial semantic understanding and dynamic temporal reasoning (Fei et al., 2024c), necessitating a comprehensive modeling of the spatial-temporal attributes of videos. Second, their work focuses solely on coarse-grained alignment between video and language (response text) at the instance level, which may lead to suboptimal preference alignment (Zeng et al., 2024; Gunjal et al., 2024). We emphasize that achieving proper alignment between two modalities requires a fine-grained preference alignment. Intuitively, dynamic videos correspond to paired text at multiple hierarchical levels. + +To address these challenges, we propose a novel framework, Video Hierarchical Spatial-Temporal Direct Preference Optimization (namely VistaDPO), aiming to strengthen LVMs. VistaDPO improves text-video preference alignment across hierarchical granularities. Specifically, we design three levels of alignment (as shown in Figure 1): + +$\triangleright$ Instance Level: Matching the overall video content with the most appropriate response for semantic alignment. +$\triangleright$ Temporal Level: Aligning video temporal semantics + +with event descriptions, enabling temporal reasoning. + +$\triangleright$ Perceptive Level: Aligning video spatial objects (i.e., regions of interest) with objective tokens or phrases in the language at a fine-grained semantic level. + +To implement such fine-grained preference optimization, we construct a large-scale spatial-temporally grounded video dataset called VistaDPO-7k. We manually annotate 3,878 videos with spatial-temporal groundings in a video QA format, providing high-quality labels for hallucinated and non-hallucinated answers, along with timestamps, keyframes, and bounding boxes of relevant semantics. + +We conduct extensive evaluation on benchmarks including Video Hallucination, Video QA, Captioning Tasks, by post-training existing popular LVMs with the proposed VistaDPO. The results show that VistaDPO consistently improves baseline LVMs, achieving significant average improvements of $26.42\%$ over PLLaVA and $53.92\%$ over Video-LLaVA respectively. Through in-depth analysis, we show that VistaDPO effectively and comprehensively captures the dynamic interactions between video content and texts, thanks to its hierarchical spatial-temporal alignment strategy. To summarize, this work contributes in threefold: + +- Propose a novel Video Hierarchical Spatial-Temporal DPO (VistaDPO) mechanism, a more fine-grained DPO strategy to optimize the alignment between video and language in LVMs. +- Construct and release a large-scale (7.2K) high-quality annotated QA pairs dataset, which can serve as a valuable resource for follow-up video DPO research. +- Empirically, VistaDPO significantly improves the generalization capabilities of existing LVMs, effectively mitigating video-language misalignment and hallucination. + +# 2. Related Work + +By building on powerful LLMs and integrating various multimodal encoders, researchers have developed MLLMs (Liu et al., 2024a; Fu et al., 2025a; Yin et al., 2024; Wu et al., 2024b) and LVMs (Li et al., 2023; Zhang et al., 2023a; Lin et al., 2023; Li et al., 2024c; Cheng et al., 2024b; Jin et al., 2024; Li et al., 2025). Through necessary SFT on visual instruction-tuning data, MLLMs and LVMs have not only developed robust multimodal understanding capabilities but have also significantly enhanced human-computer interaction, making cross-modal interactions more intuitive and seamless. Unfortunately, inheriting the intrinsic hallucination issues of LLMs, LVMs also frequently suffer from hallucinations (Liu et al., 2024b; Zhang et al., 2024b; Li et al., 2024a; Sahoo et al., 2024) or fail to align their understanding of visual content with human values. Increasing the volume of multimodal SFT data has been shown to alleviate these issues to some extent (Ahn et al., 2024; Tan et al., 2024; Jiang et al., 2024; Chen et al., 2024). However, this approach is often accompanied by higher annotation + +costs and computational expenses. This challenge is particularly pronounced in video scenarios, where LVMs demand significantly larger datasets and higher training costs. + +Subsequently, the community has introduced the DPO technique (Rafailov et al., 2024), where preference alignment aligns LLMs with human values, reducing hallucinations by guiding the model's adjustments using pairs of preferred and rejected data. Multimodal preference alignment, as an extension of preference alignment techniques to visual and textual inputs, has been widely applied to MLLMs to improve cross-modal alignment (Liu et al., 2024d; Xie et al., 2024; Zhou et al., 2024b) as shown in Table 5. Recently, Hound-DPO, pioneered by Zhang et al. (2024b), successfully applies multimodal DPO to LVMs, improving video understanding and addressing hallucination issues. However, it overlooks the preference alignment of visual inputs. In this paper, we aim to further enhance the effectiveness of DPO in video scenarios by modeling fine-grained alignments between video and language. To achieve this, we propose a hierarchical preference optimization framework that efficiently captures dynamic spatial-temporal dependencies in video tasks. + +# 3. Preliminaries + +Direct Preference Optimization (DPO) (Rafailov et al., 2024) aligns language models with human preferences, removing the need for explicit reward modeling or reinforcement learning (RL). Given a model $\pi_{\theta}$ (the target model) and a reference policy $\pi_{\mathrm{ref}}$ (from supervised fine-tuning), the RL objective in reinforcement learning with human feedback (RLHF), initialized with $\pi_{\theta} = \pi_{\mathrm{ref}}$ , is expressed as: + +$$ +\begin{array}{l} \max _ {\pi_ {\theta}} \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {\theta} (y | x)} [ r (x, y) ] \tag {1} \\ - \beta \mathbb {D} _ {\mathrm {K L}} [ \pi_ {\theta} (y \mid x) \| \pi_ {\text {r e f}} (y \mid x) ], \\ \end{array} +$$ + +where $r(x,y)$ denotes the reward function with $x$ as the input instruction and $y$ as the response. DPO establishes a mapping between the reward model and the optimal policy under the reverse KL divergence, obtaining a representation of the reward function concerning the policy: + +$$ +r (x, y) = \beta \log \frac {\pi_ {\theta} (y | x)}{\pi_ {\operatorname {r e f}} (y | x)} + \beta \log Z (x), \tag {2} +$$ + +where $\beta$ is a coefficient for the reverse KL divergence penalty, and $Z(x)$ is the partition function. + +Given the chosen response $y_{w}$ , preferred over the rejected response $y_{l}$ , DPO aligns with human preference using the Bradley-Terry model for pairwise comparisons: + +$$ +P _ {\mathrm {B T}} \left(y _ {w} \succ y _ {l} \mid x\right) = \frac {\exp \left(r \left(x , y _ {w}\right)\right)}{\exp \left(r \left(x , y _ {w}\right)\right) + \exp \left(r \left(x , y _ {l}\right)\right)}. \tag {3} +$$ + +By substituting Eq. 2 into Eq. 3 and leveraging the negative + +log-likelihood loss, DPO derives the objective function: + +$$ +\begin{array}{l} u (x, y _ {w}, y _ {l}) = \beta \log \frac {\pi_ {\theta} \left(y _ {w} \mid x\right)}{\pi_ {\text {r e f}} \left(y _ {w} \mid x\right)} - \beta \log \frac {\pi_ {\theta} \left(y _ {l} \mid x\right)}{\pi_ {\text {r e f}} \left(y _ {l} \mid x\right)}, \tag {4} \\ \mathcal {L} _ {\mathcal {D P O}} = - \mathbb {E} _ {(x, y _ {w}, y _ {l})} [ \log \sigma (u (x, y _ {w}, y _ {l})) ], \\ \end{array} +$$ + +where the action score with $y_{i}$ denotes the $i$ -th token of the response $y$ can be formulated as: + +$$ +\log \pi (y | x) = \sum_ {y _ {i} \in y} \log p \left(y _ {i} \mid x, y _ {< i}\right). \tag {5} +$$ + +# 4. VistaDPO-7k: A Spatial-temporal Grounded Video DPO Dataset + +Existing LVMs often suffer from limited spatial-temporal perception, leading to video-language misalignment and hallucination issues (Lan et al., 2024). We propose VistaDPO with spatial-temporal DPO to achieve fine-grained alignment between video and language modalities. To support this, we construct a spatial-temporal grounded dataset, VistaDPO-7k, by integrating data from 14 prevalent video datasets and systematically designing QA pairs to evaluate and mitigate hallucinations. These hallucinations are categorized into two major dimensions: Perception (e.g., Object, Static/Dynamic Attribute, Static Relation, OCR) and Temporal (e.g., Action, Dynamic Relation, Sequence), covering both static and dynamic aspects of video understanding. The dataset provides chosen and rejected responses, along with fine-grained temporal dependencies that include key timestamps, frames, and bounding boxes, enabling models to better capture spatial-temporal interactions, as can be shown in Figure 2(a). VistaDPO-7k supports multilevel preference optimization across Temporal, Perceptive, and Instance levels, offering a robust benchmark to reduce hallucinations and enhance the spatial-temporal reasoning capabilities of LVMs. Please refer to Appendix §B for more details on dataset construction and specifications. + +# 5. Methodology + +To tackle the spatiotemporal complexities in video-language tasks, we propose VistaDPO, which implements hierarchical preference optimization across three aspects: (i) Instance-wise Semantic Preference Optimization, aligning preferences at response and video levels; (ii) Temporal Action-Event Preference Optimization, capturing overlooked temporal dynamics; and (iii) Perceptive Spatial-Object Preference Optimization, enabling fine-grained alignment between tokens and objects. Figure 2(b) illustrates the overall architecture of VistaDPO. + +# 5.1. Instance-wise Semantic Preference Optimization + +Effective video-language alignment hinges on distinguishing preferred (chosen) from non-preferred (rejected) responses while capturing global video content. To address hallucinations and misalignments caused by spatiotempo + +![](images/91e42226c3675db61c18377add9b7da889759febf9166747396c8f8ca12f6bc4.jpg) +(a) Metadata of VistaDPO-7k +Figure 2. (a) The metadata of VistaDPO-7k highlights its focus on fine-grained video-language tasks, emphasizing temporal $(44\%)$ and perceptual $(56\%)$ reasoning. $y_{l}^{ir}$ and $y_{l}^{re}$ denote the irrelevant and relevant non-preferred responses respectively. (b) VistaDPO introduces a hierarchical spatiotemporal preference optimization framework. Instance $(v^{v})$ and perceptive $(v^{f})$ levels align global-to-local semantics with spatial visual features, leveraging both text-relevant and irrelevant rejected responses for robust cross-modal interaction. Temporal $(v^{c})$ level aligns clip-level semantics with temporal dynamics, enabling precise reasoning across spatial and temporal dimensions. + +![](images/0b7e2964cd4798793bb130b459cb485a996255dcb5d64c51ee6a0160daed0bea.jpg) +(b) Illustration of VistaDPO + +ral complexities and over-reliance on text, we propose response-level alignment to refine preference differentiation and video-level alignment to enhance instance-wise semantic understanding. + +Response-Level Alignment. LVMs often face challenges in maintaining global consistency when generating responses. While these models effectively capture the general context of video input $v$ and prompt $x$ , they frequently struggle to distinguish user-preferred responses $y_{w}$ from non-preferred responses $y_{l}$ at the response level, leading to suboptimal alignment with user intent. To promote overall consistency by encouraging the model to align its response-level preferences with human expectations, the objective function can be formulated as: + +$$ +\mathcal {L} _ {\mathcal {D P O} _ {r}} = - \mathbb {E} _ {(v, x, y _ {w}, y _ {l})} \left[ \log \sigma \left(u _ {r} (v, x, y _ {w}, y _ {l})\right) \right], \tag {6} +$$ + +where + +$$ +u _ {r} = \beta \log \frac {\pi_ {\theta} \left(y _ {w} | v , x\right)}{\pi_ {\text {r e f}} \left(y _ {w} | v , x\right)} - \beta \log \frac {\pi_ {\theta} \left(y _ {l} | v , x\right)}{\pi_ {\text {r e f}} \left(y _ {l} | v , x\right)}. \tag {7} +$$ + +Here, $\log \pi (y|v,x)$ is defined as: + +$$ +\log \pi (y | v, x) = \sum_ {y _ {i} \in y} \log p \left(y _ {i} | v, x, y _ {< i}\right). \tag {8} +$$ + +The existing method of Hound-DPO (Zhang et al., 2024b) directly adopts the above approach, focusing solely on aligning the chosen response with the prompt. Nevertheless, the complex spatial-temporal dependencies in rejected responses are completely neglected. Intuitively, intrinsic hallucinations in generative models typically arise from: 1) erroneously inferring content that does not exist in the video; + +2) failing to capture the fine-grained spatial-temporal dependencies of the correct content in the video. To mitigate this, we further introduce two types of non-preferred responses into the optimization process: + +$$ +\log \frac {\pi_ {\theta} \left(y _ {l} \mid v , x\right)}{\pi_ {\mathrm {r e f}} \left(y _ {l} \mid v , x\right)} \leftarrow \sum_ {i \in \{r e, i r \}} \beta_ {i} \log \frac {\pi_ {\theta} \left(y _ {l} ^ {i} \mid v , x\right)}{\pi_ {\mathrm {r e f}} \left(y _ {l} ^ {i} \mid v , x\right)}, \tag {9} +$$ + +where $y_{l}^{re}$ denotes the relevant non-preferred for these are semantically relevant to the video content but contain spatial or temporal inconsistencies, e.g., incorrect temporal ordering, wrong actions, or misinterpreted spatial locations. In contrast, $y_{l}^{ir}$ denotes the irrelevant non-preferred responses, which are entirely unrelated to the video content, introducing noise by hallucinating events or objects with no connection to the actual video. + +Video-Level Alignment. Unlike most prior DPO works, which focus exclusively on textual optimization, we introduce video-level preference optimization for the first time to reduce LVMs' overreliance on language. At the video level, the model needs to understand the preference relationships of the entire video as a coherent semantic unit. However, since LVMs are prone to hallucinations involving irrelevant video content, we optimize the model to recognize global discrepancies among videos. To this end, we construct video-level preferred and non-preferred sample pairs, denoted as $v_{w}^{v}$ and $v_{l}^{v}$ . Thus $u_{v}(v_{w}^{v}, v_{l}^{v}, x, y_{w})$ within $\mathcal{L}_{\mathcal{DPO}_v}$ can be formulated as: + +$$ +u _ {v} = \beta \log \frac {\pi_ {\theta} \left(y _ {w} \mid v _ {w} ^ {v} , x\right)}{\pi_ {\text {r e f}} \left(y _ {w} \mid v _ {w} ^ {v} , x\right)} - \beta \log \frac {\pi_ {\theta} \left(y _ {l} \mid v _ {l} ^ {v} , x\right)}{\pi_ {\text {r e f}} \left(y _ {l} \mid v _ {l} ^ {v} , x\right)}, \tag {10} +$$ + +where $v_{l}^{v}$ is sampled from the mini-batch that is unrelated + +to the query $x$ in this work. + +# 5.2. Temporal Semantic Preference Optimization + +Clip-Level Alignment. While previous multimodal DPO methods have mainly focused on the spatial aspects of visual samples (as shown in Table 5), unlike static images, videos require both spatial semantic understanding and dynamic temporal reasoning. This necessitates a comprehensive modeling of the spatial-temporal attributes of videos. + +At the temporal level, the model must distinguish between time segments in the video that are relevant to the prompt and those that are irrelevant. To align video temporal semantics with event descriptions provided in the prompt, we treat time segments related to the prompt as preferred clips $v_{w}^{c}$ and time segments unrelated to the prompt as non-preferred clips $v_{l}^{c}$ , as shown in Figure 2. Following Eq. (10), the clip-level objective function can be defined as: + +$$ +\mathcal {L} _ {\mathcal {D P O} _ {c}} \sim \log \sigma \left(u _ {c} \left(v _ {w} ^ {c}, v _ {l} ^ {c}, x, y _ {w}\right)\right). \tag {11} +$$ + +# 5.3. Perceptive Spatial-Object Preference Optimization + +While instance-wise alignment captures global semantics, fine-grained perceptual alignment is crucial for precise video-language interaction. Videos inherently involve complex spatial relationships, where objects, actions, and regions dynamically interact over time. Language, in turn, encodes these interactions through specific tokens, making it essential to establish detailed alignment between spatial objects and their corresponding linguistic references. + +Object-Level Spatial Alignment. At the spatial level, the model needs to capture the key locations and states of objects within the video. However, LVMs are often prone to hallucinations in spatial layouts, leading to incorrect object placements or misinterpretations of scene context. To address this, we strengthen the model's understanding of spatial information through object-level preferred and non-preferred sample design. Specifically, we select the keyframe relevant to the prompt $x$ as the preferred instance $v_{w}^{f}$ as shown in Figure. 2. For the non-preferred sample $v_{l}^{f}$ , we further apply a masking operation to the key regions within the selected frame, thereby focusing the model's attention on the relevant spatial content while reducing the influence of irrelevant regions. Accordingly, the object-level loss $\mathcal{L}_{\mathcal{DPO}_o}$ can be defined in a manner similar to Eq. (11). + +Token-Level Alignment. While response-level optimization enhances global consistency, it lacks the granularity required to address token-specific errors, such as misattributed objects or incorrect temporal markers (e.g., "after" vs. "before"). Token-level optimization ensures that the model aligns its preferences at a finer granularity, thereby reducing hallucinations in object-action relationships. Inspired by TDPO (Zeng et al., 2024), we implement token-level optimization to evaluate preferences for individual tokens and + +align them coherently to form a consistent response. The sequential KL divergence can be defined as: + +$$ +\begin{array}{l} \mathcal {L} _ {D P O _ {t}} = s g \left(\beta D _ {\text {S e q K L}} \left(x, v _ {w} ^ {f}, y _ {w}; \pi_ {\text {r e f}} \right\| \pi_ {\theta})\right) \tag {12} \\ - \beta D _ {\text {S e q K L}} (x, v _ {w} ^ {f}, y _ {l}; \pi_ {\text {r e f}} \| \pi_ {\theta}), \\ \end{array} +$$ + +where $sg$ represents the stop-gradient operator, ensuring that gradients are not propagated through the reference policy $\pi_{\mathrm{ref}}$ , and $D_{\mathrm{SeqKL}}$ is the sequence-level KL divergence: + +$$ +D _ {\text {S e q K L}} = \sum_ {t = 1} ^ {T} D _ {\mathrm {K L}} \left(\pi_ {\text {r e f}} \left(y | x, y _ {< t}\right) \| \pi_ {\theta} \left(y | x, y _ {< t}\right)\right). \tag {13} +$$ + +Overall, after incorporating instance-wise, temporal, and perceptive-level preference optimization, the overall loss function for VistaDPO is formulated as follows: + +$$ +\begin{array}{l} \mathcal {L} _ {V i s t a D P O} = \underbrace {\mathcal {L} _ {D P O _ {v}} + \mathcal {L} _ {D P O _ {r}}} _ {\text {I n s t a n c e}} \tag {14} \\ + \underbrace {\lambda \mathcal {L} _ {D P O _ {c}}} _ {\text {T e m p o r a l}} + \underbrace {\mu \mathcal {L} _ {D P O _ {o}} + \rho \mathcal {L} _ {D P O _ {t}}} _ {\text {P e r c e p t i v e}}, \\ \end{array} +$$ + +where $\lambda, \mu$ , and $\rho$ represent the loss weights. + +# 6. Experiments + +In this section, we empirically investigate the effectiveness of VistaDPO in reducing hallucinations. + +# 6.1. Experimental Settings + +Baselines. We apply VistaDPO to two different 7B-size LVMs: Video-LLaVA (Lin et al., 2023) and PLLaVA (Xu et al., 2024). For Video-LLaVA, it employs Language-Bind (Zhu et al., 2023) encoder for visual inputs, and Vicuna-7B v1.5 (Chiang et al., 2023) as the LLM backbone. For PLLaVA, the visual input is processed through ViT-L (Radford et al., 2021) and MM projector, with Vicuna as the LLM backbone. While other LVMs cannot be directly compared due to differences in base models, preference data, and alignment strategies, we provide these results for reference: VideoChatGPT (Maaz et al., 2023), VideoChat2 (Li et al., 2024c), LLaMA-VID (Li et al., 2025), LLaMA-Adapter (Zhang et al., 2023b), and Video-LLaMA (Zhang et al., 2023a). + +**Evaluations.** To evaluate the effectiveness of VistaDPO, we adopt benchmarks for three aspects: (1) Video Hallucination: VideoHallucer (Wang et al., 2024) and EventHallusion (Zhang et al., 2024a); (2) General Video QA: MSVDQA (Xu et al., 2017), MSR-VTT-QA (Xu et al., 2017), TGIF-QA (Jang et al., 2017), and ActivityNet-QA (Yu et al., 2019); and (3) Captioning Performance: VideoChatGPT-Bench (Maaz et al., 2023). For ablation studies and analysis, we mainly employ our VistaDPO on Video-LLaVA. + +Implementation Details. We train the Video-LLaVA 7B (Lin et al., 2023) and PLLaVA 7B (Xu et al., 2024) with VistaDPO for 3 epochs, with a learning rate of $5e - 7$ and a + +Table 1. Main results on video hallucination benchmarks. Bold values indicate the best performance and $\Delta$ denotes the corresponding improvement percentages over the baselines (i.e. PLLaVA and Video-LLaVA). "↑" denotes higher is better. + +
ModelsVideoHallucerEventHallusion
Basic↑Hallucinated↑Overall↑EntireMixMisleadingOverall
Binary↑Desc.↑Binary↑Desc.↑Binary↑Binary↑Desc.↑
VideoChatGPT (Maaz et al., 2023)92.810.46.414.95.557.03.621.636.44.3
VideoChat2 (Li et al., 2024c)29.725.87.816.74.612.41.622.616.12.6
LLaMA-VID (Li et al., 2025)89.926.621.030.716.573.67.843.154.010.9
PLLaVA (Xu et al., 2024)75.155.538.145.616.558.53.181.460.66.1
+ Hound-DPO (Zhang et al., 2024b)69.358.136.247.419.324.94.183.345.79.8
+ VistaDPO (Ours)82.572.157.855.323.662.26.297.168.912.7
Δ%9.929.951.721.342.76.3100.019.313.7108.2
Video-LLaVA (Lin et al., 2023)95.120.317.830.78.357.57.341.245.97.6
+ Hound-DPO (Zhang et al., 2024b)83.443.029.535.99.815.59.363.733.39.5
+ VistaDPO (Ours)98.264.454.350.914.962.210.495.167.212.1
Δ%3.3217.2205.165.879.58.242.5130.846.459.2
+ +Table 2. Main results on video QA and captioning benchmarks. Symbols follow the definitions in Table 1. + +
ModelsQuestion-AnswerCaptioning
MSVD↑MSR-VTT↑TGIF↑Act.Net↑Correct↑Detail↑Context↑Temporal↑Consist↑
VideoChatGPT (Maaz et al., 2023)64.949.351.435.22.42.52.62.02.4
LLaMA-Adapter (Zhang et al., 2023b)54.943.8-34.22.02.32.32.02.2
Video-LLaMA (Zhang et al., 2023a)51.629.6-12.42.02.22.21.81.8
PLLaVA (Xu et al., 2024)76.662.077.556.33.22.93.62.32.9
+ Hound-DPO (Zhang et al., 2024b)82.373.179.954.73.22.83.42.42.7
+ VistaDPO (Ours)86.480.284.359.13.53.03.92.82.9
Δ%12.829.48.85.09.43.58.321.70.0
Video-LLaVA (Lin et al., 2023)71.859.048.445.32.82.93.42.52.6
+ Hound-DPO (Zhang et al., 2024b)80.770.261.440.93.02.73.32.02.6
+ VistaDPO (Ours)85.376.974.155.03.42.93.62.62.9
Δ%18.830.353.121.521.40.05.94.011.5
+ +Table 3. Ablation study of level losses on VideoHallucer. HoundDPO (Zhang et al., 2024b) employs the same strategy as DPO (Rafailov et al., 2024), but based on its own constructed dataset. + +
MethodsBasic↑Hallu.↑Over.↑
VistaDPO98.264.454.3
w/o LDPOc97.862.353.0
w/o LDPOo98.162.052.8
w/o LDPOo, LDPOt97.661.549.4
w/o LDPOo, LDPOt, LDPOc97.260.146.6
only w/ LDPOr95.852.339.8
Vanilla DPO w/ VistaDPO-7K95.450.838.1
Hound-DPO83.443.029.5
+ +batch size of 8 on H100 GPUs. For training, we followed Zhang et al. (2024b) to set the hyperparameter $\beta = 0.1$ and followed Zeng et al. (2024) to set $\rho = 0.1$ for $\mathcal{L}_{DPO_t}$ . As for hyperparameters of $\mathcal{L}_{DPO_c}$ and $\mathcal{L}_{DPO_o}$ , we set $\lambda = 0.4$ and $\mu = 0.2$ respectively. Moreover, we set $\beta_{re} = 0.7$ and $\beta_{ir} = 0.3$ for the relevant and irrelevant non-preferred responses respectively for $\mathcal{L}_{DPO_r}$ . + +# 6.2. Main Results + +We compare VistaDPO with Hound-DPO (Zhang et al., 2024b) on video hallucination, video QA, and captioning benchmarks to verify the effectiveness of our approach. + +Video Hallucination. To benchmark VistaDPO, we focused on the model hallucination problem that DPO posttraining aims to mitigate and compared its performance + +against the previous video DPO strategy, specifically Hound-DPO, based on LVMs PLLaVA (Xu et al., 2024) and VideoLLaVA (Lin et al., 2023). As shown in Table 1, we adopted two video hallucination benchmarks, VideoHallucer (Wang et al., 2024) and EventHallusion (Zhang et al., 2024a). The results indicate that VistaDPO significantly alleviates hallucination issues compared to Hound-DPO. Notably, while Hound-DPO improved hallucination-related performance, they introduced undesirable trade-offs, such as reduced accuracy in addressing fundamental categories like the "Basic" class in VideoHallucer. Furthermore, Hound-DPO led to a decline in the model's descriptive capabilities and accuracy, as observed in the "Desc. (Descriptive)" category of EventHallusion. These limitations highlight the shortcomings of prior methods and underscore the superiority of our VistaDPO framework and the accompanying VistaDPO-7K dataset. To provide a comprehensive assessment of LVMs' performance post-training, we evaluate both their general and captioning capabilities in the following sections. + +Video Question-Answering. In addition to assessing the effectiveness of our VistaDPO in addressing hallucination issues, evaluating the model's general performance is equally critical. To this end, we conducted evaluations on four commonly used open-ended general question-answering benchmarks in a zero-shot setting, as illustrated on the left side of Table 2. VistaDPO consistently outperforms HoundDPO + +![](images/97e4623f135930bac6c1d60770de6c6170e5132024c2395e0cf5c37fcaadeac3.jpg) +Figure 3. Ablation study of hyperparameters on EventHallusion. + +![](images/f90364c5e7e325d454fc13dd307b7df0cf5811d9d8f288d1a5375827d78ce8c6.jpg) +Figure 4. T-SNE visualization of representation. (a) Video-LLaVA shows substantial overlap between hallucinated (orange) and non-hallucinated (green) representations. (b) With Hound-DPO, there is no distinct improvement in the separation of the two clusters. (c) With VistaDPO, the representations achieve clear clustering, highlighting its superior discriminative capability. + +and demonstrates significant performance improvements on both base models. These results indicate that VistaDPO not only mitigates hallucination issues to a large extent but also enhances its ability to comprehend video content and generate accurate responses to questions. + +Captioning Capability. We further evaluate the captioning capabilities of the model using the video-based text generation benchmark proposed by Maaz et al. (2023), which assesses five critical dimensions: Correctness, Detail Orientation, Contextual Understanding, Temporal Understanding, and Consistency. As shown on the right of Table 2, VistaDPO consistently outperforms Hound-DPO across all dimensions on two base models. These results highlight VistaDPO's ability to generate contextually relevant, detailed, and temporally accurate text from video inputs. Moreover, the findings demonstrate that the post-training process with VistaDPO-7K preserves the model's captioning capabilities, avoiding the degradation observed in Hound-DPO. + +# 6.3. Ablation Studies + +To evaluate the contributions of each level and their combinations, we conduct ablation studies on VistaDPO using VideoLLaVA (Table 3). The key findings are as follows: 1 Effectiveness of Hierarchical Preference Optimization. The hierarchical optimization strategy significantly improves performance, demonstrating its effectiveness in capturing multilevel preferences for better learning and task alignment. 2 Importance of Spatial-Temporal Dependencies. Spatial-temporal preference optimization, both explicit and implicit, plays a critical role in enhancing DPO performance: (i) + +VistaDPO explicitly captures spatial-temporal dependencies through object-level $(\mathcal{L}_{DPO_o})$ and clip-level $(\mathcal{L}_{DPO_c})$ optimization, enabling the model to better understand localized temporal and spatial relationships. (ii) Implicitly, it encodes spatial-temporal information via response-level $(\mathcal{L}_{DPO_r})$ preference alignment, which incorporates both relevant $(y_l^{re})$ and irrelevant $(y_l^{ir})$ non-preferred responses. These results highlight the importance of fine-grained spatial-temporal dependencies in video understanding, enabling more robust and effective video-language alignment. ③ Impact of a Comprehensive High-quality Dataset. Under the vanilla DPO strategy, post-training with VistaDPO-7K outperforms Hound-DPO, which uses a less comprehensive dataset. This demonstrates that a richer and higher-quality dataset improves generalization, enhances performance, and effectively mitigates hallucinations. ④ Impact of Hyperparameters. Additionally, we conduct hyperparameter ablation study (i.e. Figure 3). Specifically, we analyzed the impact of two hyperparameter sets on VistaDPO performance: ① Loss Weights: The optimal weights for all three levels balance the model's ability to capture temporal (clip-level $\lambda$ ), spatial (object-level $\mu$ ), and fine-grained token dependencies (token-level $\rho$ ). Too low a weight for any level weakens the model's ability to capture relevant dependencies, while excessively high weights disrupt the balance, leading to overfitting to specific details and loss of broader context. ② Weights for Relevant/Irrelevant Responses: The combined weight for both non-preferred samples $(y_l^{re}, y_l^{ir})$ helps the model capture spatial-temporal relationships at the textual level, which also highlights the need for careful hyperparameter tuning to effectively capture spatial-temporal relationships. + +# 7. Analyses and Discussions + +We now take one step further, providing comprehensive analyses to demonstrate VistaDPO's superiority. + +# 7.1. Enhanced Video-Language Representation + +To empirically demonstrate the effectiveness of VistaDPO, we conduct an analysis from a representational perspective, as illustrated in Figure 4. Specifically using 95 samples (video, non-hallucinated captions, and hallucinated captions) from the "misleading" subset of EventHallusion (Zhang et al., 2024a), we evaluated the alignment of visual and textual embeddings. Video-LLaVA exhibits overlapping features and weak modality alignment, struggling + +![](images/0727ab913da5c8c702166a611de37792a7062e98d128d3b5513449a9e46c2467.jpg) +Figure 5. Ablation study of visual non-preferred samples on two video hallucination benchmarks. + +![](images/6c0b90cae51980f2db20bdc7c266aa77ae03b42580ddb25bd81fd5b31c32a442.jpg) +Figure 6. Adversarial temporal testing on VideoHallucer. The gray regions indicate the performance drop under adversarial scenarios for each method. + +to distinguish hallucinated from non-hallucinated captions. With Hound-DPO, this issue is partially mitigated through vanilla DPO, but a significant gap between textual and video embeddings remains. In contrast, with VistaDPO, which incorporates hierarchical fine-grained preference modeling, the alignment is significantly improved by narrowing the distance between visual and textual modalities and distinctly separating hallucinated from non-hallucinated captions. These results underscore VistaDPO's superior capability to unify modalities and effectively reduce hallucination. + +# 7.2. Analysis of Visual Non-preferred Samples + +The quality of preference samples depends on the rejection visual samples and the gap between rejection and chosen samples. We explore strategies for constructing rejection samples at the video, clip, and object levels, while keeping the chosen samples (original video, event segment, and keyframe) unchanged for each level as shown in Figure 5. + +- Video-level: (i) Randomness: Select a random sample from the minibatch. (ii) Blackness: Set all RGB values of the chosen sample to 0. (iii) Reverse: Reverse the order of all frames in the chosen sample. (iv) Random Mask: Mask half the frames in the chosen sample. +- Clip-level: (i) Randomness. (ii) Blackness. (iii) Reverse. (iv) Random Mask. (v) Relevant Segments: Use segments where the event does not occur. +- Object-level: (i) Randomness. (ii) Blackness. (iii) ROI Mask: Mask the key object in the chosen sample. (iv) ROI Move: Move the key object to disrupt its original spatial relationships. + +As demonstrated in Figure 5, we observe the following performance trends: Figure 5 demonstrates the impact of different negative sample construction strategies across video, + +![](images/3d83f0dc428e25f13eccf22b6199cf12bc7cd1f4d5cf052715ba5a162548e2de.jpg) +Figure 7. Kernel Density Estimation (KDE) of log-likelihood differences in adversarial masking experiments. The log-likelihood difference measures the separation between original and adversarial distributions, with the shift representing the mean difference. Larger shifts indicate greater model robustness. + +clip, and object levels on model performance. At the video level, the Reverse method achieves the highest overall accuracy (67.2%), significantly outperforming Randomness (54.3%), Blackness (50.2%), and Random Mask (52.1%). This suggests that disrupting temporal order provides more informative negative samples compared to random sampling or masking strategies, which fail to introduce sufficient semantic contrast. At the clip level, Relevant Segments yields the best performance (64.8%), surpassing Randomness (53.1%), Blackness (52.9%), Reverse (61.1%), and Random Mask (62.6%). This highlights that using event-irrelevant segments as negatives more effectively challenges the model to focus on event-specific semantics, whereas random or blackened clips lack meaningful contrast. At the object level, ROI Move achieves the highest accuracy (66.0%), outperforming ROI Mask (64.3%), Randomness (54.3%), and Blackness (53.7%). This indicates that spatially disrupting key objects introduces more challenging and informative negative samples compared to masking or random sampling. Overall, these results emphasize that well-designed, semantically targeted negative samples—such as those disrupting temporal order, leveraging event irrelevance, or altering spatial relationships—are crucial for enhancing the model's ability to distinguish fine-grained video-language alignments. + +# 7.3. Adversarial Temporal Testing + +To evaluate the robustness of VistaDPO, we conducted adversarial temporal testing using the "Temporal" subset of VideoHallucer (Wang et al., 2024), which includes three cat + +![](images/38eee0ff216789bc7353efb8456474aa55bfc2548f4e342a9bbd399835c98bb9.jpg) +(a) Temporal adversarial testing demonstration + +![](images/74b6c97bab0a1f1fca4a2e055ceeda6d177c4e46f1042e6a0420a80575f940ee.jpg) +(b) Spatial adversarial testing demonstration + +![](images/7c2480112c319d8a0939f1e84963b49517a6e4c04ca2da7d1d0027a85cbd2cba.jpg) +(c) Token adversarial testing demonstration +Figure 8. Case Studies of Adversarial Testing for VistaDPO: We conduct case studies from three perspectives: (a) Temporal adversarial testing, which examines whether the model can infer the correct sequence of events by introducing reversed temporal order through video playback. (b) Spatial adversarial testing, which evaluates the model's ability to understand subject-object interactions by masking frames or pixels related to the target object. (c) Token adversarial testing, which tests the model's sensitivity to subtle linguistic differences by introducing similar action descriptions (e.g., contrasting "run" with "stand" and "walk"). Each test compares VistaDPO with baselines (i.e., Video-LLaVA and Hound-DPO) and corresponding ablated versions to assess the impact of key components. + +egories of video-based QA tasks: (i) Temporal Absolute, focusing on when an event occurs; (ii) Temporal Relative, addressing the order of two events; and (iii) Length Relative, comparing the duration of two events. For adversarial testing, we reversed all videos and adjusted answers to align with the reversed timeline (as shown in Figure 8(a). As shown in Figure 6, the base model (Video-LLaVA) and prior work (Hound-DPO) suffer significant performance drops across all three adversarial scenarios, revealing their inability to effectively model temporal hallucinations and vulnerability to timeline modifications. In contrast, VistaDPO shows minor degradation, demonstrating better temporal awareness and robustness against adversarial challenges. + +# 7.4. Adversarial Spatial Testing + +To evaluate spatial adversarial robustness, we test with a video and the question, "Does the girl play with her pet in the video?" As shown in Figure 8(b), all models correctly respond to the original video (upper side). However, in the adversarial version (lower side), where frames are masked to ensure the girl and pet never appear together, only VistaDPO correctly identifies the absence of interaction. To further assess adversarial discriminative capability, we use Kernel Density Estimation (KDE) on the VideoHallucer dataset to visualize how model representations shift when reasoning over noisy (adversarial) samples (see Figure 7). Video-LLaVA achieves a shift value of 1.86, showing limited ability to distinguish between original and adversarial samples. Adding Hound-DPO slightly reduces the shift to 1.26, indicating no improvement. VistaDPO achieves the highest shift value of 3.85, significantly outperforming other models. Removing $\mathcal{L}_{DPO_o}$ reduces the shift to 2.42, + +highlighting the importance of the proposed spatial-object preference optimization. These show VistaDPO's superior ability to capture subtle semantic differences and enhance adversarial robustness. + +# 7.5. Adversarial Token Testing + +As shown in Figure 8(c), we conduct adversarial token testing to evaluate model robustness. For the original question, "Does a dog run right a person in the video?", all models answered correctly. When "run" was replaced with "stand" (a significant semantic shift), most models maintained accurate responses. However, with an adversarial sample replacing "run" with "walk" (a subtle semantic change), only VistaDPO correctly captured the nuanced difference. This underscores VistaDPO's robust token-level understanding, capturing fine-grained semantic shifts and ensuring precise video-language alignment under adversarial conditions. + +# 8. Conclusion + +In this paper, we propose VistaDPO, a novel framework for Video Hierarchical Spatial-Temporal Direct Preference Optimization, which enhances the alignment between text and video preferences across three hierarchical levels: instance, temporal, and perceptive. To support fine-grained preference alignment, we introduce VistaDPO-7k, a dataset of 7.2K QA pairs with annotations for chosen/rejected responses and spatial-temporal groundings. Extensive evaluations on tasks, i.e., Video Hallucination, Video QA, and Captioning benchmarks demonstrate that VistaDPO significantly improves existing LVMs, addressing video-language misalignment and hallucination issues. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning, particularly in the domain of videolanguage alignment and large video models (LVMs). By introducing VistaDPO, a framework for hierarchical spatial-temporal direct preference optimization, and constructing the VistaDPO-7k dataset, we aim to improve the alignment between video content and human preferences, mitigating issues such as hallucination and misalignment in video-language tasks. + +The potential societal impact of this work includes enhancing the robustness and reliability of AI systems in applications such as video analysis, autonomous systems, and multimedia content understanding. While these advancements could contribute positively to fields like education, accessibility, and entertainment, they also raise ethical considerations, including potential misuse in surveillance or biased decision-making if the models are not carefully evaluated for fairness and accountability. + +We have taken steps to ensure that the dataset and methodology are designed to reduce biases and hallucinations, and we encourage future researchers to apply these methods responsibly. Beyond these considerations, there are no immediate societal consequences of this work that require specific attention. + +# References + +Ahn, D., Choi, Y., Yu, Y., Kang, D., and Choi, J. Tuning large multimodal models for videos using reinforcement learning from ai feedback. arXiv preprint arXiv:2402.03746, 2024. +Azar, M. G., Guo, Z. D., Piot, B., Munos, R., Rowland, M., Valko, M., and Calandriello, D. A general theoretical paradigm to understand learning from human preferences. In International Conference on Artificial Intelligence and Statistics, pp. 4447-4455. PMLR, 2024. +Bai, J., Bai, S., Chu, Y., Cui, Z., Dang, K., Deng, X., Fan, Y., Ge, W., Han, Y., Huang, F., et al. Qwen technical report. arXiv preprint arXiv:2309.16609, 2023. +Chen, D. and Dolan, W. B. Collecting highly parallel data for paraphrase evaluation. In Proceedings of the 49th annual meeting of the association for computational linguistics: human language technologies, pp. 190-200, 2011. +Chen, H., Huang, H., Dong, J., Zheng, M., and Shao, D. Finecliper: Multi-modal fine-grained clip for dynamic facial expression recognition with adapters. In Proceedings of the 32nd ACM International Conference on Multimedia, pp. 2301-2310, 2024. + +Cheng, S., Fang, K., Yu, Y., Zhou, S., Li, B., Tian, Y., Li, T., Han, L., and Liu, Y. Videogthink: Assessing egocentric video understanding capabilities for embodied ai. arXiv preprint arXiv:2410.11623, 2024a. +Cheng, Z., Leng, S., Zhang, H., Xin, Y., Li, X., Chen, G., Zhu, Y., Zhang, W., Luo, Z., Zhao, D., et al. Videollama 2: Advancing spatial-temporal modeling and audio understanding in video-llms. arXiv preprint arXiv:2406.07476, 2024b. +Chiang, W.-L., Li, Z., Lin, Z., Sheng, Y., Wu, Z., Zhang, H., Zheng, L., Zhuang, S., Zhuang, Y., Gonzalez, J. E., et al. Vicuna: An open-source chatbot impressing gpt-4 with $90\%$ chatgpt quality. See https://vicuna.lmsys.org (accessed 14 April 2023), 2(3):6, 2023. +Dubey, A., Jauhri, A., Pandey, A., Kadian, A., Al-Dahle, A., Letman, A., Mathur, A., Schelten, A., Yang, A., Fan, A., et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024. +Ethayarajh, K., Xu, W., Muennighoff, N., Jurafsky, D., and Kiela, D. Kto: Model alignment as prospect theoretic optimization. arXiv preprint arXiv:2402.01306, 2024. +Fei, H., Wu, S., Ji, W., Zhang, H., Zhang, M., Lee, M.-L., and Hsu, W. Video-of-thought: Step-by-step video reasoning from perception to cognition. In *Forty-first International Conference on Machine Learning*, 2024a. +Fei, H., Wu, S., Zhang, H., Chua, T.-S., and Yan, S. Vitron: A unified pixel-level vision llm for understanding, generating, segmenting, editing. 2024b. +Fei, H., Wu, S., Zhang, M., Zhang, M., Chua, T.-S., and Yan, S. Enhancing video-language representations with structural spatio-temporal alignment. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024c. +Fu, C., Dai, Y., Luo, Y., Li, L., Ren, S., Zhang, R., Wang, Z., Zhou, C., Shen, Y., Zhang, M., et al. Video-mme: The first-ever comprehensive evaluation benchmark of multi-modal llms in video analysis. arXiv preprint arXiv:2405.21075, 2024. +Fu, C., Lin, H., Wang, X., Zhang, Y.-F., Shen, Y., Liu, X., Li, Y., Long, Z., Gao, H., Li, K., et al. Vita-1.5: Towards gpt-4o level real-time vision and speech interaction. arXiv preprint arXiv:2501.01957, 2025a. +Fu, J., Huangfu, S., Fei, H., Shen, X., Hooi, B., Qiu, X., and Ng, S.-K. Chip: Cross-modal hierarchical direct preference optimization for multimodal llms. arXiv preprint arXiv:2501.16629, 2025b. +Gunjal, A., Yin, J., and Bas, E. Detecting and preventing hallucinations in large vision language models. In + +Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 18135-18143, 2024. +Hu, G., Xin, Y., Lyu, W., Huang, H., Sun, C., Zhu, Z., Gui, L., Cai, R., Cambria, E., and Seifi, H. Recent trends of multimodal affective computing: A survey from nlp perspective. arXiv preprint arXiv:2409.07388, 2024. +Jang, Y., Song, Y., Yu, Y., Kim, Y., and Kim, G. Tgif-qa: Toward spatio-temporal reasoning in visual question answering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2758-2766, 2017. +Jiang, X., Ge, Y., Ge, Y., Shi, D., Yuan, C., and Shan, Y. Supervised fine-tuning in turn improves visual foundation models. arXiv preprint arXiv:2401.10222, 2024. +Jin, P., Takanobu, R., Zhang, W., Cao, X., and Yuan, L. Chat-univi: Unified visual representation empowers large language models with image and video understanding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13700-13710, 2024. +Lan, W., Chen, W., Chen, Q., Pan, S., Zhou, H., and Pan, Y. A survey of hallucination in large visual language models. arXiv preprint arXiv:2410.15359, 2024. +Leng, S., Xing, Y., Cheng, Z., Zhou, Y., Zhang, H., Li, X., Zhao, D., Lu, S., Miao, C., and Bing, L. The curse of multi-modalities: Evaluating hallucinations of large multimodal models across language, visual, and audio. arXiv preprint arXiv:2410.12787, 2024. +Li, C., Im, E. W., and Fazli, P. Vidhalluc: Evaluating temporal hallucinations in multimodal large language models for video understanding. arXiv preprint arXiv:2412.03735, 2024a. +Li, F., Zhang, R., Zhang, H., Zhang, Y., Li, B., Li, W., Ma, Z., and Li, C. Llava next-Interleave: Tackling multi-image, video, and 3d in large multimodal models. arXiv preprint arXiv:2407.07895, 2024b. +Li, K., He, Y., Wang, Y., Li, Y., Wang, W., Luo, P., Wang, Y., Wang, L., and Qiao, Y. Videochat: Chat-centric video understanding. arXiv preprint arXiv:2305.06355, 2023. +Li, K., Wang, Y., He, Y., Li, Y., Wang, Y., Liu, Y., Wang, Z., Xu, J., Chen, G., Luo, P., et al. Mvbench: A comprehensive multi-modal video understanding benchmark. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22195-22206, 2024c. +Li, Y., Wang, C., and Jia, J. Llama-vid: An image is worth 2 tokens in large language models. In European Conference on Computer Vision, pp. 323-340. Springer, 2025. + +Lin, B., Ye, Y., Zhu, B., Cui, J., Ning, M., Jin, P., and Yuan, L. Video-llava: Learning united visual representation by alignment before projection. arXiv preprint arXiv:2311.10122, 2023. +Liu, H., Li, C., Wu, Q., and Lee, Y. J. Visual instruction tuning. Advances in neural information processing systems, 36, 2024a. +Liu, H., Xue, W., Chen, Y., Chen, D., Zhao, X., Wang, K., Hou, L., Li, R., and Peng, W. A survey on hallucination in large vision-language models. arXiv preprint arXiv:2402.00253, 2024b. +Liu, Y., Li, S., Liu, Y., Wang, Y., Ren, S., Li, L., Chen, S., Sun, X., and Hou, L. Tempcompass: Do video llms really understand videos? arXiv preprint arXiv:2403.00476, 2024c. +Liu, Z., Zang, Y., Dong, X., Zhang, P., Cao, Y., Duan, H., He, C., Xiong, Y., Lin, D., and Wang, J. Miadpo: Multi-image augmented direct preference optimization for large vision-language models. arXiv preprint arXiv:2410.17637, 2024d. +Lu, J., Li, J., An, S., Zhao, M., He, Y., Yin, D., and Sun, X. Eliminating biased length reliance of direct preference optimization via down-sampled k1 divergence. arXiv preprint arXiv:2406.10957, 2024. +Maaz, M., Rasheed, H., Khan, S., and Khan, F. S. Video-chatgpt: Towards detailed video understanding via large vision and language models. arXiv preprint arXiv:2306.05424, 2023. +Maaz, M., Rasheed, H., Khan, S., and Khan, F. Videogpt+: Integrating image and video encoders for enhanced video understanding. arXiv preprint arXiv:2406.09418, 2024. +Mosig, J. E., Mehri, S., and Kober, T. Star: A schemaguided dialog dataset for transfer learning. arXiv preprint arXiv:2010.11853, 2020. +Park, R., Rafailov, R., Ermon, S., and Finn, C. Disentangling length from quality in direct preference optimization. arXiv preprint arXiv:2403.19159, 2024. +Peng, B., Li, C., He, P., Galley, M., and Gao, J. Instruction tuning with gpt-4. arXiv preprint arXiv:2304.03277, 2023. +Pi, R., Han, T., Xiong, W., Zhang, J., Liu, R., Pan, R., and Zhang, T. Strengthening multimodal large language model with bootstrapped preference optimization. In European Conference on Computer Vision, pp. 382-398. Springer, 2025. + +Qian, L., Li, J., Wu, Y., Ye, Y., Fei, H., Chua, T.-S., Zhuang, Y., and Tang, S. Momentor: Advancing video large language model with fine-grained temporal reasoning. arXiv preprint arXiv:2402.11435, 2024. +Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748-8763. PMLR, 2021. +Rafailov, R., Sharma, A., Mitchell, E., Manning, C. D., Ermon, S., and Finn, C. Direct preference optimization: Your language model is secretly a reward model. Advances in Neural Information Processing Systems, 36, 2024. +Sahoo, P., Meharia, P., Ghosh, A., Saha, S., Jain, V., and Chadha, A. A comprehensive survey of hallucination in large language, image, video and audio foundation models. Findings of the Association for Computational Linguistics: EMNLP 2024, pp. 11709-11724, 2024. +Sarkar, P., Ebrahimi, S., Etemad, A., Beirami, A., Ark, S. Ö., and Pfister, T. Mitigating object hallucination via data augmented contrastive tuning. arXiv preprint arXiv:2405.18654, 2024. +Shangguan, Z., Li, C., Ding, Y., Zheng, Y., Zhao, Y., Fitzgerald, T., and Cohan, A. Tomato: Assessing visual temporal reasoning capabilities in multimodal foundation models. arXiv preprint arXiv:2410.23266, 2024. +Tan, Z., Yang, X., Qin, L., Yang, M., Zhang, C., and Li, H. Evalalign: Supervised fine-tuning multimodal llms with human-aligned data for evaluating text-to-image models. arXiv preprint arXiv:2406.16562, 2024. +Tom, G., Mathew, M., Garcia-Bordils, S., Karatzas, D., and Jawahar, C. Reading between the lanes: Text videoqa on the road. In International Conference on Document Analysis and Recognition, pp. 137-154. Springer, 2023. +Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.-A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., et al. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023. +Wang, X., Wu, J., Chen, J., Li, L., Wang, Y.-F., and Wang, W. Y. Vatex: A large-scale, high-quality multilingual dataset for video-and-language research. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 4581-4591, 2019. +Wang, Y., Wang, Y., Zhao, D., Xie, C., and Zheng, Z. Videohallucer: Evaluating intrinsic and extrinsic hallucinations in large video-language models. arXiv preprint arXiv:2406.16338, 2024. + +Wu, S., Fei, H., Qu, L., Ji, W., and Chua, T.-S. NExT-GPT: Any-to-any multimodal LLM. In Proceedings of the International Conference on Machine Learning, pp. 53366-53397, 2024a. +Wu, Z., Chen, X., Pan, Z., Liu, X., Liu, W., Dai, D., Gao, H., Ma, Y., Wu, C., Wang, B., et al. Deepseek-vl2: Mixture-of-experts vision-language models for advanced multimodal understanding. arXiv preprint arXiv:2412.10302, 2024b. +Xiao, J., Shang, X., Yao, A., and Chua, T.-S. Next-qa: Next phase of question-answering to explaining temporal actions. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 9777-9786, 2021. +Xie, Y., Li, G., Xu, X., and Kan, M.-Y. V-dpo: Mitigating hallucination in large vision language models via vision-guided direct preference optimization. arXiv preprint arXiv:2411.02712, 2024. +Xu, D., Zhao, Z., Xiao, J., Wu, F., Zhang, H., He, X., and Zhuang, Y. Video question answering via gradually refined attention over appearance and motion. In Proceedings of the 25th ACM international conference on Multimedia, pp. 1645-1653, 2017. +Xu, J., Mei, T., Yao, T., and Rui, Y. Msr-vtt: A large video description dataset for bridging video and language. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5288-5296, 2016. +Xu, L., Zhao, Y., Zhou, D., Lin, Z., Ng, S. K., and Feng, J. Pllava: Parameter-free llava extension from images to videos for video dense captioning. arXiv preprint arXiv:2404.16994, 2024. +Yan, W., Zhang, Y., Abbeel, P., and Srinivas, A. Videogpt: Video generation using vq-vae and transformers. arXiv preprint arXiv:2104.10157, 2021. +Yang, K., Liu, Z., Xie, Q., Huang, J., Min, E., and Ananiadou, S. Selective preference optimization via token-level reward function estimation. arXiv preprint arXiv:2408.13518, 2024. +Yi, K., Gan, C., Li, Y., Kohli, P., Wu, J., Torralba, A., and Tenenbaum, J. B. Clevrer: Collision events for video representation and reasoning. arXiv preprint arXiv:1910.01442, 2019. +Yin, S., Fu, C., Zhao, S., Xu, T., Wang, H., Sui, D., Shen, Y., Li, K., Sun, X., and Chen, E. Woodpecker: Hallucination correction for multimodal large language models. Science China Information Sciences, 67(12):220105, 2024. + +Yu, Z., Xu, D., Yu, J., Yu, T., Zhao, Z., Zhuang, Y., and Tao, D. Activitynet-qa: A dataset for understanding complex web videos via question answering. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 9127–9134, 2019. +Yuan, Y., Zhang, H., Li, W., Cheng, Z., Zhang, B., Li, L., Li, X., Zhao, D., Zhang, W., Zhuang, Y., et al. Videorefer suite: Advancing spatial-temporal object understanding with video llm. arXiv preprint arXiv:2501.00599, 2024. +Zeng, Y., Liu, G., Ma, W., Yang, N., Zhang, H., and Wang, J. Token-level direct preference optimization. arXiv preprint arXiv:2404.11999, 2024. +Zhang, H., Li, X., and Bing, L. Video-llama: An instruction-tuned audio-visual language model for video understanding. arXiv preprint arXiv:2306.02858, 2023a. +Zhang, J., Jiao, Y., Chen, S., Chen, J., and Jiang, Y.-G. Eventhallusion: Diagnosing event hallucinations in video llms. arXiv preprint arXiv:2409.16597, 2024a. +Zhang, R., Han, J., Liu, C., Gao, P., Zhou, A., Hu, X., Yan, S., Lu, P., Li, H., and Qiao, Y. Llama-adapter: Efficient fine-tuning of language models with zero-init attention. arXiv preprint arXiv:2303.16199, 2023b. +Zhang, R., Gui, L., Sun, Z., Feng, Y., Xu, K., Zhang, Y., Fu, D., Li, C., Hauptmann, A., Bisk, Y., et al. Direct preference optimization of video large multimodal models from language model reward. arXiv preprint arXiv:2404.01258, 2024b. +Zhao, M., Li, B., Wang, J., Li, W., Zhou, W., Zhang, L., Xuyang, S., Yu, Z., Yu, X., Li, G., et al. Towards video text visual question answering: Benchmark and baseline. Advances in Neural Information Processing Systems, 35: 35549-35562, 2022. +Zhao, Z., Wang, B., Ouyang, L., Dong, X., Wang, J., and He, C. Beyond hallucinations: Enhancing lvlms through hallucination-aware direct preference optimization. arXiv preprint arXiv:2311.16839, 2023. +Zhou, L., Xu, C., and Corso, J. Towards automatic learning of procedures from web instructional videos. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018. +Zhou, T., Chen, D., Jiao, Q., Ding, B., Li, Y., and Shen, Y. Humanbench: Exploring human-centric video understanding capabilities of mllms with synthetic benchmark data. arXiv preprint arXiv:2412.17574, 2024a. +Zhou, Y., Cui, C., Rafailov, R., Finn, C., and Yao, H. Aligning modalities in vision large language models via preference fine-tuning. arXiv preprint arXiv:2402.11411, 2024b. + +Zhu, B., Lin, B., Ning, M., Yan, Y., Cui, J., Wang, H., Pang, Y., Jiang, W., Zhang, J., Li, Z., et al. Language-bind: Extending video-language pretraining to n-modality by language-based semantic alignment. arXiv preprint arXiv:2310.01852, 2023. + +# A. Limitation and Future Work + +While VistaDPO excels at aligning video and language with fine-grained precision, its performance on long-duration videos with complex temporal dependencies leaves room for improvement. Such scenarios pose unique challenges for any alignment framework. Building on our strong spatial-temporal modeling foundation, future work could explore hierarchical architectures or memory-augmented mechanisms to further enhance the ability to capture long-term interactions, extending the reach of our method to even more complex video-language tasks. + +# B. More Details of Data Annotation + +Table 4. Summary of Hallucination Types, Sample Counts, and Data Sources. + +
Hallucination TypeSample CountData Source
Object1,200MSR-VTT, STAR, VATEX
Number500ActivityNet-QA, MSR-VTT, NExT-QA, VATEX
Location500MSR-VTT, NExT-QA, VATEX
Color500ActivityNet-QA, CLEVRR, MSR-VTT, VATEX
Static Relation800ActivityNet-QA, MSR-VTT, VATEX
OCR500RoadTextVQA, ViteVQA
Action1,200MSR-VTT, MSVD, STAR, VATEX
Dynamic Attribute300TempCompass, Tomato
Dynamic Relation1,500MSR-VTT, NExT-QA, STAR, VATEX, VCGBench-Diverse
Sequence200Video-MME, YouCook2
+ +Datasets Sources. We constructed a dataset by sampling from the validation sets of 14 existing datasets in Table 4, specifically MSR-VTT (Xu et al., 2016), STAR (Mosig et al., 2020), VATEX (Wang et al., 2019), ActivityNet-QA (Yu et al., 2019), NExT-QA (Xiao et al., 2021), CLEVRER (Yi et al., 2019), RoadTextVQA (Tom et al., 2023), ViteVQA (Zhao et al., 2022), MSVD (Chen & Dolan, 2011), TempCompass (Liu et al., 2024c), Tomato (Shangguan et al., 2024), VCGBench-Diverse (Maaz et al., 2024), Video-MME (Fu et al., 2024), and YouCook2 (Zhou et al., 2018), encompassing tasks such as binary QA, multiple-choice QA, and captioning-QA. To define hallucination within the context of video-based QA, we categorized it into two dimensions: Perception and Temporal, and generated corresponding chosen and rejected responses. + +Specifically, the Perception dimension evaluates the model's ability to recognize static information in videos. This includes object recognition, identifying static attributes (e.g., number, color, position), understanding spatial relationships between objects, and extracting other elements such as OCR. In contrast, the Temporal dimension assesses the model's ability + +![](images/a21f6eac760f34e8e9420a464d6964bec9409c34e25208e40a197f1b03b2ee90.jpg) +Figure 9. Illustration of dataset pipeline for constructing augmented video-language QA pairs. (a) Original QA pairs are extracted from existing prevalent datasets, providing basic QA pairs. (b) These pairs are augmented by introducing chosen and rejected answers, where rejected answers include both irrelevant responses (e.g., "shopping cart") and relevant but incorrect ones (e.g., "table"). (c) To enhance spatiotemporal understanding, manual annotations are added, specifying object appearances, spatial coordinates (e.g., bounding boxes), and temporal dynamics (e.g., appearance and disappearance timestamps). This pipeline ensures richer, more nuanced data for hierarchical preference optimization in video-language tasks. + +to comprehend dynamic temporal information, such as recognizing actions, identifying subtle dynamic attributes (e.g., movement direction, speed, shape), understanding event relationships, and perceiving action sequences within the video. By leveraging the prompt structure illustrated in Figure 9, we expanded the original QA data into a dataset suitable for DPO training with chosen and rejected responses. During the construction of rejected response, we carefully considered whether the core semantics of the question were present in the video, generating both relevant and irrelevant rejected responses. This approach aims to enhance the model's global understanding and robustness at the response level. + +To explicitly strengthen the model's spatiotemporal perception capabilities, we first identified all objects involved in the video. Subsequently, we manually annotated keyframes in which at least $30\%$ of the object's contours appeared or disappeared in the frame, as well as any keyframes directly relevant to answering the question. For each annotated keyframe, we labeled the bounding box coordinates (i.e., $(x,y,w,h)$ ) of the objects. + +Quality Control. To ensure annotation quality, all annotators were PhD students from universities who underwent standardized training and utilized a unified annotation tool. Each video was annotated independently by two annotators, and cross-validation was performed. Samples with annotation discrepancies were discarded to maintain high data quality. + +# C. More Discussions on Related Work + +Table 5. Comparison among different DPO strategies. + +
MethodLLMBase Model (7B, if not specified)DPOTextual GranularityVisual Dimension
TextImageVideo
DPO (Rafailov et al., 2024)TextPythia-2.8BXXSentence
IPO (Azar et al., 2024)TextPythia-2.8BXXSentence
KTO (Ethayarajh et al., 2024)TextLlama-3-8B & Qwen-3B-InstructXXSentence
R-DPO (Park et al., 2024)TextPythia-2.8BXXSentence
SamPO (Lu et al., 2024)TextTulu2-13B-SFT & Llama3-8B-InstructXXSentence
SePO (Yang et al., 2024)TextLLaMA2-Chat & Pythia-SFT-6.9BXXSentence & Token
TDPO (Zeng et al., 2024)TextGPT-2-LargeXXSentence & Token
HA-DPO (Zhao et al., 2023)ImageLLaVA-v1.5 & MiniGPT-4XXSentence
BPO (Pi et al., 2025)ImageLLaVA-v1.5XXSentence
FDPO (Gunjal et al., 2024)ImageInstructBLIP-13BXXSentence
HALVA (Sarkar et al., 2024)ImageLLaVA-v1.5XXSentence & Token
POVID (Zhou et al., 2024b)ImageLLaVA-v1.5XSentenceSpatial
MIA-DPO (Liu et al., 2024d)ImageLLaVA-v1.5 & InternLM-XC2.5XSentenceSpatial
V-DPO (Xie et al., 2024)ImageLLaVA-v1.5XSentenceSpatial
Next-DPO (Li et al., 2024b)VideoLLaVA-NextXXSentence
Hound-DPO (Zhang et al., 2024b)VideoVideo-LLaVAXXSentence
VistaDPO (Ours)VideoVideo-LLaVA & PLLaVASentence & TokenSpatial & Temporal
+ +To highlight our contributions, we detail in Table 5 how our proposed VistaDPO differs from previous DPO strategies. Two critical distinctions are summarized as follows: + +- Spatial-Temporal Video Preference Optimization: Previous DPO methods predominantly focused on language-level alignment. With advancements in the field, the focus gradually shifted from language models to vision-language models. While some works incorporated image-level visual alignment, these approaches remained limited to static images. Recent works like LLaVA-Next-DPO (Li et al., 2024b) and LLaVA-Hound-DPO (Zhang et al., 2024b) extended DPO strategies to video-language models. However, these methods only applied vanilla DPO strategies, optimizing alignment exclusively at the language level, with no explicit focus on visual modeling. In contrast, VistaDPO uniquely emphasizes optimizing spatial-temporal preferences in videos. By explicitly modeling both spatial and temporal preferences, VistaDPO bridges the gap between video content and textual understanding. This dual-layer spatial-temporal optimization enables our framework to address the complexities of video-language tasks comprehensively. +- Hierarchical Finer Granularity: Most existing DPO approaches operate at a coarse granularity, typically limited to sentence-level alignment for text and holistic-level alignment for visuals. Advanced methods explore token-level textual alignment but still overlook hierarchical visual structures, which are crucial for video understanding. VistaDPO introduces a hierarchical granularity approach, incorporating both sentence- and token-level granularity for textual alignment and spatial- (object-) and temporal- (clip-) level granularity for visual alignment. By structuring alignment hierarchically across multiple layers—spanning from fine-grained token and object representations to coarse-grained sentence and video-level relationships—VistaDPO achieves a robust and precise preference optimization. This hierarchical approach + +empowers our framework to capture intricate cross-modal dependencies, ensuring superior performance in challenging scenarios such as adversarial testing and hallucination reduction. + +# D. Extended Details of Methodology: Formulas and Prompts + +This section details the core methodology used in VistaDPO, including the mathematical formulations and prompts employed during training. Key formulas for DPO are provided, along with the specific prompt templates used for generating and refining QA pairs. These details aim to provide a comprehensive understanding of the technical implementation. + +# D.1. Formulations of Token-Level Preference Optimization. + +Token-Level Preference Optimization (TLPO) is a fine-grained optimization framework designed to align model outputs with human preferences by leveraging token-wise feedback. Unlike response-level optimization, TLPO avoids the cancellation of policies that may occur at the sentence level by focusing on sequential KL divergence at the token level. + +Human Preference Modeling. We employ the Bradley-Terry model to represent the probability of human preferences for a winning response $y_{w}$ over a losing response $y_{l}$ , given the input $x$ and auxiliary video context $v_{w}^{f}$ . The preference probability is defined as: + +$$ +P _ {\mathrm {B T}} (y _ {w} \succ y _ {l} | x, v _ {w} ^ {f}) = \sigma \big (\lambda (x, v _ {w} ^ {f}, y _ {w}, y _ {l}) - \delta (x, v _ {w} ^ {f}, y _ {w}, y _ {l}) \big), +$$ + +where $\sigma (\cdot)$ is the sigmoid function, $\lambda (x,v_w^f,y_w,y_l)$ represents the difference in rewards, and $\delta (x,v_w^f,y_w,y_l)$ is the difference in sequential KL divergence between the preference pairs. These terms are defined as follows: + +$$ +\lambda (x, v _ {w} ^ {f}, y _ {w}, y _ {l}) = \beta \log \frac {\pi_ {\theta} (y _ {w} | x , v _ {w} ^ {f})}{\pi_ {\mathrm {r e f}} (y _ {w} | x , v _ {w} ^ {f})} - \beta \log \frac {\pi_ {\theta} (y _ {l} | x , v _ {w} ^ {f})}{\pi_ {\mathrm {r e f}} (y _ {l} | x , v _ {w} ^ {f})}, +$$ + +$$ +\delta (x, v _ {w} ^ {f}, y _ {w}, y _ {l}) = \beta D _ {\mathrm {S e q K L}} (x, v _ {w} ^ {f}, y _ {w}; \pi_ {\mathrm {r e f}} | | \pi_ {\theta}) - \beta D _ {\mathrm {S e q K L}} (x, v _ {w} ^ {f}, y _ {l}; \pi_ {\mathrm {r e f}} | | \pi_ {\theta}). +$$ + +Sequential KL Divergence. The sequential KL divergence $D_{\mathrm{SeqKL}}$ is defined as the sum of token-level KL divergences across the sequence: + +$$ +D _ {\mathrm {S e q K L}} (x, v _ {w} ^ {f}, y; \pi_ {\mathrm {r e f}} | | \pi_ {\theta}) = \sum_ {t = 1} ^ {T} D _ {\mathrm {K L}} (\pi_ {\mathrm {r e f}} (y ^ {t} | x, v _ {w} ^ {f}, y ^ {< t}) | | \pi_ {\theta} (y ^ {t} | x, v _ {w} ^ {f}, y ^ {< t})), +$$ + +where $T$ is the length of the sequence $y$ , and $y^{ModelsAvg.ASAPAAFAUAOEOIOSMDALSTACMCMASCFPCOENERCIVideoChat (Li et al., 2023)35.533.526.556.033.540.553.040.530.025.527.048.535.020.542.546.026.541.023.523.536.0VideoChatGPT (Maaz et al., 2023)32.723.526.062.022.526.554.028.040.023.020.031.030.525.539.548.529.033.029.526.035.5Video-LLaMA (Zhang et al., 2023a)34.127.525.551.029.039.048.040.538.022.522.543.034.022.532.545.532.540.030.021.037.0VideoChat2 (Li et al., 2024c)51.166.047.583.549.560.058.071.542.523.023.088.539.042.058.544.049.036.535.040.565.5PLLaVA (Xu et al., 2024)46.658.049.055.541.061.056.061.036.023.526.082.039.542.052.045.042.053.530.548.031.0+ Hound-DPO (Zhang et al., 2024b)45.354.046.057.037.559.554.562.031.523.526.583.538.041.550.041.039.550.532.046.032.5+ VistaDPO (Ours)49.359.551.060.041.559.064.566.035.027.035.582.540.045.551.548.048.554.031.050.035.0Video-LLaVA (Lin et al., 2023)43.046.042.556.539.053.553.048.041.029.031.582.545.026.053.041.533.541.527.538.531.5+ Hound-DPO (Zhang et al., 2024b)43.344.540.059.039.052.553.549.536.532.033.579.043.028.055.542.030.043.031.039.035.0+ VistaDPO (Ours)46.347.545.058.542.051.560.554.539.536.037.582.549.028.551.049.039.544.029.042.038.5 + +Note: Action: Action Sequence (AS), Action Prediction (AP), Action Antonym (AA), Fine-grained Action (FA), Unexpected Action (UA); Object: Object Existence (OE), Object Interaction (OI), Object Shuffle (OS); Position: Moving Direction (MD), Action Localization (AL); Scene: Scene Transition (ST); Count: Action Count (AC), Moving Count (MC); Attribute: Moving Attribute (MA), State Change (SC); Pose: Fine-grained Pose (FP); Character: Character Order (CO); Cognition: Egocentric Navigation (EN), Episodic Reasoning (ER), Counterfactual Inference (CI). + +![](images/ae10a5244a4a9c6ccd5906cedba24ebd6d57da1f6fab7b00ea49fd79d5fd5a18.jpg) + +![](images/22fd46685639794c19bd36313c8c5d3c86ef6910acc84f3e749e988b9d8246e1.jpg) + +Does the car in the video move forward? + +![](images/10cb878d51474ff97caba1a5628a40f2568f0eb817a1583c6f01177463b3790e.jpg) + +Yes, the car in the video moves forward. + +Hound-DPO + +Yes, the car does move forward in the video. + ++VistaDPO + +No, the car in the video remains stationary, but the video shows kids with school bags moving forward. + +![](images/761bf08937bdfaec6550c583735db82a795749f713cd4bc4c5b3034e741ec56b.jpg) +Figure 11. Cases of VistaDPO in video understanding. + +![](images/6fe2a81702734a5e29ed14711fa129c7b21755962c1fc73d59425160c706bee8.jpg) + +Is the person with a yellow helmet in the video sitting on a bicycle and riding it? + +![](images/a6a6a5c9a71a5280e0bf5cafdf47740ab589a2f91989e24bf432cf76663f834d.jpg) + +Yes, the person in the yellow helmet is sitting on the bike and riding it. + +Hound-DPO + +Yes, the person with a yellow helmet sits on a bicycle and rides it. + ++VistaDPO + +No, the person in the yellow helmet is not riding but repairing the bicycle. + +![](images/c68651b4c894bcb890e027992417dece15cbe747d057fee38df9bc4bd02b0ec4.jpg) + +![](images/df2dda215cdacaa98326ad4ed1520a8ab136483fd0c855e95d01ef5bcf4dd9c4.jpg) + +Does the person in the video touch his hair? + +![](images/afdacfafef319efe159a0bbe8752ccf947873c4688a8b378291e9137f2d8dd1a.jpg) + +Yes, the person in the video touches his hair while talking to the camera. + ++Hound-DPO + +Yes, the person in the video touches his hair in some of frames. + ++VistaDPO + +No, the person in the video does not touch his hair, but focuses on what looks like a drawing board object in front of him. + +![](images/df06b792a2b9164ca8a85ee2dae2f5d84b0db66625a618800889f197ada606bd.jpg) + +![](images/bc74ef6ba13e27061255817f26896952d43e93e12f069c299bed6239fd7cdf47.jpg) + +Did any accident or anything unexpected happen in the video? + +![](images/b26214f3b40a6b119e983490ab8a1b479c895b75442f930b68fa5d938d713808.jpg) + +No, the athlete is performing gymnastics with a balance beam without accident. + ++Hound-DPC + +No, no accidents or any unexpected happen in the video. + ++VistaDPO + +Yes, the athlete fell in an accident while doing gymnastics on the balance beam. + +![](images/b2cd55120a7b052f07ac797b45aa1262b2fa1177b8c310a63f393b5fda0047ee.jpg) + +Question: What does the baby do after picking up a red toy at the start? + +Chosen: After picking up the red toy, the baby walks towards a woman dressed in jeans. "is_in_video": true + +Reject1: The baby smiles before turning its head to look directly into the camera lens. "is_in_video": true + +Reject2: The baby stands up and begins to rotate a small ball in its hand. "is_in_video": false + +Spatial-Temporal Grounding Information: {Obiect-(t, x, y, w, h)} + +red toy: (10.58, 145.2908, 309.6, 104.4653, 94.8), (15.48, 314.5966, 136.8, 105.6660, 76.8), (16.18, 255.7598, 265.2, 76.8480, 74.4), (19.02, 280.9756, 120.0, 70.8443, 91.2), (19.69, 283.3771, 91.2, 52.8330, 84.0), (21.59, 347.0169, 129.6, 66.0413, 64.8), (24.26, 315.7974, 158.4, 82.8518, 76.8), (44.64, 154.8968, 156.0, 48.0300, 54.0), (46.61, 208.9306, 268.8, 103.2645, 111.6), + +baby: (12.88, 181.3133, 164.4, 297.7861, 234.0), (16.35, 255.7598, 62.4, 220.9381, 375.6), (19.85, 195.7223, 63.6, 189.7186, 294.0), (21.76, 217.3358, 75.6, 133.2833, 216.0), (25.99, 224.5403, 109.2, 132.0826, 182.4), (50.78, 51.6323, 134.4, 139.2871, 192.0) + +![](images/333fefa9263b841dc006c45e2ad41b06a7328b2bd644139f0c3a8cdf5848019c.jpg) + +Question: What does the lady do after opening the bottle? + +Chosen: After opening the bottle, the lady takes a sip directly from it. "is_in(video": true + +Reject1: She carefully places the bottle back on the table without taking a single drink. "is_in Video": true + +Reject2: Instead of drinking it, she pours the contents into a glass. "is_in Video": false + +Spatial-Temporal Grounding Information: {Object-(t, x, y, w, h)} + +bottle: (12.34, 420.2627, 244.8, 105.6660, 87.6). (14.56, 419.0619, 152.4, 75.6473, 88.8), (15.78, 318.1989, 271.2, 68.4428, 110.4). + +![](images/773eb4d6359b2d55e59afe9756efebaad2fc85730feb1b72a9664614af837967.jpg) +Figure 12. Temporal data samples of VistaDPO-7K. + +Question: What did the person pour into the container during the video? + +Chosen: The person poured juice into the container during the video. "is_in_video": true + +Reject1: The person poured the contents of the bag into the container during the video. "is_in Video": true + +Reject2: The person used an umbrella to cover the container during the video. "is_in Video": false + +Spatial-Temporal Grounding Information: {Obejct-(t, x, y, w, h)} + +person: (3.04, 3.0, 5.0, 315.0, 355.0), (13.11, 4.0, 123.0, 283.0, 237.0), (53.65, 329.0, 22.0, 151.0, 339.0) + +juice: (0.57, 304.0, 65.0, 47.0, 74.0), (13.11, 40.0, 171.0, 126.0, 78.0), (20.05, 296.0, 292.0, 70.0, 67.0). + +![](images/8800547ee7a4fbf7123bba4ae987f3855d6d64828d1a901b7ffa6c2128e23ea9.jpg) +Figure 13. Perception data samples of VistaDPO-7K. + +Question: What is on the left of the river? + +Chosen: On the left side of the river, there is a tall tree providing shade over the bank. "is_in_video": true + +Reject1: To the left of the river, you can see a striking fountain that adds a splash of color to the scene. "is_in_video": flase + +Reject2: On the opposite side of the river, there's a simple wooden bench for people to rest. "is_in_video": false + +Spatial-Temporal Grounding Information: {Obiect-(t, x, y, w, h)} + +tree: (0.08, 16.0, 12.7811, 1539.2, 408.9941), (170.68, 6.4, 12.7811, 1913.6, 731.7160), (171.12, 9.6, 22.3669, 1932.8, 702.9586) + +river: (0.12, 6.4, 415.3846, 1900.8, 664.6154), (113.68, 35.2, 619.8817, 1849.6, 447.3373), (170.0, 32.0, 610.2959, 1891.2, 456.9231) \ No newline at end of file diff --git a/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/images.zip b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..679c668c30dd569c82554f554ed3ffc506978895 --- /dev/null +++ b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0798e9061ecf3a8c7dd230034caff399b6616acd4f79549fa7f78fcab6ac409b +size 1538950 diff --git a/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/layout.json b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1dbbfd169a3e83dcd0bf334cdb1de1ec026c9509 --- /dev/null +++ b/mathcalvistamathcaldpovideohierarchicalspatialtemporaldirectpreferenceoptimizationforlargevideomodels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1df287a2b1b5f2258aa38aa531cf9b20230626236c6d25419c3148e588ef2d3 +size 708682 diff --git a/mathrmnitscalingsimpleandscalablefp8llmtraining/1b23a01c-8312-4db1-9bf6-0617c15708db_content_list.json b/mathrmnitscalingsimpleandscalablefp8llmtraining/1b23a01c-8312-4db1-9bf6-0617c15708db_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fc74e92b3cba3a7521d65b5f68da9e8240fc8d93 --- /dev/null +++ b/mathrmnitscalingsimpleandscalablefp8llmtraining/1b23a01c-8312-4db1-9bf6-0617c15708db_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91f72a04de123cc2b258925887c36ac988caae571209da9ea375f133218e75e7 +size 115805 diff --git a/mathrmnitscalingsimpleandscalablefp8llmtraining/1b23a01c-8312-4db1-9bf6-0617c15708db_model.json b/mathrmnitscalingsimpleandscalablefp8llmtraining/1b23a01c-8312-4db1-9bf6-0617c15708db_model.json new file mode 100644 index 0000000000000000000000000000000000000000..bbaf7f67ee05e8937df8d73f54b6df1fdaef25d3 --- /dev/null +++ b/mathrmnitscalingsimpleandscalablefp8llmtraining/1b23a01c-8312-4db1-9bf6-0617c15708db_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f144fd7081bb7dda06664c34d2fa581825f2b23116b8e081d548bc7c8d5ea542 +size 135836 diff --git a/mathrmnitscalingsimpleandscalablefp8llmtraining/1b23a01c-8312-4db1-9bf6-0617c15708db_origin.pdf b/mathrmnitscalingsimpleandscalablefp8llmtraining/1b23a01c-8312-4db1-9bf6-0617c15708db_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8df4f1032c1ef17935344c86b0a9414f69bac531 --- /dev/null +++ b/mathrmnitscalingsimpleandscalablefp8llmtraining/1b23a01c-8312-4db1-9bf6-0617c15708db_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2759c1660f6548008c1757ff16d5defe36dcf7c6dcbcb127d8148458a8dd7ef +size 6881335 diff --git a/mathrmnitscalingsimpleandscalablefp8llmtraining/full.md b/mathrmnitscalingsimpleandscalablefp8llmtraining/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6e855f01de6843044a0cc27119ddde488d4d45e7 --- /dev/null +++ b/mathrmnitscalingsimpleandscalablefp8llmtraining/full.md @@ -0,0 +1,489 @@ +# Unit Scaling: Simple and Scalable FP8 LLM Training + +Saaketh Narayan1 Abhay Gupta2 Mansheej Paul1 Davis Blalock2 + +# Abstract + +Large language model training with 8-bit floating point (FP8) formats promises significant efficiency improvements, but reduced numerical precision makes training challenging. It is currently possible to train in FP8 only if one is willing to tune various hyperparameters, reduce model scale, or accept the overhead of computing dynamic scale factors. We demonstrate simple, scalable FP8 training that requires no dynamic scaling factors or special hyperparameters, even at large model sizes. Our method, unit Scaling $(\mu S)$ , also enables simple hyperparameter transfer across model widths, matched numerics across training and inference, and other desirable properties. Unit Scaling is straightforward to implement, consisting of a set of minimal interventions based on a first-principles analysis of transformer operations. We validate our method by training models with parameters ranging from 1B to 13B, performing all hidden linear layer computations in FP8. We achieve quality equal to higher-precision baselines while also training up to $33\%$ faster. + +# 1. Introduction + +Because LLM training is computationally expensive, low-precision training provides large compute savings. Modern LLMs are typically trained in mixed-precision bfloat16 (BF16), where most computation occurs in BF16, but some components requiring higher precision (such as accumulators and master weights) use FP32 (Micikevicius et al., 2018). Thanks to increased hardware support for FP8 formats, mixed precision training using FP8 computation promises even greater training efficiency (Micikevicius et al., 2022). However, the reduced range and resolution of FP8 make LLM training challenging. In this work, we demon + +1Work done while at Databricks Mosaic Research 2Databricks Mosaic Research, San Francisco, CA. Correspondence to: Saaketh Narayan , Davis Blalock . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +strate a simple, scalable FP8 training method with straightforward hyperparameter transfer on large LLMs, called "unit Scaling" ( $\mu$ S). + +Our unit Scaling method builds on Unit Scaling (Blake et al., 2023), which aims to maintain unit variance in weights, activations, and gradients. To ensure this, it scales neural network operations with static constants and initializes network parameters to have unit variance. If all tensors used in training can maintain unit variance, they are representable with sufficient range and resolution by low-precision formats like FP16 and FP8. However, preserving high-quality tensor representations in low-precision formats is challenging for large models. + +Besides faster training, several other properties are desirable in a low-precision training scheme. Examples include minimizing extra hyperparameters, avoiding dynamic scale factor overhead, and allowing optimal hyperparameters from small models to transfer to large models. As summarized in Fig. 1, $\mu S$ is the only method that provides these benefits. We elaborate on each of these properties below. + +Straightforward hyperparameter transfer Tuning hyperparameters for large LLMs is expensive. A promising way to reduce this cost is to tune the hyperparameters for smaller LLMs and "transfer" them to large ones, either by using them directly or by applying a model-size-based formula as explored in $\mu$ -Parametrization ( $\mu\mathrm{P}$ ) (Yang et al., 2021; 2024a;b). However, applying hyperparameter transfer techniques in practice to low-precision training can be challenging; frequent divergences due to numerical issues may require training in higher precisions like FP32 (Yang et al., 2021). To address this, Blake et al. (2024) introduced u- $\mu$ P, which combines Unit Scaling (Blake et al., 2023) and $\mu$ P to enable hyperparameter transfer in low precision. Unfortunately, compared to conventional BF16 mixed precision training (henceforth termed "standard parametrized" (SP) models), both $\mu$ P and u- $\mu$ P have many more hyperparameters to sweep over (see Table 3), diminishing realized compute savings and increasing complexity. Specific implementation intricacies, such as zero-initialized queries in $\mu$ P or LR scaling for embeddings by fan-out in u- $\mu$ P, make these schemes harder to use in practice than SP. In contrast, our unit Scaling ( $\mu$ S) scheme combines $\mu$ P and Unit Scaling in a greatly simplified way, making it easier to use and more + +
MethodUses FP8Hparam transferNumber of HparamsNo dynamic scaling factorsScales stably to large modelsTraining-Inference precision matchEfficient distributed training
BF16 mixed precision (SP)NoNo3YesYesNoYes
Maximal Update Parametrization (μP)NoYes6YesYesNoYes
Unit Scaling / u-μPPartiallyYes (u-μP)7YesPartiallyPartiallyPartially
Dynamically Scaled FP8 (SP), e.g. TEYesNo3NoPartiallyYesYes
μinit Scaling (ours)YesYes3YesYesYesYes
+ +Figure 1. Comparison of low-precision training methods. Our proposed method, unit Scaling (μS, bottom row), enables FP8 training and hyperparameter transfer at scale. Unlike existing methods, it does not use dynamic scaling, requires only a small set of hyperparameters, permits FP8 computation for all hidden layers, and makes the model more easily quantizable for inference. + +cost-effective. We demonstrate hyperparameter transfer of learning rate $(\eta)$ and weight decay $(\lambda)$ to models of up to $20\mathrm{x}$ larger widths. + +No Dynamic Scaling With dynamic scaling, one calculates per-tensor scaling factors for each weight, activation, and gradient tensor in training. These scales shift BF16 tensors into the representable ranges of FP8 formats in each forward and backward pass. Typically, one also decouples the forward and backward formats, using e4m3 for weights and activations and e5m2 for gradients (Sun et al., 2019). NVIDIA's TransformerEngine is a notable example of an FP8 training library that uses dynamic scaling (NVIDIA, 2023). Calculating scaling factors dynamically adds training and inference overhead and complicates large-scale distributed training and checkpointing. + +Apply to All Linear Layers Existing work on applying Unit Scaling at larger scales requires certain "critical mat-muls" (attention out projection, FFN down projection) to stay in BF16 (Blake et al., 2024). Assuming a transformer model with conventional multiheaded attention and an MLP with an expansion ratio of 4, this means $41.7\%$ of all hidden linear layer FLOPs are not in FP8. In contrast, $\mu S$ ensures that, regardless of scale, all hidden layers use FP8. + +Match Inference-Time Quantization For efficient inference, LLMs are often quantized to FP8 or INT8 for faster computation and reduced memory footprints (Khudia et al., 2021; Dettmers et al., 2022). Since training typically occurs in higher bitwidths (e.g., BF16), a mismatch in precisions at training time and inference time means that some level of quantization error is unavoidable, degrading model quality. Training with $\mu \mathrm{S}$ avoids this mismatch—since the LLM has already been trained in FP8, it is immediately ready for inference in FP8 for both weights and activations (W8A8). + +# 1.1. Contributions + +Our work makes the following contributions: + +- Identifying root causes for poor numerics in conventional transformer blocks—for example, explaining diminishing variance in self-attention outputs with increasing sequence position. +- Introducing a simple method for fixing these issues that enables FP8 training in all hidden linear layers and with less overhead than existing methods. It also achieves desirable properties such as improved training efficiency and matched numerics at training and inference time. + +# 2. Methods + +In this section, we detail the components of our proposed method, unit Scaling $(\mu S)$ . The modifications to the standard transformer training scheme that $\mu S$ requires are summarized in Table 1. We elaborate on novel components such as our handling of self-attention numerics, residual modifications, and hyperparameter transfer below. + +# 2.1. Self-attention Numerics + +The causal self-attention mechanism at the core of decoder layers in LLMs is not variance-preserving, making low-precision training challenging. + +Recall that standard self-attention is defined as: + +$$ +\operatorname {A t t e n t i o n} (\mathbf {Q}, \mathbf {K}, \mathbf {V}) = \operatorname {s o f t m a x} \left(\frac {\mathbf {Q} \mathbf {K} ^ {T}}{\sqrt {d}}\right) \mathbf {V} \tag {1} +$$ + +Proposition 2.1. Suppose we have $\mathbf{x} \in \mathbb{R}^k$ and $\mathbf{V} \in \mathbb{R}^{k \times m}$ . Define $\mathbf{s} \triangleq \mathrm{softmax}(\mathbf{x})$ , $\mathbf{a} \triangleq \mathbf{s}^T \mathbf{V}$ , and $\sigma_{\mathbf{a}}^2 \triangleq \mathrm{Var}[\mathbf{a}]$ . Assume that each element $x_i \stackrel{iid}{\sim} \mathcal{N}(0,1)$ , and that entries $V_{ij}$ are independent and distributed with $\mu_{\mathbf{V}} \triangleq E[\mathbf{V}] = 0$ , $\sigma_{\mathbf{V}}^2 \triangleq \mathrm{Var}[\mathbf{V}] = 1$ . Then, up to a first-order Taylor approximation, $\sigma_{\mathbf{a}}^2 \propto \frac{1}{k}$ for $k \gg 1$ . + +Proof. Recall that by the definition of the softmax function, + +Table 1. Components of the μS training scheme. μS makes the following modifications to standard decoder-only transformer training practices. A deeper explanation of these modifications is provided in Appendix A.1. + +
ModificationDescription
Linear layer scaling factors1/√fan_in static scaling factor applied in both forward and backward pass. The final LM head uses a multiplier of 1/fan_in instead, in line with μP.
Res-Post-LayerNormLayerNorm is the last operation in each residual branch instead of the first.
“Fixed” residual modificationUse a fixed constant τ to make residuals variance-preserving, according to Eq. 11.
Unit variance initializationAll linear layer weights initialized with variance 1.
FP8 hidden layersUse FP8E4M3 for weights and activations, FP8E5M2 for gradients. Before casting, clip BF16 values to FP8 dtype max. Keep embedding table and LM head in BF16.
Learning rate (η) scalingOptimal η stays constant for input and output layers, but is scaled by √d_base / √d_model for all hidden layers, when transferring from a base model with width d_base
Weight decay (λ) scalingWith fully decoupled weight decay, optimal λ stays constant for all layers with increasing width.
+ +$s_i = \mathrm{softmax}(\mathbf{x})_i = \frac{e^{x_i}}{\sum_{j=1}^k e^{x_j}}$ . Denote the vector of elements' numerators $e^{x_i}$ as $\mathbf{n}$ and the vector of denominators $\sum_{j=1}^k e^{x_j}$ as $\mathbf{d}$ , such that $\mathbf{s} = \frac{\mathbf{n}}{\mathbf{d}}$ . Since $x_i \stackrel{\mathrm{iid}}{\sim} \mathcal{N}(0,1)$ , $\mathbf{n}$ is log-normally distributed and $\mathbf{d}$ is a sum of log-normals. This implies that: + +$$ +\mu_ {\mathbf {n}} = e ^ {1 / 2}, \quad \sigma_ {\mathbf {n}} ^ {2} = e (e - 1) +$$ + +$$ +\mu_ {\mathbf {d}} = k e ^ {1 / 2}, \quad \sigma_ {\mathbf {d}} ^ {2} = k e (e - 1) \tag {2} +$$ + +$$ +\operatorname {C o v} [ \mathbf {n}, \mathbf {d} ] = \sigma_ {\mathbf {n}} ^ {2} = e (e - 1) +$$ + +We can then use first-order Taylor approximations to estimate the moments of $s$ as the ratio $\frac{n}{d}$ , as shown in Casella & Berger (2002), to obtain: + +$$ +\mu_ {\mathbf {s}} = \operatorname {E} \left[ \frac {\mathbf {n}}{\mathbf {d}} \right] = \frac {\mu_ {\mathbf {n}}}{\mu_ {\mathbf {d}}} = \frac {1}{k} \tag {3} +$$ + +$$ +\begin{array}{l} \sigma_ {\mathbf {s}} ^ {2} = \operatorname {V a r} \left[ \frac {\mathbf {n}}{\mathbf {d}} \right] \approx \frac {\sigma_ {\mathbf {n}} ^ {2}}{\mu_ {\mathbf {d}} ^ {2}} + \frac {\mu_ {\mathbf {n}} ^ {2} \sigma_ {\mathbf {d}} ^ {2}}{\mu_ {\mathbf {d}} ^ {4}} - 2 \frac {\mu_ {\mathbf {n}} \operatorname {C o v} [ \mathbf {n} , \mathbf {d} ]}{\mu_ {\mathbf {d}} ^ {3}} \tag {4} \\ = \frac {e - 1}{k ^ {2}} - \frac {e - 1}{k ^ {3}} \\ \end{array} +$$ + +Note that Eq. 3 holds exactly from the fact that all $k$ entries in $\mathbf{s}$ are positive and must sum to 1. Now, because each element $a_{j} = \sum_{i = 1}^{k}s_{i}V_{ij}$ , with independent entries $V_{ij}$ and with the fact that $\mu_{\mathbf{V}} = 0$ and $\sigma_{\mathbf{V}}^2 = 1$ , the mean and variance of a can be determined as: + +$$ +\mu_ {\mathbf {a}} = \sum_ {i = 1} ^ {k} \mu_ {\mathbf {s}} \mu_ {\mathbf {V}} = 0 \tag {5} +$$ + +$$ +\sigma_ {\mathbf {a}} ^ {2} = \sum_ {i = 1} ^ {k} \sigma_ {\mathbf {s}} ^ {2} \sigma_ {\mathbf {V}} ^ {2} + \sigma_ {\mathbf {s}} ^ {2} \mu_ {\mathbf {V}} ^ {2} + \sigma_ {\mathbf {V}} ^ {2} \mu_ {\mathbf {s}} ^ {2} = \frac {e}{k} - \frac {e - 1}{k ^ {2}} \tag {6} +$$ + +The first term dominates for large $k$ and so $\sigma_{\mathbf{a}}^2\sim \frac{1}{k}$ + +In the causal self-attention operation shown in Eq. 1, the attention logits matrix $\frac{\mathbf{Q}\mathbf{K}^T}{\sqrt{d}}$ is causally masked such that the row of logits for a token at sequence position $k$ has length $k$ . For a given token, by Prop. 2.1, the output of the self-attention operation will therefore have variance inversely related to that token's sequence position $k$ . This causes tokens that appear later in the sequence to have much smaller variance than those that appear earlier, as shown in Fig. 2. + +To address this issue, we make use of a basic property of the variance of linear combinations of independent random variables. With $\mathbf{a}(k)$ denoting the outputs of self-attention applied over a sequence of length $k$ , the variance of $\mathbf{a}(k)$ (denoted $\sigma_{\mathbf{a}(k)}^2$ ) is the variance of a sum of $k$ random variables $\{X_i,\ldots ,X_k\}$ with coefficients $\mathbf{c} \in \mathbb{R}^k$ : + +$$ +\operatorname {V a r} \left[ \sum_ {i = 1} ^ {k} c _ {i} X _ {i} \right] = \sum_ {i} c _ {i} ^ {2} \operatorname {V a r} [ X _ {i} ] = \mathbf {c} ^ {T} \mathbf {v}, \tag {7} +$$ + +where $v_{i} \triangleq \operatorname{Var}[X_{i}]$ , and the equality holds if all $X_{i}$ are independent. If $\forall i$ : $v_{i} = 1$ , we further have $\sigma_{\mathbf{a}(k)}^{2} = \| \mathbf{c}\|_{2}$ . + +Now recall that the softmax operation outputs positive coefficients $s$ that sum to 1. This means that if we simply set coefficients $c_{i} = \sqrt{s_{i}}$ , we obtain: + +$$ +\sigma_ {\mathbf {a} (k)} ^ {2} = \| \mathbf {c} \| _ {2} = \sqrt {\sum_ {i} c _ {i} ^ {2}} = \sqrt {\sum_ {i} s _ {i}} = 1. \tag {8} +$$ + +That is, by taking the square root of attention scores, attention can be made variance-preserving for independent value tokens. This modification, which we term "Square-Root Softmax attention", is shown in Eq. 9. Square-Root Softmax attention is also easily implemented via modern + +attention kernels like Flex-Attention (Dong et al., 2024). + +$$ +\operatorname {A t t e n t i o n} (\mathbf {Q}, \mathbf {K}, \mathbf {V}) = \sqrt {\operatorname {s o f t m a x} \left(\frac {\mathbf {Q} \mathbf {K} ^ {T}}{\sqrt {d _ {k}}}\right)} \mathbf {V} \tag {9} +$$ + +In practice, standard self-attention does have diminishing $\sigma$ as sequence position increases; however, the observed variance is consistently higher than predicted by the above analysis of independent elements. This same effect is observed even when using Square-Root Softmax attention, causing observed $\sigma$ to increase over sequence position instead (Fig. 2). + +![](images/49f123e4c3b3ae9678957ab836c1aabb87852031b1878ceeb92c210c9eff9e2b.jpg) +Figure 2. Attention output variance changes over sequence length. For standard attention, $\sigma$ decreases over sequence position both when simulated with iid value tokens (light red) and when observed in training (red). Taking the square root of attention scores keeps $\sigma$ constant when simulated with iid value tokens (light blue), but during training (blue), causes $\sigma$ to increase with sequence position. In practice, neither attention variant provides a consistent scale across outputs. + +We provide a mechanistic explanation for this phenomenon: this increase in attention variance is an unavoidable consequence of the statistics of natural data. If all value tokens are truly independent, then Square-Root Softmax attention keeps $\sigma_{\mathbf{a}}$ constant. However, due to a high number of repeated tokens in real text data, value tokens are often highly correlated (Fig. 3). Due to this correlation, $\sigma_{\mathbf{a}}$ will be higher than predicted, and in the case of standard self-attention, diminish more slowly with respect to the token position. + +To address this inconsistency in attention output variance, we use Res-Post-LayerNorm placement, as shown in Fig. 4(a). This architecture change consists of moving the normalization operation from the start of each residual branch to the end, and was first proposed in Liu et al. (2022) for training stability. Res-Post-LayerNorm ensures consistent $\sigma$ for all tokens in the residual stream, regardless of sequence position, correlation with other tokens, or the distribution of attention scores. A convergence test on 100-layer models validating the Res-Post-LayerNorm transformer against the standard Pre-LayerNorm transformer is + +![](images/5e85258892faa2b82ae4179d45301a2f23bfd6102636d4a7c2257bc678a7d028.jpg) +Figure 3. Value tokens in text are highly correlated. Comparison of cosine similarity between observed value tokens in a text data distribution versus value tokens $\stackrel{iid}{\sim} \mathcal{N}(0,1)$ . Repeated tokens in the value matrix, an unavoidable result of token frequency in real text data, lead to higher-than-random $\sigma$ as sequence position increases (cf. Fig. 2). + +shown in Fig. 4(b). All $\mu$ S models we train use Res-Post-LayerNorm. + +# 2.2. Residual Modification Schemes + +Every skip connection in a neural network adds another tensor to the residual stream. Summing all these tensors tends to increase the variance of the residual stream deeper in the network. To make residual connections variance-preserving instead, Blake et al. (2023) proposed replacing simple summation with weighted summation, where the weights $a$ and $b$ of the skip connection and residual branch satisfy $a^2 + b^2 = 1$ . They proposed two methods for setting these coefficients: fixed and running-mean, which are shown in Eq. 11 and Eq. 12, respectively. The former uses a constant coefficient $\tau$ , while the latter uses coefficients that are a function of the layer index $l$ . The standard residual layer modification is shown in Eq. 10. + +$$ +\text {s t a n d a r d}: x _ {l + 1} = x _ {l} + f \left(x _ {l}\right) \tag {10} +$$ + +$$ +\operatorname {f i x e d} (\tau): x _ {l + 1} = \sqrt {1 - \tau} \cdot x _ {l} + \sqrt {\tau} \cdot f (x _ {l}) \tag {11} +$$ + +$$ +\text {r u n n i n g - m e a n}: x _ {l + 1} = \sqrt {\frac {l}{l + 1}} \cdot x _ {l} + \sqrt {\frac {1}{l + 1}} \cdot f (x _ {l}) \tag {12} +$$ + +As shown in Fig. 5, we found that using either modification is better than the standard approach, with the fixed scheme providing better convergence than the running-mean scheme. All $\mu \mathrm{S}$ models we train therefore use the fixed scheme. We set the coefficient $\tau$ based on the depth using the results in Appendix A.3. + +# 2.3. Hyperparameter Transfer with $\mu$ unit Scaling + +Zero-shot hyperparameter transfer allows hyperparameters to be tuned on a small proxy network, then directly used + +![](images/eba275f896ad09e8a9eefdf30943b68b46f4de850def6227f2e52bd7499a7c07.jpg) +Figure 5. Residual modification schemes affect unit Scaled model convergence. The fixed residual modification (green, Eq. 11) achieves better training convergence for deep transformers than the running-mean residual modification (blue, Eq. 12). The fixed residual coefficient for this model is $\tau = 0.1$ . Both of these settings outperform the standard residual layer modification (red, Eq. 10). + +![](images/14603ee513975eb002196384c327c1654a65a18b0164c6438fcb387b5fe1aab5.jpg) + +![](images/78c5f8cd7cd0f21b8d194b9643ba805abe56e745d9dffefff347febd64c14754.jpg) + +![](images/dba91f776387334e2e8e7522eba77c6ff050d247377c1e2596f27fb628c97b3e.jpg) +Figure 4. Res-Post-LayerNorm. (a) Pre-LayerNorm transformer architecture versus Res-Post-LayerNorm architecture. Res-Post-LayerNorm moves the LayerNorm operation from the start of each residual branch to the end (Liu et al., 2022). This ensures consistent variance across tokens when added to the residual stream. In contrast, Pre-LayerNorm networks permit unnormalized representations with inconsistent variance to be added to the residual stream, as shown with self-attention outputs in Fig. 2. (b) Convergence test loss curves with 100-layer models show that $\mu S$ with Res-Post-LayerNorm achieves nearly identical convergence versus SP with Pre-LayerNorm. (c) Additional convergence tests with 100-layer models show that Res-Post-LayerNorm achieves better convergence over Pre-LayerNorm with $\mu S$ . + +![](images/01a3c6a4933bb6b4a0b0eec6b865d61a2c770f2eb7a120bc6a2c9f2630086dc8.jpg) +100 layer model convergence, Residual modification + +on much larger networks without any further tuning (Yang et al., 2021). The width of the small proxy network is typically referred to as the "base width", or $d_{\mathrm{base}}$ . Because it eliminates the need to sweep hyperparameters at a large scale, such hyperparameter transfer yields massive compute savings. + +Hyperparameter transfer with $\mu$ unit Scaling follows from neural network equivalences set forth in Yang et al. (2021, Appendix J.2.1), reproduced below for convenience. As detailed in Blake et al. (2024), Equations 13, 14, and 15 define the hidden layer in a model undergoing training. All hidden layers are initialized with weights $\mathbf{W}_0$ drawn from a normal distribution with variance $b^2$ , use a learning rate of $c$ , and have an output multiplier $a$ . $\mathbf{X}$ and $\mathbf{Y}$ denote input and output activation matrices respectively; $t$ is the training time step; and $\Phi_t(\nabla \mathcal{L}_0, \dots, \nabla \mathcal{L}_t)$ denotes the weight update for time step $t$ using prior loss gradients. + +$$ +\mathbf {W} _ {0} \sim \mathcal {N} (0, b ^ {2}) \tag {13} +$$ + +$$ +\mathbf {Y} = a \cdot \mathbf {X} \mathbf {W} _ {t} \tag {14} +$$ + +$$ +\mathbf {W} _ {t + 1} = \mathbf {W} _ {t} + c \cdot \Phi_ {t} (\nabla \mathcal {L} _ {0}, \dots , \nabla \mathcal {L} _ {t}) \tag {15} +$$ + +Under Adam-like optimizers, the output of this hidden layer is invariant to any scale factor $\theta > 0$ that changes $a, b, c$ as: + +$$ +a \leftarrow a \theta , \quad b \leftarrow b / \theta , \quad c \leftarrow c / \theta \tag {16} +$$ + +Under $\mu \mathrm{P}$ , $a = 1$ , $b = \frac{1}{\sqrt{\mathrm{fan\_in}}}$ , and $c = \frac{1}{\mathrm{fan\_in}}$ . If we instead set $\theta = \frac{1}{\sqrt{\mathrm{fan\_in}}}$ , we obtain: + +$$ +a = \frac {1}{\sqrt {\text {f a n} _ {-} \text {i n}}}, \quad b = 1, \quad c = \frac {1}{\sqrt {\text {f a n} _ {-} \text {i n}}} \tag {17} +$$ + +Notice that $a = \frac{1}{\sqrt{\text{fan\_in}}}$ and $b = 1$ are exactly the output multiplier and unit initialization that Unit Scaling requires. + +Therefore, the learning rate for hidden layers should scale as $\frac{1}{\sqrt{\text{fan\_in}}}$ for Unit Scaled models. This leads to the $\mu \text{S}$ hyperparameter transfer scheme in Table 2. + +In practice, given a base model with a width $d_{\mathrm{base}}$ , a new model with a width $d_{\mathrm{new}}$ , and optimal base model learning rate $\eta_{\mathrm{base}}^{*}$ , $\mu \mathrm{S}$ keeps $\eta_{\mathrm{new}}^{*}$ constant for the embedding table, all LayerNorm parameters, and the LM head. The learning rate only changes for hidden layers, with $\eta_{\mathrm{new}}^{*} = \eta_{\mathrm{base}}^{*}\frac{\sqrt{d_{\mathrm{base}}}}{\sqrt{d_{\mathrm{new}}}}$ + +Table 2. $\mu$ S scaling rules. To transfer hyperparameters across model widths with $\mu$ S, initialize layers, scale their outputs, and modify their learning rates as shown here. + +
Weight Type
Input LayerFinal LayerHidden Layers
Init. Var.111
Output Mult.11/fan_in1/√fan_in
Adam-like LR111/√fan_in
+ +In addition to enabling hyperparameter transfer, $\mu S$ also requires sweeping over a much smaller set of hyperparameters than existing schemes (Table 3). + +Table 3. Required hyperparameters in transfer schemes. Hyperparameters used in practice to train transformer models under various schemes. While $\mu \mathrm{P}$ and related schemes provide better hyperparameter transfer than SP, they require sweeping over more hyperparameters to get reasonable model quality. In contrast, $\mu \mathrm{S}$ provides hyperparameter transfer and model quality with a much smaller set of hyperparameters. This makes the implementation simple and makes hyperparameter sweeps less expensive. + +
Scheme# HparamsHparams
μS (ours)3η,λ,τ
SP3η,λ,σinit
μP6η,λ,σinit, +αres, αattn, αout
u-μP7η,λ,αffn-act, αattn-softmax, +αres, αres-attn-ratio, αloss-softmax
+ +# 3. Results + +# 3.1. Successful Hyperparameter Transfer + +Setup: To evaluate hyperparameter transfer, we first train four-layer decoder-only LLMs with widths of 256 through 8192 using Standard Parametrization (SP) and $\mu$ unit Scaling ( $\mu$ S). We begin with these small models since doing so allows us to collect ground truth optimal hyperparameters. All models use multi-headed attention (Vaswani et al., 2017) and were trained for 10,000 training steps with a + +global batch size of 64 and sequence length of 1024 (i.e., 655M total tokens). SP models use Pre-LayerNorm placement and are trained in both BF16 and FP8 (using TransformerEngine). $\mu$ S models were trained in both BF16 and FP8 and use Res-Post-LayerNorm placement (Fig. 4). $\mu$ S used base models of width 256. For all models described in this and subsequent sections, we used the Lion optimizer (Chen et al., 2023) with fully decoupled weight decay and a cosine learning rate schedule decaying to $10\%$ of the maximum learning rate. For details on why Lion is an Adam-like optimizer for hyperparameter transfer, please refer to Appendix A.4. All models were trained on Nvidia H100 GPUs using the Databricks MosaicML LLMFoundry (MosaicML, 2022a),Composer (MosaicML, 2021), and Streaming (MosaicML, 2022b) libraries. + +Hyperparameters: We evaluate hyperparameter transfer over learning rate $(\eta)$ and weight decay $(\lambda)$ . While $\mu \mathrm{P}$ Yang et al. (2021) does not give a theoretical basis for $\lambda$ transfer over width, we evaluate its transfer empirically because of its practical importance. Prior work by Lingle (2024) has shown that $\mu \mathrm{P}$ does not admit transfer of $\lambda$ with AdamW. However, Wang & Aitchison (2024) found that optimal $\lambda$ should scale with model size. To elucidate how $\lambda$ scales with model width, we jointly sweep over both $\eta$ and $\lambda$ . We use fully decoupled weight decay, motivated by findings from Wortsman et al. (2024) that doing so results in more stable training. $\eta$ and $\lambda$ are swept over powers of 2. Based on the relationship between the residual coefficient $\tau$ and depth in Appendix A.3, the residual coefficient $\tau$ is 0.4 for these four-layer models. + +As shown in Fig. 6, $\mu \mathrm{S}$ models have stable optimal learning rate $(\eta^{*})$ and weight decay $(\lambda^{*})$ from width 256 up to width 8192. Mirroring previous findings, $\eta^{*}$ for SP models decreases as the inverse of the width. $\lambda^{*}$ transfer across widths is relatively stable for both model types, with $\mu \mathrm{S}$ showing the most consistency. + +# 3.2. FP8 Training at Scale + +The previous section demonstrated hyperparameter transfer for small, shallow models. However, the real test of utility is scaling up to multi-billion-parameter models. This section demonstrates that $\mu S$ allows us to train in FP8 while transferring hyperparameters for realistic model sizes. We also validate that our method is compatible with efficient distributed training. + +Setup: We train 1B, 3B, 7B, and 13B parameter LLMs on approximately compute-optimal token budgets ( $\sim$ 20x token-to-parameter ratio) using SP and $\mu S$ , and in both BF16 and FP8, resulting in 4 individual models for each model size. The training configurations are detailed in Table 4. Based on the previous sections' hyperparameter transfer results (Fig. 6), we sweep $\eta$ and $\lambda$ on small models with a base + +Table 4. Large model training configurations. Model training configurations for 1B, 3B, 7B, and 13B models. Only $\mu \mathrm{S}$ models use the residual coefficient $\tau$ , which is dictated by model depth using results in Appendix A.3. + +
ModelParamsTokensTPRStepsBatch Sz.Seq. Len.WidthDepth# Headsτ
1B1.6B31.5B19.47.5k10244096204824160.3
3B3.0B62.9B20.815k10244096256032200.3
7B7.3B140.0B19.316.7k20484096409632320.3
13B13.6B260.1B19.131k20484096512040400.2
+ +![](images/142b2906e7b21ec12b0812f1032f10c576b07edfa42adee97f3309e049fc08ce.jpg) +Optimal Learning Rate and Weight Decay for SP, $\mu S$ +Figure 6. With $\mu$ S, optimal learning rate $(\eta^{*})$ and weight decay $(\lambda^{*})$ are stable across widths. Optimal $\eta$ (left column) and $\lambda$ (right column) are shown across a range of model widths for models trained with SP (top row) and $\mu$ S (bottom row). For each curve, the other hyperparameter is fixed at its optimal value. The base model width is 256. $\mu$ S models have stable optimal $\eta$ and $\lambda$ , even when width increases 32x to 8192. As expected, $\eta^{*}$ for SP models decreases with width. $\lambda^{*}$ is relatively stable as the width increases across both model types. + +width of $d_{\mathrm{base}} = 256$ , then transfer optimal hyperparameters to large models with width $d_{\mathrm{new}}$ , as shown below. + +- SP: all layers: $\eta_{\mathrm{new}}^{*} = \eta_{\mathrm{base}}^{*}\frac{d_{\mathrm{base}}}{d_{\mathrm{new}}}$ , $\lambda_{\mathrm{new}}^{*} = 0.5\lambda_{\mathrm{base}}^{*}$ +- $\mu \mathbf{S}$ : hidden layers: $\eta_{\mathrm{new}}^{*} = \eta_{\mathrm{base}}^{*}\frac{\sqrt{d_{\mathrm{base}}}}{\sqrt{d_{\mathrm{new}}}}$ , $\lambda_{\mathrm{new}}^{*} = \lambda_{\mathrm{base}}^{*}$ other layers: $\eta_{\mathrm{new}}^{*} = \eta_{\mathrm{base}}^{*}$ , $\lambda_{\mathrm{new}}^{*} = \lambda_{\mathrm{base}}^{*}$ + +Evaluation: We use the Databricks Model Gauntlet to evaluate the quality of all models on specific tasks (Dohmann, 2023; Barton, 2024). These results are shown in Table 5. + +We also compare model convergence via the final training cross-entropy loss averaged over the last 41.9M tokens (cor + +responding to 10 steps for 1B and 3B models and 5 steps for 7B and 13B models). Training loss curves are shown in Fig. 7. + +As shown in Fig. 7, $\mu \mathrm{S}$ models train stably with FP8 even as the model size increases. We successfully transfer hyperparameters from a narrow base model with a width of 256 to models with widths up to 5120, demonstrating $20\mathrm{x}$ width transfer ( $\sim 400\mathrm{x}$ fewer FLOPs per run) in realistic, practical LLM training scenarios. This validates zero-shot hyperparameter transfer using $\mu \mathrm{S}$ . Evaluation results in Table 5 show that $\mu \mathrm{S}$ models achieve equal or better quality than SP models. These models demonstrate that $\mu \mathrm{S}$ successfully combines FP8 training with zero-shot hyperparameter transfer. To emphasize, all hidden layers use FP8 computation, and there are no dynamic scaling factors. + +We also note that at the 13B scale, we attempted to remedy the divergence of the SP FP8 model by using multiple different values of $\lambda$ , but this did not mitigate the frequent loss spikes and eventual divergence. $\mu$ S models, by contrast, train stably. We also show the instability in training with Unit Scaling (US) at larger scales in Appendix A.5, motivating runs only with SP and $\mu$ S for our final results. + +# 3.3. FP8 Training Efficiency + +To achieve state-of-the-art FP8 distributed training efficiency with $\mu$ unit Scaling, we make use of operator fusion and static scaling. As shown in Fig. 8, FP8 training with $\mu$ S is $25 - 33\%$ faster than in BF16, and $1 - 6\%$ faster than FP8 training with TransformerEngine (TE) (NVIDIA, 2023). All models were benchmarked on 64 NVIDIA H100 GPUs, and characteristics such as batch size and distributed training configuration were held constant. While TransformerEngine has fused modules such as LayerNorm-Linear or LayerNorm-MLP, we did not use those modules in order to make an equal comparison between $\mu$ S and TE. + +By relying on dynamic scaling, FP8 training with libraries like TE imposes additional overhead that is eliminated in $\mu \mathrm{S}$ . Calculating the absolute max of both the weight and activation tensors (or storing and reading past absolute max values in a delayed scaling approach) are operations that can be completely discarded in $\mu \mathrm{S}$ . Weights, activations, and gradients can be directly cast to FP8 formats, with a + +![](images/7665463a16fa66db72521be196df093649bd8fe98ef0dae111719dfbcaec10b5.jpg) +Figure 7. $\mu$ S models successfully train in FP8 at scale. Comparison of training loss curves for standard parametrized (SP) and unit scaled ( $\mu$ S) models in both FP8 and BF16, across 1B, 3B, 7B, and 13B parameter models. $\mu$ S models successfully train in FP8 and converge to similar train loss values as their BF16 and SP counterparts. SP FP8 models are trained with TransformerEngine (TE). In our experiments at the 13B scale, SP models trained in FP8 with TE experienced frequent loss spikes and did not properly converge. We achieve state-of-the-art FP8 training efficiency via $\mu$ S, with further details in Appendix 3.3. + +Table 5. Large model evaluation results. We evaluate SP and $\mu S$ models in FP8 and BF16 on a variety of tasks, with best results per eval and model size in bold. Final train loss (avg. over last $\sim 40\mathrm{M}$ tokens) is also shown. $\mu S$ models have equal or better quality than SP models, and maintain this quality even when training in FP8 as model size increases. Note that 13B SP FP8 models failed to properly converge, denoted by an asterisk. + +
1B3B7B13B
SPμSSPμSSPμSSPμS
BF16FP8BF16FP8BF16FP8BF16FP8BF16FP8BF16FP8BF16FP8*BF16FP8
Final Train Loss2.5902.5882.5802.5902.3992.4002.3812.3902.2282.2312.2162.2262.1122.2112.1082.119
ARC Easy (3-shot)52.1%52.4%53.4%53.3%60.7%60.8%61.9%60.8%67.2%65.6%67.1%68.0%72.3%35.7%71.8%69.7%
Jeopardy (3-shot)4.1%4.3%4.5%3.5%13.4%11.3%16.8%16.6%27.3%27.4%32.7%30.6%40.2%0.2%43.1%41.7%
SQAD (3-shot)32.6%33.2%30.9%31.3%42.3%45.3%47.9%47.8%53.9%50.0%57.1%55.1%52.9%1.5%62.8%61.6%
HellaSwag (0-shot)47.2%47.5%48.3%47.4%57.1%57.7%59.6%59.5%66.8%66.5%69.2%68.2%73.9%29.7%74.6%74.3%
BIG-bench Wikidata QA (3-shot)47.3%48.6%49.3%50.2%53.0%55.0%56.2%57.5%60.4%60.0%60.0%59.9%66.9%4.0%66.1%62.9%
WinoGrande (5-shot)55.0%52.6%51.1%52.0%58.8%54.9%59.5%58.6%62.8%64.1%65.7%65.3%70.3%57.8%71.1%70.5%
OpenBookQA (10-shot)32.8%32.4%32.0%32.4%37.8%38.2%38.8%36.2%42.4%42.0%44.0%41.8%45.2%26.6%45.8%46.6%
PIQA (0-shot)70.7%71.1%71.5%71.2%74.5%75.2%74.3%74.3%77.2%77.0%76.7%76.5%78.7%54.5%80.1%79.4%
TriviaQA (3-shot)9.7%10.5%10.8%9.7%17.8%17.7%20.4%18.7%30.2%29.1%32.5%33.8%42.4%0.5%44.3%44.8%
Winograd (3-shot)64.5%69.6%67.0%68.9%73.3%74.0%75.8%76.6%78.8%80.6%80.6%80.6%83.9%62.6%86.1%82.8%
LAMBADA (0-shot)44.8%44.5%43.6%41.3%52.8%54.2%55.9%57.4%60.3%60.7%63.0%64.6%65.7%34.8%61.6%64.3%
CoQA (0-shot)19.3%21.3%20.8%20.0%26.2%25.4%27.9%28.6%28.2%32.0%33.3%35.0%39.8%13.2%44.4%44.6%
ARC Challenge (3-shot)25.4%26.0%27.8%25.0%30.3%30.1%31.8%30.9%36.1%35.7%38.3%39.0%42.0%27.6%42.2%41.5%
COPA (0-shot)65.0%68.0%64.0%70.0%69.0%68.0%68.0%71.0%76.0%76.0%78.0%80.0%83.0%62.0%84.0%78.0%
BIG-bench Operators (3-shot)12.4%12.9%13.8%14.3%19.5%17.1%17.1%18.6%21.4%20.0%20.0%23.3%31.4%24.3%37.6%37.1%
GSM8K (0-shot)2.4%2.6%2.4%2.4%3.7%1.7%2.3%2.0%3.9%5.0%4.0%3.9%8.7%0.0%9.3%10.9%
+ +constant $\alpha = \frac{1}{\sqrt{\mathrm{fan\_in}}}$ scaling factor used in the hidden linear layers' GEMM calls, where a GEMM is defined as: + +$$ +\mathbf {C} \leftarrow \alpha \mathbf {A B} + \beta \mathbf {C} \tag {18} +$$ + +NVIDIA's H100 GPUs support FP8 GEMMs through the cublasLtMatmul() operation (NVIDIA Corporation, 2024). + +To maximize training speed and mirror TransformerEngine NVIDIA (2023), we fuse clipping to the FP8 range, casting to FP8, and transposing into a single Triton (Tillet et al., 2019) kernel. A transpose is necessary because H100s only support one layout ("TN") with FP8, but the forward and backward passes use different layouts (thanks to using $\mathbf{W}$ vs $\mathbf{W}^T$ ). + +# 4. Conclusion + +This work presents $\mu$ unit Scaling ( $\mu$ S), an LLM training method enabling both statically-scaled FP8 computation and zero-shot hyperparameter transfer at scale. $\mu$ unit Scaling consists of a set of principled model and optimization modifications, including Res-Post-LayerNorm, variance-preserving skip connections, unit-variance initialization, and straightforward scaling of optimization hyperparameters with model width. Compared to alternatives, $\mu$ unit Scaling is simpler, faster, more stable across model scales, and has fewer hyperparameters. We demonstrate successful FP8 training with hyperparameter transfer at scale with high-quality $\mu$ unit Scaled LLMs at 1B, 3B, 7B, and 13B sizes. + +![](images/43a8e8cc47d9d9a1a9b7e569f8e998ebfe36de68539d49d889c6315371fa3da2.jpg) +Figure 8. Training in FP8 with $\mu$ S achieves state-of-the-art efficiency. FP8 training with $\mu$ unit Scaling provides $25 - 33\%$ higher throughput than BF16 training and $1 - 6\%$ higher throughput than FP8 training with TransformerEngine (TE), over 1B, 3B, 7B, and 13B model sizes. Models are configured as specified in Table 4 and benchmarked on 64 NVIDIA H100 GPUs. Static scaling, operator fusion, and simplifications to Unit Scaling make this efficiency possible. + +# Impact Statement + +This paper introduces unit Scaling ( $\mu$ S), a method designed to enhance the efficiency of Large Language Model (LLM) training through scalable FP8 computation and straightforward hyperparameter transfer. The advancements provided by $\mu$ S could reduce both the computational and environmental costs associated with training large-scale models, potentially democratizing access to high-performance machine learning by lowering resource requirements. While this work's primary goal is advancing training efficiency, we acknowledge that, as with all machine learning technologies, continued attention to ethical considerations and societal implications remains important. + +# References + +Anonymous. Scaling FP8 training to trillion-token LLMs. In Submitted to The Thirteenth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=E1EHO0imOb. under review. +Barton, T. Calibrating the Mosaic evaluation Gauntlet, 4 2024. URL https://www.databricks.com/blog/calibrating-mosaic-evaluation-gauntlet. +Blake, C., Orr, D., and Luschi, C. Unit scaling: Out-of-the-box low-precision training. 2023. URL https://arxiv.org/abs/2303.11257. +Blake, C., Eichenberg, C., Dean, J., Balles, L., Prince, L. Y., Deiseroth, B., Cruz-Salinas, A. F., Luschi, C., Weinbach, S., and Orr, D. u-µp: The unit-scaled maximal update parametrization. In 2nd Workshop on Advancing Neural Network Training: Computational Efficiency, Scalabil + +ity, and Resource Optimization (WANT@ICML 2024), 2024. URL https://openreview.net/forum? id=44NKKzz1n5. +Casella, G. and Berger, R. L. Statistical Inference. Duxbury, Pacific Grove, CA, 2nd edition, 2002. ISBN 978-0-534-24312-8. URL https://pages.stat.wisc.edu/~shao/stat610/Casella_Berger_Statistical_Inference.pdf. +Chen, X., Liang, C., Huang, D., Real, E., Wang, K., Pham, H., Dong, X., Luong, T., Hsieh, C.-J., Lu, Y., and Le, Q. V. Symbolic discovery of optimization algorithms. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=ne6zeqLFCZ. +Dettmers, T., Lewis, M., Belkada, Y., and Zettlemoyer, L. LLM.int8(): 8-bit matrix multiplication for transformers at scale. In Oh, A. H., Agarwal, A., Belgrave, D., and Cho, K. (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/forum?id=dXiGWqBoxaD. +Dohmann, J. Blazingly fast LLM evaluation for in-context learning, 2 2023. URL https://www.databricks.com/blog/llm-evaluation-for-icl. +Dong, J., Feng, B., Guessous, D., Liang, Y., and He, H. Flex attention: A programming model for generating optimized attention kernels, 2024. URL https://arxiv.org/abs/2412.05496. +Khudia, D., Huang, J., Basu, P., Deng, S., Liu, H., Park, J., and Smelyanskiy, M. Fbgemm: Enabling high-performance low-precision deep learning inference, 2021. URL https://arxiv.org/abs/2101.05615. +Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization, 2017. URL https://arxiv.org/abs/1412.6980. +Lingle, L. A large-scale exploration of $\mu$ -transfer, 2024. URL https://arxiv.org/abs/2404.05728. +Liu, Z., Hu, H., Lin, Y., Yao, Z., Xie, Z., Wei, Y., Ning, J., Cao, Y., Zhang, Z., Dong, L., Wei, F., and Guo, B. Swin transformer v2: Scaling up capacity and resolution. In CVPR, pp. 11999-12009, 2022. URL https://doi.org/10.1109/CVPR52688.2022.01170. +Micikevicius, P., Narang, S., Alben, J., Diamos, G., Elsen, E., Garcia, D., Ginsburg, B., Houston, M., Kuchaiev, O., Venkatesh, G., and Wu, H. Mixed precision training. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id=r1gs9JgRZ. + +Micikevicius, P., Stosic, D., Burgess, N., Cornea, M., Dubey, P., Grisenthwaite, R., Ha, S., Heinecke, A., Judd, P., Kamalu, J., Mellempudi, N., Oberman, S., Shoeybi, M., Siu, M., and Wu, H. Fp8 formats for deep learning. 2022. URL https://arxiv.org/abs/2209.05433. +Mirzadeh, S. I., Alizadeh-Vahid, K., Mehta, S., del Mundo, C. C., Tuzel, O., Samei, G., Rastegari, M., and Farajtabar, M. ReLU strikes back: Exploiting activation sparsity in large language models. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=osowxy8q2E. +MosaicML.Composer.https://github.com/ mosaicml/composer/,2021. +MosaicML. LLM Foundry. . 2022a. +MosaicML Streaming. . 2022b. +NVIDIA. Asynchronous multiply-and-accumulate instruction: wgmma.mma $a$ sync. URL. +NVIDIA. TransformerEngine, 2023. URL https://github.com/NVIDIA/TransformerEngine. +NVIDIA Corporation. cuBLAS: cublasLtMatmul(). NVIDIA, 2024. URL https://docs.nvidia.com/cuda/cublas/#cublasltmatmul. +OLMo, T., Walsh, P., Soldaini, L., Groeneveld, D., Lo, K., Arora, S., Bhagia, A., Gu, Y., Huang, S., Jordan, M., et al. 2 olmo 2 furious. arXiv preprint arXiv:2501.00656, 2024. +Sun, X., Choi, J., Chen, C.-Y., Wang, N., Venkataramani, S., Srinivasan, V. V., Cui, X., Zhang, W., and Gopalakrishnan, K. Hybrid 8-bit floating point (hfp8) training and inference for deep neural networks. In Wallach, H., Larochelle, H., Beygelzimer, A., d'Alché-Buc, F., Fox, E., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL https://proceedings.neurips.cc/paper_files/paper/2019/file/65fc9fb4897a89789352e211ca2d398f-Paper.pdf. +Tillet, P., Kung, H. T., and Cox, D. Triton: an intermediate language and compiler for tiled neural network computations. In Proceedings of the 3rd ACM SIGPLAN International Workshop on Machine Learning and Programming Languages, MAPL 2019, pp. 10-19, New York, NY, USA, 2019. Association for Computing Machinery. ISBN 9781450367196. 10.1145/3315508.3329973. URL https://doi.org/10.1145/3315508.3329973. + +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L. u., and Polosukhin, I. Attention is all you need. In Guyon, I., Luxburg, U. V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017. URL https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fdb053c1c4a845aa-Paper.pdf. +Wang, X. and Aitchison, L. How to set AdamW's weight decay as you scale model and dataset size, 2024. URL https://arxiv.org/abs/2405.13698. +Wortsman, M., Liu, P. J., Xiao, L., Everett, K. E., Alemi, A. A., Adlam, B., Co-Reyes, J. D., Gur, I., Kumar, A., Novak, R., Pennington, J., Sohl-Dickstein, J., Xu, K., Lee, J., Gilmer, J., and Kornblith, S. Small-scale proxies for large-scale transformer training instabilities. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=d8w0pmvXbZ. +Yang, G., Hu, E. J., Babuschkin, I., Sidor, S., Liu, X., Farhi, D., Ryder, N., Pachocki, J., Chen, W., and Gao, J. Tuning large neural networks via zero-shot hyperparameter transfer. In Beygelzimer, A., Dauphin, Y., Liang, P., and Vaughan, J. W. (eds.), Advances in Neural Information Processing Systems, 2021. URL https://openreview.net/forum?id=Bx6qKuBM2AD. +Yang, G., Simon, J. B., and Bernstein, J. A spectral condition for feature learning. 2024a. URL https://arxiv.org/abs/2310.17813. +Yang, G., Yu, D., Zhu, C., and Hayou, S. Tensor programs VI: Feature learning in infinite depth neural networks. In The Twelfth International Conference on Learning Representations, 2024b. URL https://openreview.net/forum?id=17pVDnpwwl. + +# A. Appendix + +# A.1. Why these modifications? + +Table 1 contains a number of modifications to standard bf16 training setups. Where did these come from? Are they simply a result of trying ideas until something worked? Or are they the result of more principled analysis and ablations? + +While we do explain the basis for each modification over the course of the main text, this section summarizes how we arrived at each of them. We can group the origins of these changes into three categories: simple math, adhering to prior art, and ablation experiments. + +# A.1.1. SIMPLE MATH + +Recall that, in order to ensure stable training and consistent hyperparameter meanings, we wish to ensure that all weight and activation tensors have unit variance. Enforcing unit variance is difficult because the weights are constantly being modified throughout training. To enforce exact unit variance everywhere would require significant overhead in the form of added normalization operations. We therefore relax the constraint to the following: + +1. Each residual branch must have exactly unit variance +2. Weight tensors must have unit variance at initialization +3. Linear layer outputs have unit variance at initialization, assuming the inputs are iid with unit variance. +4. Weight updates should attempt to preserve the weight and activation variances to the extent that this is possible without significant overhead. + +The last three requirements mirror Blake et al. (2023) while the first is stronger. + +Our core modifications follow immediately from these requirements and a bit of math. + +Unit variance initialization, linear layer scaling factors. Suppose we initialize our weights with unit variance to achieve requirement (2). Given iid standard normal input elements, our outputs will be $\chi^2$ random variables with $k$ degrees of freedom, where $k$ is the contraction dimension. This has a mean and variance of fan_in and variance of $2 * \text{fan_in}$ , which are nowhere near 1 and so violate requirement (3). The typical solution to this is scaling down the initialization by a factor of $\sqrt{\text{fan_in}}$ , but this violates requirement (2). As observed in (Blake et al., 2023), we can reconcile both by scaling down the outputs by $\sqrt{\text{fan_in}}$ at runtime as part of the GEMM call. This one extra multiply per output element is essentially free, and in fact fused into instructions such as the NVIDIA Hopper architecture's wgmma (NVIDIA). See Blake et al. (2023) for further discussion. + +Learning rate scaling. Recall from (Yang et al., 2021) and Section 2.3 that one can scale weight initialization variance, learning rate, and linear layer output arbitrarily as long as all three are scaled according to a precise relationship. Since we have fixed the weight initialization variance to 1 and the output scaling to $\text{fan\_in}^{-\frac{1}{2}}$ , our learning rate scale of $\text{fan\_in}^{-\frac{1}{2}}$ is uniquely determined. Further, when changing fan in from $d_{base}$ to $d_{new}$ , this implies scaling the learning rate by $\frac{\sqrt{d_{base}}}{\sqrt{d_{new}}}$ . + +# A.1.2. ADHERING TO BEST PRACTICES. + +Some aspects of our training recipe are crucial but already common (though not universal) practices. These include: + +Weight decay $(\lambda)$ scaling. Recall that decoupled weight decay amounts to multiplying weights by a constant $1 - \lambda, 0 < = \lambda < 1$ during each update. This operation already has the same semantics across model widths. + +FP8 hidden layers. Using e4m3 weights and activations along with e5m2 gradients is a common practice (NVIDIA, 2023; Micikevicius et al., 2022) Clipping instead of overflowing prevents NaN/Inf values. Keeping the first and last layers in higher precision is also common. + +# A.1.3. ABLATION EXPERIMENTS. + +Two modifications in our recipe can be implemented in multiple ways, so we chose the details based on smaller-scale experimental results. + +Table 6. Comparing μS with other schemes μS components have commonalities and differences with existing training schemes. It is the only one which combines scalable, complete FP8 LLM training with hyperparameter transfer; see Figure 1 for a comparison of features of low-precision training methods. + +
μS ComponentμPUnit Scalingu-μP
Linear layer scaling factorsNot usedUsed, but can be different in forward and backward pass.Used
Res-Post-LayerNormNot usedNot usedNot used
“Fixed” residual modificationNot usedProposedNot used
Unit variance initializationNot usedUsedUsed
FP8 hidden layersNot usedUsed, but not at scaleUsed, but restricted only to some layers
Learning rate (η) scalingUsedNot usedUsed
Weight decay (λ) scalingNot usedNot usedUsed
+ +Fixed residual modification. In order to satisfy our design goal of having a fixed-variance residual stream, we need to combine the previous residual stream tensor and the latest residual branch output in some manner that preserves variance. As discussed in the paper, this can be done by replacing summation with weighted summation. However, we are left with a degree of freedom in setting the weighting coefficient. To keep the search space small, we consider only the two schemes from (Blake et al., 2023) and decide between them based on the experiments in Section A.3. + +Res-Post-LayerNorm. As we show in Section 2.1, the variance of token representations tends to collapse later in the sequence. If a closed-form correction could exactly undo this effect, we could apply such a correction and avoid modifying the architecture. However, as shown in Figures 2 and 3, the pattern of variance collapse is input-dependent and deviates greatly from what iid assumptions would lead one to expect. In order to satisfy our requirement that residual streams have unit variance, we therefore must resort to a blunt instrument: imposing normalization at runtime. We could normalize the residual stream itself, add a normalization op at the end of each residual branch, or move the normalization in a Pre-LN transformer from the start of the branch to the end. We decided to go with the last option because it adds no extra operations, normalizes both the residual stream token embeddings and their updates, is consistent with previous work (Liu et al., 2022; OLMo et al., 2024), and worked well in our ablation experiments (Fig 4b). + +# A.1.4. COMPARISON TO EXISTING SCHEMES + +As a supplement to Table 1 which enumerates the components of $\mu S$ compared to standard practice (SP), Table 6 compares these components with $\mu P$ , Unit Scaling, and u- $\mu \mathrm{P}$ + +# A.2. Covariance of softmax numerator and denominator + +In the proof for Prop. 2.1, we state that $\mathrm{Cov}[\mathbf{n},\mathbf{d}] = \sigma_{\mathbf{n}}^2$ . Here we derive this result. Just as in Sec. 2.1, define $\mathbf{s}$ as the output of the softmax function applied to a vector of $k$ independent elements $\mathbf{x}$ . The softmax function is defined as $s_i = \mathrm{softmax}(\mathbf{x})_i = \frac{\mathrm{e}^{x_i}}{\sum_{j=1}^k \mathrm{e}^{x_j}}$ . As shown previously, we denote the vector of elements containing numerators of elements of $\mathbf{s}$ as $\mathbf{n}$ and denominators of elements of $\mathbf{s}$ as $\mathbf{d}$ , such that $\mathbf{s} = \frac{\mathbf{n}}{\mathbf{d}}$ . By the definition of covariance: + +$$ +\operatorname {C o v} [ \mathbf {n}, \mathbf {d} ] = \operatorname {E} \left[ \left(n _ {i} - \mu_ {\mathbf {n}}\right) \left(d _ {i} - \mu_ {\mathbf {d}}\right) \right] \tag {19} +$$ + +By the definition of softmax, $d_{i} = \sum_{i=1}^{k} n_{i}$ , and by linearity of expectation, $\mu_{\mathbf{d}} = k \mu_{\mathbf{n}}$ . Using this, we obtain: + +$$ +\operatorname {C o v} [ \mathbf {n}, \mathbf {d} ] = \operatorname {E} \left[ \left(n _ {i} - \mu_ {\mathbf {n}}\right) \left(n _ {1} + n _ {2} + \dots + n _ {i} + \dots + n _ {k} - k \mu_ {\mathbf {n}}\right) \right] \tag {20} +$$ + +Expanding this expression: + +$$ +\operatorname {C o v} [ \mathbf {n}, \mathbf {d} ] = \operatorname {E} \left[ \left(n _ {i} - \mu_ {\mathbf {n}}\right) \left(\left(n _ {1} - \mu_ {\mathbf {n}}\right) + \left(n _ {2} - \mu_ {\mathbf {n}}\right) + \dots + \left(n _ {i} - \mu_ {\mathbf {n}}\right) + \dots + \left(n _ {k} - \mu_ {\mathbf {n}}\right)\right) \right] \tag {21} +$$ + +By linearity of expectation: + +$$ +\operatorname {C o v} [ \mathbf {n}, \mathbf {d} ] = \operatorname {E} \left[ \left(n _ {i} - \mu_ {\mathbf {n}}\right) ^ {2} \right] + \sum_ {j \neq i} \operatorname {E} \left[ \left(n _ {i} - \mu_ {\mathbf {n}}\right) \left(n _ {j} - \mu_ {\mathbf {n}}\right) \right] \tag {22} +$$ + +Because elements of the softmax input $\mathbf{x}$ are independent, and $n_i = \mathrm{e}^{x_i}$ , elements of $\mathbf{n}$ are also independent. Therefore $\operatorname{E}[(n_i - \mu_{\mathbf{n}})(n_j - \mu_{\mathbf{n}})] = 0$ for $j \neq i$ . Then by the definition of variance as $\operatorname{Var}[\mathbf{n}] = \operatorname{E}[(n_i - \mu_{\mathbf{n}})^2]$ , we obtain: + +$$ +\operatorname {C o v} [ \mathbf {n}, \mathbf {d} ] = \operatorname {V a r} [ \mathbf {n} ] \tag {23} +$$ + +# A.3. Modifying Residual Connections with $\tau$ + +To make skip connections variance-preserving, we use the fixed residual modification scheme, as shown in Eq. 11, with coefficients based on the hyperparameter $\tau$ (Blake et al., 2023). To understand the relationship of the optimal residual coefficient $\tau^{*}$ with network depth, we swept over various values of $\tau$ for models of different widths (256, 512, 1024, 2048) and depths (20, 40, 60, 80, 100). In order to assess potential confounding effects between $\tau^{*}$ and $\eta^{*}$ and $\lambda^{*}$ , we tuned those two hyperparameters as well. We trained each model for 10.5B tokens with a global batch size of 256 and sequence length of 4096. We define the optimal subset of models as those which had a final cross-entropy loss within $0.25\%$ of the optimum (with loss averaged over the last 10 steps, i.e. 10.5M tokens). As shown in Fig. 9, $\tau^{*}$ (for the optimal subset of models) decreases as network depth increases. Since the contribution of each residual branch exponentially decays with depth, a lower $\tau$ ensures a lower rate of decay, likely useful as networks get deeper. This relationship between $\tau^{*}$ and depth is consistent even as model width increases. In our experiments, $\tau$ can be coarsely swept. We use the results shown in Fig. 9, to directly choose $\tau^{*}$ for all $\mu$ S model training. + +![](images/3fe0d9676a8d8590c1ba66d860bcf676e49a955d0231c6d174498e9033ba0c02.jpg) +Optimal Residual Coefficient $(\tau^{*})$ vs. Network Depth +Figure 9. Optimal residual coefficient $\tau^{*}$ decreases with depth. The 3 hyperparameters of $\tau$ , $\eta$ , and $\lambda$ are swept for models of varying widths (256, 512, 1024, 2048) and depths (20, 40, 60, 80, 100). The mean and standard error of $\tau$ is shown for the optimal subset of models from each hyperparameter sweep, where a model is included in the optimal subset if it had final cross-entropy loss within $0.25\%$ of the sweep optimum. $\tau^{*}$ , which controls the decay rate of residual branch contributions in the residual stream, decreases as network depth increases. + +# A.4. Lion Optimizer and Hyperparameter Transfer + +Here, we show why Lion Chen et al. (2023) is an "Adam-like" optimizer, so the $\mu \mathrm{P}$ rules for hyperparameter transfer with Adam (Kingma & Ba, 2017) are applicable to Lion as well. Because Adam and Lion are both adaptive optimizers that normalize gradients coordinatewise before updating parameters, the nonlinear tensor product matrix results obtained in Yang et al. (2021, Appendix J.1.3) apply to both optimizers. One can see that Lion differs from Adam only in that it has a different second moment estimate. Under both optimizers, with gradient $g_{t}$ , a parameter $\theta$ is updated as: + +$$ +\theta_ {t + 1} = \theta_ {t} - \eta \frac {\beta_ {1} m _ {t} + (1 - \beta_ {1}) g _ {t}}{\sqrt {s _ {t}}} \tag {24} +$$ + +For Lion, this follows by expressing $\mathrm{sign}(c_t)$ as $c_{t} / c_{t}^{2}$ . Then, the second moment estimate $s_t$ for Adam (Eq. 25) and Lion (Eq. 26) are below. + +$$ +s _ {t} ^ {\mathrm {A d a m}} = \beta_ {2} v _ {t} + (1 - \beta_ {2}) g _ {t} ^ {2} + \epsilon \tag {25} +$$ + +$$ +s _ {t} ^ {\text {L i o n}} = c _ {t} ^ {2} = \beta_ {1} ^ {2} m _ {t} ^ {2} + 2 \beta_ {1} (1 - \beta_ {1}) m _ {t} g _ {t} + \left(1 - \beta_ {1}\right) ^ {2} g _ {t} ^ {2} \tag {26} +$$ + +This justifies why Lion is an Adam-like optimizer for the purposes of hyperparameter transfer. We use Lion for its reduced memory footprint in all our experiments. + +# A.5. unit Scaling vs Unit Scaling for larger model training + +We test the unit scaling (US) and $\mu$ unit scaling $(\mu S)$ methods at the 7B model scale with FP8 training. Figure 10 shows that unit scaling models diverge very early in training, while $\mu$ unit scaling runs converge smoothly. Based on this experiment, we did not conduct final model runs at different model scales with unit scaling (1B-13B). + +![](images/aa3fb270beb29297997946b5ca70dce01228065e3be41a9317538ea43de14389.jpg) +Figure 10. Unit Scaling (US) vs unit Scaling $(\mu \mathbf{S})$ for 7B models. Convergence test loss curves at 7B model scale show that $\mu \mathrm{S}$ converges smoothly while US training diverges early in training. + +# A.6. Activation Outliers + +We analyze activation distributions taken over 32,768 tokens at every 10 layers for all FP8 models trained according to Table 4, with results shown in Fig. 13. These figures show the distribution of activation values for attention and FFN block inputs and outputs in the final 1B, 3B, 7B, and 13B FP8 models. While SP models consistently have outliers in the attention block and FFN block inputs at all model scales, $\mu S$ models do not have these outliers in block inputs. This may make $\mu S$ models more easily quantizable. It is important to note, however, that in SP models, the Pre-LayerNorm placement means that activations from the residual stream are first normalized before subsequent operations. + +While we do not identify the exact mechanism by which these outliers arise in the residual stream in SP models, we show their absence in $\mu \mathrm{S}$ models here, with activation distributions that may be more conducive to quantization. An activation distribution with fewer outliers requires fewer bits to represent it. + +# A.7. Activation Function Choice + +The choice of activation function can have a significant impact on activation underflow when training in FP8. For example, recent work by (Anonymous, 2024) identifies outlier amplification from SwiGLU as a challenge for FP8 LLM training. Nearly all state-of-the-art LLMs today use either SiLU or GELU as their activation function, but when training in FP8, this may lead to underflow in activations during training. This is because these functions asymptotically approach zero as inputs $x \to -\infty$ . We define the FP8 underflow fraction, or the fraction of elements flushed to 0 from a BF16 to FP8 cast, as a metric to evaluate various activation functions. As shown in Fig. 11, this can cause many activations to underflow. + +To better understand how activation function choice influences FP8 underflow when training with $\mu$ unit scaling, we train small 4 layer models with GELU, SiLU, and ReLU. Our findings, detailed in Fig. 12 that during unit scaled model training, the choice of activation function drastically impacts the FP8 underflow rate for activation outputs. GELU greatly degrades + +![](images/071d99d8c7138d78e0a994f1aed7c748256929755b0adeca2fa1a7513ad5985f.jpg) +Figure 11. Different activation functions cause different amounts of FP8 underflow. When casting $\mathcal{N}(0,1)$ or Unif(-128, 128) values from BF16 to FP8 (e4m3), GELU, SiLU, and ReLU (green) erroneously round to zero (underflow) with different probabilities. GELU and SiLU experience significant FP8 underflow because they slowly approach 0 for increasingly negative inputs. SiLU approaches 0 more slowly than GELU and so underflows for a wider range of inputs. ReLU simply maps all negative values to 0, regardless of the numerical format. + +![](images/d735ef82228594d70cd4276f842b8cc1b6daf23054e3798c774d77e68ebfe149.jpg) +Figure 12. Activation function choice impacts FP8 underflow and low-precision convergence error. FP8 underflow of activation function outputs for each block in a 4 layer transformer model during training is shown for GELU, SiLU, and ReLU. Low precision convergence error, defined as the percent difference in final cross entropy loss between an FP8 model and its BF16 counterpart, is shown in the rightmost chart. GELU and SiLU cause significant underflow over the course of training, and models trained with these activation functions have twice as much low precision convergence error as with ReLU. ReLU greatly reduces this FP8 underflow by multiple orders of magnitude. + +the representation of FFN down projection inputs, reaching up to $30\%$ underflow during training. SiLU causes similar degradation, but at a lower rate, reaching up to $7\%$ during training. In contrast, ReLU does not suffer from this problem, with a maximum of $0.04\%$ FP8 underflow during training. As a result, FP8 unit scaled models trained with ReLU have smaller low-precision convergence error (defined as the percent difference between the final cross entropy loss and FP8 model and its BF16 counterpart). Based on these observations and results, ReLU minimizes FP8 underflow and low-precision convergence error. ReLU also has the added benefit of sparsifying activations, a property which enables significant inference-time optimizations (Mirzadeh et al., 2024). However, using GELU results in models with lower final training loss. For this reason, we use GELU when training all $\mu \mathrm{S}$ models. Additional investigations into activation functions more suitable for FP8 training can help mitigate underflow while also providing improved convergence. + +![](images/f51931462709dc22041ea4552cc321c68ddb84c28ea99d0b2a5e5b44cd9b940d.jpg) + +![](images/37bd7607afbe8f5b3ebd2d5fc10f51443925efe46fb825c7ef4e660141c84637.jpg) + +![](images/9764cd3f034a055ab18c8d54d80280fb200979184fdc0334af4d255029f3d307.jpg) + +![](images/c082406410031244e132bfdb7528d1c6f83cbaee7749aeb9edd2a278e8c21325.jpg) + +![](images/4339f563e57aef6439e94672b7f7ba6dc173442f3b34900362dcb2d80f02ba29.jpg) +(e) 7B SP FP8 model activation distributions. + +![](images/bd118c1de34d3c1ed1cd2d9caf947816d4a681466f84d194fbea4da9a55f966c.jpg) +(f) 7B $\mu$ S FP8 model activation distributions. + +![](images/4650504f389f8072465414a578f1ea8c5325407241ca7c42a3ee30c5e8ff1015.jpg) +(g) 13B SP FP8 model activation distributions. + +![](images/40cf8fafedc296abe6ba75efe5fc9762fcc2a33b36f4aaff4e1ad22cd5149df8.jpg) +(h) $13\mathrm{B}\mu \mathrm{S}$ FP8 model activation distributions. +Figure 13. Activation distributions of $\mu S$ and SP models. Activation distributions for attention and FFN block inputs and outputs are shown for 1B, 3B, 7B, and 13B FP8 models at every 10th layer. $\mu S$ models lack the notable right tail of activation outliers in block inputs that SP models suffer from. This may make them easier to quantize. \ No newline at end of file diff --git a/mathrmnitscalingsimpleandscalablefp8llmtraining/images.zip b/mathrmnitscalingsimpleandscalablefp8llmtraining/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..631cad015cd9382d36aca621a59030fcf24803a0 --- /dev/null +++ b/mathrmnitscalingsimpleandscalablefp8llmtraining/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adc25129a7133a3fd8734467745c94c66460eabcb691a72d4a7a9b7a396e58a5 +size 1578493 diff --git a/mathrmnitscalingsimpleandscalablefp8llmtraining/layout.json b/mathrmnitscalingsimpleandscalablefp8llmtraining/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d1bfdda29000d028b367d2e062f044d7ffb6004c --- /dev/null +++ b/mathrmnitscalingsimpleandscalablefp8llmtraining/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8889a1390fcaf292e971f063788a1d36156c0729614d9af62a66dfa1639c592a +size 697523 diff --git a/s2fglspatialspectralfederatedgraphlearning/a72798c3-b530-4d2b-8f38-0412b72285b0_content_list.json b/s2fglspatialspectralfederatedgraphlearning/a72798c3-b530-4d2b-8f38-0412b72285b0_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..407e6371f8d3ef4e6fff0f9a4457ce849577bcae --- /dev/null +++ b/s2fglspatialspectralfederatedgraphlearning/a72798c3-b530-4d2b-8f38-0412b72285b0_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2643d068e9f95dbf675b2201662061d83575a03034d4373f24a07c4286ad6ef +size 84064 diff --git a/s2fglspatialspectralfederatedgraphlearning/a72798c3-b530-4d2b-8f38-0412b72285b0_model.json b/s2fglspatialspectralfederatedgraphlearning/a72798c3-b530-4d2b-8f38-0412b72285b0_model.json new file mode 100644 index 0000000000000000000000000000000000000000..22ba9546b31d2d99817c7c3431135515ac69e51f --- /dev/null +++ b/s2fglspatialspectralfederatedgraphlearning/a72798c3-b530-4d2b-8f38-0412b72285b0_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f31087f9d0ebf99e864800870f732806ab891779adeb4d2508bdd8b20baf5fd1 +size 110050 diff --git a/s2fglspatialspectralfederatedgraphlearning/a72798c3-b530-4d2b-8f38-0412b72285b0_origin.pdf b/s2fglspatialspectralfederatedgraphlearning/a72798c3-b530-4d2b-8f38-0412b72285b0_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..284ba3ced0626283aacfe284a7aa69d260efb8b6 --- /dev/null +++ b/s2fglspatialspectralfederatedgraphlearning/a72798c3-b530-4d2b-8f38-0412b72285b0_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e3d2762df85c1d716e13c3a18ad1ff20c3a4aa58d867a5a8e43012e264b1be0 +size 3724275 diff --git a/s2fglspatialspectralfederatedgraphlearning/full.md b/s2fglspatialspectralfederatedgraphlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4ea13e1ff849f5797b9057b22b9f3160001822e2 --- /dev/null +++ b/s2fglspatialspectralfederatedgraphlearning/full.md @@ -0,0 +1,351 @@ +# $S^2$ FGL: Spatial Spectral Federated Graph Learning + +Zihan Tan $^{*1}$ Suyuan Huang $^{*1}$ Guancheng Wan $^{1}$ Wenke Huang $^{1}$ He Li $^{1}$ Mang Ye $^{1}$ + +# Abstract + +Federated Graph Learning (FGL) combines the privacy-preserving capabilities of Federated Learning (FL) with the strong graph modeling capability of Graph Neural Networks (GNNs). Current research addresses subgraph-FL from the structural perspective, neglecting the propagation of graph signals on the spatial and spectral domains of the structure. From a spatial perspective, subgraph-FL introduces edge disconnections between clients, leading to disruptions in label signals and a degradation in the semantic knowledge of the global GNN. From a spectral perspective, spectral heterogeneity causes inconsistencies in signal frequencies across subgraphs, which makes local GNNs overfit the local signal propagation schemes. As a result, spectral client drift occurs, undermining global generalizability. To tackle the challenges, we propose a global knowledge repository to mitigate the challenge of poor semantic knowledge caused by label signal disruption. Furthermore, we design a frequency alignment to address spectral client drift. The combination of Spatial and Spectral strategies forms our framework $S^2$ FGL. Extensive experiments on multiple datasets demonstrate the superiority of $S^2$ FGL. The code is available at https://github.com/Wonder7racer/S2FGL.git + +# 1. Introduction + +Graph Neural Networks (GNNs) have demonstrated remarkable efficacy in modeling graph-structured data (Wan et al., 2025a; Fang et al., 2025), thereby finding applications across various domains, such as social networks (Fan et al., 2020; Zhang et al., 2022b), epidemiology (Liu et al., 2024), and + +*Equal contribution 1National Engineering Research Center for Multimedia Software, School of Computer Science, Wuhan University, Wuhan, China. Correspondence to: Mang Ye . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/e1147d7267355e1b34d3327a2a473bd60c0f3c3f748cef6aa3101e3b0b7260af.jpg) +Figure 1. In the first place, compared with centralized GNN training, subgraph-FL is encountering label signal disruption challenge, leading to decreased structure inertia score and poor semantic knowledge for GNNs. Moreover, we demonstrate the heat map of the Kullback-Leibler divergence of eigenvalue distributions across clients. Inconsistency in subgraph signal frequency caused by spectral heterogeneity leads to spectral client drift. + +fraud detection (Wang et al., 2019; Tang et al., 2022). However, in real-world scenarios, graph data is often generated at the edge devices rather than in centralized systems (Zhang et al., 2021a). To address this, Federated Graph Learning (FGL) has emerged (Fu et al., 2022; Liu & Yu, 2022; Tan et al., 2025; 2024; Huang et al., 2022; Wan et al., 2024b; 2025b), leveraging the data privacy-preserving capabilities of Federated Learning (FL) (Huang et al., 2024; 2023b;c; 2022) to enable the efficient distributed training of GNNs (Huang et al., 2024). A prominent application of FGL is subgraph-FL, in which each participant holds a subgraph derived from the same overall graph data. + +Although numerous FGL methods have attempted to provide solutions based on structure to enhance effectiveness, including identifying structurally similar collaborators (Baek et al., 2023; Xie et al., 2021; Li et al., 2024), enhancing structural knowledge exchange (Tan et al., 2023; Huang et al., 2023a; Tan et al., 2025), and retrieving generic information under structural shifts (Wan et al., 2024a; Tan et al., 2024). Nevertheless, these approaches overlooked the propagation + +![](images/e5e69d068c605f0b87900cf54505a0e3407c07e3b950bfb34d4092bd37537262.jpg) +Figure 2. Problem Illustration. (a) From the spatial perspective, nodes in subgraph-FL lose label signals from originally nearby labeled nodes due to edge loss, namely label signal disruption. Correspondingly, GNNs suffer from poor semantic knowledge, leading to a deteriorated global GNN. (b) From the spectral perspective, spectral heterogeneity induces inconsistencies in signal frequencies across subgraphs, leading to spectral client drift in the signal propagation paradigms of GNNs and degraded global generalizability. + +of graph signals within the structure. Specifically, graph signal propagation can be analyzed from two perspectives: the spatial and the spectral domain. Specifically, the spatial domain governs the explicit transmission of signals among linked nodes, while the spectral domain characterizes signal diffusion across varying frequency spectra. + +From the spatial perspective, due to edge loss, we hypothesize that nodes in subgraph-FL lose label signals from originally nearby labeled nodes. This degradation hampers the ability of GNNs to learn comprehensive semantic knowledge, resulting in poor global performance and reduced generalizability. Correspondingly, we define this phenomenon as label signal disruption, which naturally exists in subgraph-FL. For verifying, inspired by graph active learning research (Han et al., 2023), we investigate how the Structure Inertia Score (SIS) varies in subgraph-FL. Specifically, SIS evaluates the influence and significance of labels on graphs. In Fig. 1, we empirically demonstrate that the SIS decreases in subgraph-FL compared with centralized training. Correspondingly, existing methods suffer from poor semantic knowledge. Based on our empirical analysis, we pose the question: I) How can we address the challenge of poor semantic knowledge under label signal disruption? + +From the spectral perspective, inconsistencies in signal frequencies across clients caused by spectral heterogeneity induce spectral client drift in the signal transmission schemes of GNNs, thereby undermining the collaboration. To verify this phenomenon, we examine graph spectra across clients and demonstrate the heterogeneity in Fig. 1. It reveals inconsistent eigenvalue distribution across clients. As a result, GNNs learn distinct signal propagation schemes of sub + +graphs and optimize in different spectral directions, leading to spectral client drift and degraded generalizability. Based on our analysis, we pose the question: II) How can we alleviate spectral client drift under spectral heterogeneity? + +To address the challenge of poor semantic knowledge under label signal disruption in Question I), we propose Node Label Information Reinforcement (NLIR). Specifically, our strategy leverages structurally and semantically representative nodes to construct a prototype-based global repository of semantic knowledge. During training, NLIR calculates the similarity distribution between all representative prototypes with node features, which provides multidimensional semantic localization of nodes. Consequently, our strategy injects semantic knowledge from the repository into the local GNN during training, effectively mitigating the issue of poor semantic knowledge under label signal disruption. + +Considering the spectral client drift posed by spectral heterogeneity in II), we propose Frequency-aware Graph Modeling Alignment (FGMA). Our method utilizes the similarity relationship of the node feature of the frozen global GNN and the local GNN to reconstruct spectra that incorporates GNNs adjacency awareness. FGMA then projects the high-frequency and low-frequency components of the features onto this spectrum. Subsequently, by aligning the local projections with the global one, we encourage the GNNs to learn a globally generic frequency processing scheme, thereby mitigating spectral client drift. + +In conclusion, our key contributions are: + +- First, we identify and empirically reveal the issue of + +poor semantic knowledge under label signal disruption. In addition, we reveal the spectral client drift under spectral heterogeneity in subgraph-FL. + +- We design our framework $S^2$ FGL including strategy Node Label Information Reinforcement and Frequency-aware Graph Modeling Alignment, effectively addressing the challenges of poor semantic knowledge and spectral client drift in subgraph-FL. +- We conduct extensive experiments on various datasets, validating the superiority of our proposed $S^2$ FGL. + +# 2. Related Work + +Federated Graph Learning. Federated graph learning leverages the powerful graph modeling capabilities of GNNs along with the privacy-preserving attributes of federated learning, thus gaining increasing attention these days (He et al., 2021a; Fu et al., 2022; Liu & Yu, 2022; Wan et al., 2025b). Current FGL research can generally be categorized into two types: intra-graph FGL and inter-graph FGL. Intra-graph FGL research primarily focuses on subgraph-FL scenarios, where each client participates in the collaboration with a part of the whole graph (Zhang et al., 2021b). Correspondingly, the training targets include missing link prediction (Chen et al., 2021; Baek et al., 2023), node classification (Huang et al., 2023a; Li et al., 2024; Wan et al., 2024a; Zhu et al., 2024), and so on. On the other hand, clients in inter-graph FGL own independent local graph data, such as multiple graphs from different domains (Tan et al., 2023; Xie et al., 2021). In this paper, we focus on subgraph-FL scenarios of intra-graph FGL. Specifically, we are the first to empirically reveal and address the challenge of poor semantic knowledge under label signal disruption and client drift under spectral heterogeneity among subgraphs, while existing methods inevitably fail spatially and spectrally due to the lack of targeted solutions. + +Federated Learning. Federated learning (Huang et al., 2023c; 2024; Yang et al., 2023; Wan et al., 2024a) has gained increasing attention in recent years as it addresses the issue of data silos while ensuring data privacy. Several research directions have emerged from FL, including robustness (Xu et al., 2022; Hong et al., 2023; Zhu et al., 2023; Fang & Ye, 2022), fairness (Chen et al., 2024; Ezzeldin et al., 2023; Ray Chaudhury et al., 2022), and asynchronous federated learning (Xu et al., 2023; Zhang et al., 2023d). Generally, FL can be categorized into two main types by their optimization objective: traditional FL (tFL) and personalized FL (Hu et al., 2024; Shang et al., 2022; Lv et al., 2024; Smith et al., 2017). Research of tFL aims at aggregating a highly generalizable global model (McMahan et al., 2017; Li et al., 2020; Acar et al., 2021; Zhang et al., 2022a). For instance, FedNTD (Lee et al., 2022) preserves the global + +perspective on local data for the not-true classes, FEDGEN (Zhu et al., 2021) ensembles user information in a data-free manner to regulate local training, and SCAFFOLD (Karimireddy et al., 2020) uses variance reduction for the client drift phenomenon. Instead, strategies of personalized FL (pFL) aim to customize models that perform optimally for each client (Wu et al., 2023; Zhou & Konukoglu, 2023; Li et al., 2021; Zhang et al., 2023b). Specifically, FedALA (Zhang et al., 2023c) proposed adaptive masks to achieve personalized aggregation, DBE (Zhang et al., 2023a) stores domain biases for elimination, and FedRoD (Chen & Chao, 2022) leverages two heads for global and personalized tasks. + +Graph Spectrum Being related closely to graph connectivity, signal propagation, and structure, graph spectra have proven essential in performing various tasks on graph-structured data. For instance, it plays an essential role in anatomy detection, (Gao et al., 2023; Tang et al., 2022), graph condensation (Kreuzer et al., 2021; Liu et al., 2023), and graph contrastive learning (Bo et al., 2023a; Liu et al., 2022). Additionally, spectral GNNs (Wu et al., 2020) based on spectral filters are showing powerful ability in modeling graph data and attracting more attention. Specifically, existing research either (He et al., 2021b; Defferrard et al., 2016; He et al., 2022; Wang & Zhang, 2023) leverages various orthogonal polynomials to approximate arbitrary filters, or utilizes neural networks to parameterize the filters (Liao et al., 2019; Bo et al., 2023b). Although the potential of graph spectrum has been explored in various scenarios and tasks, the spectral domain in generalizable subgraph-FL has remained unexplored. Consequently, current methods suffer from optimization diverging on spectra and are trapped in suboptimal learning. Instead, our approach remarkably mitigates the challenge by targeted alignment on spectra. + +Graph Signal Propagation: Graph signal propagation describes how node signals diffuse on graph structures. In the spatial domain, propagation occurs through explicit signal passing along edges. In the spectral domain, propagation is characterized by how signals distribute across different frequency components. Label Signal Disruption: As subgraphs experience edge loss, nodes lose critical label signals containing class knowledge from their formerly adjacent labeled neighbors. Consequently, it limits the ability of GNNs to capture class distinctions accurately, leading to poor semantic knowledge under label signal disruption. Spectral Client Drift: Inconsistencies in signal frequencies on graph spectra across subgraphs lead to spectral heterogeneity and diverging signal propagation schemes, causing spectral client drift and degrading the generalizability of the global model. + +![](images/1f0bf6cd9e04b00bbc9ecdccaa3d89dc7c2ea5369660b5bd494ae24f2fbbe734.jpg) +(a) Node Label Information Reinforcement +(b) Frequency-aware Graph Modeling Alignment +Figure 3. Framework Illustration. (a) Node Label Information Reinforcement (NLIR) leverages a structurally and semantically representative global prototype repository. It provides multidimensional semantic localization of nodes through similarity distribution and allows $L_{\mathbf{FKD}}$ to inject the semantic knowledge during training. (b) Frequency-aware Graph Modeling Alignment (FGMA) aligns local high and low spectral adjacency awareness with the global GNN for a generic signal propagation scheme, mitigating spectral drifts. + +# 3. Problem Statement + +Notation. Let the graph data be represented as $\mathcal{G} = (\mathcal{V},\mathcal{E})$ where $\mathcal{V}$ is the set of nodes with $|\mathcal{V}| = N$ vertices, and $\mathcal{E}\subseteq \mathcal{V}\times \mathcal{V}$ denotes the set of edges connecting these nodes. The adjacency matrix is represented by $\mathbf{A}\in \mathbb{R}^{N\times N}$ , where $\mathbf{A}_{uv} = 1$ indicates the presence of an edge $e_{uv}\in \mathcal{E}$ and $\mathbf{A}_{uv} = 0$ otherwise. Moreover, $\mathbf{X}$ the feature vector matrix of the graph $\mathcal{G}$ . The Laplacian matrix is given by $\mathbf{L} = \mathbf{D} - \mathbf{A}$ , where $\mathbf{D}$ is the degree matrix. The unitary matrix $\mathbf{U}$ is composed of the eigenvectors of $\mathbf{L}$ . To distinguish between local and global properties, we introduce the following notation: the symbol $i$ represents local properties or entities, whereas $g$ denotes global properties or entities. + +Definition 3.1. Personalized PageRank (PPR): The PPR matrix quantifies the influence each node has on every other node within the graph and is defined as: + +$$ +P = \alpha (I - (1 - \alpha) D ^ {- 1} A) ^ {- 1}. \tag {1} +$$ + +Here, $\alpha \in (0,1)$ is the teleportation probability, representing the probability of the random walk restarting from the source node. A typical value is 0.15, which makes the continuation probability $(1 - \alpha) = 0.85$ . $I$ is the identity matrix, $A$ is the adjacency matrix of the graph, and $D$ is the degree matrix with $D_{ii}$ denoting the degree of node $i$ . + +Definition 3.2. Structure Inertia Score (SIS): The SIS quantifies the cumulative influence of the training nodes on the entire graph and is defined as: + +$$ +S I S (P, t) = \sum_ {i = 1} ^ {n} \max _ {j} \left(P _ {i, j} \cdot t _ {j}\right). \tag {2} +$$ + +Here, $P$ is the PPR matrix, and $t \in \{0,1\}^n$ is a binary vector indicating the training nodes, where $t_j = 1$ if node $j$ is part of the training set, and $t_j = 0$ otherwise. The SIS aggregates the maximum personalized PageRank values from each node to any labeled node, effectively measuring the strongest influence each node in the graph receives from the training set. A higher SIS indicates greater structural inertia, suggesting that the labels have a significant influence over the network overall graph structure. + +# 4. Methodology + +# 4.1. Motivation + +Signal propagation over graph structures fundamentally shapes the signal transmission paradigm of GNNs. Therefore, rather than focusing solely on challenges arising from static graph structures in subgraph-FL, it is crucial to consider the dynamics of signal propagation. Correspondingly, + +we conduct our analysis from both the spatial and spectral domains from the perspective of the graph signal. Specifically, the spatial domain governs the explicit passing of signals between connected nodes, while the spectral domain captures signal diffusion across different frequencies. Accordingly, we empirically validate the presence of two major challenges from the spatial and spectral perspectives: label signal disruption and spectral client drift. These phenomena respectively pose challenges of poor semantic knowledge and spectral client drift, which severely constrain the potential of subgraph-FL collaboration. + +Motivation of NLIR. Graph data is fragmented across clients in subgraph-FL, which inevitably disrupts semantic signals from labeled nodes across clients. Label signal disruption undermines key pathways for propagating semantic information. This results in biased local feature representations, which ultimately degrade the performance of GNNs. For validation, we investigate the relationship between the decrease in SIS and the client scale. Specifically, the SIS exhibits a downward trend as the client scale increases, with notably lower scores in the range emphasized by mainstream subgraph-FL studies, thereby highlighting the label signal disruption phenomenon. We aim to mitigate its negative impact by preserving valuable semantic knowledge across fragmented subgraphs. Correspondingly, we propose NLIR. By selecting nodes with both structural representativeness and rich semantic information for the construction of a global repository and injecting it during local training, NLIR reduces the information loss inherent in the subgraph scenarios. Subsequently, NLIR assesses the similarity distributions between node features and all representative prototypes for both local and global GNNs during local training, thereby enabling multidimensional semantic localization of nodes. By aligning the two similarity distributions, it effectively injects semantic knowledge and enhances feature modeling semantically. + +Motivation of FGMA. We reveal the challenge of spectral client drift in subgraph-FL in Fig. 1, where GNNs across different clients capture frequency information inconsistently due to graph spectral heterogeneity. This further leads to overfitting local signal propagation frequencies, which brings spectral conflicts during collaboration and compromises the generalizability of the global GNN. To address spectral client drift, we propose the Frequency-aware Graph Modeling Alignment. Specifically, FGMA reconstructs the local graph spectra with the GNN adjacency awareness by calculating the node similarity matrix. Subsequently, by projecting feature representations separately onto high- and low-frequency components of the reconstructed spectra and aligning the local and global projections, FGMA promotes the learning of a generalizable spectral signal propagation paradigm across clients, thereby reducing frequency-based discrepancies during collaboration and mitigating spectral + +client drift. Consequently, our strategy effectively enhances the global generalizability spectrally. + +# 4.2. Node Label Information Reinforcement + +First of all, we introduce the Structure-Aware Label Centrality (SALC) metric, denoted as $\Lambda_u^{\mathrm{SALC}}$ for node $u$ . It is defined as the combination of the label influence centrality $\Lambda_u^l$ and the structural prominence score $\Lambda_u^s$ : + +$$ +\Lambda_ {u} ^ {\mathrm {S A L C}} = \Lambda_ {u} ^ {s} + \Lambda_ {u} ^ {l}, \tag {3} +$$ + +where $\Lambda_u^s$ assesses the structural representativeness of node $u$ , while $\Lambda_u^l$ quantifies the influence propagation of labels. + +$$ +\Lambda_ {u} ^ {s} = \max \left(\tilde {P} _ {u, v} \cdot \tau_ {v}\right), \quad \Lambda_ {u} ^ {l} = \sum_ {v \in \mathcal {V} _ {L}} \tilde {P} _ {v, u} ^ {(L)}, \tag {4} +$$ + +where $\tilde{P}_{u,v}$ is the $(u,v)$ -th element of the standard PPR matrix $\tilde{\mathbf{P}}$ , and $\tau_v$ represents the prior importance score of node $v$ , typically initialized to 1 for all nodes. The structural prominence score captures the maximum influence exerted by any node on node $u$ , weighted by its importance. As clarified, the PPR matrix used for computing label influence centrality is denoted as $\tilde{\mathbf{P}}^{(L)}$ , and defined as: + +$$ +\tilde {\mathbf {P}} ^ {(L)} = \alpha (\mathbf {I} - (1 - \alpha) \mathbf {D} ^ {- 1} \mathbf {A} ^ {\prime}) ^ {- 1}. \tag {5} +$$ + +Here, $\mathcal{V}_L$ denotes the set of labeled nodes, and $\tilde{P}_{v,u}^{(L)}$ represents the influence of node $v$ on node $u$ as captured by $\tilde{\mathbf{P}}^{(L)}$ . To accurately capture the influence of labeled nodes, the inclusion of self-loops in $\mathbf{A}'$ ensures that each labeled node's own label contributes to its $\Lambda_u^l$ . Compared to the intuitive approach of directly selecting labeled nodes, the SALC metric $\Lambda_{u}^{\mathrm{SALC}}$ considers both structural representativeness of the nodes and diffusion of label signals, thus avoiding biases caused by isolated labeled nodes. It is also capable of selecting unlabeled nodes that still possess rich label signals and structural advantages. This improves knowledge quality, enriches the repository, and mitigates the label signal disruption problem. After computing the SALC scores, we rank the nodes based on their $\Lambda_u^{\mathrm{SALC}}$ values and select the top $K$ nodes, where the default value of $K$ is $1/3$ of the total number of nodes. Subsequently, for each class $c$ , the local prototype $\mathbf{H}_c^i$ at each client is computed as the mean feature vector of the selected nodes belonging to class $c$ : + +$$ +\mathbf {H} _ {c} ^ {i} = \frac {1}{| \mathcal {V} _ {c} ^ {i} |} \sum_ {u \in \mathcal {V} _ {c} ^ {i}} \mathbf {h} _ {u} ^ {i}, \tag {6} +$$ + +where $\mathcal{V}_c^i$ represents the set of selected nodes categorized as class $c$ on client $i$ , and $\mathbf{h}_u^i$ is the feature vector of node $u$ on client $i$ . Once the local prototypes are computed, clients upload their prototypes to the server along with the node count. For each class $c$ , the server aggregates the + +prototypes from $\alpha$ percent of the clients by weighting each local prototype according to its sample size. Four global anchor prototypes are constructed for each class. Each global prototype $\mathbf{H}_c^{g,k}$ is computed as: + +$$ +\mathbf {H} _ {c} ^ {g, k} = \frac {1}{\sum_ {i \in \mathcal {N} _ {c} ^ {k}} | \mathcal {V} _ {c} ^ {i} |} \sum_ {i \in \mathcal {N} _ {c} ^ {k}} | \mathcal {V} _ {c} ^ {i} | \mathbf {H} _ {c} ^ {i}, \quad \mathcal {H} = \left[ \begin{array}{c} \mathbf {H} _ {1} ^ {g, 1} \\ \mathbf {H} _ {1} ^ {g, 2} \\ \vdots \\ \mathbf {H} _ {C} ^ {g, 4} \end{array} \right], (7) +$$ + +where $\mathbf{H}_c^{g,k}$ represents the $k$ -th global prototype for class $c$ , $\mathcal{N}_c^k$ is the set of clients randomly selected to contribute to the $k$ -th global prototype for class $c$ , and $C$ is the number of classes. The global repository $\mathcal{H}$ contains all the global prototypes and will be broadcast back to clients. After the global knowledge repository is constructed, it is distributed to the local clients along with the model parameters. The global features $\mathbf{h}_u^g$ used in the following loss formulation refer to the frozen inference features extracted locally using the distributed global model. To regulate local training, we propose a federated knowledge distillation loss function aimed at harmonizing the semantic feature localization of the local GNN with its global counterpart, namely by aligning their similarity distributions for the representative prototypes stored in the global repository: + +$$ +\mathcal {L} _ {\mathrm {F K D}} = \frac {1}{| \mathcal {V} _ {i} |} \sum_ {u \in \mathcal {V} _ {i}} \operatorname {K L} \left(\sigma \left(\varphi \left(\mathbf {h} _ {u} ^ {i}, \mathcal {H}\right)\right), \sigma \left(\varphi \left(\mathbf {h} _ {u} ^ {g}, \mathcal {H}\right)\right)\right), \tag {8} +$$ + +where $\mathrm{KL}(\cdot ,\cdot)$ represents the Kullback-Leibler divergence, and $\sigma (\cdot)$ is the softmax function applied to similarity scores computed by the function $\varphi (\mathbf{h},\mathcal{H})$ , which returns a vector of cosine similarities between the feature and all prototypes. + +# 4.3. Frequency-aware Graph Modeling Alignment + +To emphasize the GNN spectral adjacency awareness and more accurately capture similarities between nodes, we leverage the feature matrix $\mathbf{h}$ to compute node similarity matrices. In the construction of the following similarity matrix, $\mathbf{h}$ denotes operations applied to both $\mathbf{h}^i$ and $\mathbf{h}^g$ . Specifically, for each node $u$ , we identify its $k_{\mathrm{sim}}$ most similar neighbors based on the cosine similarity of their feature vectors $\mathbf{h}_u$ . We then construct a sparse self-similarity matrix $\mathbf{S}'$ as: + +$$ +\mathbf {S} _ {u, v} ^ {\prime} = \left\{ \begin{array}{l l} \frac {\mathbf {h} _ {u} \cdot \mathbf {h} _ {v}}{\| \mathbf {h} _ {u} \| _ {2} \| \mathbf {h} _ {v} \| _ {2}} & v \text {a m o n g t h e t o p} k _ {\mathrm {s i m}} \\ 0 & \text {o t h e r w i s e} \end{array} . \right. \tag {9} +$$ + +Subsequently, we calculate the graph laplacian matrix $\mathbf{L}'$ based on this sparse similarity matrix $\mathbf{S}'$ as: + +$$ +\mathbf {L} ^ {\prime} = \mathbf {D} ^ {\prime} - \mathbf {S} ^ {\prime}, \tag {10} +$$ + +where $\mathbf{D}'$ is the diagonal degree matrix of $\mathbf{S}'$ . Moreover, we perform eigendecomposition on the laplacians $\mathbf{L}^{\prime i}$ and $\mathbf{L}^{\prime g}$ . + +For $\mathbf{L}^{\prime i}$ , let $\{\mathbf{u}_m^{\mathrm{low},i}\}_{m = 1}^{k_{\mathrm{eig}}}$ be the eigenvectors corresponding to the smallest eigenvalues, which represents low-frequency. While $\{\mathbf{u}_m^{\mathrm{high},i}\}_{m = 1}^{k_{\mathrm{eig}}}$ denotes the largest eigenvalues, which represents high-frequency. Similarly, for $\mathbf{L}^{\prime g}$ , we obtain $\{\mathbf{u}_m^{\mathrm{low},g}\}_{m = 1}^{k_{\mathrm{eig}}}$ and $\{\mathbf{u}_m^{\mathrm{high},g}\}_{m = 1}^{k_{\mathrm{eig}}}$ . The feature matrix $\mathbf{h}$ is then projected onto each of these eigenvectors. For instance: + +$$ +\mathbf {Z} _ {m} ^ {\text {l o w}} = \left(\mathbf {u} _ {m} ^ {\text {l o w}} \mathbf {u} _ {m} ^ {\text {l o w} T}\right) \mathbf {h}, \quad \mathbf {Z} _ {m} ^ {\text {h i g h}} = \left(\mathbf {u} _ {m} ^ {\text {h i g h}} \mathbf {u} _ {m} ^ {\text {h i g h} T}\right) \mathbf {h}. \tag {11} +$$ + +Applying these projections for each $m \in \{1, \dots, k_{\mathrm{eig}}\}$ , we obtain several sets of projected feature matrices used in the loss computation. Specifically, local features $\mathbf{h}^i$ are projected onto low/high-frequency eigenvectors of the local graph, yielding $\mathbf{Z}_m^{i,\mathrm{low}}$ and $\mathbf{Z}_m^{i,\mathrm{high}}$ , respectively. Similarly, frozen global inference features $\mathbf{h}^g$ are projected onto corresponding eigenvectors from $\mathbf{L}^{\prime g}$ , yielding $\mathbf{Z}_m^{g,\mathrm{low}}$ and $\mathbf{Z}_m^{g,\mathrm{high}}$ . Consequently, loss $\mathcal{L}_{\mathrm{FGMA}}$ is then defined as the sum of MSE over all eigenvector-projected pairs: + +$$ +\mathcal {L} _ {\mathrm {F G M A}} = \sum_ {m = 1} ^ {k _ {\text {e i g}}} \left(\operatorname {M S E} \left(\mathbf {Z} _ {m} ^ {i, \text {l o w}}, \mathbf {Z} _ {m} ^ {g, \text {l o w}}\right) + \operatorname {M S E} \left(\mathbf {Z} _ {m} ^ {i, \text {h i g h}}, \mathbf {Z} _ {m} ^ {g, \text {h i g h}}\right)\right). \tag {12} +$$ + +This loss addresses spectral heterogeneity by aligning client and global signal characteristics in both spectral domains. Combining strategies Node Label Information Reinforcement Frequency-aware Graph Modeling Alignment, our framework $S^2$ FGL reinforces semantic knowledge during local modeling and mitigates spectral client drift. Ultimately, the loss for local training is: + +$$ +\mathcal {L} = \mathcal {L} _ {\mathrm {C E}} + \lambda_ {1} \mathcal {L} _ {\mathrm {F K D}} + \lambda_ {2} \mathcal {L} _ {\mathrm {F G M A}}, \tag {13} +$$ + +where $\mathcal{L}_{\mathrm{CE}}$ denotes the standard cross-entropy loss for node classification, while $\lambda_{1}$ and $\lambda_{2}$ are balancing hyperparameters for the proposed methods NLIR and FGMA. + +# 5. Experiments + +# 5.1. Experimental Setup + +Datasets. We conducted experiments on various datasets to validate the superiority of our framework $S^2$ FGL. The homophilic graph datasets include Cora, CiteSeer, and Pubmed, while the heterophilic graph datasets comprise Texas, Wisconsin, and Minesweeper. The following provides a description of each dataset. Cora (McCallum et al., 2000) dataset consists of 2708 scientific publications classified into one of seven classes. There are 5429 edges in the network of citations. 1433 distinct words make up the dictionary. CiteSeer (Giles et al., 1998) dataset consists of 3312 scientific publications classified into one of six classes and 4732 edges. The dictionary contains 3703 unique words. Pubmed (Sen et al., 2008) dataset consists of 19717 scientific papers on diabetes that have been categorized into one of three categories in the PubMed database. The citation network has 44338 edges. + +Table 1. Performance Comparison with the state-of-the-art methods on homophilic and heterophilic graph datasets. We report the node classification accuracies with the performance improvement over FedAvg. The best results are highlighted in bold. + +
MethodsCoraCiteSeerPubMedTexasWisconsinMinesweeper
FedAvg [ASTAT17]81.9 ± 0.774.3 ± 0.487.3 ± 0.372.8 ± 2.277.6 ± 2.779.6 ± 0.1
FedProx [arXiv18]82.1 ± 0.5 ↑0.274.4 ± 0.3 ↑0.187.9 ± 0.4 ↑0.673.5 ± 3.7 ↑0.777.3 ± 3.4 ↓0.379.7 ± 0.1 ↑0.1
FedNova [NeurIPS20]81.6 ± 1.2 ↓0.374.4 ± 0.4 ↑0.188.2 ± 0.5 ↑0.973.0 ± 4.4 ↑0.277.4 ± 4.2 ↓0.279.9 ± 0.4 ↑0.3
FedFa [ICLR23]82.7 ± 0.5 ↑0.874.9 ± 0.6 ↑0.687.8 ± 0.5 ↑0.573.9 ± 3.6 ↑1.178.1 ± 4.6 ↑0.580.1 ± 0.3 ↑0.5
FedSage+ [NeurIPS19]82.3 ± 0.7 ↑0.475.2 ± 0.3 ↑0.988.2 ± 0.7 ↑0.973.7 ± 4.0 ↑0.979.0 ± 3.3 ↑1.479.9 ± 0.2 ↑0.3
FedStar [AAAI23]82.6 ± 0.5 ↑0.774.5 ± 0.3 ↑0.288.1 ± 0.6 ↑0.874.3 ± 2.7 ↑1.578.3 ± 4.7 ↑0.779.8 ± 0.1 ↑0.2
FedPub [ICML23]82.3 ± 0.8 ↑0.474.8 ± 0.7 ↑0.588.0 ± 0.4 ↑0.773.4 ± 3.5 ↑0.677.8 ± 3.1 ↑0.279.9 ± 0.2 ↑0.3
FGSSL [IJCAI23]82.6 ± 0.4 ↑0.774.9 ± 0.2 ↑0.687.6 ± 0.7 ↑0.373.6 ± 4.6 ↑0.877.8 ± 3.8 ↑0.279.9 ± 0.2 ↑0.3
FedGTA [VLDB24]82.4 ± 0.8 ↑0.575.1 ± 0.5 ↑0.887.7 ± 0.9 ↑0.472.6 ± 4.2 ↓0.277.8 ± 4.1 ↑0.280.2 ± 0.3 ↑0.6
FGGP [AAAI24]82.5 ± 0.4 ↑0.674.7 ± 0.5 ↑0.487.5 ± 0.4 ↑0.273.6 ± 2.8 ↑0.878.2 ± 3.4 ↑0.680.4 ± 0.3 ↑0.8
S2FGL (ours)83.4 ± 0.2 ↑1.576.0 ± 0.3 ↑1.788.6 ± 0.2 ↑1.374.8 ± 2.3 ↑2.079.0 ± 1.0 ↑1.480.5 ± 0.1 ↑0.9
+ +Texas and Wisconsin datasets are subsets of the WebKB dataset (Craven et al., 1998). The WebKB dataset was introduced in 1998, comprising web pages from the computer science departments of various universities, including the University of Texas and the University of Wisconsin. The dataset is commonly used for tasks such as webpage classification and link prediction, serving as a benchmark for evaluating machine learning models in graph-based learning scenarios. Minesweeper (Baranovskiy et al., 2023) dataset is a synthetic graph dataset inspired by the Minesweeper game. In this dataset, the graph is structured as a regular $100 \times 100$ grid, where each node represents a cell connected to its neighboring nodes, except for edge nodes, which have fewer neighbors. The primary task is to predict which nodes contain mines. This dataset is commonly used to evaluate the performance of GNNs under heterophily. + +Evaluation Metric. Following mainstream FGL research experimental practices, we utilize the accuracy of the node classification task as the evaluation metric. + +Baselines. We compare $S^2$ FGL with several state-of-the-art approaches, including traditional federated learning methods such as FedAvg (McMahan et al., 2017), FedProx (Li et al., 2020), FedNova (Wang et al., 2020), and FedFa (Zhou & Konukoglu, 2023); federated graph learning approaches including FGSSL (Huang et al., 2023a) and FGGP (Wan et al., 2024a); as well as personalized federated graph learning methods such as FedSage+ (Zhang et al., 2021b), FedStar (Tan et al., 2023), FedPub (Baek et al., 2023), and FedGTA (Li et al., 2024). This comprehensive set of baseline methods spans various FL and FGL paradigms, allowing us to evaluate the performance and advantages of our proposed $S^2$ FGL across diverse scenarios. + +Implement Details. Following prevalent methodologies in FGL research, we employ the Louvain community detection + +algorithm to partition the graph into subgraphs assigned to different clients. For each dataset, we divide the nodes into training, validation, and testing sets with ratios of $60\%$ , $20\%$ , and $20\%$ , respectively. Additionally, we simulate various collaborative scenarios by configuring the number of clients to 10 for Cora, CiteSeer, Pubmed, and Minesweeper datasets, and 3 for the Texas and Wisconsin datasets. The primary evaluation metric is the node classification accuracy on the clients' test sets. We conduct each experiment five times and report the average accuracy from the last five communication epochs as the final performance. We conduct experiments with the ACM-GCN (Luan et al., 2022), which achieves a strong ability on both homophilic and heterophilic graph datasets. + +# 5.2. Experiment Results + +In this section, we comprehensively evaluate the proposed $S^2$ FGL by addressing the following questions: + +- Q1: How does $S^2$ FGL perform compared to existing FL and FGL methods in subgraph-FL? +- Q2: What is the impact of each component of $S^2$ FGL on the overall performance? +Q3: Does $S^2$ FGL maintain consistent performance across different hyperparameter and client scales? +Q4: Do NLIR and FGMA mitigate the effects of label signal disruption and spectral heterogeneity? + +# Q1: How does $S^2$ FGL perform compared to existing FL and FGL methods in subgraph-FL? + +We present the results of node classification tasks across various FGL scenarios using multiple graph datasets, and + +we summarize the final average test accuracy in Tab. 1. It demonstrates that our proposed $S^2$ FGL consistently outperforms all baseline approaches across all six datasets. This superiority highlights the effectiveness of $S^2$ FGL. + +# Q2: What is the impact of each component of $S^2$ FGL on the overall performance? + +To evaluate the individual contributions of NLIR and FGMA strategies within the $S^2$ FGL framework, we conducted ablation experiments on the Cora and Citeseer datasets. In this study, we removed each component to assess its impact on the overall performance. The results are presented in Tab. 2, which demonstrate that both NLIR and FGMA independently contribute to the overall performance. + +
NLIRFGMADataset
CoraCiteSeer
XX81.9 ± 0.774.3 ± 0.4
X83.2 ± 0.475.6 ± 0.3
X82.6 ± 0.375.0 ± 0.2
83.4 ± 0.276.0 ± 0.3
+ +Table 2. Ablation study on key components of ${S}^{2}\mathrm{{FGL}}$ . + +# Q3: Does $S^2$ FGL maintain consistent performance across different hyperparameter and client scales? + +We evaluated the stability and adaptability of our proposed framework $S^2$ FGL under varying hyperparameter configurations of and different client scales. + +Varying Hyperparameters of NLIR and FGMA. For NLIR, we test hyperparameter sets of 100, 50, 10, and 1. For FGMA, the settings are 0.01, 0.05, 0.5, and 1. The results in Fig. 4 indicate that our method maintains consistent performance across varying hyperparameter configurations. + +![](images/cefc86a487a1a05bcc61a866ed8c05011f0d935cd119acc879e56c48b530478e.jpg) +(a) Cora + +![](images/44f0030259e2c6c587bf7d718b7b3a3ee4700cdaec5142d58a1b240cb85de575.jpg) +(b) Citeseer + +Varying Client Scales. We assessed performance with different client scales: 5, 10 and 20. Specifically, we compared $S^2$ FGL with other FL and FGL baselines, including FedAvg, FedProx, and FGSSL. The results in Fig. 5 demonstrate that $S^2$ FGL consistently delivers reliable results regardless of the client scales. Overall, $S^2$ FGL exhibits strong stability + +![](images/b6677c11f49c4c9485bcd4f20eb070645e2f53f978e11dd9f3f8c2399471a9be.jpg) +(a) Cora + +![](images/0df512c6531d93e0b73f2f6f0cbde12fe38d44e4580b49c3054fe4641f118708.jpg) +(b) Citeseer +Figure 5. Analysis of performance under different client scales. + +and adaptability across varying hyperparameter settings and client partition configurations on both the Cora and Cite-seer datasets. These findings confirm that $S^2$ FGL not only sustains its effectiveness under diverse conditions but also adapts seamlessly to varying client scales, demonstrating its suitability for real-world subgraph-FL scenarios. + +# Q4: Do NLIR and FGMA mitigate the effects of label signal disruption and spectral heterogeneity? + +In Fig. 1, our experiments demonstrate that the SIS score in subgraph scenarios declines compared to centralized training, while spectral heterogeneity exists among clients. Here, we further verify the targeted effectiveness of NILR and FGMA with respect to these two issues, respectively. First, in Fig. 6 (a), we investigate the relationship between the performance gain brought by NILR to FedAvg and the change in the SIS score. The results show that this method achieves higher performance when semantic signals are more limited, thereby confirming its effectiveness and targeted nature. Second, in Fig. 6 (b), we examine the relationship between the performance improvement of FGMA for FedAvg and spectral heterogeneity, measured by the average KL divergence between the eigenvalue distributions of different clients. Experimental results show that greater spectral heterogeneity corresponds to larger performance gains, confirming the effectiveness of our method. Specifically, green indicates the performance gain of the proposed method relative to FedAvg, blue denotes variations in SIS, and orange corresponds to spectral heterogeneity. + +![](images/6f26bd088a5d35580ec7b4f313b2fa7617944e8722361a1afdab281e0dd81e75.jpg) +Figure 4. Analysis of the performance growth between $S^2$ FGL and FedAvg under different hyperparameters of NLIR and FGMA +(a) NILR + +![](images/23e167e760ad9d618d4cbf7f540046aec3a6edb377d26ca0543ac5da883bfbca.jpg) +(b) FGMA +Figure 6. Analysis of the targeted effectiveness of NILR and FGMA. (a) The performance gain from NILR increases as the semantic signal becomes limited. (b) The performance improvement from FGMA grows with higher spectral heterogeneity. + +# 6. Conclusion + +In this paper, we identify and empirically demonstrate two phenomena in subgraph-FL from both spatial and spectral perspectives of graph signal propagation: label signal disruption and spectral heterogeneity. These phenomena pose challenges of poor semantic knowledge and spectral client drift. To address these challenges, we propose two key strategies: NLIR and FGMA. NLIR selects structurally and semantically representative nodes and constructs a global repository accordingly. By injecting semantic information from the repository into local training, it alleviates the poor semantic knowledge caused by label signal disruption. In addition, FGMA aligns and feature projections in both the high- and low-frequency reconstructed graph spectra, thereby promoting a generic signal propagation paradigm and mitigating client drifts under spectral heterogeneity. By integrating these strategies, $S^2$ FGL effectively tackles both spatial and spectral challenges in subgraph-FL. Extensive experiments on multiple datasets demonstrate that $S^2$ FGL significantly enhances global generalizability. + +# Acknowledgement + +This work is supported by the National Key Research and Development Program of China (2024YFC3308400), and National Natural Science Foundation of China under Grant (62361166629, 62176188, 62225113, 623B2080), the Wuhan University Undergraduate Innovation Research Fund Project. The supercomputing system at the Supercomputing Center of Wuhan University supported the numerical calculations in this paper. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none of which we feel must be specifically highlighted here. + +# References + +Acar, D. A. E., Zhao, Y., Matas, R., Mattina, M., Whatmough, P., and Saligrama, V. Federated learning based on dynamic regularization. In ICLR, 2021. +Baek, J., Jeong, W., Jin, J., Yoon, J., and Hwang, S. J. Personalized subgraph federated learning. In ICML, pp. 1396-1415, 2023. +Baranovskiy, D., Oseledets, I., and Babenko, A. A critical look at the evaluation of gnns under heterophily: Are we really making progress? arXiv preprint arXiv:2302.11640, 2023. +Bo, D., Fang, Y., Liu, Y., and Shi, C. Graph contrastive learn + +ing with stable and scalable spectral encoding. NeurIPS, 36:45516-45532, 2023a. +Bo, D., Shi, C., Wang, L., and Liao, R. Specformer: Spectral graph neural networks meet transformers. arXiv preprint arXiv:2303.01028, 2023b. +Chen, H.-Y. and Chao, W.-L. On bridging generic and personalized federated learning for image classification. In ICLR, 2022. +Chen, M., Zhang, W., Yuan, Z., Jia, Y., and Chen, H. Fede: Embedding knowledge graphs in federated setting. In IJCKG, pp. 80-88, 2021. +Chen, Y., Huang, W., and Ye, M. Fair federated learning under domain skew with local consistency and domain diversity. In CVPR, pp. 12077-12086, 2024. +Craven, M., DiPasquo, D., Freitag, D., McCallum, A., Mitchell, T., Nigam, K., and Slattery, S. Learning to extract symbolic knowledge from the world wide web. AAAI/IAAI, pp. 2, 1998. +Defferrard, M., Bresson, X., and Vandergheynst, P. Convolutional neural networks on graphs with fast localized spectral filtering. In NeurIPS, 2016. +Ezzeldin, Y. H., Yan, S., He, C., Ferrara, E., and Avestimehr, A. S. Fairfed: Enabling group fairness in federated learning. In AAAI, 2023. +Fan, W., Ma, Y., Li, Q., Wang, J., Cai, G., Tang, J., and Yin, D. A graph neural network framework for social recommendations. TKDE, 2020. +Fang, X. and Ye, M. Robust federated learning with noisy and heterogeneous clients. In CVPR, pp. 10072-10081, 2022. +Fang, X., Easwaran, A., Genest, B., and Suganthan, P. N. Adaptive hierarchical graph cut for multi-granularity out-of-distribution detection. IEEE TAI, 2025. +Fu, X., Zhang, B., Dong, Y., Chen, C., and Li, J. Federated graph machine learning: A survey of concepts, techniques, and applications. arXiv preprint arXiv:2207.11812, 2022. +Gao, Y., Wang, X., He, X., Liu, Z., Feng, H., and Zhang, Y. Addressing heterophily in graph anomaly detection: A perspective of graph spectrum. In Proceedings of the ACM Web Conference 2023, pp. 1528-1538, 2023. +Giles, C. L., Bollacker, K. D., and Lawrence, S. Citeseer: An automatic citation indexing system. In Proceedings of the third ACM conference on Digital libraries, pp. 89-98, 1998. + +Han, H., Liu, X., Ma, L., Torkamani, M., Liu, H., Tang, J., and Yamada, M. Structural fairness-aware active learning for graph neural networks. In ICLR, 2023. +He, C., Balasubramanian, K., Ceyani, E., Yang, C., Xie, H., Sun, L., He, L., Yang, L., Yu, P. S., Rong, Y., et al. Fedgraphnn: A federated learning system and benchmark for graph neural networks. In ICLR, 2021a. +He, M., Wei, Z., Xu, H., et al. Bernnet: Learning arbitrary graph spectral filters via bernstein approximation. In NeurIPS, pp. 14239-14251, 2021b. +He, M., Wei, Z., and Wen, J.-R. Convolutional neural networks on graphs with chebyshev approximation, revisited. In NeurIPS, pp. 7264-7276, 2022. +Hong, J., Wang, H., Wang, Z., and Zhou, J. Federated robustness propagation: sharing adversarial robustness in heterogeneous federated learning. In AAAI, pp. 7893-7901, 2023. +Hu, M., Yue, Z., Xie, X., Chen, C., Huang, Y., Wei, X., Lian, X., Liu, Y., and Chen, M. Is aggregation the only choice? federated learning via layer-wise model recombination. In SIGKDD, pp. 1096-1107, 2024. +Huang, W., Ye, M., and Du, B. Learn from others and be yourself in heterogeneous federated learning. In CVPR, pp. 10143-10153, 2022. +Huang, W., Wan, G., Ye, M., and Du, B. Federated graph semantic and structural learning. In Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, pp. 3830-3838, 2023a. +Huang, W., Ye, M., Shi, Z., and Du, B. Generalizable heterogeneous federated cross-correlation and instance similarity learning. TPAMI, pp. 712-728, 2023b. +Huang, W., Ye, M., Shi, Z., Li, H., and Du, B. Rethinking federated learning with domain shift: A prototype view. In CVPR, pp. 16312-16322. IEEE, 2023c. +Huang, W., Ye, M., Shi, Z., Wan, G., Li, H., Du, B., and Yang, Q. A federated learning for generalization, robustness, fairness: A survey and benchmark. TPAMI, 2024. +Karimireddy, S. P., Kale, S., Mohri, M., Reddi, S. J., Stich, S. U., and Suresh, A. T. Scaffold: Stochastic controlled averaging for on-device federated learning. In ICML, pp. 5132-5143, 2020. +Kreuzer, D., Beaini, D., Hamilton, W., Létourneau, V., and Tossou, P. Rethinking graph transformers with spectral attention. In *NeruIPS*, pp. 21618-21629, 2021. + +Lee, G., Jeong, M., Shin, Y., Bae, S., and Yun, S.-Y. Preservation of the global knowledge by not-true distillation in federated learning. In Koyejo, S., Mohamed, S., Agarwal, A., Belgrave, D., Cho, K., and Oh, A. (eds.), NeurIPS, pp. 38461-38474, 2022. +Li, T., Sahu, A. K., Zaheer, M., Sanjabi, M., Talwalkar, A., and Smith, V. Federated optimization in heterogeneous networks. MLSys, 2:429-450, 2020. +Li, X., Wu, Z., Zhang, W., Zhu, Y., Li, R.-H., and Wang, G. Fedgta: Topology-aware averaging for federated graph learning. arXiv preprint arXiv:2401.11755, 2024. +Li, X.-C., Zhan, D.-C., Shao, Y., Li, B., and Song, S. Fedphp: Federated personalization with inherited private models. In ECML, pp. 587-602, 2021. +Liao, R., Zhao, Z., Urtasun, R., and Zemel, R. S. Lanczos-net: Multi-scale deep graph convolutional networks. In ICLR, 2019. +Liu, N., Wang, X., Bo, D., Shi, C., and Pei, J. Revisiting graph contrastive learning from the perspective of graph spectrum. In NeurIPS, pp. 2972-2983, 2022. +Liu, R. and Yu, H. Federated graph neural networks: Overview, techniques and challenges. arXiv preprint arXiv:2202.07256, 2022. +Liu, Y., Bo, D., and Shi, C. Graph condensation via eigenbasis matching. arXiv preprint arXiv:2310.09202, 2023. +Liu, Z., Wan, G., Prakash, B. A., Lau, M. S., and Jin, W. A review of graph neural networks in epidemic modeling. arXiv preprint arXiv:2403.19852, 2024. +Luan, S., Hua, C., Lu, Q., Zhu, J., Zhao, M., Zhang, S., Chang, X.-W., and Precup, D. Revisiting heterophily for graph neural networks. In NeurIPS22, pp. 1362-1375, 2022. +Lv, F., Shang, X., Zhou, Y., Zhang, Y., Li, M., and Lu, Y. Personalized federated learning on heterogeneous and long-tailed data via expert collaborative learning. arXiv preprint arXiv:2408.02019, 2024. +McCallum, A. K., Nigam, K., Rennie, J., and Seymour, K. Automating the construction of internet portals with machine learning. Information Retrieval, 3(2):127-163, 2000. +McMahan, B., Moore, E., Ramage, D., Hampson, S., and y Arcas, B. A. Communication-efficient learning of deep networks from decentralized data. In AISTATS, pp. 1273-1282, 2017. + +Ray Chaudhury, B., Li, L., Kang, M., Li, B., and Mehta, R. Fairness in federated learning via core-stability. In NeurIPS, pp. 5738-5750, 2022. +Sen, P., Namata, G., Bilgic, M., Getoor, L., Galligher, B., and Eliassi-Rad, T. Collective classification in network data. AI magazine, 29(3):93-93, 2008. +Shang, X., Lu, Y., Huang, G., and Wang, H. Federated learning on heterogeneous and long-tailed data via classifier re-training with federated features. In *IJCAI*, 2022. +Smith, V., Chiang, C.-K., Sanjabi, M., and Talwalkar, A. S. Federated multi-task learning. In NeurIPS, 2017. +Tan, Y., Liu, Y., Long, G., Jiang, J., Lu, Q., and Zhang, C. Federated learning on non-iid graphs via structural knowledge sharing. In AAAI, pp. 9953-9961, 2023. +Tan, Z., Wan, G., Huang, W., and Ye, M. Fedssp: Federated graph learning with spectral knowledge and personalized preference. In NeurIPS, pp. 34561-34581, 2024. +Tan, Z., Wan, G., Huang, W., Li, H., Zhang, G., Yang, C., and Ye, M. Fedspa: Generalizable federated graph learning under homophily heterogeneity. In CVPR, pp. 15464-15475, 2025. +Tang, J., Li, J., Gao, Z., and Li, J. Rethinking graph neural networks for anomaly detection. In ICML, pp. 21076-21089, 2022. +Wan, G., Huang, W., and Ye, M. Federated graph learning under domain shift with generalizable prototypes. In AAAI, pp. 15429-15437, 2024a. +Wan, G., Tian, Y., Huang, W., Chawla, N. V., and Ye, M. S3gcl: Spectral, swift, spatial graph contrastive learning. In ICML, pp. 49973-49990, 2024b. +Wan, G., Huang, Z., Zhao, W., Luo, X., Sun, Y., and Wang, W. Rethink graphode generalization within coupled dynamical system. In ICML, 2025a. +Wan, G., Shi, Z., Huang, W., Zhang, G., Tao, D., and Ye, M. Energy-based backdoor defense against federated graph learning. In ICLR, 2025b. +Wang, D., Lin, J., Cui, P., Jia, Q., Wang, Z., Fang, Y., Yu, Q., Zhou, J., Yang, S., and Qi, Y. A semi-supervised graph attentive network for financial fraud detection. In ICDM, pp. 598-607, 2019. +Wang, J., Liu, Q., Liang, H., Joshi, G., and Poor, H. V. Tackling the objective inconsistency problem in heterogeneous federated optimization. In NeurIPS, pp. 7611-7623, 2020. + +Wang, X. and Zhang, M. How powerful are spectral graph neural networks. In ICML, pp. 23341-23362, 2023. +Wu, X., Liu, X., Niu, J., Zhu, G., and Tang, S. Bold but cautious: Unlocking the potential of personalized federated learning through cautiously aggressive collaboration. In ICCV, pp. 19375-19384, 2023. +Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., and Philip, S. Y. A comprehensive survey on graph neural networks. TNNLS, pp. 4-24, 2020. +Xie, H., Ma, J., Xiong, L., and Yang, C. Federated graph classification over non-iid graphs. In NerulPS, pp. 18839-18852, 2021. +Xu, C., Qu, Y., Xiang, Y., and Gao, L. Asynchronous federated learning on heterogeneous devices: A survey. Computer Science Review, 50:100595, 2023. +Xu, J., Chen, Z., Quek, T. Q., and Chong, K. F. E. Fedcorr: Multi-stage federated learning for label noise correction. In CVPR, pp. 10184-10193, 2022. +Yang, X., Huang, W., and Ye, M. Dynamic personalized federated learning with adaptive differential privacy. Advances in Neural Information Processing Systems, 36: 72181-72192, 2023. +Zhang, H., Shen, T., Wu, F., Yin, M., Yang, H., and Wu, C. Federated graph learning - a position paper. In arXiv preprint arXiv:2105.11099, 2021a. +Zhang, J., Li, Z., Li, B., Xu, J., Wu, S., Ding, S., and Wu, C. Federated learning with label distribution skew via logits calibration. In ICML, pp. 26311-26329, 2022a. +Zhang, J., Hua, Y., Cao, J., Wang, H., Song, T., XUE, Z., Ma, R., and Guan, H. Eliminating domain bias for federated learning in representation space. In NeurIPS, pp. 14204-14227, 2023a. +Zhang, J., Hua, Y., Wang, H., Song, T., Xue, Z., Ma, R., Cao, J., and Guan, H. GpfI: Simultaneously learning global and personalized feature information for personalized federated learning. In CVPR, pp. 5041-5051, 2023b. +Zhang, J., Hua, Y., Wang, H., Song, T., Xue, Z., Ma, R., and Guan, H. Fedala: Adaptive local aggregation for personalized federated learning. In AAAI, pp. 11237-11244, 2023c. +Zhang, K., Yang, C., Li, X., Sun, L., and Yiu, S. M. Subgraph federated learning with missing neighbor generation. In NeurIPS, pp. 6671-6682, 2021b. +Zhang, T., Gao, L., Lee, S., Zhang, M., and Avestimehr, S. Timelyfl: Heterogeneity-aware asynchronous federated learning with adaptive partial training. In CVPR, pp. 5064-5073, 2023d. + +Zhang, Y., Gao, S., Pei, J., and Huang, H. Improving social network embedding via new second-order continuous graph neural networks. In KDD, pp. 2515-2523, 2022b. +Zhou, T. and Konukoglu, E. Fedfa: Federated feature augmentation. In ICLR, 2023. +Zhu, B., Wang, L., Pang, Q., Wang, S., Jiao, J., Song, D., and Jordan, M. I. Byzantine-robust federated learning with optimal statistical rates. In AISTATS, pp. 3151-3178, 2023. +Zhu, Y., Li, X., Wu, Z., Wu, D., Hu, M., and Li, R.-H. Fedtad: Topology-aware data-free knowledge distillation for subgraph federated learning. arXiv preprint arXiv:2404.14061, 2024. +Zhu, Z., Hong, J., and Zhou, J. Data-free knowledge distillation for heterogeneous federated learning. In ICML, pp. 12878-12889, 2021. \ No newline at end of file diff --git a/s2fglspatialspectralfederatedgraphlearning/images.zip b/s2fglspatialspectralfederatedgraphlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..fbee8f46904044e43043c29e3f27a9d3aa0fb461 --- /dev/null +++ b/s2fglspatialspectralfederatedgraphlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f40b5469e386268b15723efda7611769a72d17133b45087f42aef64cba997b6f +size 580786 diff --git a/s2fglspatialspectralfederatedgraphlearning/layout.json b/s2fglspatialspectralfederatedgraphlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..50a38ff357ed40693557d36b4de7f8f6798a3c8f --- /dev/null +++ b/s2fglspatialspectralfederatedgraphlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69cac203bcab101f7fbb38d49c8c1d07da2e25838382ca07cc4ac74fedb33e04 +size 488650 diff --git a/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/432bdcf8-db80-4266-af20-ab0a1059e8db_content_list.json b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/432bdcf8-db80-4266-af20-ab0a1059e8db_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..46c4939712db4415b1f7e1d82c21b29ac9ca2a0b --- /dev/null +++ b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/432bdcf8-db80-4266-af20-ab0a1059e8db_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a41fec53e3cb4f7960ad425b0d4aff58fa03d505423a2e8a0a982c86983c4ef4 +size 138774 diff --git a/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/432bdcf8-db80-4266-af20-ab0a1059e8db_model.json b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/432bdcf8-db80-4266-af20-ab0a1059e8db_model.json new file mode 100644 index 0000000000000000000000000000000000000000..33b461f670c80311473f1cb654708fc943f1b241 --- /dev/null +++ b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/432bdcf8-db80-4266-af20-ab0a1059e8db_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3abc1fece85fffb5d4a6eb22945e2027e74038f9b8b611edab76ae719605c6be +size 164588 diff --git a/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/432bdcf8-db80-4266-af20-ab0a1059e8db_origin.pdf b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/432bdcf8-db80-4266-af20-ab0a1059e8db_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..97044aceb30e02f80229643b4789270d72ac2097 --- /dev/null +++ b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/432bdcf8-db80-4266-af20-ab0a1059e8db_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8b6d9c32fe9b5f67066578e80b6c7912c67de71aa08c3354b7ef794ead07149 +size 8464242 diff --git a/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/full.md b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0c74d2c41f0dd4458f817223b0e65d94a1efb731 --- /dev/null +++ b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/full.md @@ -0,0 +1,563 @@ +# $\mathbf{I}^{2}\mathbf{M}\circ \mathbf{E}$ : Interpretable Multimodal Interaction-aware Mixture-of-Experts + +Jiayi Xin1 Sukwon Yun2 Jie Peng3 Inyoung Choi1 Jenna L. Ballard1 Tianlong Chen2 Qi Long1 + +# Abstract + +Modality fusion is a cornerstone of multimodal learning, enabling information integration from diverse data sources. However, vanilla fusion methods are limited by (1) inability to account for heterogeneous interactions between modalities and (2) lack of interpretability in uncovering the multimodal interactions inherent in the data. To this end, we propose $\mathsf{I}^2\mathsf{MoE}$ (Interpretable Multimodal Interaction-aware Mixture of Experts), an end-to-end MoE framework designed to enhance modality fusion by explicitly modeling diverse multimodal interactions, as well as providing interpretation on a local and global level. First, $\mathsf{I}^2\mathsf{MoE}$ utilizes different interaction experts with weakly supervised interaction losses to learn multimodal interactions in a data-driven way. Second, $\mathsf{I}^2\mathsf{MoE}$ deploys a reweighting model that assigns importance scores for the output of each interaction expert, which offers sample-level and dataset-level interpretation. Extensive evaluation of medical and general multimodal datasets shows that $\mathsf{I}^2\mathsf{MoE}$ is flexible enough to be combined with different fusion techniques, consistently improves task performance, and provides interpretation across various real-world scenarios. Code is available at https://github.com/Raina-Xin/I2MoE. + +# 1. Introduction + +A core challenge in multimodal learning is modality fusion—the integration of information from multiple modalities to improve predictive performance (Baltrusaitis et al., 2019; Barnum et al., 2020; Lv et al., 2021). By leveraging + +1University of Pennsylvania, PA, USA 2University of North Carolina at Chapel Hill, NC, USA 3University of Science and Technology of China, Anhui, China. Correspondence to: Qi Long , Tianlong Chen , Jiayi Xin . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/5b4df49cf3760fc91a0e029c5ec9d72d1b84f56a8e17b356dd84adcac416b4b3.jpg) +Figure 1. An illustrative example of modality interaction. The poster and plot are taken from the IMDB dataset. + +ing diverse data sources such as text, images, audio, and sensor data, modality fusion enables the capture of intricate relationships across modalities, which is especially crucial in fields like healthcare, where accurate decision-making relies on multimodal insights (Liang et al., 2022b; Kline et al., 2022; Teoh et al., 2024). Although recent advancements in neural architectures, such as transformers (Vaswani et al., 2017; Tsai et al., 2019) and sparse mixture-of-experts (Shazeer et al., 2017; Fedus et al., 2022; Jin et al., 2024), have significantly improved the modeling of modality interactions, an important yet underexplored area is the systematic understanding of how modalities influence one another—whether they provide complementary, supplementary, or even conflicting information (Baltrusaitis et al., 2019; Liang et al., 2022b; 2023). + +Understanding modality interaction is essential for advancing multimodal machine learning (Baltrusaitis et al., 2019; Liang et al., 2022b). An information-theoretic framework called Partial Information Decomposition (PID) (Wollstadt et al., 2023; Liang et al., 2023) offers a theoretical foundation for understanding modality interactions. PID decomposes information into four distinct types: uniqueness for the first modality (information specific to modality 1), uniqueness for the second modality (information specific to modality 2), synergy (emergent information arising from the combination of two modalities), and redundancy (shared information across two modalities). + +Figure 1 illustrates the importance of carefully modeling different types of multimodal interactions. For instance, the unique information provided by the image modality + +$(\mathbf{m}_{\mathrm{img}})$ contributes to predicting the Horror genre through distinct visual cues absent in the language modality $(\mathbf{m}_{\mathrm{lang}})$ while the unique information from the language modality offers critical textual context for identifying the Romance genre. Redundant information refers to shared information present in both modalities, such as recognizing the Fantasy genre through the blurry figure in the poster and mentioning a "sorcerer" in the plot. Accurately classifying the movie as Drama, however, requires modeling synergistic information between the two modalities: visual elements such as clothing and facial expressions in $\mathbf{m}_{\mathrm{img}}$ complement the narrative details from $\mathbf{m}_{\mathrm{lang}}$ . From this example, systematic modeling of multimodal interactions is needed to make accurate predictions. + +While the PID framework provides valuable theoretical insights into the proportions of different modality interactions within a dataset, its practical application is limited, lacking integration into end-to-end and interpretable deep learning frameworks. Most existing multimodal fusion methods do not explicitly model multimodal interactions (Liu et al., 2018; Tsai et al., 2019; Xue & Marculescu, 2023). Notable efforts to address this gap, such as (Wörtwein et al., 2022; Yu et al., 2024; Dufumier et al., 2024), exhibit key limitations: they either focus exclusively on pairwise modality interactions (Wörtwein et al., 2022), require separate estimates for each interaction type (Yu et al., 2024), or lack sufficient interpretability (Dufumier et al., 2024). The opportunity to directly leverage PID for improving both task performance and model interpretability within multimodal fusion frameworks remains largely unexplored. + +In contrast to earlier works, we propose $\mathsf{I}^2\mathsf{M}\circ \mathsf{E}$ , an end-to-end mixture-of-experts (MoE) framework designed to enhance task performance while improving interpretability. Our approach incorporates separate parameters and weakly-supervised interaction losses, enabling the mixture of interaction experts to effectively model diverse interactions between modalities. To further enhance interpretability, we introduce a re-weighting model that assigns importance scores to each interaction expert, providing insights into decision-making at both local (sample-level) and global (dataset-level) scales. $\mathsf{I}^2\mathsf{M}\circ \mathsf{E}$ is backbone-agnostic and can be seamlessly integrated with any modality fusion approach. We evaluate the effectiveness of $\mathsf{I}^2\mathsf{M}\circ \mathsf{E}$ on two medical datasets and three real-world multimodal datasets, demonstrating its ability to consistently improve performance while offering interpretable insights into the model's decision-making process for individual samples. + +Our contributions are summarized as follows: + +$\star$ We introduce $\mathsf{I}^{2}\mathsf{MoE}$ , a novel mixture-of-experts framework designed to explicitly model diverse modality interactions through specialized parameters and weakly-supervised interaction losses, enabling a more + +nuanced understanding of multimodal data. + +$\star$ We enhance interpretability by providing both sample-level and dataset-level insights into model decisions, offering a deeper understanding of how interaction experts contribute to predictions. +$\star$ $\mathsf{I}^{2}\mathsf{MOE}$ is highly flexible and can be seamlessly integrated with existing modality fusion methods, demonstrating its versatility in improving vanilla multimodal fusion backbones. +$\star$ Extensive experiments on five diverse real-world multimodal datasets validate the efficacy of $\mathsf{I}^2\mathsf{M}\mathsf{O}\mathsf{E}$ , showcasing significant performance improvements (up to $5.5\%$ in accuracy) and interpretability benefits over vanilla modality fusion methods. + +# 2. Related Work + +Modality Interaction is theoretically grounded in the Partial Information Decomposition (PID) framework (Liang et al., 2023), which analyzes heterogeneous interactions but lacks an end-to-end learning framework. Prior works attempt to model interactions but are either restricted to specific interaction types (Zhang et al., 2023; Kim et al.), fail to quantify interactions in the data (Wörtwein et al., 2024; Liang et al., 2024; Long et al., 2024; Dufumier et al., 2024), or are limited to only two modalities (Wörtwein et al., 2022; Fan et al., 2024). Our approach bridges this gap by directly modeling and quantifying modality interactions within a unified MoE-based fusion architecture, enabling effective and interpretable multimodal learning. + +Multimodal Fusion integrates data from multiple sources to enhance prediction tasks. Existing methods often rely on concatenating input modalities using off-the-shelf architectures (Liu et al., 2018; Tsai et al., 2019; Xue & Marculescu, 2023; Shazeer et al., 2017; Fedus et al., 2022). Mixture-of-Experts (MoE) offers a natural architecture for modeling interactions via expert specialization (Jacobs et al., 1991; Chen et al., 1999; Yuksel et al., 2012). Several recent works (Mustafa et al., 2022; Lin et al., 2024; Yu et al., 2024) explore MoE for multimodal learning. Among them, only MMoE (Yu et al., 2024) explicitly models different types of modality interactions by using a mixture of interaction experts on sentiment analysis. However, MMoE treats modality interaction modeling as a preprocessing step rather than integrating it into an end-to-end learning framework, limiting flexibility and interpretability. + +Multimodal Interpretation has gained traction as researchers seek to explain decision-making in multimodal AI systems. Prior studies either focus on isolating the effect of individual modalities while overlooking inter-modal interactions (Ismail et al., 2022; Ghosh et al., 2023; Swamy et al., 2024b), provide human-interpretable rationales but + +fail to quantify interaction contributions (Park et al., 2018; Zadeh et al., 2018; Dominici et al., 2023), or lack explicit categorization of interaction types (Tsai et al., 2020; Chefer et al., 2021; Lyu et al., 2022; Liang et al., 2022a; Wenderoth et al., 2024). As no prior work has explored interpretation from a modality interaction perspective, our contribution is to systematically quantify multimodal interactions while maintaining interpretability. + +# 3. Interpretable Multimodal Interaction-aware Mixture-of-Experts + +# 3.1. Preliminary and Notation + +Problem Setup. Let $\mathcal{M} = \{\mathbf{m}_1, \mathbf{m}_2, \dots, \mathbf{m}_n\}$ denote a set of $n$ input data modalities, and let $\mathbf{y}$ represent the target variable for a given task. For classification tasks, $\mathbf{y}$ is expressed as a one-hot encoded vector corresponding to the class label. For regression tasks, $\mathbf{y}$ is a real-valued scalar. The objective is twofold: (1) to improve the performance of predicting the ground truth target $\mathbf{y}$ by effectively modeling the interactions between modalities in $\mathcal{M}$ , and (2) to provide meaningful interpretations of these multimodal interactions. + +Vanilla multimodal fusion (Figure 2(a)) utilizes modality-specific encoders $\mathcal{E} = \{\mathrm{E}_1,\mathrm{E}_2,\dots ,\mathrm{E}_n\}$ to process $\mathcal{M}$ and obtain latent embeddings $\mathcal{L} = \{\mathbf{e}_1,\mathbf{e}_2,\ldots ,\mathbf{e}_n\}$ , where each embedding is computed as $\mathbf{e}_i = \mathrm{E}_i(\mathbf{m}_i)$ for $i\in \{1,\dots ,n\}$ . We define the fusion method as F, which operates on the set of latent embeddings $\mathcal{L}$ and produces a fused embedding $\mathbf{x}$ , expressed as: $\mathrm{F}(\mathcal{L}) = \mathbf{x}$ . A prediction head H maps the fused embedding to the final prediction, expressed as: $\mathrm{H}(\mathbf{x}) = \hat{y}$ . However, this naive modality fusion approach does not explicitly account for the heterogeneous interactions present between $\mathcal{M}$ . + +# 3.2. Algorithm Overview of $\mathsf{I}^2\mathsf{MoE}$ Framework + +$\mathsf{I}^{2}\mathsf{M}\circ \mathsf{E}$ is a mixture of interaction experts, where each expert specializes in modeling a specific type of multimodal interaction. The predictions from individual interaction experts are weighted by a re-weighting model to produce the final prediction. During the training phase, we first perform a forward pass using the intact input of all modalities to estimate the multimodal prediction. Next, additional forward passes are conducted, where one modality is replaced by a random vector in each pass. These perturbed inputs serve as weak supervision signals to help train the interaction experts to specialize in different types of modality interactions. We designed a dual-objective loss, encouraging the interaction experts to specialize effectively without degrading task performance. The task loss is calculated using the re-weighted output from the interaction experts with the complete modality input, while the interaction loss is computed from the outputs generated with the perturbed + +modality inputs. During inference, a single forward pass is performed using the complete modality input. The final output is a weighted sum of the interaction expert prediction with the weights produced by the re-weighting model (Equation 1). We provide a detailed explanation of $\mathrm{I}^{2}\mathrm{MOE}$ with two input modalities in Section 3.3, describe its extension to a higher number of modalities in Section 3.4, and explain how to obtain multimodal interaction interpretation in Section 3.5. + +# 3.3. $\mathbf{I}^2\mathbf{M}\mathbf{o}\mathbf{E}$ with Two Input Modalities + +# 3.3.1. $\mathsf{I}^2\mathsf{MOE}$ ARCHITECTURE + +Figure 2(b) illustrates the $\mathbb{T}^{2}\mathrm{MoE}$ architecture for modeling different types of modality interactions in two input modalities. We employ a MoE comprising four fusion models, referred to as interaction experts: $\mathrm{F}_{\mathrm{uni1}}$ , $\mathrm{F}_{\mathrm{uni2}}$ , $\mathrm{F}_{\mathrm{syn}}$ , and $\mathrm{F}_{\mathrm{red}}$ . Each interaction expert specializes in capturing a specific type of interaction: $\mathrm{F}_{\mathrm{uni1}}$ models the unique information contained in modality $\mathbf{m}_1$ ; $\mathrm{F}_{\mathrm{uni2}}$ models the unique information contained in modality $\mathbf{m}_2$ ; $\mathrm{F}_{\mathrm{syn}}$ captures the synergistic information between $\mathbf{m}_1$ and $\mathbf{m}_2$ ; and $\mathrm{F}_{\mathrm{red}}$ models the redundant information between $\mathbf{m}_1$ and $\mathbf{m}_2$ . + +Each interaction expert processes the latent embeddings of the two modalities, $\mathbf{e}_1$ and $\mathbf{e}_2$ , and produces fused embeddings, represented as $\mathbf{x}_i = \mathrm{F}_i(\mathbf{e}_1,\mathbf{e}_2)$ , where $i \in \{\mathrm{uni}1,\mathrm{uni}2,\mathrm{syn},\mathrm{red}\}$ . These fused embeddings are then passed through a prediction head within each interaction expert, generating predictions for the corresponding interaction type as $\hat{\mathbf{y}}_i = \mathrm{H}_i(\mathbf{x}_i)$ , where $i \in \{\mathrm{uni}1,\mathrm{uni}2,\mathrm{syn},\mathrm{red}\}$ . To combine the predictions from the four interaction experts, we introduce a re-weighting model W, which assigns importance scores to the predictions of each expert. The model W takes the latent embeddings $\mathbf{e}_1$ and $\mathbf{e}_2$ as inputs and outputs a set of soft weights: $\mathrm{W}(\mathbf{e}_1,\mathbf{e}_2) = [w_{\mathrm{uni}1},w_{\mathrm{uni}2},w_{\mathrm{syn}},w_{\mathrm{red}}]$ . The final prediction is obtained by combining the predictions from all experts using these weights, expressed as: + +$$ +\hat {\mathbf {y}} = \sum_ {i} w _ {i} \cdot \hat {\mathbf {y}} _ {i}, \quad i \in \{\text {u n i 1 , u n i 2 , s y n , r e d} \}. \tag {1} +$$ + +# 3.3.2. $\mathsf{I}^2\mathsf{MOE}$ LEARNING OBJECTIVE + +The loss function consists of two components. The first component is the task loss, which encourages the predictions of $\mathsf{I}^2\mathsf{MoE}$ , $\hat{\mathbf{y}}$ , to closely match the ground truth target $\mathbf{y}$ . The second component, termed the interaction loss, ensures that the initially identical fusion models within $\mathsf{I}^2\mathsf{MoE}$ specialize into interaction experts by capturing diverse interactions in the dataset. + +Following Yu et al. (2024), we characterize interaction types by comparing unimodal and multimodal predictions: predictions made using only the first modality $(\mathbf{y}_1)$ , predictions + +![](images/a088d397f293e217ad81f1ae44ca720551e71727b0da27b56ba0839d63ad949d.jpg) +Figure 2. Comparison between vanilla modality fusion and $\mathbb{I}^{2}\mathsf{M}\mathsf{O}\mathsf{E}$ in the case of movie genre classification with two input modalities. Left: Existing modality fusion approaches typically use the same parameters to model all types of interactions between the two modalities. Right: In contrast, we design a mixture-of-experts framework that employs four different interaction experts and a re-weighting model to explicitly capture heterogeneous interactions between the two input modalities. + +made using only the second modality $(\mathbf{y}_2)$ , and predictions made using both modalities $(\mathbf{y}_{12})$ . For interactions emphasizing the uniqueness of the first modality, the relationships are defined as $\mathbf{y}_{12} = \mathbf{y}_1$ and $\mathbf{y}_{12} \neq \mathbf{y}_2$ . Similarly, for interactions emphasizing the uniqueness of the second modality, we have $\mathbf{y}_{12} = \mathbf{y}_2$ and $\mathbf{y}_{12} \neq \mathbf{y}_1$ . For synergistic interactions, the condition is $\mathbf{y}_{12} \neq \mathbf{y}_1$ and $\mathbf{y}_{12} \neq \mathbf{y}_2$ . For redundant interactions, the relationship is $\mathbf{y}_{12} = \mathbf{y}_1 = \mathbf{y}_2$ . + +To approximate the interaction loss, we simulate the unimodal scenario by replacing one of the modalities with a random vector. For each interaction expert, a unimodal prediction using only the first modality can be obtained by replacing the latent embedding of the second modality with a random vector $\mathbf{r}$ , represented as: + +$$ +\hat {\mathbf {y}} _ {- 2, i} = \mathrm {H} _ {i} \left(\mathrm {F} _ {i} \left(\mathrm {E} _ {1} \left(\mathbf {x} _ {1}\right), \mathbf {r}\right)\right), \tag {2} +$$ + +where $i \in \{\mathrm{uni1}, \mathrm{uni2}, \mathrm{syn}, \mathrm{red}\}$ . Similarly, a unimodal prediction using only the second modality can be generated by replacing the latent embedding of the first modality with $\mathbf{r}$ , expressed as: + +$$ +\hat {\mathbf {y}} _ {- 1, i} = \mathrm {H} _ {i} \left(\mathrm {F} _ {i} (\mathbf {r}, \mathrm {E} _ {2} (\mathbf {x} _ {2}))\right), \tag {3} +$$ + +where $i\in \{\mathrm{uni1, uni2, syn, red}\}$ + +We designed a general framework to approximate different types of modality interactions. In all cases, the output using the complete multimodal input, $\hat{\mathbf{y}}_{12}$ , serves as the anchor. For the $\mathrm{F}_{\mathrm{uni}1}$ , the output with modality 2 masked, $\hat{\mathbf{y}}_{-2}$ , is + +treated as a positive example, while the output with modality 1 masked, $\hat{\mathbf{y}}_{-1}$ , is treated as a negative example. The objective is to encourage $\hat{\mathbf{y}}_{12}$ to be maximally similar to $\hat{\mathbf{y}}_{-2}$ and maximally different from $\hat{\mathbf{y}}_{-1}$ , since $\mathrm{F}_{\mathrm{uni}1}$ models the uniqueness information presented in $\mathbf{m}_1$ . For the $\mathrm{F}_{\mathrm{uni}2}$ , $\hat{\mathbf{y}}_{-2}$ is treated as a negative example, while $\hat{\mathbf{y}}_{-1}$ is treated as a positive example. Here, the objective is to encourage $\hat{\mathbf{y}}_{12}$ to be maximally similar to $\hat{\mathbf{y}}_{-1}$ and maximally different from $\hat{\mathbf{y}}_{-2}$ , since $\mathrm{F}_{\mathrm{uni}2}$ models the uniqueness information presented in $\mathbf{m}_2$ . For the $\mathrm{F}_{\mathrm{syn}}$ , $\hat{\mathbf{y}}_{-1}$ and $\hat{\mathbf{y}}_{-2}$ are both treated as negative examples. The objective is to ensure that $\hat{\mathbf{y}}_{12}$ is maximally different from both $\hat{\mathbf{y}}_{-2}$ and $\hat{\mathbf{y}}_{-1}$ , capturing interactions that require the combination of both modalities. For the $\mathrm{F}_{\mathrm{red}}$ , $\hat{\mathbf{y}}_{-1}$ , and $\hat{\mathbf{y}}_{-2}$ are treated as positive examples. The goal is to encourage $\hat{\mathbf{y}}_{12}$ , $\hat{\mathbf{y}}_{-2}$ , and $\hat{\mathbf{y}}_{-1}$ to be as similar as possible, modeling information shared between the modalities. We discuss the connection between the proposed interaction loss and the PID formulation in Appendix A and present empirical evidence supporting the design choice of random vector masking, in Appendix B. + +# 3.4. Extend $\mathbf{I}^2\mathbf{MoE}$ to Higher Number of Modalities + +Increase Uniqueness Interaction Experts. To extend $\mathsf{I}^2\mathsf{MoE}$ to support more than two input modalities, we increase the number of interaction experts to the $|\mathcal{M}| + 2$ . Instead of a combinatorial explosion in the number of interaction experts, as the number of input modalities grows, we define $m$ uniqueness interaction experts, one for each input + +Algorithm 1 Training and Inference of $\mathsf{I}^2\mathsf{M}\mathsf{O}\mathsf{E}$ +Require: Modalities $X_{1},\ldots ,X_{n}$ , label $T$ +Require: Modality-specific Encoders $\{\mathrm{Enc}_i\}_{i = 1}^n$ +Require: Experts $\{F_i\}_{i = 1}^E$ , reweighting module $W$ +Require: Expert loss functions $\{\mathrm{InteractionLoss}_i\}_{i = 1}^E$ // Training with masked modality input +1: Encode modalities: $Z_{i}\gets \mathrm{Enc}_{i}(X_{i})$ for $i = 1,\dots ,n$ +2: for $i = 1$ to $E$ do +3: $[\hat{y}_i^{(0)},\dots ,\hat{y}_i^{(n)}]\gets F_i^{\mathrm{multi}}(Z_1,\dots ,Z_n)$ +4: $L_{\mathrm{int}}^i\gets \mathrm{InteractionLoss}_i(\hat{y}_i^{(0)},\hat{y}_i^{(1:n)})$ +5: end for +6: $[w_{1},\dots ,w_{E}]\gets W(Z_{1},\dots ,Z_{n})$ +7: $\hat{y}\gets \sum_{i = 1}^{E}w_{i}\cdot \hat{y}_{i}^{(0)}$ +8: $L_{\mathrm{task}}\gets \ell (\hat{y},T)$ +9: $L_{\mathrm{total}}\gets L_{\mathrm{task}} + \frac{\lambda_{\mathrm{int}}}{E}\sum_{i = 1}^{E}L_{\mathrm{int}}^{i}$ +10: Update model parameters to minimize $L_{\mathrm{total}}$ +11: procedure INFERENCE +12: Encode modalities: $Z_{i}\gets \mathrm{Enc}_{i}(X_{i})$ for $i = 1,\dots ,n$ +13: $\hat{y}_i^{(0)}\gets F_i(Z_1,\dots ,Z_n)$ for $i = 1,\dots ,E$ +14: $[w_1,\dots ,w_E]\gets W(Z_1,\dots ,Z_n)$ +15: $\hat{y}\gets \sum_{i = 1}^{E}w_{i}\cdot \hat{y}_{i}^{(0)}$ +16: Store $\{\hat{y}_i\}$ w, and prediction $\hat{y}$ +17: end procedure + +modality, along with a single synergy expert and a single redundancy expert. Each uniqueness expert, $\mathrm{F}_{\mathrm{uni},i}$ , is responsible for capturing the unique information specific to its corresponding modality, $\mathbf{m}_i \in \mathcal{M}$ , where $i \in \{1, \dots, n\}$ . The synergy expert, $\mathrm{F}_{\mathrm{syn}}$ , focuses on modeling global synergistic interactions across all modalities, while the redundancy expert, $\mathrm{F}_{\mathrm{red}}$ , captures globally redundant information shared among the modalities. + +Modify Interaction loss. For uniqueness expert $i$ , we consider the output of the complete modality as the anchor. The masked modality $i$ serves as a negative example, while all other perturbed inputs are treated as positive examples. This is because the unique information of modality $i$ is lost when the modality embedding is replaced by random vectors. For the synergy interaction loss, we treat all the output of the perturbed modality as negative examples, as input modality perturbations damage the synergistic information. For the redundancy interaction loss, we consider the output of the perturbed modality as a positive example because redundant information remains available even when one modality is masked. For classification tasks, we employed Triplet Margin Loss to model uniqueness interactions. For synergy and redundancy interactions, we utilized Cosine Similarity to capture the relationships between modality outputs. For regression tasks, we used the Mean Squared Error (MSE) Loss to measure differences in predictions. + +$\mathsf{I}^2\mathsf{MoE}$ Algorithm and Complete Objective. We present the training and inference pipeline of $\mathsf{I}^2\mathsf{MoE}$ in Algorithm 1. The complete learning objective is provided in Appendix C. We analyze computational overhead and scalability in + +Appendix D. + +# 3.5. Local and Global Interpretation from $\mathbf{I}^2\mathbf{MoE}$ + +Local interpretation provides insight into the extent to which different interactions contribute to the final prediction for each individual sample, while global interpretation highlights the average trends of interaction importance across the entire dataset. For $\mathbb{I}^{2}\mathrm{MoE}$ , decisions are made locally for each specific input sample by analyzing the prediction, $\hat{\mathbf{y}}_i$ , from each interaction expert $\mathbf{F}_i$ , and the importance coefficients, $\mathbf{w}_i$ , assigned by the MLP-based re-weighting model W. Global interpretation for $\mathbb{I}^{2}\mathrm{MoE}$ can be achieved by calculating the statistics of the importance weights $\mathbf{w}_i$ assigned to each interaction expert across all samples in the test set, thereby capturing the overall trends in feature contributions. + +# 4. Experiment Setup + +Data Collection and Datasets. We evaluate our method on five multimodal datasets, using all available modalities while discarding samples with missing data. Two Medical Multimodal Datasets: ADNI (Weiner et al., 2010; 2017) consists of 2,380 samples for Alzheimer's Disease classification (Dementia, Cognitively Normal, or Mild Cognitive Impairment). It includes four modalities: Image ( $\mathcal{I}$ ), Genetic ( $\mathcal{G}$ ), Clinical ( $\mathcal{C}$ ), and Biospecimen ( $\mathcal{B}$ ). MIMIC-IV (Johnson et al., 2023) is a critical care dataset with 9,003 patient records for one-year mortality prediction (binary classification), utilizing three modalities: Lab ( $\mathcal{L}$ ), Notes ( $\mathcal{N}$ ), and Code ( $\mathcal{C}$ ). Three General Multimodal Datasets: IMDB (Arevalo et al., 2017) includes 25,959 movies for multi-label genre classification across 23 genres, leveraging Image ( $\mathcal{I}$ ) and Language ( $\mathcal{L}$ ) modalities. MOSI (Zadeh et al., 2016) comprises 2,199 annotated YouTube clips for sentiment analysis (regression with scores $\in$ [-3,3] and then map to binary classification), incorporating Vision ( $\mathcal{V}$ ), Audio ( $\mathcal{A}$ ), and Text ( $\mathcal{T}$ ) modalities. ENRICO (Leiva et al., 2020) contains 1,460 Android app screens for UI design classification into 20 categories, featuring two modalities: Screenshot ( $\mathcal{S}$ ) and Wireframe ( $\mathcal{W}$ ). Detailed dataset preprocessing is provided in Appendix E. + +Modality-Specific Encoders and Prediction Heads. The primary objective of our experiments is to evaluate whether the proposed mixture-of-experts framework improves modality fusion. To ensure a fair comparison, we control for variations in modality-specific encoders (E) and prediction models (H) by using the same E and H for both vanilla multimodal fusion and $\mathsf{I}^{2}\mathsf{M}\circ \mathsf{E}$ . For further details on the encoder and classification head configurations, please refer to Appendix F. + +Baseline Fusion Methods. To validate the effectiveness of $\mathsf{I}^2\mathsf{MoE}$ in enhancing multimodal learning, we compare it to various widely used fusion techniques. We begin with fundamental approaches, including early fusion (EF) (Baltrusaitis et al., 2019), late fusion (LF) (Baltrusaitis et al., 2019), low-rank multimodal fusion (LRMF) (Liu et al., 2018), and multimodal transformers (MulT) (Tsai et al., 2019). We then implement more advanced fusion methods, including interpretable conditional computation (InterpretCC) (Swamy et al., 2024a), the Switch Transformer (SwitchGate) (Fedus et al., 2022), and sparse mixture-of-experts $(\mathrm{MoE}++)$ (Jin et al., 2024). In both SwitchGate and $\mathrm{MoE}++$ , the MLP layer in MulT is replaced with a sparse MoE layer that incorporates the respective routing function. + +**Implementations.** The dataset is partitioned into training, validation, and testing sets, with $70\%$ allocated for training, $15\%$ for validation, and the remaining $15\%$ for testing. Each experiment is run three times with different random seeds and the results are averaged. To ensure a fair comparison with other baselines, we utilize the optimal hyperparameter settings provided in the original studies. If a dataset does not have reported optimal parameters, we perform a grid search over the key hyperparameters of the baseline methods. The re-weighting model (W) is implemented as a multilayer perceptron (MLP). For a detailed description of the hyperparameter settings, we refer the reader to Appendix G. + +# 5. Performance and Interpretability of $\mathbf{I}^2\mathbf{MoE}$ + +# 5.1. $\mathbb{I}^2\mathsf{MoE}$ Demonstrates Superior Task Performance + +In Table 1, we compared the performance of $\mathsf{I}^2\mathsf{MoE}$ combining with MulT ( $\mathsf{I}^2\mathsf{MoE}-\mathsf{MulT}$ ) with other vanilla fusion methods across five datasets: 1 Compared to vanilla MulT, $\mathsf{I}^2\mathsf{MoE}$ yields a significant accuracy improvement of $5.5\%$ for ADNI and $3\%$ for MOSI, demonstrating its ability to enhance the performance of existing transformers. + +$\Theta$ Across all datasets, $\mathrm{I}^{2}\mathrm{MoE}$ outperforms advanced baselines such as SwitchGate and $\mathrm{MoE}++$ , with a notable gain of $2.5\%$ accuracy, $1.5\%$ AUROC on ADNI, and $1.4\%$ improvement in Macro F1 for IMDB. These results illustrate the benefit of $\mathrm{I}^{2}\mathrm{MoE}$ in tackling the challenges of modality interaction to achieve superior task performance. + +# 5.2. Generalization Across Different Fusion Methods + +To evaluate the generalizability of $\mathsf{I}^2\mathsf{M}\mathsf{O}\mathsf{E}$ across various fusion backbones, we integrate it with three fusion architectures, including MoE++, SwitchGate, and Interpret-CC, and assess the combined models on all datasets (Table 2): + +For the ADNI dataset, $\mathsf{I}^{2}\mathsf{MoE}$ yields significant performance gains, with up to $5.23\%$ improvement in accuracy and $2.12\%$ in AUROC when combined with SwitchGate. + +On the MIMIC dataset, $\mathsf{I}^{2}\mathsf{M}\mathsf{O}\mathsf{E}$ achieves notable AUROC improvements of $4.43\%$ when combined with Interpret-CC, highlighting its ability to capture complex interaction in multimodal patient data. However, accuracy decreases (- $0.56\%$ to $-11.82\%$ ) are observed, which can be attributed to dataset imbalance. In such cases, the model becomes less overfitted to the majority class, leading to a decrease in accuracy but a corresponding increase in AUROC, reflecting improved performance in distinguishing between classes overall. $\bullet$ $\mathsf{I}^{2}\mathsf{M}\mathsf{O}\mathsf{E}$ consistently enhances multimodal learning, achieving improvements in Micro F1 on IMDB $(2.45\%)$ , sentiment analysis accuracy on MOSI $(4.76\%)$ , and design classification accuracy on ENRICO $(5.14\%)$ when integrated with MoE++ and SwitchGate. Results with different fusion backbones emphasize the generalizability and effectiveness of $\mathsf{I}^{2}\mathsf{M}\mathsf{O}\mathsf{E}$ . + +# 5.3. $\mathbb{I}^2\mathsf{MoE}$ Offers Local Interpretation + +To illustrate the interpretability provided by $\mathsf{I}^{2}\mathsf{MoE}$ on the individual sample level, we present a qualitative example from the IMDB test set where $\mathsf{I}^{2}\mathsf{MoE}-\mathsf{MulT}$ makes a correct prediction (Figure 3). This example showcases how different interaction experts contribute to the final prediction through visualized logits and assigned weights, offering a clear decomposition of the decision-making process. The ground truth genres of this movie include Animation. In Figure 3(a), the logits produced by each interaction expert are shown. Notably, the uniqueness expert for the image modality and the redundancy expert generate positive logits, while the synergy expert yields a negative logit. This aligns with the visual content of the image, which features cartoon characters uniquely contributing to the prediction in Figure 3(d). Figure 3(b) depicts the weights assigned by the reweighting mechanism. Higher weights are given to the uniqueness expert for the image modality and the redundancy expert. As shown in Figure 3(c), the final weighted logits for the Animation genre become positive, enabling the correct prediction. This example demonstrates how $\mathsf{I}^{2}\mathsf{MoE}$ leverages different interaction patterns to make accurate predictions. We provide human evaluation of local interpretation in Appendix H and additional qualitative examples in Appendix I. + +# 5.4. $\mathbf{I}^2\mathbf{M}\mathbf{o}\mathbf{E}$ Enables Global Interpretation + +We analyze the weight assigned by the reweighting model to each interaction expert across all test samples. Figure 4 illustrates the weight variation across datasets, offering insights into dataset-level interaction patterns. The reweighting model demonstrates the ability to adaptively assign distinct weights to interaction experts, reflecting its capacity to capture dataset-specific nuances. In the ADNI dataset, weights are relatively uniform, with a subtle bias toward certain experts, indicating balanced contributions from all inter + +Table 1. Comparison of Accuracy, AUROC, and F1 scores across different fusion methods and datasets. The upper panel lists vanilla fusion methods, while the last row presents the proposed $I^{2}MOE$ framework combined with MulT fusion method. + +
DatasetADNIMIMICIMDBMOSIENRICO
MetricsAccuracyAUROCAccuracyAUROCMicro F1Macro F1AccuracyAccuracy
EF52.01±0.9265.69±1.8167.63±1.6667.75±0.9356.10±0.2741.12±1.0872.16±0.6642.35±0.81
LF50.79±3.1168.60±3.7767.11±1.0667.58±0.8856.22±0.0345.27±0.6470.51±1.1444.20±1.64
LRMF50.79±2.2069.37±3.1370.17±1.7965.45±6.3156.22±0.0345.27±0.6476.63±0.1846.12±1.06
InterpretCC54.53±3.4372.18±1.7072.34±4.4861.93±2.5358.00±0.2348.68±0.1175.85±0.0747.60±1.56
SwitchGate62.28±1.1779.70±0.2070.98±0.8368.26±3.2555.92±0.0747.33±0.4772.35±0.2743.95±2.83
MoE++58.08±2.5275.18±1.9572.51±2.0968.50±2.1358.15±0.3250.49±0.2570.85±0.8347.83±1.86
MulT59.57±0.6677.21±0.5172.42±2.5368.79±3.3459.68±0.1951.41±0.0468.80±0.7847.37±1.82
I2MoE-MulT65.08±1.5281.09±0.0269.78±0.9168.81±0.9961.00±0.4452.38±0.4871.91±2.2048.22±1.61
+ +Table 2. Comparison of metrics across datasets using different fusion methods for ${\mathrm{I}}^{2}\mathrm{{MoE}}$ . Performance improvements are indicated in blue, and decreases are indicated in red. + +
Dataseti2MoE-SwitchGateInterpretCCMoE++
ADNIAccuracy67.51 (5.23)56.02 (1.49)59.01 (0.93)
AUROC81.82 (2.12)73.36 (1.18)75.69 (0.51)
MIMICAccuracy70.42 (-0.56)69.85 (-2.49)60.69 (-11.82)
AUROC69.08 (0.82)66.36 (4.43)69.15 (0.65)
IMDBMicro F157.43 (1.51)58.32 (0.32)60.60 (2.45)
Macro F147.77 (0.44)49.21 (0.53)50.73 (0.24)
MOSIAccuracy73.86 (1.51)76.14 (0.29)75.61 (4.76)
ENRICOAccuracy49.09 (5.14)49.09 (1.49)47.83 (0)
+ +![](images/6b1117bba3c0788fda36e33a28e60ebc932bda9f867cb350aae164a715b53da4.jpg) +(a) + +![](images/0de38ec636ee8950da72791d0cd96a1dbb0febe418dec9fe06cea46bfadadb7c.jpg) +(b) + +![](images/054c66a9e8f69fe2e205760ed9597f89b8259735496927ac86a203aab4855e5e.jpg) +(c) +Figure 3. Qualitative example of local interpretation on the IMDB dataset provided by $\mathrm{I}^2\mathrm{MoE}$ -MulT. Ground truth labels are Comedy, Adventure, Fantasy, Family, and Animation. (a) Logits output by different interaction experts. (b) Weighting assigned by the reweighting model. (c) Contribution of each interaction expert to the final weighted logit. (d) Raw image and language modalities used for prediction. + +![](images/b074ea5a539d0763287fa7a401e30328ab9777a5eda6c3da7b73488b37b52976.jpg) +"When a green ogre named Shrek discovers his swamp has been 'swamped' with all sorts of fairy tale creatures by the scheming Lord Farquad, Shrek sets out with a very loud donkey by his side to persuade Farquad to give Shrek his swamp back..." +(d) + +action experts to the model's performance. Conversely, the MIMIC dataset displays pronounced variability in weight assignments, emphasizing $\mathrm{I}^{2}\mathrm{MoE}$ 's reliance on reweighting + +model to address variance among individual patients. For the IMDB dataset, the weight variation is less pronounced compared to MIMIC, aligning with its more homogeneous characteristics. The MOSI dataset shows evenly distributed weights, reflecting equal contributions from all interaction experts. Finally, the ENRICO dataset demonstrates a concentrated weight distribution with dominant experts for the screenshot modality. + +# 6. In-depth Analysis of $\mathbf{I}^2\mathbf{MoE}$ + +# 6.1. Accuracy of Individual Experts + +To further analyze the effectiveness of $\mathsf{I}^{2}\mathsf{M}\circ \mathsf{E}$ , we compare its task performance against individual interaction experts across different datasets, as shown in Figure 5. The results highlight the following insights: $①$ Across all datasets, the overall performance of $\mathsf{I}^{2}\mathsf{M}\circ \mathsf{E}$ -MulT (red horizontal line) consistently surpasses that of any individual interaction expert expert, with performance gains of $2.2\%$ $1.3\%$ $7.1\%$ $0.6\%$ and $2.6\%$ for ADNI, MIMIC, IMDB, MOSI, and ENRICO, respectively. $\triangleright$ This underscores the advantage of leveraging a mixture-of-experts approach over single-expert methods. $②$ The proposed method exhibits the largest performance gains in datasets with high interaction importance distribution variability, such as MIMIC and ENRICO. While for more uniform datasets like MOSI, the performance of individual experts is closer to that of the overall model, indicating that the ensemble effect may be less pronounced in these cases. $\triangleright$ This suggests that the fusion of multiple experts becomes particularly beneficial in datasets with complex and heterogeneous multimodal interactions. + +# 6.2. Interaction Expert Diversification + +To analyze the diversification of different interaction experts, we evaluate the ratio of expert agreement to disagreement and assess the corresponding accuracy of $\mathsf{I}^{2}\mathsf{MOE}$ . A + +![](images/a6dbbc853668a1f5b36d141dfaf5a6c95585ae3f50a91c258e2094b5cf4a79aa.jpg) +Figure 4. Visualization of interaction weight distributions across all test samples for five datasets. Black bars indicate the median, mean, and extreme values. + +![](images/74b7455c25fd40c0780ad92c48178d1f8a527093a52d7e8fac369662402f0fd9.jpg) + +![](images/ee9ecf82ebf557479a8f8a572fd71cef39458da14189be14dc365a1aa0a7ad6b.jpg) + +![](images/b39b8170a8cd3e7cf92b130478f1ecd751739251f3eb45112b7a4eeee5dedb2c.jpg) + +![](images/bc5fb7ee8ca76984cf70f68537413bd971f6dd8b1502d33a73fcb7651be9b73a.jpg) + +![](images/6c87174f60f7d62c0b7f57d1f37b3953dadf0dea8e045e845330a8733cfc5439.jpg) +Figure 5. Comparison between the task performance of $\mathrm{I}^2\mathrm{MoE}-\mathrm{MulT}$ (red horizontal line) and each individual interaction expert across different datasets. + +![](images/6b5042359c7aee49e02d76abc949b1c3db8887fd110ee8aef87db410b42a82b4.jpg) + +![](images/50227b82f0d9776ced193bb879735d7c02f75ffeec941637d1691c4f54a3c1ac.jpg) + +![](images/a23f9785c5ae0cad321da304aef51fd8fda533fbcd1b120e1dfd46f9db2ecd20.jpg) + +![](images/0810d21899fd82a76cb708775ab1c10aea459fe15700a6b6bbee5d7d61292285.jpg) + +high proportion of disagreement among experts indicates greater diversity, which is essential for capturing distinct interaction patterns. Furthermore, when experts disagree, we expect $\mathbb{I}^{2}\mathrm{MoE}$ to still maintain a high level of accuracy, demonstrating its ability to leverage diverse expert opinions effectively. + +Table 3 presents the proportion of cases where experts disagree or agree, along with the corresponding accuracy of $\mathsf{I}^2\mathsf{MoE}$ across five datasets: 1 For ADNI and MIMIC datasets, the proportion of disagreement among experts is relatively high (81% and 85%, respectively), while $\mathsf{I}^2\mathsf{MoE}$ achieves correct predictions in a substantial portion of these cases. 2 On the IMDB and ENRICO datasets, the proportion of disagreement is very high (99.99% and 98%), yet $\mathsf{I}^2\mathsf{MoE}$ achieves significantly fewer correct predictions when experts disagree (15.85% Correct, 84.14% Wrong and 46.85% Correct, 51.44% Wrong). 3 For the MOSI dataset, the disagreement proportions (59%) highlight moderate diversity among experts. Notably, $\mathsf{I}^2\mathsf{MoE}$ maintains relatively high accuracy when experts disagree (37.80% Correct for MOSI). These results indicate a potential need for better handling of disagreement in complex datasets, and how dataset characteristics influence the diversification and effectiveness of interaction experts. + +# 7. Ablation Studies + +To validate the effectiveness of $\mathsf{I}^2\mathsf{MoE}$ , we perform extensive ablation studies by systematically removing or modifying key components of the model. Each variant is designed to assess the contribution of specific design choices to the overall performance: (1) No-Interaction: The + +Table 3. Interaction experts agreement analysis on test set for all datasets. "Disagree" or "Agree" indicates whether all expert prediction is the same. $\checkmark$ ("Correct") or $X$ ("Incorrect") refers to the correctness of ${\mathrm{I}}^{2}\mathrm{{MoE}}$ ’s prediction. + +
% of DataADNIMIMICIMDBMOSIENRICO
Disagree, √48.7463.5115.8537.8046.85
Disagree,✗32.4021.3984.1421.9751.44
Agree, √16.346.370.0034.111.37
Agree,✗2.528.730.016.120.34
+ +interaction loss is removed, resulting in a simple mixture-of-experts model without explicit encouragement for learning diverse multimodal interaction among experts. (2) Latent-Contrastive: The interaction loss is applied directly to the latent embeddings produced by each interaction expert instead of their outputs. (3) Simple-Weight: The MLP-based reweighting model is replaced by a shared, learnable global weight that does not adapt to individual samples. (4) Less-Forward: Perturbation is reduced by randomly masking only two modalities per sample instead of perturbing all modalities. (5) Synergy-Redundancy: Only synergy and redundancy experts are included, omitting uniqueness experts. + +From Table 7: $①$ No-Interaction: Removing the interaction loss results in significant performance degradation across all datasets (e.g., $-6.35\%$ accuracy on ADNI and $-3.99\%$ AUROC), confirming that explicitly encouraging diversity among experts is crucial for capturing complementary modality interactions. $②$ Latent-Contrastive: Applying the interaction loss to latent embeddings instead of expert outputs causes a noticeable performance drop (e.g., $-6.91\%$ accuracy on ADNI). This highlights the importance of applying the interaction loss at the output level to di + +Table 4. Ablation study results on three datasets (ADNI, MOSI, ENRICO), showing the impact of removing or modifying key components of $\mathsf{I}^2\mathsf{M}\circ \mathsf{E}$ . Each row corresponds to a variant of the model with a specific component ablated. Performance drops (in red) are reported relative to the full model. + +
DatasetADNIMOSIENRICO
AblationAccuracyAUROCAccuracyAccuracy
(1)58.73 (-6.35)77.10 (-3.99)69.49 (-2.42)47.63 (-0.59)
(2)58.17 (-6.91)75.40 (-5.69)69.68 (-2.23)47.50 (-0.72)
(3)59.29 (-5.79)74.55 (-6.54)68.46 (-3.45)47.49 (-0.73)
(4)59.76 (-5.32)76.81 (-4.28)69.89 (-2.02)46.92 (-1.30)
(5)56.77 (-8.31)74.30 (-6.79)70.12 (-1.79)47.49 (-0.73)
+ +Replacing the sample-specific reweighting model with a global weight reduces performance (e.g., $-5.32\%$ accuracy on ADNI and $-1.30\%$ on ENRICO), demonstrating the value of adaptive reweighting for leveraging diverse expert outputs effectively. Less-Forward: Reducing modality perturbations leads to reduced accuracy (e.g., $-5.79\%$ on ADNI and $-3.45\%$ on MOSI). This suggests that generating sufficient negative examples through extensive perturbation is essential for capturing diverse interactions. Synergy-Redundancy: Limiting the experts to only synergy and redundancy results in the largest performance drop (e.g., $-8.31\%$ accuracy on ADNI). This emphasizes the importance of uniqueness experts in modeling comprehensive modality interactions. The ablation study demonstrates that each component of $\mathsf{I}^2\mathsf{M}\circ \mathsf{E}$ is vital for its success. + +# 8. Conclusion + +We introduced $\mathsf{I}^2\mathsf{MoE}$ , a novel MoE framework designed to enhance multimodal task performance and interpretability by explicitly capturing heterogeneous modality interactions. Extensive experiments on five real-world datasets demonstrated the superiority of $\mathsf{I}^2\mathsf{MoE}$ in improving performance across diverse multimodal scenarios. By leveraging a mixture-of-experts design with adaptive reweighting and specialized interaction losses, our approach systematically models and quantifies modality interactions. Additionally, we analyzed the distribution of interaction weights, providing meaningful insights at both the sample and dataset levels, which enhances the interpretability of the model's predictions. We also conducted ablation studies to evaluate the impact of each design component and demonstrated the flexibility of $\mathsf{I}^2\mathsf{MoE}$ to generalize across various fusion methods. For future work, alternative forms of interaction loss could be explored to further improve performance. Additionally, integrating feature attribution methods to analyze the contributions of individual features within interaction experts can offer deeper interpretable insights. + +# Acknowledgements + +This work was supported in part by NIH grants, RF1AG063481, R01AG071174, and U01CA274576. The content is solely the responsibility of the authors and does not necessarily represent the official views of the NIH. We would like to thank the anonymous reviewers for their insightful feedback. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none of which we feel must be specifically highlighted here. + +# References + +Arevalo, J., Solorio, T., Montes-y Gómez, M., and González, F. A. Gated multimodal units for information fusion. arXiv preprint arXiv:1702.01992, 2017. +Baltrusaitis, T., Ahuja, C., and Morency, L.-P. Multimodal machine learning: A survey and taxonomy. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(2):423-443, 2019. URL https://ieeexplore.ieee.org/document/8269806. +Barnum, G., Talukder, S., and Yue, Y. On the benefits of early fusion in multimodal representation learning, 2020. URL https://arxiv.org/abs/2011.07191. +Bertschinger, N., Rauh, J., Olbrich, E., Jost, J., and Ay, N. Quantifying unique information. Entropy, 16(4):2161-2183, 2014. +Chefer, H., Gur, S., and Wolf, L. Generic attention-model explainability for interpreting bi-modal and encoder-decoder transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 397-406, 2021. +Chen, K., Xu, L., and Chi, H. Improved learning algorithms for mixture of experts in multiclass classification. Neural networks, 12(9):1229-1252, 1999. +Dominici, G., Barbiero, P., Magister, L. C., Lio, P., and Simidjievski, N. Sharcs: Shared concept space for explainable multimodal learning. arXiv preprint arXiv:2307.00316, 2023. +Doshi, J., Erus, G., Ou, Y., Resnick, S. M., Gur, R. C., Gur, R. E., Satterthwaite, T. D., Furth, S., Davatzikos, C., Initiative, A. N., et al. Muse: Multi-atlas region segmentation utilizing ensembles of registration algorithms and parameters, and locally optimal atlas selection. Neuroimage, 127:186-195, 2016. + +Dufumier, B., Castillo-Navarro, J., Tuia, D., and Thiran, J.-P. What to align in multimodal contrastive learning? arXiv preprint arXiv:2409.07402, 2024. +Esmaeilzadeh, S., Belivanis, D. I., Pohl, K. M., and Adeli, E. End-to-end alzheimer's disease diagnosis and biomarker identification. In Machine Learning in Medical Imaging: 9th International Workshop, MLMI 2018, Held in conjunction with MICCAI 2018, Granada, Spain, September 16, 2018, Proceedings 9, pp. 337-345. Springer, 2018. +Fan, C., Zhu, K., Tao, J., Yi, G., Xue, J., and Lv, Z. Multilevel contrastive learning: Hierarchical alleviation of heterogeneity in multimodal sentiment analysis. IEEE Transactions on Affective Computing, 2024. +Fedus, W., Zoph, B., and Shazeer, N. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120):1-39, 2022. +Ghosh, S., Yu, K., Arabshahi, F., and Batmanghelich, K. Dividing and conquering a blackbox to a mixture of interpretable models: route, interpret, repeat. In Proceedings of the... International Conference on Machine Learning. International Conference on Machine Learning, volume 202, pp. 11360, 2023. +Goldberger, A. L., Amaral, L. A., Glass, L., Hausdorff, J. M., Ivanov, P. C., Mark, R. G., Mietus, J. E., Moody, G. B., Peng, C.-K., and Stanley, H. E. Physiobank, physi toolkit, and physionet: components of a new research resource for complex physiologic signals. circulation, 101(23): e215-e220, 2000. +Ismail, A. A., Arik, S. Ö., Yoon, J., Taly, A., Feizi, S., and Pfister, T. Interpretable mixture of experts for structured data. arXiv preprint arXiv:2206.02107, 2022. +Jacobs, R. A., Jordan, M. I., Nowlan, S. J., and Hinton, G. E. Adaptive mixtures of local experts. Neural computation, 3(1):79-87, 1991. +Jin, P., Zhu, B., Yuan, L., and Yan, S. Moe++: Accelerating mixture-of-experts methods with zero-computation experts. arXiv preprint arXiv:2410.07348, 2024. +Johnson, A., Bulgarelli, L., Pollard, T., Gow, B., Moody, B., Horng, S., Celi, L., and Mark, R. Mimic-iv (version 3.1). physionet, 2024. +Johnson, A. E., Bulgarelli, L., Shen, L., Gayles, A., Shammout, A., Horng, S., Pollard, T. J., Hao, S., Moody, B., Gow, B., et al. Mimic-iv, a freely accessible electronic health record dataset. Scientific data, 10(1):1, 2023. +Kim, C., van der Schaar, M., and Lee, C. Discovering features with synergistic interactions in multiple views. In + +Forty-first International Conference on Machine Learning. +Kline, A., Wang, H., Li, Y., Dennis, S., Hutch, M., Xu, Z., Wang, F., Cheng, F., and Luo, Y. Multimodal machine learning in precision health: A scoping review. npj Digital Medicine, 5(1):171, 2022. +Leiva, L. A., Hota, A., and Oulasvirta, A. Enrico: A dataset for topic modeling of mobile ui designs. In 22nd International Conference on Human-Computer Interaction with Mobile Devices and Services, pp. 1-4, 2020. +Liang, P. P., Lyu, Y., Fan, X., Wu, Z., Cheng, Y., Wu, J., Chen, L. Y., Wu, P., Lee, M. A., Zhu, Y., et al. Multibench: Multiscale benchmarks for multimodal representation learning. In Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 1), 2021. +Liang, P. P., Lyu, Y., Chhablani, G., Jain, N., Deng, Z., Wang, X., Morency, L.-P., and Salakhutdinov, R. Multiviz: Towards visualizing and understanding multimodal models. arXiv preprint arXiv:2207.00056, 2022a. +Liang, P. P., Zadeh, A., and Morency, L.-P. Foundations and trends in multimodal machine learning: Principles, challenges, and open questions. arXiv preprint arXiv:2209.03430, 2022b. URL https://arxiv.org/abs/2209.03430. +Liang, P. P., Cheng, Y., Fan, X., Ling, C. K., Nie, S., Chen, R., Deng, Z., Allen, N., Auerbach, R., Mahmood, F., Salakhutdinov, R., and Morency, L.-P. Quantifying & modeling multimodal interactions: An information decomposition framework. arXiv preprint arXiv:2302.12247, 2023. URL https://arxiv.org/abs/2302.12247. +Liang, P. P., Deng, Z., Ma, M. Q., Zou, J. Y., Morency, L.-P., and Salakhutdinov, R. Factorized contrastive learning: Going beyond multi-view redundancy. Advances in Neural Information Processing Systems, 36, 2024. +Lin, X. V., Shrivastava, A., Luo, L., Iyer, S., Lewis, M., Ghosh, G., Zettlemoyer, L., and Aghajanyan, A. Moma: Efficient early-fusion pre-training with mixture of modality-aware experts. arXiv preprint arXiv:2407.21770, 2024. +Liu, Z., Shen, Y., Lakshminarasimhan, V. B., Liang, P. P., Zadeh, A., and Morency, L.-P. Efficient low-rank multimodal fusion with modality-specific factors. arXiv preprint arXiv:1806.00064, 2018. +Long, L., Cui, J., Zeng, P., Li, Y., Liu, Y., and Wang, Y. Mugi: Multi-granularity interactions of heterogeneous biomedical data for survival prediction. In International + +Conference on Medical Image Computing and Computer-Assisted Intervention, pp. 490-500. Springer, 2024. +Lv, F., Chen, X., Huang, Y., Duan, L., and Lin, G. Progressive modality reinforcement for human multimodal emotion recognition from unaligned multimodal sequences. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2554-2562, June 2021. +Lyu, Y., Liang, P. P., Deng, Z., Salakhutdinov, R., and Morency, L.-P. Dime: Fine-grained interpretations of multimodal models via disentangled local explanations. In Proceedings of the 2022 AAAI/ACM Conference on AI, Ethics, and Society, pp. 455-467, 2022. +Mustafa, B., Riquelme, C., Puigcerver, J., Jenatton, R., and Houlsby, N. Multimodal contrastive learning with limoe: the language-image mixture of experts. Advances in Neural Information Processing Systems, 35:9564-9576, 2022. +Park, D. H., Hendricks, L. A., Akata, Z., Rohrbach, A., Schiele, B., Darrell, T., and Rohrbach, M. Multimodal explanations: Justifying decisions and pointing to the evidence. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 8779-8788, 2018. +Shazeer, N., Mirhoseini, A., Maziarz, K., Davis, A., Le, Q., Hinton, G., and Dean, J. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017. +Swamy, V., Montariol, S., Blackwell, J., Frej, J. A., Jaggi, M., and Käser, T. Interpretcc: Intrinsic user-centric interpretability through global mixture of experts. arXiv preprint arXiv:2402.02933, 2024a. +Swamy, V., Satayeva, M., Frej, J., Bossy, T., Vogels, T., Jaggi, M., Käser, T., and Hartley, M.-A. Multimodn—multimodal, multi-task, interpretable modular networks. Advances in Neural Information Processing Systems, 36, 2024b. +Teoh, J. R., Dong, J., Zuo, X., Lai, K. W., Hasikin, K., and Wu, X. Advancing healthcare through multimodal data fusion: a comprehensive review of techniques and applications. PeerJ Computer Science, 10:e2298, 2024. +Tsai, Y.-H. H., Bai, S., Liang, P. P., Kolter, J. Z., Morency, L.-P., and Salakhutdinov, R. Multimodal transformer for unaligned multimodal language sequences. In Proceedings of the conference. Association for computational linguistics. Meeting, volume 2019, pp. 6558. NIH Public Access, 2019. + +Tsai, Y.-H. H., Ma, M. Q., Yang, M., Salakhutdinov, R., and Morency, L.-P. Multimodal routing: Improving local and global interpretability of multimodal language analysis. In Proceedings of the Conference on Empirical Methods in Natural Language Processing. Conference on Empirical Methods in Natural Language Processing, volume 2020, pp. 1823. NIH Public Access, 2020. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. nips'17. In Proceedings of the 31st International Conference on Neural Information Processing Systems December, pp. 6000-6010, 2017. +Weiner, M. W., Aisen, P. S., Jack Jr, C. R., Jagust, W. J., Trojanowski, J. Q., Shaw, L., Saykin, A. J., Morris, J. C., Cairns, N., Beckett, L. A., et al. The alzheimer's disease neuroimaging initiative: progress report and future plans. Alzheimer's & Dementia, 6(3):202-211, 2010. +Weiner, M. W., Veitch, D. P., Aisen, P. S., Beckett, L. A., Cairns, N. J., Green, R. C., Harvey, D., Jack Jr, C. R., Jagust, W., Morris, J. C., et al. The alzheimer's disease neuroimaging initiative 3: Continued innovation for clinical trial improvement. Alzheimer's & Dementia, 13(5): 561-571, 2017. +Wenderoth, L., Hemker, K., Simidjievski, N., and Jamnik, M. Measuring cross-modal interactions in multimodal models. arXiv preprint arXiv:2412.15828, 2024. +Wibral, M., Priesemann, V., Kay, J. W., Lizier, J. T., and Phillips, W. A. Partial information decomposition as a unified approach to the specification of neural goal functions. *Brain and cognition*, 112:25–38, 2017. +Williams, P. L. and Beer, R. D. Nonnegative decomposition of multivariate information. arXiv preprint arXiv:1004.2515, 2010. +Wollstadt, P., Schmitt, S., and Wibral, M. A rigorous information-theoretic definition of redundancy and relevancy in feature selection based on (partial) information decomposition. Journal of Machine Learning Research, 24(131):1-44, 2023. +Wörtwein, T., Sheeber, L., Allen, N., Cohn, J., and Morency, L.-P. Beyond additive fusion: Learning non-additive multimodal interactions. In Findings of the Association for Computational Linguistics: EMNLP 2022, pp. 4681-4696, 2022. +Wörtwein, T., Allen, N. B., Cohn, J. F., and Morency, L.-P. Smurf: Statistical modality uniqueness and redundancy factorization. In Proceedings of the 26th International Conference on Multimodal Interaction, pp. 339-349, 2024. + +Xue, Z. and Marculescu, R. Dynamic multimodal fusion, 2023. URL https://arxiv.org/abs/2204.00102. +Yu, H., Qi, Z., Jang, L., Salakhutdinov, R., Morency, L.-P., and Liang, P. P. Mmoe: Enhancing multimodal models with mixtures of multimodal interaction experts. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. 10006-10030, 2024. +Yuksel, S. E., Wilson, J. N., and Gader, P. D. Twenty years of mixture of experts. IEEE Transactions on Neural Networks and Learning Systems, 23(8):1177-1193, 2012. doi: 10.1109/TNNLS.2012.2200299. +Yun, S., Choi, I., Peng, J., Wu, Y., Bao, J., Zhang, Q., Xin, J., Long, Q., and Chen, T. Flex-moe: Modeling arbitrary modality combination via the flexible mixture-of-experts. arXiv preprint arXiv:2410.08245, 2024. +Zadeh, A., Zellers, R., Pincus, E., and Morency, L.-P. Mosi: multimodal corpus of sentiment intensity and subjectivity analysis in online opinion videos. arXiv preprint arXiv:1606.06259, 2016. +Zadeh, A. B., Liang, P. P., Poria, S., Cambria, E., and Morency, L.-P. Multimodal language analysis in the wild: Cmu-mosei dataset and interpretable dynamic fusion graph. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 2236-2246, 2018. +Zhang, Y., Doughty, H., and Snoek, C. Learning unseen modality interaction. Advances in Neural Information Processing Systems, 36:54716-54726, 2023. + +# A. The Connection between Interaction Loss and PID + +We link our perturbation-based losses to components in Partial Information Decomposition (PID), following Bertschinger et al. (2014): + +$$ +I (T; X _ {1}, X _ {2}) = \operatorname {R e d} (T; X _ {1}, X _ {2}) + \operatorname {U n q} (T; X _ {1} \backslash X _ {2}) + \operatorname {U n q} (T; X _ {2} \backslash X _ {1}) + \operatorname {S y n} (T; X _ {1}, X _ {2}) \tag {4} +$$ + +In the two-modality scenario, our model learns four experts, each trained to specialize in a PID component using corrupted modality inputs. + +Unique Information. Experts $F_{\mathrm{uni1}}$ and $F_{\mathrm{uni2}}$ are trained on inputs where the other modality is replaced with noise: + +$$ +\mathcal {L} _ {\mathrm {u n i} 1} = \left\| F _ {\mathrm {u n i} 1} \left(X _ {1}, \tilde {X} _ {2}\right) - T \right\|, \quad \mathcal {L} _ {\mathrm {u n i} 2} = \left\| F _ {\mathrm {u n i} 2} \left(\tilde {X} _ {1}, X _ {2}\right) - T \right\| \tag {5} +$$ + +Assuming $\tilde{X}_i$ contains no task-relevant information, these losses approximate: + +$$ +\mathcal {L} _ {\mathrm {u n i 1}} \propto \operatorname {U n q} (T; X _ {1} \backslash X _ {2}), \quad \mathcal {L} _ {\mathrm {u n i 2}} \propto \operatorname {U n q} (T; X _ {2} \backslash X _ {1}) \tag {6} +$$ + +This aligns with unique information as defined by conditional information under fixed marginals (Bertschinger et al., 2014; Wollstadt et al., 2023). + +Redundant Information. Expert $F_{\mathrm{red}}$ is trained to match predictions from either single-modality input: + +$$ +\mathcal {L} _ {\mathrm {r e d}} = \frac {1}{2} \left(\| F _ {\mathrm {r e d}} \left(X _ {1}, \tilde {X} _ {2}\right) - T \| + \| F _ {\mathrm {r e d}} \left(\tilde {X} _ {1}, X _ {2}\right) - T \|\right) \tag {7} +$$ + +This loss encourages $F_{\mathrm{red}}$ to extract information shared by both $X_{1}$ and $X_{2}$ , approximating: + +$$ +\mathcal {L} _ {\text {r e d}} \propto \operatorname {R e d} (T; X _ {1}, X _ {2}) \tag {8} +$$ + +It aligns with redundancy defined via shared informativeness (Williams & Beer, 2010; Wollstadt et al., 2023). + +Synergistic Information. Expert $F_{\mathrm{syn}}$ is trained to rely on both modalities jointly. It is penalized for performing well on any partial view: + +$$ +\mathcal {L} _ {\mathrm {s y n}} = \frac {1}{2} \left(\| F _ {\mathrm {s y n}} \left(X _ {1}, X _ {2}\right) - T \| - \| F _ {\mathrm {s y n}} \left(\tilde {X} _ {1}, X _ {2}\right) - T \| - \| F _ {\mathrm {s y n}} \left(X _ {1}, \tilde {X} _ {2}\right) - T \|\right) \tag {9} +$$ + +This loss isolates information that emerges only through joint modality interaction: + +$$ +\mathcal {L} _ {\text {s y n}} \propto \operatorname {S y n} (T; X _ {1}, X _ {2}) \tag {10} +$$ + +This formulation reflects the formal synergy component as defined in Williams & Beer (2010); Wibral et al. (2017). + +By explicitly constructing perturbed input views that suppress or preserve specific modality contributions, each expert is trained to model a distinct PID component. This forms a contrastive approximation to the constrained information projections discussed in prior work (Bertschinger et al., 2014; Williams & Beer, 2010). + +# B. Empirical Evidence for the Random Vector Masking + +The use of random vector replacement for modality dropout may appear ad hoc. However, our design is motivated by the need to fully suppress information from the dropped modality during interaction supervision. In contrast, alternatives such as mean or zero vector replacement risk preserving residual signals, which can undermine disentanglement of unique and redundant information pathways. + +This decision is further supported by findings from CoMM (Dufumier et al., 2024), which highlight the regularization benefits and improved robustness of full modality dropout. + +To assess this empirically, we conducted an ablation comparing three masking strategies—random, mean, and zero vector replacements—across five datasets. The results (Table 5) show that random vector masking consistently yields stronger performance on most metrics and tasks. + +Table 5. Performance comparison across different modality masking strategies (Random, Mean, Zero). Metrics: Accuracy (Acc), AUROC, Micro/Macro F1. Numbers are reported as mean ± standard deviation. + +
DatasetADNIMIMICIMDBMOSIENRICO
MetricAcc (3)AUROCAcc (2)AUROCMicro F1 (23)Macro F1 (23)Acc (2)Acc (20)
Random65.08 ± 1.5281.09 ± 0.0269.78 ± 0.9168.81 ± 0.9961.00 ± 0.4452.38 ± 0.4871.91 ± 2.2048.22 ± 1.61
Mean59.85 ± 3.5276.40 ± 2.8470.00 ± 1.2767.96 ± 1.4359.36 ± 0.1450.82 ± 0.4668.95 ± 2.3750.00 ± 1.94
Zero59.48 ± 1.6177.06 ± 0.6069.80 ± 0.9764.62 ± 1.3960.57 ± 0.0751.16 ± 0.7670.41 ± 0.6648.63 ± 1.28
+ +These results support our use of random vector masking as a more effective strategy for isolating and supervising interaction-specific information flow in multimodal learning. + +# C. Complete Training Objective + +Let $\{F_i\}_{i=1}^B$ denote the $B = n + 2$ interaction experts: $n$ uniqueness experts, one synergy expert, and one redundancy expert. For each expert $F_i$ , we obtain outputs from $(1 + n)$ forward passes (one full input and one for each modality replaced): + +$$ +[ \hat {y} _ {i} ^ {(0)}, \hat {y} _ {i} ^ {(1)}, \dots , \hat {y} _ {i} ^ {(n)} ] = F _ {i}. \mathrm {f o r w a r d m u l t i p l e} (X _ {1}, \dots , X _ {n}) +$$ + +The main prediction is computed as: + +$$ +\hat {y} = \sum_ {i = 1} ^ {B} w _ {i} \cdot \hat {y} _ {i} ^ {(0)}, \quad \text {w h e r e} [ w _ {1}, \dots , w _ {B} ] = \mathrm {M L P R e W e i g h t} (X _ {1}, \dots , X _ {n}) +$$ + +The task loss is defined as: + +$$ +\mathcal {L} _ {\text {t a s k}} = \ell (\hat {y}, T) +$$ + +We define the expert-specific interaction losses as follows: + +Uniqueness loss for each $F_{i}$ $(i = 1,\dots ,n)$ + +$$ +\mathcal {L} _ {\mathrm {i n t}} ^ {(i)} = \frac {1}{n - 1} \sum_ {j \neq i} \mathrm {T r i p l e t L o s s} \left(\hat {y} _ {i} ^ {(0)}, \hat {y} _ {i} ^ {(j)}, \hat {y} _ {i} ^ {(i)}\right) +$$ + +Synergy loss $(F_{n + 1})$ + +$$ +\mathcal {L} _ {\mathrm {i n t}} ^ {(n + 1)} = \frac {1}{n} \sum_ {j = 1} ^ {n} \operatorname {C o s S i m} \left(\operatorname {n o r m a l i z e} \left(\hat {y} _ {n + 1} ^ {(0)}\right), \operatorname {n o r m a l i z e} \left(\hat {y} _ {n + 1} ^ {(j)}\right)\right) +$$ + +Redundancy loss $(F_{n + 2})$ : + +$$ +\mathcal {L} _ {\mathrm {i n t}} ^ {(n + 2)} = \frac {1}{n} \sum_ {j = 1} ^ {n} \left(1 - \operatorname {C o s S i m} \left(\operatorname {n o r m a l i z e} \left(\hat {y} _ {n + 2} ^ {(0)}\right), \operatorname {n o r m a l i z e} \left(\hat {y} _ {n + 2} ^ {(j)}\right)\right)\right) +$$ + +We then average the interaction loss over all experts: + +$$ +\mathcal {L} _ {\mathrm {i n t}} = \frac {1}{B} \sum_ {i = 1} ^ {B} \mathcal {L} _ {\mathrm {i n t}} ^ {(i)} +$$ + +The final training objective is: + +$$ +\mathcal {L} _ {\text {t o t a l}} = \mathcal {L} _ {\text {t a s k}} + \lambda_ {\text {i n t}} \cdot \mathcal {L} _ {\text {i n t}} +$$ + +Model parameters are updated to minimize $\mathcal{L}_{\mathrm{total}}$ + +# D. Computational Overhead and Scalability + +In theory, $\mathbb{I}^{2}\mathrm{MOE}$ scales linearly with the number of input modalities. Specifically, the fusion overhead increases by approximately (Numer of modalities $+2$ ) times, corresponding to one uniqueness expert per modality, plus one redundancy and one synergy expert. + +To quantify the overhead of our method, we compare $\mathsf{I}^{2}\mathsf{M}\mathsf{O}\mathsf{E}-\mathsf{M}\mathsf{u}\mathsf{T}$ with the MulT baseline across three key metrics: training time per epoch (in seconds), inference latency (in seconds), and parameter count. As shown in Table 6, $\mathsf{I}^{2}\mathsf{M}\mathsf{O}\mathsf{E}$ introduces moderate increases in compute—roughly proportional to the number of modalities plus two (accounting for synergy and redundancy experts). All experiments were run on a single NVIDIA A100 GPU. Despite this additional cost, the model yields consistent improvements in interpretability and predictive performance, justifying the added overhead. + +Table 6. Comparison of MulT and ${\mathrm{I}}^{2}\mathrm{{MoE}} - \mathrm{{MulT}}$ on training time,inference latency,and model size across datasets. + +
Train / epoch (s)Inference (s)# Params
DatasetModalitiesMulTI2MoE-MulTMulTI2MoE-MulTMulTI2MoE-MulT
ADNII, G, C, B8.98 ± 0.0416.82 ± 0.021.34 ± 0.002.29 ± 0.001,072,1316,696,728
MIMICL, N, C2.24 ± 0.0133.67 ± 0.670.15 ± 0.000.91 ± 0.00268,0341,390,095
IMDBL, I3.62 ± 0.0044.20 ± 0.590.53 ± 0.003.23 ± 0.001,068,5674,423,008
MOSIV, A, T0.70 ± 0.004.47 ± 0.010.09 ± 0.000.48 ± 0.00134,402673,935
ENRICOS, W1.38 ± 0.026.17 ± 0.030.20 ± 0.000.44 ± 0.00538,6442,352,724
+ +# E. Details for Dataset Preprocessing + +We followed the same preprocessing procedure of the ADNI dataset and MIMIC dataset, as described in Flex-MoE (Yun et al., 2024). + +# E.1. Detailed Data Preprocessing in ADNI + +Imaging, Genetic, Biospecimen, Clinical Modalities. The Alzheimer's Disease Initiative (ADNI) is a longitudinal multicenter observational study containing multi-modal data from subjects diagnosed as cognitively normal (CN), mild cognitive impairment (MCI), and Alzheimer's dementia (AD) (Weiner et al., 2010; 2017). In our experiments, we utilized imaging, genetic, biospecimen, and clinical modalities. The imaging data consisted of magnetic resonance images (MRIs) which were preprocessed using field intensity inhomogeneity correction, gray tissue matter segmentation via MUSE (Multiatlas Region Segmentation Utilizing Ensembles of Registration Algorithms and Parameters) (Doshi et al., 2016), and voxel-wise volumetric mapping of tissue regions. The genetic data consisted of SNP (single nucleotide polymorphisms) data from the ADNI 1, GO/2, and 3 studies. These were preprocessed via alignment to a unified reference, followed by aligning strands based on the 1000 Genome Project phase 3, linkage disequilibrium (LD) pruning, and imputation. The resulting data consisted of 144, 746 SNPs. The biospecimen modality included CSF A $\beta$ 1-42 and A $\beta$ 1-40, Total Tau and Phosphorylated Tau, Plasma Neurofilament Light Chain, and ApoE genotype. Clinical data included medical history, neurological exams, patient demographics, medications, and vital signs. Data columns directly containing Alzheimer's Disease diagnosis information were excluded. For both biospecimen and clinical data, numerical data was scaled using a MinMax scalar to a range of -1 to 1, while categorical data was one-hot encoded. Missing values, were imputed using the mean for numerical fields and the mode for categorical fields. + +# E.2. Detailed Data Preprocessing in MIMIC + +Lab, Notes, Codes Modalities. The MIMIC dataset was extracted from the Medical Information Mart for Intensive Care IV (MIMIC-IV) database, which contains de-identified health data for patients who were admitted to either the emergency + +department or stayed in critical care units of the Beth Israel Deaconess Medical Center in Boston, Massachusetts (Johnson et al., 2024; 2023; Goldberger et al., 2000). MIMIC-IV excludes patients under 18 years of age. We take a subset of the MIMIC-IV data, where each patient has at least more than 1 visit in the dataset as this subset corresponds to patients who likely have more serious health conditions. For each datapoint, we extract ICD-9 codes, clinical text, and labs and vital values. Using this data, we perform binary classification on one-year mortality. We drop visits that occur at the same time as the patient's death. + +# F. Details for Modality-specific Encoder and Classification Head + +ADNI Dataset: For the image modality, we employed a customized 3D-CNN (Esmaeilzadeh et al., 2018) with a hidden dimension of 256 as the encoder. For the genomics, clinical, and biospecimen modalities, we used a one-hidden-layer MLP with a hidden dimension of 256 as the encoder. +MIMIC Dataset: For all lab, note, and code modalities, we utilized an LSTM with a hidden dimension of 256 as the encoder. +$\bullet$ MOSI Dataset: A Gated Recurrent Unit (GRU) with a hidden dimension of 256 was used as the encoder for the vision, audio, and text modalities. +ENRICO Dataset: For both the screenshot image and wireframe image modalities, we used VGG11 from the torchvision library with a hidden dimension size of 16 as the encoder. +$\Theta$ IMDB Dataset: For the image modality, a VGG-16 model was applied as the feature extractor. For the language modality, features were extracted using the pretrained Google Word2vec model. Additionally, we employed VGG11 from the torchvision library with a hidden dimension size of 16 as the encoder and used MaxoutLinear unimodal encoders, following current work (Liang et al., 2021). +$\triangleright$ Classification Head: For all models and all datasets, we use a linear classification head to output the corresponding prediction. + +# G. Details for Hyperparameter Setting + +To improve reproducibility, the tables below provide a summary of the hyperparameters used in our experiments. For hyperparameters of other baseline fusion methods, please refer to the scripts in the GitHub repository at https://github.com/Raina-Xin/I2MoE/tree/main/scripts/trainScripts. + +Table 7. Hyperparameter Configuration for ${\mathrm{I}}^{2}\mathrm{{MoE}} - \mathrm{{MulT}}$ on Different Datasets + +
HyperparameterADNIMIMICIMDBMOSIENRICO
Learning Rate (1r)0.00010.00010.00010.00010.0001
Temperature for Reweighting (temperature_rw)122.02.02.0
Hidden Dimension for Reweighting (hidden_dim_rw)256128256256256
Number of Layers in Reweighting (num_layer_rw)22333
Interaction Loss Weight (interaction_loss_weight)0.50.010.50.0050.5
Modality (modality)IGCBLNCLITVASW
Training Epochs (train_epochs)5030403050
Batch Size (batch_size)3232323232
Number of Experts (num_experts)84444
Number of Layers in Encoder (num_layers_enc)11112
Number of Layers in Fusion (num_layers_fus)22212
Number of Layers in Prediction (num_layers_pred)22212
Number of Attention Heads (num_heads)41414
Hidden Dimension (hidden_dim)256128256256256
Number of Patches (num_patches)168448
+ +Table 8. Hyperparameter Configuration for ${\mathrm{I}}^{2}\mathrm{{MoE}}$ -SwitchGate on Different Datasets + +
HyperparameterADNIMIMICIMDBMOSIENRICO
Learning Rate (1r)0.00010.00010.00010.00010.0001
Temperature for Reweighting (temperature_rw)222.02.01
Hidden Dimension for Reweighting (hidden_dim_rw)256256256128128
Number of Layers in Reweighting (num_layer_rw)22213
Interaction Loss Weight (interaction_loss_weight)0.010.50.50.0010.01
Modality (modality)IGCBLNCLITVASW
Training Epochs (train_epochs)3030405030
Batch Size (batch_size)86464328
Number of Experts (num_experts)16161644
Number of Layers in Encoder (num_layers_enc)22211
Number of Layers in Fusion (num_layers_fus)22211
Number of Layers in Prediction (num_layers_pred)22211
Number of Attention Heads (num_heads)44442
Hidden Dimension (hidden_dim)128256128128128
Number of Patches (num_patches)8164164
+ +Table 9. Hyperparameter Configuration for ${\mathrm{I}}^{2}\mathrm{{MoE}}$ -InterpretCC on Different Datasets + +
HyperparameterADNIMIMICIMDBMOSIENRICO
Learning Rate (1r)0.00010.00010.00010.00010.0001
Temperature for Reweighting (temperature_rw)222.01.54.0
Hidden Dimension for Reweighting (hidden_dim_rw)128128256256256
Number of Layers in Reweighting (num_layer_rw)22322
Interaction Loss Weight (interaction_loss_weight)0.50.10.010.0010.5
Modality (modality)IGCBLNCLITVASW
Tau (τ)1.00.71.01.00.5
Threshold (threshold)0.50.50.60.60.4
Train Epochs (train_epochs)3050405060
Batch Size (batch_size)32128323264
Hidden Dimension (hidden_dim)128256256128256
Hard (hard)TrueTrueTrueTrueTrue
+ +Table 10. Hyperparameter Configuration for ${\mathrm{I}}^{2}\mathrm{{MoE}} - \mathrm{{MoE}} + +$ on Different Datasets + +
HyperparameterADNIMIMICIMDBMOSIENRICO
Learning Rate (1r)0.00010.00010.00010.00010.0001
Temperature for Reweighting (temperature_rw)211.021
Hidden Dimension for Reweighting (hidden_dim_rw)256256256128256
Number of Layers in Reweighting (num_layer_rw)32222
Interaction Loss Weight (interaction_loss_weight)0.50.50.50.0010.5
Modality (modality)IGCBLNCLITVASW
Training Epochs (train_epochs)5030405050
Batch Size (batch_size)6432323232
Number of Experts (num_experts)84488
Number of Layers in Encoder (num_layers_enc)22222
Number of Layers in Fusion (num_layers_fus)22212
Number of Layers in Prediction (num_layers_pred)22222
Number of Attention Heads (num_heads)44444
Hidden Dimension (hidden_dim)2561282566464
Number of Patches (num_patches)84844
+ +# H. Human Evaluation for Local Interpretation + +To strengthen evidence for the local interpretability of our model, we conducted a human evaluation study involving 15 participants. Each participant was shown 20 movie examples, resulting in a total of 300 interaction expert weight evaluations. Participants were asked to assess how reasonable the model's assigned expert weights were, choosing from a 5-point Likert scale: "Completely makes sense," "Mostly makes sense," "Neutral," "Makes little sense," and "Makes no sense at all." + +Overall, $70.4\%$ of responses were positive (i.e., "Mostly makes sense" or "Completely makes sense"), while only $9\%$ were negative. Notably, just $0.7\%$ of ratings selected the lowest option. These results suggest that the model's expert weight assignments are broadly viewed as reasonable and interpretable by human evaluators. + +The questionnaire and de-identified responses are available at https://github.com/Raina-Xin/I2MoE/tree/main/ assets/human_eval + +Table 11. Distribution of human ratings for local interaction expert weights ( $n = 300$ ). + +
Response OptionPercentage of Responses
Completely makes sense19.4%
Mostly makes sense51.0%
Neutral19.7%
Makes little sense9.0%
Makes no sense at all0.7%
+ +# I. More Qualitative Examples for Local Interpretation + +We present a comprehensive visualization of all 23 classes in the IMDB dataset, illustrating local interpretability for individual examples. All examples are correctly predicted by $\mathsf{I}^{2}\mathsf{M}\circ \mathsf{E}$ + +![](images/bfb58dff1944a36151e0a2817a199bf1275da86ad1d6cac1923cb05c83017e51.jpg) + +![](images/4d8c88be8c347160221474323a2d283f0890a28732907f33d88d7b3430ad8624.jpg) +The Care Bears live in a country high in the clouds, where they have a lot of fun together. But they also do care for the human children on Earth, who they watch through huge telescopes from the sky, and come to help whenever there is need. Nikolas, a magician's apprentice, is in danger of getting under the influence of a bad spirit, which resides in an ancient spell book. The siblings Kim and Jason don't trust anyone anymore after being disappointed once too often. The Care Bears take them into their wonderland where they experience exciting and dangerous adventures together and quickly become good friends. + +![](images/babf048ff8626e744c03a74a7cf7c600ebc2293ff1ef64fd205471a8ef71e17a.jpg) + +![](images/f5d432fce5d35696a56b300347916a44a2a5936596972479aca3777030a40e02.jpg) +Figure 6. IMDB example (ID: 0088885). + +![](images/349c3d48e5efa1784a807ae875fc352bd25aae15e17ee51245d97fcbcb538280.jpg) + +![](images/898d0eb8662c396810fca1c634d3d5cf1ce204e006a57796e22288b8260d6820.jpg) + +![](images/18459fd30214490b865a30b5213d7492230b72a4e55257a3dc881297305733e1.jpg) +The history of the first victim of modern artillery and its moving agony, amidst conspiracies and betrayals of the powerful. Life and death of Giovanni De' Medici, a young brave captain in the war of Charles V against the Pope, in the first half of 1500. + +![](images/4940ca5b779eb737d485aaa55be8282a483ae7249581cf85276a763e7511d13b.jpg) + +![](images/75be291ef3d32f4e48139821e7b9bfb7d39d4f4c4d851be8bb9dba4e6a688c21.jpg) +Figure 7. IMDB example (ID: 0245276). + +![](images/3f505e65c7f99251aaa10ed38b11b07dfc7d34632d013365842f6d49c7d2be28.jpg) + +![](images/ee7e90d72b1422dac62c5a526b277da790cdacf1178320e74cd1dabe09c55990.jpg) + +![](images/646ce9306d510c6ccd0737a7cede70f2457910c0059fd57ae946d95d46daf087.jpg) +When Haseem arrives at Aladdin's home pretending to be his lost uncle, he brings the boy to a magical place which hides the entrance to a dangerous underground cave. There, Haseem asks of Aladdin to find but one simple oil lamp which contains a genie. As stubborn as he is, Aladdin refuses to come outside of the cave with the lamp and eventually discovers its secret. A genie inside the lamp then helps his life change and marry his true love. + +![](images/d6ee4752b45c7ab92f1ff732a4d237556914847bee3af189dbf6be2eb99fd166.jpg) + +![](images/ac8e3535c3179f578932ba44337ebe7e13b09a58536079792325c36633e3d0d8.jpg) +Figure 8. IMDB example (ID: 0827990). + +![](images/a406f2c5ff4ce24b08a141e42178fcb7ca6f4a434696db9f5e62ba1bded1a740.jpg) \ No newline at end of file diff --git a/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/images.zip b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..050cb304088c4f9439583acde2578e8000ef6bd4 --- /dev/null +++ b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:741d1009c354022667f24c92a7a1a110918f238b69f0cdbeb8af2ddd4dc118fe +size 1343529 diff --git a/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/layout.json b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a69b6dd5b3f49b8311ef6bda76f5f747395e641b --- /dev/null +++ b/texttti2moeinterpretablemultimodalinteractionawaremixtureofexperts/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5690c02ec67489b7ec6188a28a6e7c19048b61ab54697a6432630455d48ca1c2 +size 778104 diff --git a/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/280d515d-d106-42b4-8125-041403c18d40_content_list.json b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/280d515d-d106-42b4-8125-041403c18d40_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..68b7a44d5d85b46271b79dfe3be4a1d736334f98 --- /dev/null +++ b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/280d515d-d106-42b4-8125-041403c18d40_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9fe723f8f62a888ef186dab1b57b639acfc773002e10752c5c8fe9a6b1037a0 +size 121204 diff --git a/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/280d515d-d106-42b4-8125-041403c18d40_model.json b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/280d515d-d106-42b4-8125-041403c18d40_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4ec514fd2a69e95e9fb11232ce79e8a504771423 --- /dev/null +++ b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/280d515d-d106-42b4-8125-041403c18d40_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2acbf0c865fcf174097e3310f2dcfda04598e5bd0256ca1a0ba21c95b5d4ff7d +size 148282 diff --git a/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/280d515d-d106-42b4-8125-041403c18d40_origin.pdf b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/280d515d-d106-42b4-8125-041403c18d40_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0d2fbfb892bbdebcebec2433ff66afd202b513f8 --- /dev/null +++ b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/280d515d-d106-42b4-8125-041403c18d40_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1eb55b86d08fa732302a054617c78673d059502de064db26f9043436df61b535 +size 1877008 diff --git a/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/full.md b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..00fae56402550461310dd9115e16308edbb32568 --- /dev/null +++ b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/full.md @@ -0,0 +1,571 @@ +# $\infty$ -VIDEO: A Training-Free Approach to Long Video Understanding via Continuous-Time Memory Consolidation + +Saul Santos $^{12}$ António Farinhas $^{12}$ Daniel C. McNamee $^{3}$ André F. T. Martins $^{1245}$ + +# Abstract + +Current video-language models struggle with long-video understanding due to limited context lengths and reliance on sparse frame subsampling, often leading to information loss. This paper introduces $\infty$ -VIDEO, which can process arbitrarily long videos through a continuous-time long-term memory (LTM) consolidation mechanism. Our framework augments video Q-formers by allowing them to process unbounded video contexts efficiently and without requiring additional training. Through continuous attention, our approach dynamically allocates higher granularity to the most relevant video segments, forming "sticky" memories that evolve over time. Experiments with Video-LLaMA and VideoChat2 demonstrate improved performance in video question-answering tasks, showcasing the potential of continuous-time LTM mechanisms to enable scalable and training-free comprehension of long videos. + +# 1. Introduction + +Multimodal large language models have driven progress in video-language tasks through the integration of pretrained visual encoders with powerful text-based models (Li et al., 2023b; Zhang et al., 2023b; Cheng et al., 2024; Li et al., 2024). However, current video models are constrained by short context lengths (Li et al., 2023b; Maaz et al., 2024; Liu et al., 2023) and often rely on sparse frame subsampling for longer sequences, which limits their ability to fully process and understand long videos. This contrasts with the high-capacity persistence of human memory (Brady et al., 2008) and the cognitive principles by which humans store information over long timescales, which involve consoli- + +$^{1}$ Instituto de Telecomunicações $^{2}$ Instituto Superior Técnico, Universidade de Lisboa $^{3}$ Champalimaud Research $^{4}$ ELLIS Unit Lisbon $^{5}$ Unbabel. Correspondence to: Saul Santos . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +dition processes adaptively integrating important episodic events into long-term memory (McGaug, 2013; Cowan et al., 2021). How can we ensure models are able to fully understand and grasp information from arbitrarily long videos while they process them without losing critical details? + +Transformers offer significant potential for extracting spatiotemporal features from videos (Zhang et al., 2023b; Li et al., 2024). While recent video-language models have prioritized simpler methods such as projection layers (Li et al., 2023d; Liu et al., 2023; Li et al., 2023b; Liu et al., 2024c; Ye et al., 2024) and temporal pooling (Luo et al., 2023; Maaz et al., 2024) for the sake of efficiency and scalability, these approaches often sacrifice transformer's representational depth. Additionally, training video-language models presents significant difficulties, whereas traditional approaches mainly focus on scaling model parameters (Liu et al., 2024c; Cheng et al., 2024; Li et al., 2024), which requires substantial computational resources. A recent alternative explored the usage of additional computation during inference (Zhang et al., 2023a; Wang et al., 2024a;c). However, these methods assume that the spatio-temporal module is intrinsic to the LLM, which limits their ability to effectively specialize in capturing spatio-temporal content. Furthermore, these methods often rely on subsampling and are designed to process the entire video whenever they need to answer a question. + +In this paper, we take an alternative approach inspired by human cognition, where memory consolidation processes enable the retention and efficient handling of long-term dependencies (Frankland & Bontempi, 2005; Preston & Eichenbaum, 2013; Song et al., 2023; 2024; Balazevic et al., 2024). Namely, we develop a new framework with continuous-time visual memory representations. Our framework adapts the $\infty$ -former architecture previously developed for textual data (Martins et al., 2020; 2022b), which we leverage to extend the capabilities of pre-trained short-context multimodal LLMs, making them able to process unbounded video contexts in a training-free manner. Shifting from a discrete to a continuous attention framework parallels the recent evolution in theories of human working memory mediated by prefrontal cortex—from the discrete "slot-based" model to the continuous "shared resource" approach (Ma et al., 2014). Consequently, our method aims to cultivate + +![](images/62f9a4adfd328ab26d2ef920e26254e1b372b8a14699724cd47cb2f4c03cf6c6.jpg) +Figure 1. (Left) Overview of $\infty$ -VIDEO (our approach) using Video LLaMA (Zhang et al., 2023b, gray arrows), which uses an additional spatial Q-former module, and VideoChat2 (Li et al., 2024, black arrows). We split the video into frame chunks and apply these models to each chunk. The Video Q-former module combines a weighted average of the STM, which is the attention for an individual chunk, with a continuous LTM that takes into account previous chunks. The outputs of the Video Q-Former are projected and then averaged. The LLM takes as input visual tokens, generated by our modified video Q-former, alongside the corresponding question to obtain the answer. (Right) Examples of $\infty$ -Video LLaMA answers, equipped with our LTM, with uniform sampling and sticky memories for short and ultra-long videos. Italicized corresponds to the correct answer, while underlined corresponds to a wrong answer or hallucination. + +![](images/a439a0a3438a70508d3fc70b7796966536c9d3508ef279291ae15954009bc185.jpg) + +similar insights within the realm of episodic memory processing, where dynamic handling of memory is essential. This leads to $\infty$ -VIDEO models (Fig. 1), which are able to process and organize information as it comes, with only one pass over the video. Our main contributions are: + +- We equip the current attention mechanism of video Q-formers (short-term memory, STM) with a continuous-time LTM that consolidates video information by dynamically allocating higher granularity to the most relevant parts of a video. +- We develop a new continuous-time attention mechanism which is more powerful than the Gaussian model of Martins et al. (2022b) by considering the Gibbs density based on the continuous query-key similarity function. +- We show that architectures with spatio-temporal feature extractors designed for short videos can generalize to long-video understanding in a simple, training-free manner without requiring task-specific fine-tuning or training on + +long-video datasets. + +- We validate our approach using the Video-LLaMA (Zhang et al., 2023b) and VideoChat2 (Li et al., 2024) models by processing a stream of video frames with a single pass, where the STM considers one chunk at the time, and the LTM maintains global information from past chunks. Our proposed model shows improved performance on video question-answering tasks when using the LTM and competitive results with other training-free models. + +# 2. Background + +# 2.1. Discrete Attention + +Attention mechanisms (Bahdanau et al., 2015) act as a memory component in modern neural networks, enabling them to dynamically focus on key parts of the input and capture long-range dependencies, improving performance across various tasks (Vaswani et al., 2017; Dosovitskiy et al., 2021). + +Consider two sequences $\mathbf{X} \in \mathbb{R}^{L \times e}$ and $\mathbf{Y} \in \mathbb{R}^{R \times e}$ , where $L$ and $R$ are the sequence lengths and $e$ is the embedding size. A vanilla attention mechanism in a transformer works + +as follows. First, we obtain queries $(Q)$ , keys $(K)$ , and values $(V)$ by linearly projecting $X$ and $Y$ for each attention head $h$ : + +$$ +\boldsymbol {Q} ^ {h} = \boldsymbol {Y} \boldsymbol {W} _ {Q} ^ {h}, \quad \boldsymbol {K} ^ {h} = \boldsymbol {X} \boldsymbol {W} _ {K} ^ {h}, \quad \boldsymbol {V} ^ {h} = \boldsymbol {X} \boldsymbol {W} _ {V} ^ {h}, \tag {1} +$$ + +where $W_{Q}^{h}\in \mathbb{R}^{e\times d}$ , $W_{K}^{h}\in \mathbb{R}^{e\times d}$ , and $W_{V}^{h}\in \mathbb{R}^{e\times d}$ are head-specific learnable projection matrices, $d = e / |h|$ , and $|h|$ is the number of attention heads. For each head, the context representation $\pmb{Z}^{h}\in \mathbb{R}^{L\times d}$ is computed as: + +$$ +\boldsymbol {Z} ^ {h} = \operatorname {s o f t m a x} \left(\frac {\boldsymbol {Q} ^ {h} \left(\boldsymbol {K} ^ {h}\right) ^ {\top}}{\sqrt {d}}\right) \boldsymbol {V} ^ {h}. \tag {2} +$$ + +The outputs from all heads are then concatenated to obtain the final context representation $\mathbf{Z} \in \mathbb{R}^{L \times e}$ : + +$$ +\boldsymbol {Z} = \left[ \begin{array}{l l l l} \boldsymbol {Z} ^ {1} & \boldsymbol {Z} ^ {2} & \dots & \boldsymbol {Z} ^ {| h |} \end{array} \right] \boldsymbol {W} _ {Z}, \tag {3} +$$ + +where $\mathbf{W}_Z \in \mathbb{R}^{e \times e}$ is another learnable projection matrix. + +# 2.2. Continuous Attention + +Instead of splitting the input object into a finite set of pieces (e.g., tokens in text or pixels in images), continuous attention mechanisms (Martins et al., 2020) assume an underlying continuous domain, suitable for arbitrarily long temporal signals, such as audio or video data. This is done by replacing the attention probability mass function by a probability density function (PDF) over a continuous signal. + +In continuous attention, the input is assumed to be a continuous signal $\pmb{x}(t)$ . Although video data is "continuous-time" in nature, it comes as a stream of $L$ discrete frames $\mathbf{X} = [x_1^\top, \dots, x_L^\top] \in \mathbb{R}^{L \times e}$ , and therefore it is necessary to convert this sequence into a smooth continuous signal. This can be done by expressing the continuous signal $\pmb{x}(t) \in \mathbb{R}^e$ as a linear combination of $N$ basis functions $\psi(t) \in \mathbb{R}^N$ : + +$$ +\boldsymbol {x} (t) = \boldsymbol {B} ^ {\top} \boldsymbol {\psi} (t), \tag {4} +$$ + +where $\pmb{B} \in \mathbb{R}^{N \times e}$ is a coefficient matrix. For compression, it is appealing to use a smaller number of basis functions than frames, $N \ll L$ . $\pmb{B}$ can be computed with multivariate ridge regression (Brown & Zidek, 1980), where we set the domain of the continuous-time signal to the unit interval [0, 1]. Frames are associated with time instants in this unit interval, $t_1 \leq t_2 \leq \ldots \leq t_L$ , with each $t_\ell \in [0,1]$ , and we set our design matrix as $\pmb{F} = [\psi(t_1), \dots, \psi(t_L)] \in \mathbb{R}^{N \times L}$ . The coefficients $\pmb{B}$ are computed such that $\pmb{x}(t_\ell) \approx \pmb{x}_\ell$ for each frame $\ell \in \{1, \dots, L\}$ , with $\lambda > 0$ , leading to: + +$$ +\boldsymbol {B} ^ {\top} = \boldsymbol {X} ^ {\top} \boldsymbol {F} ^ {\top} \left(\boldsymbol {F} \boldsymbol {F} ^ {\top} + \lambda \boldsymbol {I}\right) ^ {- 1}. \tag {5} +$$ + +The final step involves attending to $\pmb{x}(t)$ . In this approach, a PDF $p(t)$ replaces the probability mass function of the + +discrete attention. The context is then computed as the expected value of the values $\pmb{v}(t) = (\pmb{W}_V)^\top \pmb{x}(t)$ : + +$$ +\boldsymbol {Z} = \mathbb {E} _ {p} [ \boldsymbol {v} (t) ]. \tag {6} +$$ + +$\infty$ -former. In a transformer with discrete attention, handling a long context (large $L$ ) becomes impractical due to excessive memory demands. The $\infty$ -former (Martins et al., 2022b) overcomes this limitation by means of an unbounded LTM leveraging continuous attention ( $\S 2.2$ ). It allows for unbounded context without increasing memory usage by trading off the number of basis functions that fit into memory with the granularity of their representations. It achieves this by sampling points within the $[0,1]$ interval, either uniformly or based on prior attention, at which $\boldsymbol{x}(t)$ is evaluated. This process, as we will see in $\S 3$ , can be seen as the memory consolidation step, allowing new information from the short-term memory $\boldsymbol{x}(t)$ to be incorporated by scaling it down with a forgetting factor $\tau$ . The past context is associated with positions in $[0,\tau]$ , while the new context is associated in $(\tau,1]$ , followed by ridge regression over the new $\boldsymbol{x}(t)$ and computation of the output context as in Eq. 6. + +# 2.3. Video Q-former + +A video Q-former (Zhang et al., 2023b) is a specialized variant of a transformer architecture designed to enable LLMs to process and understand video content. Developed initially to capture spatial features in images (Li et al., 2023a), its primary function is to map $L \times P$ spatial embeddings, where $P$ can be the number of patch vectors from a visual encoder, to $R$ spatio-temporal video representations. It operates by stacking layers that first apply self-attention between $R$ learned queries, followed by cross-attention between this self-attention output and the $L \times P$ spatial embeddings, leading to $R$ spatio-temporal representations. + +# 3. Unbounded Memory Video Q-former + +In this section, we describe our approach to endow video models with a continuous-time memory mechanism. We adapt existing video Q-former models (Zhang et al., 2023b; Li et al., 2024) by first splitting the full sequence of frames into chunks and then processing each chunk individually. Each chunk includes a discrete STM, which is the already present cross-attention in that chunk. However, building the LTM assumes continuity within the embeddings, which is not the case since each frame contains $P$ distinct embeddings. To address this, we perform average pooling over the $P$ embeddings, resulting in a discrete sequence $\mathbf{X} \in \mathbb{R}^{M \times e}$ , where $M$ denotes the number of frames in the chunk. We + +introduce a global and dynamic LTM, which works with a modified, more powerful version of the continuous attention mechanism in §2.2. The LTM update enables increased granularity in memory regions with higher cumulative attention density. + +# 3.1. Long-Term Memory + +The first step in building our continuous LTM is to project the long-term continuous input $\pmb{x}(t) = \pmb{B}^{\top}\pmb{\psi}(t)$ , leading to the continuous keys $\pmb{k}^{h}(t) \in \mathbb{R}^{d}$ and values $\pmb{v}^{h}(t) \in \mathbb{R}^{d}$ , with the same projection matrices (1) of the STM. This allows us to perform attention over the same embedding space as the vanilla video Q-former as: + +$$ +\boldsymbol {k} ^ {h} (t) = \left(\boldsymbol {W} _ {K} ^ {h}\right) ^ {\top} \boldsymbol {x} (t) = \left(\boldsymbol {W} _ {K} ^ {h}\right) ^ {\top} \boldsymbol {B} ^ {\top} \psi (t), \tag {7} +$$ + +$$ +\boldsymbol {v} ^ {h} (t) = \left(\boldsymbol {W} _ {V} ^ {h}\right) ^ {\top} \boldsymbol {x} (t) = \left(\boldsymbol {W} _ {V} ^ {h}\right) ^ {\top} \boldsymbol {B} ^ {\top} \boldsymbol {\psi} (t). \tag {8} +$$ + +We compute the query $\pmb{Q}^{h} = [\pmb{q}_{1}^{\top},\dots,\pmb{q}_{R}^{\top}] = \pmb{Y}\pmb{W}_{Q}^{h}$ as in (1). For each query $\pmb{q}_i\in \mathbb{R}^d$ , we compute the continuous query-key similarity $s_i^h (t)$ for each head and query as + +$$ +s _ {i} ^ {h} (t) = \boldsymbol {q} _ {i} ^ {\top} \boldsymbol {k} (t) = \boldsymbol {q} _ {i} ^ {\top} \left(\boldsymbol {W} _ {K} ^ {h}\right) ^ {\top} \boldsymbol {B} ^ {\top} \boldsymbol {\psi} (t), \tag {9} +$$ + +and compute a Gibbs PDF as + +$$ +p _ {i} ^ {h} (t) = \frac {\exp \left(s _ {i} ^ {h} (t)\right)}{\int \exp \left(s _ {i} ^ {h} \left(t ^ {\prime}\right)\right) d t ^ {\prime}}, \tag {10} +$$ + +where the integral is approximated with the trapezoidal rule. Given the value function $\pmb{v}^h(t)$ , we compute the attention-specific representation vectors as described in (6): + +$$ +\boldsymbol {Z} _ {i} ^ {h} = \mathbb {E} _ {p _ {i} ^ {h}} [ \boldsymbol {v} ^ {h} (t) ] = (\boldsymbol {W} _ {V} ^ {h}) ^ {\top} \boldsymbol {B} ^ {\top} \int p _ {i} ^ {h} (t) \boldsymbol {\psi} (t) d t. \tag {11} +$$ + +Finally, we obtain the LTM representation $Z_{\mathrm{LTM}}$ by concatenating the context heads and projecting them as in (3). + +# 3.2. Continuous-Time Memory Consolidation + +As we continue processing chunks, the LTM is progressively updated, as illustrated in Fig. 2. This is done by first sampling $T$ locations within the interval [0, 1] and then evaluating the continuous signal $x(t)$ , or current LTM, at these sampled points. The sampling can be performed either uniformly in [0, 1] or based on prior attendance, as we will explain in detail in §3.3. The next step involves concatenating this LTM context with the new one coming from the current chunk. To do this, we first "contract" the LTM as + +$$ +\boldsymbol {x} ^ {\prime} (t) = \boldsymbol {x} (t / \tau) = \boldsymbol {B} ^ {\top} \psi (t / \tau). \tag {12} +$$ + +We then compute $\pmb{x}(t)$ at the $T$ locations $0 \leq t_1, \dots, t_T \leq \tau$ : + +$$ +\boldsymbol {x} _ {i} = \boldsymbol {B} ^ {\top} \boldsymbol {\psi} \left(t _ {i} / \tau\right) \quad \forall i \in [ T ], \tag {13} +$$ + +![](images/d13a46d6b4f396b45adb5e701726356a84a2c46bfcdc14ab35f3f0cd39cfe009.jpg) +Figure 2. Proposed Memory Consolidation Mechanism. + +and build the matrix $\mathbf{X}_{\mathrm{past}} = [\pmb{x}_1, \pmb{x}_2, \dots, \pmb{x}_T]^\top \in \mathbb{R}^{T \times e}$ . Following this, we concatenate the current step context $\mathbf{X}_{\mathrm{new}} \in \mathbb{R}^{M \times d}$ with the previous context $\mathbf{X}_{\mathrm{past}} \in \mathbb{R}^{T \times e}$ , resulting in the combined sequence: + +$$ +\boldsymbol {X} = \left[ \boldsymbol {X} _ {\text {p a s t}}, \boldsymbol {X} _ {\text {n e w}} \right] ^ {\top} \in \mathbb {R} ^ {(T + M) \times e}. \tag {14} +$$ + +With the new and previous chunk contexts, we compute $B$ , as described in Eq. 5, where the continuous signal is approximated using a linear combination of rectangular functions. To achieve this, we first adjust the contribution of the previous context using the factor $\tau$ . Specifically, we associate $X_{\mathrm{past}}$ with positions in the interval $[0, \tau]$ and $X_{\mathrm{new}}$ with positions in $(\tau, 1]$ . This process yields a matrix $G \in \mathbb{R}^{(M + L) \times N}$ . During each step, the previous context is contracted by a factor of $\tau$ , which regulates the extent of long-term memory used for attention and induces a gradual "forgetting" process. After the computation of $B$ , continuous attention is performed as described in §3.1. + +# 3.3. Sticky Memories + +When extending the LTM, the signal is evaluated at $T$ locations within [0, 1], as described in §3.2. While these locations can be uniformly distributed, allocating more "memory space" to regions of higher relevance ensures that critical information is prioritized in line with continuous resource allocation conceptualizations of human memory (Ma et al., 2014). This selective allocation compresses the signal into an efficient representation whereby essential video details are retained, and less significant ones are compressed or discarded. The recurrent and adaptive nature of this process is reminiscent of memory consolidation and reconsolidation brain mechanisms for relevance-based long-term memory transformation (Hardt et al., 2010; Dudai et al., 2015). + +To address this, we propose selecting the $T$ locations based + +on the relevance of the signal in each region as done by Martins et al. (2022b). This process begins by constructing a histogram of the previous attention across intervals. Specifically, the signal is divided into $D$ linearly spaced bins, $\{d_1,\ldots ,d_D\}$ . The probability assigned to each bin, $p(d_j)$ for $j\in [D]$ , is computed by integrating Eq. 10 over each bin interval using the trapezoidal rule: + +$$ +p \left(d _ {j}\right) \propto \sum_ {h = 1} ^ {H} \sum_ {i = 1} ^ {R} \int_ {d _ {j}} p _ {i} ^ {h} (t). \tag {15} +$$ + +Finally, $T$ locations are sampled based on the resulting distribution, followed by the LTM update of §3.2. In our model, this sampling process is analogous to the phenomenon of non-local discontinuous "replay" in the brain whereby past experiences are reactivated for the purposes of consolidation (Carr et al., 2011; McNamee, 2024). + +# 3.4. Model Architecture + +We define the output context for the cross-attention layers of the video Q-former as a weighted sum of two components: the "local" vanilla video Q-former output context $Z_{\mathrm{STM}} \in \mathbb{R}^{R \times d}$ , which corresponds to the already present attention over the current chunk, and the "global" LTM context $Z_{\mathrm{LTM}}$ which takes into account information from previous chunks as described in §3.2. The overall context is computed as: + +$$ +\boldsymbol {Z} = \alpha \boldsymbol {Z} _ {\mathrm {S T M}} + (1 - \alpha) \boldsymbol {Z} _ {\mathrm {L T M}}, \tag {16} +$$ + +where $\alpha$ is a weighting factor that balances the contribution of short-term and long-term memories. The video Q-formers considered in this work were trained with the $R$ tokens (or a subset) concatenated with the prompt tokens. In our approach, where the video context is divided into frame chunks processed by the long-term mechanism, it is necessary to aggregate information from all the $C$ chunks, in $\mathbb{R}^{C\times R}$ , into a fixed set of $R$ tokens. To achieve this, we run the modified Video-LLaMA (Zhang et al., 2023b) and VideoChat2 (Li et al., 2024) models for each chunk and compute a running average of the embeddings as we process each chunk. The current video token embedding $\pmb{E}_{c}\in \mathbb{R}^{R\times d}$ , defined as $\pmb{E}_{c} = \pmb{W}_{\mathrm{proj}}\pmb{Z}_{c}$ , is updated incrementally, enabling the model to handle arbitrarily long contexts without storing all embeddings of chunks in memory. The updated embedding is calculated as: + +$$ +\bar {\boldsymbol {E}} _ {c} = \frac {C - 1}{C} \bar {\boldsymbol {E}} _ {c - 1} + \frac {1}{C} \boldsymbol {E} _ {c}, \tag {17} +$$ + +Upon reaching the final chunk, the video token embeddings $\pmb{E}$ are fed to the LLM that generates an answer. The full architecture diagram is shown in Fig. 1. + +# 4. Experiments + +In this section, we evaluate our proposed method on video question answering tasks, including multiple choice ques + +tion answering (§4.2) and open-ended generation (§4.3). + +# 4.1. Implementation Details + +The Video-LLaMA (Zhang et al., 2023b) architecture that we adapt here with our LTM module was initially designed for short videos and employs a dual Q-Former architecture (Li et al., 2023a)—one for spatial and another for temporal feature extraction. We use the Video-LLaMA2-7B finetuned model, $^{3}$ leveraging EVA-CLIP's ViT-G/14 (Fang et al., 2022) as visual encoder and Vicuna 7B (Chiang et al., 2023) as our LLM. + +We also adapt VideoChat2 (Li et al., 2024), a stronger short-video model equipped with a single video Q-Former and trained on extended instruction data. We use UMT-L (Li et al., 2023c), which captures both spatial and temporal dependencies but requires more memory. Thus, we use chunks with fewer frames. Finally, we follow Jiang et al. (2023) and use Mistral-7B (Jiang et al., 2023). Additional implementation details can be found in App. A. + +In all our experiments, we approximate the integrals of Eqs. 10 and 11 using the trapezoidal rule with 1000 sampling points. For $\infty$ -VIDEO with Video-LLaMA, we use 8 chunks of 256 frames with 1024 basis functions, except in the case of NeXT-QA (Xiao et al., 2021), where the total number of available frames is reduced. For $\infty$ -VIDEO with VideoChat2, we use 8 chunks of 16 frames with $N = 256$ basis functions. We experiment with several values of $\alpha$ in Eq. 16. Full hyperparameters can be seen in App. A.2. + +# 4.2. Multiple-Choice Question Answering + +# 4.2.1. COMPARISON WITH OTHER TRAINING-FREE METHODS + +We consider systems of three kinds: (1) training-free approaches leveraging a GPT-4 backbone (Zhang et al., 2023a; Wang et al., 2024a;c); (2) models most similar to ours, which share the same underlying architecture, such as VideoLLaMA (Zhang et al., 2023b) and its training-free variants like MovieChat (Song et al., 2023) and MovieChat+ (Song et al., 2024); and (3) VideoChat2 (Li et al., 2024). For (2) and (3), we test $\infty$ -VIDEO variants without LTM (corresponding to $\alpha = 1.0$ ) and those using uniform sampling and sticky memories with $\alpha = 0.9$ . + +NeXT-QA. We evaluate our models in NeXT-QA (Xiao et al., 2021), a dataset with questions and 5 multiple choice options about short videos with average duration of 44 seconds. As $\infty$ -Video LLaMA can process a higher number of frames, we anticipate that using all the video information may lead to improvement over sub-sampling. For $\infty$ -Video + +Table 1. Evaluation on Multiple Choice Datasets. Evaluation accuracies on NeXT-QA (NeXT) (Xiao et al., 2021) and Egoschema subset (Ego) (Mangalam et al., 2023). * denotes results obtained by running the models on both datasets. † indicates models run on Egoschema but not on NeXT-QA. ◆ highlights models trained on NExT-QA. The remaining results are from Song et al. (2024) or Wang et al. (2024c). We bold the best-performing models for each category. + +
MethodLLM#FramesNeXTEgo
Based on Proprietary LLMs
LLovi (Zhang et al., 2023a)GPT-4-67.761.2
VideoAgent (Wang et al., 2024a)GPT-4-71.360.2
VideoTree (Wang et al., 2024c)GPT-4-75.666.2
Video LLaMA-Based Models
Video LLaMA* (Zhang et al., 2023b)Vicuna-7B3230.720.2
MovieChat† (Song et al., 2023)Vicuna-7B204834.441.6
MovieChat+† (Song et al., 2024)Vicuna-7B204835.237.4
∞-Video LLaMA (No LTM)*Vicuna-7Ball/204837.640.8
∞-Video LLaMA (Uniform)*Vicuna-7Ball/204837.542.6
∞-Video LLaMA (Sticky)*Vicuna-7Ball/204841.146.8
VideoChat2-Based Models
VideoChat2*◇ (Li et al., 2024)Mistral-7B1678.764.2
∞-VideoChat2 (No LTM)*◇Mistral-7B12878.164.6
∞-VideoChat2 (Uniform)*◇Mistral-7B12878.164.4
∞-VideoChat2 (Sticky)*◇Mistral-7B12878.164.8
+ +LLaMA, we use all available frames in the videos, which we then split into chunks of up to 256 frames. In contrast, baseline models like Video-LLaMA (Zhang et al., 2023b) are limited to processing only 32 frames, while VideoChat2 achieves optimal performance for 16 frames, as shown in Li et al. (2024). + +As shown in Tab. 1, $\infty$ -Video LLaMA with sticky memories outperforms other approaches. This includes MovieChat+, which employs a heuristic to merge adjacent frames, fed to the video's Q-former cross-attention with question knowledge. In contrast, our model encounters the question only within the LLM prompt. Surprisingly, our method using uniform sampling of the continuous signal performs slightly worse than $\infty$ -Video LLaMA without the LTM ( $\alpha = 1$ ). For the VideoChat2 variants, we observe no significant performance increase. We attribute this to the in-domain nature of the evaluation, where the original model is already highly optimized for the given tasks. + +Egoschema. We evaluate the training-free question-answering performance of our models on EgoSchema (Mangalam et al., 2023), a medium-length benchmark for egocentric planning designed to test long-context video understanding with 3-minute videos. + +Tab. 1 presents the results of our methods compared to strong parameter-free baselines. $\infty$ -Video LLaMA, equipped with the LTM module ( $\alpha = 0.9$ ) and using sticky memories, significantly outperforms both the uniform LTM variant, also for $\alpha = 0.9$ and the model without LTM ( $\alpha = 1$ ), achieving a notable accuracy improvement of +6 points over the latter. A similar trend is observed with $\infty$ -Video LLaMA. + +Table 2. VideoMME results. Baseline results are taken from (Fu et al., 2024). We bold the best performing models. + +
MethodLLM#FramesMediumLongAvg
ST-LLMVicuna-7B6436.831.137.9
Video-LLaVAVicuna-7B838.036.239.9
ShareGPT4Video 8B-1636.335.039.9
Chat-UniVi-v1.5Vicuna-7B6440.335.840.6
Qwen-VL-ChatQwen-7B438.737.841.1
VideoChat2Mistral-7B3237.938.042.1
∞-VideoChat2 (no LTM)Mistral-7B12839.638.842.3
∞-VideoChat2 (uniform)Mistral-7B12840.038.842.4
∞-VideoChat2 (sticky)Mistral-7B12840.238.942.4
+ +VideoChat2, though the improvements are less pronounced. We attribute this to the fact that VideoChat2 is inherently a stronger model, having been trained on a larger and more recent datasets, offering less room for improvement compared to the Video-LLaMA $\infty$ -variants. However, gains are observed for both uniform sampling and sticky memories, with the latter showing superior performance. Moreover, despite having significantly fewer parameters, $\infty$ -VideoChat2 demonstrates competitive results against proprietary LLMs based on ChatGPT-4. + +# 4.2.2. EVALUATION ON VERY LONG VIDEOS + +To emphasize the effectiveness of our approach on extended video content, we also present results on Video-MME (Fu et al., 2024), which features a diverse collection of lengthy videos, ranging up to 1 hour in duration. We compare our method against baseline models of similar size such as ST-LLM (Liu et al., 2024b), Video-LLaVA (Liu et al., 2023), ShareGPT4Video 8B (Chen et al., 2024a), Chat-UniVi-v1.5 (Jin et al., 2023) and Qwen-VL-Chat (Bai et al., 2023) as well as our $\infty$ -VIDEO variants with $\alpha = 1$ and the base architecture VideoChat2 (Li et al., 2024). + +In Tab. 2, we show the results for VideoMME. Although Video-LLaMA performs well on earlier datasets, its description-focused training dataset makes the performance as good as random guessing. Including it in the evaluation would detract from more relevant models. However, for the VideoChat2 category, sticky memories outperform others, followed by uniform sampling. + +# 4.3. Long-Term Open-Ended Question Answering + +We now investigate the performance of our models on open-ended question answering using the MovieChat-1K dataset (Song et al., 2023), a benchmark comprising long videos with an average duration of around 8 minutes. We compare our models with other baselines based on Vicuna-7B (Chiang et al., 2023), including VideoChat (Li et al., 2023b), Video-ChatGPT (Maaz et al., 2024), MovieChat (Song et al., 2023; 2024), MovieChat+ (Song et al., 2024). Furthermore, + +Table 3. MovieChat Results. Score measures the overall answer score, CI stands for correctness of information, DO stands for detail orientation, and CU stands for contextual understanding. We bold the best results and underline the best within a category. We omit the temporal and consistency metrics due to the absence of the subset specific to these metrics. Except for Moviechat+, results were taken from (Song et al., 2023). + +
MethodLLMNumber of FramesAccuracyScoreCIDOCU
Video Chat (Li et al., 2023b)Vicuna-7B3261.03.343.263.203.38
Video-ChatGPT (Maaz et al., 2024)Vicuna-7B10044.22.712.482.783.03
Video LLaMA-Based Models
Video LLaMA (Zhang et al., 2023b)Vicuna-7B3251.43.103.302.533.28
MovieChat (Song et al., 2023)Vicuna-7B204867.83.813.323.283.44
MovieChat+ (Song et al., 2024)Vicuna-7B204866.43.673.703.303.62
∞-Video LLaMA (no LTM)Vicuna-7B204868.03.763.723.333.71
∞-Video LLaMA (uniform)Vicuna-7B204866.53.693.603.313.58
∞-Video LLaMA (sticky)Vicuna-7B204872.23.883.893.473.79
∞-Video LLaMA (no STM uniform)Vicuna-7B204862.43.753.363.383.52
∞-Video LLaMA (no STM sticky)Vicuna-7B204859.23.683.303.303.44
VideoChat2-Based Models
VideoChat2Mistral-7B1662.23.723.463.603.69
∞-VideoChat2 (no LTM)Mistral-7B12863.93.743.543.603.73
∞-VideoChat2 (uniform)Mistral-7B12864.13.733.543.603.75
∞-VideoChat2 (sticky)Mistral-7B12863.93.743.553.633.74
∞-VideoChat2 (no STM uniform)Mistral-7B12865.73.783.653.603.84
∞-VideoChat2 (no STM sticky)Mistral-7B12866.53.853.713.683.96
+ +we evaluate our $\infty$ -VIDEO variants with $\alpha = 0.9$ for both uniform sampling and sticky memories, as well as with $\alpha = 0$ (i.e., without STM). Following the standard evaluation method for open-ended questions, we prompt GPT-3.5 (OpenAI et al., 2024) for a yes/no answer prediction, a confidence score (0 to 5), and other qualitative metrics. The prompts are shown in App. A.3. + +As shown in Tab. 3, our $\infty$ -VIDEO LLaMA with sticky memories outperforms all models in its category, as well as VideoChat and Video-ChatGPT, across all metrics. It also surpasses MovieChat, which is designed for training-free long-context video understanding. In contrast, $\infty$ -Video LLaMA with uniform sampling performs worse than both sticky memories and the model without LTM. Additionally, using only the LTM does not improve performance, highlighting that a weighted combination of STM and LTM yields the best results for the Video-LLaMA category. The same does not apply to the VideoChat2 category, where replacing the STM with the LTM yields top results. For $\alpha$ values other than 0, the performance of $\infty$ -VIDEO with VideoChat2 remains nearly unchanged. Surprisingly, VideoChat2 underperforms compared to the Video LLaMA category despite being trained on a larger dataset. We hypothesize this is due to differences in the training datasets: Video LLaMA was trained on video descriptions with multiple sentences, encouraging more context, which increases the probability of correct predictions, while VideoChat2 was fine-tuned on concise datasets, favouring brief, open-ended predictions. Ablation studies on $\infty$ -VIDEO with Video LLaMA are presented in App. B.1. + +# 4.4. Qualitative Analysis + +In Fig. 3, we show the continuous attention density map over the LTM in the final layer of the video Q-Former for the last chunk of $\infty$ -VIDEO LLaMA. The example uses the Interstellar trailer, divided into 8 chunks of 256 frames each, with $\tau = 0.75$ , $N = 1024$ , and $\alpha = 0.9$ . The bottom heatmap reveals that the continuous attention favours frames after $t = \tau$ , where the sticky LTM exhibits peaks before this point. In contrast, the uniform LTM shows vanishing density as $t$ decreases, likely due to context contraction across chunks, which might explain the superior results for sticky memories. + +In Fig. 4, we present the attention density as a function of the number of frames, with $\alpha = 0.9$ , $N = 256$ , and $\tau = 0.5$ , for 3 chunks of 256 frames each, spanning 3 contraction steps. We also display 6 representative frames from high-density regions by identifying the top 26 frames within each interval and selecting the 6 non-redundant frames. The selected frames appear to align with visually striking or narratively significant scenes within the trailer, which suggests that $\infty$ -VIDEO effectively might capture key moments in the video and discard irrelevant parts. For example, in the final interval, the region with the lowest attention density corresponds to the credits section of the video. We show a similar figure but for the uniform sampling in App. B.2. + +# 5. Related Work + +There are several recent advances in long-context video understanding (Li et al., 2023d; Liu et al., 2024a; Balazevic et al., 2024; Wang et al., 2024b; Shu et al., 2024; Ye + +![](images/673650cd63cb978e7ff1a3d61d9b768a70c32c0ddb5fa8c077a343fae24f1355.jpg) +Figure 3. (Top) LTM attention density on the $[0, \tau]$ interval for the Interstellar trailer, using sticky memories in the final chunk of the $\infty$ -Video LLaMA video Q-former's last layer. (Bottom) The same attention density map, extended over the full $t$ interval. + +![](images/2fdbc984c7b05da9493b133e28ee1eaab80838e70205965470e31eb10c7c3898.jpg) + +![](images/a34782ec88b6a17c540e0236c0535135874a797a49718673c7ede5a3cac909c3.jpg) + +![](images/c2927b362587966f594d72e94c8baaafce3d80978ed9f1d189403a9c55a3d760.jpg) + +![](images/bc8db9e2221fc9cda70955e5fb1d52f14237979e65fef9a876426c2a176d2c4f.jpg) + +![](images/591af3077bf4b6244cff0c2331e4994db03fc1b336492f3a302824e5727f49d0.jpg) +12 + +![](images/fe503d3d029b768273b54a05c7e14bfecc805729cfbef673be6de2ab35ac6e39.jpg) +28 + +![](images/90e791808ee4566b6eecf5a220d92fd950e010e0a51714a73e426145ff698a78.jpg) +128 + +![](images/92f8e13d94a37275d1782482953da7df2eda3efc193d4859110f4f8b7861fb10.jpg) +148 +Figure 4. Highest continuous attention density frames selected using sticky memories in the Interstellar trailer for $\infty$ -Video LLaMA across 3 chunks. (Left) Interval: $[0, \tau^2]$ . (Middle) Interval: $(\tau^2, \tau]$ . (Right) Interval: $(\tau, 1]$ . + +![](images/12bbc8a1747a4cb49269deef8c875eba3e2bf41affe8b6803a175849b4b0ca56.jpg) +150 + +![](images/1a43ab6468a81c4c9d1ba0c508ff416c16572d39227a8532f90f09765088e52f.jpg) +191 + +![](images/db33cdb44e3f6e7b31cc21c5366fcec7a7ccf22760d1bc20f5ed692f17ec97e9.jpg) +311 + +![](images/777d5ef8addc19c136c51590753b754ce9df3f5a918bfc7f52fce3a393d6d757.jpg) +339 + +![](images/542530e15991d5090179fd1626c18293aa9d25d73377445da6312355f00dccbc.jpg) +400 + +![](images/79ead36dfbf02f605aff91c934357955ec56befff4033bcc82112a5cf7038fd1.jpg) +465 + +![](images/14f6c15e30fdf92b3b8180a24496a4f4747b5ba8c1031899192687e550207374.jpg) +478 + +![](images/fa92e9ed0d1bc5d89258a8e9cb8e2bac49a129f96de40713dda35a0668e75a90.jpg) +486 + +![](images/30a9b6d6a0ca9ad11fd54fe93a7fed54df700ff029a4d9ddcd01ac75be4ac6f6.jpg) +528 + +![](images/4c59f4c933410aa6d7a37d6bbeee8c7de61c6b2ee78214d7b28c0d3b2e205c7a.jpg) +544 + +![](images/936fd42c665da68661fe49a245ce00382f58df4a24a111c39eafef034dfe7e70.jpg) +545 + +![](images/4f8176d0b4de449ed9f2f913ef96d4b8554f189ba76c65f3f6e4a9266e37a59b.jpg) +553 + +![](images/43d47ba96c376f08ecc04230a5f3aad462b97ca90f6ddb87d7ef8521e7e719a5.jpg) +555 + +![](images/9c5fd834303afe9bb5e5a9c7d81fb7aea5d37a3f9655c105be7224e187dd1406.jpg) +571 + +et al., 2024; Chen et al., 2024b), but few adapting transformers to leverage temporal information in a training-free setting. Closest to our work is Song et al. (2023; 2024), which extends Video LLaMA with memory consolidation by using a heuristic to merge similar frames, which alters frame embedding-level information. In contrast, our method retains embedding integrity, equipping the video Q-former's cross-attention with an LTM to efficiently process an arbitrary number of frames in one single pass over the video. + +Moreover, works such as Zhang et al. (2024), Shu et al. (2024), and Chen et al. (2024b) address the challenge of long video contexts. However, these approaches involve fine-tuning or training models from scratch, which can be computationally expensive and time-intensive. Our approach, in contrast, enables the seamless adaptation of short video models to arbitrary long contexts without the need for sparse subsampling or discarding important information. + +Our approach builds on continuous attention mechanisms, originally proposed by Martins et al. (2020), and later applied to image, speech, and natural language processing tasks (Farinhas et al., 2021; Martins et al., 2022a;b). We extend these ideas to video data by replacing the continuous softmax with the Gibbs PDF, which better replicates the discrete softmax used in the video Q-Former attention. + +# 6. Conclusions + +We introduced a lightweight extension to short-video vision LLMs, enabling arbitrary-long video understanding by augmenting the video Q-former's cross-attention mechanism with a long-term memory module that consolidates global information dynamically. Our approach adapts continuous attention to perform visual memory consolidation, allocating higher granularity to the most relevant frames. This ensures an efficient and focused representation of critical moments while maintaining scalability. Additionally, our method enables the sequential processing of videos with a single pass. Despite being training-free, our approach also paves the way for scalable long-context video understanding with transformers as spatio-temporal feature extractors. + +Our work takes inspiration from cognitive and mechanistic theories of memory (re)consolidation in brains (Hardt et al., 2010; Preston & Eichenbaum, 2013; Ma et al., 2014), and a deeper integration with such theories may be pursued. For example, memory reactivation or "replay" is thought to be a key component of systems consolidation in "offline" states such as sleep. Our model could be extended to incorporate such with further training and schema-driven fine-tuning for the purposes of continual learning (Cai et al., 2024). Furthermore, as a neural architecture, our model goes beyond current brain models of episodic memory processing, which focus on discrete low-dimensional sequences of static images and relatively simple functionalities such as mem + +ory recall and event segmentation (Franklin et al., 2020; Chandra et al., 2025). Given our model's integration of rich and streaming visual input with flexible and sophisticated querying via text prompting, interpretability analyses of our architecture may provide insights regarding how episodic memory may be interrogated for complex inferences in the human brain (Tulving, 2002; Radvansky & Zacks, 2014). + +# Impact Statement + +We discuss the broader implications of our work, including ethical considerations and potential societal consequences. Our framework extends the capabilities of existing short-context multimodal language models, enabling them to process unbounded video contexts without requiring retraining. This is particularly relevant given concerns about the energy consumption of training large models (Strubell et al., 2019). However, we must also acknowledge the societal risks associated with video models, especially their potential use in privacy-violating surveillance. As our approach enables scaling to longer videos, there is a concern that it could be applied in undesirable domains. While current state-of-the-art models are often trained on datasets with documented biases, we intentionally focus on applications using standard benchmark applications, aiming to distance ourselves from harmful uses. + +# Acknowledgments + +We would like to thank Marcos Treviso, Giuseppe Attanasio, Sweta Agrawal, Chryssa Zerva and the SARDINE lab team for helpful discussions. This work was supported by EU's Horizon Europe Research and Innovation Actions (UTER, contract 101070631), by the project DECOLLAGE (ERC-2022-CoG 101088763), by the Portuguese Recovery and Resilience Plan through project C645008882-00000055 (Center for Responsible AI), and by FCT/MECI through national funds and when applicable co-funded EU funds under UID/50008: Instituto de Telecomunicações. + +# References + +Atreja, S., Ashkinaze, J., Li, L., Mendelsohn, J., and Hemphill, L. Prompt design matters for computational social science tasks but in unpredictable ways, 2024. URL https://arxiv.org/abs/2406.11980. +Bahdanau, D., Cho, K., and Bengio, Y. Neural machine translation by jointly learning to align and translate. In Proc. of International Conference on Learning Representations, 2015. +Bai, J., Bai, S., Yang, S., Wang, S., Tan, S., Wang, P., Lin, J., Zhou, C., and Zhou, J. Qwen-vl: A versatile vision + +language model for understanding, localization, text reading, and beyond. arXiv preprint arXiv:2308.12966, 2023. +Balazevic, I., Shi, Y., Papalampidi, P., Chaabouni, R., Koppula, S., and Henaff, O. J. Memory consolidation enables long-context video understanding. In Salakhutdinov, R., Kolter, Z., Heller, K., Weller, A., Oliver, N., Scarlett, J., and Berkenkamp, F. (eds.), Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 2527-2542. PMLR, 21-27 Jul 2024. +Brady, T. F., Konkle, T., Alvarez, G. A., and Oliva, A. Visual long-term memory has a massive storage capacity for object details. Proceedings of the National Academy of Sciences, 105(38):14325-14329, 2008. doi: 10.1073/pnas.0803390105. +Brown, P. J. and Zidek, J. V. Adaptive multivariate ridge regression. The Annals of Statistics, 1980. +Cai, C., Wang, Z., Gao, J., Liu, W., Lu, Y., Zhang, R., and Yap, K.-H. Empowering large language model for continual video question answering with collaborative prompting, 2024. arXiv:2410.00771v2. +Carr, M. F., Jadhav, S. P., and Frank, L. M. Hippocampal replay in the awake state: A potential substrate for memory consolidation and retrieval. Nature Neuroscience, 14: 147-153, 2011. +Chandra, S., Sharma, S., Chaudhuri, R., et al. Episodic and associative memory from spatial scaffolds in the hippocampus. Nature, XX(XX):XX-XX, 2025. doi: 10.1038/s41586-024-08392-y. +Chen, L., Wei, X., Li, J., Dong, X., Zhang, P., Zang, Y., Chen, Z., Duan, H., Lin, B., Tang, Z., et al. Sharegpt4video: Improving video understanding and generation with better captions. arXiv preprint arXiv:2406.04325, 2024a. +Chen, Y., Xue, F., Li, D., Hu, Q., Zhu, L., Li, X., Fang, Y., Tang, H., Yang, S., Liu, Z., He, E., Yin, H., Molchanov, P., Kautz, J., Fan, L., Zhu, Y., Lu, Y., and Han, S. Longvila: Scaling long-context visual language models for long videos, 2024b. +Cheng, Z., Leng, S., Zhang, H., Xin, Y., Li, X., Chen, G., Zhu, Y., Zhang, W., Luo, Z., Zhao, D., and Bing, L. Videollama 2: Advancing spatial-temporal modeling and audio understanding in video-llms. arXiv preprint arXiv:2406.07476, 2024. URL https://arxiv.org/abs/2406.07476. +Chiang, W.-L., Li, Z., Lin, Z., Sheng, Y., Wu, Z., Zhang, H., Zheng, L., Zhuang, S., Zhuang, Y., Gonzalez, J. E., and et al. Vicuna: An open-source chatbot impressing gpt-4 + +with $90\%$ chatgpt quality. https://vicuna.lmsys.org, 2023. +Cowan, E. T., Schapiro, A. C., Dunsmoor, J. E., and Murty, V. P. Memory consolidation as an adaptive process. Psychonomic Bulletin & Review, 28:1796-1810, 2021. doi: 10.3758/s13423-021-01978-x. URL https://doi.org/10.3758/s13423-021-01978-x. +Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., and Houlsby, N. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2021. +Dudai, Y., Karni, A., and Born, J. The consolidation and transformation of memory. Neuron, 88:20-32, 2015. +Fang, Y., Wang, W., Xie, B., Sun, Q., Wu, L., Wang, X., Huang, T., Wang, X., and Cao, Y. Eva: Exploring the limits of masked visual representation learning at scale. 2022. +Farinhas, A., Martins, A. F. T., and Aguiar, P. M. Q. Multimodal continuous visual attention mechanisms. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops, pp. 1047-1056, October 2021. +Frankland, P. W. and Bontempi, B. The organization of recent and remote memories. Nature Reviews Neuroscience, 6(2):119-130, 2005. +Franklin, N. T., Norman, K. A., Ranganath, C., Zacks, J. M., and Gershman, S. J. Structured event memory: A neurosymbolic model of event cognition. *Psychological Review*, 127(3):327-361, 2020. doi: 10.1037/rev0000177. +Fu, C., Dai, Y., Luo, Y., Li, L., Ren, S., Zhang, R., Wang, Z., Zhou, C., Shen, Y., Zhang, M., Chen, P., Li, Y., Lin, S., Zhao, S., Li, K., Xu, T., Zheng, X., Chen, E., Ji, R., and Sun, X. Video-mme: The first-ever comprehensive evaluation benchmark of multi-modal llms in video analysis, 2024. +Hardt, O., Einarsson, E. O., and Nader, K. A bridge over troubled water: reconsolidation as a link between cognitive and neuroscientific memory research traditions. Annual Review of Psychology, 61:141-167, 2010. doi: 10.1146/annurev.psych.093008.100455. +hwchase17. Langchain, 2023. URL https://github.com/hwchase17/langchain. Accessed: 2023-12-20. +Jiang, A. Q., Sablayrolles, A., Mensch, A., Bamford, C., Chaplot, D. S., de las Casas, D., Bressand, F., Lengyel, + +G., Lample, G., Saulnier, L., Lavaud, L. R., Lachaux, M.-A., Stock, P., Scao, T. L., Lavril, T., Wang, T., Lacroix, T., and Sayed, W. E. Mistral 7b, 2023. +Jin, P., Takanobu, R., Zhang, C., Cao, X., and Yuan, L. Chat-univi: Unified visual representation empowers large language models with image and video understanding. arXiv preprint arXiv:2311.08046, 2023. +Li, J., Li, D., Savarese, S., and Hoi, S. BLIP-2: Bootstrapping language-image pre-training with frozen image encoders and large language models. In Proceedings of the 40th International Conference on Machine Learning, 2023a. +Li, K., He, Y., Wang, Y., Li, Y., Wang, W., Luo, P., Wang, Y., Wang, L., and Qiao, Y. Videochat: Chat-centric video understanding. arXiv preprint arXiv:2305.06355, 2023b. +Li, K., Wang, Y., Li, Y., Wang, Y., He, Y., Wang, L., and Qiao, Y. Unmasked teacher: Towards training-efficient video foundation models. 2023 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 19891-19903, 2023c. +Li, K., Wang, Y., He, Y., Li, Y., Wang, Y., Liu, Y., Wang, Z., Xu, J., Chen, G., Luo, P., Wang, L., and Qiao, Y. +Mvbench: A comprehensive multi-modal video understanding benchmark, 2024. URL https://arxiv.org/abs/2311.17005. +Li, Y., Wang, C., and Jia, J. Llama-vid: An image is worth 2 tokens in large language models, 2023d. +Liu, H., Li, C., Wu, Q., and Lee, Y. J. Visual instruction tuning, 2023. +Liu, J., Wang, Y., Ma, H., Wu, X., Ma, X., Wei, X., Jiao, J., Wu, E., and Hu, J. Kangaroo: A powerful video-language model supporting long-context video input, 2024a. +Liu, R., Li, C., Tang, H., Ge, Y., Shan, Y., and Li, G. St-llm: Large language models are effective temporal learners, 2024b. +Liu, Z., Zhu, L., Shi, B., Zhang, Z., Lou, Y., Yang, S., Xi, H., Cao, S., Gu, Y., Li, D., Li, X., Fang, Y., Chen, Y., Hsieh, C.-Y., Huang, D.-A., Cheng, A.-C., Nath, V., Hu, J., Liu, S., Krishna, R., Xu, D., Wang, X., Molchanov, P., Kautz, J., Yin, H., Han, S., and Lu, Y. Nvila: Efficient frontier visual language models, 2024c. +Luo, R., Zhao, Z., Yang, M., Dong, J., Qiu, M., Lu, P., Wang, T., and Wei, Z. Valley: Video assistant with large language model enhanced ability, 2023. +Ma, W., Husain, M., and Bays, P. Changing concepts of working memory. Nature Neuroscience, 17:347-356, + +2014. doi: 10.1038/nn.3655. URL https://doi.org/10.1038/nn.3655. +Maaz, M., Rasheed, H., Khan, S., and Khan, F. S. Videochatgpt: Towards detailed video understanding via large vision and language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL 2024), 2024. +Mangalam, K., Akshulakov, R., and Malik, J. Egoschema: A diagnostic benchmark for very long-form video language understanding. arXiv preprint arXiv:2308.09126, 2023. +Martins, A., Farinhas, A., Treviso, M., Niculae, V., Aguiar, P., and Figueiredo, M. Sparse and continuous attention mechanisms. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 20989-21001. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/f0b76267fbe12b936bd65e203dc675c1-Paper.pdf. +Martins, A. F. T., Treviso, M., Farinhas, A., Aguiar, P. M. Q., Figueiredo, M. A. T., Blondel, M., and Niculae, V. Sparse continuous distributions and fenchel-young losses. Journal of Machine Learning Research, 23(257): 1-74, 2022a. URL http://jmlr.org/papers/v23/21-0879.html. +Martins, P. H., Marinho, Z., and Martins, A. F. $\infty$ -former: Infinite memory transformer. In Proc. ACL, 2022b. +McGaugh, J. Making lasting memories: Remembering the significant. Proceedings of the National Academy of Sciences of the United States of America, 110:10402-10407, 2013. doi: 10.1073/pnas.1301209110. URL https://doi.org/10.1073/pnas.1301209110. +McNamee, D. C. The generative neural microdynamics of cognitive processing. Current Opinion in Neurobiology, 85:102855, 2024. doi: 10.1016/j.conb.2024.102855. Epub 2024 Feb 29. +OpenAI, Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F. L., Almeida, D., Altenschmidt, J., Altman, S., Anadkat, S., Avila, R., Babuschkin, I., Balaji, S., Balcom, V., Baltescu, P., Bao, H., Bavarian, M., Belgium, J., Bello, I., Berdine, J., Bernadett-Shapiro, G., Berner, C., Bogdonoff, L., Boiko, O., Boyd, M., Brakman, A.-L., Brockman, G., Brooks, T., Brundage, M., Button, K., Cai, T., Campbell, R., Cann, A., Carey, B., Carlson, C., Carmichael, R., Chan, B., Chang, C., Chantzis, F., Chen, D., Chen, S., Chen, R., Chen, J., Chen, M., Chess, B., Cho, C., Chu, C., Chung, H. W., Cummings, D., Currier, J., Dai, Y., Decareaux, C., Degry, T., Deutsch, N., + +Deville, D., Dhar, A., Dohan, D., Dowling, S., Dunning, S., Ecoffet, A., Eleti, A., Eloundou, T., Farhi, D., Fedus, L., Felix, N., Fishman, S. P., Forte, J., Fulford, I., Gao, L., Georges, E., Gibson, C., Goel, V., Gogineni, T., Goh, G., Gontijo-Lopes, R., Gordon, J., Grafstein, M., Gray, S., Greene, R., Gross, J., Gu, S. S., Guo, Y., Hallacy, C., Han, J., Harris, J., He, Y., Heaton, M., Heidecke, J., Hesse, C., Hickey, A., Hickey, W., Hoeschele, P., Houghton, B., Hsu, K., Hu, S., Hu, X., Huizinga, J., Jain, S., Jain, S., Jang, J., Jiang, A., Jiang, R., Jin, H., Jin, D., Jomoto, S., Jonn, B., Jun, H., Kaftan, T., Lukasz Kaiser, Kamali, A., Kanitscheider, I., Keskar, N. S., Khan, T., Kilpatrick, L., Kim, J. W., Kim, C., Kim, Y., Kirchner, J. H., Kiros, J., Knight, M., Kokotajlo, D., Lukasz Kondraciuk, Kondrich, A., Konstantinidis, A., Kosic, K., Krueger, G., Kuo, V., Lampe, M., Lan, I., Lee, T., Leike, J., Leung, J., Levy, D., Li, C. M., Lim, R., Lin, M., Lin, S., Litwin, M., Lopez, T., Lowe, R., Lue, P., Makanju, A., Malfacini, K., Manning, S., Markov, T., Markovski, Y., Martin, B., Mayer, K., Mayne, A., McGrew, B., McKinney, S. M., McLeavey, C., McMillan, P., McNeil, J., Medina, D., Mehta, A., Menick, J., Metz, L., Mishchenko, A., Mishkin, P., Monaco, V., Morikawa, E., Mossing, D., Mu, T., Murati, M., Murk O. Melly, D. Nair A. Nakano R. Nayak R. Neelakantan A.NgoR.NohH.OuyangL.OKeefeC.Pachocki J. PainoA.PalermoJ.PantulianoA.Parascandolo G. Parish J. ParparitaE.PassosA.PavlovM.Peng A.PerelmanA.de Avila Belbute PeresF.PetrovM. de Oliveira Pinto,H.P.Michael Pokorny Pokrass,M. PongV.H. PowellT.PowerA.PowerB.ProehlE. Puri R.RadfordA.RaeJ.RameshA.RaymondC. Real,F. RimbachK.RossC.RotstedB.Roussez H.RyderN.SaltarelliM.SandersT.SanturkarS. SastryG.SchmidtH.SchnurrD.SchulmanJ.Selsam,D.Sheppard,K.Sherbakov,T.ShiehJ.Shoker S. ShyamP. Sidor,S. Sigler,E.SimensM.Sitkin J.SlamaK.SohlI.SokolowskyB.SongY.Staudacher N. Such F.P.Summers N. Sutskever I.Tang J. Tezak N.Thompson M.B.TilletP.Tootoonchian A.TsengE.TuggleP.TurleyN.TworekJ.UribeJ. F.C.ValloneA.VijayvergiyaA.VossC.Wainwright C.WangJ.J.WangA.WangB.WardJ.WeiJ. Weinmann C.WelihindaA.Welinder P.WengJ. WengL.WiethoffM.WillnerD.Winter C.Wolrich S.WongH.WorkmanL.WuS.WuJ.WuM. XiaoK.XuT.YooS.YuK.YuanQ.Zaremba W.ZellersR.ZhangC.ZhangM.ZhaoS.Zheng T.ZhuangJ.ZhukW.and ZophB.Gpt-4 technical report, 2024. +Preston, A. R. and Eichenbaum, H. The interplay of hippocampus and prefrontal cortex in memory-based decision making. Current Biology, 23(17):R764-R773, 2013. +Radvansky, G. A. and Zacks, J. M. Event Cognition. Oxford + +University Press, New York, NY, 2014. +Shu, Y., Liu, Z., Zhang, P., Qin, M., Zhou, J., Liang, Z., Huang, T., and Zhao, B. Video-xl: Extra-long vision language model for hour-scale video understanding, 2024. +Song, E., Chai, W., Wang, G., Zhang, Y., Zhou, H., Wu, F., Guo, X., Ye, T., Lu, Y., Hwang, J.-N., et al. Moviechat: From dense token to sparse memory for long video understanding. arXiv preprint arXiv:2307.16449, 2023. +Song, E., Chai, W., Ye, T., Hwang, J.-N., Li, X., and Wang, G. Moviechat+: Question-aware sparse memory for long video question answering. arXiv preprint arXiv:2404.17176, 2024. +Strubell, E., Ganesh, A., and McCallum, A. Energy and policy considerations for deep learning in NLP. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 3645-3650, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1355. URL https://aclanthology.org/P19-1355. +Tulving, E. Episodic memory: From mind to brain. Annual Review of Psychology, 53:1-25, 2002. doi: 10.1146/annurev.psych.53.100901.135114. URL https://doi.org/10.1146/annurev.psych.53.100901.135114. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L. u., and Polosukhin, I. Attention is all you need. In Guyon, I., Luxburg, U. V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017. URL https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf. +Wang, X., Zhang, Y., Zohar, O., and Yeung-Levy, S. Videoagent: Long-form video understanding with large language model as agent. European Conference on Computer Vision (ECCV), 2024a. +Wang, Y., Xie, C., Liu, Y., and Zheng, Z. Videollamb: Long video understanding with recurrent memory bridges. arxiv, 2024b. +Wang, Z., Yu, S., Stengel-Eskin, E., Yoon, J., Cheng, F., Bertasius, G., and Bansal, M. Videotree: Adaptive tree-based video representation for llm reasoning on long videos. arXiv preprint arXiv:2405.19209, 2024c. +Xiao, J., Shang, X., Yao, A., and Chua, T.-S. Next-qa: Next phase of question-answering to explaining temporal actions. In Proceedings of the IEEE/CVF conference on + +computer vision and pattern recognition, pp. 9777-9786, 2021. +Ye, J., Xu, H., Liu, H., Hu, A., Yan, M., Qian, Q., Zhang, J., Huang, F., and Zhou, J. mplug-owl3: Towards long image-sequence understanding in multi-modal large language models, 2024. +Zhang, C., Lu, T., Islam, M. M., Wang, Z., Yu, S., Bansal, M., and Bertasius, G. A simple llm framework for long-range video question-answering, 2023a. +Zhang, H., Li, X., and Bing, L. Videollama: An instruction-tuned audio-visual language model for video understanding. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP 2023), 2023b. +Zhang, P., Zhang, K., Li, B., Zeng, G., Yang, J., Zhang, Y., Wang, Z., Tan, H., Li, C., and Liu, Z. Long context transfer from language to vision. arXiv preprint arXiv:2406.16852, 2024. URL https://arxiv.org/abs/2406.16852. +Zhu, D., Chen, J., Shen, X., Li, X., and Elhoseiny, M. Minigpt-4: Enhancing vision-language understanding with advanced large language models. arXiv preprint arXiv:2304.10592, 2023. + +# A. Implementation Details and Hyperparameters + +# A.1. Additional Implementation Details + +Video LLaMA-Based Models. As discussed in §3, Video-LLaMA (Zhang et al., 2023b) serves as one of the adapted models in this work. It employs a cascade of two Q-formers—one for spatial feature extraction and the other for temporal feature extraction—with the latter enhanced by our LTM integration. The video Q-former and projection layer parameters are consistent with the Video-LLaMA-2-7B-Finetuned model (Zhang et al., 2023b), which was fine-tuned using instruction-tuning data from MiniGPT-4 (Zhu et al., 2023), LLaVA (Liu et al., 2023), and VideoChat (Li et al., 2023b). For visual feature extraction, we utilize the ViT-G/14 encoder from EVA-CLIP (Fang et al., 2022), while spatial dependency features rely on the Q-former from BLIP-2 (Li et al., 2023a). This lightweight ViT facilitates efficient processing of a large number of frames per chunk. The LLM used in this model is Vicuna-7B (Chiang et al., 2023). + +Atreja et al. (2024) and our empirical validation have shown limitations in respecting the format of the multiple-choice answer asked by the prompt, influencing the accuracy of this method in multiple-choice datasets. To address this, and for these datasets we follow the approach of (Song et al., 2023; 2024) and provide our modified model, $\infty$ -Video LLaMA, exclusively with the questions in the prompt. Using LangChain (hwchase17, 2023), we calculate the similarity between $\infty$ -Video LLaMA's open-ended responses and the given options, selecting the option that best aligns with the expected answer. + +VideoChat2-Based Models. Building on Video-LLaMA, we also evaluated our methods using VideoChat2 (Li et al., 2024), a more advanced short-video model. Like Video-LLaMA, it incorporates a video Q-former, but it benefits from additional instruction-tuning data (Li et al., 2024). For visual encoding, we use UMT-L (Li et al., 2023c), which captures both spatial and temporal features specifically designed for video data. This model's higher memory requirements necessitated the use of smaller frame chunks in our experiments. For the LLM component, we used the stage-3 Mistral-7B version of VideoChat2, which demonstrated the best performance in its original paper. + +# A.2. Hyperparameters + +We report in Tab. 4 the hyperparameters used in our experiments. For $\infty$ -Video LLaMA and for NeXT-QA we use all the frames available with variable number of chunks of 256 frames. + +Table 4. Hyperparameters used in our $\infty$ -variants for the different datasets. + +
ParameterNeXT-QAEgoschemaVideoMMEMovieChat
∞-Video LLaMA∞-VideoChat2∞-Video LLaMA∞-VideoChat2∞-VideoChat2∞-Video LLaMA∞-VideoChat2
# chunks-888888
# framesall162561616256256
N25625610242562561024256
τ0.750.750.750.750.50.750.75
+ +# A.3. Evaluation + +We further show in List. 1, 2, 3, 4 the prompts used for evaluation on open-ended question answering tasks for the Moviechat dataset. + +Listing 1. ChatGPT-3.5 prompt for the overall accuracy and score metric. +```python +"role": "system", +"content": + "You are an intelligent chatbot designed for evaluating the correctness of generative outputs for question-answer pairs." + "Your task is to compare the predicted answer with the correct answer and determine if they match meaningfully. Here's how you can accomplish the task:" + "--" + "#INSTRUCTIONS: " + "-- Focus on the meaningful match between the predicted answer and the correct answer.\n" + "-- Consider synonyms or paraphrases as valid matches.\n" + "-- Evaluate the correctness of the prediction compared to the answer." +}, +``` + +```txt +4https://huggingface.co/OpenGVLab/VideoChat2_stage3_Mistral_7B +``` + +```txt +"role": "user", +"content": + "Please evaluate the following video-based question-answer pair:\n\nf"Question: {question}\n"f"Correct Answer: {answer}\n"f"Predicted Answer: {pred}\n"Provide your evaluation only as a yes/no and score where the score is an integer value between 0 and 5, with 5 indicating the highest meaningful match."Please generate the response in the form of a Python dictionary string with keys 'pred' and 'score', where value of 'pred' is a string of 'yes' or 'no' and value of 'score' is in STRING."DO NOT PROVIDE ANY OTHER OUTPUT TEXT OR EXPLANATION. Only provide the Python dictionary string."For example, your response should look like this: {'pred': 'yes', 'score': 4.8}." +``` + +Listing 2. ChatGPT-3.5 prompt for the contextual understanding (CI) metric. +```txt +"role": "system", +"content": +"You are an intelligent chatbot designed for evaluating the factual accuracy of generative outputs for video-based question-answer pairs." +"Your task is to compare the predicted answer with the correct answer and determine if they are factually consistent. Here's how you can accomplish the task:" +"---" +"##INSTRUCTIONS: " +"- Focus on the factual consistency between the predicted answer and the correct answer. The predicted answer should not contain any misinterpretations or misinformation.\n" +"- The predicted answer must be factually accurate and align with the video content.\n" +"- Consider synonyms or paraphrases as valid matches.\n" +"- Evaluate the factual accuracy of the prediction compared to the answer." +}, +{ +"role": "user", +"content": +"Please evaluate the following video-based question-answer pair:\n\nf"Question: {question}\n" +f"Correct Answer: {answer}\n" +f"Predicted Answer: {pred}\n" +"Provide your evaluation only as a factual accuracy score where the factual accuracy score is an integer value between 0 and 5, with 5 indicating the highest level of factual consistency." +"Please generate the response in the form of a Python dictionary string with keys 'score', where its value is the factual accuracy score in INTEGER, not STRING." +"Do NOT PROVIDE ANY OTHER OUTPUT TEXT OR EXPLANATION. Only provide the Python dictionary string." +"For example, your response should look like this: {'score': 4.8}. +``` + +Listing 3. ChatGPT-3.5 prompt for the detailed orientation (DO) metric. +```txt +"role": "system", +"content": +"You are an intelligent chatbot designed for evaluating the detail orientation of generative outputs for video-based question-answer pairs." +"Your task is to compare the predicted answer with the correct answer and determine its level of detail, considering both completeness and specificity. Here's how you can accomplish the task:" +"---" +"##INSTRUCTIONS: " +-- Check if the predicted answer covers all major points from the video. The response should not leave out any key aspects.\n" +-- Evaluate whether the predicted answer includes specific details rather than just generic points. It should provide comprehensive information that is tied to specific elements of the video.\n" +-- Consider synonyms or paraphrases as valid matches.\n" +-- Provide a single evaluation score that reflects the level of detail orientation of the prediction, considering both completeness and specificity." +}, +{ +"role": "user", +"content": +"Please evaluate the following video-based question-answer pair:\n\nf"Question:{question}\n" +f"Correct Answer:{answer}\n" +f"Predicted Answer:{pred}\n" +"Provide your evaluation only as a detail orientation score where the detail orientation score is an integer value between 0 and 5, with 5 indicating the highest level of detail orientation." +"Please generate the response in the form of a Python dictionary string with keys 'score', where its value is the detail orientation score in INTEGER, not STRING." +"Do NOT PROVIDE ANY OTHER OUTPUT TEXT OR EXPLANATION. Only provide the Python dictionary string." +"For example, your response should look like this: {'score': 4.8}. +``` + +Listing 4. ChatGPT-3.5 prompt for the contextual understanding (CU) metric. +```txt +"role": "system", +"content": + "You are an intelligent chatbot designed for evaluating the contextual understanding of generative outputs for video-based question-answer pairs." + "Your task is to compare the predicted answer with the correct answer and determine if the generated response aligns with the +``` + +```txt +overall context of the video content. Here's how you can accomplish the task:" +"--------" +"##INSTRUCTIONS: +"Evaluate whether the predicted answer aligns with the overall context of the video content. It should not provide information that is out of context or misaligned.\n" +"The predicted answer must capture the main themes and sentiments of the video.\n" +"Consider synonyms or paraphrases as valid matches.\n" +"Provide your evaluation of the contextual understanding of the prediction compared to the answer." +}, +"role": "user", +"content": +"Please evaluate the following video-based question-answer pair:\n\nf"Question:{question}\n" +f"Correct Answer:{answer}\n" +f"Predicted Answer:{pred}\n" +"Provide your evaluation only as a contextual understanding score where the contextual understanding score is an integer value between 0 and 5, with 5 indicating the highest level of contextual understanding." +"Please generate the response in the form of a Python dictionary string with keys 'score', where its value is contextual understanding score in INTEGER, not STRING." +"Do NOT PROVIDE ANY OTHER OUTPUT TEXT OR EXPLANATION. Only provide the Python dictionary string." +"For example, your response should look like this: \{'\'score':4.8\}. +``` + +# B. Additional Experiments + +# B.1. Ablation Studies on $\infty$ -Video LLaMA + +![](images/c88749596d4e02216dc627040721c61d7cc506e7861b09ac2887d755fb68d10e.jpg) +Figure 5. Ablation studies on the MovieChat dataset: Evaluation of accuracy and score metrics for various values of the number of basis functions $N$ and the contribution of long-term memory $\alpha$ . + +In this section, we conduct ablation studies on $\infty$ -Video LLaMA on the MovieChat dataset. We ablate three hyperparameters: the percentage of the long-term memory used $\alpha$ , the number of basis functions $N$ and the sampling method. We explore $\alpha \in \{0, 0.25, 0.5, 0.75, 0.95, 1\}$ , covering the full spectrum from exclusively using the LTM ( $\alpha = 0$ ) to exclusively using the STM ( $\alpha = 1$ ). Additionally, we vary the number of basis functions with $N \in \{128, 256, 512, 1024\}$ to evaluate the impact of this parameter on performance and vary the sampling as either uniform or sticky. + +Fig. 5 presents the accuracy and score provided by ChatGPT 3.5 as functions of the explored hyperparameters. The results reveal a general trend of increasing accuracy and score with $\alpha$ , up to a certain point, after which a slight decline is observed as $\alpha$ approaches 1. This trend is somewhat explained by the inherent variability in ChatGPT's outputs. Additionally, both accuracy and score tend to be higher for sticky memories compared to uniform sampling from $\alpha = 0.75$ onward, whereas uniform sampling demonstrates superior performance for lower values of $\alpha$ . Another observed trend is that as the number of basis functions increases, both metrics improve. However, for uniform sampling, performance slightly decreases beyond $N = 512$ . + +![](images/874b5d47a3453cab28ac6c66ab07ea81cb82a0eb6599ec4dc767a77fd6129439.jpg) +Figure 6. Highest continuous attention density frames selected using uniform memories in the Interstellar trailer for $\infty$ -Video LLaMA across 3 chunks. (Left) Interval: $[0, \tau^2]$ . (Middle) Interval: $(\tau^2, \tau]$ . (Right) Interval: $(\tau, 1]$ . + +# B.2. Qualitative Analysis + +In Fig. 6, we illustrate the attention density as a function of the number of frames for the uniform sampling LTM configuration, using $\alpha = 0.9$ , $N = 256$ , and $\tau = 0.5$ . This analysis spans 3 chunks of 256 frames each, corresponding to 3 contraction steps. Additionally, we showcase representative frames from high-density regions by identifying the top 10 frames in each interval and selecting non-redundant examples. + +The results reveal that, while the model effectively identifies key moments during the first two contraction steps, it disproportionately focuses on the credits scene in the final step. This behaviour contrasts with the results in Fig. 4, where such focus is avoided. + +We leave in Fig. 7 additional examples of predictions of our modified $\infty$ -Video LLaMA. We divide the video into 8 chunks of 256 frames with $N = 1024$ , $\tau = 0.75$ and $\alpha = 0.9$ both for uniform sampling and sticky memories. + +![](images/3d19230629798ff8b397eb5181f601ad589d1def03681c0bf75cf066645419cd.jpg) +Figure 7. Examples of $\infty$ -Video LLaMA answers with uniform sampling and sticky memories for short and ultra-long videos. Italicized corresponds to the correct answer while underlined corresponds to the wrong answer or hallucination. \ No newline at end of file diff --git a/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/images.zip b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7bfa44287912b64c6dda1782d22d0c5d34bf5dc1 --- /dev/null +++ b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06e4b00ad924d7fb39c73e9df71dd90923d565c1071995908269b0a7e4ffebea +size 874635 diff --git a/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/layout.json b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..86a27357137d4f2c1c5a3312281a2df36781a0ed --- /dev/null +++ b/videoatrainingfreeapproachtolongvideounderstandingviacontinuoustimememoryconsolidation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e466dcda2e44c38ce3331427b5b10863a02696b21a6ec26f7257c99188ae733 +size 671397